@kong/design-tokens 1.23.1-pr.666.faf3d3a.0 → 2.0.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/README.md +21 -176
- package/TOKENS.md +1 -1
- package/dist/tokens/README.md +1 -1
- package/dist/tokens/css/custom-properties-list.css +1 -1
- package/dist/tokens/css/custom-properties.css +2 -2
- package/dist/tokens/js/cjs/index.d.ts +2 -2
- package/dist/tokens/js/cjs/index.js +2 -2
- package/dist/tokens/js/index.d.ts +2 -2
- package/dist/tokens/js/index.mjs +2 -2
- package/dist/tokens/less/variables.less +2 -2
- package/dist/tokens/scss/_map.scss +2 -2
- package/dist/tokens/scss/_mixins.scss +1 -1
- package/dist/tokens/scss/_variables.scss +2 -2
- package/package.json +20 -51
- package/dist/themeable-tokens.cjs +0 -480
- package/dist/themeable-tokens.d.ts +0 -488
- package/dist/themeable-tokens.mjs +0 -483
- package/dist/themes/brand-a.css +0 -170
- package/dist/themes/brand-a.d.ts +0 -5
- package/dist/themes/brand-a.mjs +0 -168
- package/dist/themes/brand-b.css +0 -161
- package/dist/themes/brand-b.d.ts +0 -5
- package/dist/themes/brand-b.mjs +0 -159
- package/dist/themes/index.d.ts +0 -8
- package/dist/themes/index.mjs +0 -8
- package/dist/themes/konnect-dark.css +0 -179
- package/dist/themes/konnect-dark.d.ts +0 -5
- package/dist/themes/konnect-dark.mjs +0 -177
- package/dist/themes/konnect-light.css +0 -173
- package/dist/themes/konnect-light.d.ts +0 -5
- package/dist/themes/konnect-light.mjs +0 -171
package/README.md
CHANGED
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Kong Design Tokens for Konnect, via [Style Dictionary](https://github.com/amzn/style-dictionary).
|
|
4
4
|
|
|
5
|
-
- [Token Tiers](#token-tiers)
|
|
6
|
-
- [Semantic tokens](#semantic-tokens)
|
|
7
|
-
- [Component tokens — names only, value-less](#component-tokens--names-only-value-less)
|
|
8
|
-
- [Themeable token list](#themeable-token-list)
|
|
9
|
-
- [Themes](#themes)
|
|
10
5
|
- [Tokens](#tokens)
|
|
11
6
|
- [Token Formats](#token-formats)
|
|
12
7
|
- [SCSS](#scss)
|
|
@@ -17,11 +12,8 @@ Kong Design Tokens for Konnect, via [Style Dictionary](https://github.com/amzn/s
|
|
|
17
12
|
- [Installation](#installation)
|
|
18
13
|
- [Standalone components](#standalone-components)
|
|
19
14
|
- [Host applications](#host-applications)
|
|
20
|
-
- [Kongponents](#kongponents)
|
|
21
15
|
- [Updating Tokens & Local Development](#updating-tokens--local-development)
|
|
22
|
-
- [Directory structure](#directory-structure)
|
|
23
16
|
- [Token Requirements](#token-requirements)
|
|
24
|
-
- [Creating a new theme](#creating-a-new-theme)
|
|
25
17
|
- [Development Sandbox](#development-sandbox)
|
|
26
18
|
- [Lint and fix](#lint-and-fix)
|
|
27
19
|
- [Build for production](#build-for-production)
|
|
@@ -30,88 +22,10 @@ Kong Design Tokens for Konnect, via [Style Dictionary](https://github.com/amzn/s
|
|
|
30
22
|
- [Approvals](#approvals)
|
|
31
23
|
- [Package Publishing](#package-publishing)
|
|
32
24
|
|
|
33
|
-
## Token Tiers
|
|
34
|
-
|
|
35
|
-
The `@kong/design-tokens` package uses a two-tier exported token taxonomy.
|
|
36
|
-
|
|
37
|
-
| Tier | Source directory | Examples | Exported as |
|
|
38
|
-
|------|-----------------|----------|-------------|
|
|
39
|
-
| **Semantic** | `tokens/source/**` | `--kui-color-background-primary`, `--kui-space-40`, `--kui-border-radius-30`, `--kui-method-color-background-get` | CSS custom properties, SCSS/LESS variables, JS constants |
|
|
40
|
-
| **Component** | `tokens/components/**` | `--kui-button-border-radius-medium`, `--kui-button-color-background-primary`, `--kui-button-shadow-focus` | Included in `KUI_THEMEABLE_TOKENS` — **no CSS value** |
|
|
41
|
-
|
|
42
|
-
> **Alias tokens** (`tokens/alias/**`) form a third internal directory. They hold the raw palette values (hex colors, base sizes) that semantic tokens reference. They are **never exported** — they exist only so Style Dictionary can resolve `{color.alias.blue.100}` references at build time.
|
|
43
|
-
|
|
44
|
-
### Semantic tokens
|
|
45
|
-
|
|
46
|
-
Everything in `tokens/source/` is a semantic token — it has a concrete value and is exported to all formats (CSS, SCSS, LESS, JS). This includes:
|
|
47
|
-
|
|
48
|
-
- **Scale tokens** — `--kui-color-*`, `--kui-space-*`, `--kui-border-radius-*`, `--kui-shadow-*`, `--kui-font-*`, etc. Named after the design dimension they represent.
|
|
49
|
-
- **Domain tokens** (`tokens/source/domain/`) — `--kui-method-*`, `--kui-status-*`, `--kui-navigation-*`, `--kui-icon-*`. Named after a cross-cutting UI concept (HTTP methods, status codes, navigation chrome). Valued and exported exactly like scale tokens. **These are not component tokens** even though they're used inside components.
|
|
50
|
-
|
|
51
|
-
### Component tokens — names only, value-less
|
|
52
|
-
|
|
53
|
-
Component tokens (`--kui-button-*`, `--kui-card-*`, `--kui-input-*`, `--kui-badge-*`, …) live in `tokens/components/` and are **declared without any CSS value** — they are purely override slots. Every Kongponents component uses them in a `var()` fallback chain:
|
|
54
|
-
|
|
55
|
-
```scss
|
|
56
|
-
border-radius: var(--kui-button-border-radius-medium, var(--kui-border-radius-30, $kui-border-radius-30));
|
|
57
|
-
// ↑ component token (empty by default) ↑ semantic fallback ↑ SCSS literal
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
When a theme writes `--kui-button-border-radius-medium: 999px`, only buttons go pill-shaped. Inputs and other components keep their semantic default. When no theme writes the token, `var()` falls through to the semantic default — **byte-identical to the un-themed render**.
|
|
61
|
-
|
|
62
|
-
### Themeable token list
|
|
63
|
-
|
|
64
|
-
The `./themeable-tokens` subpath exports `KUI_THEMEABLE_TOKENS` — a typed `readonly` tuple of every `--kui-*` custom property name that a theme may meaningfully override. It combines both semantic tokens and value-less component tokens.
|
|
65
|
-
|
|
66
|
-
```ts
|
|
67
|
-
import { KUI_THEMEABLE_TOKENS } from '@kong/design-tokens/themeable-tokens'
|
|
68
|
-
|
|
69
|
-
// Derive a union type of all valid theme keys:
|
|
70
|
-
type ThemeToken = typeof KUI_THEMEABLE_TOKENS[number]
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
**Breakpoint tokens are intentionally excluded.** `--kui-breakpoint-*` tokens are available as CSS custom properties and SCSS variables, but they cannot be consumed inside CSS `@media` feature queries — that is, `@media (min-width: var(--kui-breakpoint-md))` is invalid CSS. Kongponents uses breakpoints exclusively in `@media` rules, so overriding them via a theme has no effect on responsive behavior. Set breakpoints at the SCSS level instead if your project needs custom breakpoint values.
|
|
74
|
-
|
|
75
|
-
## Themes
|
|
76
|
-
|
|
77
|
-
Pre-built theme CSS files activate a complete set of token overrides via a `data-kui-theme` attribute on any element. Load a theme CSS file and then set the attribute on the root element (or any subtree element):
|
|
78
|
-
|
|
79
|
-
```html
|
|
80
|
-
<!-- In your HTML template or equivalent -->
|
|
81
|
-
<html data-kui-theme="konnect-light">
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
```ts
|
|
85
|
-
// Load the theme CSS — webpack/Vite will bundle it
|
|
86
|
-
import '@kong/design-tokens/themes/konnect-light.css'
|
|
87
|
-
|
|
88
|
-
// Switch the active theme at runtime
|
|
89
|
-
document.documentElement.setAttribute('data-kui-theme', 'konnect-dark')
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Available themes: `konnect-light`, `konnect-dark`, `brand-a`, `brand-b`.
|
|
93
|
-
|
|
94
|
-
Each theme CSS file uses `@layer kui.theme { [data-kui-theme="name"] { ... } }`. This means customer `:root {}` overrides (which are **unlayered**) beat the theme automatically — no `!important` or special selectors needed.
|
|
95
|
-
|
|
96
|
-
To respond to the system dark-mode preference, listen to the `prefers-color-scheme` media query in JS:
|
|
97
|
-
|
|
98
|
-
```ts
|
|
99
|
-
const mq = window.matchMedia('(prefers-color-scheme: dark)')
|
|
100
|
-
const applyColorScheme = (dark: boolean) =>
|
|
101
|
-
document.documentElement.setAttribute('data-kui-theme', dark ? 'konnect-dark' : 'konnect-light')
|
|
102
|
-
|
|
103
|
-
applyColorScheme(mq.matches)
|
|
104
|
-
mq.addEventListener('change', e => applyColorScheme(e.matches))
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
You can also import the theme objects as JavaScript for runtime composition or for use with Kongponents' `applyTheme` / `defineKongponentsTheme`:
|
|
108
|
-
|
|
109
|
-
```ts
|
|
110
|
-
import { konnectLight, konnectDark, brandA, brandB } from '@kong/design-tokens/themes'
|
|
111
|
-
```
|
|
112
|
-
|
|
113
25
|
## Tokens
|
|
114
26
|
|
|
27
|
+
All design tokens **must** be placed inside of the `packages/design-tokens/tokens/` directory in one of two sub-directories.
|
|
28
|
+
|
|
115
29
|
[View the lists of available tokens here](TOKENS.md), or keep reading for more information.
|
|
116
30
|
|
|
117
31
|
### Token Formats
|
|
@@ -335,55 +249,6 @@ Typically, a host application should only utilize the SCSS and/or JavaScript var
|
|
|
335
249
|
</style>
|
|
336
250
|
```
|
|
337
251
|
|
|
338
|
-
#### Kongponents
|
|
339
|
-
|
|
340
|
-
[Kongponents](https://kongponents.konghq.com) ships its own `defineKongponentsTheme` helper that validates a theme object against the full typed token surface at authoring time. To use a pre-built design-tokens theme in Kongponents, wrap it with `defineKongponentsTheme`:
|
|
341
|
-
|
|
342
|
-
```ts
|
|
343
|
-
// my-app-theme.ts
|
|
344
|
-
import { konnectLight } from '@kong/design-tokens/themes'
|
|
345
|
-
import { defineKongponentsTheme } from '@kong/kongponents'
|
|
346
|
-
|
|
347
|
-
export const myTheme = defineKongponentsTheme({
|
|
348
|
-
...konnectLight, // spread the base theme
|
|
349
|
-
'--kui-button-border-radius-medium': '999px', // then override specific tokens
|
|
350
|
-
})
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
Register the theme at app startup via the Kongponents plugin:
|
|
354
|
-
|
|
355
|
-
```ts
|
|
356
|
-
// main.ts
|
|
357
|
-
import { createApp } from 'vue'
|
|
358
|
-
import Kongponents from '@kong/kongponents'
|
|
359
|
-
import { myTheme } from './my-app-theme'
|
|
360
|
-
import App from './App.vue'
|
|
361
|
-
|
|
362
|
-
createApp(App)
|
|
363
|
-
.use(Kongponents, { theme: myTheme })
|
|
364
|
-
.mount('#app')
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
Or apply a theme to a specific subtree at runtime using `KThemeProvider`:
|
|
368
|
-
|
|
369
|
-
```vue
|
|
370
|
-
<template>
|
|
371
|
-
<KThemeProvider :theme="myTheme">
|
|
372
|
-
<!-- everything here renders with myTheme active -->
|
|
373
|
-
</KThemeProvider>
|
|
374
|
-
</template>
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
For per-tenant runtime composition (e.g. theme values fetched from an API), use `applyTheme` from `@kong/kongponents`:
|
|
378
|
-
|
|
379
|
-
```ts
|
|
380
|
-
import { applyTheme } from '@kong/kongponents'
|
|
381
|
-
import { konnectLight } from '@kong/design-tokens/themes'
|
|
382
|
-
|
|
383
|
-
// Merge the base theme with tenant-specific overrides, then apply to :root
|
|
384
|
-
applyTheme({ ...konnectLight, ...tenantOverrides })
|
|
385
|
-
```
|
|
386
|
-
|
|
387
252
|
#### Server-Side Rendering (SSR)
|
|
388
253
|
|
|
389
254
|
If your host application utilizes SSR, you may need to resolve aliases to the package exports.
|
|
@@ -411,26 +276,22 @@ To get started, install the package dependencies from the repo root:
|
|
|
411
276
|
pnpm install
|
|
412
277
|
```
|
|
413
278
|
|
|
414
|
-
###
|
|
415
|
-
|
|
416
|
-
The package is organized around four top-level source directories:
|
|
279
|
+
### Token Requirements
|
|
417
280
|
|
|
418
|
-
|
|
419
|
-
|-----------|---------|
|
|
420
|
-
| `tokens/alias/` | **Internal alias palette** — raw CSS values (hex colors, base sizes) that semantic tokens reference via `{color.alias.*}`. Never exported in any build output; only used so Style Dictionary can resolve references at build time. |
|
|
421
|
-
| `tokens/source/` | **Semantic tokens** — scale and domain tokens that are exported to `custom-properties.css`, SCSS, LESS, and JS. Subdirectories: `color/`, `space/`, `shadow/`, `font/`, `border/`, `animation/`, `breakpoint/`, `letter-spacing/`, `line-height/`, plus `domain/` for HTTP-method, status, navigation, and icon token families. |
|
|
422
|
-
| `tokens/components/` | **Component tokens** — name-only override slots for Kongponents components (`button/`, `card/`, `input/`, `badge/`, …). All `$value` fields must be `""`. Included in `KUI_THEMEABLE_TOKENS` — no CSS, no SCSS/LESS/JS values emitted. |
|
|
423
|
-
| `themes/` | **Named theme override sets** — each `{name}.json` lists the token values that activate for `[data-kui-theme="{name}"]`. Values may be raw hex or `{color.alias.*}` references resolved at build time. |
|
|
281
|
+
- Tokens **must** be defined in the corresponding JSON files within the `packages/design-tokens/tokens/` directory in one of two sub-directories:
|
|
424
282
|
|
|
425
|
-
|
|
283
|
+
Directory | Description
|
|
284
|
+
---------|----------
|
|
285
|
+
`/tokens/alias` | The `alias` directory **must** only contain alias values that point directly to a raw CSS value. Any tokens defined within the `alias` directory **will not** be exposed in the package exports. Tokens defined in the `/tokens/alias/` directory can be utilized/referenced within the `/tokens/source/` files; however, these tokens will **NOT** be exported in the build files.
|
|
286
|
+
`/tokens/source` | The `source` directory contains all tokens that **will be** available for consumption from the package exports.
|
|
426
287
|
|
|
427
288
|
- Token keys **must** be lowercase, snake_case, and defined in normal alphabetical order (rules enforced by the eslint config)
|
|
428
|
-
- The `category` of each token should be its own directory (e.g. `tokens/
|
|
429
|
-
- Each `type` of token should be a file in the `category` directory, named `{type}.json` (e.g. `tokens/
|
|
430
|
-
- If there is only a single `type` of token within a `category`, you **should** name the file `index.json` (e.g. `tokens/
|
|
431
|
-
-
|
|
289
|
+
- The `category` of each token should be its own directory (e.g. `tokens/color/`)
|
|
290
|
+
- Each `type` of token should be a file in the `category` directory, named `{type}.json` (e.g. `tokens/color/background.json`)
|
|
291
|
+
- If there is only a single `type` of token within a `category`, you **should** name the file `index.json` (e.g. `tokens/line-height/index.json`)
|
|
292
|
+
- Component tokens **must** be defined within the `/tokens/source/components/` directory. All tokens for a component should be defined in a single JSON file, `{component-name}.json`, with the name of the component as the top-level property in the file.
|
|
293
|
+
- Token aliases (e.g. color aliases) **must not** be exposed/exported from the package exports
|
|
432
294
|
- Tokens at the "root" of their structure **must** be defined with a key of `"_"` to allow for nested child tokens.
|
|
433
|
-
- Component tokens in `tokens/components/` **must always have `$value: ""`** — they are name-only slots with no CSS value. A non-empty `$value` is a build violation caught by the test suite.
|
|
434
295
|
|
|
435
296
|
<details>
|
|
436
297
|
|
|
@@ -441,17 +302,17 @@ The package is organized around four top-level source directories:
|
|
|
441
302
|
"color": {
|
|
442
303
|
"text": {
|
|
443
304
|
"_": {
|
|
444
|
-
"
|
|
445
|
-
"
|
|
305
|
+
"comment": "blue-100",
|
|
306
|
+
"value": "{color.alias.blue.100}"
|
|
446
307
|
},
|
|
447
308
|
"neutral": {
|
|
448
309
|
"_": {
|
|
449
|
-
"
|
|
450
|
-
"
|
|
310
|
+
"comment": "gray-100",
|
|
311
|
+
"value": "{color.alias.gray.60}"
|
|
451
312
|
},
|
|
452
313
|
"strong": {
|
|
453
|
-
"
|
|
454
|
-
"
|
|
314
|
+
"comment": "gray-70",
|
|
315
|
+
"value": "{color.alias.gray.70}"
|
|
455
316
|
}
|
|
456
317
|
}
|
|
457
318
|
}
|
|
@@ -468,22 +329,6 @@ The package is organized around four top-level source directories:
|
|
|
468
329
|
|
|
469
330
|
</details>
|
|
470
331
|
|
|
471
|
-
### Creating a new theme
|
|
472
|
-
|
|
473
|
-
Use the `create-theme` script to scaffold a new theme file from the current `KUI_THEMEABLE_TOKENS` list. The script reads the built `dist/themeable-tokens.mjs` to get the canonical token list, and sources `$description` text from the actual token metadata.
|
|
474
|
-
|
|
475
|
-
```sh
|
|
476
|
-
# Scaffold an empty theme (all $value fields are "")
|
|
477
|
-
pnpm create-theme my-brand
|
|
478
|
-
|
|
479
|
-
# Start from a copy of an existing theme's values
|
|
480
|
-
pnpm create-theme my-brand --from konnect-light
|
|
481
|
-
```
|
|
482
|
-
|
|
483
|
-
This creates `themes/my-brand.json`. The next build picks it up automatically — no code change is required.
|
|
484
|
-
|
|
485
|
-
> **Prerequisites:** Run `pnpm build` at least once before running `create-theme` so `dist/themeable-tokens.mjs` exists.
|
|
486
|
-
|
|
487
332
|
### Development Sandbox
|
|
488
333
|
|
|
489
334
|
This package includes a Vue sandbox (see the `sandbox/` directory) to allow you to experiment with consuming tokens.
|
|
@@ -500,7 +345,7 @@ Or from within this package directory:
|
|
|
500
345
|
pnpm sandbox
|
|
501
346
|
```
|
|
502
347
|
|
|
503
|
-
This command simultaneously
|
|
348
|
+
This command will simultaneously start the Vite dev server and initialize a watcher on the `tokens/` directory. If any files in the `tokens/` directory are modified, the sandbox will automatically run the build command to update the tokens and then restart the Vite dev server (simulating hot module reload).
|
|
504
349
|
|
|
505
350
|
Updating any files within the sandbox itself will also trigger hot module reload as expected.
|
|
506
351
|
|
|
@@ -554,7 +399,7 @@ For example, if I want to add a new `my-feature` folder, I'd update the `exports
|
|
|
554
399
|
|
|
555
400
|
1. Ensure you are on the `main` branch, then pull down the latest code by running `git checkout main && git pull origin main`
|
|
556
401
|
2. Checkout a new branch for your changes with `git checkout -b {type}/{jira-ticket}-{description}` — as an example, `git checkout feat/khcp-1234-add-color-tokens`
|
|
557
|
-
3. Add/edit the tokens in the `tokens/`
|
|
402
|
+
3. Add/edit the tokens in the `packages/design-tokens/tokens/` directory as needed, ensuring to adhere to the [Token Requirements](#token-requirements)
|
|
558
403
|
4. Before committing your changes, locally run `pnpm lint` to ensure you do not have any linting errors. If you have errors, you can try running `pnpm lint:fix` to resolve
|
|
559
404
|
5. Commit your changes, adhering to [Conventional Commits](#committing-changes). To make this easier, you're encouraged to run `pnpm commit` from the repo root to help build your commit message
|
|
560
405
|
6. Push your branch up to the remote with `git push origin {branch-name}`
|
package/TOKENS.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
3
|
*
|
|
4
4
|
* Kong Konnect Design Tokens
|
|
5
|
-
* GitHub: https://github.com/Kong/design-tokens/packages/design-tokens
|
|
5
|
+
* GitHub: https://github.com/Kong/design-tokens/tree/main/packages/design-tokens
|
|
6
6
|
* License: Apache-2.0
|
|
7
7
|
-->
|
|
8
8
|
|
package/dist/tokens/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
3
|
*
|
|
4
4
|
* Kong Konnect Design Tokens
|
|
5
|
-
* GitHub: https://github.com/Kong/design-tokens/packages/design-tokens
|
|
5
|
+
* GitHub: https://github.com/Kong/design-tokens/tree/main/packages/design-tokens
|
|
6
6
|
* License: Apache-2.0
|
|
7
7
|
-->
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
3
|
*
|
|
4
4
|
* Kong Konnect Design Tokens
|
|
5
|
-
* GitHub: https://github.com/Kong/design-tokens/packages/design-tokens
|
|
5
|
+
* GitHub: https://github.com/Kong/design-tokens/tree/main/packages/design-tokens
|
|
6
6
|
* License: Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Mon, 22 Jun 2026 14:19:10 GMT
|
|
4
4
|
*
|
|
5
5
|
* Kong Konnect Design Tokens
|
|
6
|
-
* GitHub: https://github.com/Kong/design-tokens/packages/design-tokens
|
|
6
|
+
* GitHub: https://github.com/Kong/design-tokens/tree/main/packages/design-tokens
|
|
7
7
|
* License: Apache-2.0
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Mon, 22 Jun 2026 14:19:10 GMT
|
|
4
4
|
*
|
|
5
5
|
* Kong Konnect Design Tokens
|
|
6
|
-
* GitHub: https://github.com/Kong/design-tokens/packages/design-tokens
|
|
6
|
+
* GitHub: https://github.com/Kong/design-tokens/tree/main/packages/design-tokens
|
|
7
7
|
* License: Apache-2.0
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Mon, 22 Jun 2026 14:19:10 GMT
|
|
4
4
|
*
|
|
5
5
|
* Kong Konnect Design Tokens
|
|
6
|
-
* GitHub: https://github.com/Kong/design-tokens/packages/design-tokens
|
|
6
|
+
* GitHub: https://github.com/Kong/design-tokens/tree/main/packages/design-tokens
|
|
7
7
|
* License: Apache-2.0
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Mon, 22 Jun 2026 14:19:10 GMT
|
|
4
4
|
*
|
|
5
5
|
* Kong Konnect Design Tokens
|
|
6
|
-
* GitHub: https://github.com/Kong/design-tokens/packages/design-tokens
|
|
6
|
+
* GitHub: https://github.com/Kong/design-tokens/tree/main/packages/design-tokens
|
|
7
7
|
* License: Apache-2.0
|
|
8
8
|
*/
|
|
9
9
|
|
package/dist/tokens/js/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Mon, 22 Jun 2026 14:19:10 GMT
|
|
4
4
|
*
|
|
5
5
|
* Kong Konnect Design Tokens
|
|
6
|
-
* GitHub: https://github.com/Kong/design-tokens/packages/design-tokens
|
|
6
|
+
* GitHub: https://github.com/Kong/design-tokens/tree/main/packages/design-tokens
|
|
7
7
|
* License: Apache-2.0
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
// Do not edit directly, this file was auto-generated.
|
|
3
|
-
// Generated on
|
|
3
|
+
// Generated on Mon, 22 Jun 2026 14:19:10 GMT
|
|
4
4
|
//
|
|
5
5
|
// Kong Konnect Design Tokens
|
|
6
|
-
// GitHub: https://github.com/Kong/design-tokens/packages/design-tokens
|
|
6
|
+
// GitHub: https://github.com/Kong/design-tokens/tree/main/packages/design-tokens
|
|
7
7
|
// License: Apache-2.0
|
|
8
8
|
|
|
9
9
|
@kui-color-background: #ffffff; // Default background color for containers (white).
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
3
|
* Do not edit directly, this file was auto-generated.
|
|
4
|
-
* Generated on
|
|
4
|
+
* Generated on Mon, 22 Jun 2026 14:19:10 GMT
|
|
5
5
|
*
|
|
6
6
|
* Kong Konnect Design Tokens
|
|
7
|
-
* GitHub: https://github.com/Kong/design-tokens/packages/design-tokens
|
|
7
|
+
* GitHub: https://github.com/Kong/design-tokens/tree/main/packages/design-tokens
|
|
8
8
|
* License: Apache-2.0
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
3
|
*
|
|
4
4
|
* Kong Konnect Design Tokens
|
|
5
|
-
* GitHub: https://github.com/Kong/design-tokens/packages/design-tokens
|
|
5
|
+
* GitHub: https://github.com/Kong/design-tokens/tree/main/packages/design-tokens
|
|
6
6
|
* License: Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
// Do not edit directly, this file was auto-generated.
|
|
3
|
-
// Generated on
|
|
3
|
+
// Generated on Mon, 22 Jun 2026 14:19:10 GMT
|
|
4
4
|
//
|
|
5
5
|
// Kong Konnect Design Tokens
|
|
6
|
-
// GitHub: https://github.com/Kong/design-tokens/packages/design-tokens
|
|
6
|
+
// GitHub: https://github.com/Kong/design-tokens/tree/main/packages/design-tokens
|
|
7
7
|
// License: Apache-2.0
|
|
8
8
|
|
|
9
9
|
$kui-color-background: #ffffff !default; // Default background color for containers (white).
|
package/package.json
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong/design-tokens",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Kong Konnect Design Tokens and style dictionary",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "pnpm build:clean && pnpm build:tokens && pnpm copy:tokens-doc",
|
|
9
|
+
"build:tokens": "style-dictionary build --config ./config.mjs",
|
|
10
|
+
"build:clean": "rimraf ./dist",
|
|
11
|
+
"copy:tokens-doc": "shx cp -f './dist/tokens/README.md' './TOKENS.md'",
|
|
12
|
+
"lint": "eslint",
|
|
13
|
+
"lint:fix": "eslint --fix",
|
|
14
|
+
"typecheck": "pnpm typecheck:sandbox",
|
|
15
|
+
"typecheck:sandbox": "vue-tsc --project ./sandbox/tsconfig.json --noEmit",
|
|
16
|
+
"sandbox": "pnpm build && run-p sandbox:open sandbox:watch",
|
|
17
|
+
"sandbox:open": "vite sandbox -c ./sandbox/vite.config.ts",
|
|
18
|
+
"sandbox:watch": "chokidar \"tokens/**/*.json\" -c \"pnpm build\"",
|
|
19
|
+
"sandbox:build": "BUILD_SANDBOX=true vite build -c ./sandbox/vite.config.ts -m production",
|
|
20
|
+
"sandbox:preview": "BUILD_SANDBOX=true vite preview -c ./sandbox/vite.config.ts",
|
|
21
|
+
"watch:tokens": "pnpm build && chokidar \"tokens/**/*.json\" -c \"pnpm build\"",
|
|
22
|
+
"test": "vitest run --config vitest.config.mjs"
|
|
23
|
+
},
|
|
7
24
|
"publishConfig": {
|
|
8
25
|
"access": "public"
|
|
9
26
|
},
|
|
@@ -25,37 +42,6 @@
|
|
|
25
42
|
"default": "./dist/tokens/js/cjs/index.js"
|
|
26
43
|
}
|
|
27
44
|
},
|
|
28
|
-
"./themes": {
|
|
29
|
-
"import": {
|
|
30
|
-
"types": "./dist/themes/index.d.ts",
|
|
31
|
-
"default": "./dist/themes/index.mjs"
|
|
32
|
-
},
|
|
33
|
-
"require": {
|
|
34
|
-
"types": "./dist/themes/index.d.ts",
|
|
35
|
-
"default": "./dist/themes/index.mjs"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"./themes/*.css": "./dist/themes/*.css",
|
|
39
|
-
"./themes/*": {
|
|
40
|
-
"import": {
|
|
41
|
-
"types": "./dist/themes/*.d.ts",
|
|
42
|
-
"default": "./dist/themes/*.mjs"
|
|
43
|
-
},
|
|
44
|
-
"require": {
|
|
45
|
-
"types": "./dist/themes/*.d.ts",
|
|
46
|
-
"default": "./dist/themes/*.mjs"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"./themeable-tokens": {
|
|
50
|
-
"import": {
|
|
51
|
-
"types": "./dist/themeable-tokens.d.ts",
|
|
52
|
-
"default": "./dist/themeable-tokens.mjs"
|
|
53
|
-
},
|
|
54
|
-
"require": {
|
|
55
|
-
"types": "./dist/themeable-tokens.d.ts",
|
|
56
|
-
"default": "./dist/themeable-tokens.cjs"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
45
|
"./tokens/*": "./dist/tokens/*",
|
|
60
46
|
"./package.json": "./package.json"
|
|
61
47
|
},
|
|
@@ -79,22 +65,5 @@
|
|
|
79
65
|
"volta": {
|
|
80
66
|
"node": "24.13.1"
|
|
81
67
|
},
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
"build:tokens": "style-dictionary build --config ./config.mjs",
|
|
85
|
-
"build:clean": "rimraf ./dist",
|
|
86
|
-
"create-theme": "node scripts/create-theme.mjs",
|
|
87
|
-
"copy:tokens-doc": "shx cp -f './dist/tokens/README.md' './TOKENS.md'",
|
|
88
|
-
"lint": "eslint",
|
|
89
|
-
"lint:fix": "eslint --fix",
|
|
90
|
-
"typecheck": "pnpm typecheck:sandbox",
|
|
91
|
-
"typecheck:sandbox": "vue-tsc --project ./sandbox/tsconfig.json --noEmit",
|
|
92
|
-
"sandbox": "pnpm build && run-p sandbox:open sandbox:watch",
|
|
93
|
-
"sandbox:open": "vite sandbox -c ./sandbox/vite.config.ts",
|
|
94
|
-
"sandbox:watch": "chokidar \"tokens/**/*.json\" \"themes/**/*.json\" -c \"pnpm build\"",
|
|
95
|
-
"sandbox:build": "BUILD_SANDBOX=true vite build -c ./sandbox/vite.config.ts -m production",
|
|
96
|
-
"sandbox:preview": "BUILD_SANDBOX=true vite preview -c ./sandbox/vite.config.ts",
|
|
97
|
-
"watch:tokens": "pnpm build && chokidar \"tokens/**/*.json\" -c \"pnpm build\"",
|
|
98
|
-
"test": "vitest run --config vitest.config.mjs"
|
|
99
|
-
}
|
|
100
|
-
}
|
|
68
|
+
"gitHead": "f14bc3fff7b8b11423b774e0b87eab84315f9250"
|
|
69
|
+
}
|