@lateralus-ai/shipping-ui 2.0.0-dev.11 → 2.0.0-dev.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lateralus-ai/shipping-ui",
3
- "version": "2.0.0-dev.11",
3
+ "version": "2.0.0-dev.12",
4
4
  "description": "Shared UI theme and components for Lateralus shipping applications",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.esm.js",
@@ -107,8 +107,8 @@ export const TabsTrigger = forwardRef<
107
107
  type === "pills" &&
108
108
  appearance === "solid" && [
109
109
  "min-h-9 rounded-full px-3 py-1 text-caption-2-em",
110
- "bg-transparent text-display-on-light-primary",
111
- "hover:bg-grey-900/[0.04]",
110
+ "bg-transparent text-display-on-light-tertiary",
111
+ "hover:bg-grey-900/[0.04] hover:text-display-on-light-primary",
112
112
  "data-[state=active]:bg-blue-600 data-[state=active]:text-white",
113
113
  "data-[state=active]:hover:bg-blue-600",
114
114
  ],
package/src/utils/cn.ts CHANGED
@@ -1,6 +1,33 @@
1
- import { twMerge } from "tailwind-merge";
1
+ import { extendTailwindMerge } from "tailwind-merge";
2
2
  import { type ClassValue, clsx } from "clsx";
3
3
 
4
+ /**
5
+ * Custom fontSize keys from tailwind-theme.ts (tailwind-merge@1.x API).
6
+ * Without this, twMerge treats e.g. text-caption-2-em as the same group as
7
+ * text-display-on-light-primary and drops the font-size class.
8
+ */
9
+ const fontSizeTokens = [
10
+ "title",
11
+ "title-em",
12
+ "heading",
13
+ "subheader",
14
+ "subheader-em",
15
+ "body",
16
+ "body-em",
17
+ "caption-1",
18
+ "caption-1-em",
19
+ "caption-2",
20
+ "caption-2-em",
21
+ "footnote",
22
+ "footnote-em",
23
+ ] as const;
24
+
25
+ const twMerge = extendTailwindMerge({
26
+ classGroups: {
27
+ "font-size": [{ text: [...fontSizeTokens] }],
28
+ },
29
+ });
30
+
4
31
  /**
5
32
  * Merges the tailwind clases (using twMerge). Conditionally removes false values
6
33
  * @param inputs The tailwind classes to merge