@pos-360/horizon 0.31.0 → 0.31.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.
@@ -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
- const visible = committedMulti.slice(0, maxVisibleChips);
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,10 +1015,7 @@ var SelectBar = React11__namespace.forwardRef(({
1049
1015
  type: "button",
1050
1016
  disabled,
1051
1017
  className: chunkD2BLWOWK_js.cn(
1052
- "flex h-[42px] min-h-[42px] 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
- "hover:bg-gray-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",
1054
- "dark:border-neutral-600 dark:bg-neutral-800 dark:hover:bg-neutral-700",
1055
- "disabled:pointer-events-none disabled:opacity-50"
1018
+ "flex h-[52px] w-full items-center justify-between text-left rounded-lg border border-gray-300 bg-white px-4 py-2 text-sm text-gray-900 focus:outline-none focus:ring-0 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-600 dark:bg-neutral-800 dark:text-gray-100 [&>span]:line-clamp-1"
1056
1019
  ),
1057
1020
  children: [
1058
1021
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 min-w-0 flex items-center", children: renderTriggerContent() }),
@@ -3834,5 +3797,5 @@ exports.useColumnVisibility = useColumnVisibility;
3834
3797
  exports.useFormContext = useFormContext;
3835
3798
  exports.useFormFieldContext = useFormFieldContext;
3836
3799
  exports.useTableSelection = useTableSelection;
3837
- //# sourceMappingURL=chunk-HKUYZ5K6.js.map
3838
- //# sourceMappingURL=chunk-HKUYZ5K6.js.map
3800
+ //# sourceMappingURL=chunk-3WFNL5DH.js.map
3801
+ //# sourceMappingURL=chunk-3WFNL5DH.js.map