@norges-domstoler/dds-components 0.0.0-dev-20240619134110 → 0.0.0-dev-20240705105230

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
@@ -474,7 +474,6 @@
474
474
  text-transform: none;
475
475
  }
476
476
  .utilStyles_hide-input {
477
- -webkit-clip-path: rect(0 0 0 0);
478
477
  clip-path: rect(0 0 0 0);
479
478
  position: absolute;
480
479
  height: 1px;
@@ -528,7 +527,6 @@
528
527
  inset-inline-start: 0px;
529
528
  overflow: hidden;
530
529
  clip: rect(0, 0, 0, 0);
531
- -webkit-clip-path: inset(50%);
532
530
  clip-path: inset(50%);
533
531
  border: 0px;
534
532
  }
@@ -633,28 +631,26 @@
633
631
  -webkit-appearance: textfield;
634
632
  &:enabled:-moz-read-only {
635
633
  box-shadow: none;
636
- border: none;
637
- outline: none;
634
+ border: 1px solid var(--dds-color-border-default);
635
+ background-color: var(--dds-color-surface-field-disabled);
636
+ color: var(--dds-color-text-medium);
638
637
  cursor: default;
639
- background-color: transparent;
640
- padding-left: 0;
641
- padding-top: var(--dds-spacing-x0-125);
642
638
  }
643
639
  &:not(.Input_disabled).Input_read-only,
644
640
  &:enabled:read-only {
645
641
  box-shadow: none;
646
- border: none;
647
- outline: none;
642
+ border: 1px solid var(--dds-color-border-default);
643
+ background-color: var(--dds-color-surface-field-disabled);
644
+ color: var(--dds-color-text-medium);
648
645
  cursor: default;
649
- background-color: transparent;
650
- padding-left: 0;
651
- padding-top: var(--dds-spacing-x0-125);
652
646
  }
653
647
  &.Input_disabled,
654
648
  &:disabled {
655
- cursor: not-allowed;
656
- color: var(--dds-color-text-medium);
649
+ box-shadow: none;
650
+ border: 1px solid var(--dds-color-border-subtle);
657
651
  background-color: var(--dds-color-surface-field-disabled);
652
+ color: var(--dds-color-text-subtle);
653
+ cursor: not-allowed;
658
654
  }
659
655
  }
660
656
  :where(.Input_input--hover:hover) {
@@ -778,6 +774,18 @@
778
774
  flex-shrink: 0;
779
775
  }
780
776
 
777
+ /* src/components/Typography/Label/Label.module.css */
778
+ .Label_read-only {
779
+ display: flex;
780
+ }
781
+ .Label_read-only__icon {
782
+ align-self: center;
783
+ flex-shrink: 0;
784
+ margin-inline-end: var(--dds-spacing-x0-125);
785
+ width: 1.25em;
786
+ height: 1.25em;
787
+ }
788
+
781
789
  /* src/components/helpers/Paper/Paper.module.css */
782
790
  .Paper_container {
783
791
  box-sizing: border-box;
@@ -1049,9 +1057,6 @@
1049
1057
  min-width: 180px;
1050
1058
  max-width: 300px;
1051
1059
  box-shadow: var(--dds-shadow-1-onlight);
1052
- .OverflowMenu_divider {
1053
- margin-block: var(--dds-spacing-x0-75);
1054
- }
1055
1060
  }
1056
1061
  .OverflowMenu_list {
1057
1062
  display: flex;
@@ -1064,7 +1069,7 @@
1064
1069
  color: var(--dds-color-text-default);
1065
1070
  background-color: var(--dds-color-surface-default);
1066
1071
  text-decoration: none;
1067
- padding: var(--dds-spacing-x0-75) var(--dds-spacing-x1);
1072
+ padding: var(--dds-spacing-x0-75);
1068
1073
  gap: var(--dds-spacing-x0-25);
1069
1074
  }
