@nordcode/ui 1.0.3 → 1.0.4

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.
@@ -78,11 +78,6 @@
78
78
  --color-status-danger-contrast-lightness: var(--lightningcss-light, var(--color-status-danger-contrast-lightness-light)) var(--lightningcss-dark, var(--color-status-danger-contrast-lightness-dark));
79
79
  --color-status-danger-contrast: var(--lightningcss-light, var(--color-status-danger-contrast-light)) var(--lightningcss-dark, var(--color-status-danger-contrast-dark));
80
80
  --shadow-color: var(--lightningcss-light, var(--shadow-color-light)) var(--lightningcss-dark, var(--shadow-color-dark));
81
- --shadow-inset: var(--lightningcss-light, var(--shadow-inset-light)) var(--lightningcss-dark, var(--shadow-inset-dark));
82
- --shadow-nearest: var(--lightningcss-light, var(--shadow-nearest-light)) var(--lightningcss-dark, var(--shadow-nearest-dark));
83
- --shadow-near: var(--lightningcss-light, var(--shadow-near-light)) var(--lightningcss-dark, var(--shadow-near-dark));
84
- --shadow-medium: var(--lightningcss-light, var(--shadow-medium-light)) var(--lightningcss-dark, var(--shadow-medium-dark));
85
- --shadow-far: var(--lightningcss-light, var(--shadow-far-light)) var(--lightningcss-dark, var(--shadow-far-dark));
86
81
  --triangle-down-url: var(--lightningcss-light, var(--triangle-down-url-light)) var(--lightningcss-dark, var(--triangle-down-url-dark));
87
82
  --triangle-up-url: var(--lightningcss-light, var(--triangle-up-url-light)) var(--lightningcss-dark, var(--triangle-up-url-dark));
88
83
  }
@@ -304,6 +299,10 @@
304
299
  padding-block-end: var(--p-y-details);
305
300
  }
306
301
 
302
+ :where(details) > summary::-webkit-details-marker {
303
+ display: none;
304
+ }
305
+
307
306
  :where(details) > summary {
308
307
  cursor: pointer;
309
308
  color: var(--color-text-base);
@@ -311,6 +310,7 @@
311
310
  font-weight: var(--font-weight-strong);
312
311
  padding-inline: var(--p-x-details);
313
312
  padding-block: var(--p-y-details);
313
+ list-style: none;
314
314
  }
315
315
 
316
316
  .note, blockquote {
@@ -1126,6 +1126,27 @@
1126
1126
  margin-inline-end: auto;
1127
1127
  }
1128
1128
 
1129
+ @layer components.alerts {
1130
+ :where(.nc-alert) {
1131
+ background: var(--surface);
1132
+ color: var(--text);
1133
+ gap: 1ch;
1134
+ }
1135
+
1136
+ :where(.nc-alert) > .nc-icon {
1137
+ margin-block: calc((var(--line-height-base) - var(--icon-size)) / 2);
1138
+ }
1139
+
1140
+ :where(.nc-alert-title) {
1141
+ font-weight: var(--font-weight-heading);
1142
+ }
1143
+
1144
+ :where(.nc-alert.-filled) {
1145
+ background: var(--surface-hover);
1146
+ color: var(--text-hover);
1147
+ }
1148
+ }
1149
+
1129
1150
  @layer components.badge {
1130
1151
  :where(.badge) {
1131
1152
  font-family: var(--font-family-mono);
@@ -1141,6 +1162,44 @@
1141
1162
  }
1142
1163
  }
1143
1164
 
