@upbound/monarch-blocks 0.7.0 → 0.7.2

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
@@ -36,37 +36,7 @@ import * as React from "react";
36
36
  import { Icon } from "@upbound/monarch-core";
37
37
 
38
38
  // src/lib/utils.ts
39
- import { clsx } from "clsx";
40
- import { extendTailwindMerge } from "tailwind-merge";
41
- var twMerge = extendTailwindMerge({
42
- extend: {
43
- classGroups: {
44
- "font-size": [
45
- {
46
- text: [
47
- "display-hero",
48
- "display-kpi-sm",
49
- "display-kpi",
50
- "display-kpi-lg",
51
- "display-feature",
52
- "h1",
53
- "h2",
54
- "h3",
55
- "h4",
56
- "body-lg",
57
- "body",
58
- "body-sm",
59
- "caption",
60
- "eyebrow"
61
- ]
62
- }
63
- ]
64
- }
65
- }
66
- });
67
- function cn(...inputs) {
68
- return twMerge(clsx(inputs));
69
- }
39
+ import { cn } from "@upbound/monarch-core/utils";
70
40
  function sortBy(items, getKey) {
71
41
  return [...items].sort((a, b) => getKey(a).localeCompare(getKey(b)));
72
42
  }
@@ -1292,6 +1262,7 @@ function CelAddFilterButton({
1292
1262
  items: groups,
1293
1263
  itemToStringValue: (item) => item.title,
1294
1264
  itemToStringLabel: (item) => item.title,
1265
+ value: null,
1295
1266
  onValueChange: (column) => {
1296
1267
  if (column) onSelect(column.id);
1297
1268
  },
@@ -3239,10 +3210,9 @@ import { Icon as Icon4 } from "@upbound/monarch-core";
3239
3210
  // src/lib/data-table/utils.ts
3240
3211
  var TO_EACH_SIDE = 2;
3241
3212
  function normalizeColumnOrdering(columnOrdering, allColumnIds) {
3242
- const validIds = new Set(allColumnIds);
3243
3213
  const seenIds = /* @__PURE__ */ new Set();
3244
3214
  const trackedColumnIds = columnOrdering.filter((columnId) => {
3245
- if (!validIds.has(columnId) || seenIds.has(columnId)) return false;
3215
+ if (seenIds.has(columnId)) return false;
3246
3216
  seenIds.add(columnId);
3247
3217
  return true;
3248
3218
  });
@@ -5159,6 +5129,7 @@ function FilterBar(_a) {
5159
5129
  items: availableFilters,
5160
5130
  itemToStringValue: (item) => item.label,
5161
5131
  itemToStringLabel: (item) => item.label,
5132
+ value: null,
5162
5133
  onValueChange: (filter) => {
5163
5134
  if (filter) handleAddFilter(filter.key);
5164
5135
  },
@@ -5741,6 +5712,7 @@ function SectionHeaderTabs(_a) {
5741
5712
  // src/data-table/data-table.tsx
5742
5713
  import { Fragment as Fragment9, jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
5743
5714
  var DEFAULT_PAGE_SIZE = 20;
5715
+ var STICKY_HEADER_MAX_HEIGHT_CLASS = "max-h-[calc(100svh-250px)]";
5744
5716
  function DataTable({
5745
5717
  id,
5746
5718
  config,
@@ -6078,9 +6050,10 @@ function DataTable({
6078
6050
  "div",
6079
6051
  {
6080
6052
  ref: tableBodyScrollRef,
6053
+ "data-testid": "table-scroll-container",
6081
6054
  className: cn(
6082
6055
  "min-h-0 flex-1 overflow-auto rounded-lg border **:data-[slot=table-container]:overflow-visible",
6083
- !!stickyHeader && "max-h-[calc(100svh-250px)]"
6056
+ !!stickyHeader && !fitContent && STICKY_HEADER_MAX_HEIGHT_CLASS
6084
6057
  ),
6085
6058
  children: /* @__PURE__ */ jsxs13(
6086
6059
  DataTableRoot,