@norges-domstoler/dds-components 21.7.0 → 21.9.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/dist/index.css CHANGED
@@ -531,12 +531,12 @@
531
531
  .utilStyles_center-absolute-y {
532
532
  position: absolute;
533
533
  top: 50%;
534
- transform: translate(0, -50%);
534
+ transform: translateY(-50%);
535
535
  }
536
536
  .utilStyles_center-absolute-x {
537
537
  position: absolute;
538
538
  left: 50%;
539
- transform: translate(-50%, 0);
539
+ transform: translateX(-50%);
540
540
  }
541
541
 
542
542
  /* src/components/helpers/Backdrop/Backdrop.module.css */
@@ -612,185 +612,6 @@
612
612
  transform: rotate(0) translateY(0);
613
613
  }
614
614
 
615
- /* src/components/helpers/CharCounter/CharCounter.module.css */
616
- :where(.CharCounter_container) {
617
- margin-left: auto;
618
- }
619
-
620
- /* src/components/Typography/Typography/TextOverflowEllipsis/TextOverflowEllipsis.module.css */
621
- .TextOverflowEllipsis_wrapper {
622
- max-width: 100%;
623
- }
624
- .TextOverflowEllipsis_inner {
625
- white-space: nowrap;
626
- overflow: hidden;
627
- text-overflow: ellipsis;
628
- }
629
-
630
- /* src/components/Typography/Typography/Typography.module.css */
631
- .Typography_container {
632
- -webkit-user-select: text;
633
- -moz-user-select: text;
634
- user-select: text;
635
- }
636
-
637
- /* src/components/helpers/styling/focus.module.css */
638
- .focus_focused,
639
- .focus_focusable:focus-visible,
640
- .focus_focusable-focus:focus,
641
- .focus_focusable-within:focus-within,
642
- .focus_has-focusable-input:has(input:focus-visible),
643
- .focus_focusable-sibling:focus-visible + .focus_focus-styled-sibling {
644
- outline: var(--dds-focus-outline);
645
- outline-offset: var(--dds-focus-outline-offset);
646
- box-shadow: var(--dds-focus-box-shadow);
647
- }
648
- .focus_focusable--inset:focus-visible {
649
- outline: var(--dds-focus-outline);
650
- outline-offset: var(--dds-focus-outline-inset);
651
- box-shadow: var(--dds-focus-box-shadow);
652
- }
653
-
654
- /* src/components/Icon/Icon.module.css */
655
- .Icon_svg {
656
- display: inline-block;
657
- transition: fill 0.2s;
658
- flex-shrink: 0;
659
- }
660
-
661
- /* src/components/Typography/Label/Label.module.css */
662
- .Label_read-only {
663
- display: flex;
664
- }
665
- .Label_read-only__icon {
666
- align-self: center;
667
- flex-shrink: 0;
668
- margin-inline-end: var(--dds-spacing-x0-125);
669
- width: 1.25em;
670
- height: 1.25em;
671
- }
672
-
673
- /* src/components/helpers/Input/Input.module.css */
674
- .Input_container {
675
- position: relative;
676
- }
677
- .Input_input-group {
678
- position: relative;
679
- }
680
- :where(.Input_input) {
681
- position: relative;
682
- color: var(--dds-color-text-default);
683
- border: 1px solid var(--dds-color-border-default);
684
- background-color: var(--dds-color-surface-default);
685
- padding: var(--dds-spacing-x0-75) var(--dds-spacing-x1) var(--dds-spacing-x0-75) var(--dds-spacing-x0-75);
686
- border-radius: var(--dds-border-radius-input);
687
- margin: 0;
688
- box-sizing: border-box;
689
- box-shadow: none;
690
- @media (prefers-reduced-motion: no-preference) {
691
- transition:
692
- box-shadow 0.2s,
693
- border-color 0.2s,
694
- background-color 0.2s,
695
- var(--dds-focus-transition);
696
- }
697
- &[type=text],
698
- &[type=password],
699
- &[type=number],
700
- &[type=tel],
701
- &[type=date],
702
- &[type=url],
703
- &[type=email],
704
- &[type=search],
705
- &[type=datetime-local] {
706
- -webkit-appearance: none;
707
- }
708
- &:hover:enabled:-moz-read-write:not(:focus-visible):not(.Input_disabled):not(.Input_read-only) {
709
- border-color: var(--dds-color-border-action-hover);
710
- box-shadow: 0 0 0 1px var(--dds-color-border-action-hover);
711
- }
712
- &:hover:enabled:read-write:not(:focus-visible):not(.Input_disabled):not(.Input_read-only) {
713
- border-color: var(--dds-color-border-action-hover);
714
- box-shadow: 0 0 0 1px var(--dds-color-border-action-hover);
715
- }
716
- }
717
- :where(.Input_input--stateful) {
718
- -webkit-appearance: textfield;
719
- &:enabled:-moz-read-only {
720
- box-shadow: none;
721
- border: 1px solid var(--dds-color-border-default);
722
- background-color: var(--dds-color-surface-field-disabled);
723
- color: var(--dds-color-text-medium);
724
- cursor: default;
725
- }
726
- &:not(.Input_disabled).Input_read-only,
727
- &:enabled:read-only {
728
- box-shadow: none;
729
- border: 1px solid var(--dds-color-border-default);
730
- background-color: var(--dds-color-surface-field-disabled);
731
- color: var(--dds-color-text-medium);
732
- cursor: default;
733
- }
734
- &.Input_disabled,
735
- &:disabled {
736
- box-shadow: none;
737
- border: 1px solid var(--dds-color-border-subtle);
738
- background-color: var(--dds-color-surface-field-disabled);
739
- color: var(--dds-color-text-subtle);
740
- cursor: not-allowed;
741
- }
742
- }
743
- :where(.Input_input--hover:hover) {
744
- border-color: var(--dds-color-border-action-hover);
745
- box-shadow: 0 0 0 1px var(--dds-color-border-action-hover);
746
- }
747
- :where(.Input_input--stateful-danger) {
748
- border-color: var(--dds-color-border-danger);
749
- box-shadow: 0 0 0 1px var(--dds-color-border-danger);
750
- &:hover:enabled:-moz-read-write:not(:focus-within) {
751
- border-color: var(--dds-color-border-danger);
752
- box-shadow: 0 0 0 1px var(--dds-color-border-danger);
753
- }
754
- &:not(.Input_disabled):hover:not(:focus-within),
755
- &:hover:enabled:read-write:not(:focus-within) {
756
- border-color: var(--dds-color-border-danger);
757
- box-shadow: 0 0 0 1px var(--dds-color-border-danger);
758
- }
759
- &:focus-within:enabled:-moz-read-write,
760
- &:hover:focus-within:enabled:-moz-read-write,
761
- &:active:enabled:-moz-read-write {
762
- border-color: 1px solid var(--dds-color-border-default);
763
- }
764
- &:not(.Input_disabled):focus-within,
765
- &:focus-within:enabled:read-write,
766
- &:hover:focus-within:enabled:read-write,
767
- &:active:enabled:read-write {
768
- border-color: 1px solid var(--dds-color-border-default);
769
- }
770
- }
771
- :where(.Input_input--medium) {
772
- padding: var(--dds-spacing-x0-75);
773
- }
774
- :where(.Input_input--small) {
775
- padding: var(--dds-spacing-x0-5) var(--dds-spacing-x0-75);
776
- }
777
- :where(.Input_input--xsmall) {
778
- padding: var(--dds-spacing-x0-25) var(--dds-spacing-x0-5);
779
- }
780
- :where(.Input_input--with-affix) {
781
- gap: var(--dds-spacing-x1);
782
- }
783
- :where(.Input_label) {
784
- display: block;
785
- }
786
- :where(.Input_input-group__absolute-element) {
787
- position: absolute;
788
- top: 50%;
789
- transform: translate(0, -50%);
790
- z-index: var(--dds-zindex-absolute-element);
791
- color: var(--dds-color-icon-default);
792
- }
793
-
794
615
  /* src/components/layout/common/layout.module.css */
