@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.
- package/README.md +1 -1
- package/build/build-stats.html +1 -1
- package/build/cjs/components/file/File.cjs +1 -1
- package/build/cjs/components/file/File.cjs.map +1 -1
- package/build/cjs/components/file/types.d.cts +10 -1
- package/build/cjs/hooks/index.cjs +1 -1
- package/build/cjs/hooks/index.d.cts +0 -1
- package/build/cjs/utilities/formatters/index.cjs +1 -1
- package/build/cjs/utilities/formatters/index.d.cts +1 -1
- package/build/cjs/utilities/formatters/util/registerWithMask.cjs +1 -1
- package/build/cjs/utilities/formatters/util/registerWithMask.cjs.map +1 -1
- package/build/cjs/utilities/formatters/util/registerWithMask.d.cts +0 -8
- package/build/cjs/utilities/index.cjs +1 -1
- package/build/cjs/utilities/validators/index.cjs +1 -1
- package/build/cjs/utilities/validators/index.d.cts +0 -1
- package/build/es/components/file/File.js +1 -1
- package/build/es/components/file/File.js.map +1 -1
- package/build/es/components/file/types.d.ts +10 -1
- package/build/es/hooks/index.d.ts +0 -1
- package/build/es/hooks/index.js +1 -1
- package/build/es/utilities/formatters/index.d.ts +1 -1
- package/build/es/utilities/formatters/index.js +1 -1
- package/build/es/utilities/formatters/util/registerWithMask.d.ts +0 -8
- package/build/es/utilities/formatters/util/registerWithMask.js +1 -1
- package/build/es/utilities/formatters/util/registerWithMask.js.map +1 -1
- package/build/es/utilities/index.js +1 -1
- package/build/es/utilities/validators/index.d.ts +0 -1
- package/build/es/utilities/validators/index.js +1 -1
- package/codemods/CODEMODS.md +16 -0
- package/codemods/__tests__/import-paths.test.mjs +43 -0
- package/codemods/import-paths.mjs +8 -2
- package/codemods/transforms/register-with-mask.mjs +267 -0
- package/package.json +1 -1
- package/src/fonts/Jokul-Icons.woff2 +0 -0
- package/src/fonts/brands/fremtind/Jokul-Icons.woff2 +0 -0
- package/styles/base.css +1 -1
- package/styles/base.min.css +1 -1
- package/styles/components/countdown/countdown.css +2 -2
- package/styles/components/countdown/countdown.min.css +1 -1
- package/styles/components/feedback/feedback.css +2 -2
- package/styles/components/feedback/feedback.min.css +1 -1
- package/styles/components/file/file.css +50 -61
- package/styles/components/file/file.min.css +1 -1
- package/styles/components/file/file.scss +66 -79
- package/styles/components/file-input/file-input.css +59 -70
- package/styles/components/file-input/file-input.min.css +1 -1
- package/styles/components/input-group/input-group.css +2 -2
- package/styles/components/input-group/input-group.min.css +1 -1
- package/styles/components/loader/loader.css +6 -6
- package/styles/components/loader/loader.min.css +1 -1
- package/styles/components/loader/skeleton-loader.css +3 -3
- package/styles/components/loader/skeleton-loader.min.css +1 -1
- package/styles/components/message/message.css +2 -2
- package/styles/components/message/message.min.css +1 -1
- package/styles/components/progress-bar/progress-bar.css +1 -1
- package/styles/components/progress-bar/progress-bar.min.css +1 -1
- package/styles/components/segmented-control/segmented-control.css +2 -2
- package/styles/components/segmented-control/segmented-control.min.css +1 -1
- package/styles/components/system-message/system-message.css +2 -2
- package/styles/components/system-message/system-message.min.css +1 -1
- package/styles/components/toast/toast.css +4 -4
- package/styles/components/toast/toast.min.css +1 -1
- package/styles/components.css +74 -85
- package/styles/components.min.css +1 -1
- package/styles/jkl/_shadows.scss +0 -12
- package/styles/theme/_fonts.scss +1 -1
- package/build/cjs/hooks/useAnimatedDetails/index.cjs +0 -2
- package/build/cjs/hooks/useAnimatedDetails/index.cjs.map +0 -1
- package/build/cjs/hooks/useAnimatedDetails/index.d.cts +0 -1
- package/build/cjs/hooks/useAnimatedDetails/useAnimatedDetails.cjs +0 -2
- package/build/cjs/hooks/useAnimatedDetails/useAnimatedDetails.cjs.map +0 -1
- package/build/cjs/hooks/useAnimatedDetails/useAnimatedDetails.d.cts +0 -21
- package/build/cjs/utilities/validators/isValidDogId/isValidDogId.cjs +0 -2
- package/build/cjs/utilities/validators/isValidDogId/isValidDogId.cjs.map +0 -1
- package/build/cjs/utilities/validators/isValidDogId/isValidDogId.d.cts +0 -7
- package/build/es/hooks/useAnimatedDetails/index.d.ts +0 -1
- package/build/es/hooks/useAnimatedDetails/index.js +0 -2
- package/build/es/hooks/useAnimatedDetails/index.js.map +0 -1
- package/build/es/hooks/useAnimatedDetails/useAnimatedDetails.d.ts +0 -21
- package/build/es/hooks/useAnimatedDetails/useAnimatedDetails.js +0 -2
- package/build/es/hooks/useAnimatedDetails/useAnimatedDetails.js.map +0 -1
- package/build/es/utilities/validators/isValidDogId/isValidDogId.d.ts +0 -7
- package/build/es/utilities/validators/isValidDogId/isValidDogId.js +0 -2
- package/build/es/utilities/validators/isValidDogId/isValidDogId.js.map +0 -1
- package/src/fonts/Fremtind-Material-Symbols.woff2 +0 -0
- package/src/fonts/brands/fremtind/Fremtind-Material-Symbols.woff2 +0 -0
|
@@ -4,69 +4,37 @@
|
|
|
4
4
|
@layer jokul.components {
|
|
5
5
|
.jkl-file {
|
|
6
6
|
--jkl-file-padding: var(--jkl-unit-10);
|
|
7
|
-
--jkl-file-thumbnail-
|
|
8
|
-
--jkl-file-thumbnail-
|
|
7
|
+
--jkl-file-thumbnail-max-height: var(--jkl-unit-210);
|
|
8
|
+
--jkl-file-thumbnail-width: var(--jkl-unit-60);
|
|
9
9
|
--jkl-file-thumbnail-aspect-ratio: 1;
|
|
10
|
-
--jkl-file-gap: var(--jkl-unit-10)
|
|
10
|
+
--jkl-file-gap: var(--jkl-unit-10);
|
|
11
11
|
--jkl-file-button-width: var(--jkl-unit-50);
|
|
12
12
|
--text-color: var(--jkl-color-text-default);
|
|
13
13
|
--border: 1px solid var(--jkl-color-border-subdued);
|
|
14
|
-
--border-radius:
|
|
14
|
+
--border-radius: var(--jkl-border-radius-s);
|
|
15
15
|
--bg: transparent;
|
|
16
16
|
--transition-time: var(--jkl-motion-timing-expressive);
|
|
17
17
|
}
|
|
18
|
-
.jkl-
|
|
19
|
-
|
|
20
|
-
transition-duration: var(--jkl-motion-timing-snappy);
|
|
21
|
-
transition-property: background-color, border-color, color;
|
|
22
|
-
color: var(--text-color);
|
|
23
|
-
padding: var(--jkl-file-padding);
|
|
24
|
-
border: var(--border);
|
|
25
|
-
border-radius: var(--border-radius);
|
|
26
|
-
background: var(--bg);
|
|
27
|
-
display: grid;
|
|
28
|
-
grid-template-columns: var(--jkl-file-thumbnail-width) 1fr var(--jkl-file-button-width);
|
|
29
|
-
grid-template-areas: "image text button";
|
|
30
|
-
gap: var(--jkl-file-gap);
|
|
31
|
-
align-items: center;
|
|
32
|
-
height: fit-content;
|
|
33
|
-
}
|
|
34
|
-
.jkl-file__content__name {
|
|
35
|
-
font: var(--jkl-text-style-paragraph-small);
|
|
36
|
-
grid-area: text;
|
|
37
|
-
/* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */
|
|
38
|
-
word-break: break-word;
|
|
39
|
-
}
|
|
40
|
-
.jkl-file__content__name__size {
|
|
41
|
-
word-break: keep-all;
|
|
42
|
-
}
|
|
43
|
-
.jkl-file__content__delete {
|
|
44
|
-
aspect-ratio: 1;
|
|
45
|
-
grid-area: button;
|
|
46
|
-
}
|
|
47
|
-
.jkl-file__content__thumbnail {
|
|
48
|
-
width: 100%;
|
|
18
|
+
.jkl-file__thumbnail {
|
|
19
|
+
flex-shrink: 0;
|
|
49
20
|
aspect-ratio: var(--jkl-file-thumbnail-aspect-ratio);
|
|
50
|
-
|
|
21
|
+
width: var(--jkl-file-thumbnail-width);
|
|
22
|
+
height: auto;
|
|
51
23
|
max-height: var(--jkl-file-thumbnail-max-height);
|
|
52
|
-
grid-area: image;
|
|
53
24
|
position: relative;
|
|
54
25
|
display: flex;
|
|
55
26
|
align-items: center;
|
|
56
27
|
justify-content: center;
|
|
57
28
|
background: var(--jkl-color-background-page);
|
|
58
|
-
border-radius:
|
|
29
|
+
border-radius: var(--jkl-border-radius-xs);
|
|
59
30
|
overflow: hidden;
|
|
60
|
-
container-type: inline-size;
|
|
61
31
|
anchor-name: --thumb;
|
|
62
32
|
anchor-scope: all;
|
|
63
33
|
outline: 1px solid color-mix(in srgb, currentColor 3%, transparent);
|
|
64
34
|
}
|
|
65
|
-
.jkl-
|
|
35
|
+
.jkl-file__thumbnail::after {
|
|
66
36
|
position: absolute;
|
|
67
37
|
z-index: 1;
|
|
68
|
-
}
|
|
69
|
-
.jkl-file__content__thumbnail::after {
|
|
70
38
|
content: ""/"Laster opp";
|
|
71
39
|
position-anchor: --thumb;
|
|
72
40
|
position-area: center;
|
|
@@ -79,50 +47,71 @@
|
|
|
79
47
|
transition: display var(--transition-time) allow-discrete ease-in, scale var(--transition-time) ease-in;
|
|
80
48
|
}
|
|
81
49
|
@starting-style {
|
|
82
|
-
.jkl-
|
|
50
|
+
.jkl-file__thumbnail::after {
|
|
83
51
|
scale: 0;
|
|
84
52
|
}
|
|
85
53
|
}
|
|
86
|
-
.jkl-
|
|
54
|
+
.jkl-file__thumbnail img {
|
|
87
55
|
opacity: 1;
|
|
88
56
|
transition: opacity var(--transition-time) ease-in-out;
|
|
89
57
|
}
|
|
90
|
-
.jkl-
|
|
91
|
-
width: 100%;
|
|
92
|
-
height: 100%;
|
|
58
|
+
.jkl-file__thumbnail img[src] {
|
|
59
|
+
min-width: 100%;
|
|
60
|
+
min-height: 100%;
|
|
93
61
|
object-fit: cover;
|
|
62
|
+
object-position: center;
|
|
63
|
+
}
|
|
64
|
+
.jkl-file__content {
|
|
65
|
+
transition-timing-function: var(--jkl-motion-easing-standard);
|
|
66
|
+
transition-duration: var(--jkl-motion-timing-snappy);
|
|
67
|
+
transition-property: background-color, border-color, color;
|
|
68
|
+
color: var(--text-color);
|
|
69
|
+
padding: var(--jkl-file-padding);
|
|
70
|
+
border: var(--border);
|
|
71
|
+
border-radius: var(--border-radius);
|
|
72
|
+
background: var(--bg);
|
|
73
|
+
height: fit-content;
|
|
74
|
+
}
|
|
75
|
+
.jkl-file__content:not(:has(.jkl-file__thumbnail)):has(.jkl-file__button) {
|
|
76
|
+
--jkl-file-padding: 0 var(--jkl-unit-10);
|
|
77
|
+
}
|
|
78
|
+
.jkl-file__info {
|
|
79
|
+
flex-grow: 999;
|
|
80
|
+
}
|
|
81
|
+
.jkl-file__name {
|
|
82
|
+
/* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */
|
|
83
|
+
word-break: break-word;
|
|
84
|
+
}
|
|
85
|
+
.jkl-file__size {
|
|
86
|
+
word-break: keep-all;
|
|
87
|
+
}
|
|
88
|
+
.jkl-file__button {
|
|
89
|
+
aspect-ratio: 1;
|
|
90
|
+
flex-shrink: 0;
|
|
94
91
|
}
|
|
95
92
|
.jkl-file[class*=card] {
|
|
96
93
|
--jkl-file-thumbnail-width: 100%;
|
|
97
|
-
--jkl-file-thumbnail-aspect-ratio: 16/
|
|
98
|
-
}
|
|
99
|
-
.jkl-file[class*=card] .jkl-file__content {
|
|
100
|
-
grid-template-columns: 1fr var(--jkl-file-button-width);
|
|
101
|
-
grid-template-rows: var(--jkl-file-thumbnail-max-height) auto;
|
|
102
|
-
grid-template-areas: "image image" "text button";
|
|
94
|
+
--jkl-file-thumbnail-aspect-ratio: 16/10;
|
|
103
95
|
}
|
|
104
|
-
.jkl-file:not([data-state*=loading]) .jkl-
|
|
96
|
+
.jkl-file:not([data-state*=loading]) .jkl-file__thumbnail:not(:has(img[src]))::before {
|
|
105
97
|
font: var(--jkl-text-style-paragraph-small);
|
|
98
|
+
position: absolute;
|
|
99
|
+
z-index: 1;
|
|
106
100
|
content: attr(data-filetype);
|
|
107
101
|
}
|
|
108
|
-
.jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-
|
|
102
|
+
.jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__thumbnail img {
|
|
109
103
|
opacity: 0;
|
|
110
104
|
}
|
|
111
|
-
.jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-
|
|
105
|
+
.jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__thumbnail::after {
|
|
112
106
|
display: block;
|
|
113
107
|
scale: 1;
|
|
114
108
|
}
|
|
115
|
-
.jkl-file[data-state=error] {
|
|
116
|
-
--bg: var(--jkl-color-error-background-container);
|
|
117
|
-
}
|
|
118
109
|
.jkl-file[data-state=error],
|
|
119
110
|
.jkl-file[data-state=error] a,
|
|
120
111
|
.jkl-file[data-state=error] a:hover,
|
|
121
112
|
.jkl-file[data-state=error] button,
|
|
122
113
|
.jkl-file[data-state=error] span {
|
|
123
114
|
--text-color: var(--jkl-color-error-text-default);
|
|
124
|
-
--link-color: var(--text-color);
|
|
125
|
-
--jkl-color-border-strong: currentColor;
|
|
126
115
|
}
|
|
127
116
|
.jkl-file[data-state=error] .jkl-file__content {
|
|
128
117
|
border-color: var(--jkl-color-error-border-default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer jokul.components{.jkl-file{--jkl-file-padding:var(--jkl-unit-10);--jkl-file-thumbnail-
|
|
1
|
+
@layer jokul.components{.jkl-file{--jkl-file-padding:var(--jkl-unit-10);--jkl-file-thumbnail-max-height:var(--jkl-unit-210);--jkl-file-thumbnail-width:var(--jkl-unit-60);--jkl-file-thumbnail-aspect-ratio:1;--jkl-file-gap:var(--jkl-unit-10);--jkl-file-button-width:var(--jkl-unit-50);--text-color:var(--jkl-color-text-default);--border:1px solid var(--jkl-color-border-subdued);--border-radius:var(--jkl-border-radius-s);--bg:#0000;--transition-time:var(--jkl-motion-timing-expressive)}.jkl-file__thumbnail{align-items:center;anchor-name:--thumb;anchor-scope:all;aspect-ratio:var(--jkl-file-thumbnail-aspect-ratio);background:var(--jkl-color-background-page);border-radius:var(--jkl-border-radius-xs);display:flex;flex-shrink:0;height:auto;justify-content:center;max-height:var(--jkl-file-thumbnail-max-height);outline:1px solid color-mix(in srgb,currentColor 3%,#0000);overflow:hidden;position:relative;width:var(--jkl-file-thumbnail-width)}.jkl-file__thumbnail:after{animation:spin 5s linear infinite forwards;aspect-ratio:1;background:var(--text-color);border-radius:1px;content:""/"Laster opp";height:25%;position:absolute;position-anchor:--thumb;position-area:center;scale:0;transition:display var(--transition-time) allow-discrete ease-in,scale var(--transition-time) ease-in;z-index:1}@starting-style{.jkl-file__thumbnail:after{scale:0}}.jkl-file__thumbnail img{opacity:1;transition:opacity var(--transition-time) ease-in-out}.jkl-file__thumbnail img[src]{min-height:100%;min-width:100%;object-fit:cover;object-position:center}.jkl-file__content{background:var(--bg);border:var(--border);border-radius:var(--border-radius);color:var(--text-color);height:-webkit-fit-content;height:fit-content;padding:var(--jkl-file-padding);transition-duration:var(--jkl-motion-timing-snappy);transition-property:background-color,border-color,color;transition-timing-function:var(--jkl-motion-easing-standard)}.jkl-file__content:not(:has(.jkl-file__thumbnail)):has(.jkl-file__button){--jkl-file-padding:0 var(--jkl-unit-10)}.jkl-file__info{flex-grow:999}.jkl-file__name{word-break:break-word}.jkl-file__size{word-break:keep-all}.jkl-file__button{aspect-ratio:1;flex-shrink:0}.jkl-file[class*=card]{--jkl-file-thumbnail-width:100%;--jkl-file-thumbnail-aspect-ratio:16/10}.jkl-file:not([data-state*=loading]) .jkl-file__thumbnail:not(:has(img[src])):before{content:attr(data-filetype);font:var(--jkl-text-style-paragraph-small);position:absolute;z-index:1}.jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__thumbnail img{opacity:0}.jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__thumbnail:after{display:block;scale:1}.jkl-file[data-state=error],.jkl-file[data-state=error] a,.jkl-file[data-state=error] a:hover,.jkl-file[data-state=error] button,.jkl-file[data-state=error] span{--text-color:var(--jkl-color-error-text-default)}.jkl-file[data-state=error] .jkl-file__content{border-color:var(--jkl-color-error-border-default)}@keyframes spin{0%{transform:rotate(0turn)}to{transform:rotate(1turn)}}}
|
|
@@ -3,80 +3,37 @@
|
|
|
3
3
|
@layer jokul.components {
|
|
4
4
|
.jkl-file {
|
|
5
5
|
--jkl-file-padding: var(--jkl-unit-10);
|
|
6
|
-
--jkl-file-thumbnail-
|
|
7
|
-
--jkl-file-thumbnail-
|
|
6
|
+
--jkl-file-thumbnail-max-height: var(--jkl-unit-210);
|
|
7
|
+
--jkl-file-thumbnail-width: var(--jkl-unit-60);
|
|
8
8
|
--jkl-file-thumbnail-aspect-ratio: 1;
|
|
9
|
-
--jkl-file-gap: var(--jkl-unit-10)
|
|
9
|
+
--jkl-file-gap: var(--jkl-unit-10);
|
|
10
10
|
--jkl-file-button-width: var(--jkl-unit-50);
|
|
11
11
|
--text-color: var(--jkl-color-text-default);
|
|
12
12
|
--border: 1px solid var(--jkl-color-border-subdued);
|
|
13
|
-
--border-radius:
|
|
13
|
+
--border-radius: var(--jkl-border-radius-s);
|
|
14
14
|
--bg: transparent;
|
|
15
15
|
--transition-time: #{jkl.$motion-timing-expressive};
|
|
16
16
|
|
|
17
|
-
&__content {
|
|
18
|
-
@include jkl.motion(
|
|
19
|
-
"standard",
|
|
20
|
-
"snappy",
|
|
21
|
-
background-color,
|
|
22
|
-
border-color,
|
|
23
|
-
color
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
color: var(--text-color);
|
|
27
|
-
padding: var(--jkl-file-padding);
|
|
28
|
-
border: var(--border);
|
|
29
|
-
border-radius: var(--border-radius);
|
|
30
|
-
background: var(--bg);
|
|
31
|
-
display: grid;
|
|
32
|
-
grid-template-columns: var(--jkl-file-thumbnail-width) 1fr var(
|
|
33
|
-
--jkl-file-button-width
|
|
34
|
-
);
|
|
35
|
-
grid-template-areas: "image text button";
|
|
36
|
-
gap: var(--jkl-file-gap);
|
|
37
|
-
align-items: center;
|
|
38
|
-
height: fit-content;
|
|
39
|
-
|
|
40
|
-
&__name {
|
|
41
|
-
@include jkl.text-style("paragraph-small");
|
|
42
|
-
grid-area: text;
|
|
43
|
-
/* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */
|
|
44
|
-
word-break: break-word;
|
|
45
|
-
|
|
46
|
-
&__size {
|
|
47
|
-
word-break: keep-all;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&__delete {
|
|
52
|
-
aspect-ratio: 1;
|
|
53
|
-
grid-area: button;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
17
|
&__thumbnail {
|
|
57
|
-
|
|
18
|
+
flex-shrink: 0;
|
|
58
19
|
aspect-ratio: var(--jkl-file-thumbnail-aspect-ratio);
|
|
59
|
-
|
|
20
|
+
width: var(--jkl-file-thumbnail-width);
|
|
21
|
+
height: auto;
|
|
60
22
|
max-height: var(--jkl-file-thumbnail-max-height);
|
|
61
|
-
grid-area: image;
|
|
62
23
|
position: relative;
|
|
63
24
|
display: flex;
|
|
64
25
|
align-items: center;
|
|
65
26
|
justify-content: center;
|
|
66
27
|
background: var(--jkl-color-background-page);
|
|
67
|
-
border-radius:
|
|
28
|
+
border-radius: var(--jkl-border-radius-xs);
|
|
68
29
|
overflow: hidden;
|
|
69
|
-
container-type: inline-size;
|
|
70
30
|
anchor-name: --thumb;
|
|
71
31
|
anchor-scope: all;
|
|
72
32
|
outline: 1px solid color-mix(in srgb, currentColor 3%, transparent);
|
|
73
33
|
|
|
74
|
-
&::
|
|
34
|
+
&::after {
|
|
75
35
|
position: absolute;
|
|
76
36
|
z-index: 1;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&::after {
|
|
80
37
|
content: "" / "Laster opp";
|
|
81
38
|
position-anchor: --thumb;
|
|
82
39
|
position-area: center;
|
|
@@ -98,63 +55,93 @@
|
|
|
98
55
|
transition: opacity var(--transition-time) ease-in-out;
|
|
99
56
|
|
|
100
57
|
&[src] {
|
|
101
|
-
width: 100%;
|
|
102
|
-
height: 100%;
|
|
58
|
+
min-width: 100%;
|
|
59
|
+
min-height: 100%;
|
|
103
60
|
object-fit: cover;
|
|
61
|
+
object-position: center;
|
|
104
62
|
}
|
|
105
63
|
}
|
|
106
64
|
}
|
|
107
|
-
|
|
65
|
+
|
|
66
|
+
&__content {
|
|
67
|
+
@include jkl.motion(
|
|
68
|
+
"standard",
|
|
69
|
+
"snappy",
|
|
70
|
+
background-color,
|
|
71
|
+
border-color,
|
|
72
|
+
color
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
color: var(--text-color);
|
|
76
|
+
padding: var(--jkl-file-padding);
|
|
77
|
+
border: var(--border);
|
|
78
|
+
border-radius: var(--border-radius);
|
|
79
|
+
background: var(--bg);
|
|
80
|
+
height: fit-content;
|
|
81
|
+
|
|
82
|
+
&:not(:has(.jkl-file__thumbnail)):has(.jkl-file__button) {
|
|
83
|
+
--jkl-file-padding: 0 var(--jkl-unit-10);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&__info {
|
|
88
|
+
flex-grow: 999;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&__name {
|
|
92
|
+
/* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */
|
|
93
|
+
word-break: break-word;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&__size {
|
|
97
|
+
word-break: keep-all;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&__button {
|
|
101
|
+
aspect-ratio: 1;
|
|
102
|
+
flex-shrink: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
108
105
|
|
|
109
106
|
// Card view
|
|
110
107
|
&[class*="card"] {
|
|
111
108
|
--jkl-file-thumbnail-width: 100%;
|
|
112
|
-
--jkl-file-thumbnail-aspect-ratio: 16/
|
|
113
|
-
|
|
114
|
-
.jkl-file__content {
|
|
115
|
-
grid-template-columns: 1fr var(--jkl-file-button-width);
|
|
116
|
-
grid-template-rows: var(--jkl-file-thumbnail-max-height) auto;
|
|
117
|
-
grid-template-areas:
|
|
118
|
-
"image image"
|
|
119
|
-
"text button";
|
|
120
|
-
}
|
|
109
|
+
--jkl-file-thumbnail-aspect-ratio: 16/10;
|
|
121
110
|
}
|
|
122
111
|
|
|
123
112
|
// If the file is not an image
|
|
124
113
|
&:not([data-state*="loading"]) {
|
|
125
|
-
.jkl-
|
|
114
|
+
.jkl-file__thumbnail:not(:has(img[src]))::before {
|
|
126
115
|
@include jkl.text-style("paragraph-small");
|
|
116
|
+
position: absolute;
|
|
117
|
+
z-index: 1;
|
|
127
118
|
|
|
128
119
|
content: attr(data-filetype);
|
|
129
120
|
}
|
|
130
121
|
}
|
|
131
122
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
123
|
+
// Loading state
|
|
124
|
+
&[data-state="loading"]:not(:has(.jkl-file__support-label)) {
|
|
125
|
+
.jkl-file__thumbnail {
|
|
126
|
+
img {
|
|
127
|
+
opacity: 0;
|
|
128
|
+
}
|
|
138
129
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
130
|
+
&::after {
|
|
131
|
+
display: block;
|
|
132
|
+
scale: 1;
|
|
133
|
+
}
|
|
142
134
|
}
|
|
143
135
|
}
|
|
144
|
-
}
|
|
145
136
|
|
|
146
137
|
// Error state
|
|
147
138
|
&[data-state="error"] {
|
|
148
|
-
--bg: var(--jkl-color-error-background-container);
|
|
149
|
-
|
|
150
139
|
&,
|
|
151
140
|
a,
|
|
152
141
|
a:hover,
|
|
153
142
|
button,
|
|
154
143
|
span {
|
|
155
144
|
--text-color: var(--jkl-color-error-text-default);
|
|
156
|
-
--link-color: var(--text-color);
|
|
157
|
-
--jkl-color-border-strong: currentColor;
|
|
158
145
|
}
|
|
159
146
|
|
|
160
147
|
.jkl-file__content {
|
|
@@ -5,69 +5,37 @@
|
|
|
5
5
|
@layer jokul.components {
|
|
6
6
|
.jkl-file {
|
|
7
7
|
--jkl-file-padding: var(--jkl-unit-10);
|
|
8
|
-
--jkl-file-thumbnail-
|
|
9
|
-
--jkl-file-thumbnail-
|
|
8
|
+
--jkl-file-thumbnail-max-height: var(--jkl-unit-210);
|
|
9
|
+
--jkl-file-thumbnail-width: var(--jkl-unit-60);
|
|
10
10
|
--jkl-file-thumbnail-aspect-ratio: 1;
|
|
11
|
-
--jkl-file-gap: var(--jkl-unit-10)
|
|
11
|
+
--jkl-file-gap: var(--jkl-unit-10);
|
|
12
12
|
--jkl-file-button-width: var(--jkl-unit-50);
|
|
13
13
|
--text-color: var(--jkl-color-text-default);
|
|
14
14
|
--border: 1px solid var(--jkl-color-border-subdued);
|
|
15
|
-
--border-radius:
|
|
15
|
+
--border-radius: var(--jkl-border-radius-s);
|
|
16
16
|
--bg: transparent;
|
|
17
17
|
--transition-time: var(--jkl-motion-timing-expressive);
|
|
18
18
|
}
|
|
19
|
-
.jkl-
|
|
20
|
-
|
|
21
|
-
transition-duration: var(--jkl-motion-timing-snappy);
|
|
22
|
-
transition-property: background-color, border-color, color;
|
|
23
|
-
color: var(--text-color);
|
|
24
|
-
padding: var(--jkl-file-padding);
|
|
25
|
-
border: var(--border);
|
|
26
|
-
border-radius: var(--border-radius);
|
|
27
|
-
background: var(--bg);
|
|
28
|
-
display: grid;
|
|
29
|
-
grid-template-columns: var(--jkl-file-thumbnail-width) 1fr var(--jkl-file-button-width);
|
|
30
|
-
grid-template-areas: "image text button";
|
|
31
|
-
gap: var(--jkl-file-gap);
|
|
32
|
-
align-items: center;
|
|
33
|
-
height: fit-content;
|
|
34
|
-
}
|
|
35
|
-
.jkl-file__content__name {
|
|
36
|
-
font: var(--jkl-text-style-paragraph-small);
|
|
37
|
-
grid-area: text;
|
|
38
|
-
/* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */
|
|
39
|
-
word-break: break-word;
|
|
40
|
-
}
|
|
41
|
-
.jkl-file__content__name__size {
|
|
42
|
-
word-break: keep-all;
|
|
43
|
-
}
|
|
44
|
-
.jkl-file__content__delete {
|
|
45
|
-
aspect-ratio: 1;
|
|
46
|
-
grid-area: button;
|
|
47
|
-
}
|
|
48
|
-
.jkl-file__content__thumbnail {
|
|
49
|
-
width: 100%;
|
|
19
|
+
.jkl-file__thumbnail {
|
|
20
|
+
flex-shrink: 0;
|
|
50
21
|
aspect-ratio: var(--jkl-file-thumbnail-aspect-ratio);
|
|
51
|
-
|
|
22
|
+
width: var(--jkl-file-thumbnail-width);
|
|
23
|
+
height: auto;
|
|
52
24
|
max-height: var(--jkl-file-thumbnail-max-height);
|
|
53
|
-
grid-area: image;
|
|
54
25
|
position: relative;
|
|
55
26
|
display: flex;
|
|
56
27
|
align-items: center;
|
|
57
28
|
justify-content: center;
|
|
58
29
|
background: var(--jkl-color-background-page);
|
|
59
|
-
border-radius:
|
|
30
|
+
border-radius: var(--jkl-border-radius-xs);
|
|
60
31
|
overflow: hidden;
|
|
61
|
-
container-type: inline-size;
|
|
62
32
|
anchor-name: --thumb;
|
|
63
33
|
anchor-scope: all;
|
|
64
34
|
outline: 1px solid color-mix(in srgb, currentColor 3%, transparent);
|
|
65
35
|
}
|
|
66
|
-
.jkl-
|
|
36
|
+
.jkl-file__thumbnail::after {
|
|
67
37
|
position: absolute;
|
|
68
38
|
z-index: 1;
|
|
69
|
-
}
|
|
70
|
-
.jkl-file__content__thumbnail::after {
|
|
71
39
|
content: ""/"Laster opp";
|
|
72
40
|
position-anchor: --thumb;
|
|
73
41
|
position-area: center;
|
|
@@ -80,50 +48,71 @@
|
|
|
80
48
|
transition: display var(--transition-time) allow-discrete ease-in, scale var(--transition-time) ease-in;
|
|
81
49
|
}
|
|
82
50
|
@starting-style {
|
|
83
|
-
.jkl-
|
|
51
|
+
.jkl-file__thumbnail::after {
|
|
84
52
|
scale: 0;
|
|
85
53
|
}
|
|
86
54
|
}
|
|
87
|
-
.jkl-
|
|
55
|
+
.jkl-file__thumbnail img {
|
|
88
56
|
opacity: 1;
|
|
89
57
|
transition: opacity var(--transition-time) ease-in-out;
|
|
90
58
|
}
|
|
91
|
-
.jkl-
|
|
92
|
-
width: 100%;
|
|
93
|
-
height: 100%;
|
|
59
|
+
.jkl-file__thumbnail img[src] {
|
|
60
|
+
min-width: 100%;
|
|
61
|
+
min-height: 100%;
|
|
94
62
|
object-fit: cover;
|
|
63
|
+
object-position: center;
|
|
64
|
+
}
|
|
65
|
+
.jkl-file__content {
|
|
66
|
+
transition-timing-function: var(--jkl-motion-easing-standard);
|
|
67
|
+
transition-duration: var(--jkl-motion-timing-snappy);
|
|
68
|
+
transition-property: background-color, border-color, color;
|
|
69
|
+
color: var(--text-color);
|
|
70
|
+
padding: var(--jkl-file-padding);
|
|
71
|
+
border: var(--border);
|
|
72
|
+
border-radius: var(--border-radius);
|
|
73
|
+
background: var(--bg);
|
|
74
|
+
height: fit-content;
|
|
75
|
+
}
|
|
76
|
+
.jkl-file__content:not(:has(.jkl-file__thumbnail)):has(.jkl-file__button) {
|
|
77
|
+
--jkl-file-padding: 0 var(--jkl-unit-10);
|
|
78
|
+
}
|
|
79
|
+
.jkl-file__info {
|
|
80
|
+
flex-grow: 999;
|
|
81
|
+
}
|
|
82
|
+
.jkl-file__name {
|
|
83
|
+
/* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */
|
|
84
|
+
word-break: break-word;
|
|
85
|
+
}
|
|
86
|
+
.jkl-file__size {
|
|
87
|
+
word-break: keep-all;
|
|
88
|
+
}
|
|
89
|
+
.jkl-file__button {
|
|
90
|
+
aspect-ratio: 1;
|
|
91
|
+
flex-shrink: 0;
|
|
95
92
|
}
|
|
96
93
|
.jkl-file[class*=card] {
|
|
97
94
|
--jkl-file-thumbnail-width: 100%;
|
|
98
|
-
--jkl-file-thumbnail-aspect-ratio: 16/
|
|
99
|
-
}
|
|
100
|
-
.jkl-file[class*=card] .jkl-file__content {
|
|
101
|
-
grid-template-columns: 1fr var(--jkl-file-button-width);
|
|
102
|
-
grid-template-rows: var(--jkl-file-thumbnail-max-height) auto;
|
|
103
|
-
grid-template-areas: "image image" "text button";
|
|
95
|
+
--jkl-file-thumbnail-aspect-ratio: 16/10;
|
|
104
96
|
}
|
|
105
|
-
.jkl-file:not([data-state*=loading]) .jkl-
|
|
97
|
+
.jkl-file:not([data-state*=loading]) .jkl-file__thumbnail:not(:has(img[src]))::before {
|
|
106
98
|
font: var(--jkl-text-style-paragraph-small);
|
|
99
|
+
position: absolute;
|
|
100
|
+
z-index: 1;
|
|
107
101
|
content: attr(data-filetype);
|
|
108
102
|
}
|
|
109
|
-
.jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-
|
|
103
|
+
.jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__thumbnail img {
|
|
110
104
|
opacity: 0;
|
|
111
105
|
}
|
|
112
|
-
.jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-
|
|
106
|
+
.jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__thumbnail::after {
|
|
113
107
|
display: block;
|
|
114
108
|
scale: 1;
|
|
115
109
|
}
|
|
116
|
-
.jkl-file[data-state=error] {
|
|
117
|
-
--bg: var(--jkl-color-error-background-container);
|
|
118
|
-
}
|
|
119
110
|
.jkl-file[data-state=error],
|
|
120
111
|
.jkl-file[data-state=error] a,
|
|
121
112
|
.jkl-file[data-state=error] a:hover,
|
|
122
113
|
.jkl-file[data-state=error] button,
|
|
123
114
|
.jkl-file[data-state=error] span {
|
|
124
115
|
--text-color: var(--jkl-color-error-text-default);
|
|
125
|
-
--link-color: var(--text-color);
|
|
126
|
-
--jkl-color-border-strong: currentColor;
|
|
127
116
|
}
|
|
128
117
|
.jkl-file[data-state=error] .jkl-file__content {
|
|
129
118
|
border-color: var(--jkl-color-error-border-default);
|
|
@@ -351,22 +340,22 @@
|
|
|
351
340
|
animation: 2500ms linear infinite;
|
|
352
341
|
}
|
|
353
342
|
.jkl-loader__dot--left {
|
|
354
|
-
animation-name: jkl-loader-left-spin-
|
|
343
|
+
animation-name: jkl-loader-left-spin-ucgrd6s;
|
|
355
344
|
margin-right: calc(var(--jkl-loader-spacing) * 0.9);
|
|
356
345
|
}
|
|
357
346
|
.jkl-loader__dot--middle {
|
|
358
|
-
animation-name: jkl-loader-middle-spin-
|
|
347
|
+
animation-name: jkl-loader-middle-spin-ucgrd6t;
|
|
359
348
|
margin-right: var(--jkl-loader-spacing);
|
|
360
349
|
}
|
|
361
350
|
.jkl-loader__dot--right {
|
|
362
|
-
animation-name: jkl-loader-right-spin-
|
|
351
|
+
animation-name: jkl-loader-right-spin-ucgrd7a;
|
|
363
352
|
}
|
|
364
353
|
@media screen and (forced-colors: active) {
|
|
365
354
|
.jkl-loader__dot {
|
|
366
355
|
background-color: CanvasText;
|
|
367
356
|
}
|
|
368
357
|
}
|
|
369
|
-
@keyframes jkl-loader-left-spin-
|
|
358
|
+
@keyframes jkl-loader-left-spin-ucgrd6s {
|
|
370
359
|
0% {
|
|
371
360
|
transform: rotate(0) scale(0);
|
|
372
361
|
}
|
|
@@ -380,7 +369,7 @@
|
|
|
380
369
|
transform: rotate(180deg) scale(0);
|
|
381
370
|
}
|
|
382
371
|
}
|
|
383
|
-
@keyframes jkl-loader-middle-spin-
|
|
372
|
+
@keyframes jkl-loader-middle-spin-ucgrd6t {
|
|
384
373
|
0% {
|
|
385
374
|
transform: rotate(20deg) scale(0);
|
|
386
375
|
}
|
|
@@ -397,7 +386,7 @@
|
|
|
397
386
|
transform: rotate(200deg) scale(0);
|
|
398
387
|
}
|
|
399
388
|
}
|
|
400
|
-
@keyframes jkl-loader-right-spin-
|
|
389
|
+
@keyframes jkl-loader-right-spin-ucgrd7a {
|
|
401
390
|
0% {
|
|
402
391
|
transform: rotate(40deg) scale(0);
|
|
403
392
|
}
|
|
@@ -437,7 +426,7 @@
|
|
|
437
426
|
@media screen and (forced-colors: active) {
|
|
438
427
|
.jkl-skeleton-element {
|
|
439
428
|
border: 1px solid CanvasText;
|
|
440
|
-
animation: 2s ease infinite jkl-blink-
|
|
429
|
+
animation: 2s ease infinite jkl-blink-ucgrd80;
|
|
441
430
|
}
|
|
442
431
|
}
|
|
443
432
|
.jkl-skeleton-input {
|
|
@@ -485,10 +474,10 @@
|
|
|
485
474
|
}
|
|
486
475
|
@media screen and (forced-colors: active) {
|
|
487
476
|
.jkl-skeleton-table {
|
|
488
|
-
animation: 2s ease-in-out infinite jkl-blink-
|
|
477
|
+
animation: 2s ease-in-out infinite jkl-blink-ucgrd80;
|
|
489
478
|
}
|
|
490
479
|
}
|
|
491
|
-
@keyframes jkl-blink-
|
|
480
|
+
@keyframes jkl-blink-ucgrd80 {
|
|
492
481
|
0% {
|
|
493
482
|
opacity: 1;
|
|
494
483
|
}
|