@timeax/form-palette 0.0.17 → 0.0.18
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.mts +9 -6
- package/dist/index.d.ts +9 -6
- package/dist/index.js +33 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -35549,6 +35549,7 @@ var InnerShadcnRadioVariant = (props, ref) => {
|
|
|
35549
35549
|
() => normalizeItems(
|
|
35550
35550
|
items,
|
|
35551
35551
|
mappers,
|
|
35552
|
+
//@ts-ignore
|
|
35552
35553
|
optionValue,
|
|
35553
35554
|
optionLabel
|
|
35554
35555
|
),
|
|
@@ -35681,6 +35682,10 @@ var InnerShadcnRadioVariant = (props, ref) => {
|
|
|
35681
35682
|
size: size4,
|
|
35682
35683
|
density,
|
|
35683
35684
|
optionId,
|
|
35685
|
+
click() {
|
|
35686
|
+
if (optionDisabled) return;
|
|
35687
|
+
handleSelect(displayItem.value);
|
|
35688
|
+
},
|
|
35684
35689
|
radio: radioNode
|
|
35685
35690
|
})
|
|
35686
35691
|
},
|
|
@@ -36572,6 +36577,11 @@ var InnerShadcnCheckboxVariant = (props, ref) => {
|
|
|
36572
36577
|
size: size4,
|
|
36573
36578
|
density,
|
|
36574
36579
|
checkboxId,
|
|
36580
|
+
click() {
|
|
36581
|
+
if (optionDisabled) return;
|
|
36582
|
+
const nextInternal = effectiveTristate ? internalState === "none" ? true : internalState === true ? false : "none" : internalState === true ? false : true;
|
|
36583
|
+
updateGroupValue(item.value, nextInternal, effectiveTristate);
|
|
36584
|
+
},
|
|
36575
36585
|
checkbox: checkboxNode
|
|
36576
36586
|
}),
|
|
36577
36587
|
hiddenInput
|
|
@@ -36993,7 +37003,13 @@ var ShadcnSelectVariant = React54.forwardRef(function ShadcnSelectVariant2(props
|
|
|
36993
37003
|
item,
|
|
36994
37004
|
selected: selectedItem != null && String(selectedItem.value) === String(item.value),
|
|
36995
37005
|
index: index2,
|
|
36996
|
-
option: optionNode
|
|
37006
|
+
option: optionNode,
|
|
37007
|
+
click() {
|
|
37008
|
+
if (disabled || readOnly || item.disabled) return;
|
|
37009
|
+
handleChange(String(item.value));
|
|
37010
|
+
setOpen(false);
|
|
37011
|
+
setQuery("");
|
|
37012
|
+
}
|
|
36997
37013
|
});
|
|
36998
37014
|
}),
|
|
36999
37015
|
virtualScroll && renderedItems.length < filteredItems.length && /* @__PURE__ */ jsx("div", { className: "px-2 py-1 text-[10px] text-muted-foreground text-center", children: "Scroll to load more\u2026" })
|
|
@@ -37735,7 +37751,11 @@ var ShadcnMultiSelectVariant = React54.forwardRef(function ShadcnMultiSelectVari
|
|
|
37735
37751
|
item,
|
|
37736
37752
|
selected,
|
|
37737
37753
|
index: index2,
|
|
37738
|
-
option: row
|
|
37754
|
+
option: row,
|
|
37755
|
+
click() {
|
|
37756
|
+
if (item.disabled) return;
|
|
37757
|
+
handleToggleValue(item.value);
|
|
37758
|
+
}
|
|
37739
37759
|
});
|
|
37740
37760
|
}),
|
|
37741
37761
|
showSelectAll && selectAllPosition === "bottom" && /* @__PURE__ */ jsxs(
|
|
@@ -40378,7 +40398,7 @@ var ShadcnTreeSelectVariant = React54.forwardRef(function ShadcnTreeSelectVarian
|
|
|
40378
40398
|
displayedNodes.map((item, index2) => {
|
|
40379
40399
|
const selected = selectedValues.includes(item.value);
|
|
40380
40400
|
const isExpanded = expanded.has(item.value);
|
|
40381
|
-
|
|
40401
|
+
const optionNode = /* @__PURE__ */ jsxs(
|
|
40382
40402
|
"div",
|
|
40383
40403
|
{
|
|
40384
40404
|
className: cn(
|
|
@@ -40436,6 +40456,16 @@ var ShadcnTreeSelectVariant = React54.forwardRef(function ShadcnTreeSelectVarian
|
|
|
40436
40456
|
},
|
|
40437
40457
|
item.key
|
|
40438
40458
|
);
|
|
40459
|
+
if (!renderOption) return optionNode;
|
|
40460
|
+
return renderOption({
|
|
40461
|
+
item,
|
|
40462
|
+
selected,
|
|
40463
|
+
index: index2,
|
|
40464
|
+
option: optionNode,
|
|
40465
|
+
click() {
|
|
40466
|
+
if (!item.disabled) handleToggleValue(item);
|
|
40467
|
+
}
|
|
40468
|
+
});
|
|
40439
40469
|
})
|
|
40440
40470
|
] });
|
|
40441
40471
|
const SelectBody = /* @__PURE__ */ jsxs(
|