@navikt/aksel-stylelint 5.3.0 → 5.3.1

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.
@@ -32,4 +32,15 @@ exports.deprecations = [
32
32
  classes: ["navds-modal__content"],
33
33
  message: "Renamed to `.navds-modal__body` in v5.0.0",
34
34
  },
35
+ {
36
+ classes: ["navds-guide__illustration"],
37
+ message: "Use `.navds-guide` instead",
38
+ },
39
+ {
40
+ classes: [
41
+ "navds-guide__illustration--small",
42
+ "navds-guide__illustration--medium",
43
+ ],
44
+ message: "There is no 1:1 replacement for this, the size will depend on the 'poster' prop and the viewport width",
45
+ },
35
46
  ];
package/dist/index.css CHANGED
@@ -1,7 +1,7 @@
1
1
  @charset "UTF-8";
2
2
  /**
3
3
  * Do not edit directly
4
- * Generated on Thu, 31 Aug 2023 11:42:10 GMT
4
+ * Generated on Sun, 03 Sep 2023 10:42:10 GMT
5
5
  */
6
6
  :root, :host {
7
7
  --a-spacing-05: 0.125rem;
@@ -1199,6 +1199,9 @@ body,
1199
1199
  grid-column: span 12;
1200
1200
  }
1201
1201
  }
1202
+ .navds-accordion {
1203
+ --__ac-accordion-header-shadow-color: var(--ac-accordion-header-border, var(--a-border-divider));
1204
+ }
1202
1205
  .navds-accordion__item:focus-within {
1203
1206
  position: relative;
1204
1207
  }
@@ -1206,7 +1209,6 @@ body,
1206
1209
  * Header *
1207
1210
  *************************/
1208
1211
  .navds-accordion__header {
1209
- --__ac-accordion-header-shadow-color: var(--ac-accordion-header-border, var(--a-border-divider));
1210
1212
  --__ac-accordion-header-shadow: inset 2px 0 0 0 var(--a-transparent), inset -2px 0 0 0 var(--a-transparent),
1211
1213
  inset 0 2px 0 0 var(--__ac-accordion-header-shadow-color);
1212
1214
 
@@ -2367,67 +2369,90 @@ body,
2367
2369
  transform: translateY(0);
2368
2370
  }
2369
2371
  }
2370
- /**
2371
- * GuidePanel component
2372
- */
2373
2372
  .navds-guide-panel {
2373
+ --__ac-guide-panel-guide-size: 4rem;
2374
+
2374
2375
  position: relative;
2375
- padding-left: var(--a-spacing-10);
2376
+ padding-top: calc(var(--__ac-guide-panel-guide-size) / 2);
2377
+ }
2378
+ .navds-guide {
2379
+ background: var(--ac-guide-panel-illustration-bg, var(--a-surface-alt-3-subtle));
2380
+ border: 2px solid var(--ac-guide-panel-border, var(--a-border-alt-3));
2381
+ border-radius: var(--a-border-radius-full);
2382
+ overflow: hidden;
2383
+ position: absolute;
2384
+ width: var(--__ac-guide-panel-guide-size);
2385
+ height: var(--__ac-guide-panel-guide-size);
2386
+ left: 50%;
2387
+ transform: translate(-50%, -50%);
2388
+ }
2389
+ .navds-guide svg,
2390
+ .navds-guide img {
2391
+ height: 100%;
2392
+ width: 100%;
2376
2393
  }
2377
2394
  .navds-guide-panel__content {
2378
2395
  background-color: var(--ac-guide-panel-bg, var(--a-surface-default));
2379
- border-radius: var(--a-border-radius-medium);
2380
- border: 2px solid var(--ac-guide-panel-border, var(--a-border-action));
2381
- min-height: 7.25rem;
2382
- padding: var(--a-spacing-6);
2383
- padding-left: var(--a-spacing-14);
2384
- }
2385
- .navds-guide-panel--poster {
2386
- padding-left: 0;
2396
+ border: 2px solid var(--ac-guide-panel-border, var(--a-border-alt-3));
2397
+ border-radius: var(--a-border-radius-large);
2398
+ padding: var(--a-spacing-4);
2387
2399
  padding-top: var(--a-spacing-12);
2388
2400
  }
