@blenx-dev/theme 0.0.1 → 0.0.3

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,40 +1,33 @@
1
1
  {
2
2
  "name": "@blenx-dev/theme",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
- "sideEffects": false,
6
- "files": [
7
- "**/*"
8
- ],
9
5
  "publishConfig": {
10
6
  "access": "public"
11
7
  },
8
+ "sideEffects": [
9
+ "./theme.css"
10
+ ],
12
11
  "exports": {
12
+ ".": {
13
+ "types": "./index.d.ts",
14
+ "import": "./index.js"
15
+ },
13
16
  "./contract": {
14
17
  "types": "./contract.css.d.ts",
15
- "import": "./contract.css.js"
18
+ "import": "./contract.js"
16
19
  },
17
20
  "./tokens": {
18
21
  "types": "./tokens.css.d.ts",
19
- "import": "./tokens.css.js"
22
+ "import": "./tokens.js"
20
23
  },
21
24
  "./light-theme": {
22
25
  "types": "./light-theme.css.d.ts",
23
- "import": "./light-theme.css.js"
24
- }
25
- },
26
- "scripts": {
27
- "build": "vite build"
26
+ "import": "./light-theme.js"
27
+ },
28
+ "./theme.css": "./theme.css"
28
29
  },
29
30
  "dependencies": {
30
31
  "@vanilla-extract/css": "^1.20.1"
31
- },
32
- "devDependencies": {
33
- "@blenx-dev/config": "0.0.0",
34
- "@vanilla-extract/vite-plugin": "^5.2.3",
35
- "tsup": "^8.5.1",
36
- "typescript": "^6",
37
- "vite": "^8.1.0",
38
- "vite-plugin-dts": "^5.0.3"
39
32
  }
40
33
  }
