@chiralkit/tokens 0.1.0-alpha.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 xHadal
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,21 @@
1
+ # @chiralkit/tokens
2
+
3
+ Shared design tokens (color, spacing, typography) for the chiralkit design system. Distributed as CSS custom properties (`tokens.css`) and as a TypeScript module for tooling that needs the raw values.
4
+
5
+ Consumed by `@chiralkit/design-system` (Stencil components), `apps/web/`, `apps/workspace/`, and any stack authored under `kits/ui/registry/*/implementations/*` — the shared vocabulary that binds per-stack implementations together (see ADR 0002).
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ pnpm add @chiralkit/tokens
11
+ ```
12
+
13
+ Import the CSS once at the app entry:
14
+
15
+ ```ts
16
+ import "@chiralkit/tokens/tokens.css";
17
+ ```
18
+
19
+ ## Status
20
+
21
+ `0.1.0-alpha.0` — first published version. See the main repo: https://github.com/xHadal/chiralkit
@@ -0,0 +1,24 @@
1
+ export declare const colors: {
2
+ readonly primary: "var(--ds-color-primary)";
3
+ readonly primaryHover: "var(--ds-color-primary-hover)";
4
+ readonly secondary: "var(--ds-color-secondary)";
5
+ readonly secondaryHover: "var(--ds-color-secondary-hover)";
6
+ readonly textOnPrimary: "var(--ds-color-text-on-primary)";
7
+ readonly textOnSecondary: "var(--ds-color-text-on-secondary)";
8
+ };
9
+ export declare const spacing: {
10
+ readonly xs: "var(--ds-spacing-xs)";
11
+ readonly sm: "var(--ds-spacing-sm)";
12
+ readonly md: "var(--ds-spacing-md)";
13
+ readonly lg: "var(--ds-spacing-lg)";
14
+ readonly xl: "var(--ds-spacing-xl)";
15
+ };
16
+ export declare const radius: {
17
+ readonly sm: "var(--ds-radius-sm)";
18
+ readonly md: "var(--ds-radius-md)";
19
+ };
20
+ export declare const font: {
21
+ readonly family: "var(--ds-font-family)";
22
+ readonly sizeMd: "var(--ds-font-size-md)";
23
+ };
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,MAAM;;;;;;;CAOT,CAAC;AAEX,eAAO,MAAM,OAAO;;;;;;CAMV,CAAC;AAEX,eAAO,MAAM,MAAM;;;CAGT,CAAC;AAEX,eAAO,MAAM,IAAI;;;CAGP,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,32 @@
1
+ // TypeScript constants that reference the CSS custom properties defined in
2
+ // `../tokens.css`. Consumers in JS/TS-native stacks (React) can import from
3
+ // here to get typed token references without having to know CSS variable
4
+ // naming conventions.
5
+ //
6
+ // Any token added to `tokens.css` should be mirrored here. In v0 this is
7
+ // hand-maintained; a follow-up plan can auto-generate this file from the
8
+ // CSS at build time.
9
+ export const colors = {
10
+ primary: "var(--ds-color-primary)",
11
+ primaryHover: "var(--ds-color-primary-hover)",
12
+ secondary: "var(--ds-color-secondary)",
13
+ secondaryHover: "var(--ds-color-secondary-hover)",
14
+ textOnPrimary: "var(--ds-color-text-on-primary)",
15
+ textOnSecondary: "var(--ds-color-text-on-secondary)",
16
+ };
17
+ export const spacing = {
18
+ xs: "var(--ds-spacing-xs)",
19
+ sm: "var(--ds-spacing-sm)",
20
+ md: "var(--ds-spacing-md)",
21
+ lg: "var(--ds-spacing-lg)",
22
+ xl: "var(--ds-spacing-xl)",
23
+ };
24
+ export const radius = {
25
+ sm: "var(--ds-radius-sm)",
26
+ md: "var(--ds-radius-md)",
27
+ };
28
+ export const font = {
29
+ family: "var(--ds-font-family)",
30
+ sizeMd: "var(--ds-font-size-md)",
31
+ };
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,4EAA4E;AAC5E,yEAAyE;AACzE,sBAAsB;AACtB,EAAE;AACF,yEAAyE;AACzE,yEAAyE;AACzE,qBAAqB;AAErB,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,OAAO,EAAE,yBAAyB;IAClC,YAAY,EAAE,+BAA+B;IAC7C,SAAS,EAAE,2BAA2B;IACtC,cAAc,EAAE,iCAAiC;IACjD,aAAa,EAAE,iCAAiC;IAChD,eAAe,EAAE,mCAAmC;CAC5C,CAAC;AAEX,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,EAAE,EAAE,sBAAsB;IAC1B,EAAE,EAAE,sBAAsB;IAC1B,EAAE,EAAE,sBAAsB;IAC1B,EAAE,EAAE,sBAAsB;IAC1B,EAAE,EAAE,sBAAsB;CAClB,CAAC;AAEX,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,EAAE,EAAE,qBAAqB;IACzB,EAAE,EAAE,qBAAqB;CACjB,CAAC;AAEX,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,MAAM,EAAE,uBAAuB;IAC/B,MAAM,EAAE,wBAAwB;CACxB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@chiralkit/tokens",
3
+ "version": "0.1.0-alpha.0",
4
+ "license": "MIT",
5
+ "description": "Design tokens shared across all Chiralkit stacks",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./tokens.css": "./tokens.css"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "tokens.css"
19
+ ],
20
+ "devDependencies": {
21
+ "typescript": "^5.8.3"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "scripts": {
27
+ "build": "tsc -p tsconfig.json",
28
+ "clean": "rm -rf dist"
29
+ }
30
+ }
package/tokens.css ADDED
@@ -0,0 +1,27 @@
1
+ :root {
2
+ --ds-color-primary: oklch(0.58 0.178 307);
3
+ --ds-color-primary-hover: oklch(0.521 0.176 307);
4
+ --ds-color-secondary: #edf2f7;
5
+ --ds-color-secondary-hover: #e2e8f0;
6
+ --ds-color-text-on-primary: #ffffff;
7
+ --ds-color-text-on-secondary: #1a202c;
8
+
9
+ /*
10
+ * Canonical focus-ring color. Kept independent from --ds-color-primary
11
+ * so themes can retune the focus ring without also shifting the brand
12
+ * accent (WCAG 1.4.11 requires 3:1 non-text contrast on either surface;
13
+ * primary may not always meet that on a colored background).
14
+ */
15
+ --ds-color-focus: oklch(0.72 0.18 307);
16
+
17
+ --ds-spacing-xs: 4px;
18
+ --ds-spacing-sm: 8px;
19
+ --ds-spacing-md: 12px;
20
+ --ds-spacing-lg: 16px;
21
+ --ds-spacing-xl: 24px;
22
+
23
+ --ds-radius-sm: 4px;
24
+ --ds-radius-md: 10px;
25
+ --ds-font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
26
+ --ds-font-size-md: 14px;
27
+ }