1070
1075
  .OverflowMenu_list__item--link {
@@ -1090,11 +1095,16 @@
1090
1095
  font-size: var(--dds-font-body-sans-01-line-height);
1091
1096
  }
1092
1097
  .OverflowMenu_divider {
1093
- margin-inline: var(--dds-spacing-x1);
1098
+ margin-inline: var(--dds-spacing-x0-5);
1099
+ margin-block: var(--dds-spacing-x0);
1100
+ }
1101
+ .OverflowMenu_group-header {
1102
+ padding-inline: var(--dds-spacing-x0-75);
1103
+ padding-block-start: var(--dds-spacing-x0-75);
1094
1104
  }
1095
1105
 
1096
1106
  /* src/components/Divider/Divider.module.css */
1097
- .Divider_divider {
1107
+ :where(.Divider_divider) {
1098
1108
  border: 0;
1099
1109
  background-color: transparent;
1100
1110
  border-top: 1px solid;
@@ -1300,7 +1310,7 @@
1300
1310
  width: max-content;
1301
1311
  font-variant-numeric: tabular-nums;
1302
1312
  outline: none;
1303
- &:focus:not([aria-readonly]) {
1313
+ &:focus {
1304
1314
  background-color: var(--dds-color-surface-action-selected);
1305
1315
  color: var(--dds-color-text-on-action);
1306
1316
  }
@@ -1310,7 +1320,7 @@
1310
1320
  width: 100%;
1311
1321
  font-variant-numeric: tabular-nums;
1312
1322
  pointer-events: none;
1313
- .DateInput_segment:focus:not([aria-readonly]) & {
1323
+ .DateInput_segment:focus & {
1314
1324
  color: var(--dds-color-text-on-action);
1315
1325
  }
1316
1326
  }
@@ -1325,7 +1335,13 @@
1325
1335
  justify-content: center;
1326
1336
  margin-inline: -1px 0;
1327
1337
  padding: var(--dds-spacing-x0-25);
1328
- color: var(--dds-color-text-default);
1338
+ color: var(--dds-color-icon-default);
1339
+ }
1340
+ .DateInput_icon-wrapper--disabled {
1341
+ color: var(--dds-color-icon-subtle);
1342
+ }
1343
+ .DateInput_icon-wrapper--readonly {
1344
+ color: var(--dds-color-icon-medium);
1329
1345
  }
1330
1346
  .DateInput_icon-wrapper--small {
1331
1347
  margin-block: calc(0px - var(--dds-icon-size-medium));
@@ -1352,6 +1368,9 @@
1352
1368
  color: var(--dds-color-text-subtle);
1353
1369
  }
1354
1370
  }
1371
+ .DateInput_popover-button--readonly:disabled {
1372
+ color: var(--dds-color-text-medium);
1373
+ }
1355
1374
  .DateInput_popover {
1356
1375
  z-index: 100;
1357
1376
  border-radius: var(--dds-border-radius-1);
@@ -2340,6 +2359,9 @@
2340
2359
  .Select_container--disabled {
2341
2360
  cursor: not-allowed;
2342
2361
  }
2362
+ .Select_container--readonly {
2363
+ cursor: default;
2364
+ }
2343
2365
  .Select_inner-single-value {
2344
2366
  overflow: hidden;
2345
2367
  text-overflow: ellipsis;
@@ -2352,16 +2374,16 @@
2352
2374
  margin-left: -1px;
2353
2375
  }
2354
2376
  .Select_control {
2355
- &:hover .Select_dropdown-indicator,
2377
+ &:hover:not(.Select_control--readonly) .Select_dropdown-indicator,
2356
2378
  &:focus-within .Select_dropdown-indicator {
2357
2379
  color: var(--dds-color-icon-action-hover);
2358
2380
  }
2359
- &.Select_control--readonly .Select_dropdown-indicator {
2360
- color: transparent;
2361
- }
2362
- &.Select_control--disabled .Select_dropdown-indicator {
2363
- color: transparent;
2364
- }
2381
+ }
2382
+ .Select_control--readonly .Select_dropdown-indicator {
2383
+ pointer-events: none;
2384
+ }
2385
+ .Select_control--disabled .Select_dropdown-indicator {
2386
+ pointer-events: none;
2365
2387
  }
2366
2388
 
2367
2389
  /* src/components/Select/NativeSelect/NativeSelect.module.css */
@@ -2385,14 +2407,21 @@
2385
2407
  }
2386
2408
  &:disabled {
2387
2409
  cursor: not-allowed;
2388
- color: var(--dds-color-text-medium);
2410
+ color: var(--dds-color-text-subtle);
2389
2411
  background-color: var(--dds-color-surface-field-disabled);
2412
+ border-color: var(--dds-color-border-subtle);
2413
+ + svg {
2414
+ color: var(--dds-color-icon-subtle);
2415
+ }
2390
2416
  }
2391
2417
  option {
2392
2418
  background-color: var(--dds-color-surface-default);
2393
2419
  &:hover {
2394
2420
  background-color: var(--dds-color-surface-hover-default);
2395
2421
  }
2422
+ @media (prefers-reduced-motion: no-preference) {
2423
+ transition: background-color 0.2s;
2424
+ }
2396
2425
  }
2397
2426
  optgroup {
2398
2427
  font-weight: normal;
@@ -2401,13 +2430,13 @@
2401
2430
  }
2402
2431
  .NativeSelect_select--readonly {
2403
2432
  box-shadow: none;
2404
- pointer-events: none;
2405
- border: none;
2406
2433
  outline: none;
2407
2434
  cursor: default;
2408
- background-color: transparent;
2409
- padding-left: 0;
2410
- padding-top: var(--dds-spacing-x0-125);
2435
+ color: var(--dds-color-text-subtle);
2436
+ background-color: var(--dds-color-surface-field-disabled);
2437
+ + svg {
2438
+ color: var(--dds-color-icon-subtle);
2439
+ }
2411
2440
  }
2412
2441
  .NativeSelect_select--medium {
2413
2442
  height: calc(1.5em + var(--dds-spacing-x0-75) + var(--dds-spacing-x0-75) + 2px);
@@ -2421,6 +2450,12 @@
2421
2450
  height: calc(1.5em + var(--dds-spacing-x0-25) + var(--dds-spacing-x0-25) + 2px);
2422
2451
  padding-right: var(--dds-spacing-x1);
2423
2452
  }
2453
+ .NativeSelect_select--multiple {
2454
+ padding-right: 0;
2455
+ &.NativeSelect_select--readonly option {
2456
+ background-color: var(--dds-color-surface-field-disabled);
2457
+ }
2458
+ }
2424
2459
  .NativeSelect_icon {
2425
2460
  position: absolute;
2426
2461
  top: 50%;
@@ -2677,7 +2712,7 @@
2677
2712
  var(--dds-focus-transition);
2678
2713
  }
2679
2714
  }
