kanto-ds 1.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.
Files changed (192) hide show
  1. package/LICENSE +26 -0
  2. package/README.md +155 -0
  3. package/dist/assets/fonts/README.md +19 -0
  4. package/dist/assets/fonts/manrope/OFL.txt +93 -0
  5. package/dist/assets/fonts/manrope/manrope-cyrillic-ext-wght-normal.woff2 +0 -0
  6. package/dist/assets/fonts/manrope/manrope-cyrillic-wght-normal.woff2 +0 -0
  7. package/dist/assets/fonts/manrope/manrope-latin-ext-wght-normal.woff2 +0 -0
  8. package/dist/assets/fonts/manrope/manrope-latin-wght-normal.woff2 +0 -0
  9. package/dist/assets/fonts/mulish/OFL.txt +93 -0
  10. package/dist/assets/fonts/mulish/mulish-cyrillic-ext-wght-italic.woff2 +0 -0
  11. package/dist/assets/fonts/mulish/mulish-cyrillic-ext-wght-normal.woff2 +0 -0
  12. package/dist/assets/fonts/mulish/mulish-cyrillic-wght-italic.woff2 +0 -0
  13. package/dist/assets/fonts/mulish/mulish-cyrillic-wght-normal.woff2 +0 -0
  14. package/dist/assets/fonts/mulish/mulish-latin-ext-wght-italic.woff2 +0 -0
  15. package/dist/assets/fonts/mulish/mulish-latin-ext-wght-normal.woff2 +0 -0
  16. package/dist/assets/fonts/mulish/mulish-latin-wght-italic.woff2 +0 -0
  17. package/dist/assets/fonts/mulish/mulish-latin-wght-normal.woff2 +0 -0
  18. package/dist/assets/fonts/source_code_pro/OFL.txt +93 -0
  19. package/dist/assets/fonts/source_code_pro/SourceCodePro-Regular.woff2 +0 -0
  20. package/dist/chunks/dialog-CPIfFIlF.js +29 -0
  21. package/dist/chunks/dialog-CPIfFIlF.js.map +1 -0
  22. package/dist/chunks/events-Bjl5Zmmq.js +18 -0
  23. package/dist/chunks/events-Bjl5Zmmq.js.map +1 -0
  24. package/dist/chunks/form-control-CxjBTt1c.js +17 -0
  25. package/dist/chunks/form-control-CxjBTt1c.js.map +1 -0
  26. package/dist/chunks/kt-element-CcMLO5e8.js +28 -0
  27. package/dist/chunks/kt-element-CcMLO5e8.js.map +1 -0
  28. package/dist/chunks/listbox-CUXYn_3S.js +101 -0
  29. package/dist/chunks/listbox-CUXYn_3S.js.map +1 -0
  30. package/dist/chunks/registry-X4LS9J5K.js +30 -0
  31. package/dist/chunks/registry-X4LS9J5K.js.map +1 -0
  32. package/dist/chunks/slots-BPbIdxAJ.js +7 -0
  33. package/dist/chunks/slots-BPbIdxAJ.js.map +1 -0
  34. package/dist/chunks/toaster-PmdKSV5x.js +40 -0
  35. package/dist/chunks/toaster-PmdKSV5x.js.map +1 -0
  36. package/dist/components/core/kt-avatar/kt-avatar.d.ts +49 -0
  37. package/dist/components/core/kt-avatar/kt-avatar.js +156 -0
  38. package/dist/components/core/kt-avatar/kt-avatar.js.map +1 -0
  39. package/dist/components/core/kt-badge/kt-badge.d.ts +77 -0
  40. package/dist/components/core/kt-badge/kt-badge.js +254 -0
  41. package/dist/components/core/kt-badge/kt-badge.js.map +1 -0
  42. package/dist/components/core/kt-button/kt-button.d.ts +71 -0
  43. package/dist/components/core/kt-button/kt-button.js +271 -0
  44. package/dist/components/core/kt-button/kt-button.js.map +1 -0
  45. package/dist/components/core/kt-card/kt-card.d.ts +62 -0
  46. package/dist/components/core/kt-card/kt-card.js +230 -0
  47. package/dist/components/core/kt-card/kt-card.js.map +1 -0
  48. package/dist/components/core/kt-code/kt-code.d.ts +55 -0
  49. package/dist/components/core/kt-code/kt-code.js +155 -0
  50. package/dist/components/core/kt-code/kt-code.js.map +1 -0
  51. package/dist/components/core/kt-icon/kt-icon.d.ts +44 -0
  52. package/dist/components/core/kt-icon/kt-icon.js +85 -0
  53. package/dist/components/core/kt-icon/kt-icon.js.map +1 -0
  54. package/dist/components/core/kt-kbd/kt-kbd.d.ts +38 -0
  55. package/dist/components/core/kt-kbd/kt-kbd.js +89 -0
  56. package/dist/components/core/kt-kbd/kt-kbd.js.map +1 -0
  57. package/dist/components/data/kt-chart/kt-chart.d.ts +99 -0
  58. package/dist/components/data/kt-chart/kt-chart.js +406 -0
  59. package/dist/components/data/kt-chart/kt-chart.js.map +1 -0
  60. package/dist/components/data/kt-meter/kt-meter.d.ts +63 -0
  61. package/dist/components/data/kt-meter/kt-meter.js +177 -0
  62. package/dist/components/data/kt-meter/kt-meter.js.map +1 -0
  63. package/dist/components/data/kt-pagination/kt-pagination.d.ts +35 -0
  64. package/dist/components/data/kt-pagination/kt-pagination.js +88 -0
  65. package/dist/components/data/kt-pagination/kt-pagination.js.map +1 -0
  66. package/dist/components/data/kt-stat/kt-stat.d.ts +60 -0
  67. package/dist/components/data/kt-stat/kt-stat.js +137 -0
  68. package/dist/components/data/kt-stat/kt-stat.js.map +1 -0
  69. package/dist/components/data/kt-table/kt-table.d.ts +99 -0
  70. package/dist/components/data/kt-table/kt-table.js +340 -0
  71. package/dist/components/data/kt-table/kt-table.js.map +1 -0
  72. package/dist/components/data/kt-timeline/kt-timeline.d.ts +78 -0
  73. package/dist/components/data/kt-timeline/kt-timeline.js +252 -0
  74. package/dist/components/data/kt-timeline/kt-timeline.js.map +1 -0
  75. package/dist/components/feedback/kt-alert/kt-alert.d.ts +46 -0
  76. package/dist/components/feedback/kt-alert/kt-alert.js +180 -0
  77. package/dist/components/feedback/kt-alert/kt-alert.js.map +1 -0
  78. package/dist/components/feedback/kt-empty-state/kt-empty-state.d.ts +40 -0
  79. package/dist/components/feedback/kt-empty-state/kt-empty-state.js +100 -0
  80. package/dist/components/feedback/kt-empty-state/kt-empty-state.js.map +1 -0
  81. package/dist/components/feedback/kt-progress-bar/kt-progress-bar.d.ts +53 -0
  82. package/dist/components/feedback/kt-progress-bar/kt-progress-bar.js +212 -0
  83. package/dist/components/feedback/kt-progress-bar/kt-progress-bar.js.map +1 -0
  84. package/dist/components/feedback/kt-skeleton/kt-skeleton.d.ts +43 -0
  85. package/dist/components/feedback/kt-skeleton/kt-skeleton.js +117 -0
  86. package/dist/components/feedback/kt-skeleton/kt-skeleton.js.map +1 -0
  87. package/dist/components/feedback/kt-toast/kt-toast.d.ts +57 -0
  88. package/dist/components/feedback/kt-toast/kt-toast.js +231 -0
  89. package/dist/components/feedback/kt-toast/kt-toast.js.map +1 -0
  90. package/dist/components/feedback/kt-toast-container/kt-toast-container.d.ts +60 -0
  91. package/dist/components/feedback/kt-toast-container/kt-toast-container.js +100 -0
  92. package/dist/components/feedback/kt-toast-container/kt-toast-container.js.map +1 -0
  93. package/dist/components/feedback/kt-toast-container/toaster.d.ts +37 -0
  94. package/dist/components/feedback/kt-tooltip/kt-tooltip.d.ts +57 -0
  95. package/dist/components/feedback/kt-tooltip/kt-tooltip.js +138 -0
  96. package/dist/components/feedback/kt-tooltip/kt-tooltip.js.map +1 -0
  97. package/dist/components/forms/kt-drag-drop/kt-drag-drop.d.ts +68 -0
  98. package/dist/components/forms/kt-drag-drop/kt-drag-drop.js +287 -0
  99. package/dist/components/forms/kt-drag-drop/kt-drag-drop.js.map +1 -0
  100. package/dist/components/forms/kt-form/kt-form.d.ts +75 -0
  101. package/dist/components/forms/kt-form/kt-form.js +187 -0
  102. package/dist/components/forms/kt-form/kt-form.js.map +1 -0
  103. package/dist/components/forms/kt-input/kt-input.d.ts +112 -0
  104. package/dist/components/forms/kt-input/kt-input.js +556 -0
  105. package/dist/components/forms/kt-input/kt-input.js.map +1 -0
  106. package/dist/components/forms/kt-input-menu/kt-input-menu.d.ts +60 -0
  107. package/dist/components/forms/kt-input-menu/kt-input-menu.js +313 -0
  108. package/dist/components/forms/kt-input-menu/kt-input-menu.js.map +1 -0
  109. package/dist/components/forms/kt-label-input/kt-label-input.d.ts +42 -0
  110. package/dist/components/forms/kt-label-input/kt-label-input.js +69 -0
  111. package/dist/components/forms/kt-label-input/kt-label-input.js.map +1 -0
  112. package/dist/components/forms/kt-select/kt-select.d.ts +80 -0
  113. package/dist/components/forms/kt-select/kt-select.js +334 -0
  114. package/dist/components/forms/kt-select/kt-select.js.map +1 -0
  115. package/dist/components/forms/kt-textarea/kt-textarea.d.ts +62 -0
  116. package/dist/components/forms/kt-textarea/kt-textarea.js +239 -0
  117. package/dist/components/forms/kt-textarea/kt-textarea.js.map +1 -0
  118. package/dist/components/forms/kt-toggle/kt-toggle.d.ts +53 -0
  119. package/dist/components/forms/kt-toggle/kt-toggle.js +170 -0
  120. package/dist/components/forms/kt-toggle/kt-toggle.js.map +1 -0
  121. package/dist/components/navigation/kt-breadcrumb/kt-breadcrumb.d.ts +45 -0
  122. package/dist/components/navigation/kt-breadcrumb/kt-breadcrumb.js +93 -0
  123. package/dist/components/navigation/kt-breadcrumb/kt-breadcrumb.js.map +1 -0
  124. package/dist/components/navigation/kt-header/kt-header.d.ts +67 -0
  125. package/dist/components/navigation/kt-header/kt-header.js +195 -0
  126. package/dist/components/navigation/kt-header/kt-header.js.map +1 -0
  127. package/dist/components/navigation/kt-page-header/kt-page-header.d.ts +48 -0
  128. package/dist/components/navigation/kt-page-header/kt-page-header.js +111 -0
  129. package/dist/components/navigation/kt-page-header/kt-page-header.js.map +1 -0
  130. package/dist/components/navigation/kt-segmented-control/kt-segmented-control.d.ts +63 -0
  131. package/dist/components/navigation/kt-segmented-control/kt-segmented-control.js +228 -0
  132. package/dist/components/navigation/kt-segmented-control/kt-segmented-control.js.map +1 -0
  133. package/dist/components/navigation/kt-sub-menu-navigation/kt-sub-menu-navigation.d.ts +94 -0
  134. package/dist/components/navigation/kt-sub-menu-navigation/kt-sub-menu-navigation.js +265 -0
  135. package/dist/components/navigation/kt-sub-menu-navigation/kt-sub-menu-navigation.js.map +1 -0
  136. package/dist/components/navigation/kt-tabs/kt-tabs.d.ts +64 -0
  137. package/dist/components/navigation/kt-tabs/kt-tabs.js +175 -0
  138. package/dist/components/navigation/kt-tabs/kt-tabs.js.map +1 -0
  139. package/dist/components/navigation/kt-toggle-button/kt-toggle-button.d.ts +50 -0
  140. package/dist/components/navigation/kt-toggle-button/kt-toggle-button.js +191 -0
  141. package/dist/components/navigation/kt-toggle-button/kt-toggle-button.js.map +1 -0
  142. package/dist/components/navigation/kt-toggle-button-group/kt-toggle-button-group.d.ts +55 -0
  143. package/dist/components/navigation/kt-toggle-button-group/kt-toggle-button-group.js +128 -0
  144. package/dist/components/navigation/kt-toggle-button-group/kt-toggle-button-group.js.map +1 -0
  145. package/dist/components/overlays/kt-collapsible/kt-collapsible.d.ts +42 -0
  146. package/dist/components/overlays/kt-collapsible/kt-collapsible.js +107 -0
  147. package/dist/components/overlays/kt-collapsible/kt-collapsible.js.map +1 -0
  148. package/dist/components/overlays/kt-confirm-dialog/kt-confirm-dialog.d.ts +56 -0
  149. package/dist/components/overlays/kt-confirm-dialog/kt-confirm-dialog.js +155 -0
  150. package/dist/components/overlays/kt-confirm-dialog/kt-confirm-dialog.js.map +1 -0
  151. package/dist/components/overlays/kt-dropdown/kt-dropdown.d.ts +64 -0
  152. package/dist/components/overlays/kt-dropdown/kt-dropdown.js +212 -0
  153. package/dist/components/overlays/kt-dropdown/kt-dropdown.js.map +1 -0
  154. package/dist/components/overlays/kt-modal/kt-modal.d.ts +61 -0
  155. package/dist/components/overlays/kt-modal/kt-modal.js +207 -0
  156. package/dist/components/overlays/kt-modal/kt-modal.js.map +1 -0
  157. package/dist/components/overlays/kt-side-panel/kt-side-panel.d.ts +52 -0
  158. package/dist/components/overlays/kt-side-panel/kt-side-panel.js +178 -0
  159. package/dist/components/overlays/kt-side-panel/kt-side-panel.js.map +1 -0
  160. package/dist/icons/defaults.d.ts +25 -0
  161. package/dist/icons/index.d.ts +3 -0
  162. package/dist/icons/index.js +37 -0
  163. package/dist/icons/index.js.map +1 -0
  164. package/dist/icons/registry.d.ts +38 -0
  165. package/dist/index.d.ts +81 -0
  166. package/dist/index.js +96 -0
  167. package/dist/index.js.map +1 -0
  168. package/dist/internal/countries.d.ts +37 -0
  169. package/dist/internal/dialog.d.ts +22 -0
  170. package/dist/internal/events.d.ts +14 -0
  171. package/dist/internal/form-control.d.ts +27 -0
  172. package/dist/internal/format.d.ts +8 -0
  173. package/dist/internal/kt-element.d.ts +22 -0
  174. package/dist/internal/listbox.d.ts +36 -0
  175. package/dist/internal/slots.d.ts +10 -0
  176. package/dist/react/index.d.ts +208 -0
  177. package/dist/react/index.js +314 -0
  178. package/dist/react/index.js.map +1 -0
  179. package/dist/styles.css +13 -0
  180. package/dist/tokens/README.md +63 -0
  181. package/dist/tokens/base.css +79 -0
  182. package/dist/tokens/colors.css +125 -0
  183. package/dist/tokens/fonts.css +136 -0
  184. package/dist/tokens/index.css +12 -0
  185. package/dist/tokens/responsive.css +108 -0
  186. package/dist/tokens/spacing.css +66 -0
  187. package/dist/tokens/theme-light.css +144 -0
  188. package/dist/tokens/typography.css +41 -0
  189. package/dist/vue/index.d.ts +143 -0
  190. package/dist/vue/index.js +56 -0
  191. package/dist/vue/index.js.map +1 -0
  192. package/package.json +296 -0
