@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.
@@ -3040,32 +3040,18 @@ function DataTableEmptyView({
3040
3040
  }
3041
3041
 
3042
3042
  // src/data-table/filter-toggle.tsx
3043
- import { Icon as Icon5, Toggle } from "@upbound/monarch-core";
3043
+ import { Badge as Badge2, Button as Button5, Icon as Icon5 } from "@upbound/monarch-core";
3044
3044
  import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
3045
3045
  function FilterToggle({ pressed, onPressedChange, count }) {
3046
- return /* @__PURE__ */ jsxs6(
3047
- Toggle,
3048
- {
3049
- variant: "outline",
3050
- pressed,
3051
- onPressedChange,
3052
- "aria-label": "Toggle filters",
3053
- className: "shrink-0 gap-1.5",
3054
- children: [
3055
- /* @__PURE__ */ jsx7(Icon5, { name: "filter", "data-icon": "inline-start" }),
3056
- "Filter",
3057
- !!count && /* @__PURE__ */ jsxs6("span", { className: "tabular-nums", children: [
3058
- "(",
3059
- count,
3060
- ")"
3061
- ] })
3062
- ]
3063
- }
3064
- );
3046
+ return /* @__PURE__ */ jsxs6(Button5, { variant: "outline", onClick: () => onPressedChange(!pressed), className: "shrink-0", children: [
3047
+ /* @__PURE__ */ jsx7(Icon5, { name: "filter", "data-icon": "inline-start" }),
3048
+ pressed ? "Hide filters" : "Show filters",
3049
+ !!count && /* @__PURE__ */ jsx7(Badge2, { variant: "secondary", className: "tabular-nums", children: count })
3050
+ ] });
3065
3051
  }
3066
3052
 
3067
3053
  // src/data-table/pagination.tsx
3068
- import { Button as Button5 } from "@upbound/monarch-core";
3054
+ import { Button as Button6 } from "@upbound/monarch-core";
3069
3055
  import { Icon as Icon6 } from "@upbound/monarch-core";
3070
3056
  import { Label as Label2 } from "@upbound/monarch-core";
3071
3057
  import {
@@ -3146,7 +3132,7 @@ function DataTablePagination({
3146
3132
  ] }),
3147
3133
  pageCount > 1 && (resolved.arrows || resolved.numbers) && /* @__PURE__ */ jsx8(Pagination, { className: "mx-0 w-auto justify-end", children: /* @__PURE__ */ jsxs7(PaginationContent, { children: [
3148
3134
  resolved.arrows && /* @__PURE__ */ jsx8(PaginationItem, { children: /* @__PURE__ */ jsx8(
3149
- Button5,
3135
+ Button6,
3150
3136
  {
3151
3137
  variant: "outline",
3152
3138
  size: "icon",
@@ -3157,7 +3143,7 @@ function DataTablePagination({
3157
3143
  }
3158
3144
  ) }),
3159
3145
  resolved.arrows && /* @__PURE__ */ jsx8(PaginationItem, { children: /* @__PURE__ */ jsx8(
3160
- Button5,
3146
+ Button6,
3161
3147
  {
3162
3148
  variant: "outline",
3163
3149
  size: "icon",
@@ -3183,7 +3169,7 @@ function DataTablePagination({
3183
3169
  ) }, page)
3184
3170
  ),
3185
3171
  resolved.arrows && /* @__PURE__ */ jsx8(PaginationItem, { children: /* @__PURE__ */ jsx8(
3186
- Button5,
3172
+ Button6,
3187
3173
  {
3188
3174
  variant: "outline",
3189
3175
  size: "icon",
@@ -3194,7 +3180,7 @@ function DataTablePagination({
3194
3180
  }
3195
3181
  ) }),
3196
3182
  resolved.arrows && /* @__PURE__ */ jsx8(PaginationItem, { children: /* @__PURE__ */ jsx8(
3197
- Button5,
3183
+ Button6,
3198
3184
  {
3199
3185
  variant: "outline",
3200
3186
  size: "icon",
@@ -3744,8 +3730,8 @@ import * as React8 from "react";
3744
3730
  // src/filter-bar/filter-bar.tsx
3745
3731
  import * as React7 from "react";
3746
3732
  import { Icon as Icon8 } from "@upbound/monarch-core";
3747
- import { Badge as Badge2 } from "@upbound/monarch-core";
3748
- import { Button as Button6 } from "@upbound/monarch-core";
3733
+ import { Badge as Badge3 } from "@upbound/monarch-core";
3734
+ import { Button as Button7 } from "@upbound/monarch-core";
3749
3735
  import { ButtonGroup as ButtonGroup2, ButtonGroupText as ButtonGroupText2 } from "@upbound/monarch-core";
3750
3736
  import { Calendar as Calendar2 } from "@upbound/monarch-core";
3751
3737
  import {
@@ -3868,7 +3854,7 @@ function FilterBar(_a) {
3868
3854
  if (filter) handleAddFilter(filter.key);
3869
3855
  },
3870
3856
  children: [
3871
- /* @__PURE__ */ jsxs9(ComboboxTrigger2, { "aria-label": "Add filter", showIndicator: false, render: /* @__PURE__ */ jsx10(Button6, { variant: "outline" }), children: [
3857
+ /* @__PURE__ */ jsxs9(ComboboxTrigger2, { "aria-label": "Add filter", showIndicator: false, render: /* @__PURE__ */ jsx10(Button7, { variant: "outline" }), children: [
3872
3858
  /* @__PURE__ */ jsx10(Icon8, { name: "plus", "data-icon": "inline-start" }),
3873
3859
  "Add filter"
3874
3860
  ] }),
@@ -3965,7 +3951,7 @@ function FilterChip({ definition, value, autoOpen, container, onChangeValue, onR
3965
3951
  }
3966
3952
  }
3967
3953
  function FilterChipRemoveButton({ label, onRemove }) {
3968
- return /* @__PURE__ */ jsx10(Button6, { variant: "outline", size: "icon", "aria-label": `Remove ${label} filter`, onClick: onRemove, children: /* @__PURE__ */ jsx10(Icon8, { name: "xmark" }) });
3954
+ return /* @__PURE__ */ jsx10(Button7, { variant: "outline", size: "icon", "aria-label": `Remove ${label} filter`, onClick: onRemove, children: /* @__PURE__ */ jsx10(Icon8, { name: "xmark" }) });
3969
3955
  }
3970
3956
  function CheckboxFilterChip({
3971
3957
  definition,
@@ -3999,7 +3985,7 @@ function CheckboxFilterChip({
3999
3985
  /* @__PURE__ */ jsx10(
4000
3986
  ComboboxTrigger2,
4001
3987
  {
4002
- render: /* @__PURE__ */ jsx10(Button6, { variant: "outline", className: "gap-1 font-normal [&>svg:last-child]:size-(--icon-sm)" }),
3988
+ render: /* @__PURE__ */ jsx10(Button7, { variant: "outline", className: "gap-1 font-normal [&>svg:last-child]:size-(--icon-sm)" }),
4003
3989
  children: /* @__PURE__ */ jsx10("span", { className: values.length === 0 ? "text-muted-foreground" : "", children: displayLabel })
4004
3990
  }
4005
3991
  ),
@@ -4033,7 +4019,7 @@ function CheckboxFilterChip({
4033
4019
  ]
4034
4020
  }
4035
4021
  ) : /* @__PURE__ */ jsxs9(DropdownMenu4, { defaultOpen: autoOpen, children: [
4036
- /* @__PURE__ */ jsx10(DropdownMenuTrigger4, { asChild: true, children: /* @__PURE__ */ jsxs9(Button6, { variant: "outline", className: "gap-1 font-normal", children: [
4022
+ /* @__PURE__ */ jsx10(DropdownMenuTrigger4, { asChild: true, children: /* @__PURE__ */ jsxs9(Button7, { variant: "outline", className: "gap-1 font-normal", children: [
4037
4023
  /* @__PURE__ */ jsx10("span", { className: values.length === 0 ? "text-muted-foreground" : "", children: displayLabel }),
4038
4024
  /* @__PURE__ */ jsx10(Icon8, { name: "chevron-down", size: "sm", className: "text-muted-foreground" })
4039
4025
  ] }) }),
@@ -4084,7 +4070,7 @@ function RadioFilterChip({
4084
4070
  /* @__PURE__ */ jsx10(
4085
4071
  ComboboxTrigger2,
4086
4072
  {
4087
- render: /* @__PURE__ */ jsx10(Button6, { variant: "outline", className: "gap-1 font-normal [&>svg:last-child]:size-(--icon-sm)" }),
4073
+ render: /* @__PURE__ */ jsx10(Button7, { variant: "outline", className: "gap-1 font-normal [&>svg:last-child]:size-(--icon-sm)" }),
4088
4074
  children: /* @__PURE__ */ jsx10("span", { className: selectedValue ? "" : "text-muted-foreground", children: displayLabel })
4089
4075
  }
4090
4076
  ),
@@ -4111,7 +4097,7 @@ function RadioFilterChip({
4111
4097
  ]
4112
4098
  }
4113
4099
  ) : /* @__PURE__ */ jsxs9(DropdownMenu4, { defaultOpen: autoOpen, children: [
4114
- /* @__PURE__ */ jsx10(DropdownMenuTrigger4, { asChild: true, children: /* @__PURE__ */ jsxs9(Button6, { variant: "outline", className: "gap-1 font-normal", children: [
4100
+ /* @__PURE__ */ jsx10(DropdownMenuTrigger4, { asChild: true, children: /* @__PURE__ */ jsxs9(Button7, { variant: "outline", className: "gap-1 font-normal", children: [
4115
4101
  /* @__PURE__ */ jsx10("span", { className: selectedValue ? "" : "text-muted-foreground", children: displayLabel }),
4116
4102
  /* @__PURE__ */ jsx10(Icon8, { name: "chevron-down", size: "sm", className: "text-muted-foreground" })
4117
4103
  ] }) }),
@@ -4136,7 +4122,7 @@ function TextFilterChip({
4136
4122
  return /* @__PURE__ */ jsxs9(ButtonGroup2, { children: [
4137
4123
  /* @__PURE__ */ jsx10(ButtonGroupText2, { children: label }),
4138
4124
  /* @__PURE__ */ jsxs9(Popover2, { open, onOpenChange: setOpen, children: [
4139
- /* @__PURE__ */ jsx10(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx10(Button6, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx10("span", { className: text ? "" : "text-muted-foreground", children: text || "Any" }) }) }),
4125
+ /* @__PURE__ */ jsx10(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx10(Button7, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx10("span", { className: text ? "" : "text-muted-foreground", children: text || "Any" }) }) }),
4140
4126
  /* @__PURE__ */ jsx10(PopoverContent2, { align: "start", children: /* @__PURE__ */ jsx10(
4141
4127
  Input2,
4142
4128
  {
@@ -4179,9 +4165,9 @@ function MultiTextFilterChip({
4179
4165
  return /* @__PURE__ */ jsxs9(ButtonGroup2, { children: [
4180
4166
  /* @__PURE__ */ jsx10(ButtonGroupText2, { children: label }),
4181
4167
  /* @__PURE__ */ jsxs9(Popover2, { defaultOpen: autoOpen, children: [
4182
- /* @__PURE__ */ jsx10(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx10(Button6, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx10("span", { className: tokens.length === 0 ? "text-muted-foreground" : "", children: displayLabel }) }) }),
4168
+ /* @__PURE__ */ jsx10(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx10(Button7, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx10("span", { className: tokens.length === 0 ? "text-muted-foreground" : "", children: displayLabel }) }) }),
4183
4169
  /* @__PURE__ */ jsx10(PopoverContent2, { align: "start", children: /* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-2", children: [
4184
- tokens.length > 0 && /* @__PURE__ */ jsx10("div", { className: "flex flex-wrap gap-1", children: tokens.map((token) => /* @__PURE__ */ jsxs9(Badge2, { variant: "secondary", className: "gap-1", children: [
4170
+ tokens.length > 0 && /* @__PURE__ */ jsx10("div", { className: "flex flex-wrap gap-1", children: tokens.map((token) => /* @__PURE__ */ jsxs9(Badge3, { variant: "secondary", className: "gap-1", children: [
4185
4171
  token,
4186
4172
  /* @__PURE__ */ jsx10(
4187
4173
  "button",
@@ -4246,7 +4232,7 @@ function DateFilterChip({
4246
4232
  return /* @__PURE__ */ jsxs9(ButtonGroup2, { children: [
4247
4233
  /* @__PURE__ */ jsx10(ButtonGroupText2, { children: label }),
4248
4234
  /* @__PURE__ */ jsxs9(Popover2, { defaultOpen: autoOpen, children: [
4249
- /* @__PURE__ */ jsx10(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx10(Button6, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx10("span", { className: startDate ? "" : "text-muted-foreground", children: displayLabel }) }) }),
4235
+ /* @__PURE__ */ jsx10(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx10(Button7, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx10("span", { className: startDate ? "" : "text-muted-foreground", children: displayLabel }) }) }),
4250
4236
  /* @__PURE__ */ jsx10(PopoverContent2, { align: "start", className: "w-fit", children: /* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-2", children: [
4251
4237
  /* @__PURE__ */ jsx10(
4252
4238
  Calendar2,