@navikt/ds-css 4.4.2 → 4.6.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.
- package/CHANGELOG.md +16 -0
- package/alert.css +9 -0
- package/button.css +0 -2
- package/date.css +6 -0
- package/dist/component/alert.css +9 -0
- package/dist/component/alert.min.css +1 -1
- package/dist/component/button.css +0 -2
- package/dist/component/button.min.css +1 -1
- package/dist/component/date.css +6 -0
- package/dist/component/date.min.css +1 -1
- package/dist/component/form.css +95 -11
- package/dist/component/form.min.css +1 -1
- package/dist/component/index.css +108 -14
- package/dist/component/index.min.css +2 -2
- package/dist/components.css +107 -13
- package/dist/components.min.css +2 -2
- package/dist/global/tokens.css +1 -1
- package/dist/index.css +108 -14
- package/dist/index.min.css +2 -2
- package/form/form.css +6 -0
- package/form/radio-checkbox.css +54 -1
- package/form/select.css +6 -0
- package/form/switch.css +37 -0
- package/form/text-field.css +4 -5
- package/form/textarea.css +4 -5
- package/package.json +2 -2
package/dist/components.css
CHANGED
|
@@ -529,6 +529,7 @@
|
|
|
529
529
|
font-size: 1.5rem;
|
|
530
530
|
align-self: flex-start;
|
|
531
531
|
height: var(--a-font-line-height-xlarge);
|
|
532
|
+
margin: var(--a-spacing-1);
|
|
532
533
|
background: radial-gradient(circle, var(--a-surface-default) 50%, 0, transparent);
|
|
533
534
|
}
|
|
534
535
|
.navds-alert--small > .navds-alert__icon {
|
|
@@ -568,6 +569,13 @@
|
|
|
568
569
|
border: none;
|
|
569
570
|
padding: 0;
|
|
570
571
|
}
|
|
572
|
+
.navds-alert__button-wrapper {
|
|
573
|
+
align-self: flex-start;
|
|
574
|
+
flex: 1;
|
|
575
|
+
display: flex;
|
|
576
|
+
flex-flow: row nowrap;
|
|
577
|
+
justify-content: flex-end;
|
|
578
|
+
}
|
|
571
579
|
[data-theme="dark"] {
|
|
572
580
|
--ac-button-primary-text: var(--a-gray-900);
|
|
573
581
|
--ac-button-primary-bg: var(--a-blue-200);
|
|
@@ -833,7 +841,6 @@
|
|
|
833
841
|
.navds-button--tertiary:active {
|
|
834
842
|
color: var(--ac-button-tertiary-active-text, var(--a-text-on-action));
|
|
835
843
|
background-color: var(--ac-button-tertiary-active-bg, var(--a-surface-action-active));
|
|
836
|
-
box-shadow: inset 0 0 0 1px var(--a-surface-default);
|
|
837
844
|
}
|
|
838
845
|
.navds-button--tertiary:active:hover {
|
|
839
846
|
background-color: var(--ac-button-tertiary-active-hover-bg, var(--a-surface-action-active));
|
|
@@ -875,7 +882,6 @@
|
|
|
875
882
|
.navds-button--tertiary-neutral:active {
|
|
876
883
|
color: var(--ac-button-tertiary-neutral-active-text, var(--a-text-on-neutral));
|
|
877
884
|
background-color: var(--ac-button-tertiary-neutral-active-bg, var(--a-surface-neutral-active));
|
|
878
|
-
box-shadow: inset 0 0 0 1px var(--a-surface-default);
|
|
879
885
|
}
|
|
880
886
|
.navds-button--tertiary-neutral:active:hover {
|
|
881
887
|
background-color: var(--ac-button-tertiary-neutral-active-hover-bg, var(--a-surface-neutral-active));
|
|
@@ -1668,6 +1674,11 @@
|
|
|
1668
1674
|
.navds-form-field__subdescription {
|
|
1669
1675
|
color: var(--ac-form-subdescription, var(--a-text-subtle));
|
|
1670
1676
|
}
|
|
1677
|
+
.navds-form-field__readonly-icon {
|
|
1678
|
+
margin-right: var(--a-spacing-2);
|
|
1679
|
+
vertical-align: middle;
|
|
1680
|
+
margin-bottom: 3px;
|
|
1681
|
+
}
|
|
1671
1682
|
.navds-error-summary {
|
|
1672
1683
|
background-color: var(--ac-error-summary-bg, var(--a-surface-default));
|
|
1673
1684
|
padding: var(--a-spacing-5);
|
|
@@ -1746,6 +1757,9 @@
|
|
|
1746
1757
|
cursor: pointer;
|
|
1747
1758
|
display: flex;
|
|
1748
1759
|
gap: var(--a-spacing-2);
|
|
1760
|
+
|
|
1761
|
+
--__ac-radio-checkbox-readonly-bg: var(--a-surface-subtle);
|
|
1762
|
+
--__ac-radio-checkbox-readonly-border: var(--a-border-subtle);
|
|
1749
1763
|
}
|
|
1750
1764
|
.navds-checkbox__label::before,
|
|
1751
1765
|
.navds-radio__label::before {
|
|
@@ -1814,7 +1828,7 @@
|
|
|
1814
1828
|
background-color: var(--ac-radio-checkbox-bg, var(--a-surface-default));
|
|
1815
1829
|
width: 0.75rem;
|
|
1816
1830
|
height: 0.25rem;
|
|
1817
|
-
border-radius: 1px;
|
|
1831
|
+
border-radius: 1px;
|
|
1818
1832
|
flex-shrink: 0;
|
|
1819
1833
|
}
|
|
1820
1834
|
.navds-checkbox--small .navds-checkbox__input:indeterminate + .navds-checkbox__label::after {
|
|
@@ -1936,6 +1950,48 @@
|
|
|
1936
1950
|
.navds-radio--disabled > .navds-radio__label {
|
|
1937
1951
|
cursor: not-allowed;
|
|
1938
1952
|
}
|
|
1953
|
+
/* Readonly */
|
|
1954
|
+
.navds-checkbox--readonly > :where(.navds-checkbox__input, .navds-checkbox__label),
|
|
1955
|
+
.navds-radio--readonly > :where(.navds-radio__input, .navds-radio__label) {
|
|
1956
|
+
cursor: default;
|
|
1957
|
+
}
|
|
1958
|
+
.navds-checkbox--readonly > .navds-checkbox__input:hover + .navds-checkbox__label,
|
|
1959
|
+
.navds-radio--readonly > .navds-radio__input:hover + .navds-radio__label {
|
|
1960
|
+
color: var(--a-text-default);
|
|
1961
|
+
}
|
|
1962
|
+
.navds-checkbox--readonly
|
|
1963
|
+
> .navds-checkbox__input:not(:disabled):not(:checked):not(:indeterminate)
|
|
1964
|
+
+ .navds-checkbox__label::before,
|
|
1965
|
+
.navds-checkbox--readonly
|
|
1966
|
+
> .navds-checkbox__input:hover:not(:checked):not(:indeterminate):not(:focus-visible)
|
|
1967
|
+
+ .navds-checkbox__label::before,
|
|
1968
|
+
.navds-radio--readonly > .navds-radio__input:not(:disabled):not(:checked):not(:indeterminate) + .navds-radio__label::before,
|
|
1969
|
+
.navds-radio--readonly
|
|
1970
|
+
> .navds-radio__input:hover:not(:checked):not(:indeterminate):not(:focus-visible)
|
|
1971
|
+
+ .navds-radio__label::before {
|
|
1972
|
+
background-color: var(--__ac-radio-checkbox-readonly-bg);
|
|
1973
|
+
box-shadow: inset 0 0 0 2px var(--__ac-radio-checkbox-readonly-border);
|
|
1974
|
+
}
|
|
1975
|
+
.navds-checkbox--readonly > .navds-checkbox__input:focus-visible + .navds-checkbox__label::before,
|
|
1976
|
+
.navds-radio--readonly > .navds-radio__input:focus-visible + .navds-radio__label::before {
|
|
1977
|
+
--__ac-radio-checkbox-readonly-border: var(--a-border-subtle), var(--a-shadow-focus);
|
|
1978
|
+
}
|
|
1979
|
+
.navds-checkbox--readonly > .navds-checkbox__input:checked + .navds-checkbox__label::before {
|
|
1980
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMyAxMCI+ICAgIDxnPiAgICA8cGF0aCBmaWxsPSJyZ2JhKDAsIDAsIDAsIDAuNjUpIiBkPSJNNCwxMGMtMC40LDAtMC44LTAuMS0xLjEtMC40TDAuNCw3LjFDMC4xLDYuOCwwLDYuNCwwLDZzMC4yLTAuOCwwLjUtMS4xQzEsNC40LDIsNC40LDIuNSw0LjlMNCw2LjRsNi40LTYgICAgQzEwLjgsMC4xLDExLjEsMCwxMS41LDBjMC40LDAsMC44LDAuMiwxLDAuNWMwLjYsMC42LDAuNSwxLjYtMC4xLDIuMXYwTDUsOS42QzQuNyw5LjksNC40LDEwLDQsMTB6IE0xMS44LDEuOUwxMS44LDEuOSAgICBDMTEuOCwxLjksMTEuOCwxLjksMTEuOCwxLjl6IE0xMS4yLDEuMUMxMS4yLDEuMSwxMS4yLDEuMSwxMS4yLDEuMUwxMS4yLDEuMXoiLz4gICAgPC9nPjwvc3ZnPg==);
|
|
1981
|
+
box-shadow: inset 0 0 0 2px var(--__ac-radio-checkbox-readonly-border);
|
|
1982
|
+
background-color: var(--__ac-radio-checkbox-readonly-bg);
|
|
1983
|
+
}
|
|
1984
|
+
.navds-radio--readonly > .navds-radio__input:checked + .navds-radio__label::before {
|
|
1985
|
+
box-shadow: inset 0 0 0 2px var(--__ac-radio-checkbox-readonly-border), inset 0 0 0 4px var(--__ac-radio-checkbox-readonly-bg);
|
|
1986
|
+
background-color: var(--a-icon-subtle);
|
|
1987
|
+
}
|
|
1988
|
+
.navds-checkbox--readonly > .navds-checkbox__input:indeterminate + .navds-checkbox__label::before {
|
|
1989
|
+
box-shadow: inset 0 0 0 2px var(--__ac-radio-checkbox-readonly-border);
|
|
1990
|
+
background-color: var(--__ac-radio-checkbox-readonly-bg);
|
|
1991
|
+
}
|
|
1992
|
+
.navds-checkbox--readonly > .navds-checkbox__input:indeterminate + .navds-checkbox__label::after {
|
|
1993
|
+
background-color: var(--a-icon-subtle);
|
|
1994
|
+
}
|
|
1939
1995
|
.navds-select__input {
|
|
1940
1996
|
appearance: none;
|
|
1941
1997
|
background-color: var(--ac-select-bg, var(--a-surface-default));
|
|
@@ -2007,6 +2063,11 @@
|
|
|
2007
2063
|
.navds-select__input:disabled > option {
|
|
2008
2064
|
color: var(--a-text-default);
|
|
2009
2065
|
}
|
|
2066
|
+
.navds-select--readonly .navds-select__input {
|
|
2067
|
+
background-color: var(--a-surface-subtle);
|
|
2068
|
+
border-color: var(--a-border-subtle);
|
|
2069
|
+
cursor: default;
|
|
2070
|
+
}
|
|
2010
2071
|
.navds-switch {
|
|
2011
2072
|
position: relative;
|
|
2012
2073
|
min-height: 48px;
|
|
@@ -2156,6 +2217,37 @@
|
|
|
2156
2217
|
.navds-switch__input:disabled ~ .navds-switch__label-wrapper {
|
|
2157
2218
|
cursor: not-allowed;
|
|
2158
2219
|
}
|
|
2220
|
+
/* Readonly */
|
|
2221
|
+
.navds-switch--readonly > .navds-switch__track,
|
|
2222
|
+
.navds-switch--readonly > .navds-switch__input:hover ~ .navds-switch__track,
|
|
2223
|
+
.navds-switch--readonly > .navds-switch__input:checked ~ .navds-switch__track,
|
|
2224
|
+
.navds-switch--readonly > .navds-switch__input:checked:hover ~ .navds-switch__track {
|
|
2225
|
+
background-color: var(--a-surface-neutral-moderate);
|
|
2226
|
+
}
|
|
2227
|
+
.navds-switch--readonly > .navds-switch__label-wrapper,
|
|
2228
|
+
.navds-switch--readonly > .navds-switch__input {
|
|
2229
|
+
cursor: default;
|
|
2230
|
+
}
|
|
2231
|
+
.navds-switch--readonly > .navds-switch__input:hover ~ .navds-switch__label-wrapper,
|
|
2232
|
+
.navds-switch--readonly .navds-switch__label-wrapper:hover {
|
|
2233
|
+
color: var(--a-text-default);
|
|
2234
|
+
}
|
|
2235
|
+
.navds-switch--readonly .navds-switch__thumb {
|
|
2236
|
+
background-color: var(--a-surface-subtle);
|
|
2237
|
+
box-shadow: 0 0 0 2px var(--a-border-default);
|
|
2238
|
+
}
|
|
2239
|
+
.navds-switch--readonly > .navds-switch__input:checked ~ .navds-switch__track > .navds-switch__thumb {
|
|
2240
|
+
color: var(--a-icon-subtle);
|
|
2241
|
+
}
|
|
2242
|
+
@media (hover: hover) and (pointer: fine) {
|
|
2243
|
+
.navds-switch--readonly > .navds-switch__input:hover ~ .navds-switch__track > .navds-switch__thumb {
|
|
2244
|
+
transform: translateX(0);
|
|
2245
|
+
}
|
|
2246
|
+
|
|
2247
|
+
.navds-switch--readonly > .navds-switch__input:checked:hover ~ .navds-switch__track > .navds-switch__thumb {
|
|
2248
|
+
transform: translateX(20px);
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2159
2251
|
.navds-text-field__input {
|
|
2160
2252
|
appearance: none;
|
|
2161
2253
|
padding: var(--a-spacing-2);
|
|
@@ -2211,11 +2303,10 @@
|
|
|
2211
2303
|
box-shadow: none;
|
|
2212
2304
|
cursor: not-allowed;
|
|
2213
2305
|
}
|
|
2214
|
-
.navds-text-
|
|
2215
|
-
background-color: var(--
|
|
2216
|
-
border-color: var(--
|
|
2217
|
-
|
|
2218
|
-
cursor: not-allowed;
|
|
2306
|
+
.navds-text-field--readonly .navds-text-field__input {
|
|
2307
|
+
background-color: var(--a-surface-subtle);
|
|
2308
|
+
border-color: var(--a-border-subtle);
|
|
2309
|
+
cursor: default;
|
|
2219
2310
|
}
|
|
2220
2311
|
/**
|
|
2221
2312
|
* Removes default search icon
|
|
@@ -2301,11 +2392,10 @@
|
|
|
2301
2392
|
box-shadow: none;
|
|
2302
2393
|
cursor: not-allowed;
|
|
2303
2394
|
}
|
|
2304
|
-
.navds-
|
|
2305
|
-
background-color: var(--
|
|
2306
|
-
border-color: var(--
|
|
2307
|
-
|
|
2308
|
-
cursor: not-allowed;
|
|
2395
|
+
.navds-textarea--readonly .navds-textarea__input {
|
|
2396
|
+
background-color: var(--a-surface-subtle);
|
|
2397
|
+
border-color: var(--a-border-subtle);
|
|
2398
|
+
cursor: default;
|
|
2309
2399
|
}
|
|
2310
2400
|
.navds-search {
|
|
2311
2401
|
display: flex;
|
|
@@ -3133,6 +3223,10 @@ button.navds-internalheader__title:active,
|
|
|
3133
3223
|
.navds-date__popover:where(.navds-popover) {
|
|
3134
3224
|
border: none;
|
|
3135
3225
|
}
|
|
3226
|
+
/* Readonly */
|
|
3227
|
+
.navds-date__field--readonly .navds-date__field-button {
|
|
3228
|
+
cursor: default;
|
|
3229
|
+
}
|
|
3136
3230
|
.navds-tag {
|
|
3137
3231
|
border: 1px solid;
|
|
3138
3232
|
border-radius: var(--a-border-radius-small);
|