@kupola/kupola 1.2.0 → 1.4.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 (111) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +330 -286
  3. package/adapters/axios.d.ts +34 -0
  4. package/adapters/axios.js +122 -0
  5. package/adapters/navios-http.d.ts +110 -0
  6. package/adapters/navios-http.js +151 -0
  7. package/css/components-ext.css +157 -0
  8. package/css/components.css +69 -0
  9. package/css/theme-dark.css +5 -5
  10. package/css/utilities.css +119 -1
  11. package/dist/css/accessibility.css +119 -0
  12. package/dist/css/animations.css +224 -0
  13. package/dist/css/brand-themes.css +300 -0
  14. package/dist/css/colors_and_type.css +441 -0
  15. package/dist/css/components-ext.css +4165 -0
  16. package/dist/css/components.css +1483 -0
  17. package/dist/css/kupola.css +1 -12
  18. package/dist/css/kupola.min.css +1 -0
  19. package/dist/css/responsive.css +697 -0
  20. package/dist/css/scaffold.css +145 -0
  21. package/dist/css/states.css +316 -0
  22. package/dist/css/theme-dark.css +296 -0
  23. package/dist/css/theme-light.css +296 -0
  24. package/dist/css/utilities.css +171 -0
  25. package/dist/icons.svg +284 -0
  26. package/dist/kupola.cjs.js +17409 -257
  27. package/dist/kupola.cjs.js.map +1 -1
  28. package/dist/kupola.css +9000 -0
  29. package/dist/kupola.esm.js +17183 -7597
  30. package/dist/kupola.esm.js.map +1 -1
  31. package/dist/kupola.min.css +1 -0
  32. package/dist/kupola.min.js +2 -0
  33. package/dist/kupola.min.js.map +1 -0
  34. package/dist/kupola.umd.js +17415 -257
  35. package/dist/kupola.umd.js.map +1 -1
  36. package/dist/plugins/vite-plugin-kupola.js +120 -0
  37. package/dist/types/kupola.d.ts +421 -323
  38. package/js/calendar.js +334 -25
  39. package/js/carousel.js +182 -48
  40. package/js/collapse.js +148 -34
  41. package/js/color-picker.js +416 -108
  42. package/js/component.js +8 -19
  43. package/js/countdown.js +9 -8
  44. package/js/data-bind.js +73 -16
  45. package/js/datepicker.js +488 -110
  46. package/js/depends.js +710 -0
  47. package/js/dialog.js +4 -2
  48. package/js/drawer.js +172 -8
  49. package/js/dropdown.js +272 -17
  50. package/js/dynamic-tags.js +156 -40
  51. package/js/fileupload.js +9 -8
  52. package/js/form.js +280 -254
  53. package/js/global-events.js +281 -188
  54. package/js/heatmap.js +10 -7
  55. package/js/i18n.js +18 -10
  56. package/js/icons.js +141 -161
  57. package/js/image-preview.js +146 -2
  58. package/js/initializer.js +151 -71
  59. package/js/kupola-core.js +123 -45
  60. package/js/kupola-lifecycle.js +13 -11
  61. package/js/message.js +8 -1
  62. package/js/modal.js +207 -59
  63. package/js/notification.js +8 -1
  64. package/js/numberinput.js +9 -8
  65. package/js/pagination.js +263 -0
  66. package/js/registry.js +29 -12
  67. package/js/select.js +482 -27
  68. package/js/slide-captcha.js +11 -2
  69. package/js/slider.js +442 -25
  70. package/js/statcard.js +9 -7
  71. package/js/table.js +1210 -0
  72. package/js/tag.js +268 -14
  73. package/js/theme-standalone.js +88 -0
  74. package/js/theme.js +14 -43
  75. package/js/timepicker.js +335 -66
  76. package/js/tooltip.js +317 -86
  77. package/js/utils.js +6 -2
  78. package/js/validation.js +6 -2
  79. package/js/virtual-list.js +11 -7
  80. package/js/web-components.js +288 -0
  81. package/package.json +81 -67
  82. package/plugins/vite-plugin-kupola.js +120 -0
  83. package/scripts/build-css.cjs +113 -0
  84. package/scripts/build-svg-sprite.cjs +107 -0
  85. package/types/kupola.d.ts +421 -323
  86. package/CHANGELOG.md +0 -130
  87. package/INTEGRATION.md +0 -440
  88. package/PROJECT_SUMMARY.md +0 -312
  89. package/SKILL.md +0 -572
  90. package/dist/utils/utils/Kupola.cs +0 -77
  91. package/dist/utils/utils/Kupola.java +0 -104
  92. package/dist/utils/utils/kupola.go +0 -120
  93. package/dist/utils/utils/kupola.js +0 -63
  94. package/dist/utils/utils/kupola.py +0 -1392
  95. package/dist/utils/utils/kupola.rb +0 -69
  96. package/js/composition-api.js +0 -458
  97. package/js/error-handler.js +0 -181
  98. package/js/http.js +0 -419
  99. package/js/kupola-devtools.js +0 -598
  100. package/js/performance.js +0 -250
  101. package/js/router.js +0 -396
  102. package/js/security.js +0 -189
  103. package/js/test-utils.js +0 -251
  104. package/templates/base.html +0 -30
  105. package/templates/base_dashboard.html +0 -99
  106. package/utils/Kupola.cs +0 -77
  107. package/utils/Kupola.java +0 -104
  108. package/utils/kupola.go +0 -120
  109. package/utils/kupola.js +0 -63
  110. package/utils/kupola.py +0 -1392
  111. package/utils/kupola.rb +0 -69