795
616
  .layout_dds-p {
796
617
  --dds-r-p: var(--dds-r-xs-p);
@@ -1629,6 +1450,13 @@
1629
1450
  border-radius: 0;
1630
1451
  }
1631
1452
 
1453
+ /* src/components/Icon/Icon.module.css */
1454
+ .Icon_svg {
1455
+ display: inline-block;
1456
+ transition: fill 0.2s;
1457
+ flex-shrink: 0;
1458
+ }
1459
+
1632
1460
  /* src/components/ThemeProvider/ThemeProvider.module.css */
1633
1461
  .ThemeProvider_global-variables {
1634
1462
  --dds-color-text-body: var(--dds-color-text-default);
@@ -1723,6 +1551,52 @@
1723
1551
  display: none;
1724
1552
  }
1725
1553
 
1554
+ /* src/components/helpers/styling/focus.module.css */
1555
+ .focus_focused,
1556
+ .focus_focusable:focus-visible,
1557
+ .focus_focusable-focus:focus,
1558
+ .focus_focusable-within:focus-within,
1559
+ .focus_has-focusable-input:has(input:focus-visible),
1560
+ .focus_focusable-sibling:focus-visible + .focus_focus-styled-sibling {
1561
+ outline: var(--dds-focus-outline);
1562
+ outline-offset: var(--dds-focus-outline-offset);
1563
+ box-shadow: var(--dds-focus-box-shadow);
1564
+ }
1565
+ .focus_focusable--inset:focus-visible {
1566
+ outline: var(--dds-focus-outline);
1567
+ outline-offset: var(--dds-focus-outline-inset);
1568
+ box-shadow: var(--dds-focus-box-shadow);
1569
+ }
1570
+
1571
+ /* src/components/Typography/Typography/TextOverflowEllipsis/TextOverflowEllipsis.module.css */
1572
+ .TextOverflowEllipsis_wrapper {
1573
+ max-width: 100%;
1574
+ }
1575
+ .TextOverflowEllipsis_inner {
1576
+ white-space: nowrap;
1577
+ overflow: hidden;
1578
+ text-overflow: ellipsis;
1579
+ }
1580
+
1581
+ /* src/components/Typography/Typography/Typography.module.css */
1582
+ .Typography_container {
1583
+ -webkit-user-select: text;
1584
+ -moz-user-select: text;
1585
+ user-select: text;
1586
+ }
1587
+
1588
+ /* src/components/Typography/Label/Label.module.css */
1589
+ .Label_read-only {
1590
+ display: flex;
1591
+ }
1592
+ .Label_read-only__icon {
1593
+ align-self: center;
1594
+ flex-shrink: 0;
1595
+ margin-inline-end: var(--dds-spacing-x0-125);
1596
+ width: 1.25em;
1597
+ height: 1.25em;
1598
+ }
1599
+
1726
1600
  /* src/components/BackLink/BackLink.module.css */
