@kubex/zinc 1.1.92 → 1.1.94

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 (29) hide show
  1. package/dist/custom-elements.json +1738 -110
  2. package/dist/vscode.html-custom-data.json +136 -4
  3. package/dist/web-types.json +307 -4
  4. package/dist/zn.d.ts +298 -2
  5. package/dist/zn.min.js +708 -515
  6. package/docs/pages/components/page-builder.md +22 -0
  7. package/docs/pages/components/schedule-builder.md +345 -0
  8. package/package.json +1 -1
  9. package/src/components/alert/alert.scss +9 -13
  10. package/src/components/chip/chip.scss +1 -1
  11. package/src/components/icon-picker/icon-picker.component.ts +1 -1
  12. package/src/components/linked-select/linked-select.component.ts +22 -5
  13. package/src/components/page/page.scss +13 -7
  14. package/src/components/page-builder/page-builder.component.ts +52 -7
  15. package/src/components/page-builder/page-builder.scss +166 -9
  16. package/src/components/page-builder/page-builder.test.ts +134 -0
  17. package/src/components/page-builder/page.types.ts +23 -3
  18. package/src/components/page-nav/page-nav.scss +9 -1
  19. package/src/components/panel/panel.component.ts +5 -1
  20. package/src/components/priority-list/priority-list.component.ts +1 -0
  21. package/src/components/priority-list/priority-list.scss +2 -1
  22. package/src/components/schedule-builder/index.ts +12 -0
  23. package/src/components/schedule-builder/schedule-builder.component.ts +1543 -0
  24. package/src/components/schedule-builder/schedule-builder.scss +448 -0
  25. package/src/components/schedule-builder/schedule-builder.test.ts +344 -0
  26. package/src/components/toggle/toggle.component.ts +2 -1
  27. package/src/zinc.ts +1 -0
  28. package/docs/superpowers/plans/2026-08-03-theme-editor.md +0 -1536
  29. package/docs/superpowers/specs/2026-08-03-theme-editor-design.md +0 -327
