@fremtind/jokul 4.1.4 → 4.2.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.
Files changed (52) hide show
  1. package/build/build-stats.html +1 -1
  2. package/build/cjs/components/help/Help.cjs +1 -1
  3. package/build/cjs/components/help/Help.cjs.map +1 -1
  4. package/build/cjs/components/help/Help.d.cts +1 -1
  5. package/build/cjs/components/help/index.cjs +1 -1
  6. package/build/cjs/components/help/index.d.cts +1 -1
  7. package/build/cjs/components/help/types.d.cts +4 -0
  8. package/build/cjs/core/tokens.cjs +1 -1
  9. package/build/cjs/core/tokens.cjs.map +1 -1
  10. package/build/es/components/help/Help.d.ts +1 -1
  11. package/build/es/components/help/Help.js +1 -1
  12. package/build/es/components/help/Help.js.map +1 -1
  13. package/build/es/components/help/index.d.ts +1 -1
  14. package/build/es/components/help/index.js +1 -1
  15. package/build/es/components/help/types.d.ts +4 -0
  16. package/build/es/core/tokens.js +1 -1
  17. package/build/es/core/tokens.js.map +1 -1
  18. package/package.json +1 -1
  19. package/src/tailwind/v4/jokul-tailwind.css +4 -4
  20. package/styles/components/countdown/countdown.css +2 -2
  21. package/styles/components/countdown/countdown.min.css +1 -1
  22. package/styles/components/feedback/feedback.css +2 -2
  23. package/styles/components/feedback/feedback.min.css +1 -1
  24. package/styles/components/file-input/file-input.css +9 -9
  25. package/styles/components/file-input/file-input.min.css +1 -1
  26. package/styles/components/help/help.css +19 -13
  27. package/styles/components/help/help.min.css +1 -1
  28. package/styles/components/help/help.scss +21 -13
  29. package/styles/components/input-group/_labels.scss +12 -19
  30. package/styles/components/input-group/input-group.css +10 -13
  31. package/styles/components/input-group/input-group.min.css +1 -1
  32. package/styles/components/loader/loader.css +6 -6
  33. package/styles/components/loader/loader.min.css +1 -1
  34. package/styles/components/loader/skeleton-loader.css +3 -3
  35. package/styles/components/loader/skeleton-loader.min.css +1 -1
  36. package/styles/components/message/message.css +2 -2
  37. package/styles/components/message/message.min.css +1 -1
  38. package/styles/components/progress-bar/progress-bar.css +1 -1
  39. package/styles/components/progress-bar/progress-bar.min.css +1 -1
  40. package/styles/components/segmented-control/segmented-control.css +10 -13
  41. package/styles/components/segmented-control/segmented-control.min.css +1 -1
  42. package/styles/components/system-message/system-message.css +2 -2
  43. package/styles/components/system-message/system-message.min.css +1 -1
  44. package/styles/components/toast/toast.css +4 -4
  45. package/styles/components/toast/toast.min.css +1 -1
  46. package/styles/core/core.css +6 -6
  47. package/styles/core/core.min.css +1 -1
  48. package/styles/core/jkl/_typography.scss +2 -2
  49. package/styles/core/jkl/legacy/_tokens.scss +4 -4
  50. package/styles/core/theme/_legacy-tokens.scss +4 -4
  51. package/styles/styles.css +51 -48
  52. package/styles/styles.min.css +2 -2
package/styles/styles.css CHANGED
@@ -434,8 +434,7 @@
434
434
  .jkl-form-support-label {
435
435
  --jkl-form-support-label-margin: var(--jkl-unit-10) 0 0;
436
436
  --jkl-form-support-label-icon-size: 1.25rem;
437
- --jkl-form-support-label-icon-margin: 0 -1.25rem -0.375rem
438
- 0;
437
+ --jkl-form-support-label-icon-margin: 0 -1.25rem -0.375rem 0;
439
438
  --color: var(--jkl-color-text-subdued);
440
439
  font-size: var(--jkl-font-size-2);
441
440
  line-height: var(--jkl-line-height-tight);
@@ -468,7 +467,7 @@
468
467
  --color: var(--jkl-color-text-default);
469
468
  }