1727
1601
  .BackLink_icon {
1728
1602
  display: inline;
@@ -2109,6 +1983,7 @@
2109
1983
  }
2110
1984
  .Card_container--navigation {
2111
1985
  text-decoration: none;
1986
+ display: block;
2112
1987
  }
2113
1988
  .Card_container--expandable {
2114
1989
  width: 100%;
@@ -2502,6 +2377,127 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
2502
2377
  text-decoration: underline line-through;
2503
2378
  }
2504
2379
 
2380
+ /* src/components/helpers/Input/Input.module.css */
2381
+ .Input_container {
2382
+ position: relative;
2383
+ }
2384
+ .Input_input-group {
2385
+ position: relative;
2386
+ }
2387
+ :where(.Input_input) {
2388
+ position: relative;
2389
+ color: var(--dds-color-text-default);
2390
+ border: 1px solid var(--dds-color-border-default);
2391
+ background-color: var(--dds-color-surface-default);
2392
+ padding: var(--dds-spacing-x0-75) var(--dds-spacing-x1) var(--dds-spacing-x0-75) var(--dds-spacing-x0-75);
2393
+ border-radius: var(--dds-border-radius-input);
2394
+ margin: 0;
2395
+ box-sizing: border-box;
2396
+ box-shadow: none;
2397
+ @media (prefers-reduced-motion: no-preference) {
2398
+ transition:
2399
+ box-shadow 0.2s,
2400
+ border-color 0.2s,
2401
+ background-color 0.2s,
2402
+ var(--dds-focus-transition);
2403
+ }
2404
+ &[type=text],
2405
+ &[type=password],
2406
+ &[type=number],
2407
+ &[type=tel],
2408
+ &[type=date],
2409
+ &[type=url],
2410
+ &[type=email],
2411
+ &[type=search],
2412
+ &[type=datetime-local] {
2413
+ -webkit-appearance: none;
2414
+ }
2415
+ &:hover:enabled:-moz-read-write:not(:focus-visible):not(.Input_disabled):not(.Input_read-only) {
2416
+ border-color: var(--dds-color-border-action-hover);
2417
+ box-shadow: 0 0 0 1px var(--dds-color-border-action-hover);
2418
+ }
2419
+ &:hover:enabled:read-write:not(:focus-visible):not(.Input_disabled):not(.Input_read-only) {
2420
+ border-color: var(--dds-color-border-action-hover);
2421
+ box-shadow: 0 0 0 1px var(--dds-color-border-action-hover);
2422
+ }
2423
+ }
2424
+ :where(.Input_input--stateful) {
2425
+ -webkit-appearance: textfield;
2426
+ &:enabled:-moz-read-only {
2427
+ box-shadow: none;
2428
+ border: 1px solid var(--dds-color-border-default);
2429
+ background-color: var(--dds-color-surface-field-disabled);
2430
+ color: var(--dds-color-text-medium);
2431
+ cursor: default;
2432
+ }
2433
+ &:not(.Input_disabled).Input_read-only,
2434
+ &:enabled:read-only {
2435
+ box-shadow: none;
2436
+ border: 1px solid var(--dds-color-border-default);
2437
+ background-color: var(--dds-color-surface-field-disabled);
2438
+ color: var(--dds-color-text-medium);
2439
+ cursor: default;
2440
+ }
2441
+ &.Input_disabled,
2442
+ &:disabled {
2443
+ box-shadow: none;
2444
+ border: 1px solid var(--dds-color-border-subtle);
2445
+ background-color: var(--dds-color-surface-field-disabled);
2446
+ color: var(--dds-color-text-subtle);
2447
+ cursor: not-allowed;
2448
+ }
2449
+ }
2450
+ :where(.Input_input--hover:hover) {
2451
+ border-color: var(--dds-color-border-action-hover);
2452
+ box-shadow: 0 0 0 1px var(--dds-color-border-action-hover);
2453
+ }
2454
+ :where(.Input_input--stateful-danger) {
2455
+ border-color: var(--dds-color-border-danger);
2456
+ box-shadow: 0 0 0 1px var(--dds-color-border-danger);
2457
+ &:hover:enabled:-moz-read-write:not(:focus-within) {
2458
+ border-color: var(--dds-color-border-danger);
2459
+ box-shadow: 0 0 0 1px var(--dds-color-border-danger);
2460
+ }
2461
+ &:not(.Input_disabled):hover:not(:focus-within),
2462
+ &:hover:enabled:read-write:not(:focus-within) {
2463
+ border-color: var(--dds-color-border-danger);
2464
+ box-shadow: 0 0 0 1px var(--dds-color-border-danger);
2465
+ }
2466
+ &:focus-within:enabled:-moz-read-write,
2467
+ &:hover:focus-within:enabled:-moz-read-write,
2468
+ &:active:enabled:-moz-read-write {
2469
+ border-color: 1px solid var(--dds-color-border-default);
2470
+ }
2471
+ &:not(.Input_disabled):focus-within,
2472
+ &:focus-within:enabled:read-write,
2473
+ &:hover:focus-within:enabled:read-write,
2474
+ &:active:enabled:read-write {
2475
+ border-color: 1px solid var(--dds-color-border-default);
2476
+ }
2477
+ }
2478
+ :where(.Input_input--medium) {
2479
+ padding: var(--dds-spacing-x0-75);
2480
+ }
2481
+ :where(.Input_input--small) {
2482
+ padding: var(--dds-spacing-x0-5) var(--dds-spacing-x0-75);
2483
+ }
2484
+ :where(.Input_input--xsmall) {
2485
+ padding: var(--dds-spacing-x0-25) var(--dds-spacing-x0-5);
2486
+ }
2487
+ :where(.Input_input--with-affix) {
2488
+ gap: var(--dds-spacing-x1);
2489
+ }
2490
+ :where(.Input_label) {
2491
+ display: block;
2492
+ }
2493
+ :where(.Input_input-group__absolute-element) {
2494
+ position: absolute;
2495
+ top: 50%;
2496
+ transform: translate(0, -50%);
2497
+ z-index: var(--dds-zindex-absolute-element);
2498
+ color: var(--dds-color-icon-default);
2499
+ }
2500
+
2505
2501
  /* src/components/DescriptionList/DescriptionList.module.css */
