@fremtind/jokul 0.69.1 → 0.70.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/build/build-stats.html +1 -1
- package/build/cjs/components/expander/types.d.cts +2 -2
- package/build/cjs/components/file/File.cjs +2 -0
- package/build/cjs/components/file/File.cjs.map +1 -0
- package/build/cjs/components/file/File.d.cts +3 -0
- package/build/cjs/components/file/index.cjs +2 -0
- package/build/cjs/components/file/index.cjs.map +1 -0
- package/build/cjs/components/file/index.d.cts +2 -0
- package/build/cjs/components/file/stories/File.stories.cjs +2 -0
- package/build/cjs/components/file/stories/File.stories.cjs.map +1 -0
- package/build/cjs/components/file/stories/File.stories.d.cts +33 -0
- package/build/cjs/components/file/types.cjs +2 -0
- package/build/cjs/components/file/types.cjs.map +1 -0
- package/build/cjs/components/file/types.d.cts +12 -0
- package/build/cjs/components/file-input/FileInput.cjs.map +1 -1
- package/build/cjs/components/file-input/FileInput.d.cts +1 -24
- package/build/cjs/components/file-input/index.cjs +1 -1
- package/build/cjs/components/file-input/index.d.cts +2 -3
- package/build/cjs/components/file-input/internal/Dropzone.cjs +1 -1
- package/build/cjs/components/file-input/internal/Dropzone.cjs.map +1 -1
- package/build/cjs/components/file-input/internal/Input.cjs +1 -1
- package/build/cjs/components/file-input/internal/Input.cjs.map +1 -1
- package/build/cjs/components/file-input/internal/fileInputContext.cjs.map +1 -1
- package/build/cjs/components/file-input/internal/fileInputContext.d.cts +3 -3
- package/build/cjs/components/file-input/internal/validateFileInputFiles.cjs +2 -0
- package/build/cjs/components/file-input/internal/validateFileInputFiles.cjs.map +1 -0
- package/build/cjs/components/file-input/internal/validateFileInputFiles.d.cts +2 -0
- package/build/cjs/components/file-input/stories/FileInput.stories.cjs +1 -1
- package/build/cjs/components/file-input/stories/FileInput.stories.cjs.map +1 -1
- package/build/cjs/components/file-input/types.cjs +1 -1
- package/build/cjs/components/file-input/types.d.cts +29 -5
- package/build/cjs/components/index.cjs +1 -1
- package/build/cjs/components/message/types.d.cts +2 -7
- package/build/cjs/components/select/Select.cjs.map +1 -1
- package/build/cjs/components/toggle-switch/usePillStyles.cjs.map +1 -1
- package/build/cjs/components/toggle-switch/usePillStyles.d.cts +1 -1
- package/build/cjs/hooks/useAnimatedHeight/types.d.cts +3 -3
- package/build/cjs/hooks/useAnimatedHeight/useAnimatedHeightBetween.cjs.map +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAutoAnimateHeight.cjs.map +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAutoAnimateHeight.d.cts +2 -2
- package/build/cjs/hooks/useClickOutside/useClickOutside.cjs.map +1 -1
- package/build/cjs/hooks/useClickOutside/useClickOutside.d.cts +1 -1
- package/build/cjs/hooks/useFocusOutside/useFocusOutside.cjs.map +1 -1
- package/build/cjs/hooks/useFocusOutside/useFocusOutside.d.cts +1 -1
- package/build/cjs/hooks/useKeyListener/useKeyListener.cjs.map +1 -1
- package/build/cjs/hooks/useKeyListener/useKeyListener.d.cts +1 -1
- package/build/cjs/hooks/useListNavigation/useListNavigation.cjs.map +1 -1
- package/build/cjs/hooks/useListNavigation/useListNavigation.d.cts +1 -1
- package/build/cjs/hooks/useMutationObserver/useMutationObserver.cjs.map +1 -1
- package/build/cjs/hooks/useMutationObserver/useMutationObserver.d.cts +1 -1
- package/build/cjs/hooks/useScrollIntoView/useScrollIntoView.cjs.map +1 -1
- package/build/cjs/hooks/useScrollIntoView/useScrollIntoView.d.cts +1 -1
- package/build/cjs/index.cjs +1 -1
- package/build/es/components/expander/types.d.ts +2 -2
- package/build/es/components/file/File.d.ts +3 -0
- package/build/es/components/file/File.js +2 -0
- package/build/es/components/file/File.js.map +1 -0
- package/build/es/components/file/index.d.ts +2 -0
- package/build/es/components/file/index.js +2 -0
- package/build/es/components/file/index.js.map +1 -0
- package/build/es/components/file/stories/File.stories.d.ts +33 -0
- package/build/es/components/file/stories/File.stories.js +2 -0
- package/build/es/components/file/stories/File.stories.js.map +1 -0
- package/build/es/components/file/types.d.ts +12 -0
- package/build/es/components/file/types.js +2 -0
- package/build/es/components/file/types.js.map +1 -0
- package/build/es/components/file-input/FileInput.d.ts +1 -24
- package/build/es/components/file-input/FileInput.js.map +1 -1
- package/build/es/components/file-input/index.d.ts +2 -3
- package/build/es/components/file-input/index.js +1 -1
- package/build/es/components/file-input/internal/Dropzone.js +1 -1
- package/build/es/components/file-input/internal/Dropzone.js.map +1 -1
- package/build/es/components/file-input/internal/Input.js +1 -1
- package/build/es/components/file-input/internal/Input.js.map +1 -1
- package/build/es/components/file-input/internal/fileInputContext.d.ts +3 -3
- package/build/es/components/file-input/internal/fileInputContext.js.map +1 -1
- package/build/es/components/file-input/internal/validateFileInputFiles.d.ts +2 -0
- package/build/es/components/file-input/internal/{validateFile.js → validateFileInputFiles.js} +2 -2
- package/build/es/components/file-input/internal/validateFileInputFiles.js.map +1 -0
- package/build/es/components/file-input/stories/FileInput.stories.js +1 -1
- package/build/es/components/file-input/stories/FileInput.stories.js.map +1 -1
- package/build/es/components/file-input/types.d.ts +29 -5
- package/build/es/components/file-input/types.js +1 -1
- package/build/es/components/index.js +1 -1
- package/build/es/components/message/types.d.ts +2 -7
- package/build/es/components/select/Select.js.map +1 -1
- package/build/es/components/toggle-switch/usePillStyles.d.ts +1 -1
- package/build/es/components/toggle-switch/usePillStyles.js.map +1 -1
- package/build/es/hooks/useAnimatedHeight/types.d.ts +3 -3
- package/build/es/hooks/useAnimatedHeight/useAnimatedHeightBetween.js.map +1 -1
- package/build/es/hooks/useAnimatedHeight/useAutoAnimateHeight.d.ts +2 -2
- package/build/es/hooks/useAnimatedHeight/useAutoAnimateHeight.js.map +1 -1
- package/build/es/hooks/useClickOutside/useClickOutside.d.ts +1 -1
- package/build/es/hooks/useClickOutside/useClickOutside.js.map +1 -1
- package/build/es/hooks/useFocusOutside/useFocusOutside.d.ts +1 -1
- package/build/es/hooks/useFocusOutside/useFocusOutside.js.map +1 -1
- package/build/es/hooks/useKeyListener/useKeyListener.d.ts +1 -1
- package/build/es/hooks/useKeyListener/useKeyListener.js.map +1 -1
- package/build/es/hooks/useListNavigation/useListNavigation.d.ts +1 -1
- package/build/es/hooks/useListNavigation/useListNavigation.js.map +1 -1
- package/build/es/hooks/useMutationObserver/useMutationObserver.d.ts +1 -1
- package/build/es/hooks/useMutationObserver/useMutationObserver.js.map +1 -1
- package/build/es/hooks/useScrollIntoView/useScrollIntoView.d.ts +1 -1
- package/build/es/hooks/useScrollIntoView/useScrollIntoView.js.map +1 -1
- package/build/es/index.js +1 -1
- package/build/jokul.css +1 -1
- package/package.json +12 -1
- package/styles/components/checkbox/checkbox.css +4 -4
- package/styles/components/checkbox/checkbox.min.css +1 -1
- package/styles/components/checkbox-panel/checkbox-panel.css +2 -2
- package/styles/components/checkbox-panel/checkbox-panel.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/_index.scss +3 -0
- package/styles/components/file/file.css +144 -0
- package/styles/components/file/file.min.css +1 -0
- package/styles/components/file/file.scss +164 -0
- package/styles/components/file-input/_index.scss +1 -0
- package/styles/components/file-input/file-input.css +511 -129
- package/styles/components/file-input/file-input.min.css +1 -1
- package/styles/components/file-input/file-input.scss +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 +5 -5
- 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/radio-button/radio-button.css +2 -2
- package/styles/components/radio-button/radio-button.min.css +1 -1
- package/styles/components/radio-panel/radio-panel.css +2 -2
- package/styles/components/radio-panel/radio-panel.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/styles.css +36 -36
- package/styles/styles.min.css +1 -1
- package/build/cjs/components/file-input/File.cjs +0 -2
- package/build/cjs/components/file-input/File.cjs.map +0 -1
- package/build/cjs/components/file-input/File.d.cts +0 -14
- package/build/cjs/components/file-input/internal/Thumbnail.cjs +0 -2
- package/build/cjs/components/file-input/internal/Thumbnail.cjs.map +0 -1
- package/build/cjs/components/file-input/internal/Thumbnail.d.cts +0 -11
- package/build/cjs/components/file-input/internal/validateFile.cjs +0 -2
- package/build/cjs/components/file-input/internal/validateFile.cjs.map +0 -1
- package/build/cjs/components/file-input/internal/validateFile.d.cts +0 -2
- package/build/cjs/components/file-input/stories/File.stories.cjs +0 -2
- package/build/cjs/components/file-input/stories/File.stories.cjs.map +0 -1
- package/build/cjs/components/file-input/stories/File.stories.d.cts +0 -17
- package/build/cjs/components/file-input/stories/FileInput.stories.d.cts +0 -13
- package/build/cjs/components/file-input/stories/fileBytes.cjs +0 -2
- package/build/cjs/components/file-input/stories/fileBytes.cjs.map +0 -1
- package/build/cjs/components/file-input/stories/fileBytes.d.cts +0 -2
- package/build/es/components/file-input/File.d.ts +0 -14
- package/build/es/components/file-input/File.js +0 -2
- package/build/es/components/file-input/File.js.map +0 -1
- package/build/es/components/file-input/internal/Thumbnail.d.ts +0 -11
- package/build/es/components/file-input/internal/Thumbnail.js +0 -2
- package/build/es/components/file-input/internal/Thumbnail.js.map +0 -1
- package/build/es/components/file-input/internal/validateFile.d.ts +0 -2
- package/build/es/components/file-input/internal/validateFile.js.map +0 -1
- package/build/es/components/file-input/stories/File.stories.d.ts +0 -17
- package/build/es/components/file-input/stories/File.stories.js +0 -2
- package/build/es/components/file-input/stories/File.stories.js.map +0 -1
- package/build/es/components/file-input/stories/FileInput.stories.d.ts +0 -13
- package/build/es/components/file-input/stories/fileBytes.d.ts +0 -2
- package/build/es/components/file-input/stories/fileBytes.js +0 -2
- package/build/es/components/file-input/stories/fileBytes.js.map +0 -1
- package/build/index-C4ABwKfA.js +0 -20
- package/build/index-C4ABwKfA.js.map +0 -1
- package/build/index-ZdY5zxEI.cjs +0 -20
- package/build/index-ZdY5zxEI.cjs.map +0 -1
- package/build/style.css +0 -1
- package/styles/components/file-input/_file.scss +0 -176
- package/styles/components/file-input/development/public/fonts/_index.scss +0 -1
- package/styles/components/file-input/development/public/fonts/webfonts.css +0 -108
- package/styles/components/file-input/development/public/fonts/webfonts.min.css +0 -1
- package/styles/components/file-input/development/public/fonts/webfonts.scss +0 -137
- package/styles/components/menu/development/public/fonts/_index.scss +0 -1
- package/styles/components/menu/development/public/fonts/webfonts.css +0 -108
- package/styles/components/menu/development/public/fonts/webfonts.min.css +0 -1
- package/styles/components/menu/development/public/fonts/webfonts.scss +0 -137
- package/styles/vind/_flex.scss +0 -113
- package/styles/vind/_font.scss +0 -19
- package/styles/vind/_index.scss +0 -1
- package/styles/vind/_margin.scss +0 -43
- package/styles/vind/_padding.scss +0 -43
- package/styles/vind/_space-between.scss +0 -13
- package/styles/vind/_typography.scss +0 -47
- package/styles/vind/vind.css +0 -1756
- package/styles/vind/vind.min.css +0 -1
- package/styles/vind/vind.scss +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fremtind/jokul",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.70.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -251,6 +251,17 @@
|
|
|
251
251
|
"default": "./build/cjs/components/feedback/index.cjs"
|
|
252
252
|
}
|
|
253
253
|
},
|
|
254
|
+
"./styles/components/file": "./styles/components/file/_index.scss",
|
|
255
|
+
"./components/file": {
|
|
256
|
+
"import": {
|
|
257
|
+
"types": "./build/es/components/file/index.d.ts",
|
|
258
|
+
"default": "./build/es/components/file/index.js"
|
|
259
|
+
},
|
|
260
|
+
"require": {
|
|
261
|
+
"types": "./build/cjs/components/file/index.d.cts",
|
|
262
|
+
"default": "./build/cjs/components/file/index.cjs"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
254
265
|
"./styles/components/file-input": "./styles/components/file-input/_index.scss",
|
|
255
266
|
"./components/file-input": {
|
|
256
267
|
"import": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
--jkl-checkbox-line-height: 1.5rem;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
@keyframes jkl-checkbox-checked-
|
|
35
|
+
@keyframes jkl-checkbox-checked-uyppce5 {
|
|
36
36
|
0% {
|
|
37
37
|
width: 0;
|
|
38
38
|
height: 0;
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
height: 58%;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
@keyframes jkl-checkbox-indeterminate-
|
|
49
|
+
@keyframes jkl-checkbox-indeterminate-uyppcf3 {
|
|
50
50
|
0% {
|
|
51
51
|
width: 0;
|
|
52
52
|
}
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
left: calc(-0.5 * var(--jkl-checkbox-box-size));
|
|
76
76
|
}
|
|
77
77
|
.jkl-checkbox__input:checked + .jkl-checkbox__label .jkl-checkbox__check-mark::after {
|
|
78
|
-
animation: jkl-checkbox-checked-
|
|
78
|
+
animation: jkl-checkbox-checked-uyppce5 150ms ease-in-out forwards;
|
|
79
79
|
opacity: 1;
|
|
80
80
|
}
|
|
81
81
|
.jkl-checkbox__input:indeterminate:not(:checked) + .jkl-checkbox__label .jkl-checkbox__indeterminate-mark::after {
|
|
82
|
-
animation: jkl-checkbox-indeterminate-
|
|
82
|
+
animation: jkl-checkbox-indeterminate-uyppcf3 150ms ease-in-out forwards;
|
|
83
83
|
opacity: 1;
|
|
84
84
|
}
|
|
85
85
|
.jkl-checkbox__input:focus-visible + .jkl-checkbox__label {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-font-size:var(--jkl-body-font-size);--jkl-checkbox-line-height:var(--jkl-body-line-height);--jkl-checkbox-font-weight:var(--jkl-body-font-weight);--jkl-checkbox-height:3rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:2rem}@media (width >= 0) and (max-width:679px){:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-height:2.5rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:1.75rem}}[data-density=compact],[data-layout-density=compact]{--jkl-checkbox-font-size:var(--jkl-small-font-size);--jkl-checkbox-line-height:var(--jkl-small-line-height);--jkl-checkbox-font-weight:var(--jkl-small-font-weight);--jkl-checkbox-height:1.75rem;--jkl-checkbox-box-size:1.125rem;--jkl-checkbox-line-height:1.5rem}@keyframes jkl-checkbox-checked-
|
|
1
|
+
:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-font-size:var(--jkl-body-font-size);--jkl-checkbox-line-height:var(--jkl-body-line-height);--jkl-checkbox-font-weight:var(--jkl-body-font-weight);--jkl-checkbox-height:3rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:2rem}@media (width >= 0) and (max-width:679px){:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-height:2.5rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:1.75rem}}[data-density=compact],[data-layout-density=compact]{--jkl-checkbox-font-size:var(--jkl-small-font-size);--jkl-checkbox-line-height:var(--jkl-small-line-height);--jkl-checkbox-font-weight:var(--jkl-small-font-weight);--jkl-checkbox-height:1.75rem;--jkl-checkbox-box-size:1.125rem;--jkl-checkbox-line-height:1.5rem}@keyframes jkl-checkbox-checked-uyppce5{0%{height:0;width:0}40%{height:0;width:18%}to{height:58%;width:18%}}@keyframes jkl-checkbox-indeterminate-uyppcf3{0%{width:0}to{width:66%}}.jkl-checkbox{--box-color:var(--jkl-color-border-action);--check-color:var(--jkl-color-border-action);--text-color:var(--jkl-color-text-default);--background-color:#0000;color:var(--text-color);display:flex;flex-wrap:wrap;font-size:var(--jkl-checkbox-font-size);font-weight:var(--jkl-checkbox-font-weight);line-height:var(--jkl-checkbox-line-height);min-height:var(--jkl-checkbox-height);position:relative}.jkl-checkbox__input{left:calc(var(--jkl-checkbox-box-size)*-.5);opacity:0;position:absolute;top:var(--jkl-checkbox-box-size)}.jkl-checkbox__input:checked+.jkl-checkbox__label .jkl-checkbox__check-mark:after{animation:jkl-checkbox-checked-uyppce5 .15s ease-in-out forwards;opacity:1}.jkl-checkbox__input:indeterminate:not(:checked)+.jkl-checkbox__label .jkl-checkbox__indeterminate-mark:after{animation:jkl-checkbox-indeterminate-uyppcf3 .15s ease-in-out forwards;opacity:1}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label{color:var(--jkl-checkbox-focus-color)}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label>.jkl-checkbox__mark{outline:3px solid var(--jkl-color-border-action);outline-offset:3px}.jkl-checkbox__input:disabled+.jkl-checkbox__label{color:var(--jkl-checkbox-disabled-color)}.jkl-checkbox__input:active{--background-color:var(--jkl-color-background-input-focus)}.jkl-checkbox__label{cursor:pointer;display:flex;flex-shrink:0;max-width:100%;min-width:0}.jkl-checkbox__label:active .jkl-checkbox__mark,.jkl-checkbox__label:hover .jkl-checkbox__mark{outline:1px solid var(--box-color)}.jkl-checkbox__text{margin:calc((var(--jkl-checkbox-height) - var(--jkl-checkbox-line-height))*.5) 0;transition-duration:.15s;transition-property:color;transition-timing-function:ease;translate:0 .0625rem}.jkl-checkbox__mark{box-sizing:border-box;height:var(--jkl-checkbox-box-size);margin-block:calc((var(--jkl-checkbox-height) - var(--jkl-checkbox-box-size))*.5);position:relative;width:var(--jkl-checkbox-box-size);-webkit-margin-end:var(--jkl-unit-10);align-self:flex-start;background-color:var(--background-color);border:1px solid;border-color:var(--box-color);border-radius:0;flex-shrink:0;margin-inline-end:var(--jkl-unit-10);outline:none;transition-duration:.15s;transition-property:background-color;transition-timing-function:ease}@media screen and (forced-colors:active){.jkl-checkbox__mark{border:1px solid ButtonText;outline:revert}}.jkl-checkbox__check-mark:after{border-bottom:.125rem solid var(--check-color);border-left-width:.125rem;border-left:0 solid var(--check-color);border-right:.125rem solid var(--check-color);border-top-width:.125rem;border-top:0 solid var(--check-color);bottom:42%;content:"";display:block;height:58%;left:18%;opacity:0;position:absolute;transform:rotate(45deg);transform-origin:bottom left;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:18%}@media screen and (forced-colors:active){.jkl-checkbox__check-mark:after{border-color:ButtonText}}.jkl-checkbox__indeterminate-mark:after{--width:66%;--thickness:0.125rem;border-bottom:solid var(--thickness) var(--check-color);bottom:calc(50% - var(--thickness)/2);content:"";display:block;left:calc((100% - var(--width))/2);opacity:0;position:absolute;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:var(--width)}@media screen and (forced-colors:active){.jkl-checkbox__indeterminate-mark:after{border-color:ButtonText}}.jkl-checkbox--inline{display:inline-flex}.jkl-checkbox--inline:not(:last-of-type){margin-right:calc(var(--jkl-unit-10)*3)}.jkl-checkbox--error{--background-color:var(--jkl-color-background-alert-error);--check-color:var(--jkl-color-text-on-alert)}
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
--outer-border-thickness: 0.125rem;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
@keyframes jkl-checkbox-checked-
|
|
65
|
+
@keyframes jkl-checkbox-checked-umsdkoz {
|
|
66
66
|
0% {
|
|
67
67
|
width: 0;
|
|
68
68
|
height: 0;
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
.jkl-checkbox-panel:has(:checked) .jkl-checkbox-panel__decorator::after {
|
|
128
|
-
animation: jkl-checkbox-checked-
|
|
128
|
+
animation: jkl-checkbox-checked-umsdkoz 150ms ease-in-out forwards;
|
|
129
129
|
opacity: 1;
|
|
130
130
|
}
|
|
131
131
|
.jkl-checkbox-panel:has([aria-invalid=true]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.jkl-input-panel{--outer-border-color:var(--jkl-color-border-input);--outer-border-thickness:0.0625rem;--background-color:#0000;background-color:var(--background-color);border-radius:4px;box-shadow:inset 0 0 0 var(--outer-border-thickness) var(--outer-border-color);cursor:pointer;padding-left:1rem}.jkl-input-panel__input{opacity:0;position:absolute;top:-6px}.jkl-input-panel__label{align-items:center;cursor:pointer;display:grid;gap:.5rem;grid-template-columns:-webkit-min-content fit-content(30%) 1fr;grid-template-columns:min-content fit-content(30%) 1fr}.jkl-input-panel__main-label{padding-block:1.5rem}.jkl-input-panel__extra-label{align-self:stretch;margin-left:1rem;margin-right:1rem}.jkl-input-panel__extra-label>:first-child{padding-right:1rem}.jkl-input-panel__extra-label--text{align-items:center;display:flex;height:100%}.jkl-input-panel__content{cursor:default;height:0;overflow:hidden;padding-right:1.5rem}.jkl-input-panel:has([aria-expanded=true]) .jkl-input-panel__content,.jkl-input-panel__content[data-alwaysopen=true]{height:auto;padding-bottom:24px}.jkl-input-panel:has(:focus-visible){outline:3px solid var(--jkl-color-border-action);outline-offset:3px}.jkl-input-panel:has(:checked){--background-color:var(--jkl-color-background-container-high)}.jkl-input-panel:hover{--outer-border-color:var(--jkl-color-border-separator-hover);--outer-border-thickness:0.125rem}@keyframes jkl-checkbox-checked-
|
|
1
|
+
.jkl-input-panel{--outer-border-color:var(--jkl-color-border-input);--outer-border-thickness:0.0625rem;--background-color:#0000;background-color:var(--background-color);border-radius:4px;box-shadow:inset 0 0 0 var(--outer-border-thickness) var(--outer-border-color);cursor:pointer;padding-left:1rem}.jkl-input-panel__input{opacity:0;position:absolute;top:-6px}.jkl-input-panel__label{align-items:center;cursor:pointer;display:grid;gap:.5rem;grid-template-columns:-webkit-min-content fit-content(30%) 1fr;grid-template-columns:min-content fit-content(30%) 1fr}.jkl-input-panel__main-label{padding-block:1.5rem}.jkl-input-panel__extra-label{align-self:stretch;margin-left:1rem;margin-right:1rem}.jkl-input-panel__extra-label>:first-child{padding-right:1rem}.jkl-input-panel__extra-label--text{align-items:center;display:flex;height:100%}.jkl-input-panel__content{cursor:default;height:0;overflow:hidden;padding-right:1.5rem}.jkl-input-panel:has([aria-expanded=true]) .jkl-input-panel__content,.jkl-input-panel__content[data-alwaysopen=true]{height:auto;padding-bottom:24px}.jkl-input-panel:has(:focus-visible){outline:3px solid var(--jkl-color-border-action);outline-offset:3px}.jkl-input-panel:has(:checked){--background-color:var(--jkl-color-background-container-high)}.jkl-input-panel:hover{--outer-border-color:var(--jkl-color-border-separator-hover);--outer-border-thickness:0.125rem}@keyframes jkl-checkbox-checked-umsdkoz{0%{height:0;width:0}40%{height:0;width:18%}to{height:58%;width:18%}}.jkl-checkbox-panel{--checkbox-background-color:#0000;--checkbox-box-color:var(--jkl-color-border-action);--checkbox-check-color:var(--jkl-color-border-action)}.jkl-checkbox-panel__decorator{background-color:var(--checkbox-background-color);border:1px solid;border-color:var(--checkbox-box-color);border-radius:0;box-sizing:border-box;height:var(--jkl-checkbox-box-size);outline:none;position:relative;transition-duration:.15s;transition-property:background-color;transition-timing-function:ease;width:var(--jkl-checkbox-box-size)}@media screen and (forced-colors:active){.jkl-checkbox-panel__decorator{border:1px solid ButtonText;outline:revert}}.jkl-checkbox-panel__decorator:after{border-bottom:.125rem solid var(--checkbox-check-color);border-left-width:.125rem;border-left:0 solid var(--checkbox-check-color);border-right:.125rem solid var(--checkbox-check-color);border-top-width:.125rem;border-top:0 solid var(--checkbox-check-color);bottom:42%;content:"";display:block;height:58%;left:18%;opacity:0;position:absolute;transform:rotate(45deg);transform-origin:bottom left;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:18%}@media screen and (forced-colors:active){.jkl-checkbox-panel__decorator:after{border-color:ButtonText}}.jkl-checkbox-panel:has(:checked) .jkl-checkbox-panel__decorator:after{animation:jkl-checkbox-checked-umsdkoz .15s ease-in-out forwards;opacity:1}.jkl-checkbox-panel:has([aria-invalid=true]){--checkbox-background-color:var(--jkl-color-background-alert-error);--checkbox-check-color:var(--jkl-color-text-on-alert)}
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
.jkl-countdown__tracker {
|
|
29
|
-
animation: jkl-downcount-
|
|
29
|
+
animation: jkl-downcount-usttspz var(--duration) linear forwards;
|
|
30
30
|
animation-play-state: var(--play-state, running);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
@keyframes jkl-downcount-
|
|
33
|
+
@keyframes jkl-downcount-usttspz {
|
|
34
34
|
from {
|
|
35
35
|
width: 100%;
|
|
36
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.jkl-countdown{--track-color:var(--jkl-color-border-separator);--bar-color:var(--jkl-color-border-input-focus);--bar-height:0.25rem;background-color:var(--track-color);border-radius:6.25rem;height:var(--bar-height);overflow:hidden;width:100%}.jkl-countdown__tracker{background-color:var(--bar-color);display:block;height:var(--bar-height)}@media screen and (forced-colors:active){.jkl-countdown{background-color:Canvas}.jkl-countdown__tracker{background-color:CanvasText}}.jkl-countdown__tracker{animation:jkl-downcount-
|
|
1
|
+
.jkl-countdown{--track-color:var(--jkl-color-border-separator);--bar-color:var(--jkl-color-border-input-focus);--bar-height:0.25rem;background-color:var(--track-color);border-radius:6.25rem;height:var(--bar-height);overflow:hidden;width:100%}.jkl-countdown__tracker{background-color:var(--bar-color);display:block;height:var(--bar-height)}@media screen and (forced-colors:active){.jkl-countdown{background-color:Canvas}.jkl-countdown__tracker{background-color:CanvasText}}.jkl-countdown__tracker{animation:jkl-downcount-usttspz var(--duration) linear forwards;animation-play-state:var(--play-state,running)}@keyframes jkl-downcount-usttspz{0%{width:100%}to{width:0}}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Do not edit directly
|
|
3
3
|
* Generated on Wed, 18 Dec 2024 12:25:37 GMT
|
|
4
4
|
*/
|
|
5
|
-
@keyframes jkl-show-
|
|
5
|
+
@keyframes jkl-show-u7rdvff {
|
|
6
6
|
from {
|
|
7
7
|
transform: translate3d(0, 0.5rem, 0);
|
|
8
8
|
opacity: 0;
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
.jkl-feedback__fade-in {
|
|
40
|
-
animation: jkl-show-
|
|
40
|
+
animation: jkl-show-u7rdvff 0.25s ease-out;
|
|
41
41
|
}
|
|
42
42
|
.jkl-feedback__buttons {
|
|
43
43
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes jkl-show-
|
|
1
|
+
@keyframes jkl-show-u7rdvff{0%{opacity:0;transform:translate3d(0,.5rem,0)}}.jkl-feedback{max-width:34.375rem}.jkl-feedback__submit-wrapper{transition-duration:.25s;transition-property:height;transition-timing-function:ease;width:100%}.jkl-feedback__submit-wrapper--hidden{display:none}.jkl-feedback__step-counter{color:var(--jkl-color-text-subdued);font-size:1.125rem;font-weight:400;line-height:1.75rem;margin-bottom:calc(var(--jkl-unit-10)*2);--jkl-icon-weight:300}@media (min-width:680px){.jkl-feedback__step-counter{font-size:1.25rem;font-weight:400;line-height:2rem;--jkl-icon-weight:300}}.jkl-feedback__fade-in{animation:jkl-show-u7rdvff .25s ease-out}.jkl-feedback__buttons{display:flex}.jkl-feedback-smileys{display:flex;flex-wrap:nowrap;gap:.75rem;justify-content:space-between;margin-top:.5rem;max-width:22.5rem;width:100%}.jkl-feedback-smiley-option{color:var(--jkl-color-text-subdued);cursor:pointer;display:inline-block;height:2.5rem;position:relative;transform:translateZ(0);transition-duration:.15s;transition-property:transform,color;transition-timing-function:ease;width:2.5rem}@media screen and (forced-colors:active){.jkl-feedback-smiley-option,.jkl-feedback-smiley-option path,.jkl-feedback-smiley-option svg{stroke:ButtonFace;fill:ButtonText}}.jkl-feedback-smiley-option:after,.jkl-feedback-smiley-option:before{border-radius:50%;content:"";opacity:0;position:absolute;transition-duration:.15s;transition-property:opacity;transition-timing-function:ease}.jkl-feedback-smiley-option:after{box-shadow:0 0 0 .125rem currentColor;inset:-.125rem -.125rem -.125rem -.125rem}.jkl-feedback-smiley-option:before{box-shadow:0 .125rem 1.875rem #0000001a;inset:0}.jkl-feedback-smiley-option:hover{color:var(--jkl-color-text-default)}input:checked+.jkl-feedback-smiley-option{color:var(--jkl-color-text-default);transform:translate3d(0,-20%,0)}html:not([data-mousenavigation]):not([data-touchnavigation]) input:focus+.jkl-feedback-smiley-option:after,input:checked+.jkl-feedback-smiley-option:before{opacity:1}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly
|
|
3
|
+
* Generated on Wed, 18 Dec 2024 12:25:37 GMT
|
|
4
|
+
*/
|
|
5
|
+
:root,
|
|
6
|
+
[data-layout-density=comfortable],
|
|
7
|
+
[data-density=comfortable] {
|
|
8
|
+
--jkl-file-padding: 0.5rem;
|
|
9
|
+
--jkl-file-thumbnail-width: calc(var(--jkl-unit-10) * 7);
|
|
10
|
+
--jkl-file-thumbnail-max-height: 120px;
|
|
11
|
+
--jkl-file-thumbnail-aspect-ratio: 1;
|
|
12
|
+
--jkl-file-gap: 0.5rem calc(var(--jkl-unit-10) * 2);
|
|
13
|
+
--jkl-file-button-width: calc(var(--jkl-unit-10) * 5);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
[data-layout-density=compact],
|
|
17
|
+
[data-density=compact] {
|
|
18
|
+
--jkl-file-padding: 0.5rem;
|
|
19
|
+
--jkl-file-thumbnail-width: calc(var(--jkl-unit-10) * 5);
|
|
20
|
+
--jkl-file-thumbnail-max-height: 80px;
|
|
21
|
+
--jkl-file-thumbnail-aspect-ratio: 1;
|
|
22
|
+
--jkl-file-gap: calc(var(--jkl-unit-10) * 0.5) 0.5rem;
|
|
23
|
+
--jkl-file-button-width: calc(var(--jkl-unit-10) * 4);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.jkl-file {
|
|
27
|
+
--text-color: var(--jkl-color-text-default);
|
|
28
|
+
--border: 1px solid var(--jkl-color-border-separator);
|
|
29
|
+
--border-radius: 2px;
|
|
30
|
+
--bg: transparent;
|
|
31
|
+
}
|
|
32
|
+
.jkl-file__content {
|
|
33
|
+
transition-timing-function: ease;
|
|
34
|
+
transition-duration: 100ms;
|
|
35
|
+
transition-property: background-color, border-color, color;
|
|
36
|
+
color: var(--jkl-color-text-default);
|
|
37
|
+
padding: var(--jkl-file-padding);
|
|
38
|
+
border: var(--border);
|
|
39
|
+
border-radius: var(--border-radius);
|
|
40
|
+
background: var(--bg);
|
|
41
|
+
display: grid;
|
|
42
|
+
grid-template-columns: var(--jkl-file-thumbnail-width) 1fr var(--jkl-file-button-width);
|
|
43
|
+
grid-template-areas: "image text button";
|
|
44
|
+
gap: var(--jkl-file-gap);
|
|
45
|
+
align-items: center;
|
|
46
|
+
height: fit-content;
|
|
47
|
+
}
|
|
48
|
+
.jkl-file__content__name {
|
|
49
|
+
font-size: 1rem;
|
|
50
|
+
line-height: 1.5rem;
|
|
51
|
+
font-weight: 400;
|
|
52
|
+
--jkl-icon-weight: 300;
|
|
53
|
+
--jkl-icon-size: 1.25rem;
|
|
54
|
+
--jkl-icon-opsz: 20;
|
|
55
|
+
grid-area: text;
|
|
56
|
+
word-break: break-word;
|
|
57
|
+
}
|
|
58
|
+
.jkl-file__content__name__size {
|
|
59
|
+
word-break: keep-all;
|
|
60
|
+
}
|
|
61
|
+
.jkl-file__content__delete {
|
|
62
|
+
aspect-ratio: 1;
|
|
63
|
+
grid-area: button;
|
|
64
|
+
}
|
|
65
|
+
.jkl-file__content__thumbnail {
|
|
66
|
+
width: 100%;
|
|
67
|
+
aspect-ratio: var(--jkl-file-thumbnail-aspect-ratio);
|
|
68
|
+
object-fit: cover;
|
|
69
|
+
max-height: var(--jkl-file-thumbnail-max-height);
|
|
70
|
+
grid-area: image;
|
|
71
|
+
position: relative;
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
background: var(--jkl-color-background-container-low);
|
|
76
|
+
border-radius: 2px;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
container-type: inline-size;
|
|
79
|
+
}
|
|
80
|
+
.jkl-file__content__thumbnail img {
|
|
81
|
+
z-index: 0;
|
|
82
|
+
}
|
|
83
|
+
.jkl-file__content__thumbnail img[src] {
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 100%;
|
|
86
|
+
object-fit: cover;
|
|
87
|
+
}
|
|
88
|
+
.jkl-file__content__thumbnail::before, .jkl-file__content__thumbnail::after {
|
|
89
|
+
position: absolute;
|
|
90
|
+
z-index: 1;
|
|
91
|
+
}
|
|
92
|
+
.jkl-file[class*=card] {
|
|
93
|
+
--jkl-file-thumbnail-width: 100%;
|
|
94
|
+
--jkl-file-thumbnail-aspect-ratio: 16/9;
|
|
95
|
+
}
|
|
96
|
+
.jkl-file[class*=card] .jkl-file__content {
|
|
97
|
+
grid-template-columns: 1fr var(--jkl-file-button-width);
|
|
98
|
+
grid-template-rows: var(--jkl-file-thumbnail-max-height) auto;
|
|
99
|
+
grid-template-areas: "image image" "text button";
|
|
100
|
+
}
|
|
101
|
+
.jkl-file:not([data-state*=loading]) .jkl-file__content__thumbnail:not(:has(img[src]))::before {
|
|
102
|
+
font-size: 1rem;
|
|
103
|
+
line-height: 1.5rem;
|
|
104
|
+
font-weight: 400;
|
|
105
|
+
--jkl-icon-weight: 300;
|
|
106
|
+
--jkl-icon-size: 1.25rem;
|
|
107
|
+
--jkl-icon-opsz: 20;
|
|
108
|
+
content: attr(data-filetype);
|
|
109
|
+
}
|
|
110
|
+
.jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__content__thumbnail img {
|
|
111
|
+
opacity: 0.25;
|
|
112
|
+
}
|
|
113
|
+
.jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__content__thumbnail::after {
|
|
114
|
+
--scale: scale(0.3, 0.3);
|
|
115
|
+
--scale-end: scale(0.1, 0.1);
|
|
116
|
+
--rotation: 45deg;
|
|
117
|
+
content: ""/"Laster opp";
|
|
118
|
+
height: 100%;
|
|
119
|
+
min-height: 24px;
|
|
120
|
+
max-height: 2lh;
|
|
121
|
+
aspect-ratio: 1;
|
|
122
|
+
background: var(--text-color);
|
|
123
|
+
transform: var(--scale) rotate(var(--rotation));
|
|
124
|
+
animation: pulse 2500ms linear forwards infinite;
|
|
125
|
+
}
|
|
126
|
+
@keyframes pulse {
|
|
127
|
+
from {
|
|
128
|
+
transform: var(--scale) rotate(var(--rotation));
|
|
129
|
+
}
|
|
130
|
+
50% {
|
|
131
|
+
transform: var(--scale-end) rotate(calc(var(--rotation) + 0.5turn));
|
|
132
|
+
}
|
|
133
|
+
to {
|
|
134
|
+
transform: var(--scale) rotate(calc(var(--rotation) + 1turn));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
.jkl-file[data-state=error] {
|
|
138
|
+
--bg: var(--jkl-color-functional-error);
|
|
139
|
+
}
|
|
140
|
+
.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 {
|
|
141
|
+
--text-color: var(--jkl-color-text-on-alert);
|
|
142
|
+
--link-color: var(--text-color);
|
|
143
|
+
--jkl-color-border-action: currentColor;
|
|
144
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-file-padding:0.5rem;--jkl-file-thumbnail-width:calc(var(--jkl-unit-10)*7);--jkl-file-thumbnail-max-height:120px;--jkl-file-thumbnail-aspect-ratio:1;--jkl-file-gap:0.5rem calc(var(--jkl-unit-10)*2);--jkl-file-button-width:calc(var(--jkl-unit-10)*5)}[data-density=compact],[data-layout-density=compact]{--jkl-file-padding:0.5rem;--jkl-file-thumbnail-width:calc(var(--jkl-unit-10)*5);--jkl-file-thumbnail-max-height:80px;--jkl-file-thumbnail-aspect-ratio:1;--jkl-file-gap:calc(var(--jkl-unit-10)*0.5) 0.5rem;--jkl-file-button-width:calc(var(--jkl-unit-10)*4)}.jkl-file{--text-color:var(--jkl-color-text-default);--border:1px solid var(--jkl-color-border-separator);--border-radius:2px;--bg:#0000}.jkl-file__content{align-items:center;background:var(--bg);border:var(--border);border-radius:var(--border-radius);color:var(--jkl-color-text-default);display:grid;gap:var(--jkl-file-gap);grid-template-areas:"image text button";grid-template-columns:var(--jkl-file-thumbnail-width) 1fr var(--jkl-file-button-width);height:-webkit-fit-content;height:fit-content;padding:var(--jkl-file-padding);transition-duration:.1s;transition-property:background-color,border-color,color;transition-timing-function:ease}.jkl-file__content__name{font-size:1rem;font-weight:400;line-height:1.5rem;--jkl-icon-weight:300;--jkl-icon-size:1.25rem;--jkl-icon-opsz:20;grid-area:text;word-break:break-word}.jkl-file__content__name__size{word-break:keep-all}.jkl-file__content__delete{aspect-ratio:1;grid-area:button}.jkl-file__content__thumbnail{align-items:center;aspect-ratio:var(--jkl-file-thumbnail-aspect-ratio);background:var(--jkl-color-background-container-low);border-radius:2px;container-type:inline-size;display:flex;grid-area:image;justify-content:center;max-height:var(--jkl-file-thumbnail-max-height);object-fit:cover;overflow:hidden;position:relative;width:100%}.jkl-file__content__thumbnail img{z-index:0}.jkl-file__content__thumbnail img[src]{height:100%;object-fit:cover;width:100%}.jkl-file__content__thumbnail:after,.jkl-file__content__thumbnail:before{position:absolute;z-index:1}.jkl-file[class*=card]{--jkl-file-thumbnail-width:100%;--jkl-file-thumbnail-aspect-ratio:16/9}.jkl-file[class*=card] .jkl-file__content{grid-template-areas:"image image" "text button";grid-template-columns:1fr var(--jkl-file-button-width);grid-template-rows:var(--jkl-file-thumbnail-max-height) auto}.jkl-file:not([data-state*=loading]) .jkl-file__content__thumbnail:not(:has(img[src])):before{font-size:1rem;font-weight:400;line-height:1.5rem;--jkl-icon-weight:300;--jkl-icon-size:1.25rem;--jkl-icon-opsz:20;content:attr(data-filetype)}.jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__content__thumbnail img{opacity:.25}.jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__content__thumbnail:after{--scale:scale(0.3,0.3);--scale-end:scale(0.1,0.1);--rotation:45deg;animation:pulse 2.5s linear infinite forwards;aspect-ratio:1;background:var(--text-color);content:""/"Laster opp";height:100%;max-height:2lh;min-height:24px;transform:var(--scale) rotate(var(--rotation))}@keyframes pulse{0%{transform:var(--scale) rotate(var(--rotation))}50%{transform:var(--scale-end) rotate(calc(var(--rotation) + .5turn))}to{transform:var(--scale) rotate(calc(var(--rotation) + 1turn))}}.jkl-file[data-state=error]{--bg:var(--jkl-color-functional-error)}.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-text-on-alert);--link-color:var(--text-color);--jkl-color-border-action:currentColor}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
@use "../../core/jkl";
|
|
2
|
+
@use "../../core/jkl/colors";
|
|
3
|
+
|
|
4
|
+
@include jkl.comfortable-density-variables {
|
|
5
|
+
--jkl-file-padding: #{jkl.$unit-10};
|
|
6
|
+
--jkl-file-thumbnail-width: #{jkl.$unit-70};
|
|
7
|
+
--jkl-file-thumbnail-max-height: 120px;
|
|
8
|
+
--jkl-file-thumbnail-aspect-ratio: 1;
|
|
9
|
+
--jkl-file-gap: #{jkl.$unit-10} #{jkl.$unit-20};
|
|
10
|
+
--jkl-file-button-width: #{jkl.$unit-50};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@include jkl.compact-density-variables {
|
|
14
|
+
--jkl-file-padding: #{jkl.$unit-10};
|
|
15
|
+
--jkl-file-thumbnail-width: #{jkl.$unit-50};
|
|
16
|
+
--jkl-file-thumbnail-max-height: 80px;
|
|
17
|
+
--jkl-file-thumbnail-aspect-ratio: 1;
|
|
18
|
+
--jkl-file-gap: #{jkl.$unit-05} #{jkl.$unit-10};
|
|
19
|
+
--jkl-file-button-width: #{jkl.$unit-40};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.jkl-file {
|
|
23
|
+
--text-color: var(--jkl-color-text-default);
|
|
24
|
+
--border: 1px solid var(--jkl-color-border-separator);
|
|
25
|
+
--border-radius: 2px;
|
|
26
|
+
--bg: transparent;
|
|
27
|
+
|
|
28
|
+
&__content {
|
|
29
|
+
@include jkl.motion(
|
|
30
|
+
"standard",
|
|
31
|
+
"snappy",
|
|
32
|
+
background-color,
|
|
33
|
+
border-color,
|
|
34
|
+
color
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
color: var(--jkl-color-text-default);
|
|
38
|
+
padding: var(--jkl-file-padding);
|
|
39
|
+
border: var(--border);
|
|
40
|
+
border-radius: var(--border-radius);
|
|
41
|
+
background: var(--bg);
|
|
42
|
+
display: grid;
|
|
43
|
+
grid-template-columns: var(--jkl-file-thumbnail-width) 1fr var(--jkl-file-button-width);
|
|
44
|
+
grid-template-areas: "image text button";
|
|
45
|
+
gap: var(--jkl-file-gap);
|
|
46
|
+
align-items: center;
|
|
47
|
+
height: fit-content;
|
|
48
|
+
|
|
49
|
+
&__name {
|
|
50
|
+
@include jkl.text-style("small");
|
|
51
|
+
grid-area: text;
|
|
52
|
+
word-break: break-word;
|
|
53
|
+
|
|
54
|
+
&__size {
|
|
55
|
+
word-break: keep-all;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&__delete {
|
|
60
|
+
aspect-ratio: 1;
|
|
61
|
+
grid-area: button;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&__thumbnail {
|
|
65
|
+
width: 100%;
|
|
66
|
+
aspect-ratio: var(--jkl-file-thumbnail-aspect-ratio);
|
|
67
|
+
object-fit: cover;
|
|
68
|
+
max-height: var(--jkl-file-thumbnail-max-height);
|
|
69
|
+
grid-area: image;
|
|
70
|
+
position: relative;
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
background: var(--jkl-color-background-container-low);
|
|
75
|
+
border-radius: 2px;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
container-type: inline-size;
|
|
78
|
+
|
|
79
|
+
img {
|
|
80
|
+
z-index: 0;
|
|
81
|
+
|
|
82
|
+
&[src] {
|
|
83
|
+
width: 100%;
|
|
84
|
+
height: 100%;
|
|
85
|
+
object-fit: cover;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&::before, &::after {
|
|
90
|
+
position: absolute;
|
|
91
|
+
z-index: 1;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Card view
|
|
97
|
+
&[class*="card"] {
|
|
98
|
+
--jkl-file-thumbnail-width: 100%;
|
|
99
|
+
--jkl-file-thumbnail-aspect-ratio: 16/9;
|
|
100
|
+
|
|
101
|
+
.jkl-file__content {
|
|
102
|
+
grid-template-columns: 1fr var(--jkl-file-button-width);
|
|
103
|
+
grid-template-rows: var(--jkl-file-thumbnail-max-height) auto;
|
|
104
|
+
grid-template-areas: "image image"
|
|
105
|
+
"text button";
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// If the file is not an image
|
|
110
|
+
&:not([data-state*="loading"]) {
|
|
111
|
+
.jkl-file__content__thumbnail:not(:has(img[src]))::before {
|
|
112
|
+
@include jkl.text-style("small");
|
|
113
|
+
|
|
114
|
+
content: attr(data-filetype);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Loading state
|
|
119
|
+
&[data-state="loading"]:not(:has(.jkl-file__support-label)) {
|
|
120
|
+
.jkl-file__content__thumbnail {
|
|
121
|
+
img {
|
|
122
|
+
opacity: 0.25;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&::after {
|
|
126
|
+
--scale: scale(0.3, 0.3);
|
|
127
|
+
--scale-end: scale(0.1, 0.1);
|
|
128
|
+
--rotation: 45deg;
|
|
129
|
+
|
|
130
|
+
content: "" / "Laster opp";
|
|
131
|
+
height: 100%;
|
|
132
|
+
min-height: 24px;
|
|
133
|
+
max-height: 2lh;
|
|
134
|
+
aspect-ratio: 1;
|
|
135
|
+
background: var(--text-color);
|
|
136
|
+
transform: var(--scale) rotate(var(--rotation));
|
|
137
|
+
animation: pulse 2500ms linear forwards infinite;
|
|
138
|
+
|
|
139
|
+
@keyframes pulse {
|
|
140
|
+
from {
|
|
141
|
+
transform: var(--scale) rotate(var(--rotation));
|
|
142
|
+
}
|
|
143
|
+
50% {
|
|
144
|
+
transform: var(--scale-end) rotate(calc(var(--rotation) + 0.5turn));
|
|
145
|
+
}
|
|
146
|
+
to {
|
|
147
|
+
transform: var(--scale) rotate(calc(var(--rotation) + 1turn));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Error state
|
|
155
|
+
&[data-state="error"] {
|
|
156
|
+
--bg: var(--jkl-color-functional-error);
|
|
157
|
+
|
|
158
|
+
&, a, a:hover, button, span {
|
|
159
|
+
--text-color: var(--jkl-color-text-on-alert);
|
|
160
|
+
--link-color: var(--text-color);
|
|
161
|
+
--jkl-color-border-action: currentColor;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|