@adea-ai/ui 0.72.4 → 0.73.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.
@@ -26,7 +26,7 @@ import { type VariantProps } from '#lib/variants';
26
26
  * hold a face.
27
27
  */
28
28
  export declare const entityIconVariants: (props?: ({
29
- shape?: "rounded" | "circle" | "square" | null | undefined;
29
+ shape?: "circle" | "square" | "rounded" | null | undefined;
30
30
  size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
31
31
  tone?: "success" | "warning" | "info" | "neutral" | "primary" | "bare" | "danger" | null | undefined;
32
32
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -14,7 +14,7 @@ import { type VariantProps } from '#lib/variants';
14
14
  * follows from the side, so a caller never pairs them by hand.
15
15
  */
16
16
  declare const sheetVariants: (props?: ({
17
- side?: "bottom" | "end" | "start" | "top" | null | undefined;
17
+ side?: "end" | "start" | "bottom" | "top" | null | undefined;
18
18
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
19
19
  export type SheetContentProps = ComponentProps<typeof KobalteDialogContent> & VariantProps<typeof sheetVariants> & {
20
20
  closeButton?: JSX.Element | false;
@@ -1,18 +1,4 @@
1
- import { type ClassValue } from 'clsx';
2
- /**
3
- * `twMerge` needs to be told about the utilities this design system adds.
4
- *
5
- * Every token-derived utility (`h-control-md`, `w-rail`, `p-control-lg`, …)
6
- * is an unknown name to a default `tailwind-merge` instance. Left
7
- * unregistered, `cn('h-control-md', 'h-control-sm')` keeps both classes and
8
- * the winner is decided by stylesheet order rather than by the caller — a bug
9
- * that only shows up as a control that ignores its `size` prop, long after the
10
- * line that caused it was written.
11
- *
12
- * Registering the families here is what makes "the last class wins" true for
13
- * the whole system, including for consumers overriding a component's default.
14
- */
15
- export declare const twMergeConfig: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
1
+ import type { CnFunction } from 'cn';
16
2
  /**
17
3
  * Merge conditional class values, letting the last conflicting utility win.
18
4
  *
@@ -24,6 +10,17 @@ export declare const twMergeConfig: (...classLists: import("tailwind-merge").Cla
24
10
  * A template literal (`cn(`base--${value}`)`) is invisible to the linter and
25
11
  * will be reported, because a class the linter cannot read is a class it
26
12
  * cannot check against the theme.
13
+ *
14
+ * `cn` also has to be told about the utilities this design system adds. Every
15
+ * token-derived utility (`h-control-md`, `w-rail`, `p-control-lg`, …) is an
16
+ * unknown name to a default merge instance. Left unregistered,
17
+ * `cn('h-control-md', 'h-control-sm')` keeps both classes and the winner is
18
+ * decided by stylesheet order rather than by the caller — a bug that only
19
+ * shows up as a control that ignores its `size` prop, long after the line
20
+ * that caused it was written.
21
+ *
22
+ * Registering the families below is what makes "the last class wins" true for
23
+ * the whole system, including for consumers overriding a component's default.
27
24
  */
28
- export declare function cn(...inputs: ClassValue[]): string;
25
+ export declare const cn: CnFunction;
29
26
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAG5C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,sEA2CxB,CAAA;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAElD"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AAEpC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,EAAE,EAAE,UA2Cf,CAAA"}
package/dist/lib/utils.js CHANGED
@@ -1,20 +1,29 @@
1
- import { clsx } from "clsx";
2
- import { extendTailwindMerge } from "tailwind-merge";
1
+ import { createCn } from "cn/config";
3
2
  //#region src/lib/utils.ts
4
3
  /**
5
- * `twMerge` needs to be told about the utilities this design system adds.
4
+ * Merge conditional class values, letting the last conflicting utility win.
5
+ *
6
+ * Accepts an object whose keys are classes and whose values enable them, which
7
+ * is the form the design-system linter can read statically:
6
8
  *
7
- * Every token-derived utility (`h-control-md`, `w-rail`, `p-control-lg`, …)
8
- * is an unknown name to a default `tailwind-merge` instance. Left
9
- * unregistered, `cn('h-control-md', 'h-control-sm')` keeps both classes and
10
- * the winner is decided by stylesheet order rather than by the caller — a bug
11
- * that only shows up as a control that ignores its `size` prop, long after the
12
- * line that caused it was written.
9
+ * cn('base', { 'is-open': open(), 'is-disabled': disabled() })
13
10
  *
14
- * Registering the families here is what makes "the last class wins" true for
11
+ * A template literal (`cn(`base--${value}`)`) is invisible to the linter and
12
+ * will be reported, because a class the linter cannot read is a class it
13
+ * cannot check against the theme.
14
+ *
15
+ * `cn` also has to be told about the utilities this design system adds. Every
16
+ * token-derived utility (`h-control-md`, `w-rail`, `p-control-lg`, …) is an
17
+ * unknown name to a default merge instance. Left unregistered,
18
+ * `cn('h-control-md', 'h-control-sm')` keeps both classes and the winner is
19
+ * decided by stylesheet order rather than by the caller — a bug that only
20
+ * shows up as a control that ignores its `size` prop, long after the line
21
+ * that caused it was written.
22
+ *
23
+ * Registering the families below is what makes "the last class wins" true for
15
24
  * the whole system, including for consumers overriding a component's default.
16
25
  */
17
- var twMergeConfig = extendTailwindMerge({ extend: { classGroups: {
26
+ var cn = createCn({ extend: { classGroups: {
18
27
  "ds-height": [{ h: [
19
28
  "control-2xs",
20
29
  "control-xs",
@@ -45,22 +54,7 @@ var twMergeConfig = extendTailwindMerge({ extend: { classGroups: {
45
54
  "rail-item"
46
55
  ] }]
47
56
  } } });
48
- /**
49
- * Merge conditional class values, letting the last conflicting utility win.
50
- *
51
- * Accepts an object whose keys are classes and whose values enable them, which
52
- * is the form the design-system linter can read statically:
53
- *
54
- * cn('base', { 'is-open': open(), 'is-disabled': disabled() })
55
- *
56
- * A template literal (`cn(`base--${value}`)`) is invisible to the linter and
57
- * will be reported, because a class the linter cannot read is a class it
58
- * cannot check against the theme.
59
- */
60
- function cn(...inputs) {
61
- return twMergeConfig(clsx(inputs));
62
- }
63
57
  //#endregion
64
- export { cn, twMergeConfig };
58
+ export { cn };
65
59
 
66
60
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":[],"sources":["../../src/lib/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx'\nimport { extendTailwindMerge } from 'tailwind-merge'\n\n/**\n * `twMerge` needs to be told about the utilities this design system adds.\n *\n * Every token-derived utility (`h-control-md`, `w-rail`, `p-control-lg`, …)\n * is an unknown name to a default `tailwind-merge` instance. Left\n * unregistered, `cn('h-control-md', 'h-control-sm')` keeps both classes and\n * the winner is decided by stylesheet order rather than by the caller — a bug\n * that only shows up as a control that ignores its `size` prop, long after the\n * line that caused it was written.\n *\n * Registering the families here is what makes \"the last class wins\" true for\n * the whole system, including for consumers overriding a component's default.\n */\nexport const twMergeConfig = extendTailwindMerge<'ds-height' | 'ds-width' | 'ds-size'>({\n extend: {\n classGroups: {\n 'ds-height': [\n {\n h: [\n 'control-2xs',\n 'control-xs',\n 'control-sm',\n 'control-md',\n 'control-lg',\n 'control-xl',\n 'row-sm',\n 'row-md',\n 'row-lg',\n 'rail-item',\n 'topbar',\n 'statusbar',\n ],\n },\n ],\n 'ds-width': [\n {\n w: ['rail', 'rail-expanded', 'sidebar', 'sidebar-compact'],\n },\n ],\n // `size-*` is a real Tailwind group, but the token-derived values are\n // not, so they need the same treatment as height and width.\n 'ds-size': [\n {\n size: [\n 'control-2xs',\n 'control-xs',\n 'control-sm',\n 'control-md',\n 'control-lg',\n 'control-xl',\n 'rail-item',\n ],\n },\n ],\n },\n },\n})\n\n/**\n * Merge conditional class values, letting the last conflicting utility win.\n *\n * Accepts an object whose keys are classes and whose values enable them, which\n * is the form the design-system linter can read statically:\n *\n * cn('base', { 'is-open': open(), 'is-disabled': disabled() })\n *\n * A template literal (`cn(`base--${value}`)`) is invisible to the linter and\n * will be reported, because a class the linter cannot read is a class it\n * cannot check against the theme.\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMergeConfig(clsx(inputs))\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,IAAa,gBAAgB,oBAA0D,EACrF,QAAQ,EACN,aAAa;CACX,aAAa,CACX,EACE,GAAG;EACD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,EACF,CACF;CACA,YAAY,CACV,EACE,GAAG;EAAC;EAAQ;EAAiB;EAAW;CAAiB,EAC3D,CACF;CAGA,WAAW,CACT,EACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;CACF,EACF,CACF;AACF,EACF,EACF,CAAC;;;;;;;;;;;;;AAcD,SAAgB,GAAG,GAAG,QAA8B;CAClD,OAAO,cAAc,KAAK,MAAM,CAAC;AACnC"}
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../src/lib/utils.ts"],"sourcesContent":["import { createCn } from 'cn/config'\nimport type { CnFunction } from 'cn'\n\n/**\n * Merge conditional class values, letting the last conflicting utility win.\n *\n * Accepts an object whose keys are classes and whose values enable them, which\n * is the form the design-system linter can read statically:\n *\n * cn('base', { 'is-open': open(), 'is-disabled': disabled() })\n *\n * A template literal (`cn(`base--${value}`)`) is invisible to the linter and\n * will be reported, because a class the linter cannot read is a class it\n * cannot check against the theme.\n *\n * `cn` also has to be told about the utilities this design system adds. Every\n * token-derived utility (`h-control-md`, `w-rail`, `p-control-lg`, …) is an\n * unknown name to a default merge instance. Left unregistered,\n * `cn('h-control-md', 'h-control-sm')` keeps both classes and the winner is\n * decided by stylesheet order rather than by the caller — a bug that only\n * shows up as a control that ignores its `size` prop, long after the line\n * that caused it was written.\n *\n * Registering the families below is what makes \"the last class wins\" true for\n * the whole system, including for consumers overriding a component's default.\n */\nexport const cn: CnFunction = createCn({\n extend: {\n classGroups: {\n 'ds-height': [\n {\n h: [\n 'control-2xs',\n 'control-xs',\n 'control-sm',\n 'control-md',\n 'control-lg',\n 'control-xl',\n 'row-sm',\n 'row-md',\n 'row-lg',\n 'rail-item',\n 'topbar',\n 'statusbar',\n ],\n },\n ],\n 'ds-width': [\n {\n w: ['rail', 'rail-expanded', 'sidebar', 'sidebar-compact'],\n },\n ],\n // `size-*` is a real Tailwind group, but the token-derived values are\n // not, so they need the same treatment as height and width.\n 'ds-size': [\n {\n size: [\n 'control-2xs',\n 'control-xs',\n 'control-sm',\n 'control-md',\n 'control-lg',\n 'control-xl',\n 'rail-item',\n ],\n },\n ],\n },\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAa,KAAiB,SAAS,EACrC,QAAQ,EACN,aAAa;CACX,aAAa,CACX,EACE,GAAG;EACD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,EACF,CACF;CACA,YAAY,CACV,EACE,GAAG;EAAC;EAAQ;EAAiB;EAAW;CAAiB,EAC3D,CACF;CAGA,WAAW,CACT,EACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;CACF,EACF,CACF;AACF,EACF,EACF,CAAC"}
package/dist/r/lib.json CHANGED
@@ -6,8 +6,7 @@
6
6
  "dependencies": [
7
7
  "@adea-ai/themes@^0.6.2",
8
8
  "class-variance-authority@^0.7.1",
9
- "clsx@^2.1.1",
10
- "tailwind-merge@^3.7.0"
9
+ "cn@^0.4.0"
11
10
  ],
12
11
  "registryDependencies": [],
13
12
  "files": [
@@ -2066,8 +2066,7 @@
2066
2066
  "dependencies": [
2067
2067
  "@adea-ai/themes@^0.6.2",
2068
2068
  "class-variance-authority@^0.7.1",
2069
- "clsx@^2.1.1",
2070
- "tailwind-merge@^3.7.0"
2069
+ "cn@^0.4.0"
2071
2070
  ],
2072
2071
  "registryDependencies": [],
2073
2072
  "files": [
@@ -1,20 +1,30 @@
1
- import { type ClassValue, clsx } from 'clsx'
2
- import { extendTailwindMerge } from 'tailwind-merge'
1
+ import { createCn } from 'cn/config'
2
+ import type { CnFunction } from 'cn'
3
3
 
4
4
  /**
5
- * `twMerge` needs to be told about the utilities this design system adds.
5
+ * Merge conditional class values, letting the last conflicting utility win.
6
+ *
7
+ * Accepts an object whose keys are classes and whose values enable them, which
8
+ * is the form the design-system linter can read statically:
9
+ *
10
+ * cn('base', { 'is-open': open(), 'is-disabled': disabled() })
6
11
  *
7
- * Every token-derived utility (`h-control-md`, `w-rail`, `p-control-lg`, …)
8
- * is an unknown name to a default `tailwind-merge` instance. Left
9
- * unregistered, `cn('h-control-md', 'h-control-sm')` keeps both classes and
10
- * the winner is decided by stylesheet order rather than by the caller — a bug
11
- * that only shows up as a control that ignores its `size` prop, long after the
12
- * line that caused it was written.
12
+ * A template literal (`cn(`base--${value}`)`) is invisible to the linter and
13
+ * will be reported, because a class the linter cannot read is a class it
14
+ * cannot check against the theme.
13
15
  *
14
- * Registering the families here is what makes "the last class wins" true for
16
+ * `cn` also has to be told about the utilities this design system adds. Every
17
+ * token-derived utility (`h-control-md`, `w-rail`, `p-control-lg`, …) is an
18
+ * unknown name to a default merge instance. Left unregistered,
19
+ * `cn('h-control-md', 'h-control-sm')` keeps both classes and the winner is
20
+ * decided by stylesheet order rather than by the caller — a bug that only
21
+ * shows up as a control that ignores its `size` prop, long after the line
22
+ * that caused it was written.
23
+ *
24
+ * Registering the families below is what makes "the last class wins" true for
15
25
  * the whole system, including for consumers overriding a component's default.
16
26
  */
17
- export const twMergeConfig = extendTailwindMerge<'ds-height' | 'ds-width' | 'ds-size'>({
27
+ export const cn: CnFunction = createCn({
18
28
  extend: {
19
29
  classGroups: {
20
30
  'ds-height': [
@@ -58,19 +68,3 @@ export const twMergeConfig = extendTailwindMerge<'ds-height' | 'ds-width' | 'ds-
58
68
  },
59
69
  },
60
70
  })
61
-
62
- /**
63
- * Merge conditional class values, letting the last conflicting utility win.
64
- *
65
- * Accepts an object whose keys are classes and whose values enable them, which
66
- * is the form the design-system linter can read statically:
67
- *
68
- * cn('base', { 'is-open': open(), 'is-disabled': disabled() })
69
- *
70
- * A template literal (`cn(`base--${value}`)`) is invisible to the linter and
71
- * will be reported, because a class the linter cannot read is a class it
72
- * cannot check against the theme.
73
- */
74
- export function cn(...inputs: ClassValue[]): string {
75
- return twMergeConfig(clsx(inputs))
76
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adea-ai/ui",
3
- "version": "0.72.4",
3
+ "version": "0.73.0",
4
4
  "description": "The Adea design system: Kobalte-backed Solid components, semantic OKLCH tokens, and the app-shell layout primitives shared by Adea and Cortana.",
5
5
  "keywords": [
6
6
  "adea",
@@ -117,11 +117,10 @@
117
117
  "@fontsource-variable/space-grotesk": "^5.3.0",
118
118
  "@kobalte/core": "^0.13.14",
119
119
  "class-variance-authority": "^0.7.1",
120
- "clsx": "^2.1.1",
121
120
  "cmdk-solid": "^1.2.0",
121
+ "cn": "^0.4.0",
122
122
  "lucide-solid": "^1.48.0",
123
123
  "solid-motionone": "^1.0.4",
124
- "tailwind-merge": "^3.7.0",
125
124
  "tw-animate-css": "^1.4.0"
126
125
  },
127
126
  "devDependencies": {
package/registry.json CHANGED
@@ -2066,8 +2066,7 @@
2066
2066
  "dependencies": [
2067
2067
  "@adea-ai/themes@^0.6.2",
2068
2068
  "class-variance-authority@^0.7.1",
2069
- "clsx@^2.1.1",
2070
- "tailwind-merge@^3.7.0"
2069
+ "cn@^0.4.0"
2071
2070
  ],
2072
2071
  "registryDependencies": [],
2073
2072
  "files": [
package/src/lib/utils.ts CHANGED
@@ -1,20 +1,30 @@
1
- import { type ClassValue, clsx } from 'clsx'
2
- import { extendTailwindMerge } from 'tailwind-merge'
1
+ import { createCn } from 'cn/config'
2
+ import type { CnFunction } from 'cn'
3
3
 
4
4
  /**
5
- * `twMerge` needs to be told about the utilities this design system adds.
5
+ * Merge conditional class values, letting the last conflicting utility win.
6
+ *
7
+ * Accepts an object whose keys are classes and whose values enable them, which
8
+ * is the form the design-system linter can read statically:
9
+ *
10
+ * cn('base', { 'is-open': open(), 'is-disabled': disabled() })
6
11
  *
7
- * Every token-derived utility (`h-control-md`, `w-rail`, `p-control-lg`, …)
8
- * is an unknown name to a default `tailwind-merge` instance. Left
9
- * unregistered, `cn('h-control-md', 'h-control-sm')` keeps both classes and
10
- * the winner is decided by stylesheet order rather than by the caller — a bug
11
- * that only shows up as a control that ignores its `size` prop, long after the
12
- * line that caused it was written.
12
+ * A template literal (`cn(`base--${value}`)`) is invisible to the linter and
13
+ * will be reported, because a class the linter cannot read is a class it
14
+ * cannot check against the theme.
13
15
  *
14
- * Registering the families here is what makes "the last class wins" true for
16
+ * `cn` also has to be told about the utilities this design system adds. Every
17
+ * token-derived utility (`h-control-md`, `w-rail`, `p-control-lg`, …) is an
18
+ * unknown name to a default merge instance. Left unregistered,
19
+ * `cn('h-control-md', 'h-control-sm')` keeps both classes and the winner is
20
+ * decided by stylesheet order rather than by the caller — a bug that only
21
+ * shows up as a control that ignores its `size` prop, long after the line
22
+ * that caused it was written.
23
+ *
24
+ * Registering the families below is what makes "the last class wins" true for
15
25
  * the whole system, including for consumers overriding a component's default.
16
26
  */
17
- export const twMergeConfig = extendTailwindMerge<'ds-height' | 'ds-width' | 'ds-size'>({
27
+ export const cn: CnFunction = createCn({
18
28
  extend: {
19
29
  classGroups: {
20
30
  'ds-height': [
@@ -58,19 +68,3 @@ export const twMergeConfig = extendTailwindMerge<'ds-height' | 'ds-width' | 'ds-
58
68
  },
59
69
  },
60
70
  })
61
-
62
- /**
63
- * Merge conditional class values, letting the last conflicting utility win.
64
- *
65
- * Accepts an object whose keys are classes and whose values enable them, which
66
- * is the form the design-system linter can read statically:
67
- *
68
- * cn('base', { 'is-open': open(), 'is-disabled': disabled() })
69
- *
70
- * A template literal (`cn(`base--${value}`)`) is invisible to the linter and
71
- * will be reported, because a class the linter cannot read is a class it
72
- * cannot check against the theme.
73
- */
74
- export function cn(...inputs: ClassValue[]): string {
75
- return twMergeConfig(clsx(inputs))
76
- }