sakulime-ui 0.0.0-stage → 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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 syntony666
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 CHANGED
@@ -1,3 +1,74 @@
1
- # Temporary Holding Version
1
+ # sakulime-ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![License](https://img.shields.io/github/license/syntony666/sakulime-ui)](LICENSE)
4
+ [![npm](https://img.shields.io/npm/v/sakulime-ui)](https://www.npmjs.com/package/sakulime-ui)
5
+ [![Storybook](https://img.shields.io/badge/Storybook-10-FF4785?logo=storybook&logoColor=white)](https://storybook.js.org)
6
+
7
+ A CSS-first design system with no framework runtime — React, Vue, Svelte, or plain HTML all work. Two things only: `sl-*` attributes for components, state, and layout, plus `--sl-*` variables for color and size; `class` stays entirely yours. `sakulime-ui` ships everything in one file; `@sakulime-ui/core`, `@sakulime-ui/layout`, and `@sakulime-ui/theme` are the individual entries; `doc` is the Storybook doc site deployed to Cloudflare Workers.
8
+
9
+ ## Usage
10
+
11
+ ```ts
12
+ import "sakulime-ui/sakulime.min.css";
13
+ ```
14
+
15
+ Variables, both themes, components, and layout ship in that single file. Switch themes with `<html data-theme="terra">` — no reload needed.
16
+
17
+ ```html
18
+ <button sl-button>Save</button>
19
+ <button sl-button sl-tone="danger">Delete</button>
20
+ <button sl-button sl-variant="invert">Cancel</button>
21
+ ```
22
+
23
+ ## Partial imports
24
+
25
+ | What | Import |
26
+ |---|---|
27
+ | Components (with colors) | `@sakulime-ui/core/index.min.css` |
28
+ | Layout | `@sakulime-ui/layout/index.min.css` |
29
+ | Theme palettes only | `@sakulime-ui/theme/sakulime.min.css` |
30
+
31
+ ## Development
32
+
33
+ ```bash
34
+ npm install
35
+ npm run storybook # Storybook — component docs and visual review (doc/)
36
+ npm run build # tsc typecheck + core lib build + per-package min.css + dist/
37
+ npm run site # static Storybook site → doc/site/
38
+ npm run deploy # site build + wrangler deploy → Cloudflare Workers
39
+ npm run lint
40
+ ```
41
+
42
+ ## Releases (changesets)
43
+
44
+ Write a changeset for every change heading into a release:
45
+
46
+ ```bash
47
+ npx changeset # pick packages, patch/minor/major, describe → .changeset/*.md
48
+ ```
49
+
50
+ Day-to-day work lives on `release/x.y.z` (x.y.z is the target version — feature branches fork off it and merge back with `--no-ff`). Merging into `master` makes CI open a release PR (version bump + CHANGELOG); merging that PR publishes the four packages and deploys the doc site. Afterwards merge `master` back into the next `release/x.y.z`. All four packages bump together (`fixed`). Details in CONTRIBUTING.md.
51
+
52
+ ## Repository layout (npm workspaces monorepo)
53
+
54
+ `packages/` is the internal workspace area. Four public entries: `sakulime-ui` (everything), `@sakulime-ui/core`, `@sakulime-ui/layout`, `@sakulime-ui/theme`.
55
+
56
+ | Path | Contents |
57
+ |---|---|
58
+ | `packages/shared` | `--sl-*` variables (internal, unpublished) — bundled into each entry at build time |
59
+ | `packages/shared/theme` | theme palettes, minified to `dist/<name>.min.css` |
60
+ | `packages/core` | component entry: variables + themes + components → `index.min.css` / `index.min.js` |
61
+ | `packages/layout` | layout entry: variables + layout → `index.min.css` |
62
+ | `dist/sakulime.min.css` | everything: core bundle + layout |
63
+ | `doc/` | Storybook doc site, deployed via Workers static assets (`doc/wrangler.toml`) |
64
+
65
+ Inside each package:
66
+
67
+ - `src/css/*.css` — component styles (stories live in `doc/src/`)
68
+ - `src/index.ts` — core lib entry (extracts css + js entry)
69
+
70
+ The split: `sl-*` attributes carry component markup, state modifiers, and layout — `class` is left to consumers and never collides with the system.
71
+
72
+ ## Contributing
73
+
74
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
@@ -0,0 +1,3 @@
1
+ @layer theme{:root{--sl-xs:.25rem;--sl-sm:.5rem;--sl-md:.75rem;--sl-lg:1rem;--sl-xl:1.25rem;--sl-2xl:1.5rem;--sl-3xl:2rem;--sl-4xl:2.5rem;--sl-5xl:3rem;--sl-container-sm:45rem;--sl-container-md:60rem;--sl-container-lg:75rem}:root,:root[data-theme=sakulime]{--sl-bg:#fff3e2;--sl-surface:#fffaf5;--sl-border:#eed9df;--sl-text:#441306;--sl-text-strong:#1f0c03;--sl-text-accent:#c2410c;--sl-text-invert:#fff4f6;--sl-text-secondary:color-mix(in srgb, var(--sl-text) 72%, transparent);--sl-text-muted:color-mix(in srgb, var(--sl-text) 45%, transparent);--sl-primary:#ff5980;--sl-primary-fg:#fff4f6;--sl-primary-bg:#ffdde7;--sl-secondary:#ef9222;--sl-secondary-fg:#4a2408;--sl-secondary-bg:#fbe6cb;--sl-ok:#0369a1;--sl-warn:#ca8a04;--sl-danger:#b91c1c}:root[data-theme=terra]{--sl-bg:#f3efe3;--sl-surface:#faf7ee;--sl-border:#e5ddc9;--sl-text:#292524;--sl-text-strong:#1c1917;--sl-text-accent:#9a3412;--sl-text-invert:#faf7ee;--sl-text-secondary:color-mix(in srgb, var(--sl-text) 72%, transparent);--sl-text-muted:color-mix(in srgb, var(--sl-text) 45%, transparent);--sl-primary:#c05621;--sl-primary-fg:#fdf4ec;--sl-primary-bg:#f2ddc9;--sl-secondary:#64748b;--sl-secondary-fg:#f8fafc;--sl-secondary-bg:#f1f5f9;--sl-ok:#0369a1;--sl-warn:#ca8a04;--sl-danger:#b91c1c}}@layer base{[sl-button]{border-radius:var(--sl-radius);min-height:var(--sl-size-h);padding:0 var(--sl-size-px);font-size:var(--sl-size-fs);border:2px solid #0000;justify-content:center;align-items:center;transition:transform .2s,background-color .16s,border-color .16s,color .16s;display:inline-flex}[sl-button]:hover:not(:disabled){transform:scale(1.05)}[sl-button]:disabled{opacity:.6;cursor:not-allowed}*,:before,:after{box-sizing:border-box}html{-webkit-font-smoothing:antialiased;font-family:Inter,ui-sans-serif,system-ui,sans-serif;line-height:1.5}body{color:var(--sl-text,#111827);background:var(--sl-bg,#fff);margin:0}button,input,textarea,select{font:inherit}}@layer attrs{[sl-button][sl-variant=normal],[sl-button]:not([sl-variant]){background:var(--sl-tone-bg);color:var(--sl-tone-text-invert);border-color:#0000}[sl-button][sl-variant=invert]{color:var(--sl-tone-text);border-color:var(--sl-tone-bg);background:0 0}[sl-button][sl-variant=ghost]{color:var(--sl-tone-text);background:0 0;border-color:#0000}[sl-button][sl-variant=underline]{color:var(--sl-tone-text);text-decoration:underline;text-decoration-thickness:2px;-webkit-text-decoration-color:var(--sl-tone-bg);text-decoration-color:var(--sl-tone-bg);text-underline-offset:.3em;background:0 0;border-color:#0000}[sl-tone=primary],[sl-button]:not([sl-tone]){--sl-tone-bg:var(--sl-primary);--sl-tone-text:color-mix(in srgb, var(--sl-primary) 55%, var(--sl-text));--sl-tone-text-invert:var(--sl-primary-fg)}[sl-tone=secondary]{--sl-tone-bg:var(--sl-secondary);--sl-tone-text:var(--sl-secondary);--sl-tone-text-invert:var(--sl-secondary-fg)}[sl-tone=success]{--sl-tone-bg:var(--sl-ok);--sl-tone-text:var(--sl-ok);--sl-tone-text-invert:var(--sl-text-invert)}[sl-tone=warning]{--sl-tone-bg:var(--sl-warn);--sl-tone-text:var(--sl-warn);--sl-tone-text-invert:var(--sl-text)}[sl-tone=danger]{--sl-tone-bg:var(--sl-danger);--sl-tone-text:var(--sl-danger);--sl-tone-text-invert:var(--sl-text-invert)}[sl-size=md],[sl-button]:not([sl-size]){--sl-size-fs:var(--sl-lg);--sl-size-h:var(--sl-3xl);--sl-size-px:var(--sl-md)}[sl-size=sm]{--sl-size-fs:var(--sl-md);--sl-size-h:var(--sl-2xl);--sl-size-px:var(--sl-sm)}[sl-size=lg]{--sl-size-fs:var(--sl-xl);--sl-size-h:var(--sl-4xl);--sl-size-px:var(--sl-lg)}[sl-radius=sm]{--sl-radius:var(--sl-xs)}[sl-radius=md],[sl-button]:not([sl-radius]){--sl-radius:var(--sl-sm)}[sl-radius=lg]{--sl-radius:var(--sl-md)}[sl-radius=full]{--sl-radius:999px}[sl-radius=none]{--sl-radius:0}}
2
+ /*$vite$:1*/
3
+ @layer theme,base,attrs;@layer theme{:root{--sl-xs: .25rem;--sl-sm: .5rem;--sl-md: .75rem;--sl-lg: 1rem;--sl-xl: 1.25rem;--sl-2xl: 1.5rem;--sl-3xl: 2rem;--sl-4xl: 2.5rem;--sl-5xl: 3rem;--sl-container-sm: 45rem;--sl-container-md: 60rem;--sl-container-lg: 75rem}}@layer base{[sl-container-sm],[sl-container-md],[sl-container-lg]{width:100%;margin-inline:auto;padding-inline:var(--sl-lg)}[sl-container-sm]{max-width:var(--sl-container-sm)}[sl-container-md]{max-width:var(--sl-container-md)}[sl-container-lg]{max-width:var(--sl-container-lg)}}
File without changes
package/package.json CHANGED
@@ -1,6 +1,48 @@
1
1
  {
2
2
  "name": "sakulime-ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "type": "module",
8
+ "workspaces": [
9
+ ".",
10
+ "packages/*",
11
+ "packages/shared/*",
12
+ "doc"
13
+ ],
14
+ "sideEffects": [
15
+ "*.css"
16
+ ],
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "exports": {
21
+ ".": "./dist/sakulime.min.js",
22
+ "./sakulime.min.css": "./dist/sakulime.min.css",
23
+ "./sakulime.min.js": "./dist/sakulime.min.js"
24
+ },
25
+ "scripts": {
26
+ "dev": "npm run dev -w sakulime-doc",
27
+ "build": "tsc -b && npm run build -w @sakulime-ui/core && node scripts/build.mjs",
28
+ "lint": "eslint .",
29
+ "preview": "npm run preview -w sakulime-doc",
30
+ "storybook": "npm run storybook -w sakulime-doc",
31
+ "build-storybook": "npm run build-storybook -w sakulime-doc",
32
+ "site": "npm run site -w sakulime-doc",
33
+ "deploy": "npm run deploy -w sakulime-doc",
34
+ "release": "changeset publish"
35
+ },
36
+ "devDependencies": {
37
+ "@changesets/cli": "^3.0.3",
38
+ "@eslint/js": "^10.0.1",
39
+ "@types/node": "^24.12.3",
40
+ "eslint": "^10.3.0",
41
+ "eslint-plugin-mdx": "^3.8.2",
42
+ "eslint-plugin-storybook": "^10.4.6",
43
+ "globals": "^17.6.0",
44
+ "typescript": "~6.0.2",
45
+ "typescript-eslint": "^8.59.2",
46
+ "vite": "^8.0.12"
47
+ }
48
+ }