@upbound/monarch-blocks 0.7.0 → 0.7.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
@@ -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
  }
@@ -3239,10 +3209,9 @@ import { Icon as Icon4 } from "@upbound/monarch-core";
3239
3209
  // src/lib/data-table/utils.ts
3240
3210
  var TO_EACH_SIDE = 2;
3241
3211
  function normalizeColumnOrdering(columnOrdering, allColumnIds) {
3242
- const validIds = new Set(allColumnIds);
3243
3212
  const seenIds = /* @__PURE__ */ new Set();
3244
3213
  const trackedColumnIds = columnOrdering.filter((columnId) => {
3245
- if (!validIds.has(columnId) || seenIds.has(columnId)) return false;
3214
+ if (seenIds.has(columnId)) return false;
3246
3215
  seenIds.add(columnId);
3247
3216
  return true;
3248
3217
  });
@@ -5741,6 +5710,7 @@ function SectionHeaderTabs(_a) {
5741
5710
  // src/data-table/data-table.tsx
5742
5711
  import { Fragment as Fragment9, jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
5743
5712
  var DEFAULT_PAGE_SIZE = 20;
5713
+ var STICKY_HEADER_MAX_HEIGHT_CLASS = "max-h-[calc(100svh-250px)]";
5744
5714
  function DataTable({
5745
5715
  id,
5746
5716
  config,
@@ -6078,9 +6048,10 @@ function DataTable({
6078
6048
  "div",
6079
6049
  {
6080
6050
  ref: tableBodyScrollRef,
6051
+ "data-testid": "table-scroll-container",
6081
6052
  className: cn(
6082
6053
  "min-h-0 flex-1 overflow-auto rounded-lg border **:data-[slot=table-container]:overflow-visible",
6083
- !!stickyHeader && "max-h-[calc(100svh-250px)]"
6054
+ !!stickyHeader && !fitContent && STICKY_HEADER_MAX_HEIGHT_CLASS
6084
6055
  ),
6085
6056
  children: /* @__PURE__ */ jsxs13(
6086
6057
  DataTableRoot,