@@ -0,0 +1,145 @@
1
+ /*
2
+ * scaffold.css - Layout, reset, typography utilities, shared atoms
3
+ * Provides the page chrome consumed by preview/component-*.html and
4
+ * ui_kits/*.html. Component-specific styles live in components.css.
5
+ */
6
+ @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');
7
+ * { box-sizing: border-box; margin: 0; padding: 0; }
8
+
9
+ html, body {
10
+ background: var(--bg-base-default);
11
+ color: var(--text-default);
12
+ font-family: var(--body-base-font-family);
13
+ font-size: var(--body-base-font-size);
14
+ line-height: var(--body-base-line-height);
15
+ font-weight: var(--body-base-font-weight);
16
+ min-height: 100%;
17
+ }
18
+ html, body { overflow-x: hidden; max-width: 100%; }
19
+ body { padding: 0; }
20
+ img, svg, video, canvas { max-width: 100%; }
21
+ img.icon {
22
+ opacity: 1;
23
+ filter: var(--icon-filter, none);
24
+ }
25
+ a { color: var(--text-default); text-decoration: none; }
26
+ a:hover { color: var(--text-default-hover); }
27
+ hr { border: 0; border-top: 1px solid var(--border-neutral-l1); margin: var(--spacer-24) 0; }
28
+
29
+ /* Section / heading helpers */
30
+ .h1 { font-family: var(--heading-2xl-font-family); font-size: var(--heading-2xl-font-size); line-height: var(--heading-2xl-line-height); font-weight: var(--heading-2xl-font-weight); color: var(--text-default); }
31
+ .h2 { font-family: var(--heading-md-font-family); font-size: var(--heading-md-font-size); line-height: var(--heading-md-line-height); font-weight: var(--heading-md-font-weight); color: var(--text-default); }
32
+ .h3 { font-family: var(--heading-sm-font-family); font-size: var(--heading-sm-font-size); line-height: var(--heading-sm-line-height); font-weight: var(--heading-sm-font-weight); color: var(--text-default); }
33
+ .eyebrow { font-size: var(--body-xs-font-size); line-height: var(--body-xs-line-height); color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.08em; }
34
+ .text-secondary { color: var(--text-secondary); }
35
+ .text-tertiary { color: var(--text-tertiary); }
36
+
37
+ /* ===== Hero / brand title =====
38
+ * Display title for marketing heroes ("The Real AI Engineer"-style). Each
39
+ * brand-led letter (T / R / A / E or "T"-"R"-"A"-"E") gets its own brand
40
+ * accent. Use the .ds-hero-title element with .brand1-.brand4 children.
41
+ * Numerics inside any hero MUST inherit the body sans (NOT mono) — heroes
42
+ * are typeset content, not data.
43
+ */
44
+ .ds-hero-title {
45
+ font-family: var(--heading-3xl-font-family);
46
+ font-size: clamp(40px, 6vw, 72px);
47
+ line-height: 1.04;
48
+ font-weight: var(--heading-3xl-font-weight, 600);
49
+ letter-spacing: -0.03em;
50
+ color: var(--text-default);
51
+ }
52
+ .ds-hero-title .brand1 { color: var(--bg-brand); }
53
+ .ds-hero-title .brand2 { color: var(--text-default); }
54
+ .ds-hero-title .brand3 { color: var(--bg-brand); }
55
+ .ds-hero-title .brand4 { color: var(--text-default); }
56
+ .ds-hero-title__sub {
57
+ display: block;
58
+ margin-top: var(--spacer-12);
59
+ font-size: clamp(28px, 4vw, 56px);
60
+ color: var(--text-secondary);
61
+ letter-spacing: -0.02em;
62
+ }
63
+
64
+ /* ===== Section title with mono index =====
65
+ * Pattern: [00] brand-mono index above a 2-line section heading.
66
+ * Reference: trae.ai value-section card titles.
67
+ */
68
+ .ds-section-title__index {
69
+ display: block;
70
+ font-family: var(--code-editor-font-family, 'JetBrains Mono', ui-monospace, monospace);
71
+ font-size: var(--body-sm-font-size, 14px);
72
+ line-height: 1;
73
+ letter-spacing: 0.02em;
74
+ color: var(--bg-brand);
75
+ margin-bottom: var(--spacer-16);
76
+ }
77
+ .ds-section-title {
78
+ font-family: var(--heading-xl-font-family, var(--heading-3xl-font-family));
79
+ font-size: clamp(24px, 2.4vw, 32px);
80
+ line-height: 1.2;
81
+ letter-spacing: -0.01em;
82
+ color: var(--text-default);
83
+ font-weight: var(--font-weight-strong, 600);
84
+ margin: 0;
85
+ }
86
+
87
+ /* ===== Layout helpers ===== */
88
+ .row { display: flex; gap: var(--spacer-12); flex-wrap: wrap; align-items: center; }
89
+ .col { display: flex; flex-direction: column; gap: var(--spacer-12); }
90
+ .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--spacer-16); }
91
+ .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--spacer-16); }
92
+ .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--spacer-16); }
93
+ .stack-8 { display: flex; flex-direction: column; gap: var(--spacer-8); }
94
+ .stack-12 { display: flex; flex-direction: column; gap: var(--spacer-12); }
95
+ .stack-16 { display: flex; flex-direction: column; gap: var(--spacer-16); }
96
+ .stack-24 { display: flex; flex-direction: column; gap: var(--spacer-24); }
97
+ .stack-40 { display: flex; flex-direction: column; gap: var(--spacer-40); }
98
+
99
+ /* preview header (per page) */
100
+ .pv-header { margin-bottom: var(--spacer-32); padding-bottom: var(--spacer-16); border-bottom: 1px solid var(--border-neutral-l1); }
101
+ .pv-header h1 { font-size: var(--heading-lg-font-size); line-height: var(--heading-lg-line-height); font-weight: var(--heading-lg-font-weight); margin-bottom: var(--spacer-4); }
102
+ .pv-header p { color: var(--text-secondary); font-size: var(--body-sm-font-size); }
103
+
104
+ .pv-section { margin-bottom: var(--spacer-32); }
105
+ .pv-section__title { font-size: var(--heading-xs-font-size); font-weight: var(--heading-xs-font-weight); margin-bottom: var(--spacer-12); color: var(--text-default); }
106
+ .pv-section__sub { font-size: var(--body-xs-font-size); color: var(--text-tertiary); margin-bottom: var(--spacer-12); }
107
+
108
+ /* ===== Popover ===== */
109
+ .ds-popover {
110
+ background: var(--bg-overlay-l1);
111
+ border: 1px solid var(--border-neutral-l1);
112
+ border-radius: var(--radius-4);
113
+ padding: var(--spacer-12);
114
+ box-shadow: 0 12px 32px rgba(0,0,0,.36);
115
+ }
116
+
117
+ /* ===== Code block ===== */
118
+ .ds-code {
119
+ background: var(--bg-overlay-l1);
120
+ border: 1px solid var(--border-neutral-l1);
121
+ border-radius: var(--radius-4);
122
+ padding: var(--spacer-12) var(--spacer-16);
123
+ color: var(--text-default);
124
+ font-family: var(--code-editor-font-family);
125
+ font-size: var(--code-editor-font-size);
126
+ line-height: var(--code-editor-line-height);
127
+ white-space: pre;
128
+ overflow: auto;
129
+ }
130
+
131
+ /* ===== Kbd =====
132
+ * Defined in components.css (see ── Kbd ─ section). Avoid duplicating here.
133
+ */
134
+
135
+ /* ===== Mono / Numeric utilities =====
136
+ * Anything code-like or numeric (counts, currencies, percentages, IDs,
137
+ * tabular cells, kbd, code) MUST use the mono token + tabular figures.
138
+ */
139
+ .mono,
140
+ .num,
141
+ code, kbd, samp, pre {
142
+ font-family: var(--code-editor-font-family);
143
+ font-variant-numeric: tabular-nums;
144
+ font-feature-settings: "tnum" 1, "lnum" 1;
145
+ }
@@ -0,0 +1,316 @@
1
+ /* ===== Component States ===== */
2
+
3
+ /* Loading State */
4
+ .ds-loading {
5
+ position: relative;
6
+ overflow: hidden;
7
+ pointer-events: none;
8
+ opacity: 0.6;
9
+ }
10
+
11
+ .ds-loading::after {
12
+ content: '';
13
+ position: absolute;
14
+ top: 0;
15
+ left: -100%;
16
+ width: 100%;
17
+ height: 100%;
18
+ background: linear-gradient(90deg, transparent, rgba(224, 226, 242, 0.1), transparent);
19
+ animation: loading-shimmer 1.5s infinite;
20
+ }
21
+
22
+ @keyframes loading-shimmer {
23
+ 100% { left: 100%; }
24
+ }
25
+
26
+ .ds-btn--loading {
27
+ color: transparent !important;
28
+ }
29
+
30
+ .ds-btn--loading::after {
31
+ content: '';
32
+ position: absolute;
33
+ width: 14px;
34
+ height: 14px;
35
+ border: 2px solid currentColor;
36
+ border-top-color: transparent;
37
+ border-radius: 50%;
38
+ animation: loading-spin 0.8s linear infinite;
39
+ }
40
+
41
+ @keyframes loading-spin {
42
+ to { transform: rotate(360deg); }
43
+ }
44
+
45
+ /* Disabled State */
46
+ .ds-btn[disabled],
47
+ .ds-input[disabled],
48
+ .ds-select__trigger[disabled],
49
+ .ds-textarea[disabled] {
50
+ opacity: 0.5;
51
+ cursor: not-allowed;
52
+ }
53
+
54
+ /* Focus State */
55
+ .ds-btn:focus-visible,
56
+ .ds-input:focus-within,
57
+ .ds-select__trigger:focus-visible,
58
+ .ds-textarea:focus {
59
+ outline: 2px solid var(--border-brand);
60
+ outline-offset: 2px;
61
+ }
62
+
63
+ /* Error State */
64
+ .ds-input--error {
65
+ border-color: var(--status-error-default) !important;
66
+ }
67
+
68
+ .ds-input--error:focus-within {
69
+ border-color: var(--status-error-default) !important;
70
+ background: var(--status-error-surface-l1) !important;
71
+ }
72
+
73
+ .ds-field__error {
74
+ font-size: var(--body-xs-font-size);
75
+ color: var(--status-error-default);
76
+ margin-top: var(--spacer-4);
77
+ }
78
+
79
+ /* Success State */
80
+ .ds-input--success {
81
+ border-color: var(--status-success-default);
82
+ }
83
+
84
+ .ds-input--success:focus-within {
85
+ border-color: var(--status-success-default);
86
+ background: var(--status-success-surface-l1);
87
+ }
88
+
89
+ /* Warning State */
90
+ .ds-input--warning {
91
+ border-color: var(--status-warning-default);
92
+ }
93
+
94
+ .ds-input--warning:focus-within {
95
+ border-color: var(--status-warning-default);
96
+ background: var(--status-warning-surface-l1);
97
+ }
98
+
99
+ /* Progress Circle States */
100
+ .ds-progress-circle.ds-loading {
101
+ opacity: 0.6;
102
+ }
103
+
104
+ .ds-progress-circle.ds-loading .ds-progress-circle__bar {
105
+ animation: loading-spin 2s linear infinite;
106
+ }
107
+
108
+ /* Slider States */
109
+ .ds-slider__input:disabled {
110
+ opacity: 0.5;
111
+ cursor: not-allowed;
112
+ }
113
+
114
+ .ds-slider__input:focus-visible {
115
+ outline: 2px solid var(--border-brand);
116
+ outline-offset: 4px;
117
+ }
118
+
119
+ .ds-slider.ds-loading .ds-slider__track {
120
+ opacity: 0.6;
121
+ }
122
+
123
+ /* Date Picker States */
124
+ .ds-datepicker[aria-disabled="true"] {
125
+ opacity: 0.5;
126
+ pointer-events: none;
127
+ }
128
+
129
+ .ds-datepicker__input-wrap[aria-invalid="true"] {
130
+ border-color: var(--status-error-default);
131
+ }
132
+
133
+ .ds-datepicker__nav[disabled] {
134
+ opacity: 0.5;
135
+ cursor: not-allowed;
136
+ }
137
+
138
+ /* File Upload States */
139
+ .ds-fileupload__dropzone[aria-disabled="true"],
140
+ .ds-fileupload--disabled .ds-fileupload__dropzone {
141
+ opacity: 0.6;
142
+ cursor: not-allowed;
143
+ border-style: solid;
144
+ border-color: var(--border-neutral-l3);
145
+ background-color: var(--bg-overlay-l3);
146
+ }
147
+
148
+ .ds-fileupload__dropzone.is-error {
149
+ border-color: var(--status-error-default);
150
+ background-color: var(--status-error-surface-l1);
151
+ }
152
+
153
+ .ds-fileupload__dropzone.is-success {
154
+ border-color: var(--status-success-default);
155
+ background-color: var(--status-success-surface-l1);
156
+ }
157
+
158
+ /* Timeline States */
159
+ .ds-timeline__item[aria-current="true"] .ds-timeline__marker {
160
+ box-shadow: 0 0 0 4px var(--bg-brand-popup);
161
+ }
162
+
163
+ .ds-timeline__item[aria-disabled="true"] {
164
+ opacity: 0.5;
165
+ pointer-events: none;
166
+ }
167
+
168
+ /* Activity Rail States */
169
+ .ds-activityrail__item[disabled] {
170
+ opacity: 0.5;
171
+ cursor: not-allowed;
172
+ }
173
+
174
+ .ds-activityrail__item:focus-visible {
175
+ outline: 2px solid var(--border-brand);
176
+ outline-offset: 2px;
177
+ }
178
+
179
+ /* Chat Composer States */
180
+ .ds-chatcomposer__input[disabled] {
181
+ opacity: 0.5;
182
+ cursor: not-allowed;
183
+ }
184
+
185
+ /* Editor Tabs States */
186
+ .ds-editortabs__tab[disabled] {
187
+ opacity: 0.5;
188
+ cursor: not-allowed;
189
+ }
190
+
191
+ .ds-editortabs__close:focus-visible {
192
+ outline: 2px solid var(--border-brand);
193
+ outline-offset: 2px;
194
+ }
195
+
196
+ /* Setting Row States */
197
+ .ds-settingrow[aria-disabled="true"] {
198
+ opacity: 0.5;
199
+ pointer-events: none;
200
+ }
201
+
202
+ /* Status Bar States */
203
+ .ds-statusbar__item[disabled] {
204
+ opacity: 0.5;
205
+ cursor: not-allowed;
206
+ }
207
+
208
+ .ds-statusbar__item:focus-visible {
209
+ outline: 2px solid var(--border-brand);
210
+ outline-offset: 2px;
211
+ }
212
+
213
+ /* Table Panel States */
214
+ .ds-tablepanel.ds-loading {
215
+ opacity: 0.6;
216
+ }
217
+
218
+ .ds-tablepanel__table[aria-busy="true"] {
219
+ position: relative;
220
+ }
221
+
222
+ .ds-tablepanel__table[aria-busy="true"]::before {
223
+ content: '';
224
+ position: absolute;
225
+ top: 0;
226
+ left: 0;
227
+ width: 100%;
228
+ height: 100%;
229
+ background: rgba(0, 0, 0, 0.1);
230
+ z-index: 1;
231
+ }
232
+
233
+ /* Workbench Titlebar States */
234
+ .ds-titlebar__traffic-btn:focus-visible {
235
+ outline: 2px solid var(--border-brand);
236
+ outline-offset: 2px;
237
+ }
238
+
239
+ .ds-titlebar__project[disabled] {
240
+ opacity: 0.5;
241
+ cursor: not-allowed;
242
+ }
243
+
244
+ /* Button Active State */
245
+ .ds-btn:active:not(:disabled) {
246
+ transform: translateY(1px);
247
+ }
248
+
249
+ .ds-btn--sm:active:not(:disabled) {
250
+ transform: translateY(0.5px);
251
+ }
252
+
253
+ .ds-btn--lg:active:not(:disabled) {
254
+ transform: translateY(1.5px);
255
+ }
256
+
257
+ /* Input Hover State */
258
+ .ds-input:hover:not([disabled]) {
259
+ border-color: var(--border-neutral-l3);
260
+ }
261
+
262
+ /* Card Hover State */
263
+ .ds-card:hover {
264
+ border-color: var(--border-neutral-l2);
265
+ }
266
+
267
+ /* Tag Hover State */
268
+ .ds-tag:hover {
269
+ opacity: 0.8;
270
+ }
271
+
272
+ /* Alert Hover State */
273
+ .ds-alert:hover {
274
+ background-color: var(--bg-overlay-l1);
275
+ }
276
+
277
+ /* Nav List Item Active State */
278
+ .ds-navlist__item:active {
279
+ background-color: var(--bg-overlay-l2);
280
+ }
281
+
282
+ .ds-navlist__item.is-active:active {
283
+ background-color: var(--bg-brand);
284
+ }
285
+
286
+ /* File Tree Row Active State */
287
+ .ds-filetree__row:active {
288
+ background-color: var(--bg-overlay-l2);
289
+ }
290
+
291
+ /* Pagination Item Active State */
292
+ .ds-pagination__item:active:not(:disabled) {
293
+ background-color: var(--bg-overlay-l2);
294
+ }
295
+
296
+ /* Toggle Active State */
297
+ .ds-toggle input:checked + .ds-toggle__track {
298
+ background-color: var(--bg-brand);
299
+ }
300
+
301
+ /* Badge Pulse State */
302
+ .ds-badge--pulse {
303
+ animation: badge-pulse 2s infinite;
304
+ }
305
+
306
+ @keyframes badge-pulse {
307
+ 0% {
308
+ box-shadow: 0 0 0 0 rgba(50, 240, 140, 0.7);
309
+ }
310
+ 70% {
311
+ box-shadow: 0 0 0 6px rgba(50, 240, 140, 0);
312
+ }
313
+ 100% {
314
+ box-shadow: 0 0 0 0 rgba(50, 240, 140, 0);
315
+ }
316
+ }