470
469
  .jkl-form-support-label--error .jkl-form-support-label__icon, .jkl-form-support-label--warning .jkl-form-support-label__icon, .jkl-form-support-label--success .jkl-form-support-label__icon {
471
- animation: 400ms cubic-bezier(0, 0, 0.3, 1) 250ms jkl-support-icon-entrance-uisbn1v forwards;
470
+ animation: 400ms cubic-bezier(0, 0, 0.3, 1) 250ms jkl-support-icon-entrance-usuwc1w forwards;
472
471
  }
473
472
  .jkl-form-support-label--sr-only {
474
473
  border: 0 !important;
@@ -483,33 +482,27 @@
483
482
  white-space: nowrap !important; /* 3 */
484
483
  }
485
484
  .jkl-label {
486
- --jkl-label-small-margin: 0 0 var(--jkl-unit-15) 0;
487
- --jkl-label-medium-margin: 0 0 var(--jkl-unit-20) 0;
488
- --jkl-label-large-margin: 0 0 var(--jkl-unit-30) -0.0625rem;
489
485
  display: block;
490
- margin-left: initial;
486
+ margin: 0 0 var(--jkl-spacing-8) 0;
491
487
  color: var(--jkl-color-text-default);
492
488
  }
493
489
  .jkl-label--small {
494
- font-size: var(--jkl-font-size-2);
490
+ font-size: var(--jkl-font-size-3);
495
491
  line-height: var(--jkl-line-height-tight);
496
492
  font-weight: 400;
497
493
  --jkl-icon-weight: 300;
498
- margin: var(--jkl-label-small-margin);
499
494
  }
500
495
  .jkl-label--medium {
501
496
  font-size: var(--jkl-font-size-3);
502
497
  line-height: var(--jkl-line-height-tight);
503
498
  font-weight: 400;
504
499
  --jkl-icon-weight: 300;
505
- margin: var(--jkl-label-medium-margin);
506
500
  }
507
501
  .jkl-label--large {
508
502
  font-size: var(--jkl-font-size-5);
509
503
  line-height: var(--jkl-line-height-tight);
510
504
  font-weight: 400;
511
505
  --jkl-icon-weight: 300;
512
- margin: var(--jkl-label-large-margin);
513
506
  }
514
507
  .jkl-label--sr-only {
515
508
  border: 0 !important;
@@ -523,8 +516,12 @@
523
516
  width: 1px !important;
524
517
  white-space: nowrap !important; /* 3 */
525
518
  }
