@music-vine/cadence 2.6.2 → 3.0.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/README.md +5 -44
- package/dist/components/accordion.d.ts +71 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +2 -2
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/badge.d.ts +62 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/breadcrumb.d.ts +42 -0
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/button.d.ts +117 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +3 -3
- package/dist/components/button.js.map +1 -1
- package/dist/components/card.d.ts +56 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js.map +1 -1
- package/dist/components/carousel-dots.d.ts +17 -0
- package/dist/components/carousel-dots.d.ts.map +1 -0
- package/dist/components/carousel-dots.js +1 -1
- package/dist/components/carousel-dots.js.map +1 -1
- package/dist/components/carousel.d.ts +99 -0
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +2 -2
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/checkbox.d.ts +34 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/context-menu.d.ts +126 -0
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +6 -6
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/dialog.d.ts +85 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/drawer.d.ts +90 -0
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/index.d.ts +36 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/input.d.ts +69 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +61 -57
- package/dist/components/input.js.map +2 -2
- package/dist/components/label.d.ts +36 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/popover.d.ts +61 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +1 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/price-tag.d.ts +31 -0
- package/dist/components/price-tag.d.ts.map +1 -0
- package/dist/components/price-tag.js.map +1 -1
- package/dist/components/radio-group.d.ts +15 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/scroll-area.d.ts +33 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/scroll-drum.d.ts +96 -0
- package/dist/components/scroll-drum.d.ts.map +1 -0
- package/dist/components/scroll-drum.js +63 -34
- package/dist/components/scroll-drum.js.map +2 -2
- package/dist/components/select.d.ts +49 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +1 -1
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.d.ts +35 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/skeleton.d.ts +44 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/slider.d.ts +21 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.js.map +1 -1
- package/dist/components/stacking-card.d.ts +89 -0
- package/dist/components/stacking-card.d.ts.map +1 -0
- package/dist/components/stacking-card.js +3 -3
- package/dist/components/stacking-card.js.map +2 -2
- package/dist/components/tabs.d.ts +46 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +2 -2
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/textarea.d.ts +34 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/toast.d.ts +67 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +2 -2
- package/dist/components/toast.js.map +2 -2
- package/dist/components/toggle-button.d.ts +54 -0
- package/dist/components/toggle-button.d.ts.map +1 -0
- package/dist/components/toggle-button.js.map +1 -1
- package/dist/components/typography/heading.d.ts +20 -0
- package/dist/components/typography/heading.d.ts.map +1 -0
- package/dist/components/typography/heading.js.map +1 -1
- package/dist/components/typography/index.d.ts +5 -0
- package/dist/components/typography/index.d.ts.map +1 -0
- package/dist/components/typography/list.d.ts +23 -0
- package/dist/components/typography/list.d.ts.map +1 -0
- package/dist/components/typography/list.js +1 -1
- package/dist/components/typography/list.js.map +2 -2
- package/dist/components/typography/prose.d.ts +8 -0
- package/dist/components/typography/prose.d.ts.map +1 -0
- package/dist/components/typography/text.d.ts +13 -0
- package/dist/components/typography/text.d.ts.map +1 -0
- package/dist/icons/custom/boards-indicator.d.ts +6 -0
- package/dist/icons/custom/boards-indicator.d.ts.map +1 -0
- package/dist/icons/custom/boards-indicator.js +7 -2
- package/dist/icons/custom/boards-indicator.js.map +2 -2
- package/dist/icons/custom/download-history.d.ts +5 -0
- package/dist/icons/custom/download-history.d.ts.map +1 -0
- package/dist/icons/custom/download-history.js +3 -4
- package/dist/icons/custom/download-history.js.map +2 -2
- package/dist/icons/custom/exclamation-mark-in-octagon.d.ts +5 -0
- package/dist/icons/custom/exclamation-mark-in-octagon.d.ts.map +1 -0
- package/dist/icons/custom/exclamation-mark-in-octagon.js +6 -3
- package/dist/icons/custom/exclamation-mark-in-octagon.js.map +2 -2
- package/dist/icons/custom/horizontal-orientation.d.ts +5 -0
- package/dist/icons/custom/horizontal-orientation.d.ts.map +1 -0
- package/dist/icons/custom/horizontal-orientation.js +4 -3
- package/dist/icons/custom/horizontal-orientation.js.map +2 -2
- package/dist/icons/custom/lightning-bolt.d.ts +5 -0
- package/dist/icons/custom/lightning-bolt.d.ts.map +1 -0
- package/dist/icons/custom/lightning-bolt.js +24 -27
- package/dist/icons/custom/lightning-bolt.js.map +2 -2
- package/dist/icons/custom/music-file.d.ts +5 -0
- package/dist/icons/custom/music-file.d.ts.map +1 -0
- package/dist/icons/custom/music-file.js +17 -0
- package/dist/icons/custom/music-file.js.map +7 -0
- package/dist/icons/custom/pin.d.ts +5 -0
- package/dist/icons/custom/pin.d.ts.map +1 -0
- package/dist/icons/custom/pin.js +4 -1
- package/dist/icons/custom/pin.js.map +2 -2
- package/dist/icons/custom/premium-star.d.ts +11 -0
- package/dist/icons/custom/premium-star.d.ts.map +1 -0
- package/dist/icons/custom/premium-star.js +3 -1
- package/dist/icons/custom/premium-star.js.map +2 -2
- package/dist/icons/custom/social/discord.d.ts +5 -0
- package/dist/icons/custom/social/discord.d.ts.map +1 -0
- package/dist/icons/custom/social/discord.js +3 -4
- package/dist/icons/custom/social/discord.js.map +2 -2
- package/dist/icons/custom/social/index.d.ts +4 -0
- package/dist/icons/custom/social/index.d.ts.map +1 -0
- package/dist/icons/custom/social/tiktok.d.ts +5 -0
- package/dist/icons/custom/social/tiktok.d.ts.map +1 -0
- package/dist/icons/custom/social/tiktok.js +3 -4
- package/dist/icons/custom/social/tiktok.js.map +2 -2
- package/dist/icons/custom/social/twitter-x.d.ts +5 -0
- package/dist/icons/custom/social/twitter-x.d.ts.map +1 -0
- package/dist/icons/custom/social/twitter-x.js +19 -22
- package/dist/icons/custom/social/twitter-x.js.map +2 -2
- package/dist/icons/custom/square-aspect-ratio.d.ts +5 -0
- package/dist/icons/custom/square-aspect-ratio.d.ts.map +1 -0
- package/dist/icons/custom/square-aspect-ratio.js +4 -1
- package/dist/icons/custom/square-aspect-ratio.js.map +2 -2
- package/dist/icons/custom/tick-in-circle.d.ts +8 -0
- package/dist/icons/custom/tick-in-circle.d.ts.map +1 -0
- package/dist/icons/custom/tick-in-circle.js +25 -25
- package/dist/icons/custom/tick-in-circle.js.map +2 -2
- package/dist/icons/custom/tick-small.d.ts +5 -0
- package/dist/icons/custom/tick-small.d.ts.map +1 -0
- package/dist/icons/custom/tick-small.js +8 -10
- package/dist/icons/custom/tick-small.js.map +2 -2
- package/dist/icons/custom/tick.d.ts +5 -0
- package/dist/icons/custom/tick.d.ts.map +1 -0
- package/dist/icons/custom/tick.js +2 -2
- package/dist/icons/custom/tick.js.map +2 -2
- package/dist/icons/custom/types.d.ts +3 -0
- package/dist/icons/custom/types.d.ts.map +1 -0
- package/dist/icons/custom/types.js +1 -0
- package/dist/icons/custom/types.js.map +7 -0
- package/dist/icons/custom/ultra-wide-aspect-ratio.d.ts +5 -0
- package/dist/icons/custom/ultra-wide-aspect-ratio.d.ts.map +1 -0
- package/dist/icons/custom/ultra-wide-aspect-ratio.js +4 -1
- package/dist/icons/custom/ultra-wide-aspect-ratio.js.map +2 -2
- package/dist/icons/custom/uppbeat-credit.d.ts +5 -0
- package/dist/icons/custom/uppbeat-credit.d.ts.map +1 -0
- package/dist/icons/custom/uppbeat-credit.js +2 -4
- package/dist/icons/custom/uppbeat-credit.js.map +2 -2
- package/dist/icons/custom/vertical-orientation.d.ts +5 -0
- package/dist/icons/custom/vertical-orientation.d.ts.map +1 -0
- package/dist/icons/custom/vertical-orientation.js +4 -1
- package/dist/icons/custom/vertical-orientation.js.map +2 -2
- package/dist/icons/custom/view-credit-note.d.ts +5 -0
- package/dist/icons/custom/view-credit-note.d.ts.map +1 -0
- package/dist/icons/custom/view-credit-note.js +4 -1
- package/dist/icons/custom/view-credit-note.js.map +2 -2
- package/dist/icons/index.d.ts +28 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +4 -5
- package/dist/icons/index.js.map +2 -2
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +12 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +7 -17
- package/dist/lib/utils.js.map +2 -2
- package/dist/styles/index.css +16 -3
- package/dist/styles/storybook.css +2 -2
- package/dist/test/setup.d.ts +2 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/theme/index.d.ts +142 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +1 -1
- package/dist/theme/index.js.map +2 -2
- package/package.json +4 -9
- package/{tailwind.config.v4.css → tailwind.config.css} +35 -14
- package/dist/styles/index.v4.css +0 -49
- package/tailwind.config.ts +0 -313
package/dist/lib/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { clsx } from "clsx";
|
|
2
2
|
import { extendTailwindMerge, mergeConfigs } from "tailwind-merge";
|
|
3
3
|
const isFluidTextSize = (classPart) => {
|
|
4
|
-
const fluidPattern =
|
|
4
|
+
const fluidPattern = /^fl-text-([a-z0-9]+)\/([a-z0-9]+)$/;
|
|
5
5
|
const match = classPart.match(fluidPattern);
|
|
6
6
|
if (!match) {
|
|
7
7
|
return false;
|
|
@@ -29,24 +29,14 @@ const customTwMerge = extendTailwindMerge((config) => {
|
|
|
29
29
|
extend: {
|
|
30
30
|
classGroups: {
|
|
31
31
|
// Extend font-size class group to support fluid syntax
|
|
32
|
-
// Top-level validator receives the full className (e.g., "
|
|
32
|
+
// Top-level validator receives the full className (e.g., "fl-text-2xl/3xl")
|
|
33
33
|
"font-size": [isFluidTextSize]
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
// After processing: ~@md:~text-4xl/5xl → modifiers:[@md], baseClassName:~text-4xl/5xl
|
|
39
|
-
// We keep the ~ on baseClassName because tailwind-merge needs it to recognize fluid syntax
|
|
36
|
+
// Parse className to extract modifiers and base class name
|
|
37
|
+
// For @md:fl-text-4xl/5xl → modifiers:[@md], baseClassName:fl-text-4xl/5xl
|
|
40
38
|
experimentalParseClassName: ({ className, parseClassName }) => {
|
|
41
|
-
|
|
42
|
-
const cleanedModifiers = parsed.modifiers.map(
|
|
43
|
-
(modifier) => modifier.startsWith("~") ? modifier.slice(1) : modifier
|
|
44
|
-
);
|
|
45
|
-
return {
|
|
46
|
-
...parsed,
|
|
47
|
-
modifiers: cleanedModifiers
|
|
48
|
-
// Keep baseClassName as-is (preserving ~) so fluid syntax isn't misinterpreted as line-height
|
|
49
|
-
};
|
|
39
|
+
return parseClassName(className);
|
|
50
40
|
}
|
|
51
41
|
});
|
|
52
42
|
});
|
|
@@ -54,11 +44,11 @@ function cn(...inputs) {
|
|
|
54
44
|
const classList = clsx(inputs);
|
|
55
45
|
const expanded = classList.split(" ").flatMap((className) => {
|
|
56
46
|
const fluidWithModifier = className.match(
|
|
57
|
-
|
|
47
|
+
/^(@[\w-]+):fl-text-(\w+)\/(\w+)$/
|
|
58
48
|
);
|
|
59
49
|
if (fluidWithModifier) {
|
|
60
50
|
const [, modifier, startSize, endSize] = fluidWithModifier;
|
|
61
|
-
const baseFluid =
|
|
51
|
+
const baseFluid = `fl-text-${startSize}/${endSize}`;
|
|
62
52
|
return [className, baseFluid];
|
|
63
53
|
}
|
|
64
54
|
return [className];
|
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 { extendTailwindMerge, mergeConfigs } from \"tailwind-merge\";\n\n/**\n * Fluid-tailwind support for tailwind-merge.\n * Adapted from @fluid-tailwind/tailwind-merge source code.\n *\n * **How it works:**\n * 1. Fluid classes with modifiers (e.g.,
|
|
5
|
-
"mappings": "AAAA,SAA0B,YAAY;AACtC,SAAS,qBAAqB,oBAAoB;AA4BlD,MAAM,kBAAkB,CAAC,cAA+B;AAEtD,QAAM,eAAe;AACrB,QAAM,QAAQ,UAAU,MAAM,YAAY;AAE1C,MAAI,CAAC,OAAO;AACV,WAAO;AAAA,EACT;AAEA,QAAM,CAAC,EAAE,WAAW,OAAO,IAAI;AAC/B,QAAM,aAAa;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SAAO,WAAW,SAAS,SAAS,KAAK,WAAW,SAAS,OAAO;AACtE;AAKA,MAAM,gBAAgB,oBAAoB,CAAC,WAAW;AACpD,SAAO,aAAa,QAAQ;AAAA,IAC1B,QAAQ;AAAA,MACN,aAAa;AAAA;AAAA;AAAA,QAGX,aAAa,CAAC,eAAe;AAAA,MAC/B;AAAA,IACF;AAAA;AAAA;AAAA
|
|
4
|
+
"sourcesContent": ["import { type ClassValue, clsx } from \"clsx\";\nimport { extendTailwindMerge, mergeConfigs } from \"tailwind-merge\";\n\n/**\n * Fluid-tailwind support for tailwind-merge.\n * Adapted from @fluid-tailwind/tailwind-merge source code.\n *\n * **How it works:**\n * 1. Fluid classes with modifiers (e.g., `@md:fl-text-2xl/3xl`) are expanded\n * to include both the modified and base versions\n * 2. This ensures they conflict at multiple modifier levels:\n * - `@md:fl-text-2xl/3xl` conflicts with `@md:text-5xl` (responsive)\n * - `@md:fl-text-2xl/3xl` conflicts with `text-4xl` (base)\n * 3. Simple fluid classes (e.g., `fl-text-2xl/3xl`) conflict with `text-4xl`\n *\n * **Supported patterns:**\n * - `fl-text-4xl/5xl` conflicts with `text-4xl` \u2713\n * - `@md:fl-text-4xl/5xl` conflicts with BOTH `@md:text-5xl` AND `text-4xl` \u2713\n * - Fluid text sizing with any container query breakpoint \u2713\n *\n * This implementation ensures that passing a fluid className overrides all\n * related text sizing classes, as expected in a component library.\n */\n\n/**\n * Validator for fluid text sizes with `/` separator.\n * This matches the full className including prefix and postfix.\n * Tailwind-merge class groups can receive full className for top-level validators.\n */\nconst isFluidTextSize = (classPart: string): boolean => {\n // Match full fluid class patterns: fl-text-X/Y\n const fluidPattern = /^fl-text-([a-z0-9]+)\\/([a-z0-9]+)$/;\n const match = classPart.match(fluidPattern);\n\n if (!match) {\n return false;\n }\n\n const [, startSize, endSize] = match;\n const validSizes = [\n \"xs\",\n \"sm\",\n \"base\",\n \"lg\",\n \"xl\",\n \"2xl\",\n \"3xl\",\n \"4xl\",\n \"5xl\",\n \"6xl\",\n \"7xl\",\n \"8xl\",\n \"9xl\",\n ];\n\n return validSizes.includes(startSize) && validSizes.includes(endSize);\n};\n\n/**\n * Custom tailwind-merge with fluid text size support.\n */\nconst customTwMerge = extendTailwindMerge((config) => {\n return mergeConfigs(config, {\n extend: {\n classGroups: {\n // Extend font-size class group to support fluid syntax\n // Top-level validator receives the full className (e.g., \"fl-text-2xl/3xl\")\n \"font-size\": [isFluidTextSize],\n },\n },\n // Parse className to extract modifiers and base class name\n // For @md:fl-text-4xl/5xl \u2192 modifiers:[@md], baseClassName:fl-text-4xl/5xl\n experimentalParseClassName: ({ className, parseClassName }) => {\n return parseClassName(className);\n },\n });\n});\n\n/**\n * Merge Tailwind CSS classes with clsx and tailwind-merge.\n * Supports both standard Tailwind classes and fluid-tailwind text sizing.\n * This ensures proper handling of conflicting classes.\n *\n * Fluid classes are expanded to conflict at multiple modifier levels:\n * - `@md:fl-text-2xl/3xl` conflicts with BOTH `@md:text-5xl` AND `text-4xl`\n * - This ensures fluid classes override all related text sizing\n */\nexport function cn(...inputs: ClassValue[]) {\n const classList = clsx(inputs);\n\n // Expand fluid classes to conflict at multiple modifier levels\n const expanded = classList.split(\" \").flatMap((className) => {\n // Match fluid classes with modifiers: @md:fl-text-2xl/3xl\n const fluidWithModifier = className.match(\n /^(@[\\w-]+):fl-text-(\\w+)\\/(\\w+)$/\n );\n if (fluidWithModifier) {\n const [, modifier, startSize, endSize] = fluidWithModifier;\n const baseFluid = `fl-text-${startSize}/${endSize}`;\n // Return both the modified version and base version\n // This makes it conflict with both @md:text-* and text-*\n return [className, baseFluid];\n }\n\n return [className];\n });\n\n return customTwMerge(expanded.join(\" \"));\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAA0B,YAAY;AACtC,SAAS,qBAAqB,oBAAoB;AA4BlD,MAAM,kB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
|
+
/**
|
|
2
|
+
* Cadence Design System - Styles Entry Point
|
|
3
|
+
*
|
|
4
|
+
* Main stylesheet for Cadence. Import after the Tailwind config.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* // app.css
|
|
8
|
+
* @import "tailwindcss";
|
|
9
|
+
* @import "@music-vine/cadence/tailwind.config";
|
|
10
|
+
* @import "@music-vine/cadence/styles";
|
|
11
|
+
*
|
|
12
|
+
* @source "./src/**\/*.{js,ts,jsx,tsx}";
|
|
13
|
+
*/
|
|
4
14
|
|
|
15
|
+
/* ================================
|
|
16
|
+
Base Layer - CSS Variables
|
|
17
|
+
================================ */
|
|
5
18
|
@layer base {
|
|
6
19
|
:root {
|
|
7
20
|
/* Brand Colors - Themeable */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/test/setup.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Theme
|
|
3
|
+
*
|
|
4
|
+
* Theme customization utilities for Cadence Design System.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* // Basic usage
|
|
8
|
+
* import { createTheme } from '@music-vine/cadence/theme';
|
|
9
|
+
*
|
|
10
|
+
* const customTheme = createTheme({
|
|
11
|
+
* brand: {
|
|
12
|
+
* primary: '#FF6B6B',
|
|
13
|
+
* accent: '#4ECDC4',
|
|
14
|
+
* }
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* // Apply to root or specific container
|
|
18
|
+
* <div className={customTheme}>
|
|
19
|
+
* <Button>Themed Button</Button>
|
|
20
|
+
* </div>
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // Complete customization
|
|
24
|
+
* const theme = createTheme({
|
|
25
|
+
* brand: {
|
|
26
|
+
* primary: '#FF6B6B',
|
|
27
|
+
* accent: '#4ECDC4',
|
|
28
|
+
* },
|
|
29
|
+
* colors: {
|
|
30
|
+
* success: '#51CF66',
|
|
31
|
+
* error: '#FF6B6B',
|
|
32
|
+
* warning: '#FFD93D',
|
|
33
|
+
* info: '#74C0FC',
|
|
34
|
+
* },
|
|
35
|
+
* radius: 'lg',
|
|
36
|
+
* fonts: {
|
|
37
|
+
* sans: 'Inter, system-ui, sans-serif',
|
|
38
|
+
* heading: 'Poppins, system-ui, sans-serif',
|
|
39
|
+
* },
|
|
40
|
+
* });
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* Configuration for brand colors
|
|
44
|
+
*/
|
|
45
|
+
export interface BrandColors {
|
|
46
|
+
/** Accent/hover color for primary brand interactions */
|
|
47
|
+
accent?: string;
|
|
48
|
+
/** Primary brand color (used for primary buttons, links, focus rings) */
|
|
49
|
+
primary?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Configuration for status/semantic colors
|
|
53
|
+
*/
|
|
54
|
+
export interface StatusColors {
|
|
55
|
+
/** Error state color */
|
|
56
|
+
error?: string;
|
|
57
|
+
/** Info state color */
|
|
58
|
+
info?: string;
|
|
59
|
+
/** Success state color */
|
|
60
|
+
success?: string;
|
|
61
|
+
/** Warning state color */
|
|
62
|
+
warning?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Configuration for font families
|
|
66
|
+
*/
|
|
67
|
+
export interface FontConfig {
|
|
68
|
+
/** Font family for headings */
|
|
69
|
+
heading?: string;
|
|
70
|
+
/** Sans-serif font family for body text */
|
|
71
|
+
sans?: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Border radius presets
|
|
75
|
+
*/
|
|
76
|
+
export type RadiusPreset = "none" | "sm" | "md" | "lg" | "xl";
|
|
77
|
+
/**
|
|
78
|
+
* Complete theme configuration
|
|
79
|
+
*/
|
|
80
|
+
export interface ThemeConfig {
|
|
81
|
+
/** Brand color overrides */
|
|
82
|
+
brand?: BrandColors;
|
|
83
|
+
/** Status color overrides */
|
|
84
|
+
colors?: StatusColors;
|
|
85
|
+
/** Font family overrides */
|
|
86
|
+
fonts?: FontConfig;
|
|
87
|
+
/** Border radius preset */
|
|
88
|
+
radius?: RadiusPreset;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Creates a custom theme by generating CSS variables based on the provided configuration.
|
|
92
|
+
* Returns a className that can be applied to any container element.
|
|
93
|
+
*
|
|
94
|
+
* @param config - Theme configuration object
|
|
95
|
+
* @returns CSS class name to apply to container
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* const theme = createTheme({
|
|
99
|
+
* brand: { primary: '#FF6B6B' }
|
|
100
|
+
* });
|
|
101
|
+
*
|
|
102
|
+
* <div className={theme}>
|
|
103
|
+
* <Button variant="brand">Custom Themed Button</Button>
|
|
104
|
+
* </div>
|
|
105
|
+
*/
|
|
106
|
+
export declare function createTheme(config?: ThemeConfig): string;
|
|
107
|
+
/**
|
|
108
|
+
* Type guard to check if a string is a valid hex color
|
|
109
|
+
*/
|
|
110
|
+
export declare function isValidHexColor(color: string): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Pre-configured theme presets for common use cases
|
|
113
|
+
*/
|
|
114
|
+
export declare const themePresets: {
|
|
115
|
+
/**
|
|
116
|
+
* Default Uppbeat theme (pink brand color)
|
|
117
|
+
*/
|
|
118
|
+
uppbeat: {
|
|
119
|
+
brand: {
|
|
120
|
+
primary: string;
|
|
121
|
+
accent: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Music Vine theme (coral pink brand color)
|
|
126
|
+
*/
|
|
127
|
+
musicVine: {
|
|
128
|
+
brand: {
|
|
129
|
+
primary: string;
|
|
130
|
+
accent: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Helper to create a theme from a preset
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* const theme = createThemeFromPreset('ocean');
|
|
139
|
+
* <div className={theme}>...</div>
|
|
140
|
+
*/
|
|
141
|
+
export declare function createThemeFromPreset(preset: keyof typeof themePresets): string;
|
|
142
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,4BAA4B;IAC5B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,2BAA2B;IAC3B,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAoDD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,MAAM,GAAE,WAAgB,GAAG,MAAM,CAqF5D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;IACvB;;OAEG;;;;;;;IAQH;;OAEG;;;;;;;CAOkC,CAAC;AAExC;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,OAAO,YAAY,GAChC,MAAM,CAER"}
|
package/dist/theme/index.js
CHANGED
|
@@ -36,7 +36,7 @@ function darkenColor(hex, percent = 20) {
|
|
|
36
36
|
return `#${(r << 16 | g << 8 | b).toString(16).padStart(6, "0")}`;
|
|
37
37
|
}
|
|
38
38
|
function createTheme(config = {}) {
|
|
39
|
-
const themeId = `cadence-theme-${Math.random().toString(36).
|
|
39
|
+
const themeId = `cadence-theme-${Math.random().toString(36).slice(2, 11)}`;
|
|
40
40
|
const cssVariables = [];
|
|
41
41
|
if (config.brand?.primary) {
|
|
42
42
|
cssVariables.push(`--brand-primary: ${config.brand.primary};`);
|
package/dist/theme/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/theme/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @module Theme\n *\n * Theme customization utilities for Cadence Design System.\n *\n * @example\n * // Basic usage\n * import { createTheme } from '@music-vine/cadence/theme';\n *\n * const customTheme = createTheme({\n * brand: {\n * primary: '#FF6B6B',\n * accent: '#4ECDC4',\n * }\n * });\n *\n * // Apply to root or specific container\n * <div className={customTheme}>\n * <Button>Themed Button</Button>\n * </div>\n *\n * @example\n * // Complete customization\n * const theme = createTheme({\n * brand: {\n * primary: '#FF6B6B',\n * accent: '#4ECDC4',\n * },\n * colors: {\n * success: '#51CF66',\n * error: '#FF6B6B',\n * warning: '#FFD93D',\n * info: '#74C0FC',\n * },\n * radius: 'lg',\n * fonts: {\n * sans: 'Inter, system-ui, sans-serif',\n * heading: 'Poppins, system-ui, sans-serif',\n * },\n * });\n */\n\n/**\n * Configuration for brand colors\n */\nexport interface BrandColors {\n /**
|
|
5
|
-
"mappings": "AAkGA,MAAM,eAA6C;AAAA,EACjD,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAMA,SAAS,aAAa,KAAa,UAAU,IAAY;AACvD,QAAM,MAAM,OAAO,SAAS,IAAI,QAAQ,KAAK,EAAE,GAAG,EAAE;AACpD,QAAM,IAAI,KAAK;AAAA,IACb;AAAA,IACA,KAAK,OAAO,OAAO,OAAQ,OAAO,OAAO,OAAO,UAAW,GAAG;AAAA,EAChE;AACA,QAAM,IAAI,KAAK;AAAA,IACb;AAAA,IACA,KAAK;AAAA,OACD,OAAO,IAAK,QAAa,OAAQ,OAAO,IAAK,QAAY,UAAW;AAAA,IACxE;AAAA,EACF;AACA,QAAM,IAAI,KAAK;AAAA,IACb;AAAA,IACA,KAAK;AAAA,OACF,MAAM,QAAgB,OAAO,MAAM,QAAe,UAAW;AAAA,IAChE;AAAA,EACF;AACA,SAAO,KAAM,KAAK,KAAO,KAAK,IAAK,GAAG,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC;AACrE;AAKA,SAAS,YAAY,KAAa,UAAU,IAAY;AACtD,QAAM,MAAM,OAAO,SAAS,IAAI,QAAQ,KAAK,EAAE,GAAG,EAAE;AACpD,QAAM,IAAI,KAAK,IAAI,GAAG,KAAK,OAAO,OAAO,OAAO,IAAI,UAAU,IAAI,CAAC;AACnE,QAAM,IAAI,KAAK;AAAA,IACb;AAAA,IACA,KAAK,OAAQ,OAAO,IAAK,QAAY,IAAI,UAAU,IAAI;AAAA,EACzD;AACA,QAAM,IAAI,KAAK,IAAI,GAAG,KAAK,OAAO,MAAM,QAAe,IAAI,UAAU,IAAI,CAAC;AAC1E,SAAO,KAAM,KAAK,KAAO,KAAK,IAAK,GAAG,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC;AACrE;AAkBO,SAAS,YAAY,SAAsB,CAAC,GAAW;AAC5D,QAAM,UAAU,iBAAiB,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,
|
|
4
|
+
"sourcesContent": ["/**\n * @module Theme\n *\n * Theme customization utilities for Cadence Design System.\n *\n * @example\n * // Basic usage\n * import { createTheme } from '@music-vine/cadence/theme';\n *\n * const customTheme = createTheme({\n * brand: {\n * primary: '#FF6B6B',\n * accent: '#4ECDC4',\n * }\n * });\n *\n * // Apply to root or specific container\n * <div className={customTheme}>\n * <Button>Themed Button</Button>\n * </div>\n *\n * @example\n * // Complete customization\n * const theme = createTheme({\n * brand: {\n * primary: '#FF6B6B',\n * accent: '#4ECDC4',\n * },\n * colors: {\n * success: '#51CF66',\n * error: '#FF6B6B',\n * warning: '#FFD93D',\n * info: '#74C0FC',\n * },\n * radius: 'lg',\n * fonts: {\n * sans: 'Inter, system-ui, sans-serif',\n * heading: 'Poppins, system-ui, sans-serif',\n * },\n * });\n */\n\n/**\n * Configuration for brand colors\n */\nexport interface BrandColors {\n /** Accent/hover color for primary brand interactions */\n accent?: string;\n /** Primary brand color (used for primary buttons, links, focus rings) */\n primary?: string;\n}\n\n/**\n * Configuration for status/semantic colors\n */\nexport interface StatusColors {\n /** Error state color */\n error?: string;\n /** Info state color */\n info?: string;\n /** Success state color */\n success?: string;\n /** Warning state color */\n warning?: string;\n}\n\n/**\n * Configuration for font families\n */\nexport interface FontConfig {\n /** Font family for headings */\n heading?: string;\n /** Sans-serif font family for body text */\n sans?: string;\n}\n\n/**\n * Border radius presets\n */\nexport type RadiusPreset = \"none\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n\n/**\n * Complete theme configuration\n */\nexport interface ThemeConfig {\n /** Brand color overrides */\n brand?: BrandColors;\n /** Status color overrides */\n colors?: StatusColors;\n /** Font family overrides */\n fonts?: FontConfig;\n /** Border radius preset */\n radius?: RadiusPreset;\n}\n\n/**\n * Border radius values mapped to CSS values\n */\nconst radiusValues: Record<RadiusPreset, string> = {\n none: \"0px\",\n sm: \"4px\",\n md: \"8px\",\n lg: \"12px\",\n xl: \"16px\",\n};\n\n/**\n * Generates a lightened version of a hex color\n * Simple implementation - for production, consider using a color manipulation library\n */\nfunction lightenColor(hex: string, percent = 20): string {\n const num = Number.parseInt(hex.replace(\"#\", \"\"), 16);\n const r = Math.min(\n 255,\n Math.floor((num >> 16) + ((255 - (num >> 16)) * percent) / 100)\n );\n const g = Math.min(\n 255,\n Math.floor(\n ((num >> 8) & 0x00_ff) + ((255 - ((num >> 8) & 0x00_ff)) * percent) / 100\n )\n );\n const b = Math.min(\n 255,\n Math.floor(\n (num & 0x00_00_ff) + ((255 - (num & 0x00_00_ff)) * percent) / 100\n )\n );\n return `#${((r << 16) | (g << 8) | b).toString(16).padStart(6, \"0\")}`;\n}\n\n/**\n * Generates a darkened version of a hex color\n */\nfunction darkenColor(hex: string, percent = 20): string {\n const num = Number.parseInt(hex.replace(\"#\", \"\"), 16);\n const r = Math.max(0, Math.floor((num >> 16) * (1 - percent / 100)));\n const g = Math.max(\n 0,\n Math.floor(((num >> 8) & 0x00_ff) * (1 - percent / 100))\n );\n const b = Math.max(0, Math.floor((num & 0x00_00_ff) * (1 - percent / 100)));\n return `#${((r << 16) | (g << 8) | b).toString(16).padStart(6, \"0\")}`;\n}\n\n/**\n * Creates a custom theme by generating CSS variables based on the provided configuration.\n * Returns a className that can be applied to any container element.\n *\n * @param config - Theme configuration object\n * @returns CSS class name to apply to container\n *\n * @example\n * const theme = createTheme({\n * brand: { primary: '#FF6B6B' }\n * });\n *\n * <div className={theme}>\n * <Button variant=\"brand\">Custom Themed Button</Button>\n * </div>\n */\nexport function createTheme(config: ThemeConfig = {}): string {\n const themeId = `cadence-theme-${Math.random().toString(36).slice(2, 11)}`;\n const cssVariables: string[] = [];\n\n // Brand colors\n if (config.brand?.primary) {\n cssVariables.push(`--brand-primary: ${config.brand.primary};`);\n cssVariables.push(\n `--brand-primary-hover: ${config.brand.accent || darkenColor(config.brand.primary, 15)};`\n );\n cssVariables.push(\n `--brand-primary-active: ${darkenColor(config.brand.primary, 25)};`\n );\n cssVariables.push(\n `--brand-secondary: ${lightenColor(config.brand.primary, 40)};`\n );\n cssVariables.push(\n `--brand-secondary-hover: ${lightenColor(config.brand.primary, 30)};`\n );\n cssVariables.push(`--text-brand: ${config.brand.primary};`);\n cssVariables.push(`--border-brand: ${config.brand.primary};`);\n cssVariables.push(`--focus-ring: ${config.brand.primary};`);\n }\n\n if (config.brand?.accent) {\n cssVariables.push(`--brand-primary-hover: ${config.brand.accent};`);\n }\n\n // Status colors\n if (config.colors?.success) {\n cssVariables.push(`--success: ${config.colors.success};`);\n cssVariables.push(\n `--success-dark: ${darkenColor(config.colors.success, 15)};`\n );\n }\n\n if (config.colors?.error) {\n cssVariables.push(`--error: ${config.colors.error};`);\n cssVariables.push(`--error-dark: ${darkenColor(config.colors.error, 15)};`);\n }\n\n if (config.colors?.warning) {\n cssVariables.push(`--warning: ${config.colors.warning};`);\n }\n\n if (config.colors?.info) {\n cssVariables.push(`--info: ${config.colors.info};`);\n }\n\n // Border radius\n if (config.radius) {\n const radiusValue = radiusValues[config.radius];\n cssVariables.push(`--radius-default: ${radiusValue};`);\n cssVariables.push(`--radius-sm: ${Number.parseInt(radiusValue) / 2}px;`);\n cssVariables.push(`--radius-lg: ${Number.parseInt(radiusValue) * 1.5}px;`);\n }\n\n // Font families\n if (config.fonts?.sans) {\n cssVariables.push(`--font-sans: ${config.fonts.sans};`);\n }\n\n if (config.fonts?.heading) {\n cssVariables.push(`--font-heading: ${config.fonts.heading};`);\n }\n\n // Inject styles into document head\n if (typeof document !== \"undefined\") {\n const styleId = `${themeId}-styles`;\n let styleElement = document.getElementById(styleId) as HTMLStyleElement;\n\n if (!styleElement) {\n styleElement = document.createElement(\"style\");\n styleElement.id = styleId;\n document.head.appendChild(styleElement);\n }\n\n styleElement.textContent = `\n .${themeId} {\n ${cssVariables.join(\"\\n \")}\n }\n `;\n }\n\n return themeId;\n}\n\n/**\n * Type guard to check if a string is a valid hex color\n */\nexport function isValidHexColor(color: string): boolean {\n return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(color);\n}\n\n/**\n * Pre-configured theme presets for common use cases\n */\nexport const themePresets = {\n /**\n * Default Uppbeat theme (pink brand color)\n */\n uppbeat: {\n brand: {\n primary: \"#F23D75\",\n accent: \"#DF1F64\",\n },\n },\n\n /**\n * Music Vine theme (coral pink brand color)\n */\n musicVine: {\n brand: {\n primary: \"#FF5F6E\",\n accent: \"#671920\",\n },\n },\n} satisfies Record<string, ThemeConfig>;\n\n/**\n * Helper to create a theme from a preset\n *\n * @example\n * const theme = createThemeFromPreset('ocean');\n * <div className={theme}>...</div>\n */\nexport function createThemeFromPreset(\n preset: keyof typeof themePresets\n): string {\n return createTheme(themePresets[preset]);\n}\n"],
|
|
5
|
+
"mappings": "AAkGA,MAAM,eAA6C;AAAA,EACjD,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAMA,SAAS,aAAa,KAAa,UAAU,IAAY;AACvD,QAAM,MAAM,OAAO,SAAS,IAAI,QAAQ,KAAK,EAAE,GAAG,EAAE;AACpD,QAAM,IAAI,KAAK;AAAA,IACb;AAAA,IACA,KAAK,OAAO,OAAO,OAAQ,OAAO,OAAO,OAAO,UAAW,GAAG;AAAA,EAChE;AACA,QAAM,IAAI,KAAK;AAAA,IACb;AAAA,IACA,KAAK;AAAA,OACD,OAAO,IAAK,QAAa,OAAQ,OAAO,IAAK,QAAY,UAAW;AAAA,IACxE;AAAA,EACF;AACA,QAAM,IAAI,KAAK;AAAA,IACb;AAAA,IACA,KAAK;AAAA,OACF,MAAM,QAAgB,OAAO,MAAM,QAAe,UAAW;AAAA,IAChE;AAAA,EACF;AACA,SAAO,KAAM,KAAK,KAAO,KAAK,IAAK,GA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cAAc,OAAO;AAC7C,mBAAa,KAAK;AAClB,eAAS,KAAK,YAAY,YAAY;AAAA,IACxC;AAEA,iBAAa,cAAc;AAAA,SACtB,OAAO;AAAA,UACN,aAAa,KAAK,YAAY,CAAC;AAAA;AAAA;AAAA,EAGvC;AAEA,SAAO;AACT;AAKO,SAAS,gBAAgB,OAAwB;AACtD,SAAO,qCAAqC,KAAK,KAAK;AACxD;AAKO,MAAM,eAAe;AAAA;AAAA;AAAA;AAAA,EAI1B,SAAS;AAAA,IACP,OAAO;AAAA,MACL,SAAS;AAAA,MACT,QAAQ;AAAA,IACV;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,WAAW;AAAA,IACT,OAAO;AAAA,MACL,SAAS;AAAA,MACT,QAAQ;AAAA,IACV;AAAA,EACF;AACF;AASO,SAAS,sBACd,QACQ;AACR,SAAO,YAAY,aAAa,MAAM,CAAC;AACzC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@music-vine/cadence",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -17,9 +17,6 @@
|
|
|
17
17
|
],
|
|
18
18
|
"theme": [
|
|
19
19
|
"./dist/theme/index.d.ts"
|
|
20
|
-
],
|
|
21
|
-
"tailwind.config": [
|
|
22
|
-
"./tailwind.config.ts"
|
|
23
20
|
]
|
|
24
21
|
}
|
|
25
22
|
},
|
|
@@ -45,14 +42,11 @@
|
|
|
45
42
|
"types": "./dist/theme/index.d.ts"
|
|
46
43
|
},
|
|
47
44
|
"./styles": "./dist/styles/index.css",
|
|
48
|
-
"./
|
|
49
|
-
"./tailwind.config": "./tailwind.config.ts",
|
|
50
|
-
"./tailwind.config.v4": "./tailwind.config.v4.css"
|
|
45
|
+
"./tailwind.config": "./tailwind.config.css"
|
|
51
46
|
},
|
|
52
47
|
"files": [
|
|
53
48
|
"dist",
|
|
54
|
-
"tailwind.config.
|
|
55
|
-
"tailwind.config.v4.css"
|
|
49
|
+
"tailwind.config.css"
|
|
56
50
|
],
|
|
57
51
|
"repository": {
|
|
58
52
|
"type": "git",
|
|
@@ -110,6 +104,7 @@
|
|
|
110
104
|
"vaul": "^1.1.2"
|
|
111
105
|
},
|
|
112
106
|
"devDependencies": {
|
|
107
|
+
"@biomejs/biome": "^2.3.3",
|
|
113
108
|
"@playwright/test": "^1.58.2",
|
|
114
109
|
"@storybook/addon-a11y": "^10.1.11",
|
|
115
110
|
"@storybook/addon-docs": "^10.1.11",
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Cadence Design System - Tailwind CSS
|
|
2
|
+
* Cadence Design System - Tailwind CSS Configuration
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* Use this instead of tailwind.config.ts when using Tailwind v4.
|
|
4
|
+
* CSS-first configuration for Tailwind CSS v4+.
|
|
6
5
|
*
|
|
7
6
|
* @example
|
|
8
7
|
* // app.css
|
|
9
8
|
* @import "tailwindcss";
|
|
10
|
-
* @import "@music-vine/cadence/tailwind.config
|
|
11
|
-
* @import "@music-vine/cadence/styles
|
|
9
|
+
* @import "@music-vine/cadence/tailwind.config";
|
|
10
|
+
* @import "@music-vine/cadence/styles";
|
|
12
11
|
*
|
|
13
12
|
* @source "./src/**\/*.{js,ts,jsx,tsx}";
|
|
14
13
|
*/
|
|
15
14
|
|
|
15
|
+
/* ================================
|
|
16
|
+
Plugins
|
|
17
|
+
================================ */
|
|
18
|
+
@plugin "tailwindcss-animate";
|
|
19
|
+
|
|
16
20
|
/* ================================
|
|
17
21
|
Dark Mode Configuration
|
|
18
22
|
================================ */
|
|
@@ -32,20 +36,24 @@
|
|
|
32
36
|
--breakpoint-3xl: 125rem; /* 2000px */
|
|
33
37
|
|
|
34
38
|
/* ================================
|
|
35
|
-
|
|
39
|
+
Container Query Breakpoints
|
|
40
|
+
(matches @tailwindcss/container-queries v3 plugin defaults)
|
|
36
41
|
================================ */
|
|
37
|
-
--
|
|
38
|
-
--
|
|
39
|
-
--
|
|
40
|
-
--
|
|
41
|
-
--
|
|
42
|
+
--container-xs: 20rem; /* 320px */
|
|
43
|
+
--container-sm: 24rem; /* 384px */
|
|
44
|
+
--container-md: 28rem; /* 448px */
|
|
45
|
+
--container-lg: 32rem; /* 512px */
|
|
46
|
+
--container-xl: 36rem; /* 576px */
|
|
47
|
+
--container-2xl: 42rem; /* 672px */
|
|
48
|
+
--container-3xl: 48rem; /* 768px */
|
|
49
|
+
--container-4xl: 56rem; /* 896px */
|
|
50
|
+
--container-5xl: 64rem; /* 1024px */
|
|
51
|
+
--container-6xl: 72rem; /* 1152px */
|
|
52
|
+
--container-7xl: 80rem; /* 1280px */
|
|
42
53
|
|
|
43
54
|
/* ================================
|
|
44
55
|
Base Colors
|
|
45
56
|
================================ */
|
|
46
|
-
--color-inherit: inherit;
|
|
47
|
-
--color-current: currentColor;
|
|
48
|
-
--color-transparent: transparent;
|
|
49
57
|
--color-black: #151A20;
|
|
50
58
|
--color-white: #FFF;
|
|
51
59
|
|
|
@@ -257,6 +265,19 @@
|
|
|
257
265
|
--animate-slide-up-and-fade: slideUpAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
258
266
|
}
|
|
259
267
|
|
|
268
|
+
/* ================================
|
|
269
|
+
Brand Colors (Themeable via CSS custom properties)
|
|
270
|
+
Uses @theme inline so var() references are inlined directly into
|
|
271
|
+
utility declarations instead of being resolved at build time.
|
|
272
|
+
================================ */
|
|
273
|
+
@theme inline {
|
|
274
|
+
--color-brand-primary: var(--brand-primary, #F23D75);
|
|
275
|
+
--color-brand-primary-hover: var(--brand-primary-hover, #DF1F64);
|
|
276
|
+
--color-brand-primary-active: var(--brand-primary-active, #BC1454);
|
|
277
|
+
--color-brand-secondary: var(--brand-secondary, #FFF1F4);
|
|
278
|
+
--color-brand-secondary-hover: var(--brand-secondary-hover, #FFE4EA);
|
|
279
|
+
}
|
|
280
|
+
|
|
260
281
|
/* ================================
|
|
261
282
|
Keyframe Animations
|
|
262
283
|
================================ */
|
package/dist/styles/index.v4.css
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cadence Design System - Tailwind CSS v4 Entry Point
|
|
3
|
-
*
|
|
4
|
-
* This is the main stylesheet for Cadence when using Tailwind CSS v4.
|
|
5
|
-
* Import this in your application after importing the Tailwind v4 config.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* // app.css
|
|
9
|
-
* @import "tailwindcss";
|
|
10
|
-
* @import "@music-vine/cadence/tailwind.config.v4";
|
|
11
|
-
* @import "@music-vine/cadence/styles.v4";
|
|
12
|
-
*
|
|
13
|
-
* @source "./src/**\/*.{js,ts,jsx,tsx}";
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/* ================================
|
|
17
|
-
Base Layer - CSS Variables
|
|
18
|
-
================================ */
|
|
19
|
-
@layer base {
|
|
20
|
-
:root {
|
|
21
|
-
/* Brand Colors - Themeable */
|
|
22
|
-
--brand-primary: #f23d75;
|
|
23
|
-
--brand-primary-hover: #df1f64;
|
|
24
|
-
--brand-primary-active: #bc1454;
|
|
25
|
-
--brand-secondary: #fff1f4;
|
|
26
|
-
--brand-secondary-hover: #ffe4ea;
|
|
27
|
-
--background: #fff;
|
|
28
|
-
--foreground: #151a20;
|
|
29
|
-
|
|
30
|
-
/* Focus Ring - Follows brand color */
|
|
31
|
-
--focus-ring: var(--brand-primary);
|
|
32
|
-
--focus-ring-offset: var(--background);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.theme-dark {
|
|
36
|
-
/* Brand Colors (same in dark mode) */
|
|
37
|
-
--brand-primary: #f23d75;
|
|
38
|
-
--brand-primary-hover: #df1f64;
|
|
39
|
-
--brand-primary-active: #bc1454;
|
|
40
|
-
--brand-secondary: #461f34;
|
|
41
|
-
--brand-secondary-hover: #5f152e;
|
|
42
|
-
--background: #151a20;
|
|
43
|
-
--foreground: #fff;
|
|
44
|
-
|
|
45
|
-
/* Focus Ring - Follows brand color */
|
|
46
|
-
--focus-ring: var(--brand-primary);
|
|
47
|
-
--focus-ring-offset: var(--background);
|
|
48
|
-
}
|
|
49
|
-
}
|