@manjunathhk/design-tokens 1.0.0-rc.2

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,24 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Manjunath Krishnasa
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.
22
+
23
+ The IBM Plex font files shipped in dist/fonts are licensed separately under
24
+ the SIL Open Font License 1.1; see dist/LICENSES.
package/README.md ADDED
@@ -0,0 +1,274 @@
1
+ # @manjunathhk/design-tokens
2
+
3
+ One source of truth for the colour scheme and core visual foundations of
4
+ Manjunath's websites (Angular, WordPress, static HTML, .NET/Razor, on
5
+ different hosts). Change a token once, every site that consumes it picks it
6
+ up.
7
+
8
+ This package is tokens and a small opt-in base stylesheet, nothing else:
9
+
10
+ - design tokens for colour (light and dark), typography, spacing, radius,
11
+ shadow, motion, layout, z-index and a breakpoint reference;
12
+ - `base.css`, a small opt-in base (reset, body, links, selection, focus ring,
13
+ reduced motion) built only on the tokens;
14
+ - self-hosted IBM Plex fonts and `fonts.css`.
15
+
16
+ It is never a place for UI components (buttons, cards, nav — those are
17
+ framework-specific and live in each site), a utility-class framework,
18
+ CSS-in-JS, runtime JavaScript, or a palette switcher. See
19
+ [AGENTS.md](AGENTS.md) for the full contract; contributors and coding agents
20
+ read it first.
21
+
22
+ ## Outputs
23
+
24
+ Each file in `dist/` has a subpath export (`@manjunathhk/design-tokens/<file>`).
25
+
26
+ | File | Contents |
27
+ | -------------- | ------------------------------------------------------------------------------------- |
28
+ | `index.css` | Fonts, tokens and base in one file (the package `style` entry) |
29
+ | `tokens.css` | `--mk-*` custom properties, light and dark |
30
+ | `base.css` | Opt-in reset and base styles, zero specificity, plus `.mk-grid-bg` |
31
+ | `fonts.css` | Self-hosted IBM Plex Sans, Sans Condensed and Mono `@font-face` rules |
32
+ | `tokens.json` | `{ version, light, dark, shared, breakpoints }`, flat, keyed by token path |
33
+ | `tokens.mjs` | The same five groups as typed constants (`tokens.d.ts`); also the package root import |
34
+ | `_tokens.scss` | `$mk-*: var(--mk-*)`, raw `$mk-breakpoint-*` values and `@include mk-media(md)` |
35
+
36
+ Breakpoints are never CSS custom properties (they do not work in media
37
+ queries); they live under `breakpoints` in JSON and JS, and as raw values in
38
+ SCSS.
39
+
40
+ Every custom property is prefixed `--mk-` so it never collides with a host
41
+ theme (WordPress themes in particular).
42
+
43
+ ## Light and dark
44
+
45
+ Semantic colour tokens are authored in two source files with the same keys,
46
+ `tokens/semantic/color.light.json` and `tokens/semantic/color.dark.json`; the
47
+ build fails, naming the token and the file, if one mode is missing a key a
48
+ token has in the other. The emitted CSS follows the OS by default and can be
49
+ forced:
50
+
51
+ ```html
52
+ <html data-theme="dark">
53
+ <!-- or data-theme="light" -->
54
+ </html>
55
+ ```
56
+
57
+ With no `data-theme` attribute, the page follows `prefers-color-scheme`.
58
+ `color-scheme` is set to match on `:root` in both cases, so native form
59
+ controls and scrollbars also switch.
60
+
61
+ ## Consumption
62
+
63
+ Prefer the CDN alias for sites without a build step; it always serves the
64
+ latest non-breaking release. Pin a version when you want to upgrade on your
65
+ own schedule.
66
+
67
+ ### Plain `<link>`
68
+
69
+ ```html
70
+ <!-- Alias: tracks the latest 1.x release -->
71
+ <link rel="stylesheet" href="https://design.manjunathhk.in/v1/index.css" />
72
+
73
+ <!-- Pinned: never changes -->
74
+ <link rel="stylesheet" href="https://design.manjunathhk.in/v1.0.0/index.css" />
75
+ ```
76
+
77
+ Emergency fallback only, if `design.manjunathhk.in` itself is down — jsDelivr
78
+ mirrors the npm package automatically:
79
+
80
+ ```html
81
+ <link
82
+ rel="stylesheet"
83
+ href="https://cdn.jsdelivr.net/npm/@manjunathhk/design-tokens@1/dist/index.css"
84
+ />
85
+ ```
86
+
87
+ Do not use the jsDelivr URL as a site's default; it exists for the outage
88
+ case only.
89
+
90
+ ### Angular
91
+
92
+ `angular.json`, in the project's `architect.build.options`:
93
+
94
+ ```json
95
+ {
96
+ "styles": ["node_modules/@manjunathhk/design-tokens/dist/index.css", "src/styles.scss"]
97
+ }
98
+ ```
99
+
100
+ SCSS, via `@use` against the `_tokens.scss` subpath export:
101
+
102
+ ```scss
103
+ @use "@manjunathhk/design-tokens/_tokens.scss" as mk;
104
+
105
+ .card {
106
+ border-radius: mk.$mk-radius-md;
107
+ padding: mk.$mk-spacing-6;
108
+
109
+ @include mk.mk-media(md) {
110
+ padding: mk.$mk-spacing-8;
111
+ }
112
+ }
113
+ ```
114
+
115
+ ### WordPress
116
+
117
+ `functions.php`:
118
+
119
+ ```php
120
+ function mk_design_tokens_enqueue() {
121
+ wp_enqueue_style(
122
+ 'mk-design-tokens',
123
+ 'https://design.manjunathhk.in/v1/index.css',
124
+ [],
125
+ null
126
+ );
127
+ }
128
+ add_action( 'wp_enqueue_scripts', 'mk_design_tokens_enqueue' );
129
+ ```
130
+
131
+ ### .NET Razor or Blazor
132
+
133
+ In the shared layout (`_Layout.cshtml` or `App.razor`), inside `<head>`:
134
+
135
+ ```html
136
+ <link rel="stylesheet" href="https://design.manjunathhk.in/v1/index.css" />
137
+ ```
138
+
139
+ ### Docker / NGINX static site
140
+
141
+ Nothing special: the same `<link>` tag as above, since NGINX only serves the
142
+ site's own HTML and the stylesheet is fetched from the CDN at the client. If
143
+ the image instead bundles the package from npm, copy `dist/index.css` and
144
+ `dist/fonts/` into the image at build time and link the copied path.
145
+
146
+ ## Resilience pattern
147
+
148
+ Bundle a pinned snapshot of `dist/index.css` (and `dist/fonts/`) into the
149
+ site's own static assets, and load the CDN link **after** it:
150
+
151
+ ```html
152
+ <link rel="stylesheet" href="/assets/design-tokens/index.css" />
153
+ <link rel="stylesheet" href="https://design.manjunathhk.in/v1/index.css" />
154
+ ```
155
+
156
+ Both stylesheets declare the same properties, so during normal operation the
157
+ CDN copy, loaded second, simply overrides the bundled one with whatever is
158
+ current. If the CDN request fails, the second `<link>` contributes nothing,
159
+ and the page keeps the bundled snapshot's styles instead of falling back to
160
+ unstyled content.
161
+
162
+ ## Content Security Policy
163
+
164
+ ```
165
+ style-src 'self' https://design.manjunathhk.in;
166
+ font-src 'self' https://design.manjunathhk.in;
167
+ ```
168
+
169
+ Add `https://cdn.jsdelivr.net` to both directives only on a site that is
170
+ actively using the jsDelivr fallback above.
171
+
172
+ ## Versioning policy
173
+
174
+ Semantic versioning is what makes "change once, reflect everywhere" safe:
175
+
176
+ - removing or renaming an emitted token is **MAJOR** (the API-diff CI check
177
+ enforces this);
178
+ - adding a token, or changing a value, is **MINOR** — value changes are
179
+ minor on purpose, since that is what lets `@1` / `/v1/` consumers receive a
180
+ palette change without asking for it;
181
+ - a build or doc fix is **PATCH**.
182
+
183
+ ## How to change the palette
184
+
185
+ 1. Edit `tokens/semantic/color.light.json` and
186
+ `tokens/semantic/color.dark.json` (both files, same keys — see
187
+ [Light and dark](#light-and-dark)). Never invent a colour
188
+ value; it must come from the brief or from an approved PR description.
189
+ 2. Run `npm run build` and open `docs/index.html` (generated, not committed)
190
+ to preview swatches, contrast ratios and the type scale in both modes.
191
+ 3. `npm test` must keep the contrast contract passing for every pair in both
192
+ modes.
193
+ 4. Open a PR; propose any new colour with its contrast ratios in the PR
194
+ description for approval before merging.
195
+
196
+ ## Release process
197
+
198
+ GitHub Flow: short-lived branches off `main`, merged by PR. A release is a
199
+ tag on a `main` commit, pushed by a human only — agents never push tags,
200
+ publish to npm, or upload to R2. The version bump and CHANGELOG entry land in
201
+ a "Release X.Y.Z" PR before tagging.
202
+
203
+ 1. Push a pre-release tag first, `vX.Y.Z-rc.N`. It is built, tested,
204
+ uploaded to the CDN under the pinned prefix `/vX.Y.Z-rc.N/`, verified over
205
+ HTTPS, and published to npm under the `next` dist-tag
206
+ (`npm install @manjunathhk/design-tokens@next`). It is never promoted to
207
+ the CDN alias.
208
+ 2. Once the pipeline is proven, push the final tag, `vX.Y.Z`. It repeats the
209
+ above, then promotes the pinned files to the alias prefix `/vMAJOR/`,
210
+ purges that alias from Cloudflare's cache, verifies it, publishes to npm
211
+ under the default (`latest`) tag, and creates the GitHub Release.
212
+
213
+ Pinned CDN paths (`/vX.Y.Z/`) are immutable; only the alias (`/vMAJOR/`) is
214
+ ever rewritten. Rolling `/v1/` back to an earlier pinned version is one click
215
+ on the `promote` workflow.
216
+
217
+ ## Theme control
218
+
219
+ ```html
220
+ <html data-theme="light">
221
+ <!-- or data-theme="dark", or omit the attribute to follow the OS -->
222
+ </html>
223
+ ```
224
+
225
+ ## Migration map
226
+
227
+ From the portfolio's previous local variable names:
228
+
229
+ | Old variable | Token |
230
+ | --------------------------------- | ---------------------------------------------- |
231
+ | `--paper` | `--mk-color-bg` |
232
+ | `--paper-2` | `--mk-color-bg-subtle` |
233
+ | `--card` | `--mk-color-surface` |
234
+ | `--ink` | `--mk-color-text` |
235
+ | `--ink-2` | `--mk-color-text-secondary` |
236
+ | `--mut` | `--mk-color-text-muted` |
237
+ | `--rule` | `--mk-color-border` |
238
+ | `--rule-2` | `--mk-color-border-strong` |
239
+ | `--grid` | `--mk-color-grid-line` |
240
+ | `--acc` | `--mk-color-accent` |
241
+ | `--on-acc` | `--mk-color-on-accent` |
242
+ | `--acc-soft` | `--mk-color-accent-subtle` |
243
+ | `--err` | `--mk-color-danger` |
244
+ | `--display` / `--sans` / `--mono` | `--mk-font-family-display` / `-sans` / `-mono` |
245
+ | `--gut` | `--mk-layout-gutter` |
246
+ | `--ease` | `--mk-motion-ease` |
247
+
248
+ `--mk-color-border-strong` keeps the old `--rule-2` role: a decorative
249
+ emphasised rule, not held to the 3:1 non-text contrast ratio. There is no old
250
+ variable for `--mk-color-border-control` — it is new in this package, for
251
+ control outlines (inputs, buttons) where 3:1 against `bg`, `bg-subtle` and
252
+ `surface` is required. Use `border-strong` for decoration, `border-control`
253
+ for anything a user interacts with.
254
+
255
+ ## Development
256
+
257
+ Node 24 LTS (`.nvmrc`).
258
+
259
+ ```sh
260
+ npm ci
261
+ npm run lint
262
+ npm run typecheck
263
+ npm test
264
+ ```
265
+
266
+ ### Required status checks
267
+
268
+ Branch protection on `main` requires a PR and these checks (squash merges are
269
+ allowed):
270
+
271
+ - `actionlint` — lints the workflow files;
272
+ - `ci` — install, lint, typecheck, build, test, API diff against the
273
+ published package;
274
+ - `playwright` — the cross-origin consumption smoke test.
@@ -0,0 +1,93 @@
1
+ Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+
5
+ This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+
5
+ This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+
5
+ This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,96 @@
1
+ /*! @manjunathhk/design-tokens v1.0.0-rc.2 */
2
+ @use "sass:map";
3
+
4
+ $mk-color-accent: var(--mk-color-accent);
5
+ $mk-color-accent-subtle: var(--mk-color-accent-subtle);
6
+ $mk-color-bg: var(--mk-color-bg);
7
+ $mk-color-bg-subtle: var(--mk-color-bg-subtle);
8
+ $mk-color-border: var(--mk-color-border);
9
+ $mk-color-border-control: var(--mk-color-border-control);
10
+ $mk-color-border-strong: var(--mk-color-border-strong);
11
+ $mk-color-danger: var(--mk-color-danger);
12
+ $mk-color-focus-ring: var(--mk-color-focus-ring);
13
+ $mk-color-grid-line: var(--mk-color-grid-line);
14
+ $mk-color-on-accent: var(--mk-color-on-accent);
15
+ $mk-color-success: var(--mk-color-success);
16
+ $mk-color-surface: var(--mk-color-surface);
17
+ $mk-color-text: var(--mk-color-text);
18
+ $mk-color-text-muted: var(--mk-color-text-muted);
19
+ $mk-color-text-secondary: var(--mk-color-text-secondary);
20
+ $mk-color-warning: var(--mk-color-warning);
21
+ $mk-font-family-display: var(--mk-font-family-display);
22
+ $mk-font-family-mono: var(--mk-font-family-mono);
23
+ $mk-font-family-sans: var(--mk-font-family-sans);
24
+ $mk-font-letter-spacing-display: var(--mk-font-letter-spacing-display);
25
+ $mk-font-letter-spacing-heading: var(--mk-font-letter-spacing-heading);
26
+ $mk-font-letter-spacing-label: var(--mk-font-letter-spacing-label);
27
+ $mk-font-letter-spacing-normal: var(--mk-font-letter-spacing-normal);
28
+ $mk-font-line-height-normal: var(--mk-font-line-height-normal);
29
+ $mk-font-line-height-relaxed: var(--mk-font-line-height-relaxed);
30
+ $mk-font-line-height-snug: var(--mk-font-line-height-snug);
31
+ $mk-font-line-height-tight: var(--mk-font-line-height-tight);
32
+ $mk-font-size-2xl: var(--mk-font-size-2xl);
33
+ $mk-font-size-3xl: var(--mk-font-size-3xl);
34
+ $mk-font-size-base: var(--mk-font-size-base);
35
+ $mk-font-size-display: var(--mk-font-size-display);
36
+ $mk-font-size-lg: var(--mk-font-size-lg);
37
+ $mk-font-size-md: var(--mk-font-size-md);
38
+ $mk-font-size-sm: var(--mk-font-size-sm);
39
+ $mk-font-size-xl: var(--mk-font-size-xl);
40
+ $mk-font-size-xs: var(--mk-font-size-xs);
41
+ $mk-font-weight-bold: var(--mk-font-weight-bold);
42
+ $mk-font-weight-medium: var(--mk-font-weight-medium);
43
+ $mk-font-weight-regular: var(--mk-font-weight-regular);
44
+ $mk-font-weight-semibold: var(--mk-font-weight-semibold);
45
+ $mk-layout-container-max: var(--mk-layout-container-max);
46
+ $mk-layout-grid-size: var(--mk-layout-grid-size);
47
+ $mk-layout-gutter: var(--mk-layout-gutter);
48
+ $mk-motion-duration-base: var(--mk-motion-duration-base);
49
+ $mk-motion-duration-fast: var(--mk-motion-duration-fast);
50
+ $mk-motion-duration-slow: var(--mk-motion-duration-slow);
51
+ $mk-motion-duration-slower: var(--mk-motion-duration-slower);
52
+ $mk-motion-ease: var(--mk-motion-ease);
53
+ $mk-radius-lg: var(--mk-radius-lg);
54
+ $mk-radius-md: var(--mk-radius-md);
55
+ $mk-radius-pill: var(--mk-radius-pill);
56
+ $mk-radius-sm: var(--mk-radius-sm);
57
+ $mk-radius-xl: var(--mk-radius-xl);
58
+ $mk-shadow-raised: var(--mk-shadow-raised);
59
+ $mk-spacing-1: var(--mk-spacing-1);
60
+ $mk-spacing-2: var(--mk-spacing-2);
61
+ $mk-spacing-3: var(--mk-spacing-3);
62
+ $mk-spacing-4: var(--mk-spacing-4);
63
+ $mk-spacing-5: var(--mk-spacing-5);
64
+ $mk-spacing-6: var(--mk-spacing-6);
65
+ $mk-spacing-8: var(--mk-spacing-8);
66
+ $mk-spacing-10: var(--mk-spacing-10);
67
+ $mk-spacing-12: var(--mk-spacing-12);
68
+ $mk-spacing-16: var(--mk-spacing-16);
69
+ $mk-spacing-20: var(--mk-spacing-20);
70
+ $mk-spacing-24: var(--mk-spacing-24);
71
+ $mk-spacing-32: var(--mk-spacing-32);
72
+ $mk-z-index-nav: var(--mk-z-index-nav);
73
+ $mk-z-index-overlay: var(--mk-z-index-overlay);
74
+ $mk-z-index-toast: var(--mk-z-index-toast);
75
+
76
+ // Breakpoints hold raw values: custom properties do not work in media queries.
77
+ $mk-breakpoint-lg: 1000px;
78
+ $mk-breakpoint-md: 900px;
79
+ $mk-breakpoint-sm: 560px;
80
+ $mk-breakpoint-xl: 1440px;
81
+
82
+ $mk-breakpoints: (
83
+ "lg": $mk-breakpoint-lg,
84
+ "md": $mk-breakpoint-md,
85
+ "sm": $mk-breakpoint-sm,
86
+ "xl": $mk-breakpoint-xl,
87
+ );
88
+
89
+ @mixin mk-media($bp) {
90
+ @if not map.has-key($mk-breakpoints, $bp) {
91
+ @error 'mk-media: unknown breakpoint "#{$bp}"; use one of #{map.keys($mk-breakpoints)}.';
92
+ }
93
+ @media (min-width: map.get($mk-breakpoints, $bp)) {
94
+ @content;
95
+ }
96
+ }