@norges-domstoler/dds-components 21.2.2 → 21.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.
- package/dist/index.css +114 -76
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +96 -55
- package/dist/index.d.ts +96 -55
- package/dist/index.js +2031 -1858
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1217 -1044
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
package/dist/index.css
CHANGED
|
@@ -1933,7 +1933,10 @@
|
|
|
1933
1933
|
border: 1px solid;
|
|
1934
1934
|
border-radius: var(--dds-border-radius-surface);
|
|
1935
1935
|
@media (prefers-reduced-motion: no-preference) {
|
|
1936
|
-
transition:
|
|
1936
|
+
transition:
|
|
1937
|
+
box-shadow 0.2s,
|
|
1938
|
+
border-color 0.2s,
|
|
1939
|
+
var(--dds-focus-transition);
|
|
1937
1940
|
}
|
|
1938
1941
|
}
|
|
1939
1942
|
.Card_container--filled {
|
|
@@ -1944,14 +1947,46 @@
|
|
|
1944
1947
|
background-color: var(--dds-color-surface-default);
|
|
1945
1948
|
border-color: var(--dds-color-border-subtle);
|
|
1946
1949
|
}
|
|
1947
|
-
.Card_container--navigation
|
|
1948
|
-
|
|
1950
|
+
.Card_container--navigation:hover,
|
|
1951
|
+
.Card_container--selection-control:has(input:enabled:not([aria-readonly])):hover {
|
|
1952
|
+
border-color: var(--dds-color-border-action-hover);
|
|
1953
|
+
box-shadow: inset 0 0 0 1px var(--dds-color-border-action-hover);
|
|
1954
|
+
}
|
|
1955
|
+
.Card_container--selection-control {
|
|
1956
|
+
padding: var(--dds-selection-control-card-padding);
|
|
1949
1957
|
display: block;
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1958
|
+
width: 100%;
|
|
1959
|
+
height: 100%;
|
|
1960
|
+
& > span {
|
|
1961
|
+
left: var(--dds-selection-control-card-control-left);
|
|
1962
|
+
top: var(--dds-selection-control-card-control-top);
|
|
1963
|
+
}
|
|
1964
|
+
input:disabled,
|
|
1965
|
+
input[aria-readonly] {
|
|
1966
|
+
& ~ span {
|
|
1967
|
+
background-color: var(--dds-color-surface-field-disabled);
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
&:has(input:checked) {
|
|
1971
|
+
border-color: var(--dds-color-surface-action-selected);
|
|
1972
|
+
box-shadow: inset 0 0 0 1px var(--dds-color-surface-action-selected);
|
|
1973
|
+
background-color: var(--dds-color-surface-selected-default);
|
|
1974
|
+
}
|
|
1975
|
+
&:has(input[aria-invalid]) {
|
|
1976
|
+
border-color: var(--dds-color-border-danger);
|
|
1977
|
+
box-shadow: inset 0 0 0 1px var(--dds-color-border-danger);
|
|
1978
|
+
}
|
|
1979
|
+
&:has(input:disabled),
|
|
1980
|
+
&:has(input[aria-readonly]) {
|
|
1981
|
+
box-shadow: none;
|
|
1982
|
+
background-color: var(--dds-color-surface-selected-default);
|
|
1983
|
+
background-color: var(--dds-color-surface-field-disabled);
|
|
1984
|
+
border-color: var(--dds-color-surface-field-disabled);
|
|
1953
1985
|
}
|
|
1954
1986
|
}
|
|
1987
|
+
.Card_container--navigation {
|
|
1988
|
+
text-decoration: none;
|
|
1989
|
+
}
|
|
1955
1990
|
.Card_container--expandable {
|
|
1956
1991
|
width: 100%;
|
|
1957
1992
|
box-sizing: border-box;
|
|
@@ -1989,23 +2024,6 @@
|
|
|
1989
2024
|
padding: var(--dds-card-accordion-body-content-padding);
|
|
1990
2025
|
}
|
|
1991
2026
|
|
|
1992
|
-
/* src/components/Chip/Chip.module.css */
|
|
1993
|
-
.Chip_container {
|
|
1994
|
-
display: inline-flex;
|
|
1995
|
-
align-items: center;
|
|
1996
|
-
max-width: 100%;
|
|
1997
|
-
gap: var(--dds-spacing-x0-25);
|
|
1998
|
-
padding: var(--dds-spacing-x0-125) var(--dds-spacing-x0-25) var(--dds-spacing-x0-125) var(--dds-spacing-x0-5);
|
|
1999
|
-
border: 1px solid var(--dds-color-border-subtle);
|
|
2000
|
-
border-radius: var(--dds-border-radius-chip);
|
|
2001
|
-
background-color: var(--dds-color-surface-subtle);
|
|
2002
|
-
}
|
|
2003
|
-
|
|
2004
|
-
/* src/components/Contrast/Contrast.module.css */
|
|
2005
|
-
:where(.Contrast_container) {
|
|
2006
|
-
background-color: var(--dds-color-surface-inverse-default);
|
|
2007
|
-
}
|
|
2008
|
-
|
|
2009
2027
|
/* src/components/SelectionControl/SelectionControl.module.css */
|
|
2010
2028
|
.SelectionControl_container {
|
|
2011
2029
|
display: flex;
|
|
@@ -2028,40 +2046,46 @@
|
|
|
2028
2046
|
-webkit-user-select: none;
|
|
2029
2047
|
-moz-user-select: none;
|
|
2030
2048
|
user-select: none;
|
|
2031
|
-
input ~ .SelectionControl_selection-control {
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2049
|
+
&:not(:hover) input[aria-invalid]:enabled:not([aria-readonly]):not(:focus-visible):not(:checked) ~ .SelectionControl_selection-control {
|
|
2050
|
+
background-color: var(--dds-color-surface-danger-default);
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
.SelectionControl_label:has(input:enabled) {
|
|
2054
|
+
input[aria-invalid]:not([aria-readonly]):not(:focus-visible) ~ .SelectionControl_selection-control {
|
|
2055
|
+
border-color: var(--dds-color-border-danger);
|
|
2056
|
+
box-shadow: inset 0 0 0 1px var(--dds-color-border-danger);
|
|
2039
2057
|
}
|
|
2040
|
-
&:hover
|
|
2058
|
+
&:hover input:not(:checked):not([aria-readonly]) ~ .SelectionControl_selection-control {
|
|
2041
2059
|
background-color: var(--dds-color-surface-hover-default);
|
|
2042
2060
|
box-shadow: inset 0 0 0 1px var(--dds-color-border-action-hover);
|
|
2043
2061
|
border-color: var(--dds-color-border-action-hover);
|
|
2044
2062
|
}
|
|
2045
|
-
input:checked
|
|
2046
|
-
input
|
|
2063
|
+
input:checked ~ .SelectionControl_selection-control,
|
|
2064
|
+
input[data-indeterminate] ~ .SelectionControl_selection-control {
|
|
2047
2065
|
border-color: var(--dds-color-surface-action-selected);
|
|
2048
2066
|
background-color: var(--dds-color-surface-action-selected);
|
|
2049
2067
|
}
|
|
2050
|
-
|
|
2051
|
-
|
|
2068
|
+
input:checked[aria-readonly] ~ .SelectionControl_selection-control,
|
|
2069
|
+
input[data-indeterminate][aria-readonly] ~ .SelectionControl_selection-control {
|
|
2052
2070
|
border-color: var(--dds-color-surface-action-selected-disabled);
|
|
2053
2071
|
background-color: var(--dds-color-surface-action-selected-disabled);
|
|
2054
2072
|
}
|
|
2055
|
-
&:hover
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2073
|
+
&:hover {
|
|
2074
|
+
input:enabled:not([aria-readonly]) {
|
|
2075
|
+
&:checked[type=checkbox],
|
|
2076
|
+
&[data-indeterminate] {
|
|
2077
|
+
~ .SelectionControl_selection-control {
|
|
2078
|
+
background-color: var(--dds-color-surface-action-hover);
|
|
2079
|
+
border-color: var(--dds-color-surface-action-hover);
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2063
2083
|
}
|
|
2064
2084
|
}
|
|
2085
|
+
input:checked ~ .SelectionControl_selection-control:after,
|
|
2086
|
+
input[data-indeterminate] ~ .SelectionControl_selection-control:after {
|
|
2087
|
+
display: block;
|
|
2088
|
+
}
|
|
2065
2089
|
.SelectionControl_label--checkbox {
|
|
2066
2090
|
.SelectionControl_selection-control:after {
|
|
2067
2091
|
border: solid var(--dds-color-icon-on-action);
|
|
@@ -2072,7 +2096,7 @@
|
|
|
2072
2096
|
height: 10px;
|
|
2073
2097
|
transform: rotate(45deg);
|
|
2074
2098
|
}
|
|
2075
|
-
input[data-indeterminate
|
|
2099
|
+
input[data-indeterminate] ~ .SelectionControl_selection-control:after {
|
|
2076
2100
|
border-width: 1px 0 0 0;
|
|
2077
2101
|
left: 25%;
|
|
2078
2102
|
top: 50%;
|
|
@@ -2092,40 +2116,28 @@
|
|
|
2092
2116
|
transform: translate(-50%, -50%);
|
|
2093
2117
|
}
|
|
2094
2118
|
}
|
|
2095
|
-
.SelectionControl_label
|
|
2119
|
+
.SelectionControl_label:has(input:disabled) {
|
|
2096
2120
|
cursor: not-allowed;
|
|
2097
|
-
input:disabled ~ .SelectionControl_selection-control {
|
|
2098
|
-
border-color: var(--dds-color-border-default);
|
|
2099
|
-
}
|
|
2100
|
-
input:checked:disabled ~ .SelectionControl_selection-control,
|
|
2101
|
-
input:disabled[data-indeterminate=true] ~ .SelectionControl_selection-control {
|
|
2102
|
-
border-color: var(--dds-color-surface-action-selected-disabled);
|
|
2103
|
-
background-color: var(--dds-color-surface-action-selected-disabled);
|
|
2104
|
-
}
|
|
2105
|
-
}
|
|
2106
|
-
.SelectionControl_label--readonly {
|
|
2107
|
-
cursor: default;
|
|
2108
|
-
color: var(--dds-color-text-medium);
|
|
2109
2121
|
input ~ .SelectionControl_selection-control {
|
|
2110
|
-
border-color: var(--dds-color-border-
|
|
2111
|
-
background-color: var(--dds-color-surface-field-disabled);
|
|
2122
|
+
border-color: var(--dds-color-border-subtle);
|
|
2112
2123
|
}
|
|
2113
2124
|
input:checked ~ .SelectionControl_selection-control,
|
|
2114
|
-
input[data-indeterminate
|
|
2125
|
+
input[data-indeterminate] ~ .SelectionControl_selection-control {
|
|
2115
2126
|
border-color: var(--dds-color-surface-action-selected-disabled);
|
|
2116
2127
|
background-color: var(--dds-color-surface-action-selected-disabled);
|
|
2117
2128
|
}
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
+
.SelectionControl_label:has(input[aria-readonly]) {
|
|
2130
|
+
cursor: default;
|
|
2131
|
+
color: var(--dds-color-text-medium);
|
|
2132
|
+
input ~ .SelectionControl_selection-control {
|
|
2133
|
+
border-color: var(--dds-color-border-default);
|
|
2134
|
+
background-color: var(--dds-color-surface-field-disabled);
|
|
2135
|
+
}
|
|
2136
|
+
input:checked ~ .SelectionControl_selection-control,
|
|
2137
|
+
input[data-indeterminate] ~ .SelectionControl_selection-control {
|
|
2138
|
+
border-color: var(--dds-color-surface-action-selected-disabled);
|
|
2139
|
+
background-color: var(--dds-color-surface-action-selected-disabled);
|
|
2140
|
+
}
|
|
2129
2141
|
}
|
|
2130
2142
|
}
|
|
2131
2143
|
.SelectionControl_label--no-text {
|
|
@@ -2139,14 +2151,22 @@
|
|
|
2139
2151
|
border-color: var(--dds-color-border-default);
|
|
2140
2152
|
background-color: var(--dds-color-surface-field-default);
|
|
2141
2153
|
border-radius: var(--dds-border-radius-input);
|
|
2142
|
-
height:
|
|
2143
|
-
width:
|
|
2154
|
+
height: var(--dds-selection-control-height);
|
|
2155
|
+
width: var(--dds-selection-control-height);
|
|
2144
2156
|
&:after {
|
|
2145
2157
|
content: "";
|
|
2146
2158
|
position: absolute;
|
|
2147
2159
|
display: none;
|
|
2148
2160
|
box-sizing: border-box;
|
|
2149
2161
|
}
|
|
2162
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
2163
|
+
transition:
|
|
2164
|
+
box-shadow 0.2s,
|
|
2165
|
+
background-color 0.2s,
|
|
2166
|
+
border 0.2s,
|
|
2167
|
+
border-color 0.2s,
|
|
2168
|
+
var(--dds-focus-transition);
|
|
2169
|
+
}
|
|
2150
2170
|
}
|
|
2151
2171
|
.SelectionControl_selection-control--radio {
|
|
2152
2172
|
border-radius: var(--dds-border-radius-rounded);
|
|
@@ -2174,9 +2194,26 @@
|
|
|
2174
2194
|
margin-top: calc((var(--dds-font-lineheight-x1) * 1em - var(--dds-icon-size-small)) / 2 - 1px);
|
|
2175
2195
|
}
|
|
2176
2196
|
|
|
2197
|
+
/* src/components/Chip/Chip.module.css */
|
|
2198
|
+
.Chip_container {
|
|
2199
|
+
display: inline-flex;
|
|
2200
|
+
align-items: center;
|
|
2201
|
+
max-width: 100%;
|
|
2202
|
+
gap: var(--dds-spacing-x0-25);
|
|
2203
|
+
padding: var(--dds-spacing-x0-125) var(--dds-spacing-x0-25) var(--dds-spacing-x0-125) var(--dds-spacing-x0-5);
|
|
2204
|
+
border: 1px solid var(--dds-color-border-subtle);
|
|
2205
|
+
border-radius: var(--dds-border-radius-chip);
|
|
2206
|
+
background-color: var(--dds-color-surface-subtle);
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
/* src/components/Contrast/Contrast.module.css */
|
|
2210
|
+
:where(.Contrast_container) {
|
|
2211
|
+
background-color: var(--dds-color-surface-inverse-default);
|
|
2212
|
+
}
|
|
2213
|
+
|
|
2177
2214
|
/* src/components/CookieBanner/CookieBanner.module.css */
|
|
2178
2215
|
.CookieBanner_checkbox-label {
|
|
2179
|
-
padding: 0 0 0 calc(
|
|
2216
|
+
padding: 0 0 0 calc(var(--dds-selection-control-height) + var(--dds-spacing-x0-5));
|
|
2180
2217
|
align-items: flex-start;
|
|
2181
2218
|
& > span {
|
|
2182
2219
|
top: calc((var(--dds-font-lineheight-x1) * 1em - var(--dds-icon-size-small)) / 2 - 1px);
|
|
@@ -2360,6 +2397,7 @@
|
|
|
2360
2397
|
--dds-focus-transition: outline-offset 0.2s;
|
|
2361
2398
|
--dds-input-default-width: 320px;
|
|
2362
2399
|
--dds-input-default-width-xsmall: 210px;
|
|
2400
|
+
--dds-selection-control-height: 18px;
|
|
2363
2401
|
--dds-transition-duration-surface-move: 0.5s;
|
|
2364
2402
|
}
|
|
2365
2403
|
.ThemeProvider_global-styles {
|
|
@@ -3510,7 +3548,7 @@ select:hover {
|
|
|
3510
3548
|
}
|
|
3511
3549
|
.SplitButton_option--primary,
|
|
3512
3550
|
.SplitButton_option--primary:hover {
|
|
3513
|
-
border-left: 1px solid var(--dds-color-border-on-action);
|
|
3551
|
+
border-left: 1px solid var(--dds-color-border-on-action) !important;
|
|
3514
3552
|
}
|
|
3515
3553
|
|
|
3516
3554
|
/* src/components/Table/normal/Table.module.css */
|