@upbound/monarch-blocks 0.11.0 → 0.11.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/index.js CHANGED
@@ -4507,32 +4507,18 @@ function DataTableEmptyView({
4507
4507
  }
4508
4508
 
4509
4509
  // src/data-table/filter-toggle.tsx
4510
- import { Icon as Icon7, Toggle } from "@upbound/monarch-core";
4510
+ import { Badge as Badge3, Button as Button6, Icon as Icon7 } from "@upbound/monarch-core";
4511
4511
  import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
4512
4512
  function FilterToggle({ pressed, onPressedChange, count }) {
4513
- return /* @__PURE__ */ jsxs9(
4514
- Toggle,
4515
- {
4516
- variant: "outline",
4517
- pressed,
4518
- onPressedChange,
4519
- "aria-label": "Toggle filters",
4520
- className: "shrink-0 gap-1.5",
4521
- children: [
4522
- /* @__PURE__ */ jsx11(Icon7, { name: "filter", "data-icon": "inline-start" }),
4523
- "Filter",
4524
- !!count && /* @__PURE__ */ jsxs9("span", { className: "tabular-nums", children: [
4525
- "(",
4526
- count,
4527
- ")"
4528
- ] })
4529
- ]
4530
- }
4531
- );
4513
+ return /* @__PURE__ */ jsxs9(Button6, { variant: "outline", onClick: () => onPressedChange(!pressed), className: "shrink-0", children: [
4514
+ /* @__PURE__ */ jsx11(Icon7, { name: "filter", "data-icon": "inline-start" }),
4515
+ pressed ? "Hide filters" : "Show filters",
4516
+ !!count && /* @__PURE__ */ jsx11(Badge3, { variant: "secondary", className: "tabular-nums", children: count })
4517
+ ] });
4532
4518
  }
4533
4519
 
4534
4520
  // src/data-table/pagination.tsx
4535
- import { Button as Button6 } from "@upbound/monarch-core";
4521
+ import { Button as Button7 } from "@upbound/monarch-core";
4536
4522
  import { Icon as Icon8 } from "@upbound/monarch-core";
4537
4523
  import { Label as Label2 } from "@upbound/monarch-core";
4538
4524
  import {
@@ -4613,7 +4599,7 @@ function DataTablePagination({
4613
4599
  ] }),
4614
4600
  pageCount > 1 && (resolved.arrows || resolved.numbers) && /* @__PURE__ */ jsx12(Pagination, { className: "mx-0 w-auto justify-end", children: /* @__PURE__ */ jsxs10(PaginationContent, { children: [
4615
4601
  resolved.arrows && /* @__PURE__ */ jsx12(PaginationItem, { children: /* @__PURE__ */ jsx12(
4616
- Button6,
4602
+ Button7,
4617
4603
  {
4618
4604
  variant: "outline",
4619
4605
  size: "icon",
@@ -4624,7 +4610,7 @@ function DataTablePagination({
4624
4610
  }
4625
4611
  ) }),
4626
4612
  resolved.arrows && /* @__PURE__ */ jsx12(PaginationItem, { children: /* @__PURE__ */ jsx12(
4627
- Button6,
4613
+ Button7,
4628
4614
  {
4629
4615
  variant: "outline",
4630
4616
  size: "icon",
@@ -4650,7 +4636,7 @@ function DataTablePagination({
4650
4636
  ) }, page)
4651
4637
  ),
4652
4638
  resolved.arrows && /* @__PURE__ */ jsx12(PaginationItem, { children: /* @__PURE__ */ jsx12(
4653
- Button6,
4639
+ Button7,
4654
4640
  {
4655
4641
  variant: "outline",
4656
4642
  size: "icon",
@@ -4661,7 +4647,7 @@ function DataTablePagination({
4661
4647
  }
4662
4648
  ) }),
4663
4649
  resolved.arrows && /* @__PURE__ */ jsx12(PaginationItem, { children: /* @__PURE__ */ jsx12(
4664
- Button6,
4650
+ Button7,
4665
4651
  {
4666
4652
  variant: "outline",
4667
4653
  size: "icon",
@@ -5211,8 +5197,8 @@ import * as React10 from "react";
5211
5197
  // src/filter-bar/filter-bar.tsx
5212
5198
  import * as React9 from "react";
5213
5199
  import { Icon as Icon10 } from "@upbound/monarch-core";
5214
- import { Badge as Badge3 } from "@upbound/monarch-core";
5215
- import { Button as Button7 } from "@upbound/monarch-core";
5200
+ import { Badge as Badge4 } from "@upbound/monarch-core";
5201
+ import { Button as Button8 } from "@upbound/monarch-core";
5216
5202
  import { ButtonGroup as ButtonGroup2, ButtonGroupText as ButtonGroupText2 } from "@upbound/monarch-core";
5217
5203
  import { Calendar as Calendar2 } from "@upbound/monarch-core";
5218
5204
  import {
@@ -5335,7 +5321,7 @@ function FilterBar(_a) {
5335
5321
  if (filter) handleAddFilter(filter.key);
5336
5322
  },
5337
5323
  children: [
5338
- /* @__PURE__ */ jsxs12(ComboboxTrigger2, { "aria-label": "Add filter", showIndicator: false, render: /* @__PURE__ */ jsx14(Button7, { variant: "outline" }), children: [
5324
+ /* @__PURE__ */ jsxs12(ComboboxTrigger2, { "aria-label": "Add filter", showIndicator: false, render: /* @__PURE__ */ jsx14(Button8, { variant: "outline" }), children: [
5339
5325
  /* @__PURE__ */ jsx14(Icon10, { name: "plus", "data-icon": "inline-start" }),
5340
5326
  "Add filter"
5341
5327
  ] }),
@@ -5432,7 +5418,7 @@ function FilterChip({ definition, value, autoOpen, container, onChangeValue, onR
5432
5418
  }
5433
5419
  }
5434
5420
  function FilterChipRemoveButton({ label, onRemove }) {
5435
- return /* @__PURE__ */ jsx14(Button7, { variant: "outline", size: "icon", "aria-label": `Remove ${label} filter`, onClick: onRemove, children: /* @__PURE__ */ jsx14(Icon10, { name: "xmark" }) });
5421
+ return /* @__PURE__ */ jsx14(Button8, { variant: "outline", size: "icon", "aria-label": `Remove ${label} filter`, onClick: onRemove, children: /* @__PURE__ */ jsx14(Icon10, { name: "xmark" }) });
5436
5422
  }
5437
5423
  function CheckboxFilterChip({
5438
5424
  definition,
@@ -5466,7 +5452,7 @@ function CheckboxFilterChip({
5466
5452
  /* @__PURE__ */ jsx14(
5467
5453
  ComboboxTrigger2,
5468
5454
  {
5469
- render: /* @__PURE__ */ jsx14(Button7, { variant: "outline", className: "gap-1 font-normal [&>svg:last-child]:size-(--icon-sm)" }),
5455
+ render: /* @__PURE__ */ jsx14(Button8, { variant: "outline", className: "gap-1 font-normal [&>svg:last-child]:size-(--icon-sm)" }),
5470
5456
  children: /* @__PURE__ */ jsx14("span", { className: values.length === 0 ? "text-muted-foreground" : "", children: displayLabel })
5471
5457
  }
5472
5458
  ),
@@ -5500,7 +5486,7 @@ function CheckboxFilterChip({
5500
5486
  ]
5501
5487
  }
5502
5488
  ) : /* @__PURE__ */ jsxs12(DropdownMenu5, { defaultOpen: autoOpen, children: [
5503
- /* @__PURE__ */ jsx14(DropdownMenuTrigger5, { asChild: true, children: /* @__PURE__ */ jsxs12(Button7, { variant: "outline", className: "gap-1 font-normal", children: [
5489
+ /* @__PURE__ */ jsx14(DropdownMenuTrigger5, { asChild: true, children: /* @__PURE__ */ jsxs12(Button8, { variant: "outline", className: "gap-1 font-normal", children: [
5504
5490
  /* @__PURE__ */ jsx14("span", { className: values.length === 0 ? "text-muted-foreground" : "", children: displayLabel }),
5505
5491
  /* @__PURE__ */ jsx14(Icon10, { name: "chevron-down", size: "sm", className: "text-muted-foreground" })
5506
5492
  ] }) }),
@@ -5551,7 +5537,7 @@ function RadioFilterChip({
5551
5537
  /* @__PURE__ */ jsx14(
5552
5538
  ComboboxTrigger2,
5553
5539
  {
5554
- render: /* @__PURE__ */ jsx14(Button7, { variant: "outline", className: "gap-1 font-normal [&>svg:last-child]:size-(--icon-sm)" }),
5540
+ render: /* @__PURE__ */ jsx14(Button8, { variant: "outline", className: "gap-1 font-normal [&>svg:last-child]:size-(--icon-sm)" }),
5555
5541
  children: /* @__PURE__ */ jsx14("span", { className: selectedValue ? "" : "text-muted-foreground", children: displayLabel })
5556
5542
  }
5557
5543
  ),
@@ -5578,7 +5564,7 @@ function RadioFilterChip({
5578
5564
  ]
5579
5565
  }
5580
5566
  ) : /* @__PURE__ */ jsxs12(DropdownMenu5, { defaultOpen: autoOpen, children: [
5581
- /* @__PURE__ */ jsx14(DropdownMenuTrigger5, { asChild: true, children: /* @__PURE__ */ jsxs12(Button7, { variant: "outline", className: "gap-1 font-normal", children: [
5567
+ /* @__PURE__ */ jsx14(DropdownMenuTrigger5, { asChild: true, children: /* @__PURE__ */ jsxs12(Button8, { variant: "outline", className: "gap-1 font-normal", children: [
5582
5568
  /* @__PURE__ */ jsx14("span", { className: selectedValue ? "" : "text-muted-foreground", children: displayLabel }),
5583
5569
  /* @__PURE__ */ jsx14(Icon10, { name: "chevron-down", size: "sm", className: "text-muted-foreground" })
5584
5570
  ] }) }),
@@ -5603,7 +5589,7 @@ function TextFilterChip({
5603
5589
  return /* @__PURE__ */ jsxs12(ButtonGroup2, { children: [
5604
5590
  /* @__PURE__ */ jsx14(ButtonGroupText2, { children: label }),
5605
5591
  /* @__PURE__ */ jsxs12(Popover2, { open, onOpenChange: setOpen, children: [
5606
- /* @__PURE__ */ jsx14(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx14(Button7, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx14("span", { className: text ? "" : "text-muted-foreground", children: text || "Any" }) }) }),
5592
+ /* @__PURE__ */ jsx14(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx14(Button8, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx14("span", { className: text ? "" : "text-muted-foreground", children: text || "Any" }) }) }),
5607
5593
  /* @__PURE__ */ jsx14(PopoverContent2, { align: "start", children: /* @__PURE__ */ jsx14(
5608
5594
  Input2,
5609
5595
  {
@@ -5646,9 +5632,9 @@ function MultiTextFilterChip({
5646
5632
  return /* @__PURE__ */ jsxs12(ButtonGroup2, { children: [
5647
5633
  /* @__PURE__ */ jsx14(ButtonGroupText2, { children: label }),
5648
5634
  /* @__PURE__ */ jsxs12(Popover2, { defaultOpen: autoOpen, children: [
5649
- /* @__PURE__ */ jsx14(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx14(Button7, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx14("span", { className: tokens.length === 0 ? "text-muted-foreground" : "", children: displayLabel }) }) }),
5635
+ /* @__PURE__ */ jsx14(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx14(Button8, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx14("span", { className: tokens.length === 0 ? "text-muted-foreground" : "", children: displayLabel }) }) }),
5650
5636
  /* @__PURE__ */ jsx14(PopoverContent2, { align: "start", children: /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-2", children: [
5651
- tokens.length > 0 && /* @__PURE__ */ jsx14("div", { className: "flex flex-wrap gap-1", children: tokens.map((token) => /* @__PURE__ */ jsxs12(Badge3, { variant: "secondary", className: "gap-1", children: [
5637
+ tokens.length > 0 && /* @__PURE__ */ jsx14("div", { className: "flex flex-wrap gap-1", children: tokens.map((token) => /* @__PURE__ */ jsxs12(Badge4, { variant: "secondary", className: "gap-1", children: [
5652
5638
  token,
5653
5639
  /* @__PURE__ */ jsx14(
5654
5640
  "button",
@@ -5713,7 +5699,7 @@ function DateFilterChip({
5713
5699
  return /* @__PURE__ */ jsxs12(ButtonGroup2, { children: [
5714
5700
  /* @__PURE__ */ jsx14(ButtonGroupText2, { children: label }),
5715
5701
  /* @__PURE__ */ jsxs12(Popover2, { defaultOpen: autoOpen, children: [
5716
- /* @__PURE__ */ jsx14(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx14(Button7, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx14("span", { className: startDate ? "" : "text-muted-foreground", children: displayLabel }) }) }),
5702
+ /* @__PURE__ */ jsx14(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx14(Button8, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx14("span", { className: startDate ? "" : "text-muted-foreground", children: displayLabel }) }) }),
5717
5703
  /* @__PURE__ */ jsx14(PopoverContent2, { align: "start", className: "w-fit", children: /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-2", children: [
5718
5704
  /* @__PURE__ */ jsx14(
5719
5705
  Calendar2,
@@ -6346,7 +6332,7 @@ function DataTable({
6346
6332
 
6347
6333
  // src/floating-widget.tsx
6348
6334
  import * as React12 from "react";
6349
- import { Button as Button8 } from "@upbound/monarch-core";
6335
+ import { Button as Button9 } from "@upbound/monarch-core";
6350
6336
  import { DropdownMenu as DropdownMenu6, DropdownMenuContent as DropdownMenuContent6, DropdownMenuTrigger as DropdownMenuTrigger6 } from "@upbound/monarch-core";
6351
6337
  import { Icon as Icon12 } from "@upbound/monarch-core";
6352
6338
  import { Kbd as Kbd2 } from "@upbound/monarch-core";
@@ -6484,14 +6470,14 @@ function FloatingWidget({ title = "Ask AI", subtitle, menuItems, children, class
6484
6470
  ] }),
6485
6471
  menuItems && !isCollapsed && /* @__PURE__ */ jsxs14(Tooltip7, { children: [
6486
6472
  /* @__PURE__ */ jsxs14(DropdownMenu6, { children: [
6487
- /* @__PURE__ */ jsx18(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx18(DropdownMenuTrigger6, { asChild: true, children: /* @__PURE__ */ jsx18(Button8, { variant: "ghost", size: "icon-sm", "aria-label": "More options", children: /* @__PURE__ */ jsx18(Icon12, { name: "ellipsis-vertical" }) }) }) }),
6473
+ /* @__PURE__ */ jsx18(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx18(DropdownMenuTrigger6, { asChild: true, children: /* @__PURE__ */ jsx18(Button9, { variant: "ghost", size: "icon-sm", "aria-label": "More options", children: /* @__PURE__ */ jsx18(Icon12, { name: "ellipsis-vertical" }) }) }) }),
6488
6474
  /* @__PURE__ */ jsx18(DropdownMenuContent6, { align: "end", children: menuItems })
6489
6475
  ] }),
6490
6476
  /* @__PURE__ */ jsx18(TooltipContent6, { children: "More options" })
6491
6477
  ] }),
6492
6478
  !isCollapsed && /* @__PURE__ */ jsxs14(Tooltip7, { children: [
6493
6479
  /* @__PURE__ */ jsx18(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx18(
6494
- Button8,
6480
+ Button9,
6495
6481
  {
6496
6482
  variant: "ghost",
6497
6483
  size: "icon-sm",
@@ -6503,11 +6489,11 @@ function FloatingWidget({ title = "Ask AI", subtitle, menuItems, children, class
6503
6489
  /* @__PURE__ */ jsx18(TooltipContent6, { children: isExpanded ? "Shrink widget" : "Expand widget" })
6504
6490
  ] }),
6505
6491
  /* @__PURE__ */ jsxs14(Tooltip7, { children: [
6506
- /* @__PURE__ */ jsx18(TooltipTrigger6, { asChild: true, children: isCollapsed ? /* @__PURE__ */ jsx18(Button8, { variant: "ghost", size: "icon-sm", onClick: restore, "aria-label": "Restore widget", children: /* @__PURE__ */ jsx18(Icon12, { name: "window-maximize" }) }) : /* @__PURE__ */ jsx18(Button8, { variant: "ghost", size: "icon-sm", onClick: collapse, "aria-label": "Minimize widget", children: /* @__PURE__ */ jsx18(Icon12, { name: "minus" }) }) }),
6492
+ /* @__PURE__ */ jsx18(TooltipTrigger6, { asChild: true, children: isCollapsed ? /* @__PURE__ */ jsx18(Button9, { variant: "ghost", size: "icon-sm", onClick: restore, "aria-label": "Restore widget", children: /* @__PURE__ */ jsx18(Icon12, { name: "window-maximize" }) }) : /* @__PURE__ */ jsx18(Button9, { variant: "ghost", size: "icon-sm", onClick: collapse, "aria-label": "Minimize widget", children: /* @__PURE__ */ jsx18(Icon12, { name: "minus" }) }) }),
6507
6493
  /* @__PURE__ */ jsx18(TooltipContent6, { children: isCollapsed ? "Restore widget" : "Minimize widget" })
6508
6494
  ] }),
6509
6495
  /* @__PURE__ */ jsxs14(Tooltip7, { children: [
6510
- /* @__PURE__ */ jsx18(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx18(Button8, { variant: "ghost", size: "icon-sm", onClick: close, "aria-label": "Close widget", children: /* @__PURE__ */ jsx18(Icon12, { name: "xmark" }) }) }),
6496
+ /* @__PURE__ */ jsx18(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx18(Button9, { variant: "ghost", size: "icon-sm", onClick: close, "aria-label": "Close widget", children: /* @__PURE__ */ jsx18(Icon12, { name: "xmark" }) }) }),
6511
6497
  /* @__PURE__ */ jsxs14(TooltipContent6, { children: [
6512
6498
  "Close widget",
6513
6499
  /* @__PURE__ */ jsx18(Kbd2, { children: "Esc" })
@@ -6540,7 +6526,7 @@ import { useCallback as useCallback10, useState as useState12 } from "react";
6540
6526
  // src/graph/graph-node.tsx
6541
6527
  import * as React13 from "react";
6542
6528
  import { getIncomers, getOutgoers, Handle, Position as Position2 } from "reactflow";
6543
- import { Badge as Badge4, Card as Card2, Icon as Icon13, Spinner, Tooltip as Tooltip8, TooltipContent as TooltipContent7, TooltipTrigger as TooltipTrigger7 } from "@upbound/monarch-core";
6529
+ import { Badge as Badge5, Card as Card2, Icon as Icon13, Spinner, Tooltip as Tooltip8, TooltipContent as TooltipContent7, TooltipTrigger as TooltipTrigger7 } from "@upbound/monarch-core";
6544
6530
 
6545
6531
  // src/graph/consts.ts
6546
6532
  var GRAPH_NODE_WIDTH = 260;
@@ -6675,7 +6661,7 @@ function GraphNode(_a) {
6675
6661
  var _d = _c, { tooltipContent, variant } = _d, badge = __objRest(_d, ["tooltipContent", "variant"]);
6676
6662
  return /* @__PURE__ */ jsxs16(Tooltip8, { children: [
6677
6663
  /* @__PURE__ */ jsx20(TooltipTrigger7, { children: /* @__PURE__ */ jsx20(
6678
- Badge4,
6664
+ Badge5,
6679
6665
  __spreadProps(__spreadValues({
6680
6666
  variant
6681
6667
  }, badge), {
@@ -6709,7 +6695,7 @@ function GraphNode(_a) {
6709
6695
  /* @__PURE__ */ jsx20("div", { className: "flex gap-1.5 overflow-hidden overflow-x-auto", children: defaultBadges.map((_e, index) => {
6710
6696
  var _f = _e, { tooltipContent, variant } = _f, badge = __objRest(_f, ["tooltipContent", "variant"]);
6711
6697
  return /* @__PURE__ */ jsxs16(Tooltip8, { children: [
6712
- /* @__PURE__ */ jsx20(TooltipTrigger7, { children: /* @__PURE__ */ jsx20(Badge4, __spreadProps(__spreadValues({ variant }, badge), { className: "cursor-default! py-px! whitespace-nowrap", children: badge.children })) }),
6698
+ /* @__PURE__ */ jsx20(TooltipTrigger7, { children: /* @__PURE__ */ jsx20(Badge5, __spreadProps(__spreadValues({ variant }, badge), { className: "cursor-default! py-px! whitespace-nowrap", children: badge.children })) }),
6713
6699
  tooltipContent && /* @__PURE__ */ jsx20(TooltipContent7, { children: tooltipContent })
6714
6700
  ] }, index);
6715
6701
  }) }),