@truenas/ui-components 0.1.2

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 (62) hide show
  1. package/README.md +335 -0
  2. package/assets/tn-icons/custom/cloud-off.svg +1 -0
  3. package/assets/tn-icons/custom/dataset-root.svg +3 -0
  4. package/assets/tn-icons/custom/dataset.svg +3 -0
  5. package/assets/tn-icons/custom/enclosure.svg +21 -0
  6. package/assets/tn-icons/custom/ha-disabled.svg +10 -0
  7. package/assets/tn-icons/custom/ha-enabled.svg +1 -0
  8. package/assets/tn-icons/custom/ha-reconnecting.svg +10 -0
  9. package/assets/tn-icons/custom/hdd-mirror.svg +3 -0
  10. package/assets/tn-icons/custom/hdd.svg +3 -0
  11. package/assets/tn-icons/custom/iscsi-share.svg +3 -0
  12. package/assets/tn-icons/custom/layout-full.svg +8 -0
  13. package/assets/tn-icons/custom/layout-half-and-quarters.svg +7 -0
  14. package/assets/tn-icons/custom/layout-halves.svg +6 -0
  15. package/assets/tn-icons/custom/layout-quarters-and-half.svg +7 -0
  16. package/assets/tn-icons/custom/layout-quarters.svg +8 -0
  17. package/assets/tn-icons/custom/network-upload-download-both.svg +4 -0
  18. package/assets/tn-icons/custom/network-upload-download-disabled.svg +7 -0
  19. package/assets/tn-icons/custom/network-upload-download-down.svg +4 -0
  20. package/assets/tn-icons/custom/network-upload-download-up.svg +4 -0
  21. package/assets/tn-icons/custom/network-upload-download.svg +4 -0
  22. package/assets/tn-icons/custom/nfs-share.svg +3 -0
  23. package/assets/tn-icons/custom/nvme-share.svg +7 -0
  24. package/assets/tn-icons/custom/replication.svg +14 -0
  25. package/assets/tn-icons/custom/smb-share.svg +3 -0
  26. package/assets/tn-icons/custom/ssd-mirror.svg +3 -0
  27. package/assets/tn-icons/custom/ssd.svg +3 -0
  28. package/assets/tn-icons/custom/true-cloud.svg +10 -0
  29. package/assets/tn-icons/custom/truecommand-logo-mark-color.svg +14 -0
  30. package/assets/tn-icons/custom/truecommand-logo-mark.svg +10 -0
  31. package/assets/tn-icons/custom/truenas-connect-logo.svg +1 -0
  32. package/assets/tn-icons/custom/truenas-logo-ce-color.svg +1 -0
  33. package/assets/tn-icons/custom/truenas-logo-ce.svg +4 -0
  34. package/assets/tn-icons/custom/truenas-logo-enterprise-color.svg +19 -0
  35. package/assets/tn-icons/custom/truenas-logo-enterprise.svg +13 -0
  36. package/assets/tn-icons/custom/truenas-logo-mark-color.svg +7 -0
  37. package/assets/tn-icons/custom/truenas-logo-mark.svg +4 -0
  38. package/assets/tn-icons/custom/truenas-logo-type-color.svg +4 -0
  39. package/assets/tn-icons/custom/truenas-logo-type.svg +4 -0
  40. package/assets/tn-icons/custom/truenas-logo.svg +4 -0
  41. package/assets/tn-icons/custom/two-factor-auth.svg +1 -0
  42. package/assets/tn-icons/sprite-config.json +78 -0
  43. package/assets/tn-icons/sprite.svg +1 -0
  44. package/fesm2022/truenas-ui-components.mjs +8063 -0
  45. package/fesm2022/truenas-ui-components.mjs.map +1 -0
  46. package/package.json +45 -0
  47. package/scripts/icon-sprite/cli-main.ts +174 -0
  48. package/scripts/icon-sprite/cli-wrapper.js +32 -0
  49. package/scripts/icon-sprite/cli.js +30 -0
  50. package/scripts/icon-sprite/generate-sprite.ts +171 -0
  51. package/scripts/icon-sprite/lib/add-custom-icons.ts +33 -0
  52. package/scripts/icon-sprite/lib/build-sprite.ts +25 -0
  53. package/scripts/icon-sprite/lib/find-icons-in-templates.ts +108 -0
  54. package/scripts/icon-sprite/lib/find-icons-with-marker.ts +63 -0
  55. package/scripts/icon-sprite/lib/get-icon-paths.ts +95 -0
  56. package/scripts/icon-sprite/lib/warn-about-duplicates.ts +13 -0
  57. package/scripts/icon-sprite/make-sprite.ts +26 -0
  58. package/scripts/icon-sprite/sprite-config-interface.ts +72 -0
  59. package/src/assets/icons/dataset.svg +3 -0
  60. package/src/styles/dialog.css +150 -0
  61. package/src/styles/themes.css +665 -0
  62. package/types/truenas-ui-components.d.ts +2687 -0