1165
+ @layer components.breadcrumbs {
1166
+ :where(.nc-breadcrumbs) {
1167
+ background-color: var(--nc-breadcrumbs-surface, transparent);
1168
+ inline-size: max-content;
1169
+ max-inline-size: 100%;
1170
+ color: var(--nc-breadcrumbs-text, --color-text-muted);
1171
+ }
1172
+
1173
+ :where(.nc-breadcrumb-item) {
1174
+ color: inherit;
1175
+ }
1176
+
1177
+ :where(.nc-breadcrumb-item):last-child {
1178
+ color: var(--color-brand-primary-base);
1179
+ }
1180
+
1181
+ :where(.nc-breadcrumb-item):not(:last-child):after {
1182
+ color: inherit;
1183
+ content: "›";
1184
+ font-size: inherit;
1185
+ padding-inline: 1ch;
1186
+ }
1187
+
1188
+ :where(.nc-breadcrumb-link) {
1189
+ color: inherit;
1190
+ text-decoration: none;
1191
+ }
1192
+
1193
+ :where(.nc-breadcrumb-link):hover {
1194
+ text-decoration: underline;
1195
+ }
1196
+
1197
+ :where(.nc-breadcrumb-link)[aria-current="page"] {
1198
+ pointer-events: none;
1199
+ color: var(--nc-breadcrumbs-text-active, --color-text-base);
1200
+ }
1201
+ }
1202
+
1144
1203
  @layer components.buttons {
1145
1204
  .buttonReset {
1146
1205
  background: none;
@@ -1312,6 +1371,10 @@
1312
1371
  padding: 0;
1313
1372
  }
1314
1373
 
1374
+ :where(button:not([class]), button[type]:not([class]), input[type="button"]:not([class]), input[type="submit"]:not([class]), input[type="reset"]:not([class]), .nc-button).-aligned {
1375
+ margin-inline: calc(-1 * var(--_button-padding-inline));
1376
+ }
1377
+
1315
1378
  :where(input[type="file"]:not([class])) {
1316
1379
  color: var(--_input-color);
1317
1380
  background-color: var(--_input-background);
@@ -1536,6 +1599,54 @@
1536
1599
  }
1537
1600
  }
1538
1601
 
1602
+ @layer components.forms {
1603
+ :where(.nc-form) {
1604
+ inline-size: min(100%, var(--nc-form-max-inline-size, var(--measure-base)));
1605
+ }
1606
+
1607
+ :where(.nc-form-title) {
1608
+ font-size: var(--font-size-largest);
1609
+ font-weight: var(--font-weight-heading);
1610
+ line-height: var(--line-height-small);
1611
+ color: var(--color-text-base);
1612
+ }
1613
+
1614
+ :where(.nc-form-hint) {
1615
+ font-size: var(--font-size-large);
1616
+ color: var(--color-text-muted);
1617
+ margin-block: .5lh;
1618
+ }
1619
+
1620
+ :where(fieldset:not([class]), .nc-fieldset) {
1621
+ border: none;
1622
+ min-inline-size: 0;
1623
+ margin: 0;
1624
+ padding: 0;
1625
+ }
1626
+
1627
+ :where(legend:not([class]), .nc-legend) {
1628
+ font-family: var(--font-family-default);
1629
+ letter-spacing: var(--tracking-tight);
1630
+ font-weight: var(--font-weight-active);
1631
+ color: var(--text, var(--color-text-base));
1632
+ font-size: var(--font-size-base);
1633
+ border: none;
1634
+ border-radius: 0;
1635
+ inline-size: 100%;
1636
+ margin-block-end: .75lh;
1637
+ padding: 0;
1638
+ display: block;
1639
+ }
1640
+
1641
+ :where(:is(fieldset:not([class]), .nc-fieldset):has(:is(.nc-legend + .nc-hint, legend:not([class]) + .nc-hint)) > :is(legend:not([class]), .nc-legend)) {
1642
+ margin-block-end: 0;
1643
+ }
1644
+
1645
+ :where(:is(fieldset:not([class]), .nc-fieldset):has(:is(.nc-legend + .nc-hint, legend:not([class]) + .nc-hint)) > :is(legend:not([class]), .nc-legend)) + .nc-hint {
1646
+ margin-block-end: .6lh;
1647
+ }
1648
+ }
1649
+
1539
1650
  @layer components.gallery {
1540
1651
  :where(.nc-gallery) {
1541
1652
  gap: var(--gallery-gap, var(--spacing-base));
@@ -2103,6 +2214,48 @@
2103
2214
  }
2104
2215
  }
2105
2216
 
