@fremtind/jokul 5.2.3 → 6.0.0-next.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 (86) hide show
  1. package/README.md +1 -1
  2. package/build/build-stats.html +1 -1
  3. package/build/cjs/components/file/File.cjs +1 -1
  4. package/build/cjs/components/file/File.cjs.map +1 -1
  5. package/build/cjs/components/file/types.d.cts +10 -1
  6. package/build/cjs/hooks/index.cjs +1 -1
  7. package/build/cjs/hooks/index.d.cts +0 -1
  8. package/build/cjs/utilities/formatters/index.cjs +1 -1
  9. package/build/cjs/utilities/formatters/index.d.cts +1 -1
  10. package/build/cjs/utilities/formatters/util/registerWithMask.cjs +1 -1
  11. package/build/cjs/utilities/formatters/util/registerWithMask.cjs.map +1 -1
  12. package/build/cjs/utilities/formatters/util/registerWithMask.d.cts +0 -8
  13. package/build/cjs/utilities/index.cjs +1 -1
  14. package/build/cjs/utilities/validators/index.cjs +1 -1
  15. package/build/cjs/utilities/validators/index.d.cts +0 -1
  16. package/build/es/components/file/File.js +1 -1
  17. package/build/es/components/file/File.js.map +1 -1
  18. package/build/es/components/file/types.d.ts +10 -1
  19. package/build/es/hooks/index.d.ts +0 -1
  20. package/build/es/hooks/index.js +1 -1
  21. package/build/es/utilities/formatters/index.d.ts +1 -1
  22. package/build/es/utilities/formatters/index.js +1 -1
  23. package/build/es/utilities/formatters/util/registerWithMask.d.ts +0 -8
  24. package/build/es/utilities/formatters/util/registerWithMask.js +1 -1
  25. package/build/es/utilities/formatters/util/registerWithMask.js.map +1 -1
  26. package/build/es/utilities/index.js +1 -1
  27. package/build/es/utilities/validators/index.d.ts +0 -1
  28. package/build/es/utilities/validators/index.js +1 -1
  29. package/codemods/CODEMODS.md +16 -0
  30. package/codemods/__tests__/import-paths.test.mjs +43 -0
  31. package/codemods/import-paths.mjs +8 -2
  32. package/codemods/transforms/register-with-mask.mjs +267 -0
  33. package/package.json +1 -1
  34. package/src/fonts/Jokul-Icons.woff2 +0 -0
  35. package/src/fonts/brands/fremtind/Jokul-Icons.woff2 +0 -0
  36. package/styles/base.css +1 -1
  37. package/styles/base.min.css +1 -1
  38. package/styles/components/countdown/countdown.css +2 -2
  39. package/styles/components/countdown/countdown.min.css +1 -1
  40. package/styles/components/feedback/feedback.css +2 -2
  41. package/styles/components/feedback/feedback.min.css +1 -1
  42. package/styles/components/file/file.css +50 -61
  43. package/styles/components/file/file.min.css +1 -1
  44. package/styles/components/file/file.scss +66 -79
  45. package/styles/components/file-input/file-input.css +59 -70
  46. package/styles/components/file-input/file-input.min.css +1 -1
  47. package/styles/components/input-group/input-group.css +2 -2
  48. package/styles/components/input-group/input-group.min.css +1 -1
  49. package/styles/components/loader/loader.css +6 -6
  50. package/styles/components/loader/loader.min.css +1 -1
  51. package/styles/components/loader/skeleton-loader.css +3 -3
  52. package/styles/components/loader/skeleton-loader.min.css +1 -1
  53. package/styles/components/message/message.css +2 -2
  54. package/styles/components/message/message.min.css +1 -1
  55. package/styles/components/progress-bar/progress-bar.css +1 -1
  56. package/styles/components/progress-bar/progress-bar.min.css +1 -1
  57. package/styles/components/segmented-control/segmented-control.css +2 -2
  58. package/styles/components/segmented-control/segmented-control.min.css +1 -1
  59. package/styles/components/system-message/system-message.css +2 -2
  60. package/styles/components/system-message/system-message.min.css +1 -1
  61. package/styles/components/toast/toast.css +4 -4
  62. package/styles/components/toast/toast.min.css +1 -1
  63. package/styles/components.css +74 -85
  64. package/styles/components.min.css +1 -1
  65. package/styles/jkl/_shadows.scss +0 -12
  66. package/styles/theme/_fonts.scss +1 -1
  67. package/build/cjs/hooks/useAnimatedDetails/index.cjs +0 -2
  68. package/build/cjs/hooks/useAnimatedDetails/index.cjs.map +0 -1
  69. package/build/cjs/hooks/useAnimatedDetails/index.d.cts +0 -1
  70. package/build/cjs/hooks/useAnimatedDetails/useAnimatedDetails.cjs +0 -2
  71. package/build/cjs/hooks/useAnimatedDetails/useAnimatedDetails.cjs.map +0 -1
  72. package/build/cjs/hooks/useAnimatedDetails/useAnimatedDetails.d.cts +0 -21
  73. package/build/cjs/utilities/validators/isValidDogId/isValidDogId.cjs +0 -2
  74. package/build/cjs/utilities/validators/isValidDogId/isValidDogId.cjs.map +0 -1
  75. package/build/cjs/utilities/validators/isValidDogId/isValidDogId.d.cts +0 -7
  76. package/build/es/hooks/useAnimatedDetails/index.d.ts +0 -1
  77. package/build/es/hooks/useAnimatedDetails/index.js +0 -2
  78. package/build/es/hooks/useAnimatedDetails/index.js.map +0 -1
  79. package/build/es/hooks/useAnimatedDetails/useAnimatedDetails.d.ts +0 -21
  80. package/build/es/hooks/useAnimatedDetails/useAnimatedDetails.js +0 -2
  81. package/build/es/hooks/useAnimatedDetails/useAnimatedDetails.js.map +0 -1
  82. package/build/es/utilities/validators/isValidDogId/isValidDogId.d.ts +0 -7
  83. package/build/es/utilities/validators/isValidDogId/isValidDogId.js +0 -2
  84. package/build/es/utilities/validators/isValidDogId/isValidDogId.js.map +0 -1
  85. package/src/fonts/Fremtind-Material-Symbols.woff2 +0 -0
  86. package/src/fonts/brands/fremtind/Fremtind-Material-Symbols.woff2 +0 -0