519
+ .jkl-label .jkl-help {
520
+ position: relative;
521
+ top: -0.1ex;
522
+ }
526
523
  .jkl-input-group-description {
527
- font-size: var(--jkl-font-size-3);
524
+ font-size: var(--jkl-font-size-2);
528
525
  line-height: var(--jkl-line-height-tight);
529
526
  font-weight: 400;
530
527
  --jkl-icon-weight: 300;
@@ -536,7 +533,7 @@
536
533
  .jkl-label:has(+ .jkl-input-group-description) {
537
534
  margin-block-end: var(--jkl-spacing-4);
538
535
  }
539
- @keyframes jkl-support-icon-entrance-uisbn1v {
536
+ @keyframes jkl-support-icon-entrance-usuwc1w {
540
537
  0% {
541
538
  margin-right: 0;
542
539
  opacity: 0;
@@ -888,22 +885,22 @@
888
885
  animation: 2500ms linear infinite;
889
886
  }
890
887
  .jkl-loader__dot--left {
891
- animation-name: jkl-loader-left-spin-uisbn2n;
888
+ animation-name: jkl-loader-left-spin-usuwc2n;
892
889
  margin-right: calc(var(--jkl-loader-spacing) * 0.9);
893
890
  }
894
891
  .jkl-loader__dot--middle {
895
- animation-name: jkl-loader-middle-spin-uisbn3a;
892
+ animation-name: jkl-loader-middle-spin-usuwc2o;
896
893
  margin-right: var(--jkl-loader-spacing);
897
894
  }
898
895
  .jkl-loader__dot--right {
899
- animation-name: jkl-loader-right-spin-uisbn3o;
896
+ animation-name: jkl-loader-right-spin-usuwc39;
900
897
  }
901
898
  @media screen and (forced-colors: active) {
902
899
  .jkl-loader__dot {
903
900
  background-color: CanvasText;
904
901
  }
905
902
  }
906
- @keyframes jkl-loader-left-spin-uisbn2n {
903
+ @keyframes jkl-loader-left-spin-usuwc2n {
907
904
  0% {
908
905
  transform: rotate(0) scale(0);
909
906
  }
@@ -917,7 +914,7 @@
917
914
  transform: rotate(180deg) scale(0);
918
915
  }
919
916
  }
920
- @keyframes jkl-loader-middle-spin-uisbn3a {
917
+ @keyframes jkl-loader-middle-spin-usuwc2o {
921
918
  0% {
922
919
  transform: rotate(20deg) scale(0);
923
920
  }
@@ -934,7 +931,7 @@
934
931
  transform: rotate(200deg) scale(0);
935
932
  }
936
933
  }
937
- @keyframes jkl-loader-right-spin-uisbn3o {
934
+ @keyframes jkl-loader-right-spin-usuwc39 {
938
935
  0% {
939
936
  transform: rotate(40deg) scale(0);
940
937
  }
@@ -974,7 +971,7 @@
974
971
  @media screen and (forced-colors: active) {
975
972
  .jkl-skeleton-element {
976
973
  border: 1px solid CanvasText;
977
- animation: 2s ease infinite jkl-blink-uisbn4i;
974
+ animation: 2s ease infinite jkl-blink-usuwc3p;
978
975
  }
979
976
  }
980
977
  .jkl-skeleton-input {
@@ -1022,10 +1019,10 @@
1022
1019
  }
1023
1020
  @media screen and (forced-colors: active) {
1024
1021
  .jkl-skeleton-table {
1025
- animation: 2s ease-in-out infinite jkl-blink-uisbn4i;
1022
+ animation: 2s ease-in-out infinite jkl-blink-usuwc3p;
1026
1023
  }
1027
1024
  }
1028
- @keyframes jkl-blink-uisbn4i {
1025
+ @keyframes jkl-blink-usuwc3p {
1029
1026
  0% {
1030
1027
  opacity: 1;
1031
1028
  }
@@ -2012,10 +2009,10 @@
2012
2009
  }
2013
2010
  }
2014
2011
  .jkl-countdown__tracker {
2015
- animation: jkl-downcount-uisbn5f var(--duration) linear forwards;
2012
+ animation: jkl-downcount-usuwc4y var(--duration) linear forwards;
2016
2013
  animation-play-state: var(--play-state, running);
2017
2014
  }
2018
- @keyframes jkl-downcount-uisbn5f {
2015
+ @keyframes jkl-downcount-usuwc4y {
2019
2016
  from {
2020
2017
  width: 100%;
2021
2018
  }
@@ -2508,12 +2505,12 @@
2508
2505
  --jkl-icon-size: 1.2em;
2509
2506
  }
2510
2507
  .jkl-feedback__fade-in {
2511
- animation: jkl-show-uisbn5z 0.25s ease-out;
2508
+ animation: jkl-show-usuwc5o 0.25s ease-out;
2512
2509
  }
2513
2510
  .jkl-feedback__buttons {
2514
2511
  display: flex;
2515
2512
  }
2516
- @keyframes jkl-show-uisbn5z {
2513
+ @keyframes jkl-show-usuwc5o {
2517
2514
  from {
2518
2515
  transform: translate3d(0, 0.5rem, 0);
2519
2516
  opacity: 0;
@@ -2730,7 +2727,7 @@
2730
2727
  --background-color: var(--jkl-color-background-alert-success);
2731
2728
  }
2732
2729
  .jkl-message--dismissed {
2733
- animation: jkl-dismiss-uisbn6q 400ms ease-in-out forwards;
2730
+ animation: jkl-dismiss-usuwc5p 400ms ease-in-out forwards;
2734
2731
  transition: visibility 0ms 400ms;
2735
2732
  visibility: hidden;
2736
2733
  }
@@ -2752,7 +2749,7 @@
2752
2749
  .jkl-form-error-message {
2753
2750
  padding-bottom: calc(var(--jkl-unit-base) * 5);
2754
2751
  }
2755
- @keyframes jkl-dismiss-uisbn6q {
2752
+ @keyframes jkl-dismiss-usuwc5p {
2756
2753
  from {
2757
2754
  opacity: 1;
2758
2755
  transform: translate3d(0, 0, 0);
@@ -4101,7 +4098,7 @@
4101
4098
  transition-timing-function: ease;
4102
4099
  transition-duration: 150ms;
4103
4100
  }
4104
- @keyframes jkl-downcount-uisbn78 {
4101
+ @keyframes jkl-downcount-usuwc64 {
4105
4102
  from {
4106
4103
  width: 100%;
4107
4104
  }
@@ -4611,7 +4608,7 @@ html:not([data-mousenavigation]):not([data-touchnavigation]) .jkl-select--beta s
4611
4608
  margin-bottom: 0;
4612
4609
  }
4613
4610
  .jkl-system-message--dismissed {
4614
- animation: jkl-dismiss-uisbn8l 400ms forwards;
4611
+ animation: jkl-dismiss-usuwc7c 400ms forwards;
4615
4612
  transition: block 400ms 400ms;
4616
4613
  }
4617
4614
  .jkl-system-message--info {
@@ -4641,7 +4638,7 @@ html:not([data-mousenavigation]):not([data-touchnavigation]) .jkl-select--beta s
4641
4638
  border-width: 4px;
4642
4639
  }
4643
4640
  }
4644
- @keyframes jkl-dismiss-uisbn8l {
4641
+ @keyframes jkl-dismiss-usuwc7c {
4645
4642
  from {
4646
4643
  opacity: 1;
4647
4644
  transform: translateY(0);
@@ -5478,12 +5475,12 @@ html:not([data-mousenavigation]):not([data-touchnavigation]) .jkl-select--beta s
5478
5475
  }
5479
5476
  .jkl-toast[data-animation=entering],
5480
5477
  .jkl-toast[data-animation=queued] {
5481
- animation: jkl-entering-uisbn95 200ms ease-out forwards;
5478
+ animation: jkl-entering-usuwc88 200ms ease-out forwards;
5482
5479
  }
5483
5480
  .jkl-toast[data-animation=exiting] {
5484
- animation: jkl-exiting-uisbn99 150ms ease-in forwards;
5481
+ animation: jkl-exiting-usuwc8q 150ms ease-in forwards;
5485
5482
  }
5486
- @keyframes jkl-entering-uisbn95 {
5483
+ @keyframes jkl-entering-usuwc88 {
5487
5484
  from {
5488
5485
  opacity: 0;
5489
5486
  transform: translate3d(0, 50%, 0);
@@ -5493,7 +5490,7 @@ html:not([data-mousenavigation]):not([data-touchnavigation]) .jkl-select--beta s
5493
5490
  transform: translate3d(0, 0, 0);
5494
5491
  }
5495
5492
  }
5496
- @keyframes jkl-exiting-uisbn99 {
5493
+ @keyframes jkl-exiting-usuwc8q {
5497
5494
  from {
5498
5495
  opacity: 1;
5499
5496
  transform: translate3d(0, 0, 0);
@@ -7087,29 +7084,35 @@ html:not([data-mousenavigation]):not([data-touchnavigation]) .jkl-toggle-slider:
7087
7084
  }
7088
7085
 
7089
7086
  @layer jokul.components {
7087
+ .jkl-help {
7088
+ anchor-scope: all;
7089
+ display: inline;
7090
+ }
7090
7091
  .jkl-help-trigger {
7091
7092
  vertical-align: middle;
7092
7093
  width: fit-content;
7093
7094
  height: fit-content;
7095
+ padding: 0 !important;
7096
+ overflow: visible !important;
7097
+ anchor-name: --trigger;
7098
+ }
7099
+ .jkl-help-trigger::after {
7100
+ content: "";
7101
+ display: block;
7102
+ z-index: 0;
7103
+ position: absolute;
7104
+ inset-inline: -50%;
7105
+ inset-block: -20%;
7094
7106
  }
7095
7107
  .jkl-help-popover {
7096
- max-width: 40ch;
7108
+ width: max-content;
7109
+ max-width: min(40ch, 80vw);
7097
7110
  padding: var(--jkl-unit-30);
7098
7111
  margin: var(--jkl-unit-05);
7099
- inset: auto;
7100
- border: none;
7112
+ position-anchor: --trigger;
7101
7113
  background-color: var(--jkl-color-background-container-inverted);
7102
7114
  color: var(--jkl-color-text-inverted);
7103
- }
7104
- .jkl-help-popover header button {
7105
- display: none;
7106
- }
7107
- .jkl-help-popover .title {
7108
- font-size: var(--jkl-font-size-7);
7109
- line-height: var(--jkl-line-height-tight);
7110
- font-weight: 400;
7111
- --jkl-icon-weight: 300;
7112
- font-weight: bold;
7115
+ anchor-name: --help-box;
7113
7116
  }
7114
7117
  .jkl-help-popover[data-position=top] {
7115
7118
  position-area: top center;