@@ -0,0 +1,665 @@
1
+ /* ================================
2
+ Global Styles: Typography
3
+ ================================ */
4
+ :root {
5
+ --tn-primary: #007db3; /* WCAG fix #007db3 */
6
+ --tn-primary-txt: #ffffff;
7
+ --tn-btn-default-bg: #545454;
8
+ --tn-btn-default-txt: #ffffff;
9
+ --tn-topbar: #111111;
10
+ --tn-topbar-txt: rgba(255,255,255,0.85);
11
+ --tn-accent: #545454;
12
+ --tn-bg1: #1E1E1E;
13
+ --tn-bg2: #282828;
14
+ --tn-fg1: #ffffff;
15
+ --tn-fg2: rgba(255,255,255,0.85);
16
+ --tn-alt-bg1: #383838;
17
+ --tn-alt-bg2: #545454;
18
+ --tn-alt-fg1: rgba(194,194,194,0.5);
19
+ --tn-alt-fg2: #e1e1e1;
20
+ --tn-lines: #383838;
21
+ --tn-yellow: #DED142;
22
+ --tn-orange: #E68D37;
23
+ --tn-red: #CE2929;
24
+ --tn-magenta: #C006C7;
25
+ --tn-violet: #7617D8;
26
+ --tn-blue: #007db3;
27
+ --tn-cyan: #00d0d6;
28
+ --tn-green: #71BF44;
29
+ --tn-pink: #ffc0cb;
30
+ --tn-aqua: #00ffff;
31
+ --tn-tomato: #ff6347;
32
+ --tn-teal: #008080;
33
+ --tn-slategray: #708090;
34
+ --tn-salmon: #fa8072;
35
+ --tn-font-family-header: "Titillium Web", sans-serif;
36
+ --tn-font-family-body: "IBM Plex Sans", "Roboto", "Helvetica Neue", sans-serif;
37
+ --tn-font-family-monospace: "Droid Sans Mono", "Courier New", Courier, monospace;
38
+ --tn-font-family-body2: "Roboto", "Helvetica Neue", sans-serif;
39
+ --tn-black: #000000;
40
+ --tn-white: #ffffff;
41
+
42
+ /* Icon sizing variables */
43
+ --tn-icon-xs: 12px;
44
+ --tn-icon-sm: 16px;
45
+ --tn-icon-md: 20px;
46
+ --tn-icon-lg: 24px;
47
+ --tn-icon-xl: 32px;
48
+
49
+ /* Dialog content padding */
50
+ --tn-content-padding: 24px;
51
+ }
52
+
53
+
54
+ /* ================================
55
+ TN Dark - TrueNAS default theme
56
+ ================================ */
57
+ .tn-dark {
58
+ --tn-primary: var(--tn-blue);
59
+ --tn-topbar: #111111;
60
+ --tn-topbar-txt: rgba(255,255,255,0.85);
61
+ --tn-accent: var(--tn-yellow);
62
+ --tn-bg1: #1E1E1E;
63
+ --tn-bg2: #282828;
64
+ --tn-fg1: #808080;
65
+ --tn-fg2: rgba(255,255,255,0.85);
66
+ --tn-alt-bg1: #383838;
67
+ --tn-alt-bg2: #545454;
68
+ --tn-alt-fg1: rgba(194,194,194,0.5);
69
+ --tn-alt-fg2: #e1e1e1;
70
+ --tn-lines: #4a4a4a;
71
+ --tn-yellow: #DED142;
72
+ --tn-orange: #E68D37;
73
+ --tn-red: #CE2929;
74
+ --tn-magenta: #C006C7;
75
+ --tn-violet: #7617D8;
76
+ --tn-blue: #007db3;
77
+ --tn-cyan: #00d0d6;
78
+ --tn-green: #71BF44;
79
+ --tn-pink: #ffc0cb;
80
+ --tn-aqua: #00ffff;
81
+ --tn-tomato: #ff6347;
82
+ --tn-teal: #008080;
83
+ --tn-slategray: #708090;
84
+ --tn-salmon: #fa8072;
85
+ }
86
+
87
+ /* ================================
88
+ TN Blue - Official TrueNAS System Colors on light
89
+ ================================ */
90
+ .tn-blue {
91
+ --tn-primary: var(--tn-blue);
92
+ --tn-primary-txt: #ffffff;
93
+ --tn-topbar: #007db3;
94
+ --tn-accent: #DED142;
95
+ --tn-bg1: #f2f2f2;
96
+ --tn-bg2: #ffffff;
97
+ --tn-fg1: #585858;
98
+ --tn-fg2: #666666;
99
+ --tn-alt-bg1: #f0f0f0;
100
+ --tn-alt-bg2: #e8e8e8;
101
+ --tn-alt-fg1: #181a26;
102
+ --tn-alt-fg2: #282a36;
103
+ --tn-lines: #d0d0d0;
104
+ --tn-yellow: #DED142;
105
+ --tn-orange: #E68D37;
106
+ --tn-red: #CE2929;
107
+ --tn-magenta: #C006C7;
108
+ --tn-violet: #7617D8;
109
+ --tn-blue: #007db3;
110
+ --tn-cyan: #00d0d6;
111
+ --tn-green: #71BF44;
112
+ --tn-pink: #ffc0cb;
113
+ --tn-aqua: #00ffff;
114
+ --tn-tomato: #ff6347;
115
+ --tn-teal: #008080;
116
+ --tn-slategray: #708090;
117
+ --tn-salmon: #fa8072;
118
+ }
119
+
120
+ /* ================================
121
+ Dracula - Popular dark theme
122
+ ================================ */
123
+ .tn-dracula {
124
+ --tn-primary: #6272a4;
125
+ --tn-primary-txt: #ffffff;
126
+ --tn-topbar: #6272a4;
127
+ --tn-topbar-txt: #efefef;
128
+ --tn-accent: #bd93f9;
129
+ --tn-bg1: #181a26;
130
+ --tn-bg2: #282a36;
131
+ --tn-fg1: #efefef;
132
+ --tn-fg2: #cacac5;
133
+ --tn-alt-bg1: #3a3d4a;
134
+ --tn-alt-bg2: #44475a;
135
+ --tn-alt-fg1: #f8f8f2;
136
+ --tn-alt-fg2: #fafaf5;
137
+ --tn-lines: #50526e;
138
+ --tn-yellow: #f1fa8c;
139
+ --tn-orange: #ffb86c;
140
+ --tn-red: #ff5555;
141
+ --tn-magenta: #ff79c6;
142
+ --tn-violet: #bd93f9;
143
+ --tn-blue: #6272a4;
144
+ --tn-cyan: #8be9fd;
145
+ --tn-green: #50fa7b;
146
+ --tn-pink: #ffc0cb;
147
+ --tn-aqua: #00ffff;
148
+ --tn-tomato: #ff6347;
149
+ --tn-teal: #008080;
150
+ --tn-slategray: #708090;
151
+ --tn-salmon: #fa8072;
152
+ }
153
+
154
+ /* ================================
155
+ Nord - Inspired by the Nord color palette
156
+ ================================ */
157
+ .tn-nord {
158
+ --tn-primary: #88c0d0;
159
+ --tn-primary-txt: #333333;
160
+ --tn-topbar: #4c566a;
161
+ --tn-topbar-txt: #eceff4;
162
+ --tn-accent: #5e81aC;
163
+ --tn-bg1: #2e3440;
164
+ --tn-bg2: #3b4252;
165
+ --tn-fg1: #eceff4;
166
+ --tn-fg2: #e5e9f0;
167
+ --tn-alt-bg1: #434c5e;
168
+ --tn-alt-bg2: #4c566a;
169
+ --tn-alt-fg1: #d8dee9;
170
+ --tn-alt-fg2: #d8dee9;
171
+ --tn-lines: #576277;
172
+ --tn-yellow: #ebcb8b;
173
+ --tn-orange: #d08770;
174
+ --tn-red: #bf616a;
175
+ --tn-magenta: #b48ead;
176
+ --tn-violet: #775daa;
177
+ --tn-blue: #5e81aC;
178
+ --tn-cyan: #88c0d0;
179
+ --tn-green: #a3be8c;
180
+ --tn-pink: #ffc0cb;
181
+ --tn-aqua: #00ffff;
182
+ --tn-tomato: #ff6347;
183
+ --tn-teal: #008080;
184
+ --tn-slategray: #708090;
185
+ --tn-salmon: #fa8072;
186
+ }
187
+
188
+ /* ================================
189
+ Paper - FreeNAS 11.2 default theme
190
+ ================================ */
191
+ .tn-paper {
192
+ --tn-primary: #0D5687;
193
+ --tn-primary-txt: #ffffff;
194
+ --tn-topbar: #0D5687;
195
+ --tn-accent: #f0cb00;
196
+ --tn-bg1: #F2F2F2;
197
+ --tn-bg2: #FAFAFA;
198
+ --tn-fg1: #3f3f3f;
199
+ --tn-fg2: #666666;
200
+ --tn-alt-bg1: #f0f0f0;
201
+ --tn-alt-bg2: #e8e8e8;
202
+ --tn-alt-fg1: #181a26;
203
+ --tn-alt-fg2: #282a36;
204
+ --tn-lines: #d5d5d5;
205
+ --tn-yellow: #f0cb00;
206
+ --tn-orange: #ee9302;
207
+ --tn-red: #ff0013;
208
+ --tn-magenta: #d238ff;
209
+ --tn-violet: #c17ecc;
210
+ --tn-blue: #0D5687;
211
+ --tn-cyan: #00d0d6;
212
+ --tn-green: #1F9642;
213
+ --tn-pink: #ffc0cb;
214
+ --tn-aqua: #00ffff;
215
+ --tn-tomato: #ff6347;
216
+ --tn-teal: #008080;
217
+ --tn-slategray: #708090;
218
+ --tn-salmon: #fa8072;
219
+ }
220
+
221
+ /* ================================
222
+ Solarized Dark - Solarized dark color scheme
223
+ ================================ */
224
+ .tn-solarized-dark {
225
+ --tn-primary: var(--tn-fg1);
226
+ --tn-primary-txt: #ffffff;
227
+ --tn-btn-default-bg: #0b4f60;
228
+ --tn-btn-default-txt: var(--tn-fg2);
229
+ --tn-topbar: var(--tn-fg1);
230
+ --tn-topbar-txt: #cdcdcd;
231
+ --tn-accent: var(--tn-cyan);
232
+ --tn-bg1: #002b36;
233
+ --tn-bg2: #073642;
234
+ --tn-fg1: #586e75;
235
+ --tn-fg2: #7f99a2;
236
+ --tn-alt-bg1: #0e4853;
237
+ --tn-alt-bg2: #155a68;
238
+ --tn-alt-fg1: #839496;
239
+ --tn-alt-fg2: #282a36;
240
+ --tn-lines: #586e75;
241
+ --tn-yellow: #b58900;
242
+ --tn-orange: #cb4b16;
243
+ --tn-red: #dc322f;
244
+ --tn-magenta: #d33682;
245
+ --tn-violet: #6c71c4;
246
+ --tn-blue: #268bd2;
247
+ --tn-cyan: #2aa198;
248
+ --tn-green: #859900;
249
+ --tn-pink: #ffc0cb;
250
+ --tn-aqua: #00ffff;
251
+ --tn-tomato: #ff6347;
252
+ --tn-teal: #008080;
253
+ --tn-slategray: #708090;
254
+ --tn-salmon: #fa8072;
255
+ }
256
+
257
+
258
+ /* ================================
259
+ Midnight - Dark theme with blues and greys
260
+ ================================ */
261
+ .tn-midnight {
262
+ --tn-primary: var(--tn-blue);
263
+ --tn-primary-txt: #ffffff;
264
+ --tn-topbar: var(--tn-blue);
265
+ --tn-topbar-txt: var(--tn-fg2);
266
+ --tn-accent: var(--tn-violet);
267
+ --tn-bg1: #212a35;
268
+ --tn-bg2: #303d48;
269
+ --tn-fg1: #aaaaaa;
270
+ --tn-fg2: #cccccc;
271
+ --tn-alt-bg1: #3d4a55;
272
+ --tn-alt-bg2: #4a5762;
273
+ --tn-alt-fg1: #c1c1c1;
274
+ --tn-alt-fg2: #e1e1e1;
275
+ --tn-lines: #56646f;
276
+ --tn-yellow: #f0cb00;
277
+ --tn-orange: #ee9302;
278
+ --tn-red: #ff0013;
279
+ --tn-magenta: #d238ff;
280
+ --tn-violet: #c17ecc;
281
+ --tn-blue: #1274b5;
282
+ --tn-cyan: #00d0d6;
283
+ --tn-green: #1F9642;
284
+ --tn-pink: #ffc0cb;
285
+ --tn-aqua: #00ffff;
286
+ --tn-tomato: #ff6347;
287
+ --tn-teal: #008080;
288
+ --tn-slategray: #708090;
289
+ --tn-salmon: #fa8072;
290
+ }
291
+
292
+ /* ================================
293
+ High Contrast - High contrast theme based on Legacy Django UI color scheme
294
+ ================================ */
295
+ .tn-high-contrast {
296
+ --tn-primary: var(--tn-blue); /* WCAG fix try another shade of blue #007db3 or black #000000 */
297
+ --tn-topbar: var(--tn-black);
298
+ --tn-accent: var(--tn-magenta);
299
+ --tn-bg1: #dddddd;
300
+ --tn-bg2: #ffffff;
301
+ --tn-fg1: #222222;
302
+ --tn-fg2: #333333;
303
+ --tn-alt-bg1: #f0f0f0;
304
+ --tn-alt-bg2: #e8e8e8;
305
+ --tn-alt-fg1: #181a26;
306
+ --tn-alt-fg2: #282a36;
307
+ --tn-lines: #c0c0c0;
308
+ --tn-yellow: #f0cb00;
309
+ --tn-orange: #ee9302;
310
+ --tn-red: #ff0013;
311
+ --tn-magenta: #d238ff;
312
+ --tn-violet: #9844b1;
313
+ --tn-blue: #4784ac;
314
+ --tn-cyan: #00d0d6;
315
+ --tn-green: #59d600;
316
+ --tn-pink: #ffc0cb;
317
+ --tn-aqua: #00ffff;
318
+ --tn-tomato: #ff6347;
319
+ --tn-teal: #008080;
320
+ --tn-slategray: #708090;
321
+ --tn-salmon: #fa8072;
322
+ }
323
+
324
+ /* ================================
325
+ Global autofill styling for all input types
326
+ ================================ */
327
+ input:-webkit-autofill,
328
+ input:-webkit-autofill:hover,
329
+ input:-webkit-autofill:focus,
330
+ input:-webkit-autofill:active,
331
+ textarea:-webkit-autofill,
332
+ textarea:-webkit-autofill:hover,
333
+ textarea:-webkit-autofill:focus,
334
+ textarea:-webkit-autofill:active,
335
+ .tn-input:-webkit-autofill,
336
+ .tn-input:-webkit-autofill:hover,
337
+ .tn-input:-webkit-autofill:focus,
338
+ .tn-input:-webkit-autofill:active {
339
+ /* Use a very long transition to effectively override the browser's background */
340
+ -webkit-transition: background-color 5000s ease-in-out 0s;
341
+ transition: background-color 5000s ease-in-out 0s;
342
+ /* Set the text color to match our theme */
343
+ -webkit-text-fill-color: var(--tn-fg1) !important;
344
+ /* Override the background with our theme colors */
345
+ background-color: var(--tn-bg1) !important;
346
+ border-color: var(--tn-lines) !important;
347
+ }
348
+
349
+ /* For Firefox and other browsers */
350
+ input:-moz-autofill,
351
+ textarea:-moz-autofill,
352
+ .tn-input:-moz-autofill {
353
+ background-color: var(--tn-bg1) !important;
354
+ color: var(--tn-fg1) !important;
355
+ }
356
+
357
+ /* ================================
358
+ ixInput directive styles
359
+ ================================ */
360
+ .tn-input-directive,
361
+ input.tn-input-directive,
362
+ textarea.tn-input-directive {
363
+ display: block;
364
+ width: 100%;
365
+ min-height: 2.5rem;
366
+ padding: 0.5rem 0.75rem;
367
+ font-size: 1rem;
368
+ line-height: 1.5;
369
+ color: var(--tn-fg1, #212529);
370
+ background-color: var(--tn-bg1, #ffffff);
371
+ border: 1px solid var(--tn-lines, #d1d5db);
372
+ border-radius: 0.375rem;
373
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
374
+ outline: none;
375
+ font-family: var(--tn-font-family-body, 'Inter'), sans-serif;
376
+ }
377
+
378
+ .tn-input-directive::placeholder,
379
+ input.tn-input-directive::placeholder,
380
+ textarea.tn-input-directive::placeholder {
381
+ color: var(--tn-fg2, #6c757d);
382
+ opacity: 1;
383
+ }
384
+
385
+ .tn-input-directive:focus,
386
+ input.tn-input-directive:focus,
387
+ textarea.tn-input-directive:focus {
388
+ border-color: var(--tn-primary, #007bff);
389
+ box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
390
+ }
391
+
392
+ .tn-input-directive:disabled,
393
+ input.tn-input-directive:disabled,
394
+ textarea.tn-input-directive:disabled {
395
+ background-color: var(--tn-alt-bg1, #f8f9fa);
396
+ color: var(--tn-fg2, #6c757d);
397
+ cursor: not-allowed;
398
+ opacity: 0.6;
399
+ }
400
+
401
+ .tn-input-directive.error,
402
+ input.tn-input-directive.error,
403
+ textarea.tn-input-directive.error {
404
+ border-color: var(--tn-red, #dc3545);
405
+ }
406
+
407
+ .tn-input-directive.error:focus,
408
+ input.tn-input-directive.error:focus,
409
+ textarea.tn-input-directive.error:focus {
410
+ border-color: var(--tn-red, #dc3545);
411
+ box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
412
+ }
413
+
414
+ /* Textarea-specific styles */
415
+ textarea.tn-input-directive {
416
+ min-height: 6rem;
417
+ resize: vertical;
418
+ line-height: 1.4;
419
+ }
420
+
421
+ /* Accessibility improvements */
422
+ @media (prefers-reduced-motion: reduce) {
423
+ .tn-input-directive,
424
+ input.tn-input-directive,
425
+ textarea.tn-input-directive {
426
+ transition: none;
427
+ }
428
+ }
429
+
430
+ /* High contrast mode support */
431
+ @media (prefers-contrast: high) {
432
+ .tn-input-directive,
433
+ input.tn-input-directive,
434
+ textarea.tn-input-directive {
435
+ border-width: 2px;
436
+ }
437
+ }
438
+
439
+ /* ================================
440
+ Let's apply these variables to
441
+ the preview and story book docs elements
442
+ ================================ */
443
+
444
+ html, body, #storybook-docs > .sbdocs-wrapper {
445
+ font-family: var(--tn-font-family-body);
446
+ color: var(--tn-fg2) !important;
447
+ background-color: var(--tn-bg1) !important;
448
+ }
449
+
450
+ h1, h2, h3,h4,
451
+ .sbdocs-title h1, .sbdocs-title h2, .sbdocs-title h3,.sbdocs-title h4 {
452
+ font-family: var(--tn-font-family-header);
453
+ color: var(--tn-fg1) !important;
454
+ }
455
+
456
+ p, li, td {
457
+ color: var(--tn-fg2) !important;
458
+ }
459
+
460
+ .docs-story,
461
+ .sb-bar,
462
+ .sbdocs-wrapper td,
463
+ .sbdocs-preview {
464
+ background-color: var(--tn-bg2) !important;
465
+ color: var(--tn-fg2) !important;
466
+ }
467
+
468
+ thead, th {
469
+ background-color: var(--tn-topbar);
470
+ color: var(--tn-topbar-txt) !important;
471
+ }
472
+
473
+ /* Form field styles */
474
+ input:not([role="switch"]),
475
+ .sbdocs-wrapper select,
476
+ .sbdocs-wrapper textarea {
477
+ background-color: var(--tn-bg1) !important;
478
+ color: var(--tn-fg2) !important;
479
+ }
480
+
481
+ .docblock-code-toggle {
482
+ background-color: var(--tn-btn-default-bg) !important;
483
+ color: var(--tn-btn-default-txt) !important;
484
+ }
485
+
486
+ .docblock-argstable-body span {
487
+ color: var(--tn-fg1);
488
+ background-color: unset;
489
+ border: unset;
490
+ }
491
+
492
+ .docs-story > div {
493
+ background-color: unset;
494
+ }
495
+
496
+ .docblock-source > div {
497
+ background: #000000 !important;
498
+ color: #dedede;
499
+ border: unset;
500
+ }
501
+
502
+ .docblock-source button {
503
+ background: var(--tn-bg2) !important;
504
+ color: var(--tn-fg2);
505
+ }
506
+
507
+ .docblock-source {
508
+ border: solid 1px var(--tn-alt-bg2) !important;
509
+ }
510
+
511
+ /* ================================
512
+ IX Dialog Styles
513
+ ================================ */
514
+
515
+ /* Dialog panel - the main dialog container */
516
+ .tn-dialog-panel {
517
+ display: flex;
518
+ flex-direction: column;
519
+ /* make the panel fit the viewport without causing page scroll */
520
+ max-width: 90vw;
521
+ max-height: 90vh;
522
+ border-radius: 8px;
523
+ background: var(--tn-bg1, #ffffff);
524
+ color: var(--tn-fg1, #000000);
525
+ box-shadow: 0 11px 15px -7px rgba(0, 0, 0, 0.2),
526
+ 0 24px 38px 3px rgba(0, 0, 0, 0.14),
527
+ 0 9px 46px 8px rgba(0, 0, 0, 0.12);
528
+ }
529
+
530
+ /* Shell component wrapper */
531
+ tn-dialog-shell {
532
+ display: flex;
533
+ flex-direction: column;
534
+ min-height: 0; /* allow inner area to shrink */
535
+ width: 100%;
536
+ height: 100%;
537
+ }
538
+
539
+ /* Dialog header and actions - fixed size */
540
+ .tn-dialog__header,
541
+ .tn-dialog__actions {
542
+ flex: 0 0 auto;
543
+ padding: 16px;
544
+ }
545
+
546
+ /* Dialog header styling */
547
+ .tn-dialog__header {
548
+ display: flex;
549
+ align-items: center;
550
+ justify-content: space-between;
551
+ border-bottom: 1px solid var(--tn-lines, #e5e7eb);
552
+ }
553
+
554
+ .tn-dialog__title {
555
+ margin: 0;
556
+ font-weight: 600;
557
+ line-height: 1.5;
558
+ color: var(--tn-fg1, #000000);
559
+ flex: 1; /* Take up remaining space */
560
+ }
561
+
562
+ /* Close button */
563
+ .tn-dialog__close,
564
+ .tn-dialog__fullscreen {
565
+ display: flex;
566
+ align-items: center;
567
+ justify-content: center;
568
+ width: 32px;
569
+ height: 32px;
570
+ padding: 0;
571
+ background: none;
572
+ border: none;
573
+ border-radius: 4px;
574
+ color: var(--tn-alt-fg1, #6c757d);
575
+ cursor: pointer;
576
+ font-size: 20px;
577
+ line-height: 1;
578
+ transition: all 0.2s ease-in-out;
579
+ flex-shrink: 0; /* Don't shrink */
580
+ margin-left: 16px; /* Space between title and button */
581
+ }
582
+
583
+ .tn-dialog__close:hover {
584
+ background: var(--tn-alt-bg1, #f8f9fa);
585
+ color: var(--tn-fg1, #000000);
586
+ }
587
+
588
+ .tn-dialog__close:focus {
589
+ outline: 2px solid var(--tn-primary, #007bff);
590
+ outline-offset: 2px;
591
+ }
592
+
593
+ .tn-dialog__close:active {
594
+ transform: scale(0.95);
595
+ }
596
+
597
+ /* Dialog content - the only scrolling area */
598
+ .tn-dialog__content {
599
+ /* the only scrolling area */
600
+ flex: 1 1 auto;
601
+ min-height: 0; /* CRITICAL in flex parents */
602
+ overflow-y: auto;
603
+ overflow-x: hidden;
604
+ box-sizing: border-box;
605
+ }
606
+
607
+ /* Dialog actions */
608
+ .tn-dialog__actions {
609
+ border-top: 1px solid var(--tn-lines, #e5e7eb);
610
+ display: flex;
611
+ justify-content: flex-end;
612
+ }
613
+
614
+ .tn-dialog__actions tn-button:not(:first-child) {
615
+ margin-left: 16px;
616
+ }
617
+
618
+ /* Destructive variant */
619
+ .tn-dialog--destructive .tn-dialog__header {
620
+ border-bottom-color: var(--tn-lines, #e5e7eb);
621
+ }
622
+
623
+ .tn-dialog--destructive .tn-dialog__title {
624
+ color: var(--tn-red, #dc3545);
625
+ }
626
+
627
+ /* Dialog backdrop */
628
+ .cdk-dialog-backdrop {
629
+ background: rgba(0, 0, 0, 0.5);
630
+ }
631
+
632
+ /* Container positioning */
633
+ .cdk-dialog-container {
634
+ display: flex;
635
+ align-items: center;
636
+ justify-content: center;
637
+ min-height: 100vh;
638
+ box-sizing: border-box;
639
+ }
640
+
641
+ /* Fullscreen dialog support */
642
+ .tn-dialog--fullscreen .cdk-dialog-container {
643
+ position: fixed;
644
+ top: 0;
645
+ left: 0;
646
+ width: 100vw;
647
+ height: 100vh;
648
+ min-height: 100vh;
649
+ max-width: none;
650
+ max-height: none;
651
+ padding: 0;
652
+ align-items: stretch;
653
+ justify-content: stretch;
654
+ }
655
+
656
+ .tn-dialog--fullscreen .cdk-dialog-panel {
657
+ position: relative;
658
+ width: 100%;
659
+ height: 100%;
660
+ max-width: none;
661
+ max-height: none;
662
+ border-radius: 0;
663
+ box-shadow: none;
664
+ margin: 0;
665
+ }