@norges-domstoler/dds-components 23.2.0 ā 23.2.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/README.md +50 -50
- package/dist/IBMPlexSans-Italic-5TWWGFM4.woff2 +0 -0
- package/dist/IBMPlexSans-Italic-HH2T6U4G.woff +0 -0
- package/dist/IBMPlexSans-Light-6JVLZATI.woff2 +0 -0
- package/dist/IBMPlexSans-Light-DJGXOPZM.woff +0 -0
- package/dist/IBMPlexSans-LightItalic-DGDYT5M4.woff +0 -0
- package/dist/IBMPlexSans-LightItalic-HGYKQIYJ.woff2 +0 -0
- package/dist/IBMPlexSans-Medium-F6RY5FT3.woff +0 -0
- package/dist/IBMPlexSans-Medium-GPYSN6WY.woff2 +0 -0
- package/dist/IBMPlexSans-MediumItalic-HYTLJOHM.woff +0 -0
- package/dist/IBMPlexSans-MediumItalic-NOK4NVHM.woff2 +0 -0
- package/dist/IBMPlexSans-Regular-7XP7CCD2.woff2 +0 -0
- package/dist/IBMPlexSans-Regular-7YEDMBFF.woff +0 -0
- package/dist/IBMPlexSans-SemiBold-6YAECOM6.woff +0 -0
- package/dist/IBMPlexSans-SemiBold-G57W7BEN.woff2 +0 -0
- package/dist/IBMPlexSans-SemiBoldItalic-4CLIFUGS.woff2 +0 -0
- package/dist/IBMPlexSans-SemiBoldItalic-IK6VH5Y5.woff +0 -0
- package/dist/index.css +3 -56
- package/dist/index.css.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +96 -96
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
# @norges-domstoler/dds-components
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/@norges-domstoler/dds-components) 
|
|
4
|
-
|
|
5
|
-
React UI komponenter til bruk i domstolenes tjenester.
|
|
6
|
-
|
|
7
|
-
Sjekk ut [Elsa - domstolenes designsystem](https://design.domstol.no/) og [Elsa Storybook](https://domstolene.github.io/designsystem) for dokumentasjon og demoer.
|
|
8
|
-
|
|
9
|
-
## š¦ Installasjon
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
pnpm add @norges-domstoler/dds-components
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Importer styling av komponentene i CSS:
|
|
16
|
-
|
|
17
|
-
```css
|
|
18
|
-
@import '@norges-domstoler/dds-components/index.css';
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## šØ Bruk
|
|
22
|
-
|
|
23
|
-
Wrapp applikasjonen din i `<DdsProvider>`.
|
|
24
|
-
|
|
25
|
-
```jsx
|
|
26
|
-
import React from 'react';
|
|
27
|
-
import ReactDOM from 'react-dom/client';
|
|
28
|
-
import {
|
|
29
|
-
Button,
|
|
30
|
-
TextInput,
|
|
31
|
-
DdsProvider,
|
|
32
|
-
} from '@norges-domstoler/dds-components';
|
|
33
|
-
|
|
34
|
-
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
35
|
-
root.render(
|
|
36
|
-
<React>
|
|
37
|
-
<DdsProvider language="nb">
|
|
38
|
-
<TextInput label="Input" />
|
|
39
|
-
<Button>Primary</Button>
|
|
40
|
-
<Button purpose="secondary" size="small">
|
|
41
|
-
Secondary
|
|
42
|
-
</Button>
|
|
43
|
-
</DdsProvider>
|
|
44
|
-
</React>,
|
|
45
|
-
);
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## š Komponenter
|
|
49
|
-
|
|
50
|
-
Sjekk [Komponenter](https://design.domstol.no/987b33f71/p/438035-komponenter) for oversikt over alle komponenter, og [Nyheter](https://design.domstol.no/987b33f71/p/66ec5c-nyheter) for status pƄ nye komponenter.
|
|
1
|
+
# @norges-domstoler/dds-components
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@norges-domstoler/dds-components) 
|
|
4
|
+
|
|
5
|
+
React UI komponenter til bruk i domstolenes tjenester.
|
|
6
|
+
|
|
7
|
+
Sjekk ut [Elsa - domstolenes designsystem](https://design.domstol.no/) og [Elsa Storybook](https://domstolene.github.io/designsystem) for dokumentasjon og demoer.
|
|
8
|
+
|
|
9
|
+
## š¦ Installasjon
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm add @norges-domstoler/dds-components
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Importer styling av komponentene i CSS:
|
|
16
|
+
|
|
17
|
+
```css
|
|
18
|
+
@import '@norges-domstoler/dds-components/index.css';
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## šØ Bruk
|
|
22
|
+
|
|
23
|
+
Wrapp applikasjonen din i `<DdsProvider>`.
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
import React from 'react';
|
|
27
|
+
import ReactDOM from 'react-dom/client';
|
|
28
|
+
import {
|
|
29
|
+
Button,
|
|
30
|
+
TextInput,
|
|
31
|
+
DdsProvider,
|
|
32
|
+
} from '@norges-domstoler/dds-components';
|
|
33
|
+
|
|
34
|
+
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
35
|
+
root.render(
|
|
36
|
+
<React>
|
|
37
|
+
<DdsProvider language="nb">
|
|
38
|
+
<TextInput label="Input" />
|
|
39
|
+
<Button>Primary</Button>
|
|
40
|
+
<Button purpose="secondary" size="small">
|
|
41
|
+
Secondary
|
|
42
|
+
</Button>
|
|
43
|
+
</DdsProvider>
|
|
44
|
+
</React>,
|
|
45
|
+
);
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## š Komponenter
|
|
49
|
+
|
|
50
|
+
Sjekk [Komponenter](https://design.domstol.no/987b33f71/p/438035-komponenter) for oversikt over alle komponenter, og [Nyheter](https://design.domstol.no/987b33f71/p/66ec5c-nyheter) for status pƄ nye komponenter.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.css
CHANGED
|
@@ -63,10 +63,6 @@
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
/* src/styles/selection.css */
|
|
66
|
-
*::-moz-selection {
|
|
67
|
-
background-color: var(--dds-color-surface-highlighted-default);
|
|
68
|
-
color: var(--dds-color-text-default);
|
|
69
|
-
}
|
|
70
66
|
*::selection {
|
|
71
67
|
background-color: var(--dds-color-surface-highlighted-default);
|
|
72
68
|
color: var(--dds-color-text-default);
|
|
@@ -121,7 +117,6 @@
|
|
|
121
117
|
:where(.typographyStyles_a--nested__parent .typographyStyles_a--nested__child) {
|
|
122
118
|
font: inherit;
|
|
123
119
|
color: var(--dds-color-text-link);
|
|
124
|
-
width: -moz-fit-content;
|
|
125
120
|
width: fit-content;
|
|
126
121
|
text-decoration: underline;
|
|
127
122
|
text-decoration-thickness: max(1px, 0.0625rem);
|
|
@@ -586,7 +581,6 @@
|
|
|
586
581
|
/* src/components/helpers/AccordionBase/AccordionBase.module.css */
|
|
587
582
|
:where(.AccordionBase_header-button) {
|
|
588
583
|
-webkit-user-select: text;
|
|
589
|
-
-moz-user-select: text;
|
|
590
584
|
user-select: text;
|
|
591
585
|
position: relative;
|
|
592
586
|
cursor: pointer;
|
|
@@ -660,7 +654,6 @@
|
|
|
660
654
|
.DropdownItem_item--interactive {
|
|
661
655
|
text-align: left;
|
|
662
656
|
-webkit-user-select: text;
|
|
663
|
-
-moz-user-select: text;
|
|
664
657
|
user-select: text;
|
|
665
658
|
border: none;
|
|
666
659
|
cursor: pointer;
|
|
@@ -790,7 +783,6 @@
|
|
|
790
783
|
}
|
|
791
784
|
.layout_dds-c-gap {
|
|
792
785
|
--dds-r-c-gap: var(--dds-r-xs-c-gap);
|
|
793
|
-
-moz-column-gap: var(--dds-r-c-gap, initial);
|
|
794
786
|
column-gap: var(--dds-r-c-gap, initial);
|
|
795
787
|
}
|
|
796
788
|
.layout_dds-r-gap {
|
|
@@ -1972,7 +1964,6 @@
|
|
|
1972
1964
|
/* src/components/Typography/Typography/Typography.module.css */
|
|
1973
1965
|
.Typography_container {
|
|
1974
1966
|
-webkit-user-select: text;
|
|
1975
|
-
-moz-user-select: text;
|
|
1976
1967
|
user-select: text;
|
|
1977
1968
|
}
|
|
1978
1969
|
|
|
@@ -2001,12 +1992,10 @@
|
|
|
2001
1992
|
/* src/components/Button/Button.module.css */
|
|
2002
1993
|
:where(.Button_button) {
|
|
2003
1994
|
-webkit-user-select: text;
|
|
2004
|
-
-moz-user-select: text;
|
|
2005
1995
|
user-select: text;
|
|
2006
1996
|
display: inline-flex;
|
|
2007
1997
|
align-items: center;
|
|
2008
1998
|
justify-content: center;
|
|
2009
|
-
width: -moz-fit-content;
|
|
2010
1999
|
width: fit-content;
|
|
2011
2000
|
cursor: pointer;
|
|
2012
2001
|
box-shadow: none;
|
|
@@ -2055,7 +2044,6 @@
|
|
|
2055
2044
|
padding-inline: var(--dds-spacing-x0-25);
|
|
2056
2045
|
}
|
|
2057
2046
|
&.Button_clear {
|
|
2058
|
-
min-height: -moz-fit-content;
|
|
2059
2047
|
min-height: fit-content;
|
|
2060
2048
|
padding: var(--dds-spacing-x0-125);
|
|
2061
2049
|
}
|
|
@@ -2196,7 +2184,6 @@
|
|
|
2196
2184
|
cursor: pointer;
|
|
2197
2185
|
display: flex;
|
|
2198
2186
|
align-items: center;
|
|
2199
|
-
width: -moz-fit-content;
|
|
2200
2187
|
width: fit-content;
|
|
2201
2188
|
gap: var(--dds-spacing-x0-25);
|
|
2202
2189
|
--dds-toggle-medium-thumb-spacing-inline: var(--dds-spacing-x0-125);
|
|
@@ -2569,7 +2556,6 @@
|
|
|
2569
2556
|
.SelectionControl_label {
|
|
2570
2557
|
cursor: pointer;
|
|
2571
2558
|
-webkit-user-select: none;
|
|
2572
|
-
-moz-user-select: none;
|
|
2573
2559
|
user-select: none;
|
|
2574
2560
|
&:not(:hover) input[aria-invalid]:enabled:not([aria-readonly=true]):not(:focus-visible):not(:checked) ~ .SelectionControl_selection-control {
|
|
2575
2561
|
background-color: var(--dds-color-surface-danger-default);
|
|
@@ -2765,7 +2751,6 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
|
|
|
2765
2751
|
}
|
|
2766
2752
|
.DateInput_calendar__month-button {
|
|
2767
2753
|
-webkit-user-select: none;
|
|
2768
|
-
-moz-user-select: none;
|
|
2769
2754
|
user-select: none;
|
|
2770
2755
|
}
|
|
2771
2756
|
.DateInput_calendar__grid-element {
|
|
@@ -2897,10 +2882,6 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
|
|
|
2897
2882
|
&[type=datetime-local] {
|
|
2898
2883
|
-webkit-appearance: none;
|
|
2899
2884
|
}
|
|
2900
|
-
&:hover:enabled:-moz-read-write:not(:focus-visible):not(.Input_disabled):not(.Input_read-only) {
|
|
2901
|
-
border-color: var(--dds-color-border-action-hover);
|
|
2902
|
-
box-shadow: 0 0 0 1px var(--dds-color-border-action-hover);
|
|
2903
|
-
}
|
|
2904
2885
|
&:hover:enabled:read-write:not(:focus-visible):not(.Input_disabled):not(.Input_read-only) {
|
|
2905
2886
|
border-color: var(--dds-color-border-action-hover);
|
|
2906
2887
|
box-shadow: 0 0 0 1px var(--dds-color-border-action-hover);
|
|
@@ -2908,13 +2889,6 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
|
|
|
2908
2889
|
}
|
|
2909
2890
|
:where(.Input_input--stateful) {
|
|
2910
2891
|
-webkit-appearance: textfield;
|
|
2911
|
-
&:enabled:-moz-read-only {
|
|
2912
|
-
box-shadow: none;
|
|
2913
|
-
border: 1px solid var(--dds-color-border-default);
|
|
2914
|
-
background-color: var(--dds-color-surface-field-disabled);
|
|
2915
|
-
color: var(--dds-color-text-medium);
|
|
2916
|
-
cursor: default;
|
|
2917
|
-
}
|
|
2918
2892
|
&:not(.Input_disabled).Input_read-only,
|
|
2919
2893
|
&:enabled:read-only {
|
|
2920
2894
|
box-shadow: none;
|
|
@@ -2939,20 +2913,11 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
|
|
|
2939
2913
|
:where(.Input_input--stateful-danger) {
|
|
2940
2914
|
border-color: var(--dds-color-border-danger);
|
|
2941
2915
|
box-shadow: 0 0 0 1px var(--dds-color-border-danger);
|
|
2942
|
-
&:hover:enabled:-moz-read-write:not(:focus-within) {
|
|
2943
|
-
border-color: var(--dds-color-border-danger);
|
|
2944
|
-
box-shadow: 0 0 0 1px var(--dds-color-border-danger);
|
|
2945
|
-
}
|
|
2946
2916
|
&:not(.Input_disabled):hover:not(:focus-within),
|
|
2947
2917
|
&:hover:enabled:read-write:not(:focus-within) {
|
|
2948
2918
|
border-color: var(--dds-color-border-danger);
|
|
2949
2919
|
box-shadow: 0 0 0 1px var(--dds-color-border-danger);
|
|
2950
2920
|
}
|
|
2951
|
-
&:focus-within:enabled:-moz-read-write,
|
|
2952
|
-
&:hover:focus-within:enabled:-moz-read-write,
|
|
2953
|
-
&:active:enabled:-moz-read-write {
|
|
2954
|
-
border-color: 1px solid var(--dds-color-border-default);
|
|
2955
|
-
}
|
|
2956
2921
|
&:not(.Input_disabled):focus-within,
|
|
2957
2922
|
&:focus-within:enabled:read-write,
|
|
2958
2923
|
&:hover:focus-within:enabled:read-write,
|
|
@@ -3301,7 +3266,6 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
|
|
|
3301
3266
|
.Table_sort-button {
|
|
3302
3267
|
gap: var(--dds-spacing-x0-5);
|
|
3303
3268
|
-webkit-user-select: text;
|
|
3304
|
-
-moz-user-select: text;
|
|
3305
3269
|
user-select: text;
|
|
3306
3270
|
display: flex;
|
|
3307
3271
|
align-items: center;
|
|
@@ -3399,20 +3363,15 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
|
|
|
3399
3363
|
top: calc((var(--dds-font-lineheight-x1) * 1em) / 2 - var(--dds-list-bullet-size) / 2);
|
|
3400
3364
|
left: 0;
|
|
3401
3365
|
background: var(--dds-color-text-body);
|
|
3402
|
-
-webkit-mask-size: 100%;
|
|
3403
3366
|
mask-size: 100%;
|
|
3404
|
-
-webkit-mask-repeat: no-repeat;
|
|
3405
3367
|
mask-repeat: no-repeat;
|
|
3406
|
-
|
|
3407
|
-
mask-image: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<circle cx="12" cy="12" r="6" fill="%230B0D0E"/>%0A</svg>%0A');
|
|
3368
|
+
mask-image: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0D%0A<circle cx="12" cy="12" r="6" fill="%230B0D0E"/>%0D%0A</svg>%0D%0A');
|
|
3408
3369
|
}
|
|
3409
3370
|
ul > li:before {
|
|
3410
|
-
|
|
3411
|
-
mask-image: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect x="4" y="10" width="15.65" height="3.9125" fill="%230B0D0E"/>%0A</svg>%0A');
|
|
3371
|
+
mask-image: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0D%0A<rect x="4" y="10" width="15.65" height="3.9125" fill="%230B0D0E"/>%0D%0A</svg>%0D%0A');
|
|
3412
3372
|
}
|
|
3413
3373
|
ul > li > ul > li:before {
|
|
3414
|
-
|
|
3415
|
-
mask-image: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<path d="M12 16.6154C16.4183 16.6154 20 12.7581 20 8H4C4 12.7581 7.58172 16.6154 12 16.6154Z" fill="%230B0D0E"/>%0A</svg>%0A');
|
|
3374
|
+
mask-image: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0D%0A<path d="M12 16.6154C16.4183 16.6154 20 12.7581 20 8H4C4 12.7581 7.58172 16.6154 12 16.6154Z" fill="%230B0D0E"/>%0D%0A</svg>%0D%0A');
|
|
3416
3375
|
}
|
|
3417
3376
|
}
|
|
3418
3377
|
}
|
|
@@ -3707,17 +3666,10 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
|
|
|
3707
3666
|
}
|
|
3708
3667
|
}
|
|
3709
3668
|
.InlineEdit_inline-select {
|
|
3710
|
-
-webkit-appearance: none;
|
|
3711
|
-
-moz-appearance: none;
|
|
3712
3669
|
appearance: none;
|
|
3713
3670
|
text-overflow: ellipsis;
|
|
3714
3671
|
cursor: pointer;
|
|
3715
3672
|
}
|
|
3716
|
-
.InlineEdit_inline-input:hover:enabled:-moz-read-write:not(:focus) {
|
|
3717
|
-
border-color: transparent;
|
|
3718
|
-
box-shadow: none;
|
|
3719
|
-
background-color: var(--dds-color-surface-hover-default);
|
|
3720
|
-
}
|
|
3721
3673
|
.InlineEdit_inline-input:hover:enabled:read-write:not(:focus),
|
|
3722
3674
|
.InlineEdit_inline-select:hover:enabled:not(:focus) {
|
|
3723
3675
|
border-color: transparent;
|
|
@@ -3861,7 +3813,6 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
|
|
|
3861
3813
|
.NewsPopover_img-wrapper img {
|
|
3862
3814
|
width: 100%;
|
|
3863
3815
|
height: 100%;
|
|
3864
|
-
-o-object-fit: contain;
|
|
3865
3816
|
object-fit: contain;
|
|
3866
3817
|
}
|
|
3867
3818
|
|
|
@@ -3900,8 +3851,6 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
|
|
|
3900
3851
|
|
|
3901
3852
|
/* src/components/Select/NativeSelect/NativeSelect.module.css */
|
|
3902
3853
|
.NativeSelect_select {
|
|
3903
|
-
-webkit-appearance: none;
|
|
3904
|
-
-moz-appearance: none;
|
|
3905
3854
|
appearance: none;
|
|
3906
3855
|
text-overflow: ellipsis;
|
|
3907
3856
|
font: inherit;
|
|
@@ -4043,7 +3992,6 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
|
|
|
4043
3992
|
/* src/components/Popover/Popover.module.css */
|
|
4044
3993
|
.Popover_container {
|
|
4045
3994
|
position: absolute;
|
|
4046
|
-
width: -moz-fit-content;
|
|
4047
3995
|
width: fit-content;
|
|
4048
3996
|
z-index: var(--dds-zindex-popover);
|
|
4049
3997
|
padding: var(--dds-spacing-x0-75) var(--dds-spacing-x1) var(--dds-spacing-x1-5) var(--dds-spacing-x1);
|
|
@@ -4279,7 +4227,6 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
|
|
|
4279
4227
|
.Tabs_tab {
|
|
4280
4228
|
border: none;
|
|
4281
4229
|
-webkit-user-select: text;
|
|
4282
|
-
-moz-user-select: text;
|
|
4283
4230
|
user-select: text;
|
|
4284
4231
|
display: flex;
|
|
4285
4232
|
align-items: center;
|