2680
- &:hover input:enabled:not(:checked) ~ .SelectionControl_selection-control {
2715
+ &:hover:not(.SelectionControl_label--readonly) input:enabled:not(:checked) ~ .SelectionControl_selection-control {
2681
2716
  background-color: var(--dds-color-surface-hover-default);
2682
2717
  box-shadow: inset 0 0 0 1px var(--dds-color-border-action-hover);
2683
2718
  border-color: var(--dds-color-border-action-hover);
@@ -2687,8 +2722,13 @@
2687
2722
  border-color: var(--dds-color-surface-action-selected);
2688
2723
  background-color: var(--dds-color-surface-action-selected);
2689
2724
  }
2690
- &:hover input:checked:enabled[type=checkbox] ~ .SelectionControl_selection-control,
2691
- &:hover input:enabled[data-indeterminate=true] ~ .SelectionControl_selection-control {
2725
+ &.SelectionControl_label--readonly input:checked:enabled ~ .SelectionControl_selection-control,
2726
+ &.SelectionControl_label--readonly input:enabled[data-indeterminate=true] ~ .SelectionControl_selection-control {
2727
+ border-color: var(--dds-color-surface-action-selected-disabled);
2728
+ background-color: var(--dds-color-surface-action-selected-disabled);
2729
+ }
2730
+ &:hover:not(.SelectionControl_label--readonly) input:checked:enabled[type=checkbox] ~ .SelectionControl_selection-control,
2731
+ &:hover:not(.SelectionControl_label--readonly) input:enabled[data-indeterminate=true] ~ .SelectionControl_selection-control {
2692
2732
  background-color: var(--dds-color-surface-action-hover);
2693
2733
  border-color: var(--dds-color-surface-action-hover);
2694
2734
  }
@@ -2740,6 +2780,7 @@
2740
2780
  }
2741
2781
  .SelectionControl_label--readonly {
2742
2782
  cursor: default;
2783
+ color: var(--dds-color-text-medium);
2743
2784
  input ~ .SelectionControl_selection-control {
2744
2785
  border-color: var(--dds-color-border-default);
2745
2786
  background-color: var(--dds-color-surface-field-disabled);
@@ -3119,7 +3160,14 @@
3119
3160
  }
3120
3161
 
3121
3162
  /* src/components/TextInput/TextInput.module.css */
3122
- .TextInput_container--medium {
3163
+ .TextInput_container {
3164
+ color: var(--dds-color-text-default);
3165
+ }
3166
+ .TextInput_container--readonly {
3167
+ color: var(--dds-color-text-medium);
3168
+ }
3169
+ .TextInput_container--disabled {
3170
+ color: var(--dds-color-text-subtle);
3123
3171
  }
3124
3172
  .TextInput_container--tiny {
3125
3173
  width: 210px;
@@ -3149,7 +3197,6 @@
3149
3197
  .TextInput_icon {
3150
3198
  position: absolute;
3151
3199
  z-index: 1;
3152
- color: var(--dds-color-icon-default);
3153
3200
  }
3154
3201
  .TextInput_icon--medium {
3155
3202
  left: var(--dds-spacing-x0-75);
@@ -3175,28 +3222,21 @@
3175
3222
  align-items: center;
3176
3223
  pointer-events: none;
3177
3224
  z-index: 1;
3178
- &.TextInput_prefix {
3179
- left: 0;
3180
- margin-left: 8px;
3181
- padding-right: 8px;
3182
- border-right: 1px solid var(--dds-color-border-default);
3183
- }
3184
- &.TextInput_suffix {
3185
- right: 0;
3186
- margin-right: 8px;
3187
- padding-left: 8px;
3188
- border-left: 1px solid var(--dds-color-border-default);
3189
- }
3190
- &.TextInput_prefix--readonly {
3191
- margin-left: 0;
3192
- padding-right: 0.5ch;
3193
- border-right: none;
3194
- }
3195
- &.TextInput_suffix--readonly {
3196
- margin-right: 0;
3197
- padding-left: 0.5ch;
3198
- border-left: none;
3199
- }
3225
+ }
3226
+ .TextInput_prefix {
3227
+ left: 0;
3228
+ margin-left: 8px;
3229
+ padding-right: 8px;
3230
+ border-right: 1px solid var(--dds-color-border-default);
3231
+ }
3232
+ .TextInput_suffix {
3233
+ right: 0;
3234
+ margin-right: 8px;
3235
+ padding-left: 8px;
3236
+ border-left: 1px solid var(--dds-color-border-default);
3237
+ }
3238
+ .TextInput_affix--disabled {
3239
+ border-color: var(--dds-color-border-subtle);
3200
3240
  }
3201
3241
  .TextInput_message-container {
3202
3242
  display: flex;