2389
- .navds-guide-panel--poster .navds-guide-panel__content {
2390
- padding: var(--a-spacing-8);
2391
- padding-top: var(--a-spacing-16);
2392
- }
2393
- .navds-guide-panel .navds-guide {
2394
- position: absolute;
2395
- top: var(--a-spacing-4);
2396
- transform: translateX(-50%);
2397
- border: 2px solid var(--ac-guide-panel-border, var(--a-border-action));
2398
- }
2399
- .navds-guide-panel--poster .navds-guide {
2400
- left: 50%;
2401
- top: 0;
2401
+ @media (min-width: 480px) {
2402
+ .navds-guide-panel {
2403
+ --__ac-guide-panel-guide-size: 6.25rem;
2404
+ }
2405
+
2406
+ .navds-guide-panel__content {
2407
+ padding: var(--a-spacing-8);
2408
+ padding-top: 4.25rem;
2409
+ }
2402
2410
  }
2403
- /**
2404
- * Guide component
2405
- */
2406
- .navds-guide {
2407
- display: flex;
2408
- align-items: center;
2409
- justify-content: center;
2410
- border-radius: var(--a-border-radius-full);
2411
+ /* not-poster */
2412
+ .navds-guide-panel--not-poster {
2413
+ padding-top: 0;
2414
+ padding-left: calc(var(--__ac-guide-panel-guide-size) / 2);
2411
2415
  }
2412
- /* Guide illustration frame */
2413
- .navds-guide__illustration {
2414
- background: var(--ac-guide-panel-illustration-bg, var(--a-surface-action-subtle));
2415
- border-radius: var(--a-border-radius-full);
2416
- overflow: hidden;
2416
+ .navds-guide-panel--not-poster .navds-guide {
2417
+ left: 0;
2418
+ top: var(--a-spacing-5);
2419
+ transform: none;
2417
2420
  }
2418
- .navds-guide__illustration svg,
2419
- .navds-guide__illustration img {
2420
- height: 100%;
2421
- width: 100%;
2421
+ .navds-guide-panel--not-poster .navds-guide-panel__content {
2422
+ padding: var(--a-spacing-4);
2423
+ padding-left: var(--a-spacing-10);
2424
+ min-height: calc(var(--__ac-guide-panel-guide-size) + var(--a-spacing-5) + var(--a-spacing-5));
2422
2425
  }
2423
- /* Illustration sizes */
2424
- .navds-guide__illustration--small {
2425
- height: 5rem;
2426
- width: 5rem;
2426
+ @media (min-width: 480px) {
2427
+ .navds-guide-panel--not-poster {
2428
+ --__ac-guide-panel-guide-size: 5rem;
2429
+ }
2430
+
2431
+ .navds-guide-panel--not-poster .navds-guide-panel__content {
2432
+ padding: var(--a-spacing-6);
2433
+ padding-left: var(--a-spacing-14);
2434
+ }
2427
2435
  }
2428
- .navds-guide__illustration--medium {
2429
- height: 6rem;
2430
- width: 6rem;
2436
+ /* responsive-poster (on desktop) */
2437
+ @media (min-width: 480px) {
2438
+ .navds-guide-panel--responsive-poster {
2439
+ --__ac-guide-panel-guide-size: 5rem;
2440
+
2441
+ padding-top: 0;
2442
+ padding-left: calc(var(--__ac-guide-panel-guide-size) / 2);
2443
+ }
2444
+
2445
+ .navds-guide-panel--responsive-poster .navds-guide {
2446
+ left: 0;
2447
+ top: var(--a-spacing-5);
2448
+ transform: none;
2449
+ }
2450
+
2451
+ .navds-guide-panel--responsive-poster .navds-guide-panel__content {
2452
+ padding: var(--a-spacing-6);
2453
+ padding-left: var(--a-spacing-14);
2454
+ min-height: calc(var(--__ac-guide-panel-guide-size) + var(--a-spacing-5) + var(--a-spacing-5));
2455
+ }
2431
2456
  }
2432
2457
  /*
2433
2458
  Order matters; rearrange with care
package/dist/tokens.json CHANGED
@@ -156,8 +156,8 @@
156
156
  },
157
157
  "guidepanel": {
158
158
  "--ac-guide-panel-bg": "--a-surface-default",
159
- "--ac-guide-panel-border": "--a-border-action",
160
- "--ac-guide-panel-illustration-bg": "--a-surface-action-subtle"
159
+ "--ac-guide-panel-border": "--a-border-alt-3",
160
+ "--ac-guide-panel-illustration-bg": "--a-surface-alt-3-subtle"
161
161
  },
162
162
  "helptext": {
163
163
  "--ac-help-text-button-color": "--a-surface-action",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navikt/aksel-stylelint",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "author": "Aksel | NAV",
5
5
  "homepage": "https://aksel.nav.no/grunnleggende/kode/stylelint",
6
6
  "repository": {
@@ -35,8 +35,8 @@
35
35
  "dev": "yarn watch:lint"
36
36
  },
37
37
  "devDependencies": {
38
- "@navikt/ds-css": "^5.3.0",
39
- "@navikt/ds-tokens": "^5.3.0",
38
+ "@navikt/ds-css": "^5.3.1",
39
+ "@navikt/ds-tokens": "^5.3.1",
40
40
  "@types/jest": "^29.0.0",
41
41
  "concurrently": "7.2.1",
42
42
  "copyfiles": "2.4.1",