mljr-css 0.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.
Files changed (53) hide show
  1. package/README.md +299 -0
  2. package/dist/mljr.css +12214 -0
  3. package/dist/mljr.min.css +3 -0
  4. package/dist/plugin.cjs +139 -0
  5. package/dist/plugin.d.cts +73 -0
  6. package/dist/plugin.d.ts +73 -0
  7. package/dist/plugin.js +102 -0
  8. package/package.json +60 -0
  9. package/src/base/reset.css +210 -0
  10. package/src/base/typography.css +286 -0
  11. package/src/components/accordion.css +210 -0
  12. package/src/components/alert.css +231 -0
  13. package/src/components/avatar.css +222 -0
  14. package/src/components/badge.css +315 -0
  15. package/src/components/breadcrumb.css +100 -0
  16. package/src/components/button.css +383 -0
  17. package/src/components/card.css +319 -0
  18. package/src/components/carousel.css +179 -0
  19. package/src/components/checkbox.css +303 -0
  20. package/src/components/chip.css +207 -0
  21. package/src/components/divider.css +248 -0
  22. package/src/components/drawer.css +242 -0
  23. package/src/components/dropdown.css +246 -0
  24. package/src/components/empty-state.css +216 -0
  25. package/src/components/file-upload.css +262 -0
  26. package/src/components/footer.css +231 -0
  27. package/src/components/input.css +504 -0
  28. package/src/components/modal.css +179 -0
  29. package/src/components/pagination.css +143 -0
  30. package/src/components/password.css +449 -0
  31. package/src/components/popover.css +175 -0
  32. package/src/components/progress.css +165 -0
  33. package/src/components/radio.css +200 -0
  34. package/src/components/select.css +165 -0
  35. package/src/components/sidebar.css +236 -0
  36. package/src/components/skeleton.css +161 -0
  37. package/src/components/spinner.css +259 -0
  38. package/src/components/stepper.css +257 -0
  39. package/src/components/table.css +184 -0
  40. package/src/components/tabs.css +219 -0
  41. package/src/components/textarea.css +164 -0
  42. package/src/components/toast.css +294 -0
  43. package/src/components/tooltip.css +99 -0
  44. package/src/index.css +54 -0
  45. package/src/layout/container.css +181 -0
  46. package/src/layout/footer.css +319 -0
  47. package/src/layout/header.css +223 -0
  48. package/src/layout/navbar.css +461 -0
  49. package/src/layout/navigation.css +328 -0
  50. package/src/layout/sidebar.css +334 -0
  51. package/src/plugin.ts +130 -0
  52. package/src/themes/variables.css +345 -0
  53. package/src/utilities/utilities.css +598 -0
