@norges-domstoler/dds-components 0.0.0-dev-20240916102541 → 0.0.0-dev-20240917124410

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.js CHANGED
@@ -3390,12 +3390,14 @@ function slice(begin, end) {
3390
3390
  }
3391
3391
  function token(type) {
3392
3392
  switch (type) {
3393
+ // \0 \t \n \r \s whitespace token
3393
3394
  case 0:
3394
3395
  case 9:
3395
3396
  case 10:
3396
3397
  case 13:
3397
3398
  case 32:
3398
3399
  return 5;
3400
+ // ! + , / > @ ~ isolate token
3399
3401
  case 33:
3400
3402
  case 43:
3401
3403
  case 44:
@@ -3403,17 +3405,21 @@ function token(type) {
3403
3405
  case 62:
3404
3406
  case 64:
3405
3407
  case 126:
3408
+ // ; { } breakpoint token
3406
3409
  case 59:
3407
3410
  case 123:
3408
3411
  case 125:
3409
3412
  return 4;
3413
+ // : accompanied token
3410
3414
  case 58:
3411
3415
  return 3;
3416
+ // " ' ( [ opening delimit token
3412
3417
  case 34:
3413
3418
  case 39:
3414
3419
  case 40:
3415
3420
  case 91:
3416
3421
  return 2;
3422
+ // ) ] closing delimit token
3417
3423
  case 41:
3418
3424
  case 93:
3419
3425
  return 1;
@@ -3446,17 +3452,21 @@ function escaping(index, count) {
3446
3452
  function delimiter(type) {
3447
3453
  while (next())
3448
3454
  switch (character) {
3455
+ // ] ) " '
3449
3456
  case type:
3450
3457
  return position;
3458
+ // " '
3451
3459
  case 34:
3452
3460
  case 39:
3453
3461
  if (type !== 34 && type !== 39)
3454
3462
  delimiter(character);
3455
3463
  break;
3464
+ // (
3456
3465
  case 40:
3457
3466
  if (type === 41)
3458
3467
  delimiter(type);
3459
3468
  break;
3469
+ // \
3460
3470
  case 92:
3461
3471
  next();
3462
3472
  break;
@@ -3499,26 +3509,31 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
3499
3509
  var characters2 = type;
3500
3510
  while (scanning)
3501
3511
  switch (previous = character2, character2 = next()) {
3512
+ // (
3502
3513
  case 40:
3503
3514
  if (previous != 108 && charat(characters2, length2 - 1) == 58) {
3504
3515
  if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs(index ? points[index - 1] : 0)) != -1)
3505
3516
  ampersand = -1;
3506
3517
  break;
3507
3518
  }
3519
+ // " ' [
3508
3520
  case 34:
3509
3521
  case 39:
3510
3522
  case 91:
3511
3523
  characters2 += delimit(character2);
3512
3524
  break;
3525
+ // \t \n \r \s
3513
3526
  case 9:
3514
3527
  case 10:
3515
3528
  case 13:
3516
3529
  case 32:
3517
3530
  characters2 += whitespace(previous);
3518
3531
  break;
3532
+ // \
3519
3533
  case 92:
3520
3534
  characters2 += escaping(caret() - 1, 7);
3521
3535
  continue;
3536
+ // /
3522
3537
  case 47:
3523
3538
  switch (peek()) {
3524
3539
  case 42:
@@ -3529,22 +3544,28 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
3529
3544
  characters2 += "/";
3530
3545
  }
3531
3546
  break;
3547
+ // {
3532
3548
  case 123 * variable:
3533
3549
  points[index++] = strlen(characters2) * ampersand;
3550
+ // } ; \0
3534
3551
  case 125 * variable:
3535
3552
  case 59:
3536
3553
  case 0:
3537
3554
  switch (character2) {
3555
+ // \0 }
3538
3556
  case 0:
3539
3557
  case 125:
3540
3558
  scanning = 0;
3559
+ // ;
3541
3560
  case 59 + offset:
3542
3561
  if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
3543
3562
  if (property > 0 && strlen(characters2) - length2)
3544
3563
  append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1, declarations) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2, declarations), declarations);
3545
3564
  break;
3565
+ // @ ;
3546
3566
  case 59:
3547
3567
  characters2 += ";";
3568
+ // { rule/at-rule
3548
3569
  default:
3549
3570
  append(reference = ruleset(characters2, root, parent, index, offset, rules, points, type, props = [], children = [], length2, rulesets), rulesets);
3550
3571
  if (character2 === 123)
@@ -3552,6 +3573,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
3552
3573
  parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
3553
3574
  else
3554
3575
  switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
3576
+ // d l m s
3555
3577
  case 100:
3556
3578
  case 108:
3557
3579
  case 109:
@@ -3564,6 +3586,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
3564
3586
  }
3565
3587
  index = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
3566
3588
  break;
3589
+ // :
3567
3590
  case 58:
3568
3591
  length2 = 1 + strlen(characters2), property = previous;
3569
3592
  default:
@@ -3574,17 +3597,21 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
3574
3597
  continue;
3575
3598
  }
3576
3599
  switch (characters2 += from(character2), character2 * variable) {
3600
+ // &
3577
3601
  case 38:
3578
3602
  ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
3579
3603
  break;
3604
+ // ,
3580
3605
  case 44:
3581
3606
  points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
3582
3607
  break;
3608
+ // @
3583
3609
  case 64:
3584
3610
  if (peek() === 45)
3585
3611
  characters2 += delimit(next());
3586
3612
  atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;
3587
3613
  break;
3614
+ // -
3588
3615
  case 45:
3589
3616
  if (previous === 45 && strlen(characters2) == 2)
3590
3617
  variable = 0;
@@ -3612,8 +3639,10 @@ function declaration(value, root, parent, length2, siblings) {
3612
3639
  // ../../node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Prefixer.js
3613
3640
  function prefix(value, length2, children) {
3614
3641
  switch (hash(value, length2)) {
3642
+ // color-adjust
3615
3643
  case 5103:
3616
3644
  return WEBKIT + "print-" + value + value;
3645
+ // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
3617
3646
  case 5737:
3618
3647
  case 4201:
3619
3648
  case 3177:
@@ -3621,18 +3650,21 @@ function prefix(value, length2, children) {
3621
3650
  case 1641:
3622
3651
  case 4457:
3623
3652
  case 2921:
3653
+ // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
3624
3654
  case 5572:
3625
3655
  case 6356:
3626
3656
  case 5844:
3627
3657
  case 3191:
3628
3658
  case 6645:
3629
3659
  case 3005:
3660
+ // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
3630
3661
  case 6391:
3631
3662
  case 5879:
3632
3663
  case 5623:
3633
3664
  case 6135:
3634
3665
  case 4599:
3635
3666
  case 4855:
3667
+ // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
3636
3668
  case 4215:
3637
3669
  case 6389:
3638
3670
  case 5109:
@@ -3640,56 +3672,77 @@ function prefix(value, length2, children) {
3640
3672
  case 5621:
3641
3673
  case 3829:
3642
3674
  return WEBKIT + value + value;
3675
+ // tab-size
3643
3676
  case 4789:
3644
3677
  return MOZ + value + value;
3678
+ // appearance, user-select, transform, hyphens, text-size-adjust
3645
3679
  case 5349:
3646
3680
  case 4246:
3647
3681
  case 4810:
3648
3682
  case 6968:
3649
3683
  case 2756:
3650
3684
  return WEBKIT + value + MOZ + value + MS + value + value;
3685
+ // writing-mode
3651
3686
  case 5936:
3652
3687
  switch (charat(value, length2 + 11)) {
3688
+ // vertical-l(r)
3653
3689
  case 114:
3654
3690
  return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
3691
+ // vertical-r(l)
3655
3692
  case 108:
3656
3693
  return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
3694
+ // horizontal(-)tb
3657
3695
  case 45:
3658
3696
  return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
3659
3697
  }
3698
+ // flex, flex-direction, scroll-snap-type, writing-mode
3660
3699
  case 6828:
3661
3700
  case 4268:
3662
3701
  case 2903:
3663
3702
  return WEBKIT + value + MS + value + value;
3703
+ // order
3664
3704
  case 6165:
3665
3705
  return WEBKIT + value + MS + "flex-" + value + value;
3706
+ // align-items
3666
3707
  case 5187:
3667
3708
  return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
3709
+ // align-self
3668
3710
  case 5443:
3669
3711
  return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/g, "") + (!match(value, /flex-|baseline/) ? MS + "grid-row-" + replace(value, /flex-|-self/g, "") : "") + value;
3712
+ // align-content
3670
3713
  case 4675:
3671
3714
  return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/g, "") + value;
3715
+ // flex-shrink
3672
3716
  case 5548:
3673
3717
  return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
3718
+ // flex-basis
3674
3719
  case 5292:
3675
3720
  return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
3721
+ // flex-grow
3676
3722
  case 6060:
3677
3723
  return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
3724
+ // transition
3678
3725
  case 4554:
3679
3726
  return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
3727
+ // cursor
3680
3728
  case 6187:
3681
3729
  return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
3730
+ // background, background-image
3682
3731
  case 5495:
3683
3732
  case 3959:
3684
3733
  return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
3734
+ // justify-content
3685
3735
  case 4968:
3686
3736
  return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
3737
+ // justify-self
3687
3738
  case 4200:
3688
3739
  if (!match(value, /flex-|baseline/)) return MS + "grid-column-align" + substr(value, length2) + value;
3689
3740
  break;
3741
+ // grid-template-(columns|rows)
3690
3742
  case 2592:
3691
3743
  case 3360:
3692
3744
  return MS + replace(value, "template-", "") + value;
3745
+ // grid-(row|column)-start
3693
3746
  case 4384:
3694
3747
  case 3616:
3695
3748
  if (children && children.some(function(element, index) {
@@ -3698,16 +3751,19 @@ function prefix(value, length2, children) {
3698
3751
  return ~indexof(value + (children = children[length2].value), "span", 0) ? value : MS + replace(value, "-start", "") + value + MS + "grid-row-span:" + (~indexof(children, "span", 0) ? match(children, /\d+/) : +match(children, /\d+/) - +match(value, /\d+/)) + ";";
3699
3752
  }
3700
3753
  return MS + replace(value, "-start", "") + value;
3754
+ // grid-(row|column)-end
3701
3755
  case 4896:
3702
3756
  case 4128:
3703
3757
  return children && children.some(function(element) {
3704
3758
  return match(element.props, /grid-\w+-start/);
3705
3759
  }) ? value : MS + replace(replace(value, "-end", "-span"), "span ", "") + value;
3760
+ // (margin|padding)-inline-(start|end)
3706
3761
  case 4095:
3707
3762
  case 3583:
3708
3763
  case 4068:
3709
3764
  case 2532:
3710
3765
  return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
3766
+ // (min|max)?(width|height|inline-size|block-size)
3711
3767
  case 8116:
3712
3768
  case 7059:
3713
3769
  case 5753:
@@ -3722,32 +3778,41 @@ function prefix(value, length2, children) {
3722
3778
  case 4765:
3723
3779
  if (strlen(value) - 1 - length2 > 6)
3724
3780
  switch (charat(value, length2 + 1)) {
3781
+ // (m)ax-content, (m)in-content
3725
3782
  case 109:
3726
3783
  if (charat(value, length2 + 4) !== 45)
3727
3784
  break;
3785
+ // (f)ill-available, (f)it-content
3728
3786
  case 102:
3729
3787
  return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
3788
+ // (s)tretch
3730
3789
  case 115:
3731
3790
  return ~indexof(value, "stretch", 0) ? prefix(replace(value, "stretch", "fill-available"), length2, children) + value : value;
3732
3791
  }
3733
3792
  break;
3793
+ // grid-(column|row)
3734
3794
  case 5152:
3735
3795
  case 5920:
3736
3796
  return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a2, b, c2, d, e, f2) {
3737
3797
  return MS + a2 + ":" + b + f2 + (c2 ? MS + a2 + "-span:" + (d ? e : +e - +b) + f2 : "") + value;
3738
3798
  });
3799
+ // position: sticky
3739
3800
  case 4949:
3740
3801
  if (charat(value, length2 + 6) === 121)
3741
3802
  return replace(value, ":", ":" + WEBKIT) + value;
3742
3803
  break;
3804
+ // display: (flex|inline-flex|grid|inline-grid)
3743
3805
  case 6444:
3744
3806
  switch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {
3807
+ // (inline-)?fle(x)
3745
3808
  case 120:
3746
3809
  return replace(value, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
3810
+ // (inline-)?gri(d)
3747
3811
  case 100:
3748
3812
  return replace(value, ":", ":" + MS) + value;
3749
3813
  }
3750
3814
  break;
3815
+ // scroll-margin, scroll-margin-(top|right|bottom|left)
3751
3816
  case 5719:
3752
3817
  case 2647:
3753
3818
  case 2135:
@@ -3813,12 +3878,14 @@ function prefixer(element, index, children, callback) {
3813
3878
  if (element.length)
3814
3879
  return combine(children = element.props, function(value) {
3815
3880
  switch (match(value, callback = /(::plac\w+|:read-\w+)/)) {
3881
+ // :read-(only|write)
3816
3882
  case ":read-only":
3817
3883
  case ":read-write":
3818
3884
  lift(copy(element, { props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")] }));
3819
3885
  lift(copy(element, { props: [value] }));
3820
3886
  assign(element, { props: filter(children, callback) });
3821
3887
  break;
3888
+ // :placeholder
3822
3889
  case "::placeholder":
3823
3890
  lift(copy(element, { props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")] }));
3824
3891
  lift(copy(element, { props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")] }));