@gntik-ai/blocks 0.12.0 → 0.13.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.
package/dist/index.js CHANGED
@@ -701,8 +701,9 @@ function TokenCostCard({ periods = tokenUsagePeriods, defaultPeriod, currency =
701
701
  }), /* @__PURE__ */ jsx(CardDescription, { children: description })] }), periods.length > 1 && /* @__PURE__ */ jsx(CardAction, { children: /* @__PURE__ */ jsx(ToggleGroup, {
702
702
  "aria-label": "Period",
703
703
  size: "sm",
704
+ disallowEmptySelection: true,
704
705
  value: [period.id],
705
- onValueChange: (v) => v[0] && setPeriodId(v[0]),
706
+ onValueChange: (v) => setPeriodId(v[0]),
706
707
  children: periods.map((p) => /* @__PURE__ */ jsx(Toggle, {
707
708
  value: p.id,
708
709
  children: p.label
@@ -1250,8 +1251,9 @@ function EvaluationScorecard({ metrics = evalMetrics, rows = evalRows, title = "
1250
1251
  })] }), /* @__PURE__ */ jsxs(ToggleGroup, {
1251
1252
  "aria-label": "Show datasets",
1252
1253
  size: "sm",
1254
+ disallowEmptySelection: true,
1253
1255
  value: [filter],
1254
- onValueChange: (v) => v[0] && setFilter(v[0]),
1256
+ onValueChange: (v) => setFilter(v[0]),
1255
1257
  children: [/* @__PURE__ */ jsxs(Toggle, {
1256
1258
  value: "all",
1257
1259
  children: ["All ", /* @__PURE__ */ jsx("span", {
@@ -5594,8 +5596,9 @@ function CodePanel({ files = codeFiles, problems: suppliedProblems = codeProblem
5594
5596
  }), /* @__PURE__ */ jsxs(ToggleGroup, {
5595
5597
  "aria-label": "Editor view",
5596
5598
  size: "sm",
5599
+ disallowEmptySelection: true,
5597
5600
  value: [effectiveView],
5598
- onValueChange: (v) => v[0] && setView(v[0]),
5601
+ onValueChange: (v) => setView(v[0]),
5599
5602
  className: "mb-2 self-start sm:self-auto",
5600
5603
  children: [/* @__PURE__ */ jsx(Toggle, {
5601
5604
  value: "code",
@@ -12509,10 +12512,10 @@ function PageToolbar({ search, defaultSearch = "", onSearchChange, searchLabel:
12509
12512
  }), /* @__PURE__ */ jsxs(ToolbarEnd, { children: [views && views.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ToggleGroup, {
12510
12513
  "aria-label": t("toolbar.view"),
12511
12514
  size: "sm",
12515
+ disallowEmptySelection: true,
12512
12516
  value: [currentView],
12513
12517
  onValueChange: (next) => {
12514
12518
  const picked = next[0];
12515
- if (!picked) return;
12516
12519
  setInnerView(picked);
12517
12520
  onViewChange?.(picked);
12518
12521
  },