@@ -0,0 +1,73 @@
1
+ import * as tailwindcss_types_config from 'tailwindcss/types/config';
2
+ import { Config } from 'tailwindcss';
3
+
4
+ interface MljrPluginOptions {
5
+ /** Prefix for custom CSS classes (default: 'mljr') */
6
+ prefix?: string;
7
+ /** Enable dark mode support (default: true) */
8
+ darkMode?: boolean;
9
+ }
10
+ declare const defaultColors: {
11
+ primary: {
12
+ 50: string;
13
+ 100: string;
14
+ 200: string;
15
+ 300: string;
16
+ 400: string;
17
+ 500: string;
18
+ 600: string;
19
+ 700: string;
20
+ 800: string;
21
+ 900: string;
22
+ 950: string;
23
+ };
24
+ secondary: {
25
+ 50: string;
26
+ 100: string;
27
+ 200: string;
28
+ 300: string;
29
+ 400: string;
30
+ 500: string;
31
+ 600: string;
32
+ 700: string;
33
+ 800: string;
34
+ 900: string;
35
+ 950: string;
36
+ };
37
+ accent: {
38
+ 50: string;
39
+ 100: string;
40
+ 200: string;
41
+ 300: string;
42
+ 400: string;
43
+ 500: string;
44
+ 600: string;
45
+ 700: string;
46
+ 800: string;
47
+ 900: string;
48
+ 950: string;
49
+ };
50
+ };
51
+ /**
52
+ * MLJR CSS Tailwind Plugin
53
+ *
54
+ * A TailwindCSS plugin that provides the MLJR color scheme
55
+ * and design system utilities.
56
+ *
57
+ * @example
58
+ * ```js
59
+ * // tailwind.config.js
60
+ * import mljrPlugin from 'mljr-css';
61
+ *
62
+ * export default {
63
+ * plugins: [mljrPlugin()],
64
+ * }
65
+ * ```
66
+ */
67
+ declare const mljrPlugin: (options?: MljrPluginOptions) => {
68
+ handler: tailwindcss_types_config.PluginCreator;
69
+ config?: Partial<tailwindcss_types_config.Config>;
70
+ };
71
+ declare const mljrPreset: Partial<Config>;
72
+
73
+ export { type MljrPluginOptions, mljrPlugin as default, defaultColors, mljrPlugin, mljrPreset };
@@ -0,0 +1,73 @@
1
+ import * as tailwindcss_types_config from 'tailwindcss/types/config';
2
+ import { Config } from 'tailwindcss';
3
+
4
+ interface MljrPluginOptions {
5
+ /** Prefix for custom CSS classes (default: 'mljr') */
6
+ prefix?: string;
7
+ /** Enable dark mode support (default: true) */
8
+ darkMode?: boolean;
9
+ }
10
+ declare const defaultColors: {
11
+ primary: {
12
+ 50: string;
13
+ 100: string;
14
+ 200: string;
15
+ 300: string;
16
+ 400: string;
17
+ 500: string;
18
+ 600: string;
19
+ 700: string;
20
+ 800: string;
21
+ 900: string;
22
+ 950: string;
23
+ };
24
+ secondary: {
25
+ 50: string;
26
+ 100: string;
27
+ 200: string;
28
+ 300: string;
29
+ 400: string;
30
+ 500: string;
31
+ 600: string;
32
+ 700: string;
33
+ 800: string;
34
+ 900: string;
35
+ 950: string;
36
+ };
37
+ accent: {
38
+ 50: string;
39
+ 100: string;
40
+ 200: string;
41
+ 300: string;
42
+ 400: string;
43
+ 500: string;
44
+ 600: string;
45
+ 700: string;
46
+ 800: string;
47
+ 900: string;
48
+ 950: string;
49
+ };
50
+ };
51
+ /**
52
+ * MLJR CSS Tailwind Plugin
53
+ *
54
+ * A TailwindCSS plugin that provides the MLJR color scheme
55
+ * and design system utilities.
56
+ *
57
+ * @example
58
+ * ```js
59
+ * // tailwind.config.js
60
+ * import mljrPlugin from 'mljr-css';
61
+ *
62
+ * export default {
63
+ * plugins: [mljrPlugin()],
64
+ * }
65
+ * ```
66
+ */
67
+ declare const mljrPlugin: (options?: MljrPluginOptions) => {
68
+ handler: tailwindcss_types_config.PluginCreator;
69
+ config?: Partial<tailwindcss_types_config.Config>;
70
+ };
71
+ declare const mljrPreset: Partial<Config>;
72
+
73
+ export { type MljrPluginOptions, mljrPlugin as default, defaultColors, mljrPlugin, mljrPreset };
package/dist/plugin.js ADDED
@@ -0,0 +1,102 @@
1
+ // src/plugin.ts
2
+ import plugin from "tailwindcss/plugin";
3
+ var defaultColors = {
4
+ primary: {
5
+ 50: "#e6f3ff",
6
+ 100: "#cce7ff",
7
+ 200: "#99cfff",
8
+ 300: "#66b7ff",
9
+ 400: "#339eff",
10
+ 500: "#0080ff",
11
+ 600: "#0066cc",
12
+ 700: "#004d99",
13
+ 800: "#003366",
14
+ 900: "#001a33",
15
+ 950: "#000d1a"
16
+ },
17
+ secondary: {
18
+ 50: "#fff4e6",
19
+ 100: "#ffe8cc",
20
+ 200: "#ffd199",
21
+ 300: "#ffba66",
22
+ 400: "#ffa333",
23
+ 500: "#ff8c00",
24
+ 600: "#cc7000",
25
+ 700: "#995400",
26
+ 800: "#663800",
27
+ 900: "#331c00",
28
+ 950: "#1a0e00"
29
+ },
30
+ accent: {
31
+ 50: "#f5e6ff",
32
+ 100: "#ebccff",
33
+ 200: "#d699ff",
34
+ 300: "#c266ff",
35
+ 400: "#ad33ff",
36
+ 500: "#9900ff",
37
+ 600: "#7a00cc",
38
+ 700: "#5c0099",
39
+ 800: "#3d0066",
40
+ 900: "#1f0033",
41
+ 950: "#0f001a"
42
+ }
43
+ };
44
+ var mljrPlugin = (options = {}) => {
45
+ const { darkMode = true } = options;
46
+ return plugin(
47
+ function({ addUtilities }) {
48
+ addUtilities({
49
+ ".mljr-focus-ring": {
50
+ "&:focus-visible": {
51
+ outline: "2px solid var(--mljr-ring)",
52
+ "outline-offset": "2px"
53
+ }
54
+ }
55
+ });
56
+ },
57
+ {
58
+ // Extend Tailwind theme
59
+ theme: {
60
+ extend: {
61
+ colors: {
62
+ primary: defaultColors.primary,
63
+ secondary: defaultColors.secondary,
64
+ accent: defaultColors.accent
65
+ },
66
+ fontFamily: {
67
+ sans: ["Inter", "system-ui", "-apple-system", "sans-serif"],
68
+ display: ["Inter", "system-ui", "sans-serif"],
69
+ mono: ["JetBrains Mono", "Fira Code", "monospace"]
70
+ },
71
+ borderRadius: {
72
+ DEFAULT: "0.375rem"
73
+ }
74
+ }
75
+ }
76
+ }
77
+ );
78
+ };
79
+ var mljrPreset = {
80
+ darkMode: ["class", '[data-theme="dark"]'],
81
+ theme: {
82
+ extend: {
83
+ colors: {
84
+ primary: defaultColors.primary,
85
+ secondary: defaultColors.secondary,
86
+ accent: defaultColors.accent
87
+ },
88
+ fontFamily: {
89
+ display: ["Inter", "system-ui", "sans-serif"],
90
+ sans: ["Inter", "system-ui", "-apple-system", "sans-serif"],
91
+ mono: ["JetBrains Mono", "Fira Code", "monospace"]
92
+ }
93
+ }
94
+ }
95
+ };
96
+ var plugin_default = mljrPlugin;
97
+ export {
98
+ plugin_default as default,
99
+ defaultColors,
100
+ mljrPlugin,
101
+ mljrPreset
102
+ };
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "mljr-css",
3
+ "version": "0.1.0",
4
+ "description": "A TailwindCSS-based CSS framework with orange/purple color scheme",
5
+ "type": "module",
6
+ "main": "./dist/plugin.cjs",
7
+ "module": "./dist/plugin.js",
8
+ "types": "./dist/plugin.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/plugin.d.ts",
12
+ "import": "./dist/plugin.js",
13
+ "require": "./dist/plugin.cjs"
14
+ },
15
+ "./css": "./dist/mljr.css",
16
+ "./css/min": "./dist/mljr.min.css",
17
+ "./src/*": "./src/*",
18
+ "./plugin": {
19
+ "types": "./dist/plugin.d.ts",
20
+ "import": "./dist/plugin.js",
21
+ "require": "./dist/plugin.cjs"
22
+ }
23
+ },
24
+ "files": [
25
+ "dist",
26
+ "src"
27
+ ],
28
+ "keywords": [
29
+ "css",
30
+ "tailwindcss",
31
+ "plugin",
32
+ "framework",
33
+ "components"
34
+ ],
35
+ "author": "",
36
+ "license": "MIT",
37
+ "devDependencies": {
38
+ "autoprefixer": "^10.4.19",
39
+ "cssnano": "^7.0.1",
40
+ "postcss": "^8.4.38",
41
+ "postcss-cli": "^11.0.0",
42
+ "postcss-import": "^16.1.0",
43
+ "tailwindcss": "^3.4.3",
44
+ "tsup": "^8.0.2",
45
+ "typescript": "^5.4.5"
46
+ },
47
+ "peerDependencies": {
48
+ "tailwindcss": ">=3.4.0"
49
+ },
50
+ "publishConfig": {
51
+ "access": "public"
52
+ },
53
+ "scripts": {
54
+ "build": "pnpm build:plugin && pnpm build:css",
55
+ "build:css": "postcss src/index.css -o dist/mljr.css && postcss src/index.css -o dist/mljr.min.css --env production",
56
+ "build:plugin": "tsup src/plugin.ts --format cjs,esm --dts --clean",
57
+ "dev": "postcss src/index.css -o dist/mljr.css --watch",
58
+ "clean": "rm -rf dist"
59
+ }
60
+ }
@@ -0,0 +1,210 @@
1
+ /* ============================================
2
+ MLJR CSS Framework - Reset / Normalize
3
+ ============================================ */
4
+
5
+ *,
6
+ *::before,
7
+ *::after {
8
+ box-sizing: border-box;
9
+ }
10
+
11
+ * {
12
+ margin: 0;
13
+ padding: 0;
14
+ }
15
+
16
+ html {
17
+ line-height: var(--mljr-leading-normal);
18
+ -webkit-text-size-adjust: 100%;
19
+ -moz-tab-size: 4;
20
+ tab-size: 4;
21
+ font-feature-settings: normal;
22
+ font-variation-settings: normal;
23
+ -webkit-tap-highlight-color: transparent;
24
+ }
25
+
26
+ body {
27
+ font-family: var(--mljr-font-sans);
28
+ font-size: var(--mljr-text-base);
29
+ line-height: inherit;
30
+ color: var(--mljr-text);
31
+ background-color: var(--mljr-bg);
32
+ -webkit-font-smoothing: antialiased;
33
+ -moz-osx-font-smoothing: grayscale;
34
+ }
35
+
36
+ hr {
37
+ height: 0;
38
+ color: inherit;
39
+ border-top-width: 1px;
40
+ border-color: var(--mljr-border);
41
+ }
42
+
43
+ abbr:where([title]) {
44
+ text-decoration: underline dotted;
45
+ }
46
+
47
+ h1, h2, h3, h4, h5, h6 {
48
+ font-size: inherit;
49
+ font-weight: inherit;
50
+ }
51
+
52
+ a {
53
+ color: inherit;
54
+ text-decoration: inherit;
55
+ }
56
+
57
+ b, strong {
58
+ font-weight: 600;
59
+ }
60
+
61
+ code, kbd, samp, pre {
62
+ font-family: var(--mljr-font-mono);
63
+ font-feature-settings: normal;
64
+ font-variation-settings: normal;
65
+ font-size: 1em;
66
+ }
67
+
68
+ small {
69
+ font-size: 80%;
70
+ }
71
+
72
+ sub, sup {
73
+ font-size: 75%;
74
+ line-height: 0;
75
+ position: relative;
76
+ vertical-align: baseline;
77
+ }
78
+
79
+ sub {
80
+ bottom: -0.25em;
81
+ }
82
+
83
+ sup {
84
+ top: -0.5em;
85
+ }
86
+
87
+ table {
88
+ text-indent: 0;
89
+ border-color: inherit;
90
+ border-collapse: collapse;
91
+ }
92
+
93
+ button, input, optgroup, select, textarea {
94
+ font-family: inherit;
95
+ font-feature-settings: inherit;
96
+ font-variation-settings: inherit;
97
+ font-size: 100%;
98
+ font-weight: inherit;
99
+ line-height: inherit;
100
+ letter-spacing: inherit;
101
+ color: inherit;
102
+ margin: 0;
103
+ padding: 0;
104
+ }
105
+
106
+ button, select {
107
+ text-transform: none;
108
+ }
109
+
110
+ button,
111
+ input:where([type="button"]),
112
+ input:where([type="reset"]),
113
+ input:where([type="submit"]) {
114
+ -webkit-appearance: button;
115
+ appearance: button;
116
+ background-color: transparent;
117
+ background-image: none;
118
+ }
119
+
120
+ :-moz-focusring {
121
+ outline: auto;
122
+ }
123
+
124
+ :-moz-ui-invalid {
125
+ box-shadow: none;
126
+ }
127
+
128
+ progress {
129
+ vertical-align: baseline;
130
+ }
131
+
132
+ ::-webkit-inner-spin-button,
133
+ ::-webkit-outer-spin-button {
134
+ height: auto;
135
+ }
136
+
137
+ [type="search"] {
138
+ -webkit-appearance: textfield;
139
+ appearance: textfield;
140
+ outline-offset: -2px;
141
+ }
142
+
143
+ ::-webkit-search-decoration {
144
+ -webkit-appearance: none;
145
+ }
146
+
147
+ ::-webkit-file-upload-button {
148
+ -webkit-appearance: button;
149
+ font: inherit;
150
+ }
151
+
152
+ summary {
153
+ display: list-item;
154
+ }
155
+
156
+ blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre {
157
+ margin: 0;
158
+ }
159
+
160
+ fieldset {
161
+ margin: 0;
162
+ padding: 0;
163
+ }
164
+
165
+ legend {
166
+ padding: 0;
167
+ }
168
+
169
+ ol, ul, menu {
170
+ list-style: none;
171
+ margin: 0;
172
+ padding: 0;
173
+ }
174
+
175
+ dialog {
176
+ padding: 0;
177
+ }
178
+
179
+ textarea {
180
+ resize: vertical;
181
+ }
182
+
183
+ input::placeholder,
184
+ textarea::placeholder {
185
+ opacity: 1;
186
+ color: var(--mljr-text-muted);
187
+ }
188
+
189
+ button,
190
+ [role="button"] {
191
+ cursor: pointer;
192
+ }
193
+
194
+ :disabled {
195
+ cursor: default;
196
+ }
197
+
198
+ img, svg, video, canvas, audio, iframe, embed, object {
199
+ display: block;
200
+ vertical-align: middle;
201
+ }
202
+
203
+ img, video {
204
+ max-width: 100%;
205
+ height: auto;
206
+ }
207
+
208
+ [hidden] {
209
+ display: none;
210
+ }