@nordcode/ui 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 (66) hide show
  1. package/CHANGELOG.md +157 -0
  2. package/LICENSE.md +661 -0
  3. package/README.md +90 -0
  4. package/index.html +1169 -0
  5. package/out/bundle.css +1400 -0
  6. package/out/bundle_configless.css +1135 -0
  7. package/out/colors.css +87 -0
  8. package/out/complete.css +2647 -0
  9. package/out/complete_configless.css +2382 -0
  10. package/package.json +73 -0
  11. package/src/assets/fonts/DMMono-Regular.woff +0 -0
  12. package/src/assets/fonts/DMMono-Regular.woff2 +0 -0
  13. package/src/assets/fonts/fonts.css +7 -0
  14. package/src/assets/icons/ArrowRightSolid.svelte +1 -0
  15. package/src/assets/icons/arrow-right-solid.svg +1 -0
  16. package/src/assets/icons/favicon.png +0 -0
  17. package/src/assets/icons/favicon.svg +8 -0
  18. package/src/assets/logos/nordcode-logo-icon.svg +3 -0
  19. package/src/assets/logos/nordcode-logo.svg +17 -0
  20. package/src/modules/copyButtons/ts/copyButtons.ts +9 -0
  21. package/src/modules/dialogs/svelte/dialog.svelte +27 -0
  22. package/src/modules/dialogs/ts/LICENCE +171 -0
  23. package/src/modules/dialogs/ts/dialogs.ts +111 -0
  24. package/src/modules/notifications/js/notifications.js +294 -0
  25. package/src/modules/notifications/svelte/NotificationCenter.svelte +18 -0
  26. package/src/modules/notifications/svelte/NotificationTemplate.svelte +16 -0
  27. package/src/modules/sectionObserver/ts/sectionOberserver.ts +34 -0
  28. package/src/styles/bundle.css +7 -0
  29. package/src/styles/bundle_configless.css +5 -0
  30. package/src/styles/complete.css +5 -0
  31. package/src/styles/complete_configless.css +5 -0
  32. package/src/styles/components/badges.css +14 -0
  33. package/src/styles/components/breadcrumbs.css +37 -0
  34. package/src/styles/components/bundle.css +12 -0
  35. package/src/styles/components/buttons.css +256 -0
  36. package/src/styles/components/card.css +55 -0
  37. package/src/styles/components/dialogs.css +116 -0
  38. package/src/styles/components/forms.css +47 -0
  39. package/src/styles/components/gallery.css +66 -0
  40. package/src/styles/components/icons.css +60 -0
  41. package/src/styles/components/inputs/base.css +258 -0
  42. package/src/styles/components/inputs/bundle.css +5 -0
  43. package/src/styles/components/inputs/fields.css +79 -0
  44. package/src/styles/components/inputs/segmented.css +123 -0
  45. package/src/styles/components/inputs/switch.css +42 -0
  46. package/src/styles/components/inputs/tag-select.css +44 -0
  47. package/src/styles/components/lists.css +40 -0
  48. package/src/styles/components/notifications.css +137 -0
  49. package/src/styles/components/tables.css +7 -0
  50. package/src/styles/config/bundle.css +2 -0
  51. package/src/styles/config/config.css +828 -0
  52. package/src/styles/config/extras.css +18 -0
  53. package/src/styles/exceptions/bundle.css +3 -0
  54. package/src/styles/exceptions/misc.css +21 -0
  55. package/src/styles/exceptions/spacings.css +15 -0
  56. package/src/styles/exceptions/typography.css +57 -0
  57. package/src/styles/theme/colors.css +178 -0
  58. package/src/styles/theme/colors_processed.css +87 -0
  59. package/src/styles/utils/base.css +406 -0
  60. package/src/styles/utils/bundle.css +6 -0
  61. package/src/styles/utils/easings.css +364 -0
  62. package/src/styles/utils/layouts.css +298 -0
  63. package/src/styles/utils/media.css +55 -0
  64. package/src/styles/utils/reset.css +128 -0
  65. package/src/styles/utils/theme.css +120 -0
  66. package/transform.js +71 -0