2217
+ @layer components.lists {
2218
+ :where(.nc-meta-list) {
2219
+ inline-size: 100%;
2220
+ container: metalist / inline-size;
2221
+ }
2222
+
2223
+ :where(.nc-meta-list-item) {
2224
+ overflow-wrap: break-word;
2225
+ -webkit-hyphens: auto;
2226
+ hyphens: auto;
2227
+ inline-size: 100%;
2228
+ max-inline-size: 100%;
2229
+ }
2230
+
2231
+ :where(.nc-meta-list-item):not(:last-child) {
2232
+ margin-block-end: 1ch;
2233
+ }
2234
+
2235
+ @container metalist (width >= 20rem) {
2236
+ :where(.nc-meta-list-item) {
2237
+ inline-size: auto;
2238
+ }
2239
+
2240
+ :where(.nc-meta-list-item):not(:last-child):after {
2241
+ content: "";
2242
+ border-right: var(--border-width-medium) solid var(--color-border-muted);
2243
+ transform: calc(var(--border-width-medium) / 2);
2244
+ margin: 0 1ch;
2245
+ }
2246
+ }
2247
+
2248
+ :where(.nc-list-reset) {
2249
+ margin: 0;
2250
+ padding: 0;
2251
+ list-style: none;
2252
+ }
2253
+
2254
+ :where(.nc-list-reset) li {
2255
+ margin: 0;
2256
+ }
2257
+ }
2258
+
2106
2259
  @layer components.notifications {
2107
2260
  :root {
2108
2261
  --_notification-max-width: var(--notifications-max-width, 20rem);
@@ -2244,131 +2397,3 @@
2244
2397
  overflow-x: auto;
2245
2398
  }
2246
2399
  }
2247
-
2248
- @layer components.lists {
2249
- :where(.nc-meta-list) {
2250
- inline-size: 100%;
2251
- container: metalist / inline-size;
2252
- }
2253
-
2254
- :where(.nc-meta-list-item) {
2255
- overflow-wrap: break-word;
2256
- -webkit-hyphens: auto;
2257
- hyphens: auto;
2258
- inline-size: 100%;
2259
- max-inline-size: 100%;
2260
- }
2261
-
2262
- :where(.nc-meta-list-item):not(:last-child) {
2263
- margin-block-end: 1ch;
2264
- }
2265
-
2266
- @container metalist (width >= 20rem) {
2267
- :where(.nc-meta-list-item) {
2268
- inline-size: auto;
2269
- }
2270
-
2271
- :where(.nc-meta-list-item):not(:last-child):after {
2272
- content: "";
2273
- border-right: var(--border-width-medium) solid var(--color-border-muted);
2274
- transform: calc(var(--border-width-medium) / 2);
2275
- margin: 0 1ch;
2276
- }
2277
- }
2278
-
2279
- :where(.nc-list-reset) {
2280
- margin: 0;
2281
- padding: 0;
2282
- list-style: none;
2283
- }
2284
-
2285
- :where(.nc-list-reset) li {
2286
- margin: 0;
2287
- }
2288
- }
2289
-
2290
- @layer components.breadcrumbs {
2291
- :where(.nc-breadcrumbs) {
2292
- background-color: var(--nc-breadcrumbs-surface, transparent);
2293
- inline-size: max-content;
2294
- max-inline-size: 100%;
2295
- color: var(--nc-breadcrumbs-text, --color-text-muted);
2296
- }
2297
-
2298
- :where(.nc-breadcrumb-item) {
2299
- color: inherit;
2300
- }
2301
-
2302
- :where(.nc-breadcrumb-item):last-child {
2303
- color: var(--color-brand-primary-base);
2304
- }
2305
-
2306
- :where(.nc-breadcrumb-item):not(:last-child):after {
2307
- color: inherit;
2308
- content: "›";
2309
- font-size: inherit;
2310
- padding-inline: 1ch;
2311
- }
2312
-
2313
- :where(.nc-breadcrumb-link) {
2314
- color: inherit;
2315
- text-decoration: none;
2316
- }
2317
-
2318
- :where(.nc-breadcrumb-link):hover {
2319
- text-decoration: underline;
2320
- }
2321
-
2322
- :where(.nc-breadcrumb-link)[aria-current="page"] {
2323
- pointer-events: none;
2324
- color: var(--nc-breadcrumbs-text-active, --color-text-base);
2325
- }
2326
- }
2327
-
2328
- @layer components.forms {
2329
- :where(.nc-form) {
2330
- inline-size: min(100%, var(--nc-form-max-inline-size, var(--measure-base)));
2331
- }
2332
-
2333
- :where(.nc-form-title) {
2334
- font-size: var(--font-size-largest);
2335
- font-weight: var(--font-weight-heading);
2336
- line-height: var(--line-height-small);
2337
- color: var(--color-text-base);
2338
- }
2339
-
2340
- :where(.nc-form-hint) {
2341
- font-size: var(--font-size-large);
2342
- color: var(--color-text-muted);
2343
- margin-block: .5lh;
2344
- }
2345
-
2346
- :where(fieldset:not([class]), .nc-fieldset) {
2347
- border: none;
2348
- min-inline-size: 0;
2349
- margin: 0;
2350
- padding: 0;
2351
- }
2352
-
2353
- :where(legend:not([class]), .nc-legend) {
2354
- font-family: var(--font-family-default);
2355
- letter-spacing: var(--tracking-tight);
2356
- font-weight: var(--font-weight-active);
2357
- color: var(--text, var(--color-text-base));
2358
- font-size: var(--font-size-base);
2359
- border: none;
2360
- border-radius: 0;
2361
- inline-size: 100%;
2362
- margin-block-end: .75lh;
2363
- padding: 0;
2364
- display: block;
2365
- }
2366
-
2367
- :where(:is(fieldset:not([class]), .nc-fieldset):has(:is(.nc-legend + .nc-hint, legend:not([class]) + .nc-hint)) > :is(legend:not([class]), .nc-legend)) {
2368
- margin-block-end: 0;
2369
- }
2370
-
2371
- :where(:is(fieldset:not([class]), .nc-fieldset):has(:is(.nc-legend + .nc-hint, legend:not([class]) + .nc-hint)) > :is(legend:not([class]), .nc-legend)) + .nc-hint {
2372
- margin-block-end: .6lh;
2373
- }
2374
- }
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "type": "git",
13
13
  "url": "https://github.com/nordcode-agency/nordcode/tree/main/packages/ui"
