@music-vine/cadence 3.0.2 → 3.1.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/components/badge.d.ts +2 -2
- package/dist/components/button.d.ts +5 -5
- package/dist/components/input.d.ts +1 -1
- package/dist/components/textarea.d.ts +1 -1
- package/dist/components/typography/list.d.ts +1 -1
- package/dist/lib/utils.d.ts +19 -6
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +2 -54
- package/dist/lib/utils.js.map +2 -2
- package/package.json +2 -1
|
@@ -29,8 +29,8 @@ import type * as React from "react";
|
|
|
29
29
|
* Includes color variants matching Button component for consistency.
|
|
30
30
|
*/
|
|
31
31
|
declare const badgeVariants: (props?: ({
|
|
32
|
-
variant?: "
|
|
33
|
-
size?: "
|
|
32
|
+
variant?: "bold" | "white" | "transparent" | "light" | "subtle" | "brand" | "brandSecondary" | "contrast" | "success" | "error" | "primary" | "secondary" | "destructive" | "brandLight" | "outline" | null | undefined;
|
|
33
|
+
size?: "default" | "icon" | "xs" | "sm" | "lg" | null | undefined;
|
|
34
34
|
shadow?: boolean | null | undefined;
|
|
35
35
|
strong?: boolean | null | undefined;
|
|
36
36
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -47,10 +47,10 @@ import type { ButtonHTMLAttributes, Ref } from "react";
|
|
|
47
47
|
type ButtonSize = "default" | "xs" | "sm" | "lg" | "icon" | "xl";
|
|
48
48
|
type ButtonFontSize = "xxs" | "xs" | "sm" | "base" | "lg" | "xl" | null;
|
|
49
49
|
declare const buttonVariants: (props?: ({
|
|
50
|
-
variant?: "
|
|
51
|
-
size?: "
|
|
52
|
-
fontSize?: "
|
|
53
|
-
borderRadius?: "
|
|
50
|
+
variant?: "bold" | "transparent" | "light" | "subtle" | "brand" | "brandSecondary" | "contrast" | "success" | "error" | null | undefined;
|
|
51
|
+
size?: "default" | "icon" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
52
|
+
fontSize?: "base" | "xs" | "sm" | "lg" | "xl" | "xxs" | "null" | null | undefined;
|
|
53
|
+
borderRadius?: "default" | "sm" | "rounded" | "full" | null | undefined;
|
|
54
54
|
border?: boolean | null | undefined;
|
|
55
55
|
noFeedback?: boolean | null | undefined;
|
|
56
56
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -96,7 +96,7 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, Om
|
|
|
96
96
|
declare const Button: ({ className, variant, size, borderRadius, border, noFeedback, asChild, type, children, fontSize, icon, ref, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
97
97
|
/** CVA variants for Loading spinner sizing */
|
|
98
98
|
declare const loadingVariants: (props?: ({
|
|
99
|
-
size?: "
|
|
99
|
+
size?: "default" | "icon" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
100
100
|
visible?: boolean | null | undefined;
|
|
101
101
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
102
102
|
/**
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
import { type VariantProps } from "class-variance-authority";
|
|
36
36
|
import type { Ref } from "react";
|
|
37
37
|
declare const inputVariants: (props?: ({
|
|
38
|
-
size?: "
|
|
38
|
+
size?: "default" | "auto" | "sm" | null | undefined;
|
|
39
39
|
hasLeftIcon?: boolean | null | undefined;
|
|
40
40
|
hasRightIcon?: boolean | null | undefined;
|
|
41
41
|
type?: "search" | null | undefined;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import { type VariantProps } from "class-variance-authority";
|
|
19
19
|
import type { Ref } from "react";
|
|
20
20
|
declare const textareaVariants: (props?: ({
|
|
21
|
-
size?: "
|
|
21
|
+
size?: "default" | "sm" | null | undefined;
|
|
22
22
|
resize?: "none" | "horizontal" | "vertical" | "both" | null | undefined;
|
|
23
23
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
24
24
|
/**
|
|
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import type * as React from "react";
|
|
3
3
|
import type { Ref } from "react";
|
|
4
4
|
declare const listVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6
6
|
variant?: "ordered" | "custom" | "unordered" | null | undefined;
|
|
7
7
|
color?: "default" | "modal" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import { type ClassValue } from "clsx";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* `twMerge` from `fluid-tailwindcss/tailwind-merge` is a tailwind-merge
|
|
4
|
+
* instance preconfigured to recognise every `fl-*` utility (padding,
|
|
5
|
+
* margin, gap, text, sizing, inset, border-radius, …) so merging works
|
|
6
|
+
* correctly out of the box:
|
|
6
7
|
*
|
|
7
|
-
* Fluid
|
|
8
|
-
*
|
|
9
|
-
* -
|
|
8
|
+
* - Fluid and standard utilities conflict at the same modifier level
|
|
9
|
+
* (e.g. `@md:fl-text-2xl/3xl` overrides `@md:text-5xl`).
|
|
10
|
+
* - A container-prefixed fluid utility does NOT override its un-prefixed
|
|
11
|
+
* counterpart (e.g. `@md:fl-text-2xl/3xl` leaves `text-4xl` intact),
|
|
12
|
+
* matching the CSS cascade — the prefixed rule only applies inside the
|
|
13
|
+
* container query, so the base utility must survive as the mobile
|
|
14
|
+
* fallback.
|
|
15
|
+
*
|
|
16
|
+
* This replaces the previous hand-rolled adapter that was ported from
|
|
17
|
+
* `fluid-tailwind` (the `~`-prefix variant). The codebase no longer uses
|
|
18
|
+
* `~`-prefixed fluid classes — `fluid-tailwindcss` is the sole fluid plugin.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Merge Tailwind CSS classes with clsx and tailwind-merge, with fluid utility
|
|
22
|
+
* conflict resolution.
|
|
10
23
|
*/
|
|
11
24
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
12
25
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/lib/utils.d.ts.map
CHANGED
|
@@ -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,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;GAGG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
package/dist/lib/utils.js
CHANGED
|
@@ -1,59 +1,7 @@
|
|
|
1
1
|
import { clsx } from "clsx";
|
|
2
|
-
import {
|
|
3
|
-
const isFluidTextSize = (classPart) => {
|
|
4
|
-
const fluidPattern = /^fl-text-([a-z0-9]+)\/([a-z0-9]+)$/;
|
|
5
|
-
const match = classPart.match(fluidPattern);
|
|
6
|
-
if (!match) {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
const [, startSize, endSize] = match;
|
|
10
|
-
const validSizes = [
|
|
11
|
-
"xs",
|
|
12
|
-
"sm",
|
|
13
|
-
"base",
|
|
14
|
-
"lg",
|
|
15
|
-
"xl",
|
|
16
|
-
"2xl",
|
|
17
|
-
"3xl",
|
|
18
|
-
"4xl",
|
|
19
|
-
"5xl",
|
|
20
|
-
"6xl",
|
|
21
|
-
"7xl",
|
|
22
|
-
"8xl",
|
|
23
|
-
"9xl"
|
|
24
|
-
];
|
|
25
|
-
return validSizes.includes(startSize) && validSizes.includes(endSize);
|
|
26
|
-
};
|
|
27
|
-
const customTwMerge = extendTailwindMerge((config) => {
|
|
28
|
-
return mergeConfigs(config, {
|
|
29
|
-
extend: {
|
|
30
|
-
classGroups: {
|
|
31
|
-
// Extend font-size class group to support fluid syntax
|
|
32
|
-
// Top-level validator receives the full className (e.g., "fl-text-2xl/3xl")
|
|
33
|
-
"font-size": [isFluidTextSize]
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
// Parse className to extract modifiers and base class name
|
|
37
|
-
// For @md:fl-text-4xl/5xl → modifiers:[@md], baseClassName:fl-text-4xl/5xl
|
|
38
|
-
experimentalParseClassName: ({ className, parseClassName }) => {
|
|
39
|
-
return parseClassName(className);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
});
|
|
2
|
+
import { twMerge } from "fluid-tailwindcss/tailwind-merge";
|
|
43
3
|
function cn(...inputs) {
|
|
44
|
-
|
|
45
|
-
const expanded = classList.split(" ").flatMap((className) => {
|
|
46
|
-
const fluidWithModifier = className.match(
|
|
47
|
-
/^(@[\w-]+):fl-text-(\w+)\/(\w+)$/
|
|
48
|
-
);
|
|
49
|
-
if (fluidWithModifier) {
|
|
50
|
-
const [, modifier, startSize, endSize] = fluidWithModifier;
|
|
51
|
-
const baseFluid = `fl-text-${startSize}/${endSize}`;
|
|
52
|
-
return [className, baseFluid];
|
|
53
|
-
}
|
|
54
|
-
return [className];
|
|
55
|
-
});
|
|
56
|
-
return customTwMerge(expanded.join(" "));
|
|
4
|
+
return twMerge(clsx(inputs));
|
|
57
5
|
}
|
|
58
6
|
export {
|
|
59
7
|
cn
|
package/dist/lib/utils.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/lib/utils.ts"],
|
|
4
|
-
"sourcesContent": ["import { type ClassValue, clsx } from \"clsx\";\nimport {
|
|
5
|
-
"mappings": "AAAA,SAA0B,YAAY;AACtC,SAAS,
|
|
4
|
+
"sourcesContent": ["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"fluid-tailwindcss/tailwind-merge\";\n\n/**\n * `twMerge` from `fluid-tailwindcss/tailwind-merge` is a tailwind-merge\n * instance preconfigured to recognise every `fl-*` utility (padding,\n * margin, gap, text, sizing, inset, border-radius, \u2026) so merging works\n * correctly out of the box:\n *\n * - Fluid and standard utilities conflict at the same modifier level\n * (e.g. `@md:fl-text-2xl/3xl` overrides `@md:text-5xl`).\n * - A container-prefixed fluid utility does NOT override its un-prefixed\n * counterpart (e.g. `@md:fl-text-2xl/3xl` leaves `text-4xl` intact),\n * matching the CSS cascade \u2014 the prefixed rule only applies inside the\n * container query, so the base utility must survive as the mobile\n * fallback.\n *\n * This replaces the previous hand-rolled adapter that was ported from\n * `fluid-tailwind` (the `~`-prefix variant). The codebase no longer uses\n * `~`-prefixed fluid classes \u2014 `fluid-tailwindcss` is the sole fluid plugin.\n */\n\n/**\n * Merge Tailwind CSS classes with clsx and tailwind-merge, with fluid utility\n * conflict resolution.\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAA0B,YAAY;AACtC,SAAS,eAAe;AAyBjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@music-vine/cadence",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
"class-variance-authority": "^0.7.1",
|
|
95
95
|
"clsx": "^2.1.1",
|
|
96
96
|
"embla-carousel-react": "^8.5.1",
|
|
97
|
+
"fluid-tailwindcss": "^1.0.5",
|
|
97
98
|
"lodash": "^4.18.1",
|
|
98
99
|
"lucide-react": "^0.531.0",
|
|
99
100
|
"motion": "^12.0.0",
|