@nordcode/ui 1.0.2 → 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
  }
@@ -137,6 +132,7 @@
137
132
  background-color: var(--color-surface-muted);
138
133
  font-family: var(--font-family-default);
139
134
  line-height: var(--line-height-base);
135
+ min-block-size: 100%;
140
136
  font-style: normal;
141
137
  }
142
138
 
@@ -303,6 +299,10 @@
303
299
  padding-block-end: var(--p-y-details);
304
300
  }
305
301
 
302
+ :where(details) > summary::-webkit-details-marker {
303
+ display: none;
304
+ }
305
+
306
306
  :where(details) > summary {
307
307
  cursor: pointer;
308
308
  color: var(--color-text-base);
@@ -310,6 +310,7 @@
310
310
  font-weight: var(--font-weight-strong);
311
311
  padding-inline: var(--p-x-details);
312
312
  padding-block: var(--p-y-details);
313
+ list-style: none;
313
314
  }
314
315
 
315
316
  .note, blockquote {
@@ -1125,6 +1126,27 @@
1125
1126
  margin-inline-end: auto;
1126
1127
  }
1127
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
+
1128
1150
  @layer components.badge {
1129
1151
  :where(.badge) {
1130
1152
  font-family: var(--font-family-mono);
@@ -1140,6 +1162,44 @@
1140
1162
  }
1141
1163
  }
1142
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
+
1143
1203
  @layer components.buttons {
1144
1204
  .buttonReset {
1145
1205
  background: none;
@@ -1311,6 +1371,10 @@
1311
1371
  padding: 0;
1312
1372
  }
1313
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
+
1314
1378
  :where(input[type="file"]:not([class])) {
1315
1379
  color: var(--_input-color);
1316
1380
  background-color: var(--_input-background);
@@ -1535,6 +1599,54 @@
1535
1599
  }
1536
1600
  }
1537
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
+
1538
1650
  @layer components.gallery {
1539
1651
  :where(.nc-gallery) {
1540
1652
  gap: var(--gallery-gap, var(--spacing-base));
@@ -2102,6 +2214,48 @@
2102
2214
  }
2103
2215
  }
2104
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
+
2105
2259
  @layer components.notifications {
2106
2260
  :root {
2107
2261
  --_notification-max-width: var(--notifications-max-width, 20rem);
@@ -2243,131 +2397,3 @@
2243
2397
  overflow-x: auto;
2244
2398
  }
2245
2399
  }
2246
-
2247
- @layer components.lists {
2248
- :where(.nc-meta-list) {
2249
- inline-size: 100%;
2250
- container: metalist / inline-size;
2251
- }
2252
-
2253
- :where(.nc-meta-list-item) {
2254
- overflow-wrap: break-word;
2255
- -webkit-hyphens: auto;
2256
- hyphens: auto;
2257
- inline-size: 100%;
2258
- max-inline-size: 100%;
2259
- }
2260
-
2261
- :where(.nc-meta-list-item):not(:last-child) {
2262
- margin-block-end: 1ch;
2263
- }
2264
-
2265
- @container metalist (width >= 20rem) {
2266
- :where(.nc-meta-list-item) {
2267
- inline-size: auto;
2268
- }
2269
-
2270
- :where(.nc-meta-list-item):not(:last-child):after {
2271
- content: "";
2272
- border-right: var(--border-width-medium) solid var(--color-border-muted);
2273
- transform: calc(var(--border-width-medium) / 2);
2274
- margin: 0 1ch;
2275
- }
2276
- }
2277
-
2278
- :where(.nc-list-reset) {
2279
- margin: 0;
2280
- padding: 0;
2281
- list-style: none;
2282
- }
2283
-
2284
- :where(.nc-list-reset) li {
2285
- margin: 0;
2286
- }
2287
- }
2288
-
2289
- @layer components.breadcrumbs {
2290
- :where(.nc-breadcrumbs) {
2291
- background-color: var(--nc-breadcrumbs-surface, transparent);
2292
- inline-size: max-content;
2293
- max-inline-size: 100%;
2294
- color: var(--nc-breadcrumbs-text, --color-text-muted);
2295
- }
2296
-
2297
- :where(.nc-breadcrumb-item) {
2298
- color: inherit;
2299
- }
2300
-
2301
- :where(.nc-breadcrumb-item):last-child {
2302
- color: var(--color-brand-primary-base);
2303
- }
2304
-
2305
- :where(.nc-breadcrumb-item):not(:last-child):after {
2306
- color: inherit;
2307
- content: "›";
2308
- font-size: inherit;
2309
- padding-inline: 1ch;
2310
- }
2311
-
2312
- :where(.nc-breadcrumb-link) {
2313
- color: inherit;
2314
- text-decoration: none;
2315
- }
2316
-
2317
- :where(.nc-breadcrumb-link):hover {
2318
- text-decoration: underline;
2319
- }
2320
-
2321
- :where(.nc-breadcrumb-link)[aria-current="page"] {
2322
- pointer-events: none;
2323
- color: var(--nc-breadcrumbs-text-active, --color-text-base);
2324
- }
2325
- }
2326
-
2327
- @layer components.forms {
2328
- :where(.nc-form) {
2329
- inline-size: min(100%, var(--nc-form-max-inline-size, var(--measure-base)));
2330
- }
2331
-
2332
- :where(.nc-form-title) {
2333
- font-size: var(--font-size-largest);
2334
- font-weight: var(--font-weight-heading);
2335
- line-height: var(--line-height-small);
2336
- color: var(--color-text-base);
2337
- }
2338
-
2339
- :where(.nc-form-hint) {
2340
- font-size: var(--font-size-large);
2341
- color: var(--color-text-muted);
2342
- margin-block: .5lh;
2343
- }
2344
-
2345
- :where(fieldset:not([class]), .nc-fieldset) {
2346
- border: none;
2347
- min-inline-size: 0;
2348
- margin: 0;
2349
- padding: 0;
2350
- }
2351
-
2352
- :where(legend:not([class]), .nc-legend) {
2353
- font-family: var(--font-family-default);
2354
- letter-spacing: var(--tracking-tight);
2355
- font-weight: var(--font-weight-active);
2356
- color: var(--text, var(--color-text-base));
2357
- font-size: var(--font-size-base);
2358
- border: none;
2359
- border-radius: 0;
2360
- inline-size: 100%;
2361
- margin-block-end: .75lh;
2362
- padding: 0;
2363
- display: block;
2364
- }
2365
-
2366
- :where(:is(fieldset:not([class]), .nc-fieldset):has(:is(.nc-legend + .nc-hint, legend:not([class]) + .nc-hint)) > :is(legend:not([class]), .nc-legend)) {
2367
- margin-block-end: 0;
2368
- }
2369
-
2370
- :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 {
2371
- margin-block-end: .6lh;
2372
- }
2373
- }
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.2",
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])) {