@pos-360/horizon 0.31.0 → 0.31.1
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/{chunk-3CXBEGTO.mjs → chunk-NNP7MDQI.mjs} +5 -39
- package/dist/chunk-NNP7MDQI.mjs.map +1 -0
- package/dist/{chunk-HKUYZ5K6.js → chunk-T2YNCJ65.js} +5 -39
- package/dist/chunk-T2YNCJ65.js.map +1 -0
- package/dist/index.js +107 -107
- package/dist/index.mjs +1 -1
- package/dist/primitives.d.mts +0 -2
- package/dist/primitives.d.ts +0 -2
- package/dist/primitives.js +107 -107
- package/dist/primitives.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-3CXBEGTO.mjs.map +0 -1
- package/dist/chunk-HKUYZ5K6.js.map +0 -1
|
@@ -886,8 +886,7 @@ var SelectBar = React11__namespace.forwardRef(({
|
|
|
886
886
|
placeholder = "Select\u2026",
|
|
887
887
|
label,
|
|
888
888
|
disabled = false,
|
|
889
|
-
className
|
|
890
|
-
maxVisibleChips = 2
|
|
889
|
+
className
|
|
891
890
|
}, ref) => {
|
|
892
891
|
const [open, setOpen] = React11__namespace.useState(false);
|
|
893
892
|
const [search, setSearch] = React11__namespace.useState("");
|
|
@@ -978,11 +977,6 @@ var SelectBar = React11__namespace.forwardRef(({
|
|
|
978
977
|
setOpen(false);
|
|
979
978
|
}
|
|
980
979
|
};
|
|
981
|
-
const handleChipRemove = (e, chipValue) => {
|
|
982
|
-
e.stopPropagation();
|
|
983
|
-
const next = committedMulti.filter((v) => v !== chipValue);
|
|
984
|
-
commitMulti(next);
|
|
985
|
-
};
|
|
986
980
|
const canApply = (() => {
|
|
987
981
|
if (!manualApply) return false;
|
|
988
982
|
if (multiple) {
|
|
@@ -1004,35 +998,7 @@ var SelectBar = React11__namespace.forwardRef(({
|
|
|
1004
998
|
if (committedMulti.length === 0) {
|
|
1005
999
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400 dark:text-gray-500 truncate", children: placeholder });
|
|
1006
1000
|
}
|
|
1007
|
-
|
|
1008
|
-
const overflow = committedMulti.length - maxVisibleChips;
|
|
1009
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1 min-w-0 flex-wrap", children: [
|
|
1010
|
-
visible.map((v) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1011
|
-
"span",
|
|
1012
|
-
{
|
|
1013
|
-
className: "inline-flex items-center gap-1 bg-blue-50 text-blue-700 border border-blue-200 dark:bg-blue-950/50 dark:text-blue-400 dark:border-blue-800/50 rounded-md px-2 py-0.5 text-xs font-medium max-w-[120px]",
|
|
1014
|
-
children: [
|
|
1015
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: labelFor(v) }),
|
|
1016
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1017
|
-
"button",
|
|
1018
|
-
{
|
|
1019
|
-
type: "button",
|
|
1020
|
-
className: "shrink-0 hover:text-blue-900 dark:hover:text-blue-200",
|
|
1021
|
-
onClick: (e) => handleChipRemove(e, v),
|
|
1022
|
-
"aria-label": `Remove ${labelFor(v)}`,
|
|
1023
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3 w-3" })
|
|
1024
|
-
}
|
|
1025
|
-
)
|
|
1026
|
-
]
|
|
1027
|
-
},
|
|
1028
|
-
v
|
|
1029
|
-
)),
|
|
1030
|
-
overflow > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center bg-blue-50 text-blue-700 border border-blue-200 dark:bg-blue-950/50 dark:text-blue-400 dark:border-blue-800/50 rounded-md px-2 py-0.5 text-xs font-medium", children: [
|
|
1031
|
-
"+",
|
|
1032
|
-
overflow,
|
|
1033
|
-
" more"
|
|
1034
|
-
] })
|
|
1035
|
-
] });
|
|
1001
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-gray-900 dark:text-gray-100", children: committedMulti.length === options.length ? "All selected" : `${committedMulti.length} selected` });
|
|
1036
1002
|
}
|
|
1037
1003
|
if (committedSingle !== void 0) {
|
|
1038
1004
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-gray-900 dark:text-gray-100", children: labelFor(committedSingle) });
|
|
@@ -1049,7 +1015,7 @@ var SelectBar = React11__namespace.forwardRef(({
|
|
|
1049
1015
|
type: "button",
|
|
1050
1016
|
disabled,
|
|
1051
1017
|
className: chunkD2BLWOWK_js.cn(
|
|
1052
|
-
"flex h-[
|
|
1018
|
+
"flex h-[52px] min-h-[52px] w-full items-center justify-between gap-2 rounded-hz-md border border-gray-300 bg-white px-3 text-sm shadow-sm transition-colors",
|
|
1053
1019
|
"hover:bg-gray-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",
|
|
1054
1020
|
"dark:border-neutral-600 dark:bg-neutral-800 dark:hover:bg-neutral-700",
|
|
1055
1021
|
"disabled:pointer-events-none disabled:opacity-50"
|
|
@@ -3834,5 +3800,5 @@ exports.useColumnVisibility = useColumnVisibility;
|
|
|
3834
3800
|
exports.useFormContext = useFormContext;
|
|
3835
3801
|
exports.useFormFieldContext = useFormFieldContext;
|
|
3836
3802
|
exports.useTableSelection = useTableSelection;
|
|
3837
|
-
//# sourceMappingURL=chunk-
|
|
3838
|
-
//# sourceMappingURL=chunk-
|
|
3803
|
+
//# sourceMappingURL=chunk-T2YNCJ65.js.map
|
|
3804
|
+
//# sourceMappingURL=chunk-T2YNCJ65.js.map
|