14
14
  },
15
- "version": "1.0.3",
15
+ "version": "1.0.4",
16
16
  "publishConfig": {
17
17
  "access": "public"
18
18
  },
@@ -35,6 +35,7 @@
35
35
  "./utils/layouts": "./src/styles/utils/layouts.css",
36
36
  "./utils/theme": "./src/styles/utils/theme.css",
37
37
  "./components": "./src/styles/components/bundle.css",
38
+ "./components/alerts": "./src/styles/components/alerts.css",
38
39
  "./components/badges": "./src/styles/components/badges.css",
39
40
  "./components/breadcrumbs": "./src/styles/components/breadcrumbs.css",
40
41
  "./components/buttons": "./src/styles/components/buttons.css",
@@ -0,0 +1,20 @@
1
+ @layer components.alerts {
2
+ :where(.nc-alert) {
3
+ background: var(--surface);
4
+ color: var(--text);
5
+ gap: 1ch;
6
+ }
7
+
8
+ :where(.nc-alert)>.nc-icon {
9
+ margin-block: calc((var(--line-height-base) - var(--icon-size)) / 2);
10
+ }
11
+
12
+ :where(.nc-alert-title) {
13
+ font-weight: var(--font-weight-heading);
14
+ }
15
+
16
+ :where(.nc-alert.-filled) {
17
+ background: var(--surface-hover);
18
+ color: var(--text-hover);
19
+ }
20
+ }
@@ -1,12 +1,13 @@
1
+ @import "./alerts.css";
1
2
  @import "./badges.css";
3
+ @import "./breadcrumbs.css";
2
4
  @import "./buttons.css";
3
5
  @import "./card.css";
4
6
  @import "./dialogs.css";
7
+ @import "./forms.css";
5
8
  @import "./gallery.css";
6
9
  @import "./icons.css";
7
10
  @import "./inputs/bundle.css";
11
+ @import "./lists.css";
8
12
  @import "./notifications.css";
9
13
  @import "./tables.css";
10
- @import "./lists.css";
11
- @import "./breadcrumbs.css";
12
- @import "./forms.css";
@@ -212,6 +212,10 @@
212
212
  &.-icon.-small {
213
213
  padding: 0;
214
214
  }
215
+
216
+ &.-aligned {
217
+ margin-inline: calc(-1 * var(--_button-padding-inline));
218
+ }
215
219
  }
216
220
 
217
221
  :where(input[type='file']:not([class])) {