medusa-storefront-theme-base 1.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/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "medusa-storefront-theme-base",
3
+ "version": "1.1.0",
4
+ "description": "Default Tailwind preset and className maps for Medusa storefront UI packages.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "files": [
11
+ "src",
12
+ "tailwind.preset.cjs"
13
+ ],
14
+ "exports": {
15
+ ".": {
16
+ "types": "./src/index.ts",
17
+ "import": "./src/index.ts",
18
+ "default": "./src/index.ts"
19
+ },
20
+ "./tailwind": {
21
+ "require": "./tailwind.preset.cjs",
22
+ "default": "./tailwind.preset.cjs"
23
+ }
24
+ },
25
+ "scripts": {
26
+ "build": "tsc --noEmit",
27
+ "clean": "true"
28
+ },
29
+ "peerDependencies": {
30
+ "tailwindcss": "^3.0.0",
31
+ "@medusajs/ui-preset": "*"
32
+ }
33
+ }
package/src/index.ts ADDED
@@ -0,0 +1,65 @@
1
+ /** Default className maps for headless UI slots (override per site). */
2
+ export const themeClassNames = {
3
+ productCard: {
4
+ root: "group flex flex-col",
5
+ title: "text-base font-medium text-ui-fg-base",
6
+ price: "text-sm text-ui-fg-subtle",
7
+ },
8
+ nav: {
9
+ root: "flex items-center gap-6",
10
+ },
11
+ notFound: {
12
+ root: "flex flex-col gap-4 items-center justify-center min-h-[calc(100vh-64px)]",
13
+ title: "text-2xl-semi text-ui-fg-base",
14
+ description: "text-small-regular text-ui-fg-base",
15
+ },
16
+ layout: {
17
+ body: "",
18
+ rootMain: "relative",
19
+ main: "min-h-screen w-full",
20
+ checkoutShell: "w-full relative min-h-screen",
21
+ checkoutContainer: "relative",
22
+ },
23
+ home: {
24
+ pageRoot: "w-full",
25
+ },
26
+ pages: {
27
+ checkout: {
28
+ shell:
29
+ "w-full max-w-[1360px] mx-auto px-3 min-[550px]:px-4 sm:px-6 md:px-8 min-[1023px]:px-4 min-[1150px]:px-6 min-[1360px]:px-8 py-4 min-[550px]:py-6 sm:py-8 md:py-12 min-[1023px]:py-10 min-[1150px]:py-12 min-[1360px]:py-12",
30
+ grid:
31
+ "grid grid-cols-1 min-[1024px]:grid-cols-[1fr_416px] gap-4 min-[550px]:gap-5 sm:gap-6 md:gap-8 min-[768px]:gap-6 min-[1023px]:gap-4 min-[1150px]:gap-6 min-[1200px]:gap-10 min-[1360px]:gap-12 w-full items-start",
32
+ leftColumn: "w-full min-[1024px]:sticky min-[1024px]:top-20",
33
+ rightColumn: "w-full min-[1024px]:sticky min-[1024px]:top-20",
34
+ paymentWrapper: "w-full grid grid-cols-1 gap-y-6 min-[550px]:gap-y-8",
35
+ backLinkContainer: "mb-4 min-[550px]:mb-6",
36
+ },
37
+ pageWrappers: {
38
+ legal: "min-h-screen bg-ui-bg-base pb-16 sm:pb-24",
39
+ resetPassword:
40
+ "min-h-screen flex items-center justify-center bg-ui-bg-subtle px-4",
41
+ returnRequest: "min-h-screen bg-ui-bg-base",
42
+ exchangeRequest: "min-h-screen bg-ui-bg-base",
43
+ },
44
+ returnIneligible: {
45
+ wrapper: "max-w-4xl mx-auto py-16 px-4 text-center",
46
+ title: "text-2xl font-bold mb-4 text-ui-fg-base",
47
+ description: "text-ui-fg-subtle mb-8",
48
+ backLink: "text-ui-fg-interactive hover:underline text-lg font-medium",
49
+ },
50
+ },
51
+ } as const;
52
+
53
+ export type ThemeClassNames = typeof themeClassNames;
54
+
55
+ export type NotFoundThemeClassNames = {
56
+ [K in keyof typeof themeClassNames.notFound]: string;
57
+ };
58
+
59
+ export type LayoutThemeClassNames = {
60
+ [K in keyof typeof themeClassNames.layout]: string;
61
+ };
62
+
63
+ export type HomeThemeClassNames = typeof themeClassNames.home;
64
+
65
+ export type PagesThemeClassNames = typeof themeClassNames.pages;
@@ -0,0 +1,14 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ presets: [require("@medusajs/ui-preset")],
4
+ theme: {
5
+ extend: {
6
+ colors: {
7
+ brand: {
8
+ DEFAULT: "rgb(var(--color-brand) / <alpha-value>)",
9
+ foreground: "rgb(var(--color-brand-fg) / <alpha-value>)",
10
+ },
11
+ },
12
+ },
13
+ },
14
+ };