@nordcode/ui 2.0.5 → 2.1.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 (36) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/LICENSE.md +159 -159
  3. package/README.md +1 -14
  4. package/out/bundle.css +44 -26
  5. package/out/bundle_configless.css +32 -14
  6. package/out/complete.css +170 -144
  7. package/out/complete_configless.css +158 -132
  8. package/package.json +4 -3
  9. package/src/assets/icons/ArrowRightSolid.svelte +3 -1
  10. package/src/assets/icons/arrow-right-solid.svg +5 -1
  11. package/src/assets/icons/favicon.svg +13 -4
  12. package/src/assets/logos/nordcode-logo-icon.svg +6 -1
  13. package/src/assets/logos/nordcode-logo.svg +46 -13
  14. package/src/modules/dialogs/svelte/dialog.svelte +14 -15
  15. package/src/modules/dialogs/ts/dialogs.ts +80 -79
  16. package/src/modules/notifications/js/notifications.js +3 -6
  17. package/src/modules/notifications/svelte/NotificationTemplate.svelte +0 -2
  18. package/src/styles/components/buttons.css +70 -93
  19. package/src/styles/components/card.css +1 -1
  20. package/src/styles/components/dialogs.css +4 -5
  21. package/src/styles/components/forms.css +3 -7
  22. package/src/styles/components/gallery.css +12 -8
  23. package/src/styles/components/inputs/base.css +24 -72
  24. package/src/styles/components/inputs/segmented.css +4 -8
  25. package/src/styles/components/inputs/switch.css +2 -4
  26. package/src/styles/components/notifications.css +3 -4
  27. package/src/styles/config/config.css +352 -305
  28. package/src/styles/theme/colors.css +182 -124
  29. package/src/styles/theme/colors_processed.css +254 -80
  30. package/src/styles/utils/base.css +2 -13
  31. package/src/styles/utils/bundle.css +1 -0
  32. package/src/styles/utils/conditionalRadius.css +7 -0
  33. package/src/styles/utils/easings.css +360 -304
  34. package/src/styles/utils/layouts.css +12 -18
  35. package/src/styles/utils/reset.css +5 -38
  36. package/transform.js +2 -9
@@ -164,10 +164,11 @@
164
164
  */
165
165
  :where(.nc-grid) {
166
166
  display: grid;
167
- grid-template-columns: repeat(
168
- var(--grid-placement, auto-fill),
169
- minmax(var(--grid-min-item-size, 16rem), 1fr)
170
- );
167
+ grid-template-columns:
168
+ repeat(
169
+ var(--grid-placement, auto-fill),
170
+ minmax(var(--grid-min-item-size, 16rem), 1fr)
171
+ );
171
172
  gap: var(--grid-gap, var(--spacing-base));
172
173
 
173
174
  /* A split 50/50 layout */
@@ -215,7 +216,7 @@
215
216
  /* Max 2 items,
216
217
  so anything greater than 2 is ful width */
217
218
 
218
- & > :nth-child(n + 4) {
219
+ & > :nth-child(n+4) {
219
220
  flex-basis: 100%;
220
221
  }
221
222
  }
@@ -242,21 +243,14 @@
242
243
 
243
244
  display: grid;
244
245
  gap: var(--_nc-ram-grid-gap-column) var(--_nc-ram-grid-gap-row);
245
- grid-template-columns: repeat(
246
- var(--_nc-ram-grid-repeat-count),
247
- minmax(min(var(--_nc-ram-grid-min-width), 100%), 1fr)
248
- );
246
+ grid-template-columns:
247
+ repeat(
248
+ var(--_nc-ram-grid-repeat-count),
249
+ minmax(min(var(--_nc-ram-grid-min-width), 100%), 1fr)
250
+ );
249
251
  }
250
252
 
251
- :where(
252
- .nc-stack,
253
- .nc-cluster,
254
- .nc-with-sidebar,
255
- .nc-grid,
256
- .nc-gallery,
257
- .nc-switcher,
258
- .nc-ram-grid
259
- ) {
253
+ :where(.nc-stack, .nc-cluster, .nc-with-sidebar, .nc-grid, .nc-gallery, .nc-switcher, .nc-ram-grid) {
260
254
  &.-inherit {
261
255
  gap: inherit;
262
256
  }
@@ -16,14 +16,8 @@
16
16
  background-repeat: no-repeat;
17
17
  }
18
18
 
19
- @media (prefers-reduced-motion: no-preference) {
20
- :where(:focus-visible) {
21
- transition: outline-offset var(--transition-duration-short) var(--ease-2);
22
- }
23
-
24
- :where(:not(:active):focus-visible) {
25
- transition-duration: var(--transition-duration-base);
26
- }
19
+ :where(:focus-visible) {
20
+ transition: outline-offset var(--transition-duration-quick-1) var(--ease-2);
27
21
  }
28
22
 
29
23
  :where(:not(:active):focus-visible) {
@@ -101,38 +95,11 @@
101
95
  gap: 0;
102
96
  }
103
97
 
104
- :where(
105
- a[href],
106
- area,
107
- button,
108
- input:not(
109
- [type="text"],
110
- [type="email"],
111
- [type="number"],
112
- [type="password"],
113
- [type=""],
114
- [type="tel"],
115
- [type="url"]
116
- ),
117
- label[for],
118
- select,
119
- summary,
120
- [tabindex]:not([tabindex*="-"], pre)
121
- ) {
98
+ :where(a[href], area, button, input:not([type="text"], [type="email"], [type="number"], [type="password"], [type=""], [type="tel"], [type="url"]), label[for], select, summary, [tabindex]:not([tabindex*="-"], pre)) {
122
99
  cursor: pointer;
123
100
  }
124
101
 
125
- :where(
126
- a[href],
127
- area,
128
- button,
129
- input,
130
- label[for],
131
- select,
132
- summary,
133
- textarea,
134
- [tabindex]:not([tabindex*="-"])
135
- ) {
102
+ :where(a[href], area, button, input, label[for], select, summary, textarea, [tabindex]:not([tabindex*="-"])) {
136
103
  touch-action: manipulation;
137
104
  -webkit-tap-highlight-color: transparent;
138
105
  }
@@ -156,6 +123,6 @@
156
123
  }
157
124
 
158
125
  :where(pre) {
159
- white-space: pre-wrap;
126
+ white-space: pre-wrap;
160
127
  }
161
128
  }
package/transform.js CHANGED
@@ -1,16 +1,9 @@
1
- import fs from 'node:fs';
2
1
  import browserslist from 'browserslist';
3
2
  import { browserslistToTargets, bundle } from 'lightningcss';
3
+ import fs from 'node:fs';
4
4
 
5
5
  const browserlistTargtsWidelyAvailable = [
6
- 'Chrome > 0 and last 2.5 years',
7
- 'ChromeAndroid > 0 and last 2.5 years',
8
- 'Edge > 0 and last 2.5 years',
9
- 'Firefox > 0 and last 2.5 years',
10
- 'FirefoxAndroid > 0 and last 2.5 years',
11
- 'Safari > 0 and last 2.5 years',
12
- 'iOS > 0 and last 2.5 years',
13
- 'not dead',
6
+ 'extends browserslist-config-baseline',
14
7
  ];
15
8
 
16
9
  const targets = browserslistToTargets(browserslist(browserlistTargtsWidelyAvailable));