@@ -425,7 +425,7 @@
425
425
  display: inline-flex;
426
426
  }
427
427
  .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 {
428
- animation: var(--jkl-motion-timing-lazy) cubic-bezier(0, 0, 0.3, 1) var(--jkl-motion-timing-expressive) jkl-support-icon-entrance-ukobiks forwards;
428
+ animation: var(--jkl-motion-timing-lazy) cubic-bezier(0, 0, 0.3, 1) var(--jkl-motion-timing-expressive) jkl-support-icon-entrance-ustvnfd forwards;
429
429
  }
430
430
  .jkl-form-support-label--sr-only {
431
431
  border: 0 !important;
@@ -479,7 +479,7 @@
479
479
  .jkl-label:has(+ .jkl-input-group-description) {
480
480
  margin-block-end: var(--jkl-spacing-4);
481
481
  }
482
- @keyframes jkl-support-icon-entrance-ukobiks {
482
+ @keyframes jkl-support-icon-entrance-ustvnfd {
483
483
  0% {
484
484
  margin-right: 0;
485
485
  opacity: 0;
@@ -839,22 +839,22 @@
839
839
  animation: 2500ms linear infinite;
840
840
  }
841
841
  .jkl-loader__dot--left {
842
- animation-name: jkl-loader-left-spin-ukobil9;
842
+ animation-name: jkl-loader-left-spin-ustvng5;
843
843
  margin-right: calc(var(--jkl-loader-spacing) * 0.9);
844
844
  }
845
845
  .jkl-loader__dot--middle {
846
- animation-name: jkl-loader-middle-spin-ukobilc;
846
+ animation-name: jkl-loader-middle-spin-ustvngg;
847
847
  margin-right: var(--jkl-loader-spacing);
848
848
  }
849
849
  .jkl-loader__dot--right {
850
- animation-name: jkl-loader-right-spin-ukobilv;
850
+ animation-name: jkl-loader-right-spin-ustvnh8;
851
851
  }
852
852
  @media screen and (forced-colors: active) {
853
853
  .jkl-loader__dot {
854
854
  background-color: CanvasText;
855
855
  }
856
856
  }
857
- @keyframes jkl-loader-left-spin-ukobil9 {
857
+ @keyframes jkl-loader-left-spin-ustvng5 {
858
858
  0% {
859
859
  transform: rotate(0) scale(0);
860
860
  }
@@ -868,7 +868,7 @@
868
868
  transform: rotate(180deg) scale(0);
869
869
  }
870
870
  }
871
- @keyframes jkl-loader-middle-spin-ukobilc {
871
+ @keyframes jkl-loader-middle-spin-ustvngg {
872
872
  0% {
873
873
  transform: rotate(20deg) scale(0);
874
874
  }
@@ -885,7 +885,7 @@
885
885
  transform: rotate(200deg) scale(0);
886
886
  }
887
887
  }
888
- @keyframes jkl-loader-right-spin-ukobilv {
888
+ @keyframes jkl-loader-right-spin-ustvnh8 {
889
889
  0% {
890
890
  transform: rotate(40deg) scale(0);
891
891
  }
@@ -925,7 +925,7 @@
925
925
  @media screen and (forced-colors: active) {
926
926
  .jkl-skeleton-element {
927
927
  border: 1px solid CanvasText;
928
- animation: 2s ease infinite jkl-blink-ukobiml;
928
+ animation: 2s ease infinite jkl-blink-ustvnho;
929
929
  }
930
930
  }
931
931
  .jkl-skeleton-input {
@@ -973,10 +973,10 @@
973
973
  }
974
974
  @media screen and (forced-colors: active) {
975
975
  .jkl-skeleton-table {
976
- animation: 2s ease-in-out infinite jkl-blink-ukobiml;
976
+ animation: 2s ease-in-out infinite jkl-blink-ustvnho;
977
977
  }
978
978
  }
979
- @keyframes jkl-blink-ukobiml {
979
+ @keyframes jkl-blink-ustvnho {
980
980
  0% {
981
981
  opacity: 1;
982
982
  }
@@ -2140,10 +2140,10 @@
2140
2140
  }
2141
2141
  }
2142
2142
  .jkl-countdown__tracker {
2143
- animation: jkl-downcount-ukobinn var(--duration) linear forwards;
2143
+ animation: jkl-downcount-ustvnie var(--duration) linear forwards;
2144
2144
  animation-play-state: var(--play-state, running);
2145
2145
  }
2146
- @keyframes jkl-downcount-ukobinn {
2146
+ @keyframes jkl-downcount-ustvnie {
2147
2147
  from {
2148
2148
  width: 100%;
2149
2149
  }
@@ -2644,12 +2644,12 @@
2644
2644
  font: var(--jkl-text-style-paragraph-small);
2645
2645
  }
2646
2646
  .jkl-feedback__fade-in {
2647
- animation: jkl-show-ukobioc 0.25s ease-out;
2647
+ animation: jkl-show-ustvnj8 0.25s ease-out;
2648
2648
  }
2649
2649
  .jkl-feedback__buttons {
2650
2650
  display: flex;
2651
2651
  }
2652
- @keyframes jkl-show-ukobioc {
2652
+ @keyframes jkl-show-ustvnj8 {
2653
2653
  from {
2654
2654
  transform: translate3d(0, 0.5rem, 0);
2655
2655
  opacity: 0;
@@ -2861,7 +2861,7 @@
2861
2861
  --icon-color: var(--jkl-color-success-background-contrast);
2862
2862
  }
2863
2863
  .jkl-message--dismissed {
2864
- animation: jkl-dismiss-ukobip6 var(--jkl-motion-timing-lazy) ease-in-out forwards;
2864
+ animation: jkl-dismiss-ustvnk7 var(--jkl-motion-timing-lazy) ease-in-out forwards;
2865
2865
  transition: visibility 0ms var(--jkl-motion-timing-lazy);
2866
2866
  visibility: hidden;
2867
2867
  }
@@ -2883,7 +2883,7 @@
2883
2883
  .jkl-form-error-message {
2884
2884
  padding-bottom: var(--jkl-unit-50);
2885
2885
  }
2886
- @keyframes jkl-dismiss-ukobip6 {
2886
+ @keyframes jkl-dismiss-ustvnk7 {
2887
2887
  from {
2888
2888
  opacity: 1;
2889
2889
  transform: translate3d(0, 0, 0);
@@ -3279,69 +3279,37 @@
3279
3279
  @layer jokul.components {
3280
3280
  .jkl-file {
3281
3281
  --jkl-file-padding: var(--jkl-unit-10);
3282
- --jkl-file-thumbnail-width: var(--jkl-unit-70);
3283
- --jkl-file-thumbnail-max-height: var(--jkl-unit-90);
3282
+ --jkl-file-thumbnail-max-height: var(--jkl-unit-210);
3283
+ --jkl-file-thumbnail-width: var(--jkl-unit-60);
3284
3284
  --jkl-file-thumbnail-aspect-ratio: 1;
3285
- --jkl-file-gap: var(--jkl-unit-10) var(--jkl-unit-20);
3285
+ --jkl-file-gap: var(--jkl-unit-10);
3286
3286
  --jkl-file-button-width: var(--jkl-unit-50);
3287
3287
  --text-color: var(--jkl-color-text-default);
3288
3288
  --border: 1px solid var(--jkl-color-border-subdued);
3289
- --border-radius: 2px;
3289
+ --border-radius: var(--jkl-border-radius-s);
3290
3290
  --bg: transparent;
3291
3291
  --transition-time: var(--jkl-motion-timing-expressive);
3292
3292
  }
3293
- .jkl-file__content {
3294
- transition-timing-function: var(--jkl-motion-easing-standard);
3295
- transition-duration: var(--jkl-motion-timing-snappy);
3296
- transition-property: background-color, border-color, color;
3297
- color: var(--text-color);
3298
- padding: var(--jkl-file-padding);
3299
- border: var(--border);
3300
- border-radius: var(--border-radius);
3301
- background: var(--bg);
3302
- display: grid;
3303
- grid-template-columns: var(--jkl-file-thumbnail-width) 1fr var(--jkl-file-button-width);
3304
- grid-template-areas: "image text button";
3305
- gap: var(--jkl-file-gap);
3306
- align-items: center;
3307
- height: fit-content;
3308
- }
3309
- .jkl-file__content__name {
3310
- font: var(--jkl-text-style-paragraph-small);
3311
- grid-area: text;
3312
- /* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */
3313
- word-break: break-word;
3314
- }
3315
- .jkl-file__content__name__size {
3316
- word-break: keep-all;
3317
- }
3318
- .jkl-file__content__delete {
3319
- aspect-ratio: 1;
3320
- grid-area: button;
3321
- }
3322
- .jkl-file__content__thumbnail {
3323
- width: 100%;
3293
+ .jkl-file__thumbnail {
3294
+ flex-shrink: 0;
3324
3295
  aspect-ratio: var(--jkl-file-thumbnail-aspect-ratio);
3325
- object-fit: cover;
3296
+ width: var(--jkl-file-thumbnail-width);
3297
+ height: auto;
3326
3298
  max-height: var(--jkl-file-thumbnail-max-height);
3327
- grid-area: image;
3328
3299
  position: relative;
3329
3300
  display: flex;
3330
3301
  align-items: center;
3331
3302
  justify-content: center;
3332
3303
  background: var(--jkl-color-background-page);
3333
- border-radius: 2px;
3304
+ border-radius: var(--jkl-border-radius-xs);
3334
3305
  overflow: hidden;
3335
- container-type: inline-size;
3336
3306
  anchor-name: --thumb;
3337
3307
  anchor-scope: all;
3338
3308
  outline: 1px solid color-mix(in srgb, currentColor 3%, transparent);
3339
3309
  }
3340
- .jkl-file__content__thumbnail::before, .jkl-file__content__thumbnail::after {
3310
+ .jkl-file__thumbnail::after {
3341
3311
  position: absolute;
3342
3312
  z-index: 1;
3343
- }
3344
- .jkl-file__content__thumbnail::after {
3345
3313
  content: ""/"Laster opp";
3346
3314
  position-anchor: --thumb;
3347
3315
  position-area: center;
@@ -3354,50 +3322,71 @@
3354
3322
  transition: display var(--transition-time) allow-discrete ease-in, scale var(--transition-time) ease-in;
3355
3323
  }
3356
3324
  @starting-style {
3357
- .jkl-file__content__thumbnail::after {
3325
+ .jkl-file__thumbnail::after {
3358
3326
  scale: 0;
3359
3327
  }
3360
3328
  }
3361
- .jkl-file__content__thumbnail img {
3329
+ .jkl-file__thumbnail img {
3362
3330
  opacity: 1;
3363
3331
  transition: opacity var(--transition-time) ease-in-out;
3364
3332
  }
3365
- .jkl-file__content__thumbnail img[src] {
3366
- width: 100%;
3367
- height: 100%;
3333
+ .jkl-file__thumbnail img[src] {
3334
+ min-width: 100%;
3335
+ min-height: 100%;
3368
3336
  object-fit: cover;
3337
+ object-position: center;
3338
+ }
3339
+ .jkl-file__content {
3340
+ transition-timing-function: var(--jkl-motion-easing-standard);
3341
+ transition-duration: var(--jkl-motion-timing-snappy);
3342
+ transition-property: background-color, border-color, color;
3343
+ color: var(--text-color);
3344
+ padding: var(--jkl-file-padding);
3345
+ border: var(--border);
3346
+ border-radius: var(--border-radius);
3347
+ background: var(--bg);
3348
+ height: fit-content;
3349
+ }
3350
+ .jkl-file__content:not(:has(.jkl-file__thumbnail)):has(.jkl-file__button) {
3351
+ --jkl-file-padding: 0 var(--jkl-unit-10);
3352
+ }
3353
+ .jkl-file__info {
3354
+ flex-grow: 999;
3355
+ }
3356
+ .jkl-file__name {
3357
+ /* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */
3358
+ word-break: break-word;
3359
+ }
3360
+ .jkl-file__size {
3361
+ word-break: keep-all;
3362
+ }
3363
+ .jkl-file__button {
3364
+ aspect-ratio: 1;
3365
+ flex-shrink: 0;
3369
3366
  }
3370
3367
  .jkl-file[class*=card] {
3371
3368
  --jkl-file-thumbnail-width: 100%;
3372
- --jkl-file-thumbnail-aspect-ratio: 16/9;
3373
- }
3374
- .jkl-file[class*=card] .jkl-file__content {
3375
- grid-template-columns: 1fr var(--jkl-file-button-width);
3376
- grid-template-rows: var(--jkl-file-thumbnail-max-height) auto;
3377
- grid-template-areas: "image image" "text button";
3369
+ --jkl-file-thumbnail-aspect-ratio: 16/10;
3378
3370
  }
3379
- .jkl-file:not([data-state*=loading]) .jkl-file__content__thumbnail:not(:has(img[src]))::before {
3371
+ .jkl-file:not([data-state*=loading]) .jkl-file__thumbnail:not(:has(img[src]))::before {
3380
3372
  font: var(--jkl-text-style-paragraph-small);
3373
+ position: absolute;
3374
+ z-index: 1;
3381
3375
  content: attr(data-filetype);
3382
3376
  }
3383
- .jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__content__thumbnail img {
3377
+ .jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__thumbnail img {
3384
3378
  opacity: 0;
3385
3379
  }
3386
- .jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__content__thumbnail::after {
3380
+ .jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__thumbnail::after {
3387
3381
  display: block;
3388
3382
  scale: 1;
3389
3383
  }
3390
- .jkl-file[data-state=error] {
3391
- --bg: var(--jkl-color-error-background-container);
3392
- }
3393
3384
  .jkl-file[data-state=error],
3394
3385
  .jkl-file[data-state=error] a,
3395
3386
  .jkl-file[data-state=error] a:hover,
3396
3387
  .jkl-file[data-state=error] button,
3397
3388
  .jkl-file[data-state=error] span {
3398
3389
  --text-color: var(--jkl-color-error-text-default);
3399
- --link-color: var(--text-color);
3400
- --jkl-color-border-strong: currentColor;
3401
3390
  }
3402
3391
  .jkl-file[data-state=error] .jkl-file__content {
3403
3392
  border-color: var(--jkl-color-error-border-default);
@@ -4483,7 +4472,7 @@
4483
4472
  transition-timing-function: var(--jkl-motion-easing-standard);
4484
4473
  transition-duration: var(--jkl-motion-timing-productive);
4485
4474
  }
4486
- @keyframes jkl-downcount-ukobipr {
4475
+ @keyframes jkl-downcount-ustvnku {
4487
4476
  from {
4488
4477
  width: 100%;
4489
4478
  }
@@ -4997,7 +4986,7 @@ html:not([data-mousenavigation]):not([data-touchnavigation]) .jkl-select--beta s
4997
4986
  margin-bottom: 0;
4998
4987
  }
4999
4988
  .jkl-system-message--dismissed {
5000
- animation: jkl-dismiss-ukobiqs var(--jkl-motion-timing-lazy) forwards;
4989
+ animation: jkl-dismiss-ustvnlj var(--jkl-motion-timing-lazy) forwards;
5001
4990
  transition: block var(--jkl-motion-timing-lazy) var(--jkl-motion-timing-lazy);
5002
4991
  }
5003
4992
  .jkl-system-message--info {
@@ -5035,7 +5024,7 @@ html:not([data-mousenavigation]):not([data-touchnavigation]) .jkl-select--beta s
5035
5024
  border-width: 4px;
5036
5025
  }
5037
5026
  }
5038
- @keyframes jkl-dismiss-ukobiqs {
5027
+ @keyframes jkl-dismiss-ustvnlj {
5039
5028
  from {
5040
5029
  opacity: 1;
5041
5030
  transform: translateY(0);
@@ -5863,12 +5852,12 @@ html:not([data-mousenavigation]):not([data-touchnavigation]) .jkl-select--beta s
5863
5852
  }
5864
5853
  .jkl-toast[data-animation=entering],
5865
5854
  .jkl-toast[data-animation=queued] {
5866
- animation: jkl-entering-ukobirn var(--jkl-motion-timing-polite) var(--jkl-motion-easing-entrance) forwards;
5855
+ animation: jkl-entering-ustvnmb var(--jkl-motion-timing-polite) var(--jkl-motion-easing-entrance) forwards;
5867
5856
  }
5868
5857
  .jkl-toast[data-animation=exiting] {
5869
- animation: jkl-exiting-ukobis2 var(--jkl-motion-timing-productive) var(--jkl-motion-easing-exit) forwards;
5858
+ animation: jkl-exiting-ustvnn5 var(--jkl-motion-timing-productive) var(--jkl-motion-easing-exit) forwards;
5870
5859
  }
5871
- @keyframes jkl-entering-ukobirn {
5860
+ @keyframes jkl-entering-ustvnmb {
5872
5861
  from {
5873
5862
  opacity: 0;
5874
5863
  transform: translate3d(0, 50%, 0);
@@ -5878,7 +5867,7 @@ html:not([data-mousenavigation]):not([data-touchnavigation]) .jkl-select--beta s
5878
5867
  transform: translate3d(0, 0, 0);
5879
5868
  }
5880
5869
  }
5881
- @keyframes jkl-exiting-ukobis2 {
5870
+ @keyframes jkl-exiting-ustvnn5 {
5882
5871
  from {
5883
5872
  opacity: 1;
5884
5873
  transform: translate3d(0, 0, 0);