@@ -0,0 +1,63 @@
1
+ # Token layer
2
+
3
+ Every visual decision in Kanto resolves to a CSS custom property declared on
4
+ `:root`. Components never hard-code a colour, a size or a duration.
5
+
6
+ Custom properties inherit _through_ shadow roots, which is what makes this work
7
+ for web components: an app can restyle every Kanto element by redefining a
8
+ token on `:root`, without piercing a single shadow boundary.
9
+
10
+ ## Files
11
+
12
+ | File | Contents | Optional |
13
+ | ----------------- | ---------------------------------------------- | -------- |
14
+ | `colors.css` | Dark palette, surfaces, text ramp, aliases | no |
15
+ | `theme-light.css` | Light remap of the same names | no |
16
+ | `typography.css` | Families and composite `font` shorthands | no |
17
+ | `spacing.css` | Radius, padding, gap, dimensions, motion, `z` | no |
18
+ | `responsive.css` | Breakpoint overrides + reduced-motion | no |
19
+ | `fonts.css` | `@font-face` for Manrope / Mulish / SCP | yes |
20
+ | `base.css` | Global element styles for the host application | yes |
21
+ | `index.css` | Imports the five non-optional files | — |
22
+
23
+ ## Usage
24
+
25
+ ```js
26
+ import 'kanto-ds/styles.css'; // fonts + tokens + base
27
+ ```
28
+
29
+ or, to keep Kanto out of the host's global styles:
30
+
31
+ ```js
32
+ import 'kanto-ds/tokens/index.css'; // variables only
33
+ ```
34
+
35
+ ## Theming
36
+
37
+ Dark is the canonical theme and is what `:root` carries.
38
+
39
+ ```html
40
+ <html data-theme="light">
41
+ <!-- forced light -->
42
+ <html data-theme="auto">
43
+ <!-- follows the OS -->
44
+ </html>
45
+ </html>
46
+ ```
47
+
48
+ ## Conventions
49
+
50
+ - **Surfaces are a ramp, not a shadow scale.** Elevation means a lighter
51
+ surface: `--color-dark-12` (page) → `--color-dark-16` (card) →
52
+ `--color-dark-20` (raised). The only shadow in the system is on toasts.
53
+ - **Semantic colours come in three variants.** `-base` is opaque, for text and
54
+ solid fills; `-soft` is the same hue at 12% alpha, for tinted backgrounds;
55
+ `-hover` is 16%.
56
+ - **Prefer the aliases.** `--surface-card` over `--color-dark-16`,
57
+ `--text-muted` over `--color-text-400`. The aliases survive a change to which
58
+ ramp step a role uses.
59
+ - **Type is applied whole.** `font: var(--font-normal-medium)` sets weight, size,
60
+ line height and family in one declaration; there is no `--font-size-*` scale
61
+ to get half-applied.
62
+ - **Inputs take an outline, never a border.** A border would reflow the field on
63
+ focus; `--outline-width` sits outside the box.
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Global element styles.
3
+ *
4
+ * Optional. Custom elements style themselves inside their shadow roots, so
5
+ * Kanto components render correctly without this file; it exists so the
6
+ * *application's own* markup (headings, links, page background) matches.
7
+ * Import `kanto-ds/tokens/index.css` instead if you only want the variables.
8
+ */
9
+
10
+ *,
11
+ *::before,
12
+ *::after {
13
+ box-sizing: border-box;
14
+ }
15
+
16
+ /* The system's signature: everything cross-fades on theme change and hover,
17
+ fast enough to read as instant. Honours prefers-reduced-motion through
18
+ --duration-instant. */
19
+ *,
20
+ *::before,
21
+ *::after {
22
+ transition:
23
+ background-color var(--duration-instant),
24
+ color var(--duration-instant);
25
+ }
26
+
27
+ body {
28
+ margin: 0;
29
+ padding: 0;
30
+ background-color: var(--surface-page);
31
+ color: var(--text-body);
32
+ font: var(--font-normal-regular);
33
+ -webkit-font-smoothing: antialiased;
34
+ -moz-osx-font-smoothing: grayscale;
35
+ }
36
+
37
+ h1,
38
+ h4,
39
+ h6,
40
+ p,
41
+ a {
42
+ margin: 0;
43
+ padding: 0;
44
+ }
45
+
46
+ h1,
47
+ h4,
48
+ h6 {
49
+ color: var(--text-muted);
50
+ }
51
+
52
+ h1 {
53
+ font: var(--font-title-h1);
54
+ }
55
+ h4 {
56
+ font: var(--font-title-h4);
57
+ }
58
+ h6 {
59
+ font: var(--font-title-h6);
60
+ }
61
+
62
+ a {
63
+ color: var(--color-primary-base);
64
+ text-decoration: none;
65
+ }
66
+ a:hover {
67
+ text-decoration: underline;
68
+ }
69
+
70
+ code,
71
+ pre {
72
+ font: var(--font-code-regular);
73
+ }
74
+
75
+ /* Keyboard focus is always visible; pointer focus is not. */
76
+ :focus-visible {
77
+ outline: var(--outline-width) solid var(--color-primary-base);
78
+ outline-offset: 2px;
79
+ }
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Kanto colour tokens.
3
+ *
4
+ * Dark is what `:root` carries, so a page that sets nothing gets it. Light
5
+ * remaps the same names, so neither theme costs a component any CSS.
6
+ *
7
+ * Surfaces are an eleven-step ramp (`--color-dark-8` … `--color-dark-24`)
8
+ * rather than a shadow scale — in Kanto, elevation means "slightly lighter
9
+ * surface". Semantic colours each ship three variants: `-base` (opaque, for
10
+ * text and solid fills), `-soft` (12% alpha, for tinted backgrounds) and
11
+ * `-hover` (16% alpha).
12
+ */
13
+
14
+ :root {
15
+ color-scheme: dark;
16
+
17
+ /* === BRAND === */
18
+ --color-white: rgba(244, 244, 245, 1);
19
+ --color-primary-base: rgba(101, 98, 248, 1);
20
+ --color-primary-hover: rgba(111, 109, 248, 1);
21
+ --color-primary-soft: rgba(101, 98, 248, 0.12);
22
+ --color-secondary-hover: rgba(111, 116, 246, 0.16);
23
+
24
+ /* === SEMANTIC === */
25
+ --color-danger-base: rgba(245, 61, 92, 1);
26
+ --color-danger-hover: rgba(243, 73, 107, 0.16);
27
+ --color-danger-soft: rgba(245, 61, 92, 0.12);
28
+
29
+ --color-info-base: rgba(53, 175, 243, 1);
30
+ --color-info-hover: rgba(53, 175, 243, 0.16);
31
+ --color-info-soft: rgba(53, 175, 243, 0.12);
32
+
33
+ --color-warning-base: rgba(245, 171, 61, 1);
34
+ --color-warning-hover: rgba(245, 171, 61, 0.16);
35
+ --color-warning-soft: rgba(245, 171, 61, 0.12);
36
+
37
+ --color-success-base: rgba(53, 221, 131, 1);
38
+ --color-success-hover: rgba(53, 221, 131, 0.16);
39
+ --color-success-soft: rgba(53, 221, 131, 0.12);
40
+
41
+ /* === TEXT (100 = highest contrast) === */
42
+ --color-text-100: rgba(244, 244, 245, 1);
43
+ --color-text-400: rgba(145, 145, 161, 1);
44
+ --color-text-500: rgba(101, 101, 114, 1);
45
+ --color-text-600: rgba(75, 75, 88, 1);
46
+ --color-text-700: rgba(66, 66, 77, 1);
47
+ --color-text-800: rgba(58, 58, 68, 1);
48
+ --color-text-900: rgba(39, 39, 42, 1);
49
+
50
+ /* === SURFACES (low → high elevation) === */
51
+ --color-dark-8: rgba(19, 18, 22, 1);
52
+ --color-dark-12: rgba(29, 28, 34, 1);
53
+ --color-dark-14: rgba(34, 33, 39, 1);
54
+ --color-dark-15: rgba(36, 35, 41, 1);
55
+ --color-dark-16: rgba(38, 37, 44, 1);
56
+ --color-dark-18: rgba(43, 42, 50, 1);
57
+ --color-dark-19: rgba(45, 44, 53, 1);
58
+ --color-dark-20: rgba(48, 46, 56, 1);
59
+ --color-dark-22: rgba(53, 51, 61, 1);
60
+ --color-dark-23: rgba(55, 53, 64, 1);
61
+ --color-dark-24: rgba(58, 56, 67, 1);
62
+
63
+ /* === NAVIGATION === */
64
+ --color-navigation-top-icon: #f4f4f5;
65
+ --color-navigation-icon: #656572;
66
+ --color-navigation-icon-close: #ec2d3a;
67
+
68
+ /* === OVERLAY === */
69
+ --color-overlay: rgba(145, 145, 161, 1);
70
+ --color-backdrop: rgba(0, 0, 0, 0.45);
71
+
72
+ /* === SEMANTIC ALIASES ===
73
+ Prefer these in application code: they survive a change to the
74
+ underlying ramp step. */
75
+ --surface-page: var(--color-dark-12);
76
+ --surface-card: var(--color-dark-16);
77
+ --surface-raised: var(--color-dark-20);
78
+ --surface-hover: var(--color-dark-22);
79
+ --border-subtle: var(--color-dark-20);
80
+
81
+ /* === CHART ===
82
+ A categorical order, fixed and never cycled, kept clear of the semantic
83
+ colours so a series can never be mistaken for a status. Validated against
84
+ the card surface in both themes: worst adjacent CVD ΔE 8.4, normal-vision
85
+ ΔE 19.3, every slot at least 3:1 here.
86
+
87
+ A single-series chart uses --color-primary-base instead: with one series
88
+ there is no identity to encode, and the title names it. */
89
+ --chart-series-1: #3987e5;
90
+ --chart-series-2: #d95926;
91
+ --chart-series-3: #199e70;
92
+ --chart-series-4: #c98500;
93
+ --chart-series-5: #d55181;
94
+ --chart-series-6: #008300;
95
+ --chart-series-7: #9085e9;
96
+ --chart-series-8: #e66767;
97
+
98
+ --chart-grid: var(--color-dark-20);
99
+ --chart-axis: var(--color-text-500);
100
+
101
+ /* A field's hairline. Deliberately stronger than --border-subtle: a panel
102
+ divider only has to separate two areas of the same surface, while a field
103
+ has to read as a field on the page, on a card and inside a modal — three
104
+ different backgrounds, one of which it very nearly matches. */
105
+ --border-field: var(--color-text-700);
106
+
107
+ /* A form panel sits one step above the page so its fields, which are
108
+ filled at --color-dark-12, read as wells recessed into it. */
109
+ --surface-form: var(--color-dark-16);
110
+ --surface-field: var(--color-dark-12);
111
+
112
+ /* Recessed surface for code. Not a ramp step: the ramp inverts between
113
+ themes and "the darkest surface" stops meaning "recessed" in light. */
114
+ --surface-code: var(--color-dark-8);
115
+ --text-code: var(--color-text-100);
116
+ --border-code: var(--color-dark-16);
117
+
118
+ /* Deliberately opposite the page, for anything that must read as floating
119
+ above it — the tooltip. */
120
+ --surface-inverted: var(--color-dark-8);
121
+ --text-inverted: var(--color-text-100);
122
+ --text-body: var(--color-text-100);
123
+ --text-muted: var(--color-text-400);
124
+ --text-disabled: var(--color-text-700);
125
+ }
@@ -0,0 +1,136 @@
1
+ /**
2
+ * @font-face declarations for the Kanto families.
3
+ *
4
+ * All three are SIL Open Font License 1.1, so they ship with the package. The
5
+ * display and body faces are variable fonts split into Latin and Cyrillic
6
+ * subsets: a page only downloads the subsets its text actually uses.
7
+ *
8
+ * Optional: `typography.css` ships fallback stacks, so an app that prefers
9
+ * its own faces can skip this file entirely.
10
+ *
11
+ * See `../assets/fonts/README.md` for the licence terms.
12
+ */
13
+
14
+ /* === MANROPE — display / titles === */
15
+ @font-face {
16
+ font-family: 'Manrope';
17
+ src: url('../assets/fonts/manrope/manrope-cyrillic-ext-wght-normal.woff2') format('woff2');
18
+ font-weight: 200 800;
19
+ font-style: normal;
20
+ font-display: swap;
21
+ unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
22
+ }
23
+ @font-face {
24
+ font-family: 'Manrope';
25
+ src: url('../assets/fonts/manrope/manrope-cyrillic-wght-normal.woff2') format('woff2');
26
+ font-weight: 200 800;
27
+ font-style: normal;
28
+ font-display: swap;
29
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
30
+ }
31
+ @font-face {
32
+ font-family: 'Manrope';
33
+ src: url('../assets/fonts/manrope/manrope-latin-ext-wght-normal.woff2') format('woff2');
34
+ font-weight: 200 800;
35
+ font-style: normal;
36
+ font-display: swap;
37
+ unicode-range:
38
+ U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
39
+ U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
40
+ U+A720-A7FF;
41
+ }
42
+ @font-face {
43
+ font-family: 'Manrope';
44
+ src: url('../assets/fonts/manrope/manrope-latin-wght-normal.woff2') format('woff2');
45
+ font-weight: 200 800;
46
+ font-style: normal;
47
+ font-display: swap;
48
+ unicode-range:
49
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
50
+ U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
51
+ }
52
+
53
+ /* === MULISH — body / UI === */
54
+ @font-face {
55
+ font-family: 'Mulish';
56
+ src: url('../assets/fonts/mulish/mulish-cyrillic-ext-wght-normal.woff2') format('woff2');
57
+ font-weight: 200 1000;
58
+ font-style: normal;
59
+ font-display: swap;
60
+ unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
61
+ }
62
+ @font-face {
63
+ font-family: 'Mulish';
64
+ src: url('../assets/fonts/mulish/mulish-cyrillic-wght-normal.woff2') format('woff2');
65
+ font-weight: 200 1000;
66
+ font-style: normal;
67
+ font-display: swap;
68
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
69
+ }
70
+ @font-face {
71
+ font-family: 'Mulish';
72
+ src: url('../assets/fonts/mulish/mulish-latin-ext-wght-normal.woff2') format('woff2');
73
+ font-weight: 200 1000;
74
+ font-style: normal;
75
+ font-display: swap;
76
+ unicode-range:
77
+ U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
78
+ U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
79
+ U+A720-A7FF;
80
+ }
81
+ @font-face {
82
+ font-family: 'Mulish';
83
+ src: url('../assets/fonts/mulish/mulish-latin-wght-normal.woff2') format('woff2');
84
+ font-weight: 200 1000;
85
+ font-style: normal;
86
+ font-display: swap;
87
+ unicode-range:
88
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
89
+ U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
90
+ }
91
+ @font-face {
92
+ font-family: 'Mulish';
93
+ src: url('../assets/fonts/mulish/mulish-cyrillic-ext-wght-italic.woff2') format('woff2');
94
+ font-weight: 200 1000;
95
+ font-style: italic;
96
+ font-display: swap;
97
+ unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
98
+ }
99
+ @font-face {
100
+ font-family: 'Mulish';
101
+ src: url('../assets/fonts/mulish/mulish-cyrillic-wght-italic.woff2') format('woff2');
102
+ font-weight: 200 1000;
103
+ font-style: italic;
104
+ font-display: swap;
105
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
106
+ }
107
+ @font-face {
108
+ font-family: 'Mulish';
109
+ src: url('../assets/fonts/mulish/mulish-latin-ext-wght-italic.woff2') format('woff2');
110
+ font-weight: 200 1000;
111
+ font-style: italic;
112
+ font-display: swap;
113
+ unicode-range:
114
+ U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
115
+ U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
116
+ U+A720-A7FF;
117
+ }
118
+ @font-face {
119
+ font-family: 'Mulish';
120
+ src: url('../assets/fonts/mulish/mulish-latin-wght-italic.woff2') format('woff2');
121
+ font-weight: 200 1000;
122
+ font-style: italic;
123
+ font-display: swap;
124
+ unicode-range:
125
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
126
+ U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
127
+ }
128
+
129
+ /* === SOURCE CODE PRO — code === */
130
+ @font-face {
131
+ font-family: 'Source Code Pro';
132
+ src: url('../assets/fonts/source_code_pro/SourceCodePro-Regular.woff2') format('woff2');
133
+ font-weight: 400;
134
+ font-style: normal;
135
+ font-display: swap;
136
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Token layer only — custom properties, no global element styles.
3
+ *
4
+ * Use this when Kanto has to coexist with another design system's resets.
5
+ * Webfonts (`fonts.css`) and page-level styles (`base.css`) are opt-in.
6
+ */
7
+
8
+ @import './colors.css';
9
+ @import './theme-light.css';
10
+ @import './typography.css';
11
+ @import './spacing.css';
12
+ @import './responsive.css';
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Responsive overrides for the type and spacing scales.
3
+ *
4
+ * Kanto rescales by redefining tokens rather than by writing breakpoints in
5
+ * every component, so a component's CSS stays breakpoint-free and a new
6
+ * breakpoint is added in exactly one place.
7
+ */
8
+
9
+ /* === MOBILE (< 600px) === */
10
+ @media (max-width: 599px) {
11
+ :root {
12
+ --font-title-studio: 400 36px/44px var(--font-family-display);
13
+ --font-title-h1: 600 30px/36px var(--font-family-display);
14
+ --font-title-h4: 400 22px/28px var(--font-family-display);
15
+ --font-title-h6: 600 18px/22px var(--font-family-display);
16
+ --font-normal-regular: 400 12px/18px var(--font-family-body);
17
+ --font-normal-medium: 500 12px/18px var(--font-family-body);
18
+ --font-normal-small: 400 10px/14px var(--font-family-body);
19
+ /* 16px keeps iOS Safari from zooming on focus. */
20
+ --font-input: 400 16px/1.4 var(--font-family-body);
21
+ --font-code-regular: 400 12px/16px var(--font-family-code);
22
+
23
+ --padding-card: 16px;
24
+ --padding-modal: 16px;
25
+ --padding-input: 8px 0;
26
+ --padding-form: 12px;
27
+ --button-padding-x: 12px;
28
+
29
+ --gap-card: 14px;
30
+ --gap-modal: 14px;
31
+ --gap-element: 4px;
32
+ --gap-form: 12px;
33
+ --gap-button: 8px;
34
+
35
+ --button-height-small: 30px;
36
+ --button-height: 36px;
37
+ --button-height-large: 42px;
38
+ }
39
+ }
40
+
41
+ /* === TABLET (600px – 1023px) === */
42
+ @media (min-width: 600px) and (max-width: 1023px) {
43
+ :root {
44
+ --font-title-studio: 400 44px/52px var(--font-family-display);
45
+ --font-title-h1: 600 36px/42px var(--font-family-display);
46
+ --font-title-h4: 400 26px/32px var(--font-family-display);
47
+ --font-title-h6: 600 20px/24px var(--font-family-display);
48
+ --font-normal-regular: 400 14px/18px var(--font-family-body);
49
+ --font-normal-medium: 500 14px/18px var(--font-family-body);
50
+ --font-normal-small: 400 12px/16px var(--font-family-body);
51
+ --font-code-regular: 400 14px/18px var(--font-family-code);
52
+
53
+ --padding-card: 20px;
54
+ --padding-modal: 20px;
55
+ --padding-input: 10px 0;
56
+ --padding-form: 16px;
57
+
58
+ --gap-card: 18px;
59
+ --gap-modal: 18px;
60
+ --gap-element: 4px;
61
+ --gap-form: 14px;
62
+ --gap-button: 10px;
63
+
64
+ --button-height-small: 32px;
65
+ --button-height: 40px;
66
+ --button-height-large: 46px;
67
+ }
68
+ }
69
+
70
+ /* === ULTRA-WIDE (21:9 and wider) ===
71
+ Kanto ships on trading-desk and NOC displays; at 21:9 the desktop scale
72
+ reads as tiny rather than dense. */
73
+ @media (min-aspect-ratio: 21/9) {
74
+ :root {
75
+ --font-title-studio: 400 72px/84px var(--font-family-display);
76
+ --font-title-h1: 600 56px/64px var(--font-family-display);
77
+ --font-title-h4: 400 36px/44px var(--font-family-display);
78
+ --font-title-h6: 600 28px/34px var(--font-family-display);
79
+ --font-normal-regular: 400 16px/22px var(--font-family-body);
80
+ --font-normal-medium: 500 16px/22px var(--font-family-body);
81
+ --font-normal-small: 400 14px/18px var(--font-family-body);
82
+ --font-code-regular: 400 16px/22px var(--font-family-code);
83
+
84
+ --padding-card: 36px;
85
+ --padding-modal: 36px;
86
+ --padding-input: 16px 0;
87
+ --padding-form: 24px;
88
+
89
+ --gap-card: 32px;
90
+ --gap-modal: 32px;
91
+ --gap-element: 6px;
92
+ --gap-form: 20px;
93
+ --gap-button: 16px;
94
+
95
+ --button-height-small: 40px;
96
+ --button-height: 52px;
97
+ --button-height-large: 60px;
98
+ }
99
+ }
100
+
101
+ /* === REDUCED MOTION === */
102
+ @media (prefers-reduced-motion: reduce) {
103
+ :root {
104
+ --duration-instant: 0s;
105
+ --duration-fast: 0s;
106
+ --duration-normal: 0s;
107
+ }
108
+ }
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Kanto spacing, radius and dimension tokens (desktop scale). Responsive
3
+ * overrides live in `responsive.css`.
4
+ */
5
+
6
+ :root {
7
+ /* === RADIUS === */
8
+ --border-radius: 8px; /* inputs, buttons, square chips */
9
+ --border-radius-card: 12px;
10
+ --radius-input: 8px;
11
+ --radius-modal: 12px;
12
+ --radius-sub-menu: 2px;
13
+ --radius-pill: 20px; /* tag chips */
14
+ --radius-full: 9999px; /* toggle track and thumb */
15
+
16
+ /* === PADDING === */
17
+ --padding-card: 24px;
18
+ --padding-modal: 24px;
19
+ --padding-input: 8px 0;
20
+ --padding-form: 16px;
21
+ --padding-sub-menu: 12px 24px;
22
+ --padding-sub-menu-item: 8px 16px;
23
+ --padding-expand: 8px;
24
+ --padding-expand-item: 8px 16px;
25
+ --padding-drag-drop: 16px 24px;
26
+ --padding-chip: 4px 12px;
27
+ --text-area-padding: 10px 16px;
28
+
29
+ /* === GAP === */
30
+ --gap-element: 4px;
31
+ --gap-button: 8px;
32
+ --gap-drag-drop: 12px;
33
+ --gap-form: 16px;
34
+ --gap-card: 20px;
35
+ --gap-modal: 20px;
36
+ --gap-sub-menu: 24px;
37
+
38
+ /* === DIMENSIONS === */
39
+ --button-height-small: 32px;
40
+ --button-height: 40px;
41
+ --button-height-large: 48px;
42
+ --button-padding-x: 16px;
43
+
44
+ /* === BORDERS === */
45
+ --border-width: 1px;
46
+ --outline-width: 2px; /* inputs gain an outline, never a border, on focus */
47
+
48
+ /* === MOTION ===
49
+ Fast and utilitarian: no bounces, no springs. */
50
+ --duration-instant: 0.1s;
51
+ --duration-fast: 0.16s;
52
+ --duration-normal: 0.2s;
53
+ --easing-standard: ease;
54
+
55
+ /* === ELEVATION ===
56
+ Kanto expresses elevation as a lighter surface. The only real shadow in
57
+ the system is on toasts. */
58
+ --shadow-toast: 0 8px 24px rgba(0, 0, 0, 0.15);
59
+
60
+ /* === LAYERS === */
61
+ --z-dropdown: 100;
62
+ --z-tooltip: 200;
63
+ --z-side-panel: 300;
64
+ --z-modal: 400;
65
+ --z-toast: 500;
66
+ }