@@ -1 +0,0 @@
1
- $ tsc --noEmit
@@ -1,84 +0,0 @@
1
- import { createThemeContract, globalStyle } from "@vanilla-extract/css";
2
-
3
- export const themeContract = createThemeContract({
4
- primary: "primary",
5
- primarySubtle: "primary-subtle",
6
- secondary: "secondary",
7
- primaryHover: "primary-hover",
8
- contentPrimary: "content-primary",
9
- contentSecondary: "content-secondary",
10
- contentDisabled: "content-disabled",
11
- contentAccent: "content-accent",
12
- contentOnPrimary: "content-on-primary",
13
- surface: "surface",
14
- surfaceSubtle: "surface-subtle",
15
- surfaceRaised: "surface-raised",
16
- surfaceHover: "surface-hover",
17
- surfaceOverlay: "surface-overlay",
18
- border: "border",
19
- borderSubtle: "border-subtle",
20
- borderStrong: "border-strong",
21
- borderRadius: "border-radius",
22
- background: "background",
23
- backgroundSubtle: "background-subtle",
24
- sentimentPositive: "sentiment-positive",
25
- sentimentPositiveSubtle: "sentiment-positive-subtle",
26
- sentimentPositiveHover: "sentiment-positive-hover",
27
- sentimentWarning: "sentiment-warning",
28
- sentimentWarningSubtle: "sentiment-warning-subtle",
29
- sentimentWarningHover: "sentiment-warning-hover",
30
- sentimentNegative: "sentiment-negative",
31
- sentimentNegativeSubtle: "sentiment-negative-subtle",
32
- sentimentNegativeHover: "sentiment-negative-hover",
33
- sentimentInfo: "sentiment-info",
34
- sentimentInfoSubtle: "sentiment-info-subtle",
35
- sentimentInfoHover: "sentiment-info-hover",
36
- focusRing: "focus-ring",
37
- shadowSm: "shadow-sm",
38
- shadowMd: "shadow-md",
39
- shadowLg: "shadow-lg",
40
- shadowXl: "shadow-xl",
41
- fontSize: "font-size",
42
- hoverOverlay: "hover-overlay",
43
- hoverOverlaySoft: "hover-overlay-soft",
44
- });
45
-
46
- globalStyle("*", {
47
- margin: 0,
48
- padding: 0,
49
- boxSizing: "border-box",
50
- });
51
-
52
- globalStyle("*::before, *::after", {
53
- boxSizing: "border-box",
54
- });
55
- globalStyle("html, body", {
56
- margin: 0,
57
- padding: 0,
58
- minHeight: "100%",
59
- });
60
- globalStyle("body", {
61
- lineHeight: 1.5,
62
- WebkitFontSmoothing: "antialiased",
63
- MozOsxFontSmoothing: "grayscale",
64
- });
65
- globalStyle("h1, h2, h3, h4, h5, h6", {
66
- fontSize: "inherit",
67
- fontWeight: "inherit",
68
- });
69
- globalStyle("ul, ol", {
70
- margin: 0,
71
- padding: 0,
72
- });
73
- globalStyle("img, picture, video, canvas, svg", {
74
- display: "block",
75
- maxWidth: "100%",
76
- });
77
- globalStyle("button,a,input, textarea, select", {
78
- font: "inherit",
79
- color: "inherit",
80
- textDecoration: "none",
81
- });
82
- globalStyle("#root", {
83
- minHeight: "100vh",
84
- });
package/src/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from "./contract.css";
2
- export * from "./light-theme.css";
3
- export * from "./tokens.css";
@@ -1,106 +0,0 @@
1
- import { createTheme } from "@vanilla-extract/css";
2
- import { themeContract } from "./contract.css";
3
-
4
- export const [themeClass, themeVars] = createTheme(themeContract, {
5
- primary: "#1c1917",
6
- primarySubtle: "#57534e",
7
- secondary: "#4f5d95",
8
- focusRing: "#5b5fc7",
9
-
10
- background: "#f5f3ef",
11
- backgroundSubtle: "#edeae4",
12
-
13
- surface: "#ffffff",
14
- surfaceSubtle: "#faf9f7",
15
- surfaceRaised: "#ffffff",
16
- surfaceHover: "#edeae4",
17
- surfaceOverlay: "rgba(28,25,23,0.35)",
18
-
19
- border: "#e2ddd6",
20
- borderSubtle: "#edeae4",
21
- borderStrong: "#c8c1b5",
22
-
23
- contentPrimary: "#1c1917",
24
- contentSecondary: "#57534e",
25
- contentDisabled: "#a8a29e",
26
- contentAccent: "#1c1917",
27
- contentOnPrimary: "#ffffff",
28
-
29
- sentimentNegative: "#ef4444",
30
- sentimentNegativeSubtle: "#fef2f2",
31
- sentimentPositive: "#10b981",
32
- sentimentPositiveSubtle: "#ecfdf5",
33
- sentimentWarning: "#f59e0b",
34
- sentimentWarningSubtle: "#fffbeb",
35
- sentimentInfo: "#0ea5e9",
36
- sentimentInfoSubtle: "#f0f9ff",
37
-
38
- shadowSm: "0 1px 3px rgba(28,25,23,0.07), 0 1px 2px rgba(28,25,23,0.04)",
39
- shadowMd: "0 4px 12px rgba(28,25,23,0.09), 0 2px 4px rgba(28,25,23,0.05)",
40
- shadowLg: "0 8px 24px rgba(28,25,23,0.11), 0 4px 8px rgba(28,25,23,0.05)",
41
- shadowXl: "0 20px 48px rgba(28,25,23,0.14), 0 8px 16px rgba(28,25,23,0.07)",
42
-
43
- primaryHover: "#292524",
44
- sentimentPositiveHover: "#059669",
45
- sentimentWarningHover: "#d97706",
46
- sentimentNegativeHover: "#dc2626",
47
- sentimentInfoHover: "#0284c7",
48
-
49
- hoverOverlay: "rgba(28,25,23,0.05)",
50
- hoverOverlaySoft: "rgba(28,25,23,0.10)",
51
-
52
- fontSize: "16px",
53
- borderRadius: "12px",
54
- });
55
-
56
- export const darkThemeClass = createTheme(themeContract, {
57
- primary: "#f5f3ef",
58
- primarySubtle: "#d4cec5",
59
- secondary: "#4f5d95",
60
- focusRing: "#5b5fc7",
61
-
62
- background: "#1c1917",
63
- backgroundSubtle: "#edeae4",
64
-
65
- surface: "#1c1917",
66
- surfaceSubtle: "#faf9f7",
67
- surfaceRaised: "#ffffff",
68
- surfaceHover: "#edeae4",
69
- surfaceOverlay: "rgba(28,25,23,0.35)",
70
-
71
- border: "#e2ddd6",
72
- borderSubtle: "#edeae4",
73
- borderStrong: "#c8c1b5",
74
-
75
- contentPrimary: "#1c1917",
76
- contentSecondary: "#57534e",
77
- contentDisabled: "#a8a29e",
78
- contentAccent: "#1c1917",
79
- contentOnPrimary: "#ffffff",
80
-
81
- sentimentNegative: "#ef4444",
82
- sentimentNegativeSubtle: "#fef2f2",
83
- sentimentPositive: "#10b981",
84
- sentimentPositiveSubtle: "#ecfdf5",
85
- sentimentWarning: "#f59e0b",
86
- sentimentWarningSubtle: "#fffbeb",
87
- sentimentInfo: "#0ea5e9",
88
- sentimentInfoSubtle: "#f0f9ff",
89
-
90
- shadowSm: "0 1px 3px rgba(28,25,23,0.07), 0 1px 2px rgba(28,25,23,0.04)",
91
- shadowMd: "0 4px 12px rgba(28,25,23,0.09), 0 2px 4px rgba(28,25,23,0.05)",
92
- shadowLg: "0 8px 24px rgba(28,25,23,0.11), 0 4px 8px rgba(28,25,23,0.05)",
93
- shadowXl: "0 20px 48px rgba(28,25,23,0.14), 0 8px 16px rgba(28,25,23,0.07)",
94
-
95
- primaryHover: "#292524",
96
- sentimentPositiveHover: "#059669",
97
- sentimentWarningHover: "#d97706",
98
- sentimentNegativeHover: "#dc2626",
99
- sentimentInfoHover: "#0284c7",
100
-
101
- hoverOverlay: "rgba(28,25,23,0.05)",
102
- hoverOverlaySoft: "rgba(28,25,23,0.10)",
103
-
104
- fontSize: "16px",
105
- borderRadius: "12px",
106
- });
package/src/tokens.css.ts DELETED
@@ -1,162 +0,0 @@
1
- import { style } from "@vanilla-extract/css";
2
- import { themeContract } from "./contract.css";
3
-
4
- export const borderRadius = {
5
- xsmall: "2px",
6
- small: "4px",
7
- medium: "8px",
8
- large: "12px",
9
- xlarge: "16px",
10
- xxlarge: "24px",
11
- full: "999px",
12
- } as const;
13
-
14
- export const fonts = {
15
- sans: '"DM Sans", system-ui, -apple-system, sans-serif',
16
- display: '"DM Sans", system-ui, sans-serif',
17
- heading: '"DM Sans", system-ui, sans-serif',
18
- body: '"DM Sans", system-ui, sans-serif',
19
- label: '"DM Sans", system-ui, sans-serif',
20
- mono: '"DM Mono", ui-monospace, SFMono-Regular, monospace',
21
- } as const;
22
-
23
- export const fontSize = {
24
- xxsmall: "10px",
25
- xsmall: "12px",
26
- small: "14px",
27
- medium: "16px",
28
- large: "18px",
29
- xlarge: "20px",
30
- xxlarge: "24px",
31
- xxxlarge: "30px",
32
- display: "36px",
33
- displayLg: "48px",
34
- hero: "60px",
35
- } as const;
36
-
37
- export const fontWeight = {
38
- regular: "400",
39
- medium: "500",
40
- semibold: "600",
41
- bold: "700",
42
- extrabold: "800",
43
- } as const;
44
-
45
- export const lineHeight = {
46
- tight: "1.2",
47
- snug: "1.35",
48
- normal: "1.5",
49
- relaxed: "1.625",
50
- loose: "1.8",
51
- } as const;
52
-
53
- export const letterSpacing = {
54
- tight: "-0.04em",
55
- snug: "-0.02em",
56
- normal: "0",
57
- wide: "0.02em",
58
- wider: "0.05em",
59
- widest: "0.1em",
60
- } as const;
61
-
62
- export const spacing = {
63
- none: "0px",
64
- xxsmall: "4px",
65
- xsmall: "8px",
66
- small: "12px",
67
- medium: "16px",
68
- large: "24px",
69
- xlarge: "32px",
70
- xxlarge: "48px",
71
- xxxlarge: "64px",
72
- huge: "80px",
73
- massive: "96px",
74
- titanic: "192px",
75
- "0": "0px",
76
- "0.5": "2px",
77
- "1": "4px",
78
- "2": "8px",
79
- "3": "12px",
80
- "4": "16px",
81
- "5": "20px",
82
- "6": "24px",
83
- "7": "28px",
84
- "8": "32px",
85
- "9": "36px",
86
- "10": "40px",
87
- "12": "48px",
88
- "16": "64px",
89
- "20": "80px",
90
- "24": "96px",
91
- "32": "128px",
92
- "40": "160px",
93
- "48": "192px",
94
- } as const;
95
-
96
- export const mediaQueries = {
97
- sm: "screen and (min-width: 640px)",
98
- md: "screen and (min-width: 768px)",
99
- lg: "screen and (min-width: 1024px)",
100
- xl: "screen and (min-width: 1280px)",
101
- xxl: "screen and (min-width: 1536px)",
102
- dark: "(prefers-color-scheme: dark)",
103
- } as const;
104
-
105
- export const primitives = {
106
- trigger: style({
107
- appearance: "none",
108
- backgroundColor: "transparent",
109
- border: "none",
110
- font: "inherit",
111
- color: "inherit",
112
- textDecoration: "none",
113
- borderWidth: 0,
114
- WebkitTapHighlightColor: "transparent",
115
- }),
116
- focusable: style({
117
- outline: "none",
118
- selectors: {
119
- "&:focus-visible": {
120
- outline: `2px solid ${themeContract.focusRing}`,
121
- },
122
- },
123
- }),
124
- };
125
-
126
- export const borderWidth = {
127
- hairline: "0.5px",
128
- thin: "1px",
129
- medium: "1.5px",
130
- thick: "2px",
131
- heavy: "3px",
132
- } as const;
133
-
134
- export const duration = {
135
- instant: "50ms",
136
- fast: "100ms",
137
- normal: "200ms",
138
- slow: "300ms",
139
- slower: "500ms",
140
- lazy: "700ms",
141
- } as const;
142
-
143
- export const easing = {
144
- linear: "linear",
145
- standard: "cubic-bezier(0.4, 0, 0.2, 1)",
146
- enter: "cubic-bezier(0, 0, 0.2, 1)",
147
- exit: "cubic-bezier(0.4, 0, 1, 1)",
148
- spring: "cubic-bezier(0.34, 1.56, 0.64, 1)",
149
- bounce: "cubic-bezier(0.68, -0.55, 0.27, 1.55)",
150
- } as const;
151
-
152
- export const zIndex = {
153
- base: 0,
154
- raised: 100,
155
- floating: 1000,
156
- sticky: 1100,
157
- overlay: 1200,
158
- popover: 1300,
159
- modal: 1400,
160
- toast: 1500,
161
- tooltip: 1600,
162
- } as const;
@@ -1,38 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "esnext",
4
- "module": "esnext",
5
- "moduleResolution": "bundler",
6
- "lib": [
7
- "esnext",
8
- "dom",
9
- "dom.iterable"
10
- ],
11
- "verbatimModuleSyntax": true,
12
- "strict": true,
13
- "skipLibCheck": true,
14
- "resolveJsonModule": true,
15
- "allowSyntheticDefaultImports": true,
16
- "esModuleInterop": true,
17
- "forceConsistentCasingInFileNames": true,
18
- "isolatedModules": true,
19
- "noUncheckedIndexedAccess": true,
20
- "noUnusedLocals": true,
21
- "noUnusedParameters": true,
22
- "noFallthroughCasesInSwitch": true,
23
- "types": [],
24
- "preserveConstEnums": true
25
- },
26
- "files": [
27
- "./src/contract.css.ts",
28
- "./src/index.ts",
29
- "./src/light-theme.css.ts",
30
- "./src/tokens.css.ts"
31
- ],
32
- "include": [
33
- "src/**/*.ts"
34
- ],
35
- "exclude": [
36
- "node_modules"
37
- ]
38
- }
package/tsconfig.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "@blenx-dev/config/tsconfig.base.json",
3
- "compilerOptions": {
4
- "lib": ["ESNext", "DOM", "DOM.Iterable"],
5
- "types": []
6
- },
7
- "include": ["src/**/*.ts"],
8
- "exclude": ["node_modules"]
9
- }
package/vite.config.ts DELETED
@@ -1,28 +0,0 @@
1
- import { defineConfig } from "vite";
2
- import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
3
- import dts from "vite-plugin-dts";
4
-
5
- export default defineConfig({
6
- plugins: [
7
- vanillaExtractPlugin(),
8
- dts(),
9
- ],
10
-
11
- build: {
12
- target: "esnext",
13
-
14
- lib: {
15
- entry: {
16
- index: "src/index.ts",
17
- contract: "src/contract.css.ts",
18
- tokens: "src/tokens.css.ts",
19
- "light-theme": "src/light-theme.css.ts",
20
- },
21
- formats: ["es"],
22
- },
23
-
24
- rollupOptions: {
25
- external: ["@vanilla-extract/css"],
26
- },
27
- },
28
- });
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes