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,144 @@
1
+ /**
2
+ * Kanto light theme — the same token names as `colors.css`, remapped.
3
+ *
4
+ * Dark is the default; light is one attribute away. Set it explicitly:
5
+ *
6
+ * <html data-theme="light">
7
+ *
8
+ * or follow the operating system:
9
+ *
10
+ * <html data-theme="auto">
11
+ *
12
+ * Only the tokens that actually differ are redefined here, so a change to the
13
+ * brand or semantic palette in `colors.css` propagates to both themes.
14
+ */
15
+
16
+ :root[data-theme='light'],
17
+ [data-theme='light'] {
18
+ color-scheme: light;
19
+
20
+ --color-white: rgba(255, 255, 255, 1);
21
+
22
+ --color-text-100: rgba(28, 28, 30, 1);
23
+ --color-text-400: rgba(80, 80, 90, 1);
24
+ --color-text-500: rgba(110, 110, 120, 1);
25
+ --color-text-600: rgba(130, 130, 140, 1);
26
+ --color-text-700: rgba(155, 155, 165, 1);
27
+ --color-text-800: rgba(180, 180, 190, 1);
28
+ --color-text-900: rgba(220, 220, 225, 1);
29
+
30
+ /* The ramp inverts: "8" stays the extreme, "24" stays the most elevated. */
31
+ --color-dark-8: rgba(255, 255, 255, 1);
32
+ --color-dark-12: rgba(250, 250, 252, 1);
33
+ --color-dark-14: rgba(245, 245, 247, 1);
34
+ --color-dark-15: rgba(242, 242, 245, 1);
35
+ --color-dark-16: rgba(238, 238, 241, 1);
36
+ --color-dark-18: rgba(232, 232, 236, 1);
37
+ --color-dark-19: rgba(228, 228, 233, 1);
38
+ --color-dark-20: rgba(222, 222, 228, 1);
39
+ --color-dark-22: rgba(215, 215, 222, 1);
40
+ --color-dark-23: rgba(210, 210, 218, 1);
41
+ --color-dark-24: rgba(205, 205, 212, 1);
42
+
43
+ --color-navigation-top-icon: #1c1c1e;
44
+ --color-navigation-icon: #505050;
45
+
46
+ --color-overlay: rgba(80, 80, 90, 0.8);
47
+ --color-backdrop: rgba(0, 0, 0, 0.25);
48
+
49
+ /* The same eight hues, stepped for the light surface — not an automatic
50
+ flip. Four sit below 3:1 there, so the chart always ships its data
51
+ table: the relief the contrast warning requires. */
52
+ --chart-series-1: #2a78d6;
53
+ --chart-series-2: #eb6834;
54
+ --chart-series-3: #1baf7a;
55
+ --chart-series-4: #eda100;
56
+ --chart-series-5: #e87ba4;
57
+ --chart-series-6: #008300;
58
+ --chart-series-7: #4a3aa7;
59
+ --chart-series-8: #e34948;
60
+
61
+ --chart-grid: var(--color-dark-20);
62
+ --chart-axis: var(--color-text-500);
63
+
64
+ /* Its own step, not a flip of the dark one: white fields on a near-white
65
+ page need a darker hairline than dark fields on a dark page do. */
66
+ --border-field: var(--color-dark-24);
67
+
68
+ /* The relationship survives the flip: the panel stays one step above the
69
+ fields, both just lighter now. */
70
+ --surface-form: var(--color-dark-14);
71
+ --surface-field: var(--color-dark-8);
72
+
73
+ /* Recessed reads as a light grey here, not as the extreme of the ramp. */
74
+ --surface-code: var(--color-dark-16);
75
+ --text-code: var(--color-text-100);
76
+ --border-code: var(--color-dark-20);
77
+
78
+ /* Inverted really is inverted: a dark bubble on a light page. */
79
+ --surface-inverted: rgba(29, 28, 34, 1);
80
+ --text-inverted: rgba(244, 244, 245, 1);
81
+ }
82
+
83
+ /* data-theme="auto" defers to the OS setting. */
84
+ @media (prefers-color-scheme: light) {
85
+ :root[data-theme='auto'],
86
+ [data-theme='auto'] {
87
+ color-scheme: light;
88
+
89
+ --color-white: rgba(255, 255, 255, 1);
90
+
91
+ --color-text-100: rgba(28, 28, 30, 1);
92
+ --color-text-400: rgba(80, 80, 90, 1);
93
+ --color-text-500: rgba(110, 110, 120, 1);
94
+ --color-text-600: rgba(130, 130, 140, 1);
95
+ --color-text-700: rgba(155, 155, 165, 1);
96
+ --color-text-800: rgba(180, 180, 190, 1);
97
+ --color-text-900: rgba(220, 220, 225, 1);
98
+
99
+ --color-dark-8: rgba(255, 255, 255, 1);
100
+ --color-dark-12: rgba(250, 250, 252, 1);
101
+ --color-dark-14: rgba(245, 245, 247, 1);
102
+ --color-dark-15: rgba(242, 242, 245, 1);
103
+ --color-dark-16: rgba(238, 238, 241, 1);
104
+ --color-dark-18: rgba(232, 232, 236, 1);
105
+ --color-dark-19: rgba(228, 228, 233, 1);
106
+ --color-dark-20: rgba(222, 222, 228, 1);
107
+ --color-dark-22: rgba(215, 215, 222, 1);
108
+ --color-dark-23: rgba(210, 210, 218, 1);
109
+ --color-dark-24: rgba(205, 205, 212, 1);
110
+
111
+ --color-navigation-top-icon: #1c1c1e;
112
+ --color-navigation-icon: #505050;
113
+
114
+ --color-overlay: rgba(80, 80, 90, 0.8);
115
+ --color-backdrop: rgba(0, 0, 0, 0.25);
116
+
117
+ /* The same eight hues, stepped for the light surface — not an automatic
118
+ flip. Four sit below 3:1 there, so the chart always ships its data
119
+ table: the relief the contrast warning requires. */
120
+ --chart-series-1: #2a78d6;
121
+ --chart-series-2: #eb6834;
122
+ --chart-series-3: #1baf7a;
123
+ --chart-series-4: #eda100;
124
+ --chart-series-5: #e87ba4;
125
+ --chart-series-6: #008300;
126
+ --chart-series-7: #4a3aa7;
127
+ --chart-series-8: #e34948;
128
+
129
+ --chart-grid: var(--color-dark-20);
130
+ --chart-axis: var(--color-text-500);
131
+
132
+ --border-field: var(--color-dark-24);
133
+
134
+ --surface-form: var(--color-dark-14);
135
+ --surface-field: var(--color-dark-8);
136
+
137
+ --surface-code: var(--color-dark-16);
138
+ --text-code: var(--color-text-100);
139
+ --border-code: var(--color-dark-20);
140
+
141
+ --surface-inverted: rgba(29, 28, 34, 1);
142
+ --text-inverted: rgba(244, 244, 245, 1);
143
+ }
144
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Kanto typography tokens (desktop scale).
3
+ *
4
+ * Type is exposed as composite `font` shorthands rather than separate
5
+ * size/weight/family tokens, so a text style is applied in one declaration and
6
+ * cannot be half-applied:
7
+ *
8
+ * h1 { font: var(--font-title-h1); }
9
+ *
10
+ * The families are factored out into `--font-family-*` so a swap only touches
11
+ * one line. Fallback stacks matter here: an app that skips `fonts.css` still
12
+ * gets a sensible system face.
13
+ */
14
+
15
+ :root {
16
+ /* === FAMILIES === */
17
+ --font-family-display: 'Manrope', 'Segoe UI', system-ui, sans-serif;
18
+ --font-family-body: 'Mulish', system-ui, -apple-system, 'Segoe UI', sans-serif;
19
+ --font-family-code: 'Source Code Pro', ui-monospace, 'SFMono-Regular', 'Menlo', monospace;
20
+
21
+ /* === TITLES (Manrope) === */
22
+ --font-title-studio: 400 48px/58px var(--font-family-display);
23
+ --font-title-h1: 600 36px/43px var(--font-family-display);
24
+ --font-title-h4: 400 24px/29px var(--font-family-display);
25
+ --font-title-h6: 600 18px var(--font-family-display);
26
+
27
+ /* Overline uses the body face despite living with the titles. */
28
+ --font-title-overline: 600 10px var(--font-family-body);
29
+
30
+ /* === BODY & UI (Mulish) === */
31
+ --font-normal-regular: 400 14px var(--font-family-body);
32
+ --font-normal-medium: 500 14px var(--font-family-body);
33
+ --font-normal-small: 400 12px var(--font-family-body);
34
+ --font-input: 400 14px var(--font-family-body);
35
+
36
+ /* === CODE === */
37
+ --font-code-regular: 400 14px var(--font-family-code);
38
+
39
+ /* === TRACKING === */
40
+ --letter-spacing-overline: 2px;
41
+ }
@@ -0,0 +1,143 @@
1
+ /**
2
+ * Vue integration for the Kanto elements.
3
+ *
4
+ * There are no per-component wrappers here, and that is the point. Vue 3
5
+ * renders custom elements natively and sets non-primitive bindings as DOM
6
+ * properties, so `<kt-select :options="regions">` already works. A wrapper
7
+ * layer would only be one more thing to keep in sync.
8
+ *
9
+ * What Vue cannot infer on its own is which tags are custom elements, and what
10
+ * they accept. That is what this module supplies.
11
+ *
12
+ * ```ts
13
+ * // vite.config.ts
14
+ * import vue from '@vitejs/plugin-vue';
15
+ * import { isKantoElement } from 'kanto-ds/vue';
16
+ *
17
+ * export default defineConfig({
18
+ * plugins: [vue({ template: { compilerOptions: { isCustomElement: isKantoElement } } })],
19
+ * });
20
+ * ```
21
+ *
22
+ * ```ts
23
+ * // main.ts
24
+ * import 'kanto-ds/vue'; // registers every element
25
+ * import 'kanto-ds/styles.css';
26
+ * ```
27
+ *
28
+ * Vue is a peer dependency: importing this module in a project without Vue
29
+ * still works, since nothing here is imported from `vue` at runtime.
30
+ */
31
+ import type { Plugin } from 'vue';
32
+ import '../index.js';
33
+ import type { KtAvatar } from 'kanto-ds';
34
+ import type { KtBadge } from 'kanto-ds';
35
+ import type { KtButton } from 'kanto-ds';
36
+ import type { KtCard } from 'kanto-ds';
37
+ import type { KtCode } from 'kanto-ds';
38
+ import type { KtIcon } from 'kanto-ds';
39
+ import type { KtKbd } from 'kanto-ds';
40
+ import type { KtDragDrop } from 'kanto-ds';
41
+ import type { KtForm } from 'kanto-ds';
42
+ import type { KtInput } from 'kanto-ds';
43
+ import type { KtInputMenu } from 'kanto-ds';
44
+ import type { KtLabelInput } from 'kanto-ds';
45
+ import type { KtSelect } from 'kanto-ds';
46
+ import type { KtTextarea } from 'kanto-ds';
47
+ import type { KtToggle } from 'kanto-ds';
48
+ import type { KtBreadcrumb } from 'kanto-ds';
49
+ import type { KtPageHeader } from 'kanto-ds';
50
+ import type { KtSegmentedControl } from 'kanto-ds';
51
+ import type { KtSubMenuNavigation } from 'kanto-ds';
52
+ import type { KtTabs } from 'kanto-ds';
53
+ import type { KtHeader } from 'kanto-ds';
54
+ import type { KtToggleButton } from 'kanto-ds';
55
+ import type { KtToggleButtonGroup } from 'kanto-ds';
56
+ import type { KtAlert } from 'kanto-ds';
57
+ import type { KtEmptyState } from 'kanto-ds';
58
+ import type { KtProgressBar } from 'kanto-ds';
59
+ import type { KtSkeleton } from 'kanto-ds';
60
+ import type { KtToast } from 'kanto-ds';
61
+ import type { KtToastContainer } from 'kanto-ds';
62
+ import type { KtTooltip } from 'kanto-ds';
63
+ import type { KtCollapsible } from 'kanto-ds';
64
+ import type { KtConfirmDialog } from 'kanto-ds';
65
+ import type { KtDropdown } from 'kanto-ds';
66
+ import type { KtModal } from 'kanto-ds';
67
+ import type { KtSidePanel } from 'kanto-ds';
68
+ import type { KtChart } from 'kanto-ds';
69
+ import type { KtMeter } from 'kanto-ds';
70
+ import type { KtPagination } from 'kanto-ds';
71
+ import type { KtStat } from 'kanto-ds';
72
+ import type { KtTable } from 'kanto-ds';
73
+ import type { KtTimeline, KtTimelineItem } from 'kanto-ds';
74
+ /**
75
+ * True for any Kanto custom element.
76
+ *
77
+ * Pass it as `compilerOptions.isCustomElement` so the Vue compiler stops
78
+ * trying to resolve `kt-*` tags as components.
79
+ */
80
+ export declare function isKantoElement(tag: string): boolean;
81
+ /** Every element's tag name, for anyone building their own predicate. */
82
+ export declare const KANTO_TAG_PREFIX = "kt-";
83
+ /**
84
+ * What a Kanto element accepts in a template: its own properties, plus the
85
+ * attributes and listeners any element takes.
86
+ */
87
+ type KtProps<T> = Partial<T> & Record<`on${string}`, unknown> & {
88
+ class?: unknown;
89
+ style?: unknown;
90
+ };
91
+ declare module 'vue' {
92
+ interface GlobalComponents {
93
+ 'kt-avatar': KtProps<KtAvatar>;
94
+ 'kt-badge': KtProps<KtBadge>;
95
+ 'kt-button': KtProps<KtButton>;
96
+ 'kt-card': KtProps<KtCard>;
97
+ 'kt-code': KtProps<KtCode>;
98
+ 'kt-icon': KtProps<KtIcon>;
99
+ 'kt-kbd': KtProps<KtKbd>;
100
+ 'kt-drag-drop': KtProps<KtDragDrop>;
101
+ 'kt-form': KtProps<KtForm>;
102
+ 'kt-input': KtProps<KtInput>;
103
+ 'kt-input-menu': KtProps<KtInputMenu>;
104
+ 'kt-label-input': KtProps<KtLabelInput>;
105
+ 'kt-select': KtProps<KtSelect>;
106
+ 'kt-textarea': KtProps<KtTextarea>;
107
+ 'kt-toggle': KtProps<KtToggle>;
108
+ 'kt-breadcrumb': KtProps<KtBreadcrumb>;
109
+ 'kt-page-header': KtProps<KtPageHeader>;
110
+ 'kt-segmented-control': KtProps<KtSegmentedControl>;
111
+ 'kt-sub-menu-navigation': KtProps<KtSubMenuNavigation>;
112
+ 'kt-tabs': KtProps<KtTabs>;
113
+ 'kt-header': KtProps<KtHeader>;
114
+ 'kt-toggle-button': KtProps<KtToggleButton>;
115
+ 'kt-toggle-button-group': KtProps<KtToggleButtonGroup>;
116
+ 'kt-alert': KtProps<KtAlert>;
117
+ 'kt-empty-state': KtProps<KtEmptyState>;
118
+ 'kt-progress-bar': KtProps<KtProgressBar>;
119
+ 'kt-skeleton': KtProps<KtSkeleton>;
120
+ 'kt-toast': KtProps<KtToast>;
121
+ 'kt-toast-container': KtProps<KtToastContainer>;
122
+ 'kt-tooltip': KtProps<KtTooltip>;
123
+ 'kt-collapsible': KtProps<KtCollapsible>;
124
+ 'kt-confirm-dialog': KtProps<KtConfirmDialog>;
125
+ 'kt-dropdown': KtProps<KtDropdown>;
126
+ 'kt-modal': KtProps<KtModal>;
127
+ 'kt-side-panel': KtProps<KtSidePanel>;
128
+ 'kt-chart': KtProps<KtChart>;
129
+ 'kt-meter': KtProps<KtMeter>;
130
+ 'kt-pagination': KtProps<KtPagination>;
131
+ 'kt-stat': KtProps<KtStat>;
132
+ 'kt-table': KtProps<KtTable>;
133
+ 'kt-timeline': KtProps<KtTimeline>;
134
+ 'kt-timeline-item': KtProps<KtTimelineItem>;
135
+ }
136
+ }
137
+ /**
138
+ * A no-op plugin, for apps that would rather write `app.use(kanto)` than a
139
+ * bare side-effect import. Importing this module already registers every
140
+ * element; this only makes that visible in `main.ts`.
141
+ */
142
+ export declare const kanto: Plugin;
143
+ export { toaster } from '../components/feedback/kt-toast-container/toaster.js';
@@ -0,0 +1,56 @@
1
+ import "../components/core/kt-avatar/kt-avatar.js";
2
+ import "../components/core/kt-badge/kt-badge.js";
3
+ import "../components/core/kt-button/kt-button.js";
4
+ import "../components/core/kt-card/kt-card.js";
5
+ import "../components/core/kt-code/kt-code.js";
6
+ import "../components/core/kt-icon/kt-icon.js";
7
+ import "../components/core/kt-kbd/kt-kbd.js";
8
+ import "../components/forms/kt-drag-drop/kt-drag-drop.js";
9
+ import "../components/forms/kt-form/kt-form.js";
10
+ import "../components/forms/kt-input/kt-input.js";
11
+ import "../components/forms/kt-input-menu/kt-input-menu.js";
12
+ import "../components/forms/kt-label-input/kt-label-input.js";
13
+ import "../components/forms/kt-select/kt-select.js";
14
+ import "../components/forms/kt-textarea/kt-textarea.js";
15
+ import "../components/forms/kt-toggle/kt-toggle.js";
16
+ import "../components/navigation/kt-breadcrumb/kt-breadcrumb.js";
17
+ import "../components/navigation/kt-page-header/kt-page-header.js";
18
+ import "../components/navigation/kt-segmented-control/kt-segmented-control.js";
19
+ import "../components/navigation/kt-sub-menu-navigation/kt-sub-menu-navigation.js";
20
+ import "../components/navigation/kt-tabs/kt-tabs.js";
21
+ import "../components/navigation/kt-header/kt-header.js";
22
+ import "../components/navigation/kt-toggle-button/kt-toggle-button.js";
23
+ import "../components/navigation/kt-toggle-button-group/kt-toggle-button-group.js";
24
+ import "../components/feedback/kt-alert/kt-alert.js";
25
+ import "../components/feedback/kt-empty-state/kt-empty-state.js";
26
+ import "../components/feedback/kt-progress-bar/kt-progress-bar.js";
27
+ import "../components/feedback/kt-skeleton/kt-skeleton.js";
28
+ import "../components/feedback/kt-toast/kt-toast.js";
29
+ import "../components/feedback/kt-toast-container/kt-toast-container.js";
30
+ import { t as Q } from "../chunks/toaster-PmdKSV5x.js";
31
+ import "../components/feedback/kt-tooltip/kt-tooltip.js";
32
+ import "../components/overlays/kt-collapsible/kt-collapsible.js";
33
+ import "../components/overlays/kt-confirm-dialog/kt-confirm-dialog.js";
34
+ import "../components/overlays/kt-dropdown/kt-dropdown.js";
35
+ import "../components/overlays/kt-modal/kt-modal.js";
36
+ import "../components/overlays/kt-side-panel/kt-side-panel.js";
37
+ import "../components/data/kt-chart/kt-chart.js";
38
+ import "../components/data/kt-meter/kt-meter.js";
39
+ import "../components/data/kt-pagination/kt-pagination.js";
40
+ import "../components/data/kt-stat/kt-stat.js";
41
+ import "../components/data/kt-table/kt-table.js";
42
+ import "../components/data/kt-timeline/kt-timeline.js";
43
+ function D(t) {
44
+ return t.startsWith("kt-");
45
+ }
46
+ const H = "kt-", J = {
47
+ install() {
48
+ }
49
+ };
50
+ export {
51
+ H as KANTO_TAG_PREFIX,
52
+ D as isKantoElement,
53
+ J as kanto,
54
+ Q as toaster
55
+ };
56
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/vue/index.ts"],"sourcesContent":["/**\n * Vue integration for the Kanto elements.\n *\n * There are no per-component wrappers here, and that is the point. Vue 3\n * renders custom elements natively and sets non-primitive bindings as DOM\n * properties, so `<kt-select :options=\"regions\">` already works. A wrapper\n * layer would only be one more thing to keep in sync.\n *\n * What Vue cannot infer on its own is which tags are custom elements, and what\n * they accept. That is what this module supplies.\n *\n * ```ts\n * // vite.config.ts\n * import vue from '@vitejs/plugin-vue';\n * import { isKantoElement } from 'kanto-ds/vue';\n *\n * export default defineConfig({\n * plugins: [vue({ template: { compilerOptions: { isCustomElement: isKantoElement } } })],\n * });\n * ```\n *\n * ```ts\n * // main.ts\n * import 'kanto-ds/vue'; // registers every element\n * import 'kanto-ds/styles.css';\n * ```\n *\n * Vue is a peer dependency: importing this module in a project without Vue\n * still works, since nothing here is imported from `vue` at runtime.\n */\n// Type-only, so nothing from Vue is pulled in at runtime — but the import is\n// what lets TypeScript resolve the module we augment below.\nimport type { Plugin } from 'vue';\n\nimport '../index.js';\n\nimport type { KtAvatar } from 'kanto-ds';\nimport type { KtBadge } from 'kanto-ds';\nimport type { KtButton } from 'kanto-ds';\nimport type { KtCard } from 'kanto-ds';\nimport type { KtCode } from 'kanto-ds';\nimport type { KtIcon } from 'kanto-ds';\nimport type { KtKbd } from 'kanto-ds';\nimport type { KtDragDrop } from 'kanto-ds';\nimport type { KtForm } from 'kanto-ds';\nimport type { KtInput } from 'kanto-ds';\nimport type { KtInputMenu } from 'kanto-ds';\nimport type { KtLabelInput } from 'kanto-ds';\nimport type { KtSelect } from 'kanto-ds';\nimport type { KtTextarea } from 'kanto-ds';\nimport type { KtToggle } from 'kanto-ds';\nimport type { KtBreadcrumb } from 'kanto-ds';\nimport type { KtPageHeader } from 'kanto-ds';\nimport type { KtSegmentedControl } from 'kanto-ds';\nimport type { KtSubMenuNavigation } from 'kanto-ds';\nimport type { KtTabs } from 'kanto-ds';\nimport type { KtHeader } from 'kanto-ds';\nimport type { KtToggleButton } from 'kanto-ds';\nimport type { KtToggleButtonGroup } from 'kanto-ds';\nimport type { KtAlert } from 'kanto-ds';\nimport type { KtEmptyState } from 'kanto-ds';\nimport type { KtProgressBar } from 'kanto-ds';\nimport type { KtSkeleton } from 'kanto-ds';\nimport type { KtToast } from 'kanto-ds';\nimport type { KtToastContainer } from 'kanto-ds';\nimport type { KtTooltip } from 'kanto-ds';\nimport type { KtCollapsible } from 'kanto-ds';\nimport type { KtConfirmDialog } from 'kanto-ds';\nimport type { KtDropdown } from 'kanto-ds';\nimport type { KtModal } from 'kanto-ds';\nimport type { KtSidePanel } from 'kanto-ds';\nimport type { KtChart } from 'kanto-ds';\nimport type { KtMeter } from 'kanto-ds';\nimport type { KtPagination } from 'kanto-ds';\nimport type { KtStat } from 'kanto-ds';\nimport type { KtTable } from 'kanto-ds';\nimport type { KtTimeline, KtTimelineItem } from 'kanto-ds';\n\n/**\n * True for any Kanto custom element.\n *\n * Pass it as `compilerOptions.isCustomElement` so the Vue compiler stops\n * trying to resolve `kt-*` tags as components.\n */\nexport function isKantoElement(tag: string): boolean {\n return tag.startsWith('kt-');\n}\n\n/** Every element's tag name, for anyone building their own predicate. */\nexport const KANTO_TAG_PREFIX = 'kt-';\n\n/**\n * What a Kanto element accepts in a template: its own properties, plus the\n * attributes and listeners any element takes.\n */\ntype KtProps<T> = Partial<T> &\n Record<`on${string}`, unknown> & { class?: unknown; style?: unknown };\n\ndeclare module 'vue' {\n interface GlobalComponents {\n 'kt-avatar': KtProps<KtAvatar>;\n 'kt-badge': KtProps<KtBadge>;\n 'kt-button': KtProps<KtButton>;\n 'kt-card': KtProps<KtCard>;\n 'kt-code': KtProps<KtCode>;\n 'kt-icon': KtProps<KtIcon>;\n 'kt-kbd': KtProps<KtKbd>;\n 'kt-drag-drop': KtProps<KtDragDrop>;\n 'kt-form': KtProps<KtForm>;\n 'kt-input': KtProps<KtInput>;\n 'kt-input-menu': KtProps<KtInputMenu>;\n 'kt-label-input': KtProps<KtLabelInput>;\n 'kt-select': KtProps<KtSelect>;\n 'kt-textarea': KtProps<KtTextarea>;\n 'kt-toggle': KtProps<KtToggle>;\n 'kt-breadcrumb': KtProps<KtBreadcrumb>;\n 'kt-page-header': KtProps<KtPageHeader>;\n 'kt-segmented-control': KtProps<KtSegmentedControl>;\n 'kt-sub-menu-navigation': KtProps<KtSubMenuNavigation>;\n 'kt-tabs': KtProps<KtTabs>;\n 'kt-header': KtProps<KtHeader>;\n 'kt-toggle-button': KtProps<KtToggleButton>;\n 'kt-toggle-button-group': KtProps<KtToggleButtonGroup>;\n 'kt-alert': KtProps<KtAlert>;\n 'kt-empty-state': KtProps<KtEmptyState>;\n 'kt-progress-bar': KtProps<KtProgressBar>;\n 'kt-skeleton': KtProps<KtSkeleton>;\n 'kt-toast': KtProps<KtToast>;\n 'kt-toast-container': KtProps<KtToastContainer>;\n 'kt-tooltip': KtProps<KtTooltip>;\n 'kt-collapsible': KtProps<KtCollapsible>;\n 'kt-confirm-dialog': KtProps<KtConfirmDialog>;\n 'kt-dropdown': KtProps<KtDropdown>;\n 'kt-modal': KtProps<KtModal>;\n 'kt-side-panel': KtProps<KtSidePanel>;\n 'kt-chart': KtProps<KtChart>;\n 'kt-meter': KtProps<KtMeter>;\n 'kt-pagination': KtProps<KtPagination>;\n 'kt-stat': KtProps<KtStat>;\n 'kt-table': KtProps<KtTable>;\n 'kt-timeline': KtProps<KtTimeline>;\n 'kt-timeline-item': KtProps<KtTimelineItem>;\n }\n}\n\n/**\n * A no-op plugin, for apps that would rather write `app.use(kanto)` than a\n * bare side-effect import. Importing this module already registers every\n * element; this only makes that visible in `main.ts`.\n */\nexport const kanto: Plugin = {\n install() {\n /* the elements register themselves on import */\n },\n};\n\nexport { toaster } from '../components/feedback/kt-toast-container/toaster.js';\n"],"names":["isKantoElement","tag","KANTO_TAG_PREFIX","kanto"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFO,SAASA,EAAeC,GAAsB;AACnD,SAAOA,EAAI,WAAW,KAAK;AAC7B;AAGO,MAAMC,IAAmB,OA6DnBC,IAAgB;AAAA,EAC3B,UAAU;AAAA,EAEV;AACF;"}