2506
2502
  .DescriptionList_list {
2507
2503
  & > dt:first-of-type {
@@ -2657,11 +2653,6 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
2657
2653
  margin-top: calc(-1 * var(--dds-spacing-x0-125));
2658
2654
  }
2659
2655
 
2660
- /* src/components/EmptyContent/EmptyContent.module.css */
2661
- .EmptyContent_message {
2662
- color: var(--dds-text-color--subtle);
2663
- }
2664
-
2665
2656
  /* src/components/FavStar/FavStar.module.css */
2666
2657
  .FavStar_container {
2667
2658
  position: relative;
@@ -2766,6 +2757,11 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
2766
2757
  padding-bottom: var(--dds-spacing-x0-5);
2767
2758
  }
2768
2759
 
2760
+ /* src/components/helpers/CharCounter/CharCounter.module.css */
2761
+ :where(.CharCounter_container) {
2762
+ margin-left: auto;
2763
+ }
2764
+
2769
2765
  /* src/components/helpers/InlineIconButton/InlineIconButton.module.css */
2770
2766
  .InlineIconButton_button {
2771
2767
  display: inline-flex;
@@ -2952,6 +2948,7 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
2952
2948
  text-overflow: ellipsis;
2953
2949
  width: 100%;
2954
2950
  padding-right: var(--dds-spacing-x1-5);
2951
+ cursor: pointer;
2955
2952
  }
2956
2953
  .InlineEdit_inline-select--with-clear-button {
2957
2954
  padding-right: var(--dds-spacing-x3);
@@ -2977,25 +2974,17 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
2977
2974
  .InlineEdit_inline-textarea {
2978
2975
  resize: vertical;
2979
2976
  }
2980
- .InlineEdit_icon-wrapper {
2981
- position: absolute;
2982
- top: var(--dds-spacing-x0-5);
2977
+ .InlineEdit_edit-icon {
2983
2978
  left: var(--dds-spacing-x0-5);
2979
+ pointer-events: none;
2984
2980
  z-index: var(--dds-zindex-absolute-element);
2985
- &:hover {
2986
- cursor: text;
2987
- }
2988
2981
  }
2989
2982
  .InlineEdit_chevron {
2990
- position: absolute;
2991
2983
  right: var(--dds-spacing-x0-25);
2992
- transform: translateY(50%);
2993
2984
  pointer-events: none;
2994
2985
  }
2995
2986
  .InlineEdit_clear-button {
2996
- position: absolute;
2997
2987
  right: calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-small));
2998
- transform: translateY(50%);
2999
2988
  }
3000
2989
 
3001
2990
  /* src/components/InternalHeader/InternalHeader.module.css */
@@ -3333,6 +3322,12 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
3333
3322
  background-color: var(--dds-color-surface-field-disabled);
3334
3323
  }