@@ -0,0 +1,406 @@
1
+ @layer base {
2
+ :where(dt) {
3
+ font-weight: var(--font-weight-active);
4
+ color: var(--color-text-base);
5
+ }
6
+
7
+ :where(dd) {
8
+ font-weight: var(--font-weight-default);
9
+ color: var(--color-text-base);
10
+
11
+ &:not(:last-of-type) {
12
+ padding-block-end: 0.5lh;
13
+ border-bottom: var(--border-width-thin) solid var(--color-border-muted);
14
+ }
15
+ }
16
+
17
+ :where(dl:not([class]), .nc-description-list) {
18
+ display: grid;
19
+ grid-template-columns: 0.25fr 0.75fr;
20
+ inline-size: 100%;
21
+ max-inline-size: 100%;
22
+ align-items: flex-start;
23
+ word-break: break-word;
24
+ container: description-list / inline-size;
25
+ row-gap: 0.5lh;
26
+ }
27
+
28
+ :where(dd, dt) {
29
+ grid-column: 1 / span 2;
30
+ max-inline-size: var(--measure-base);
31
+ }
32
+
33
+ @container description-list (min-width: 30rem) {
34
+ :where(dt) {
35
+ grid-column: 1 / 1;
36
+ padding-inline-end: 2ch;
37
+ padding-block-end: 0;
38
+ min-block-size: 100%;
39
+
40
+ &:not(:last-of-type) {
41
+ padding-block-end: 0.5lh;
42
+ border-bottom: var(--border-width-thin) solid var(--color-border-muted);
43
+ }
44
+ }
45
+
46
+ :where(dd) {
47
+ grid-column: 2 / 2;
48
+ min-block-size: 100%;
49
+ }
50
+ }
51
+
52
+ :where(small) {
53
+ font-size: var(--font-size-small);
54
+ }
55
+
56
+ :where(figure) {
57
+ border-radius: var(--border-radius-medium);
58
+
59
+ & :where(img, picture) {
60
+ border-start-start-radius: inherit;
61
+ border-start-end-radius: inherit;
62
+ }
63
+
64
+ & :where(figcaption) {
65
+ border-end-start-radius: inherit;
66
+ border-end-end-radius: inherit;
67
+ }
68
+ }
69
+
70
+ :where(figcaption) {
71
+ display: block;
72
+ font-family: var(--font-family-sans);
73
+ font-weight: var(--font-weight-default);
74
+ line-height: var(--line-height-base);
75
+ color: var(--color-surface-subtle);
76
+ background-color: var(--color-text-base);
77
+ padding: 0.3lh 1ch;
78
+ }
79
+
80
+ :where(details) {
81
+ --p-x-details: 2ch;
82
+ --p-y-details: 0.75lh;
83
+
84
+ inline-size: 100%;
85
+ background-color: var(--color-surface-subtle);
86
+ border-radius: var(--border-radius-medium);
87
+ border: var(--border-width-thin) solid var(--color-border-base);
88
+
89
+ &>* {
90
+ padding-inline: var(--p-x-details);
91
+ }
92
+
93
+ &>*:last-child {
94
+ padding-block-end: var(--p-y-details);
95
+ }
96
+
97
+ &>summary {
98
+ cursor: pointer;
99
+ color: var(--color-text-base);
100
+ inline-size: 100%;
101
+ font-weight: var(--font-weight-strong);
102
+ padding-inline: var(--p-x-details);
103
+ padding-block: var(--p-y-details);
104
+ }
105
+ }
106
+
107
+ .note,
108
+ blockquote {
109
+ padding: 0;
110
+ padding-inline-start: 2ch;
111
+ inline-size: 100%;
112
+ color: var(--color-text-base);
113
+ position: relative;
114
+ margin-inline: 0;
115
+ font-family: var(--font-family-serif);
116
+ quotes: auto;
117
+ font-size: var(--font-size-large);
118
+
119
+ & p {
120
+ max-inline-size: var(--measure-base);
121
+
122
+ &:first-of-type:before {
123
+ content: open-quote;
124
+ }
125
+
126
+ &:last-of-type:after {
127
+ content: close-quote;
128
+ }
129
+ }
130
+
131
+ & cite {
132
+ display: block;
133
+ font-family: var(--font-family-default);
134
+ margin-block-start: var(--spacing-near);
135
+ font-size: var(--font-size-base);
136
+ max-inline-size: max-content;
137
+ color: color-mix(in oklch,
138
+ currentColor calc(var(--transparency-weaker) * 100%),
139
+ transparent);
140
+ }
141
+
142
+ & cite:before {
143
+ content: "—";
144
+ margin-inline-end: 0.5ch;
145
+ }
146
+ }
147
+
148
+ cite {
149
+ font-family: var(--font-family-serif);
150
+ font-style: normal;
151
+ }
152
+
153
+ :where(hr) {
154
+ inline-size: 100%;
155
+ block-size: 0;
156
+ border-top: var(--border-width-medium) solid var(--color-border-base);
157
+ }
158
+
159
+ :where(h1, h2, h3, h4, h5, h6) {
160
+ line-height: var(--line-height-small);
161
+ color: inherit;
162
+ max-inline-size: 100%;
163
+ font-weight: var(--font-weight-heading);
164
+ }
165
+
166
+ :where(h1) {
167
+ font-size: var(--font-size-display);
168
+ }
169
+
170
+ :where(h2) {
171
+ font-size: var(--font-size-largest);
172
+ }
173
+
174
+ :where(h3) {
175
+ font-size: var(--font-size-large);
176
+ }
177
+
178
+ :where(h4) {
179
+ font-size: var(--font-size-base);
180
+ }
181
+
182
+ :where(h5) {
183
+ font-size: var(--font-size-small);
184
+ }
185
+
186
+ :where(h6) {
187
+ font-size: var(--font-size-smallest);
188
+ }
189
+
190
+ ::marker {
191
+ color: var(--color-brand-primary-base);
192
+ }
193
+
194
+ :where(::selection,
195
+ ::target-text) {
196
+ background-color: var(--color-brand-primary-base);
197
+ color: var(--color-surface-base);
198
+ }
199
+
200
+ :where(a, .nc-link) {
201
+ color: inherit;
202
+ font-family: var(--font-family-link);
203
+ text-decoration: underline;
204
+ text-underline-offset: 0.25lh;
205
+ text-decoration-thickness: from-font;
206
+ font-weight: var(--font-weight-default);
207
+ text-decoration-color: currentColor;
208
+ cursor: pointer;
209
+ letter-spacing: var(--tracking-tight);
210
+
211
+ &:visited {
212
+ opacity: 0.72;
213
+ }
214
+
215
+ &:hover {
216
+ text-decoration-color: var(--color-brand-primary-base);
217
+ }
218
+ }
219
+
220
+ :where(em, i) {
221
+ font-family: var(--font-family-serif);
222
+ }
223
+
224
+ :where(strong, b) {
225
+ font-weight: var(--font-weight-strong);
226
+ }
227
+
228
+ :where(dfn, var) {
229
+ font-family: var(--font-family-mono);
230
+ letter-spacing: var(--tracking-tight);
231
+ font-weight: var(--font-weight-default);
232
+ }
233
+
234
+ :where([aria-disabled="true"], .disabled, :disabled) {
235
+ color: inherit;
236
+ opacity: 1;
237
+ cursor: not-allowed;
238
+ filter: contrast(0.64) opacity(0.64);
239
+ }
240
+
241
+ :where(del, ins, mark, code, kbd, var) {
242
+ padding-inline: 0.5ch;
243
+ border-radius: var(--border-radius-small);
244
+ line-height: inherit;
245
+ box-decoration-break: clone;
246
+ -webkit-box-decoration-break: clone;
247
+ }
248
+
249
+ :where(code, kbd, var) {
250
+ font-family: var(--font-family-mono);
251
+ letter-spacing: 0;
252
+ font-weight: var(--font-weight-default);
253
+ padding-block: 0.125lh;
254
+ max-inline-size: fit-content;
255
+ hyphens: none;
256
+ tab-size: 4;
257
+ text-align: left;
258
+ word-spacing: normal;
259
+ word-break: normal;
260
+ word-wrap: normal;
261
+ font-style: normal;
262
+ }
263
+
264
+ :where(code) {
265
+ background: var(--color-surface-subtle);
266
+ }
267
+
268
+ :where(var) {
269
+ background: var(--color-brand-primary-surface);
270
+ color: var(--color-brand-primary-emphasis);
271
+ }
272
+
273
+ :where(kbd) {
274
+ background: var(--color-surface-subtle);
275
+ border: var(--border-width-thin) solid var(--color-border-base);
276
+ box-shadow: var(--shadow-nearest);
277
+ font-weight: var(--font-weight-active);
278
+ }
279
+
280
+ :where(pre) {
281
+ padding: 0.5lh 2ch;
282
+ inline-size: 100%;
283
+ overflow-x: auto;
284
+ color: var(--color-text-base);
285
+ border: var(--border-width-medium) solid var(--color-border-base);
286
+ border-radius: var(--border-radius-medium);
287
+ background: var(--color-surface-subtle);
288
+ -webkit-overflow-scrolling: touch;
289
+
290
+ & code {
291
+ white-space: pre;
292
+ border-radius: 0;
293
+ padding: 0;
294
+ background: none;
295
+ }
296
+ }
297
+
298
+ :where(table) {
299
+ --_nc-table-border-radius: var(--nc-table-border-radius, var(--border-radius-medium));
300
+ inline-size: 100%;
301
+ border-collapse: separate;
302
+ border-spacing: 0;
303
+ text-align: left;
304
+ border: var(--border-width-medium) solid var(--color-border-base);
305
+ border-radius: var(--_nc-table-border-radius);
306
+ }
307
+
308
+ :where(table > thead th:first-child) {
309
+ border-start-start-radius: var(--_nc-table-border-radius);
310
+ }
311
+
312
+ :where(table > thead th:last-child) {
313
+ border-start-end-radius: var(--_nc-table-border-radius);
314
+ }
315
+
316
+ :where(table > tfoot th:first-child) {
317
+ border-end-start-radius: var(--_nc-table-border-radius);
318
+ }
319
+
320
+ :where(table > tfoot th:last-child) {
321
+ border-end-end-radius: var(--_nc-table-border-radius);
322
+ }
323
+
324
+ :where(td, th) {
325
+ padding: 0.4lh 1ch;
326
+ line-height: var(--line-height-small);
327
+ white-space: nowrap;
328
+ font-variant-numeric: tabular-nums;
329
+ }
330
+
331
+ :where(td) {
332
+ border-block-end: var(--border-width-thin) solid var(--color-border-muted);
333
+ }
334
+
335
+ :where(thead th) {
336
+ border-block-end: var(--border-width-thin) solid var(--color-border-muted);
337
+ }
338
+
339
+ :where(tfoot th) {
340
+ border-block-start: var(--border-width-thin) solid var(--color-border-muted);
341
+ }
342
+
343
+ :where(th) {
344
+ font-weight: var(--font-weight-active);
345
+ color: var(--color-text-muted);
346
+ background-color: var(--color-surface-subtle);
347
+ }
348
+
349
+ :where(tbody tr:hover) {
350
+ background: var(--color-brand-primary-hover);
351
+ }
352
+
353
+ :where(caption) {
354
+ color: var(--color-text-base);
355
+ }
356
+
357
+ :where(tr:has(td) th) {
358
+ border-block-end: var(--border-width-thin) solid var(--color-border-muted);
359
+ border-inline-end: var(--border-width-thin) solid var(--color-border-muted);
360
+ }
361
+
362
+ :where(tr:last-child:has(td) th) {
363
+ border-block-end: none;
364
+ }
365
+
366
+ :where(tr:last-child > td) {
367
+ border: none;
368
+ }
369
+
370
+ :where(tbody tr:nth-child(even) > td) {
371
+ background-color: var(--color-surface-muted);
372
+ }
373
+
374
+ :target {
375
+ scroll-margin-block-start: 2ex;
376
+ }
377
+
378
+ :where(del) {
379
+ color: var(--color-status-danger-text);
380
+ text-decoration-color: var(--color-status-danger-text);
381
+ background: var(--color-status-danger-surface);
382
+ }
383
+
384
+ :where(ins) {
385
+ color: var(--color-status-success-text);
386
+ text-decoration-color: var(--color-status-success-text);
387
+ background: var(--color-status-success-surface);
388
+ }
389
+
390
+ :where(mark) {
391
+ color: var(--color-brand-primary-emphasis);
392
+ background: var(--color-brand-primary-surface);
393
+ }
394
+
395
+ :where(ul, ol) {
396
+ padding-inline-start: 2ch;
397
+ }
398
+
399
+ :where(li + li) {
400
+ margin-top: 0.5lh;
401
+ }
402
+
403
+ :where(li > :is(ul, ol)) {
404
+ margin-top: 0.5lh;
405
+ }
406
+ }
@@ -0,0 +1,6 @@
1
+ @import "./media.css";
2
+ @import "./base.css";
3
+ @import "./reset.css";
4
+ @import "./easings.css";
5
+ @import "./layouts.css";
6
+ @import "./theme.css";