@navikt/aksel-stylelint 4.5.0 → 4.6.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.
- package/dist/index.css +113 -12
- package/package.json +3 -3
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
|
|
4
|
+
* Generated on Mon, 03 Jul 2023 12:42:49 GMT
|
|
5
5
|
*/
|
|
6
6
|
:root, :host {
|
|
7
7
|
--a-spacing-05: 0.125rem;
|
|
@@ -2384,6 +2384,9 @@ body,
|
|
|
2384
2384
|
.navds-fieldset__legend {
|
|
2385
2385
|
padding: 0;
|
|
2386
2386
|
}
|
|
2387
|
+
.navds-fieldset--readonly > :where(.navds-fieldset__legend) {
|
|
2388
|
+
display: inline-flex;
|
|
2389
|
+
}
|
|
2387
2390
|
.navds-fieldset:disabled > .navds-fieldset__legend,
|
|
2388
2391
|
.navds-fieldset:disabled > .navds-fieldset__description {
|
|
2389
2392
|
opacity: 0.3;
|
|
@@ -2416,6 +2419,15 @@ body,
|
|
|
2416
2419
|
.navds-form-field__subdescription {
|
|
2417
2420
|
color: var(--ac-form-subdescription, var(--a-text-subtle));
|
|
2418
2421
|
}
|
|
2422
|
+
.navds-form-field--readonly > :where(.navds-form-field__label) {
|
|
2423
|
+
display: inline-flex;
|
|
2424
|
+
}
|
|
2425
|
+
.navds-form-field__readonly-icon {
|
|
2426
|
+
margin-top: var(--a-spacing-05);
|
|
2427
|
+
margin-right: var(--a-spacing-2);
|
|
2428
|
+
flex-shrink: 0;
|
|
2429
|
+
align-self: flex-start;
|
|
2430
|
+
}
|
|
2419
2431
|
.navds-error-summary {
|
|
2420
2432
|
background-color: var(--ac-error-summary-bg, var(--a-surface-default));
|
|
2421
2433
|
padding: var(--a-spacing-5);
|
|
@@ -2494,6 +2506,9 @@ body,
|
|
|
2494
2506
|
cursor: pointer;
|
|
2495
2507
|
display: flex;
|
|
2496
2508
|
gap: var(--a-spacing-2);
|
|
2509
|
+
|
|
2510
|
+
--__ac-radio-checkbox-readonly-bg: var(--a-surface-subtle);
|
|
2511
|
+
--__ac-radio-checkbox-readonly-border: var(--a-border-subtle);
|
|
2497
2512
|
}
|
|
2498
2513
|
.navds-checkbox__label::before,
|
|
2499
2514
|
.navds-radio__label::before {
|
|
@@ -2562,7 +2577,7 @@ body,
|
|
|
2562
2577
|
background-color: var(--ac-radio-checkbox-bg, var(--a-surface-default));
|
|
2563
2578
|
width: 0.75rem;
|
|
2564
2579
|
height: 0.25rem;
|
|
2565
|
-
border-radius: 1px;
|
|
2580
|
+
border-radius: 1px;
|
|
2566
2581
|
flex-shrink: 0;
|
|
2567
2582
|
}
|
|
2568
2583
|
.navds-checkbox--small .navds-checkbox__input:indeterminate + .navds-checkbox__label::after {
|
|
@@ -2684,6 +2699,51 @@ body,
|
|
|
2684
2699
|
.navds-radio--disabled > .navds-radio__label {
|
|
2685
2700
|
cursor: not-allowed;
|
|
2686
2701
|
}
|
|
2702
|
+
/* Readonly */
|
|
2703
|
+
.navds-checkbox--readonly > :where(.navds-checkbox__input, .navds-checkbox__label),
|
|
2704
|
+
.navds-radio--readonly > :where(.navds-radio__input, .navds-radio__label) {
|
|
2705
|
+
cursor: default;
|
|
2706
|
+
}
|
|
2707
|
+
.navds-checkbox--readonly .navds-checkbox__label-text {
|
|
2708
|
+
display: inline-flex;
|
|
2709
|
+
}
|
|
2710
|
+
.navds-checkbox--readonly > .navds-checkbox__input:hover + .navds-checkbox__label,
|
|
2711
|
+
.navds-radio--readonly > .navds-radio__input:hover + .navds-radio__label {
|
|
2712
|
+
color: var(--a-text-default);
|
|
2713
|
+
}
|
|
2714
|
+
.navds-checkbox--readonly
|
|
2715
|
+
> .navds-checkbox__input:not(:disabled):not(:checked):not(:indeterminate)
|
|
2716
|
+
+ .navds-checkbox__label::before,
|
|
2717
|
+
.navds-checkbox--readonly
|
|
2718
|
+
> .navds-checkbox__input:hover:not(:checked):not(:indeterminate):not(:focus-visible)
|
|
2719
|
+
+ .navds-checkbox__label::before,
|
|
2720
|
+
.navds-radio--readonly > .navds-radio__input:not(:disabled):not(:checked):not(:indeterminate) + .navds-radio__label::before,
|
|
2721
|
+
.navds-radio--readonly
|
|
2722
|
+
> .navds-radio__input:hover:not(:checked):not(:indeterminate):not(:focus-visible)
|
|
2723
|
+
+ .navds-radio__label::before {
|
|
2724
|
+
background-color: var(--__ac-radio-checkbox-readonly-bg);
|
|
2725
|
+
box-shadow: inset 0 0 0 2px var(--__ac-radio-checkbox-readonly-border);
|
|
2726
|
+
}
|
|
2727
|
+
.navds-checkbox--readonly > .navds-checkbox__input:focus-visible + .navds-checkbox__label::before,
|
|
2728
|
+
.navds-radio--readonly > .navds-radio__input:focus-visible + .navds-radio__label::before {
|
|
2729
|
+
--__ac-radio-checkbox-readonly-border: var(--a-border-subtle), var(--a-shadow-focus);
|
|
2730
|
+
}
|
|
2731
|
+
.navds-checkbox--readonly > .navds-checkbox__input:checked + .navds-checkbox__label::before {
|
|
2732
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMyAxMCI+ICAgIDxnPiAgICA8cGF0aCBmaWxsPSJyZ2JhKDAsIDAsIDAsIDAuNjUpIiBkPSJNNCwxMGMtMC40LDAtMC44LTAuMS0xLjEtMC40TDAuNCw3LjFDMC4xLDYuOCwwLDYuNCwwLDZzMC4yLTAuOCwwLjUtMS4xQzEsNC40LDIsNC40LDIuNSw0LjlMNCw2LjRsNi40LTYgICAgQzEwLjgsMC4xLDExLjEsMCwxMS41LDBjMC40LDAsMC44LDAuMiwxLDAuNWMwLjYsMC42LDAuNSwxLjYtMC4xLDIuMXYwTDUsOS42QzQuNyw5LjksNC40LDEwLDQsMTB6IE0xMS44LDEuOUwxMS44LDEuOSAgICBDMTEuOCwxLjksMTEuOCwxLjksMTEuOCwxLjl6IE0xMS4yLDEuMUMxMS4yLDEuMSwxMS4yLDEuMSwxMS4yLDEuMUwxMS4yLDEuMXoiLz4gICAgPC9nPjwvc3ZnPg==);
|
|
2733
|
+
box-shadow: inset 0 0 0 2px var(--__ac-radio-checkbox-readonly-border);
|
|
2734
|
+
background-color: var(--__ac-radio-checkbox-readonly-bg);
|
|
2735
|
+
}
|
|
2736
|
+
.navds-radio--readonly > .navds-radio__input:checked + .navds-radio__label::before {
|
|
2737
|
+
box-shadow: inset 0 0 0 2px var(--__ac-radio-checkbox-readonly-border), inset 0 0 0 4px var(--__ac-radio-checkbox-readonly-bg);
|
|
2738
|
+
background-color: var(--a-icon-subtle);
|
|
2739
|
+
}
|
|
2740
|
+
.navds-checkbox--readonly > .navds-checkbox__input:indeterminate + .navds-checkbox__label::before {
|
|
2741
|
+
box-shadow: inset 0 0 0 2px var(--__ac-radio-checkbox-readonly-border);
|
|
2742
|
+
background-color: var(--__ac-radio-checkbox-readonly-bg);
|
|
2743
|
+
}
|
|
2744
|
+
.navds-checkbox--readonly > .navds-checkbox__input:indeterminate + .navds-checkbox__label::after {
|
|
2745
|
+
background-color: var(--a-icon-subtle);
|
|
2746
|
+
}
|
|
2687
2747
|
.navds-select__input {
|
|
2688
2748
|
appearance: none;
|
|
2689
2749
|
background-color: var(--ac-select-bg, var(--a-surface-default));
|
|
@@ -2755,6 +2815,11 @@ body,
|
|
|
2755
2815
|
.navds-select__input:disabled > option {
|
|
2756
2816
|
color: var(--a-text-default);
|
|
2757
2817
|
}
|
|
2818
|
+
.navds-select--readonly .navds-select__input {
|
|
2819
|
+
background-color: var(--a-surface-subtle);
|
|
2820
|
+
border-color: var(--a-border-subtle);
|
|
2821
|
+
cursor: default;
|
|
2822
|
+
}
|
|
2758
2823
|
.navds-switch {
|
|
2759
2824
|
position: relative;
|
|
2760
2825
|
min-height: 48px;
|
|
@@ -2904,6 +2969,40 @@ body,
|
|
|
2904
2969
|
.navds-switch__input:disabled ~ .navds-switch__label-wrapper {
|
|
2905
2970
|
cursor: not-allowed;
|
|
2906
2971
|
}
|
|
2972
|
+
/* Readonly */
|
|
2973
|
+
.navds-switch--readonly > .navds-switch__track,
|
|
2974
|
+
.navds-switch--readonly > .navds-switch__input:hover ~ .navds-switch__track,
|
|
2975
|
+
.navds-switch--readonly > .navds-switch__input:checked ~ .navds-switch__track,
|
|
2976
|
+
.navds-switch--readonly > .navds-switch__input:checked:hover ~ .navds-switch__track {
|
|
2977
|
+
background-color: var(--a-surface-neutral-moderate);
|
|
2978
|
+
}
|
|
2979
|
+
.navds-switch--readonly > .navds-switch__label-wrapper,
|
|
2980
|
+
.navds-switch--readonly > .navds-switch__input {
|
|
2981
|
+
cursor: default;
|
|
2982
|
+
}
|
|
2983
|
+
.navds-switch--readonly > .navds-switch__input:hover ~ .navds-switch__label-wrapper,
|
|
2984
|
+
.navds-switch--readonly .navds-switch__label-wrapper:hover {
|
|
2985
|
+
color: var(--a-text-default);
|
|
2986
|
+
}
|
|
2987
|
+
.navds-switch--readonly .navds-switch__label {
|
|
2988
|
+
display: inline-flex;
|
|
2989
|
+
}
|
|
2990
|
+
.navds-switch--readonly .navds-switch__thumb {
|
|
2991
|
+
background-color: var(--a-surface-subtle);
|
|
2992
|
+
box-shadow: 0 0 0 2px var(--a-border-default);
|
|
2993
|
+
}
|
|
2994
|
+
.navds-switch--readonly > .navds-switch__input:checked ~ .navds-switch__track > .navds-switch__thumb {
|
|
2995
|
+
color: var(--a-icon-subtle);
|
|
2996
|
+
}
|
|
2997
|
+
@media (hover: hover) and (pointer: fine) {
|
|
2998
|
+
.navds-switch--readonly > .navds-switch__input:hover ~ .navds-switch__track > .navds-switch__thumb {
|
|
2999
|
+
transform: translateX(0);
|
|
3000
|
+
}
|
|
3001
|
+
|
|
3002
|
+
.navds-switch--readonly > .navds-switch__input:checked:hover ~ .navds-switch__track > .navds-switch__thumb {
|
|
3003
|
+
transform: translateX(20px);
|
|
3004
|
+
}
|
|
3005
|
+
}
|
|
2907
3006
|
.navds-text-field__input {
|
|
2908
3007
|
appearance: none;
|
|
2909
3008
|
padding: var(--a-spacing-2);
|
|
@@ -2959,11 +3058,10 @@ body,
|
|
|
2959
3058
|
box-shadow: none;
|
|
2960
3059
|
cursor: not-allowed;
|
|
2961
3060
|
}
|
|
2962
|
-
.navds-text-
|
|
2963
|
-
background-color: var(--
|
|
2964
|
-
border-color: var(--
|
|
2965
|
-
|
|
2966
|
-
cursor: not-allowed;
|
|
3061
|
+
.navds-text-field--readonly .navds-text-field__input {
|
|
3062
|
+
background-color: var(--a-surface-subtle);
|
|
3063
|
+
border-color: var(--a-border-subtle);
|
|
3064
|
+
cursor: default;
|
|
2967
3065
|
}
|
|
2968
3066
|
/**
|
|
2969
3067
|
* Removes default search icon
|
|
@@ -3049,11 +3147,10 @@ body,
|
|
|
3049
3147
|
box-shadow: none;
|
|
3050
3148
|
cursor: not-allowed;
|
|
3051
3149
|
}
|
|
3052
|
-
.navds-
|
|
3053
|
-
background-color: var(--
|
|
3054
|
-
border-color: var(--
|
|
3055
|
-
|
|
3056
|
-
cursor: not-allowed;
|
|
3150
|
+
.navds-textarea--readonly .navds-textarea__input {
|
|
3151
|
+
background-color: var(--a-surface-subtle);
|
|
3152
|
+
border-color: var(--a-border-subtle);
|
|
3153
|
+
cursor: default;
|
|
3057
3154
|
}
|
|
3058
3155
|
.navds-search {
|
|
3059
3156
|
display: flex;
|
|
@@ -3881,6 +3978,10 @@ button.navds-internalheader__title:active,
|
|
|
3881
3978
|
.navds-date__popover:where(.navds-popover) {
|
|
3882
3979
|
border: none;
|
|
3883
3980
|
}
|
|
3981
|
+
/* Readonly */
|
|
3982
|
+
.navds-date__field--readonly .navds-date__field-button {
|
|
3983
|
+
cursor: default;
|
|
3984
|
+
}
|
|
3884
3985
|
.navds-tag {
|
|
3885
3986
|
border: 1px solid;
|
|
3886
3987
|
border-radius: var(--a-border-radius-small);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navikt/aksel-stylelint",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.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": "^4.
|
|
39
|
-
"@navikt/ds-tokens": "^4.
|
|
38
|
+
"@navikt/ds-css": "^4.6.1",
|
|
39
|
+
"@navikt/ds-tokens": "^4.6.1",
|
|
40
40
|
"@types/jest": "^29.0.0",
|
|
41
41
|
"concurrently": "7.2.1",
|
|
42
42
|
"copyfiles": "2.4.1",
|