@marwes-ui/presets 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Niklas Westman
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # @marwes-ui/presets
2
+
3
+ Design presets for Marwes. Presets define theme defaults and static CSS for component classnames.
4
+
5
+ ## Responsibilities
6
+ - Provide preset objects (currently `firstEdition`).
7
+ - Provide static CSS for `.mw-*` classnames.
8
+ - Map semantic theme values to visual styles with CSS variables.
9
+
10
+ ## Non-Responsibilities
11
+ - No component logic.
12
+ - No framework rendering.
13
+ - No runtime CSS-in-JS.
14
+
15
+ ## Install and Use
16
+ ```tsx
17
+ import { MarwesProvider } from "@marwes-ui/react";
18
+ import { firstEdition } from "@marwes-ui/presets";
19
+ import "@marwes-ui/presets/firstEdition/styles.css";
20
+
21
+ <MarwesProvider preset={firstEdition}>
22
+ <App />
23
+ </MarwesProvider>;
24
+ ```
25
+
26
+ ## firstEdition
27
+ Preset definition:
28
+ - `src/firstEdition/index.ts`
29
+
30
+ Main stylesheet:
31
+ - `src/firstEdition/styles.css`
32
+
33
+ Imported component styles:
34
+ - `button.css`
35
+ - `input.css`
36
+ - `checkbox.css`
37
+ - `icon.css`
38
+ - `typography.css`
39
+ - `molecules/checkbox-field.css`
40
+
41
+ ## Contract with Core
42
+ Core recipes emit:
43
+ - stable classes such as `mw-btn`, `mw-input`, `mw-checkbox`
44
+ - CSS vars such as `--mw-primary`, `--mw-radius`
45
+
46
+ Presets must style those classes/vars consistently and should not require adapter-specific hacks.
47
+
48
+ ## CSS Conventions
49
+ - Keep prefix `--mw-*` for variables.
50
+ - Keep classname prefix `.mw-*`.
51
+ - Prefer semantic vars from core (`--mw-primary`, `--mw-text`, `--mw-surface`) over hardcoded colors.
52
+ - Keep focus-visible and disabled states explicit in CSS.
53
+
54
+ ## Figma Mapping
55
+ When syncing design changes from Figma, follow:
56
+ - `../../docs/FIGMA_TO_MARWES.md`
57
+
58
+ This ensures token names and state variants map predictably into preset CSS.
59
+
60
+ ## Scripts
61
+ - `pnpm --filter @marwes-ui/presets dev`
62
+ - `pnpm --filter @marwes-ui/presets build`
63
+ - `pnpm --filter @marwes-ui/presets typecheck`
64
+
65
+ ## Related Docs
66
+ - `../../docs/PROJECT.md`
67
+ - `../../docs/ARCHITECTURE.md`
68
+ - `../../docs/ENGINEERING.md`
@@ -0,0 +1,26 @@
1
+ import '@fontsource/instrument-sans/400.css';
2
+ import '@fontsource/instrument-sans/500.css';
3
+ import '@fontsource/instrument-sans/600.css';
4
+
5
+ // src/firstEdition/index.ts
6
+ var firstEdition = {
7
+ name: "firstEdition",
8
+ theme: {
9
+ ui: {
10
+ radius: 4,
11
+ density: "comfortable",
12
+ variant: "solid"
13
+ },
14
+ font: {
15
+ primary: "Instrument Sans, system-ui, -apple-system, sans-serif"
16
+ },
17
+ icon: {
18
+ size: "sm",
19
+ strokeWidth: "sm"
20
+ }
21
+ }
22
+ };
23
+
24
+ export { firstEdition };
25
+ //# sourceMappingURL=chunk-UJIVT75P.js.map
26
+ //# sourceMappingURL=chunk-UJIVT75P.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/firstEdition/index.ts"],"names":[],"mappings":";;;;;AAKO,IAAM,YAAA,GAAuB;AAAA,EAClC,IAAA,EAAM,cAAA;AAAA,EACN,KAAA,EAAO;AAAA,IACL,EAAA,EAAI;AAAA,MACF,MAAA,EAAQ,CAAA;AAAA,MACR,OAAA,EAAS,aAAA;AAAA,MACT,OAAA,EAAS;AAAA,KACX;AAAA,IACA,IAAA,EAAM;AAAA,MACJ,OAAA,EAAS;AAAA,KACX;AAAA,IACA,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,IAAA;AAAA,MACN,WAAA,EAAa;AAAA;AACf;AAEJ","file":"chunk-UJIVT75P.js","sourcesContent":["import type { Preset } from \"@marwes-ui/core\"\nimport \"@fontsource/instrument-sans/400.css\"\nimport \"@fontsource/instrument-sans/500.css\"\nimport \"@fontsource/instrument-sans/600.css\"\n\nexport const firstEdition: Preset = {\n name: \"firstEdition\",\n theme: {\n ui: {\n radius: 4,\n density: \"comfortable\",\n variant: \"solid\",\n },\n font: {\n primary: \"Instrument Sans, system-ui, -apple-system, sans-serif\",\n },\n icon: {\n size: \"sm\",\n strokeWidth: \"sm\",\n },\n },\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { Preset } from '@marwes-ui/core';
2
+
3
+ declare const firstEdition: Preset;
4
+
5
+ export { firstEdition };
@@ -0,0 +1,3 @@
1
+ export { firstEdition } from '../chunk-UJIVT75P.js';
2
+ //# sourceMappingURL=index.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,2 @@
1
+ export { firstEdition } from './firstEdition/index.js';
2
+ export { Preset } from '@marwes-ui/core';
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { firstEdition } from './chunk-UJIVT75P.js';
2
+ //# sourceMappingURL=index.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@marwes-ui/presets",
3
+ "version": "0.0.3",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "private": false,
8
+ "type": "module",
9
+ "sideEffects": false,
10
+ "main": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ },
17
+ "./firstEdition": {
18
+ "types": "./dist/firstEdition/index.d.ts",
19
+ "default": "./dist/firstEdition/index.js"
20
+ },
21
+ "./firstEdition/styles.css": "./src/firstEdition/styles.css"
22
+ },
23
+ "files": [
24
+ "dist",
25
+ "src/firstEdition/styles.css"
26
+ ],
27
+ "dependencies": {
28
+ "@fontsource/instrument-sans": "^5.2.8",
29
+ "@marwes-ui/core": "0.0.3"
30
+ },
31
+ "devDependencies": {
32
+ "rimraf": "^6.0.0",
33
+ "tsup": "^8.0.0",
34
+ "typescript": "^5.4.0"
35
+ },
36
+ "scripts": {
37
+ "dev": "tsup --watch",
38
+ "build": "tsup",
39
+ "typecheck": "tsc -p tsconfig.json --noEmit",
40
+ "test": "echo \"No tests in @marwes-ui/presets\"",
41
+ "clean": "rimraf dist",
42
+ "lint": "biome lint .",
43
+ "format": "biome format --write ."
44
+ }
45
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * firstEdition Preset Styles
3
+ *
4
+ * Main stylesheet that imports all component styles.
5
+ * Each component has its own CSS file for better organization.
6
+ */
7
+
8
+ @import "./button.css";
9
+ @import "./input.css";
10
+ @import "./icon.css";
11
+ @import "./checkbox.css";
12
+ @import "./divider.css";
13
+ @import "./typography.css";
14
+
15
+ /* Molecules */
16
+ @import "./molecules/checkbox-field.css";
17
+ @import "./molecules/input-field.css";