@@ -0,0 +1,448 @@
1
+ @use "../../wc";
2
+ @use "../../form-control";
3
+
4
+ :host {
5
+ --slot-height: 18px;
6
+ --gutter-width: 64px;
7
+ --open-color: rgb(var(--zn-primary));
8
+ --reduced-color: rgba(var(--zn-primary), 0.3);
9
+ --closed-color: var(--zn-color-neutral-0);
10
+ --grid-line-color: rgb(var(--zn-border-color));
11
+
12
+ display: block;
13
+ }
14
+
15
+ .schedule-builder {
16
+ color: rgb(var(--zn-text));
17
+ font-size: var(--zn-font-size-small);
18
+ }
19
+
20
+ .schedule-builder--disabled {
21
+ opacity: 0.6;
22
+ pointer-events: none;
23
+ }
24
+
25
+ /**************************************************************
26
+ * Toolbar
27
+ *************************************************************/
28
+
29
+ .schedule-builder__toolbar {
30
+ display: flex;
31
+ align-items: center;
32
+ flex-wrap: wrap;
33
+ gap: var(--zn-spacing-small);
34
+ margin-bottom: var(--zn-spacing-x-small);
35
+ }
36
+
37
+ .schedule-builder__hint {
38
+ flex: 1 1 240px;
39
+ margin: 0;
40
+ color: var(--zn-color-neutral-500);
41
+ font-size: var(--zn-font-size-small);
42
+ }
43
+
44
+ .legend {
45
+ display: flex;
46
+ align-items: center;
47
+ flex-wrap: wrap;
48
+ gap: var(--zn-spacing-small);
49
+ margin: 0;
50
+ padding: 0;
51
+ list-style: none;
52
+ }
53
+
54
+ .legend__item {
55
+ display: inline-flex;
56
+ align-items: center;
57
+ gap: var(--zn-spacing-2x-small);
58
+ color: var(--zn-color-neutral-600);
59
+ font-size: var(--zn-font-size-x-small);
60
+ white-space: nowrap;
61
+ }
62
+
63
+ .legend__swatch {
64
+ width: 14px;
65
+ height: 14px;
66
+ border: 1px solid var(--grid-line-color);
67
+ border-radius: var(--zn-border-radius-small);
68
+ background-color: var(--closed-color);
69
+ }
70
+
71
+ .legend__swatch--open {
72
+ border-color: transparent;
73
+ background-color: var(--open-color);
74
+ }
75
+
76
+ .timezone {
77
+ flex: 0 1 auto;
78
+ width: 260px;
79
+ max-width: 100%;
80
+ }
81
+
82
+ .view-toggle {
83
+ display: inline-flex;
84
+ overflow: hidden;
85
+ border: 1px solid var(--grid-line-color);
86
+ border-radius: var(--zn-border-radius);
87
+ }
88
+
89
+ .view-toggle__button {
90
+ display: inline-flex;
91
+ align-items: center;
92
+ justify-content: center;
93
+ padding: 4px 10px;
94
+ border: none;
95
+ background: none;
96
+ color: var(--zn-color-neutral-500);
97
+ cursor: pointer;
98
+
99
+ &:not(:first-child) {
100
+ border-left: 1px solid var(--grid-line-color);
101
+ }
102
+
103
+ &:hover {
104
+ background-color: var(--zn-color-neutral-100);
105
+ }
106
+
107
+ &:focus-visible {
108
+ outline: 2px solid var(--zn-focus-ring-color);
109
+ outline-offset: -2px;
110
+ }
111
+ }
112
+
113
+ .view-toggle__button--active {
114
+ background-color: var(--zn-color-primary-100);
115
+ color: var(--zn-color-primary-700);
116
+
117
+ &:hover {
118
+ background-color: var(--zn-color-primary-100);
119
+ }
120
+ }
121
+
122
+ /**************************************************************
123
+ * Calendar view
124
+ *************************************************************/
125
+
126
+ .schedule-builder__calendar {
127
+ display: flex;
128
+ align-items: flex-start;
129
+ gap: var(--zn-spacing-medium);
130
+ }
131
+
132
+ .calendar {
133
+ flex: 1 1 auto;
134
+ min-width: 0;
135
+ overflow: hidden;
136
+ border: 1px solid var(--grid-line-color);
137
+ border-radius: var(--zn-border-radius);
138
+ background-color: var(--zn-panel-background-color);
139
+ }
140
+
141
+ .calendar__head,
142
+ .calendar__body {
143
+ display: grid;
144
+ grid-template-columns: var(--gutter-width) repeat(var(--columns), minmax(0, 1fr));
145
+ }
146
+
147
+ .calendar__head {
148
+ border-bottom: 1px solid var(--grid-line-color);
149
+ background-color: var(--zn-color-neutral-50);
150
+ }
151
+
152
+ .calendar__head-cell {
153
+ display: flex;
154
+ flex-direction: column;
155
+ gap: 2px;
156
+ padding: var(--zn-spacing-x-small);
157
+ border-left: 1px solid var(--grid-line-color);
158
+ overflow: hidden;
159
+ }
160
+
161
+ .calendar__head-day {
162
+ font-weight: var(--zn-font-weight-semibold, 600);
163
+ white-space: nowrap;
164
+ }
165
+
166
+ .calendar__head-hours {
167
+ color: var(--zn-color-neutral-500);
168
+ font-size: var(--zn-font-size-x-small);
169
+ white-space: nowrap;
170
+ overflow: hidden;
171
+ text-overflow: ellipsis;
172
+ }
173
+
174
+ .calendar__head-cell--closed .calendar__head-day,
175
+ .calendar__head-cell--closed .calendar__head-hours {
176
+ color: var(--zn-color-neutral-400);
177
+ }
178
+
179
+ .calendar__body {
180
+ padding-top: var(--zn-spacing-x-small);
181
+ padding-bottom: var(--zn-spacing-x-small);
182
+ }
183
+
184
+ .calendar__gutter {
185
+ display: grid;
186
+ grid-auto-rows: calc(var(--slot-height) * var(--slots-per-hour));
187
+ }
188
+
189
+ .calendar__hour {
190
+ position: relative;
191
+ }
192
+
193
+ .calendar__hour span {
194
+ position: absolute;
195
+ top: 0;
196
+ right: var(--zn-spacing-x-small);
197
+ transform: translateY(-50%);
198
+ color: var(--zn-color-neutral-500);
199
+ font-size: var(--zn-font-size-x-small);
200
+ font-variant-numeric: tabular-nums;
201
+ white-space: nowrap;
202
+ }
203
+
204
+ .calendar__canvas {
205
+ display: grid;
206
+ grid-column: span var(--columns);
207
+ grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
208
+ touch-action: none;
209
+ user-select: none;
210
+ }
211
+
212
+ .calendar__col {
213
+ display: grid;
214
+ grid-auto-rows: var(--slot-height);
215
+ border-left: 1px solid var(--grid-line-color);
216
+ }
217
+
218
+ .calendar__slot {
219
+ border-bottom: 1px dotted rgba(var(--zn-border-color), 0.6);
220
+ background-color: var(--closed-color);
221
+ }
222
+
223
+ .calendar__slot--hour {
224
+ border-top: 1px solid rgba(var(--zn-border-color), 0.6);
225
+ }
226
+
227
+ .calendar__slot--open {
228
+ background-color: var(--open-color);
229
+ border-bottom-color: rgba(255, 255, 255, 0.25);
230
+ }
231
+
232
+ .calendar__slot--reduced {
233
+ background-color: var(--reduced-color);
234
+ border-bottom-color: rgba(255, 255, 255, 0.4);
235
+ }
236
+
237
+ .schedule-builder:not(.schedule-builder--readonly):not(.schedule-builder--disabled) .calendar__canvas {
238
+ cursor: crosshair;
239
+ }
240
+
241
+ /**************************************************************
242
+ * Summary panel
243
+ *************************************************************/
244
+
245
+ .summary {
246
+ flex: 0 0 260px;
247
+ max-width: 260px;
248
+ }
249
+
250
+ .summary__title {
251
+ margin: 0 0 var(--zn-spacing-x-small);
252
+ color: var(--zn-color-neutral-500);
253
+ font-size: var(--zn-font-size-x-small);
254
+ font-weight: var(--zn-font-weight-semibold, 600);
255
+ letter-spacing: 0.06em;
256
+ text-transform: uppercase;
257
+ }
258
+
259
+ .summary__list {
260
+ margin: 0;
261
+ }
262
+
263
+ .summary__row {
264
+ display: flex;
265
+ align-items: baseline;
266
+ justify-content: space-between;
267
+ gap: var(--zn-spacing-x-small);
268
+ padding: var(--zn-spacing-x-small) 0;
269
+ border-bottom: 1px solid var(--grid-line-color);
270
+
271
+ dt {
272
+ font-weight: var(--zn-font-weight-semibold, 600);
273
+ }
274
+
275
+ dd {
276
+ margin: 0;
277
+ font-variant-numeric: tabular-nums;
278
+ text-align: right;
279
+ }
280
+ }
281
+
282
+ .summary__closed {
283
+ color: var(--zn-color-neutral-400);
284
+ }
285
+
286
+ .summary__row--total {
287
+ border-bottom: none;
288
+
289
+ dd {
290
+ font-weight: var(--zn-font-weight-semibold, 600);
291
+ }
292
+ }
293
+
294
+ /**************************************************************
295
+ * Form (list) view
296
+ *************************************************************/
297
+
298
+ .list {
299
+ display: flex;
300
+ flex-direction: column;
301
+ }
302
+
303
+ .list__row {
304
+ display: grid;
305
+ grid-template-columns: 56px minmax(0, 1fr) auto;
306
+ align-items: center;
307
+ gap: var(--zn-spacing-x-small);
308
+ padding: var(--zn-spacing-x-small) var(--zn-spacing-2x-small);
309
+ border-bottom: 1px solid var(--grid-line-color);
310
+ }
311
+
312
+ .list__row--editing {
313
+ border-radius: var(--zn-border-radius);
314
+ background-color: var(--zn-color-primary-50);
315
+ }
316
+
317
+ .list__day {
318
+ font-weight: var(--zn-font-weight-semibold, 600);
319
+ }
320
+
321
+ .list__day--closed {
322
+ color: var(--zn-color-neutral-400);
323
+ }
324
+
325
+ .list__ranges {
326
+ display: flex;
327
+ align-items: center;
328
+ flex-wrap: wrap;
329
+ gap: var(--zn-spacing-x-small);
330
+ min-height: 32px;
331
+ }
332
+
333
+ .list__closed {
334
+ color: var(--zn-color-neutral-400);
335
+ }
336
+
337
+ .list__note {
338
+ color: var(--zn-color-neutral-500);
339
+ font-size: var(--zn-font-size-x-small);
340
+ }
341
+
342
+ .list__chip {
343
+ padding: 6px 10px;
344
+ border: none;
345
+ border-radius: var(--zn-border-radius);
346
+ background-color: var(--zn-color-primary-100);
347
+ color: var(--zn-color-primary-700);
348
+ font-family: inherit;
349
+ font-size: var(--zn-font-size-small);
350
+ font-variant-numeric: tabular-nums;
351
+ cursor: pointer;
352
+
353
+ &:hover:not([disabled]) {
354
+ background-color: var(--zn-color-primary-200);
355
+ }
356
+
357
+ &[disabled] {
358
+ cursor: default;
359
+ }
360
+
361
+ &:focus-visible {
362
+ outline: 2px solid var(--zn-focus-ring-color);
363
+ outline-offset: 1px;
364
+ }
365
+ }
366
+
367
+ .list__chip--reduced {
368
+ background-color: var(--zn-color-warning-50);
369
+ color: var(--zn-color-warning-600);
370
+
371
+ &:hover:not([disabled]) {
372
+ background-color: var(--zn-color-warning-50);
373
+ }
374
+ }
375
+
376
+ .list__editor {
377
+ display: flex;
378
+ align-items: center;
379
+ gap: var(--zn-spacing-2x-small);
380
+ }
381
+
382
+ .list__editor zn-input {
383
+ width: 130px;
384
+ }
385
+
386
+ .list__editor-separator {
387
+ color: var(--zn-color-neutral-500);
388
+ }
389
+
390
+ .list__remove {
391
+ display: inline-flex;
392
+ align-items: center;
393
+ justify-content: center;
394
+ padding: 4px;
395
+ border: none;
396
+ border-radius: var(--zn-border-radius);
397
+ background: none;
398
+ color: var(--zn-color-neutral-500);
399
+ cursor: pointer;
400
+
401
+ &:hover {
402
+ background-color: var(--zn-color-neutral-100);
403
+ color: rgb(var(--zn-text));
404
+ }
405
+ }
406
+
407
+ .list__add {
408
+ display: inline-flex;
409
+ align-items: center;
410
+ gap: var(--zn-spacing-2x-small);
411
+ padding: 4px var(--zn-spacing-x-small);
412
+ border: none;
413
+ border-radius: var(--zn-border-radius);
414
+ background: none;
415
+ color: rgb(var(--zn-text));
416
+ font-family: inherit;
417
+ font-size: var(--zn-font-size-x-small);
418
+ font-weight: var(--zn-font-weight-semibold, 600);
419
+ letter-spacing: 0.04em;
420
+ text-transform: uppercase;
421
+ white-space: nowrap;
422
+ cursor: pointer;
423
+
424
+ &:hover {
425
+ background-color: var(--zn-color-neutral-100);
426
+ }
427
+
428
+ &:focus-visible {
429
+ outline: 2px solid var(--zn-focus-ring-color);
430
+ outline-offset: -2px;
431
+ }
432
+ }
433
+
434
+ /**************************************************************
435
+ * Responsive
436
+ *************************************************************/
437
+
438
+ @media (max-width: 900px) {
439
+ .schedule-builder__calendar {
440
+ flex-direction: column;
441
+ }
442
+
443
+ .summary {
444
+ flex: 1 1 auto;
445
+ max-width: none;
446
+ width: 100%;
447
+ }
448
+ }