3335
3324
  }
3325
+ .NativeSelect_select--with-clear-button-small {
3326
+ padding-right: var(--dds-spacing-x3);
3327
+ }
3328
+ .NativeSelect_select--with-clear-button-medium {
3329
+ padding-right: var(--dds-spacing-x4);
3330
+ }
3336
3331
  .NativeSelect_icon {
3337
3332
  position: absolute;
3338
3333
  top: 50%;
@@ -3340,6 +3335,12 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
3340
3335
  align-self: center;
3341
3336
  pointer-events: none;
3342
3337
  }
3338
+ .NativeSelect_clear-button--small {
3339
+ right: calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-small));
3340
+ }
3341
+ .NativeSelect_clear-button--medium {
3342
+ right: calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium));
3343
+ }
3343
3344
 
3344
3345
  /* src/components/PhoneInput/PhoneInput.module.css */
3345
3346
  .PhoneInput_inputs-container {
@@ -3413,8 +3414,8 @@ input[data-indeterminate=true] ~ .SelectionControl_selection-control:after {
3413
3414
  margin-bottom: -1px;
3414
3415
  }
3415
3416
  }
3416
- select:focus-visible,
3417
- select:hover {
3417
+ .PhoneInput_select:focus-visible,
3418
+ .PhoneInput_select:hover {
3418
3419
  z-index: var(--dds-zindex-absolute-element);
3419
3420
  & ~ svg {
3420
3421
  z-index: var(--dds-zindex-absolute-element);
@@ -3616,9 +3617,6 @@ select:hover {
3616
3617
  left: var(--dds-spacing-x0-75);
3617
3618
  }
3618
3619
  .Search_clear-button {
3619
- position: absolute;
3620
- top: 50%;
3621
- transform: translate(0, -50%);
3622
3620
  right: var(--dds-spacing-x1);
3623
3621
  }
3624
3622
  .Search_suggestions {