@pos-360/horizon 0.31.5 → 0.32.0

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.
@@ -1047,11 +1047,18 @@ var SelectBar = React11__namespace.forwardRef(({
1047
1047
  if (multiple) {
1048
1048
  const checked = activeMulti.includes(option.value);
1049
1049
  return /* @__PURE__ */ jsxRuntime.jsxs(
1050
- "button",
1050
+ "div",
1051
1051
  {
1052
- type: "button",
1053
- disabled: option.disabled,
1054
- onClick: () => handleMultiToggle(option.value),
1052
+ role: "option",
1053
+ "aria-selected": checked,
1054
+ onClick: () => !option.disabled && handleMultiToggle(option.value),
1055
+ onKeyDown: (e) => {
1056
+ if (e.key === "Enter" || e.key === " ") {
1057
+ e.preventDefault();
1058
+ if (!option.disabled) handleMultiToggle(option.value);
1059
+ }
1060
+ },
1061
+ tabIndex: option.disabled ? -1 : 0,
1055
1062
  className: chunkD2BLWOWK_js.cn(
1056
1063
  "relative flex w-full cursor-default select-none items-center gap-2 rounded-hz-md py-1.5 px-2 text-sm outline-none transition-colors",
1057
1064
  "hover:bg-black/5 dark:hover:bg-white/10",
@@ -1059,23 +1066,16 @@ var SelectBar = React11__namespace.forwardRef(({
1059
1066
  ),
1060
1067
  children: [
1061
1068
  /* @__PURE__ */ jsxRuntime.jsx(
1062
- CheckboxPrimitive__namespace.Root,
1069
+ "div",
1063
1070
  {
1064
- checked,
1065
- tabIndex: -1,
1066
1071
  className: chunkD2BLWOWK_js.cn(
1067
- "peer h-4 w-4 shrink-0 rounded-hz-sm border border-gray-300 bg-transparent shadow focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=checked]:border-blue-600 data-[state=checked]:text-white dark:border-neutral-600 dark:data-[state=checked]:bg-blue-600"
1072
+ "h-4 w-4 shrink-0 rounded-sm border shadow flex items-center justify-center",
1073
+ checked ? "bg-blue-600 border-blue-600 text-white dark:bg-blue-600" : "border-gray-300 bg-transparent dark:border-neutral-600"
1068
1074
  ),
1069
- style: { pointerEvents: "none" },
1070
- children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator, { className: "flex items-center justify-center text-current", children: /* @__PURE__ */ jsxRuntime.jsx(
1071
- lucideReact.Check,
1072
- {
1073
- className: "h-3.5 w-3.5",
1074
- strokeWidth: 3
1075
- }
1076
- ) })
1075
+ children: checked && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3.5 w-3.5", strokeWidth: 3 })
1077
1076
  }
1078
1077
  ),
1078
+ option.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: option.icon }),
1079
1079
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: option.label })
1080
1080
  ]
1081
1081
  },
@@ -1090,13 +1090,17 @@ var SelectBar = React11__namespace.forwardRef(({
1090
1090
  disabled: option.disabled,
1091
1091
  onClick: () => handleSingleSelect(option.value),
1092
1092
  className: chunkD2BLWOWK_js.cn(
1093
- "relative flex w-full cursor-default select-none items-center rounded-hz-md py-1.5 pl-2 pr-8 text-sm outline-none transition-colors",
1093
+ "relative flex w-full cursor-default select-none items-center gap-2 rounded-hz-md py-1.5 px-2 text-sm outline-none transition-colors",
1094
1094
  "hover:bg-black/5 dark:hover:bg-white/10",
1095
1095
  option.disabled && "pointer-events-none opacity-50"
1096
1096
  ),
1097
1097
  children: [
1098
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: option.label }),
1099
- selected && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) })
1098
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkD2BLWOWK_js.cn(
1099
+ "h-4 w-4 shrink-0 flex items-center justify-center",
1100
+ selected ? "text-blue-600 dark:text-blue-400" : "text-transparent"
1101
+ ), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }),
1102
+ option.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: option.icon }),
1103
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: option.label })
1100
1104
  ]
1101
1105
  },
1102
1106
  option.value
@@ -3797,5 +3801,5 @@ exports.useColumnVisibility = useColumnVisibility;
3797
3801
  exports.useFormContext = useFormContext;
3798
3802
  exports.useFormFieldContext = useFormFieldContext;
3799
3803
  exports.useTableSelection = useTableSelection;
3800
- //# sourceMappingURL=chunk-R3JWUPJG.js.map
3801
- //# sourceMappingURL=chunk-R3JWUPJG.js.map
3804
+ //# sourceMappingURL=chunk-B5WFOKDT.js.map
3805
+ //# sourceMappingURL=chunk-B5WFOKDT.js.map