@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.
@@ -856,8 +856,7 @@ var SelectBar = React11.forwardRef(({
856
856
  placeholder = "Select\u2026",
857
857
  label,
858
858
  disabled = false,
859
- className,
860
- maxVisibleChips = 2
859
+ className
861
860
  }, ref) => {
862
861
  const [open, setOpen] = React11.useState(false);
863
862
  const [search, setSearch] = React11.useState("");
@@ -948,11 +947,6 @@ var SelectBar = React11.forwardRef(({
948
947
  setOpen(false);
949
948
  }
950
949
  };
951
- const handleChipRemove = (e, chipValue) => {
952
- e.stopPropagation();
953
- const next = committedMulti.filter((v) => v !== chipValue);
954
- commitMulti(next);
955
- };
956
950
  const canApply = (() => {
957
951
  if (!manualApply) return false;
958
952
  if (multiple) {
@@ -974,35 +968,7 @@ var SelectBar = React11.forwardRef(({
974
968
  if (committedMulti.length === 0) {
975
969
  return /* @__PURE__ */ jsx("span", { className: "text-gray-400 dark:text-gray-500 truncate", children: placeholder });
976
970
  }
977
- const visible = committedMulti.slice(0, maxVisibleChips);
978
- const overflow = committedMulti.length - maxVisibleChips;
979
- return /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 min-w-0 flex-wrap", children: [
980
- visible.map((v) => /* @__PURE__ */ jsxs(
981
- "span",
982
- {
983
- 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]",
984
- children: [
985
- /* @__PURE__ */ jsx("span", { className: "truncate", children: labelFor(v) }),
986
- /* @__PURE__ */ jsx(
987
- "button",
988
- {
989
- type: "button",
990
- className: "shrink-0 hover:text-blue-900 dark:hover:text-blue-200",
991
- onClick: (e) => handleChipRemove(e, v),
992
- "aria-label": `Remove ${labelFor(v)}`,
993
- children: /* @__PURE__ */ jsx(X, { className: "h-3 w-3" })
994
- }
995
- )
996
- ]
997
- },
998
- v
999
- )),
1000
- overflow > 0 && /* @__PURE__ */ 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: [
1001
- "+",
1002
- overflow,
1003
- " more"
1004
- ] })
1005
- ] });
971
+ return /* @__PURE__ */ jsx("span", { className: "truncate text-gray-900 dark:text-gray-100", children: committedMulti.length === options.length ? "All selected" : `${committedMulti.length} selected` });
1006
972
  }
1007
973
  if (committedSingle !== void 0) {
1008
974
  return /* @__PURE__ */ jsx("span", { className: "truncate text-gray-900 dark:text-gray-100", children: labelFor(committedSingle) });
@@ -1019,7 +985,7 @@ var SelectBar = React11.forwardRef(({
1019
985
  type: "button",
1020
986
  disabled,
1021
987
  className: cn(
1022
- "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",
988
+ "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",
1023
989
  "hover:bg-gray-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",
1024
990
  "dark:border-neutral-600 dark:bg-neutral-800 dark:hover:bg-neutral-700",
1025
991
  "disabled:pointer-events-none disabled:opacity-50"
@@ -3699,5 +3665,5 @@ function PeriodComparisonSelector({
3699
3665
  }
3700
3666
 
3701
3667
  export { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColumnSelection, DEFAULT_COMPARISON_PERIODS, DEFAULT_PRESETS, DEFAULT_TIME_RANGE, DateRangePicker, DateRangePickerMobile, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormLabel, FormMessage, MobileDataCard, PeriodComparisonSelector, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, SegmentedControl, Select, SelectBar, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Skeleton, SkeletonAvatar, SkeletonBadge, SkeletonButton, SkeletonCard, SkeletonIcon, SkeletonInput, SkeletonSubtitle, SkeletonTableRow, SkeletonTableRows, SkeletonText, SkeletonTitle, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableRowCheckbox, TableSelectAll, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, buttonVariants, segmentedControlItemVariants, segmentedControlVariants, separatorVariants, switchLabelVariants, switchThumbVariants, switchTrackVariants, toggleGroupVariants, toggleItemVariants, useColumnVisibility, useFormContext, useFormFieldContext, useTableSelection };
3702
- //# sourceMappingURL=chunk-3CXBEGTO.mjs.map
3703
- //# sourceMappingURL=chunk-3CXBEGTO.mjs.map
3668
+ //# sourceMappingURL=chunk-NNP7MDQI.mjs.map
3669
+ //# sourceMappingURL=chunk-NNP7MDQI.mjs.map