@timeax/form-palette 0.1.28 → 0.1.30
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/{core-CtnF6uJt.d.ts → core-B34a6gqM.d.ts} +109 -2
- package/dist/{core-BS2fNt2O.d.mts → core-Bb5eVTa4.d.mts} +109 -2
- package/dist/extra.d.mts +2 -2
- package/dist/extra.d.ts +2 -2
- package/dist/extra.js +548 -116
- package/dist/extra.js.map +1 -1
- package/dist/extra.mjs +548 -116
- package/dist/extra.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +552 -119
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +552 -119
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -43,6 +43,13 @@ interface ChangeDetail<TMeta = unknown, TRaw = unknown> {
|
|
|
43
43
|
* Example: original keyboard input or pasted string.
|
|
44
44
|
*/
|
|
45
45
|
raw?: TRaw;
|
|
46
|
+
/**
|
|
47
|
+
* Raw selected option entries as provided by the variant input.
|
|
48
|
+
*
|
|
49
|
+
* For primitive options this contains primitives, for object options
|
|
50
|
+
* it contains the original objects.
|
|
51
|
+
*/
|
|
52
|
+
selectedOptions?: unknown[];
|
|
46
53
|
nativeEvent?: React__default.SyntheticEvent;
|
|
47
54
|
/**
|
|
48
55
|
* Variant-specific metadata (e.g. cursor position).
|
|
@@ -1249,6 +1256,16 @@ interface RadioItem<TValue> {
|
|
|
1249
1256
|
description?: React.ReactNode;
|
|
1250
1257
|
disabled?: boolean;
|
|
1251
1258
|
key?: React.Key;
|
|
1259
|
+
raw?: unknown;
|
|
1260
|
+
tags?: Array<{
|
|
1261
|
+
label: React.ReactNode;
|
|
1262
|
+
icon?: React.ReactNode;
|
|
1263
|
+
className?: string;
|
|
1264
|
+
color?: string;
|
|
1265
|
+
bgColor?: string;
|
|
1266
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
1267
|
+
raw: unknown;
|
|
1268
|
+
}>;
|
|
1252
1269
|
/**
|
|
1253
1270
|
* Option-level renderer (provided by the normaliser).
|
|
1254
1271
|
* If present, it overrides the variant-level `renderOption` for this item.
|
|
@@ -1323,6 +1340,13 @@ interface ShadcnRadioUiProps<TItem, TValue> {
|
|
|
1323
1340
|
* optionLabel = "title"
|
|
1324
1341
|
*/
|
|
1325
1342
|
optionLabel?: keyof TItem | string;
|
|
1343
|
+
optionTags?: keyof TItem | string;
|
|
1344
|
+
optionTagLabel?: string | ((tag: unknown) => React.ReactNode);
|
|
1345
|
+
optionTagIcon?: string | ((tag: unknown) => React.ReactNode);
|
|
1346
|
+
optionTagClassName?: string | ((tag: unknown) => string);
|
|
1347
|
+
optionTagColor?: string | ((tag: unknown) => string);
|
|
1348
|
+
optionTagBgColor?: string | ((tag: unknown) => string);
|
|
1349
|
+
optionTagOnClick?: string | ((tag: unknown) => React.MouseEventHandler<HTMLSpanElement>);
|
|
1326
1350
|
/**
|
|
1327
1351
|
* Optional custom renderer for each option.
|
|
1328
1352
|
*
|
|
@@ -1405,6 +1429,7 @@ type CheckboxTriStateValue = true | false;
|
|
|
1405
1429
|
* "none" is used to represent "no stance yet".
|
|
1406
1430
|
*/
|
|
1407
1431
|
type CheckboxInternalState = true | false | "none";
|
|
1432
|
+
type CheckboxGroupSelectedValue<TValue> = readonly TValue[] | undefined;
|
|
1408
1433
|
type CheckboxGroupValueMain<TValue extends string | number | symbol> = Record<TValue, CheckboxTriStateValue>;
|
|
1409
1434
|
/**
|
|
1410
1435
|
* Single checkbox value.
|
|
@@ -1419,13 +1444,23 @@ type CheckboxSingleValue = boolean | undefined;
|
|
|
1419
1444
|
*
|
|
1420
1445
|
* At the type level this is a union; at runtime we branch using `single`.
|
|
1421
1446
|
*/
|
|
1422
|
-
type CheckboxVariantValue<TValue> = CheckboxSingleValue | CheckboxGroupValueMain<TValue>;
|
|
1447
|
+
type CheckboxVariantValue<TValue> = CheckboxSingleValue | CheckboxGroupValueMain<TValue> | CheckboxGroupSelectedValue<TValue>;
|
|
1423
1448
|
interface CheckboxItem<TValue> {
|
|
1424
1449
|
value: TValue;
|
|
1425
1450
|
label: React.ReactNode;
|
|
1426
1451
|
description?: React.ReactNode;
|
|
1427
1452
|
disabled?: boolean;
|
|
1428
1453
|
key?: React.Key;
|
|
1454
|
+
raw?: unknown;
|
|
1455
|
+
tags?: Array<{
|
|
1456
|
+
label: React.ReactNode;
|
|
1457
|
+
icon?: React.ReactNode;
|
|
1458
|
+
className?: string;
|
|
1459
|
+
color?: string;
|
|
1460
|
+
bgColor?: string;
|
|
1461
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
1462
|
+
raw: unknown;
|
|
1463
|
+
}>;
|
|
1429
1464
|
/**
|
|
1430
1465
|
* Option-level renderer (provided by the normaliser).
|
|
1431
1466
|
* If present, it should override the variant-level `renderOption` for this item.
|
|
@@ -1501,6 +1536,13 @@ interface ShadcnCheckboxUiProps<TItem, TValue> {
|
|
|
1501
1536
|
* optionLabel = "title"
|
|
1502
1537
|
*/
|
|
1503
1538
|
optionLabel?: keyof TItem;
|
|
1539
|
+
optionTags?: keyof TItem;
|
|
1540
|
+
optionTagLabel?: string | ((tag: unknown) => React.ReactNode);
|
|
1541
|
+
optionTagIcon?: string | ((tag: unknown) => React.ReactNode);
|
|
1542
|
+
optionTagClassName?: string | ((tag: unknown) => string);
|
|
1543
|
+
optionTagColor?: string | ((tag: unknown) => string);
|
|
1544
|
+
optionTagBgColor?: string | ((tag: unknown) => string);
|
|
1545
|
+
optionTagOnClick?: string | ((tag: unknown) => React.MouseEventHandler<HTMLSpanElement>);
|
|
1504
1546
|
/**
|
|
1505
1547
|
* Custom renderer for each option row.
|
|
1506
1548
|
*/
|
|
@@ -1605,7 +1647,8 @@ type DefaultCheckboxItemValue = string | number;
|
|
|
1605
1647
|
* Public "value" type for the checkbox variant used by the registry:
|
|
1606
1648
|
*
|
|
1607
1649
|
* - Single mode: boolean | undefined
|
|
1608
|
-
* - Group mode:
|
|
1650
|
+
* - Group mode (non-tristate): DefaultCheckboxItemValue[] | undefined
|
|
1651
|
+
* - Group mode (tristate): Record<DefaultCheckboxItemValue, true | false>
|
|
1609
1652
|
*
|
|
1610
1653
|
* In tri-state group mode, both `true` and `false` entries are present;
|
|
1611
1654
|
* `"none"` never appears in this type.
|
|
@@ -1635,6 +1678,15 @@ type NormalizedMultiItem = {
|
|
|
1635
1678
|
description?: React.ReactNode;
|
|
1636
1679
|
disabled?: boolean;
|
|
1637
1680
|
icon?: React.ReactNode;
|
|
1681
|
+
tags?: Array<{
|
|
1682
|
+
label: React.ReactNode;
|
|
1683
|
+
icon?: React.ReactNode;
|
|
1684
|
+
className?: string;
|
|
1685
|
+
color?: string;
|
|
1686
|
+
bgColor?: string;
|
|
1687
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
1688
|
+
raw: unknown;
|
|
1689
|
+
}>;
|
|
1638
1690
|
/** Option-level renderer (falls back to global renderOption) */
|
|
1639
1691
|
render?: (...args: any[]) => React.ReactNode;
|
|
1640
1692
|
raw: MultiSelectOption;
|
|
@@ -1684,6 +1736,13 @@ type MultiSelectBaseProps = Pick<VariantBaseProps<SelectPrimitive$1[] | undefine
|
|
|
1684
1736
|
* - function → custom mapper
|
|
1685
1737
|
*/
|
|
1686
1738
|
optionIcon?: string | ((item: MultiSelectOption) => React.ReactNode);
|
|
1739
|
+
optionTags?: string | ((item: MultiSelectOption) => unknown[]);
|
|
1740
|
+
optionTagLabel?: string | ((tag: unknown) => React.ReactNode);
|
|
1741
|
+
optionTagIcon?: string | ((tag: unknown) => React.ReactNode);
|
|
1742
|
+
optionTagClassName?: string | ((tag: unknown) => string);
|
|
1743
|
+
optionTagColor?: string | ((tag: unknown) => string);
|
|
1744
|
+
optionTagBgColor?: string | ((tag: unknown) => string);
|
|
1745
|
+
optionTagOnClick?: string | ((tag: unknown) => React.MouseEventHandler<HTMLSpanElement>);
|
|
1687
1746
|
/**
|
|
1688
1747
|
* How to compute the React key for each option.
|
|
1689
1748
|
*/
|
|
@@ -2113,6 +2172,15 @@ type NormalizedTreeItem = {
|
|
|
2113
2172
|
description?: React__default.ReactNode;
|
|
2114
2173
|
disabled?: boolean;
|
|
2115
2174
|
icon?: React__default.ReactNode;
|
|
2175
|
+
tags?: Array<{
|
|
2176
|
+
label: React__default.ReactNode;
|
|
2177
|
+
icon?: React__default.ReactNode;
|
|
2178
|
+
className?: string;
|
|
2179
|
+
color?: string;
|
|
2180
|
+
bgColor?: string;
|
|
2181
|
+
onClick?: React__default.MouseEventHandler<HTMLSpanElement>;
|
|
2182
|
+
raw: unknown;
|
|
2183
|
+
}>;
|
|
2116
2184
|
level: number;
|
|
2117
2185
|
parentValue?: TreeKey;
|
|
2118
2186
|
path: TreeKey[];
|
|
@@ -2137,6 +2205,13 @@ type TreeSelectBaseProps = Pick<VariantBaseProps<TreeValue>, "value" | "onValue"
|
|
|
2137
2205
|
optionDisabled?: string | ((item: TreeSelectOption) => boolean);
|
|
2138
2206
|
optionIcon?: string | ((item: TreeSelectOption) => React.ReactNode);
|
|
2139
2207
|
optionKey?: string | ((item: TreeSelectOption, index: number) => React.Key);
|
|
2208
|
+
optionTags?: string | ((item: TreeSelectOption) => unknown[]);
|
|
2209
|
+
optionTagLabel?: string | ((tag: unknown) => React.ReactNode);
|
|
2210
|
+
optionTagIcon?: string | ((tag: unknown) => React.ReactNode);
|
|
2211
|
+
optionTagClassName?: string | ((tag: unknown) => string);
|
|
2212
|
+
optionTagColor?: string | ((tag: unknown) => string);
|
|
2213
|
+
optionTagBgColor?: string | ((tag: unknown) => string);
|
|
2214
|
+
optionTagOnClick?: string | ((tag: unknown) => React.MouseEventHandler<HTMLSpanElement>);
|
|
2140
2215
|
searchable?: boolean;
|
|
2141
2216
|
searchPlaceholder?: string;
|
|
2142
2217
|
emptyLabel?: React.ReactNode;
|
|
@@ -2383,6 +2458,15 @@ type NormalizedSelectItem = {
|
|
|
2383
2458
|
description?: React.ReactNode;
|
|
2384
2459
|
disabled?: boolean;
|
|
2385
2460
|
icon?: React.ReactNode;
|
|
2461
|
+
tags?: Array<{
|
|
2462
|
+
label: React.ReactNode;
|
|
2463
|
+
icon?: React.ReactNode;
|
|
2464
|
+
className?: string;
|
|
2465
|
+
color?: string;
|
|
2466
|
+
bgColor?: string;
|
|
2467
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
2468
|
+
raw: unknown;
|
|
2469
|
+
}>;
|
|
2386
2470
|
/** Option-level renderer (falls back to global renderOption) */
|
|
2387
2471
|
render?: (...args: any[]) => React.ReactNode;
|
|
2388
2472
|
raw: SelectOption;
|
|
@@ -2435,6 +2519,13 @@ interface SelectBaseProps extends Pick<VariantBaseProps<SelectPrimitive | undefi
|
|
|
2435
2519
|
* - function → custom mapper
|
|
2436
2520
|
*/
|
|
2437
2521
|
optionIcon?: string | ((item: SelectOption) => React.ReactNode);
|
|
2522
|
+
optionTags?: string | ((item: SelectOption) => unknown[]);
|
|
2523
|
+
optionTagLabel?: string | ((tag: unknown) => React.ReactNode);
|
|
2524
|
+
optionTagIcon?: string | ((tag: unknown) => React.ReactNode);
|
|
2525
|
+
optionTagClassName?: string | ((tag: unknown) => string);
|
|
2526
|
+
optionTagColor?: string | ((tag: unknown) => string);
|
|
2527
|
+
optionTagBgColor?: string | ((tag: unknown) => string);
|
|
2528
|
+
optionTagOnClick?: string | ((tag: unknown) => React.MouseEventHandler<HTMLSpanElement>);
|
|
2438
2529
|
/**
|
|
2439
2530
|
* How to compute the React key for each option.
|
|
2440
2531
|
*/
|
|
@@ -2612,6 +2703,15 @@ interface ToggleOption {
|
|
|
2612
2703
|
disabled?: boolean;
|
|
2613
2704
|
tooltip?: React.ReactNode;
|
|
2614
2705
|
meta?: any;
|
|
2706
|
+
tags?: Array<{
|
|
2707
|
+
label: React.ReactNode;
|
|
2708
|
+
icon?: React.ReactNode;
|
|
2709
|
+
className?: string;
|
|
2710
|
+
color?: string;
|
|
2711
|
+
bgColor?: string;
|
|
2712
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
2713
|
+
raw?: unknown;
|
|
2714
|
+
}>;
|
|
2615
2715
|
}
|
|
2616
2716
|
/**
|
|
2617
2717
|
* Allow primitive options as shorthand:
|
|
@@ -2678,6 +2778,13 @@ interface ShadcnToggleVariantProps extends Pick<VariantBaseProps<string | string
|
|
|
2678
2778
|
* If omitted, falls back to obj.meta.
|
|
2679
2779
|
*/
|
|
2680
2780
|
optionMeta?: string;
|
|
2781
|
+
optionTags?: string;
|
|
2782
|
+
optionTagLabel?: string;
|
|
2783
|
+
optionTagIcon?: string;
|
|
2784
|
+
optionTagClassName?: string;
|
|
2785
|
+
optionTagColor?: string;
|
|
2786
|
+
optionTagBgColor?: string;
|
|
2787
|
+
optionTagOnClick?: string;
|
|
2681
2788
|
/**
|
|
2682
2789
|
* Optional custom renderer for each option.
|
|
2683
2790
|
* Receives the normalized ToggleOption and selected state.
|
|
@@ -43,6 +43,13 @@ interface ChangeDetail<TMeta = unknown, TRaw = unknown> {
|
|
|
43
43
|
* Example: original keyboard input or pasted string.
|
|
44
44
|
*/
|
|
45
45
|
raw?: TRaw;
|
|
46
|
+
/**
|
|
47
|
+
* Raw selected option entries as provided by the variant input.
|
|
48
|
+
*
|
|
49
|
+
* For primitive options this contains primitives, for object options
|
|
50
|
+
* it contains the original objects.
|
|
51
|
+
*/
|
|
52
|
+
selectedOptions?: unknown[];
|
|
46
53
|
nativeEvent?: React__default.SyntheticEvent;
|
|
47
54
|
/**
|
|
48
55
|
* Variant-specific metadata (e.g. cursor position).
|
|
@@ -1249,6 +1256,16 @@ interface RadioItem<TValue> {
|
|
|
1249
1256
|
description?: React.ReactNode;
|
|
1250
1257
|
disabled?: boolean;
|
|
1251
1258
|
key?: React.Key;
|
|
1259
|
+
raw?: unknown;
|
|
1260
|
+
tags?: Array<{
|
|
1261
|
+
label: React.ReactNode;
|
|
1262
|
+
icon?: React.ReactNode;
|
|
1263
|
+
className?: string;
|
|
1264
|
+
color?: string;
|
|
1265
|
+
bgColor?: string;
|
|
1266
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
1267
|
+
raw: unknown;
|
|
1268
|
+
}>;
|
|
1252
1269
|
/**
|
|
1253
1270
|
* Option-level renderer (provided by the normaliser).
|
|
1254
1271
|
* If present, it overrides the variant-level `renderOption` for this item.
|
|
@@ -1323,6 +1340,13 @@ interface ShadcnRadioUiProps<TItem, TValue> {
|
|
|
1323
1340
|
* optionLabel = "title"
|
|
1324
1341
|
*/
|
|
1325
1342
|
optionLabel?: keyof TItem | string;
|
|
1343
|
+
optionTags?: keyof TItem | string;
|
|
1344
|
+
optionTagLabel?: string | ((tag: unknown) => React.ReactNode);
|
|
1345
|
+
optionTagIcon?: string | ((tag: unknown) => React.ReactNode);
|
|
1346
|
+
optionTagClassName?: string | ((tag: unknown) => string);
|
|
1347
|
+
optionTagColor?: string | ((tag: unknown) => string);
|
|
1348
|
+
optionTagBgColor?: string | ((tag: unknown) => string);
|
|
1349
|
+
optionTagOnClick?: string | ((tag: unknown) => React.MouseEventHandler<HTMLSpanElement>);
|
|
1326
1350
|
/**
|
|
1327
1351
|
* Optional custom renderer for each option.
|
|
1328
1352
|
*
|
|
@@ -1405,6 +1429,7 @@ type CheckboxTriStateValue = true | false;
|
|
|
1405
1429
|
* "none" is used to represent "no stance yet".
|
|
1406
1430
|
*/
|
|
1407
1431
|
type CheckboxInternalState = true | false | "none";
|
|
1432
|
+
type CheckboxGroupSelectedValue<TValue> = readonly TValue[] | undefined;
|
|
1408
1433
|
type CheckboxGroupValueMain<TValue extends string | number | symbol> = Record<TValue, CheckboxTriStateValue>;
|
|
1409
1434
|
/**
|
|
1410
1435
|
* Single checkbox value.
|
|
@@ -1419,13 +1444,23 @@ type CheckboxSingleValue = boolean | undefined;
|
|
|
1419
1444
|
*
|
|
1420
1445
|
* At the type level this is a union; at runtime we branch using `single`.
|
|
1421
1446
|
*/
|
|
1422
|
-
type CheckboxVariantValue<TValue> = CheckboxSingleValue | CheckboxGroupValueMain<TValue>;
|
|
1447
|
+
type CheckboxVariantValue<TValue> = CheckboxSingleValue | CheckboxGroupValueMain<TValue> | CheckboxGroupSelectedValue<TValue>;
|
|
1423
1448
|
interface CheckboxItem<TValue> {
|
|
1424
1449
|
value: TValue;
|
|
1425
1450
|
label: React.ReactNode;
|
|
1426
1451
|
description?: React.ReactNode;
|
|
1427
1452
|
disabled?: boolean;
|
|
1428
1453
|
key?: React.Key;
|
|
1454
|
+
raw?: unknown;
|
|
1455
|
+
tags?: Array<{
|
|
1456
|
+
label: React.ReactNode;
|
|
1457
|
+
icon?: React.ReactNode;
|
|
1458
|
+
className?: string;
|
|
1459
|
+
color?: string;
|
|
1460
|
+
bgColor?: string;
|
|
1461
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
1462
|
+
raw: unknown;
|
|
1463
|
+
}>;
|
|
1429
1464
|
/**
|
|
1430
1465
|
* Option-level renderer (provided by the normaliser).
|
|
1431
1466
|
* If present, it should override the variant-level `renderOption` for this item.
|
|
@@ -1501,6 +1536,13 @@ interface ShadcnCheckboxUiProps<TItem, TValue> {
|
|
|
1501
1536
|
* optionLabel = "title"
|
|
1502
1537
|
*/
|
|
1503
1538
|
optionLabel?: keyof TItem;
|
|
1539
|
+
optionTags?: keyof TItem;
|
|
1540
|
+
optionTagLabel?: string | ((tag: unknown) => React.ReactNode);
|
|
1541
|
+
optionTagIcon?: string | ((tag: unknown) => React.ReactNode);
|
|
1542
|
+
optionTagClassName?: string | ((tag: unknown) => string);
|
|
1543
|
+
optionTagColor?: string | ((tag: unknown) => string);
|
|
1544
|
+
optionTagBgColor?: string | ((tag: unknown) => string);
|
|
1545
|
+
optionTagOnClick?: string | ((tag: unknown) => React.MouseEventHandler<HTMLSpanElement>);
|
|
1504
1546
|
/**
|
|
1505
1547
|
* Custom renderer for each option row.
|
|
1506
1548
|
*/
|
|
@@ -1605,7 +1647,8 @@ type DefaultCheckboxItemValue = string | number;
|
|
|
1605
1647
|
* Public "value" type for the checkbox variant used by the registry:
|
|
1606
1648
|
*
|
|
1607
1649
|
* - Single mode: boolean | undefined
|
|
1608
|
-
* - Group mode:
|
|
1650
|
+
* - Group mode (non-tristate): DefaultCheckboxItemValue[] | undefined
|
|
1651
|
+
* - Group mode (tristate): Record<DefaultCheckboxItemValue, true | false>
|
|
1609
1652
|
*
|
|
1610
1653
|
* In tri-state group mode, both `true` and `false` entries are present;
|
|
1611
1654
|
* `"none"` never appears in this type.
|
|
@@ -1635,6 +1678,15 @@ type NormalizedMultiItem = {
|
|
|
1635
1678
|
description?: React.ReactNode;
|
|
1636
1679
|
disabled?: boolean;
|
|
1637
1680
|
icon?: React.ReactNode;
|
|
1681
|
+
tags?: Array<{
|
|
1682
|
+
label: React.ReactNode;
|
|
1683
|
+
icon?: React.ReactNode;
|
|
1684
|
+
className?: string;
|
|
1685
|
+
color?: string;
|
|
1686
|
+
bgColor?: string;
|
|
1687
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
1688
|
+
raw: unknown;
|
|
1689
|
+
}>;
|
|
1638
1690
|
/** Option-level renderer (falls back to global renderOption) */
|
|
1639
1691
|
render?: (...args: any[]) => React.ReactNode;
|
|
1640
1692
|
raw: MultiSelectOption;
|
|
@@ -1684,6 +1736,13 @@ type MultiSelectBaseProps = Pick<VariantBaseProps<SelectPrimitive$1[] | undefine
|
|
|
1684
1736
|
* - function → custom mapper
|
|
1685
1737
|
*/
|
|
1686
1738
|
optionIcon?: string | ((item: MultiSelectOption) => React.ReactNode);
|
|
1739
|
+
optionTags?: string | ((item: MultiSelectOption) => unknown[]);
|
|
1740
|
+
optionTagLabel?: string | ((tag: unknown) => React.ReactNode);
|
|
1741
|
+
optionTagIcon?: string | ((tag: unknown) => React.ReactNode);
|
|
1742
|
+
optionTagClassName?: string | ((tag: unknown) => string);
|
|
1743
|
+
optionTagColor?: string | ((tag: unknown) => string);
|
|
1744
|
+
optionTagBgColor?: string | ((tag: unknown) => string);
|
|
1745
|
+
optionTagOnClick?: string | ((tag: unknown) => React.MouseEventHandler<HTMLSpanElement>);
|
|
1687
1746
|
/**
|
|
1688
1747
|
* How to compute the React key for each option.
|
|
1689
1748
|
*/
|
|
@@ -2113,6 +2172,15 @@ type NormalizedTreeItem = {
|
|
|
2113
2172
|
description?: React__default.ReactNode;
|
|
2114
2173
|
disabled?: boolean;
|
|
2115
2174
|
icon?: React__default.ReactNode;
|
|
2175
|
+
tags?: Array<{
|
|
2176
|
+
label: React__default.ReactNode;
|
|
2177
|
+
icon?: React__default.ReactNode;
|
|
2178
|
+
className?: string;
|
|
2179
|
+
color?: string;
|
|
2180
|
+
bgColor?: string;
|
|
2181
|
+
onClick?: React__default.MouseEventHandler<HTMLSpanElement>;
|
|
2182
|
+
raw: unknown;
|
|
2183
|
+
}>;
|
|
2116
2184
|
level: number;
|
|
2117
2185
|
parentValue?: TreeKey;
|
|
2118
2186
|
path: TreeKey[];
|
|
@@ -2137,6 +2205,13 @@ type TreeSelectBaseProps = Pick<VariantBaseProps<TreeValue>, "value" | "onValue"
|
|
|
2137
2205
|
optionDisabled?: string | ((item: TreeSelectOption) => boolean);
|
|
2138
2206
|
optionIcon?: string | ((item: TreeSelectOption) => React.ReactNode);
|
|
2139
2207
|
optionKey?: string | ((item: TreeSelectOption, index: number) => React.Key);
|
|
2208
|
+
optionTags?: string | ((item: TreeSelectOption) => unknown[]);
|
|
2209
|
+
optionTagLabel?: string | ((tag: unknown) => React.ReactNode);
|
|
2210
|
+
optionTagIcon?: string | ((tag: unknown) => React.ReactNode);
|
|
2211
|
+
optionTagClassName?: string | ((tag: unknown) => string);
|
|
2212
|
+
optionTagColor?: string | ((tag: unknown) => string);
|
|
2213
|
+
optionTagBgColor?: string | ((tag: unknown) => string);
|
|
2214
|
+
optionTagOnClick?: string | ((tag: unknown) => React.MouseEventHandler<HTMLSpanElement>);
|
|
2140
2215
|
searchable?: boolean;
|
|
2141
2216
|
searchPlaceholder?: string;
|
|
2142
2217
|
emptyLabel?: React.ReactNode;
|
|
@@ -2383,6 +2458,15 @@ type NormalizedSelectItem = {
|
|
|
2383
2458
|
description?: React.ReactNode;
|
|
2384
2459
|
disabled?: boolean;
|
|
2385
2460
|
icon?: React.ReactNode;
|
|
2461
|
+
tags?: Array<{
|
|
2462
|
+
label: React.ReactNode;
|
|
2463
|
+
icon?: React.ReactNode;
|
|
2464
|
+
className?: string;
|
|
2465
|
+
color?: string;
|
|
2466
|
+
bgColor?: string;
|
|
2467
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
2468
|
+
raw: unknown;
|
|
2469
|
+
}>;
|
|
2386
2470
|
/** Option-level renderer (falls back to global renderOption) */
|
|
2387
2471
|
render?: (...args: any[]) => React.ReactNode;
|
|
2388
2472
|
raw: SelectOption;
|
|
@@ -2435,6 +2519,13 @@ interface SelectBaseProps extends Pick<VariantBaseProps<SelectPrimitive | undefi
|
|
|
2435
2519
|
* - function → custom mapper
|
|
2436
2520
|
*/
|
|
2437
2521
|
optionIcon?: string | ((item: SelectOption) => React.ReactNode);
|
|
2522
|
+
optionTags?: string | ((item: SelectOption) => unknown[]);
|
|
2523
|
+
optionTagLabel?: string | ((tag: unknown) => React.ReactNode);
|
|
2524
|
+
optionTagIcon?: string | ((tag: unknown) => React.ReactNode);
|
|
2525
|
+
optionTagClassName?: string | ((tag: unknown) => string);
|
|
2526
|
+
optionTagColor?: string | ((tag: unknown) => string);
|
|
2527
|
+
optionTagBgColor?: string | ((tag: unknown) => string);
|
|
2528
|
+
optionTagOnClick?: string | ((tag: unknown) => React.MouseEventHandler<HTMLSpanElement>);
|
|
2438
2529
|
/**
|
|
2439
2530
|
* How to compute the React key for each option.
|
|
2440
2531
|
*/
|
|
@@ -2612,6 +2703,15 @@ interface ToggleOption {
|
|
|
2612
2703
|
disabled?: boolean;
|
|
2613
2704
|
tooltip?: React.ReactNode;
|
|
2614
2705
|
meta?: any;
|
|
2706
|
+
tags?: Array<{
|
|
2707
|
+
label: React.ReactNode;
|
|
2708
|
+
icon?: React.ReactNode;
|
|
2709
|
+
className?: string;
|
|
2710
|
+
color?: string;
|
|
2711
|
+
bgColor?: string;
|
|
2712
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
2713
|
+
raw?: unknown;
|
|
2714
|
+
}>;
|
|
2615
2715
|
}
|
|
2616
2716
|
/**
|
|
2617
2717
|
* Allow primitive options as shorthand:
|
|
@@ -2678,6 +2778,13 @@ interface ShadcnToggleVariantProps extends Pick<VariantBaseProps<string | string
|
|
|
2678
2778
|
* If omitted, falls back to obj.meta.
|
|
2679
2779
|
*/
|
|
2680
2780
|
optionMeta?: string;
|
|
2781
|
+
optionTags?: string;
|
|
2782
|
+
optionTagLabel?: string;
|
|
2783
|
+
optionTagIcon?: string;
|
|
2784
|
+
optionTagClassName?: string;
|
|
2785
|
+
optionTagColor?: string;
|
|
2786
|
+
optionTagBgColor?: string;
|
|
2787
|
+
optionTagOnClick?: string;
|
|
2681
2788
|
/**
|
|
2682
2789
|
* Optional custom renderer for each option.
|
|
2683
2790
|
* Receives the normalized ToggleOption and selected state.
|
package/dist/extra.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Q as ListerSearchPayload, U as ListerId, W as ListerDefinition, X as ListerOption, Y as PresetMap, Z as ListerApi, _ as ListerStoreState, $ as ListerSessionId, a0 as ListerSearchTarget, a1 as ListerSearchMode, a2 as ListerFilterCtx, a3 as ListerDetails, a4 as ListerProviderHost, a5 as ListerRuntimeState, a6 as ShadcnJsonEditorProps, a7 as JsonEditorIndexHandle } from './core-
|
|
4
|
-
export { ad as ListerChangeEvent, am as ListerFilterApply, al as ListerFilterApplyMode, an as ListerFilterBindKey, ap as ListerFilterGroupOption, ao as ListerFilterInput, ar as ListerFilterInputOption, as as ListerFilterOption, at as ListerFilterSpec, aq as ListerFilterValueOption, af as ListerLogCode, ag as ListerLogEntry, ae as ListerLogLevel, ai as ListerMapping, a8 as ListerMode, ax as ListerOpenOptions, a9 as ListerOpenReason, ay as ListerOpenResult, aw as ListerOptionsForMode, ah as ListerPermissionCtx, av as ListerRawForMode, ak as ListerSearchSpec, aD as ListerSessionState, aj as ListerSource, au as ListerValueForMode, ac as OpenAnchor, aB as PresetFilters, aC as PresetMeta, az as PresetRaw, aA as PresetValue, ab as Resolver, aa as Selector } from './core-
|
|
3
|
+
import { Q as ListerSearchPayload, U as ListerId, W as ListerDefinition, X as ListerOption, Y as PresetMap, Z as ListerApi, _ as ListerStoreState, $ as ListerSessionId, a0 as ListerSearchTarget, a1 as ListerSearchMode, a2 as ListerFilterCtx, a3 as ListerDetails, a4 as ListerProviderHost, a5 as ListerRuntimeState, a6 as ShadcnJsonEditorProps, a7 as JsonEditorIndexHandle } from './core-Bb5eVTa4.mjs';
|
|
4
|
+
export { ad as ListerChangeEvent, am as ListerFilterApply, al as ListerFilterApplyMode, an as ListerFilterBindKey, ap as ListerFilterGroupOption, ao as ListerFilterInput, ar as ListerFilterInputOption, as as ListerFilterOption, at as ListerFilterSpec, aq as ListerFilterValueOption, af as ListerLogCode, ag as ListerLogEntry, ae as ListerLogLevel, ai as ListerMapping, a8 as ListerMode, ax as ListerOpenOptions, a9 as ListerOpenReason, ay as ListerOpenResult, aw as ListerOptionsForMode, ah as ListerPermissionCtx, av as ListerRawForMode, ak as ListerSearchSpec, aD as ListerSessionState, aj as ListerSource, au as ListerValueForMode, ac as OpenAnchor, aB as PresetFilters, aC as PresetMeta, az as PresetRaw, aA as PresetValue, ab as Resolver, aa as Selector } from './core-Bb5eVTa4.mjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import './adapter-CvjXO9Gi.mjs';
|
|
7
7
|
import '@inertiajs/core';
|
package/dist/extra.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Q as ListerSearchPayload, U as ListerId, W as ListerDefinition, X as ListerOption, Y as PresetMap, Z as ListerApi, _ as ListerStoreState, $ as ListerSessionId, a0 as ListerSearchTarget, a1 as ListerSearchMode, a2 as ListerFilterCtx, a3 as ListerDetails, a4 as ListerProviderHost, a5 as ListerRuntimeState, a6 as ShadcnJsonEditorProps, a7 as JsonEditorIndexHandle } from './core-
|
|
4
|
-
export { ad as ListerChangeEvent, am as ListerFilterApply, al as ListerFilterApplyMode, an as ListerFilterBindKey, ap as ListerFilterGroupOption, ao as ListerFilterInput, ar as ListerFilterInputOption, as as ListerFilterOption, at as ListerFilterSpec, aq as ListerFilterValueOption, af as ListerLogCode, ag as ListerLogEntry, ae as ListerLogLevel, ai as ListerMapping, a8 as ListerMode, ax as ListerOpenOptions, a9 as ListerOpenReason, ay as ListerOpenResult, aw as ListerOptionsForMode, ah as ListerPermissionCtx, av as ListerRawForMode, ak as ListerSearchSpec, aD as ListerSessionState, aj as ListerSource, au as ListerValueForMode, ac as OpenAnchor, aB as PresetFilters, aC as PresetMeta, az as PresetRaw, aA as PresetValue, ab as Resolver, aa as Selector } from './core-
|
|
3
|
+
import { Q as ListerSearchPayload, U as ListerId, W as ListerDefinition, X as ListerOption, Y as PresetMap, Z as ListerApi, _ as ListerStoreState, $ as ListerSessionId, a0 as ListerSearchTarget, a1 as ListerSearchMode, a2 as ListerFilterCtx, a3 as ListerDetails, a4 as ListerProviderHost, a5 as ListerRuntimeState, a6 as ShadcnJsonEditorProps, a7 as JsonEditorIndexHandle } from './core-B34a6gqM.js';
|
|
4
|
+
export { ad as ListerChangeEvent, am as ListerFilterApply, al as ListerFilterApplyMode, an as ListerFilterBindKey, ap as ListerFilterGroupOption, ao as ListerFilterInput, ar as ListerFilterInputOption, as as ListerFilterOption, at as ListerFilterSpec, aq as ListerFilterValueOption, af as ListerLogCode, ag as ListerLogEntry, ae as ListerLogLevel, ai as ListerMapping, a8 as ListerMode, ax as ListerOpenOptions, a9 as ListerOpenReason, ay as ListerOpenResult, aw as ListerOptionsForMode, ah as ListerPermissionCtx, av as ListerRawForMode, ak as ListerSearchSpec, aD as ListerSessionState, aj as ListerSource, au as ListerValueForMode, ac as OpenAnchor, aB as PresetFilters, aC as PresetMeta, az as PresetRaw, aA as PresetValue, ab as Resolver, aa as Selector } from './core-B34a6gqM.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import './adapter-CvjXO9Gi.js';
|
|
7
7
|
import '@inertiajs/core';
|