@bbl-digital/snorre 4.0.21 → 4.0.23
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +117 -31
- package/esm/core/BoxedTable/TableBody/index.js +10 -0
- package/esm/core/BoxedTable/TableBody/styles.js +16 -0
- package/esm/core/Button/Button.stories.js +51 -49
- package/esm/core/Card/index.js +4 -3
- package/esm/core/Checkbox/index.js +32 -9
- package/esm/core/CollapseList/Item.js +4 -3
- package/esm/core/CollapseList/index.js +4 -3
- package/esm/core/Datepicker/Datepicker.stories.js +7 -6
- package/esm/core/DatepickerRange/DatepickerRange.stories.js +4 -3
- package/esm/core/Dropdown/index.js +0 -1
- package/esm/core/DropdownMenu/DropdownMenu.stories.js +34 -26
- package/esm/core/DropdownMenu/DropdownMenuOption.js +2 -0
- package/esm/core/DropdownMenu/index.js +16 -0
- package/esm/core/Editor/Editor.stories.js +31 -30
- package/esm/core/FileInput/index.js +7 -1
- package/esm/core/GoogleButton/GoogleButton.stories.js +4 -4
- package/esm/core/Header/Header.stories.js +42 -45
- package/esm/core/HighlightText/HighlightText.stories.js +11 -11
- package/esm/core/Image/index.js +19 -4
- package/esm/core/ImagePicker/ImagePicker.stories.js +2 -1
- package/esm/core/ImagePicker/index.js +4 -0
- package/esm/core/ImageViewer/index.js +15 -5
- package/esm/core/InfoButton/InfoButton.stories.js +23 -22
- package/esm/core/InfoButton/index.js +4 -0
- package/esm/core/Input/index.js +4 -0
- package/esm/core/private/ButtonOrLink.js +4 -3
- package/lib/core/Autocomplete/styles.d.ts +39 -1
- package/lib/core/Autocomplete/styles.d.ts.map +1 -1
- package/lib/core/Box/styles.d.ts +39 -1
- package/lib/core/Box/styles.d.ts.map +1 -1
- package/lib/core/BoxedTable/TableBody/index.d.ts +7 -0
- package/lib/core/BoxedTable/TableBody/index.d.ts.map +1 -0
- package/lib/core/BoxedTable/TableBody/index.js +10 -0
- package/lib/core/BoxedTable/TableBody/styles.d.ts +6 -0
- package/lib/core/BoxedTable/TableBody/styles.d.ts.map +1 -0
- package/lib/core/BoxedTable/TableBody/styles.js +16 -0
- package/lib/core/Button/Button.stories.d.ts +20 -63
- package/lib/core/Button/Button.stories.d.ts.map +1 -1
- package/lib/core/Button/Button.stories.js +51 -49
- package/lib/core/Button/index.d.ts +54 -3
- package/lib/core/Button/index.d.ts.map +1 -1
- package/lib/core/Card/index.d.ts +14 -15
- package/lib/core/Card/index.d.ts.map +1 -1
- package/lib/core/Card/index.js +4 -3
- package/lib/core/Checkbox/index.d.ts +3 -3
- package/lib/core/Checkbox/index.d.ts.map +1 -1
- package/lib/core/Checkbox/index.js +32 -9
- package/lib/core/CollapseList/Item.d.ts +1 -1
- package/lib/core/CollapseList/Item.d.ts.map +1 -1
- package/lib/core/CollapseList/Item.js +4 -3
- package/lib/core/CollapseList/index.d.ts +1 -1
- package/lib/core/CollapseList/index.d.ts.map +1 -1
- package/lib/core/CollapseList/index.js +4 -3
- package/lib/core/CollapseList/styles.d.ts +39 -1
- package/lib/core/CollapseList/styles.d.ts.map +1 -1
- package/lib/core/Datepicker/Datepicker.stories.d.ts +6 -6
- package/lib/core/Datepicker/Datepicker.stories.d.ts.map +1 -1
- package/lib/core/Datepicker/Datepicker.stories.js +7 -6
- package/lib/core/DatepickerRange/DatepickerRange.stories.d.ts +6 -7
- package/lib/core/DatepickerRange/DatepickerRange.stories.d.ts.map +1 -1
- package/lib/core/DatepickerRange/DatepickerRange.stories.js +4 -3
- package/lib/core/Dropdown/index.d.ts.map +1 -1
- package/lib/core/Dropdown/index.js +0 -1
- package/lib/core/DropdownMenu/DropdownMenu.stories.d.ts +8 -15
- package/lib/core/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
- package/lib/core/DropdownMenu/DropdownMenu.stories.js +34 -26
- package/lib/core/DropdownMenu/DropdownMenuOption.d.ts.map +1 -1
- package/lib/core/DropdownMenu/DropdownMenuOption.js +2 -0
- package/lib/core/DropdownMenu/index.d.ts.map +1 -1
- package/lib/core/DropdownMenu/index.js +16 -0
- package/lib/core/Editor/Editor.stories.d.ts +10 -23
- package/lib/core/Editor/Editor.stories.d.ts.map +1 -1
- package/lib/core/Editor/Editor.stories.js +31 -30
- package/lib/core/FileInput/index.d.ts +3 -1
- package/lib/core/FileInput/index.d.ts.map +1 -1
- package/lib/core/FileInput/index.js +7 -1
- package/lib/core/FileInput/styles.d.ts +39 -1
- package/lib/core/FileInput/styles.d.ts.map +1 -1
- package/lib/core/GoogleButton/GoogleButton.stories.d.ts +6 -7
- package/lib/core/GoogleButton/GoogleButton.stories.d.ts.map +1 -1
- package/lib/core/GoogleButton/GoogleButton.stories.js +4 -4
- package/lib/core/Header/Header.stories.d.ts +13 -35
- package/lib/core/Header/Header.stories.d.ts.map +1 -1
- package/lib/core/Header/Header.stories.js +42 -45
- package/lib/core/HighlightText/HighlightText.stories.d.ts +7 -11
- package/lib/core/HighlightText/HighlightText.stories.d.ts.map +1 -1
- package/lib/core/HighlightText/HighlightText.stories.js +11 -11
- package/lib/core/Image/index.d.ts +1 -0
- package/lib/core/Image/index.d.ts.map +1 -1
- package/lib/core/Image/index.js +19 -4
- package/lib/core/ImagePicker/ImagePicker.stories.d.ts +6 -17
- package/lib/core/ImagePicker/ImagePicker.stories.d.ts.map +1 -1
- package/lib/core/ImagePicker/ImagePicker.stories.js +2 -1
- package/lib/core/ImagePicker/index.d.ts.map +1 -1
- package/lib/core/ImagePicker/index.js +4 -0
- package/lib/core/ImageViewer/index.d.ts.map +1 -1
- package/lib/core/ImageViewer/index.js +15 -5
- package/lib/core/InfoButton/InfoButton.stories.d.ts +10 -23
- package/lib/core/InfoButton/InfoButton.stories.d.ts.map +1 -1
- package/lib/core/InfoButton/InfoButton.stories.js +23 -22
- package/lib/core/InfoButton/index.d.ts.map +1 -1
- package/lib/core/InfoButton/index.js +4 -0
- package/lib/core/InfoButton/styles.d.ts +39 -1
- package/lib/core/InfoButton/styles.d.ts.map +1 -1
- package/lib/core/Input/index.d.ts +1 -1
- package/lib/core/Input/index.d.ts.map +1 -1
- package/lib/core/Input/index.js +4 -0
- package/lib/core/private/ButtonOrLink.d.ts +46 -3
- package/lib/core/private/ButtonOrLink.d.ts.map +1 -1
- package/lib/core/private/ButtonOrLink.js +4 -3
- package/lib/layout/Footer/FooterButton/styles.d.ts +3 -3
- package/lib/layout/Footer/FooterLink/styles.d.ts +3 -3
- package/lib/layout/Menu/MenuTop/styles.d.ts +3 -3
- package/package.json +1 -1
- package/esm/core/Autocomplete/utils/useHandleOptionsHeight.js +0 -16
- package/esm/core/CheckboxController/index.js +0 -22
- package/esm/core/Datepicker/yearMonthForm.js +0 -56
- package/esm/core/EditorOld/config.js +0 -69
- package/esm/core/EditorOld/index.js +0 -147
- package/esm/core/EditorOld/styles.js +0 -65
- package/esm/core/ImageCarousel/index.js +0 -70
- package/esm/core/ImageCarousel/styles.js +0 -58
- package/esm/enums/ModifierKey.js +0 -13
- package/lib/core/Autocomplete/utils/useHandleOptionsHeight.d.ts +0 -7
- package/lib/core/Autocomplete/utils/useHandleOptionsHeight.d.ts.map +0 -1
- package/lib/core/Autocomplete/utils/useHandleOptionsHeight.js +0 -16
- package/lib/core/CheckboxController/index.d.ts +0 -1
- package/lib/core/CheckboxController/index.d.ts.map +0 -1
- package/lib/core/CheckboxController/index.js +0 -22
- package/lib/core/Datepicker/yearMonthForm.d.ts +0 -10
- package/lib/core/Datepicker/yearMonthForm.d.ts.map +0 -1
- package/lib/core/Datepicker/yearMonthForm.js +0 -56
- package/lib/core/EditorOld/config.d.ts +0 -56
- package/lib/core/EditorOld/config.d.ts.map +0 -1
- package/lib/core/EditorOld/config.js +0 -69
- package/lib/core/EditorOld/index.d.ts +0 -39
- package/lib/core/EditorOld/index.d.ts.map +0 -1
- package/lib/core/EditorOld/index.js +0 -147
- package/lib/core/EditorOld/styles.d.ts +0 -23
- package/lib/core/EditorOld/styles.d.ts.map +0 -1
- package/lib/core/EditorOld/styles.js +0 -65
- package/lib/core/ImageCarousel/index.d.ts +0 -11
- package/lib/core/ImageCarousel/index.d.ts.map +0 -1
- package/lib/core/ImageCarousel/index.js +0 -70
- package/lib/core/ImageCarousel/styles.d.ts +0 -26
- package/lib/core/ImageCarousel/styles.d.ts.map +0 -1
- package/lib/core/ImageCarousel/styles.js +0 -58
- package/lib/enums/ModifierKey.d.ts +0 -12
- package/lib/enums/ModifierKey.d.ts.map +0 -1
- package/lib/enums/ModifierKey.js +0 -13
package/esm/core/Image/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
2
2
|
|
3
|
-
import React, { useState } from 'react';
|
3
|
+
import React, { useMemo, useState } from 'react';
|
4
4
|
import { convertBlobToObjectUrl } from '../../utils/image';
|
5
5
|
import styles from './styles';
|
6
6
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
@@ -16,16 +16,31 @@ const Image = ({
|
|
16
16
|
radius,
|
17
17
|
withPlaceholder,
|
18
18
|
fallbackUrl,
|
19
|
+
interactive,
|
19
20
|
...restProps
|
20
21
|
}) => {
|
21
22
|
const [imageLoaded, setImageLoaded] = useState(false);
|
22
23
|
const [imageSrc, setImageSrc] = useState(src || blob && convertBlobToObjectUrl(blob) || undefined);
|
24
|
+
const altText = useMemo(() => {
|
25
|
+
if (!imageLoaded && withPlaceholder) return 'Laster bilde...';
|
26
|
+
if (!imageSrc) return 'Bilde ikke tilgjengelig';
|
27
|
+
return alt;
|
28
|
+
}, [imageLoaded, imageSrc, alt]);
|
29
|
+
const handleLoad = () => {
|
30
|
+
setImageLoaded(true);
|
31
|
+
};
|
32
|
+
const handleError = () => {
|
33
|
+
setImageSrc(fallbackUrl);
|
34
|
+
setImageLoaded(false);
|
35
|
+
};
|
23
36
|
return _jsx("img", {
|
24
37
|
src: imageSrc,
|
25
|
-
alt:
|
26
|
-
onLoad: withPlaceholder ? () =>
|
27
|
-
onError: fallbackUrl ? () =>
|
38
|
+
alt: altText,
|
39
|
+
onLoad: withPlaceholder ? () => handleLoad() : undefined,
|
40
|
+
onError: fallbackUrl ? () => handleError() : undefined,
|
28
41
|
css: theme => [height && styles.height(height), width && styles.width(width), responsive && styles.responsive, objectFit && styles.objectFit(objectFit), withPlaceholder && !imageLoaded && styles.placeholder(theme), radius && styles.radius(radius), css && css],
|
42
|
+
tabIndex: interactive ? 0 : undefined,
|
43
|
+
role: interactive ? 'button' : undefined,
|
29
44
|
...restProps
|
30
45
|
});
|
31
46
|
};
|
@@ -4,10 +4,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
const state = createState({
|
5
5
|
images: []
|
6
6
|
});
|
7
|
-
|
7
|
+
const meta = {
|
8
8
|
title: 'Core/ImagePicker',
|
9
9
|
component: ImagePicker
|
10
10
|
};
|
11
|
+
export default meta;
|
11
12
|
export const Default = {
|
12
13
|
render: () => /*#__PURE__*/_jsx("div", {
|
13
14
|
style: {
|
@@ -78,6 +78,7 @@ const ImagePicker = ({
|
|
78
78
|
focusable: true,
|
79
79
|
css: styles.deleteButton,
|
80
80
|
onClick: () => onImageRemove(0),
|
81
|
+
"aria-label": "Fjern bilde",
|
81
82
|
children: _jsx(IconWithBackground, {
|
82
83
|
variant: "delete",
|
83
84
|
icon: _jsx(IconDelete, {})
|
@@ -95,6 +96,7 @@ const ImagePicker = ({
|
|
95
96
|
nostyle: true,
|
96
97
|
focusable: true,
|
97
98
|
css: styles.pinButton,
|
99
|
+
"aria-label": "Sett som hovedbilde",
|
98
100
|
onClick: () => setMainImage(index + 1),
|
99
101
|
children: _jsx(IconWithBackground, {
|
100
102
|
icon: _jsx(IconImage, {}),
|
@@ -104,6 +106,7 @@ const ImagePicker = ({
|
|
104
106
|
nostyle: true,
|
105
107
|
focusable: true,
|
106
108
|
css: styles.deleteButton,
|
109
|
+
"aria-label": "Fjern bilde",
|
107
110
|
onClick: () => onImageRemove(index + 1),
|
108
111
|
children: _jsx(IconWithBackground, {
|
109
112
|
variant: "delete",
|
@@ -117,6 +120,7 @@ const ImagePicker = ({
|
|
117
120
|
...dragProps
|
118
121
|
})]
|
119
122
|
}), errors?.acceptType && _jsx(Text, {
|
123
|
+
role: "alert",
|
120
124
|
children: "Bilde formatet st\xF8ttes ikke"
|
121
125
|
})]
|
122
126
|
});
|
@@ -8,6 +8,7 @@ import IconChevronLeft from '../../icons/General/IconChevronLeft';
|
|
8
8
|
import IconClose from '../../icons/General/IconClose';
|
9
9
|
import { useEffect, useState } from 'react';
|
10
10
|
import { Key } from '../../enums/Keyboard';
|
11
|
+
import { VisuallyHidden } from 'react-aria';
|
11
12
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
12
13
|
import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
13
14
|
const ImageViewer = ({
|
@@ -30,10 +31,15 @@ const ImageViewer = ({
|
|
30
31
|
const hasMultipleImages = Boolean(images.length > 1);
|
31
32
|
return _jsx("div", {
|
32
33
|
css: styles.overlay,
|
33
|
-
children:
|
34
|
+
children: _jsxs("div", {
|
34
35
|
css: styles.carousel,
|
35
36
|
role: "dialog",
|
36
|
-
|
37
|
+
"aria-modal": true,
|
38
|
+
"aria-labelledby": "carousel-heading",
|
39
|
+
children: [_jsx(VisuallyHidden, {
|
40
|
+
id: "carousel-heading",
|
41
|
+
children: "Bildevisning"
|
42
|
+
}), _jsx(Carousel, {
|
37
43
|
enableKeyboardControls: true,
|
38
44
|
swiping: hasMultipleImages,
|
39
45
|
dragging: hasMultipleImages,
|
@@ -44,6 +50,7 @@ const ImageViewer = ({
|
|
44
50
|
renderTopRightControls: () => _jsx("button", {
|
45
51
|
css: styles.closeBtn,
|
46
52
|
onClick: onClose,
|
53
|
+
"aria-label": "Lukk bildevisning",
|
47
54
|
children: _jsx(IconClose, {
|
48
55
|
color: "white"
|
49
56
|
})
|
@@ -53,6 +60,7 @@ const ImageViewer = ({
|
|
53
60
|
}) => hasMultipleImages && _jsx("button", {
|
54
61
|
css: styles.controlBtn('right'),
|
55
62
|
onClick: nextSlide,
|
63
|
+
"aria-label": "Naviger til neste bilde",
|
56
64
|
children: _jsx(IconChevronLeft, {
|
57
65
|
size: 18,
|
58
66
|
color: theme.btnDefaultFontColor,
|
@@ -64,6 +72,7 @@ const ImageViewer = ({
|
|
64
72
|
}) => hasMultipleImages && _jsx("button", {
|
65
73
|
css: styles.controlBtn('left'),
|
66
74
|
onClick: previousSlide,
|
75
|
+
"aria-label": "Naviger til forrige bilde",
|
67
76
|
children: _jsx(IconChevronLeft, {
|
68
77
|
size: 18,
|
69
78
|
color: theme.btnDefaultFontColor
|
@@ -76,19 +85,20 @@ const ImageViewer = ({
|
|
76
85
|
children: _jsxs(Text, {
|
77
86
|
color: theme.btnDefaultFontColor,
|
78
87
|
size: "14px",
|
88
|
+
"aria-label": `Bilde ${currentSlide + 1} av ${images.length}`,
|
79
89
|
children: [currentSlide + 1, " / ", images.length]
|
80
90
|
})
|
81
91
|
}),
|
82
92
|
children: images.map((imageSrc, i) => _jsx("div", {
|
83
|
-
css: [styles.imageContainer(isZoomed), process.env.NODE_ENV === "production" ? "" : ";label:ImageViewer;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
93
|
+
css: [styles.imageContainer(isZoomed), process.env.NODE_ENV === "production" ? "" : ";label:ImageViewer;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wYWNrYWdlcy9jb3JlL0ltYWdlVmlld2VyL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5R3lCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9wYWNrYWdlcy9jb3JlL0ltYWdlVmlld2VyL2luZGV4LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4SW1wb3J0U291cmNlIEBlbW90aW9uL3JlYWN0ICovXG5pbXBvcnQgeyB1c2VUaGVtZSB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHsgc3R5bGVzIH0gZnJvbSAnLi9zdHlsZXMnXG5pbXBvcnQgSW1hZ2UgZnJvbSAnLi4vSW1hZ2UnXG5pbXBvcnQgQ2Fyb3VzZWwgZnJvbSAnbnVrYS1jYXJvdXNlbCdcbmltcG9ydCBUZXh0IGZyb20gJy4uL1RleHQnXG5pbXBvcnQgSWNvbkNoZXZyb25MZWZ0IGZyb20gJy4uLy4uL2ljb25zL0dlbmVyYWwvSWNvbkNoZXZyb25MZWZ0J1xuaW1wb3J0IEljb25DbG9zZSBmcm9tICcuLi8uLi9pY29ucy9HZW5lcmFsL0ljb25DbG9zZSdcbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tICdyZWFjdCdcbmltcG9ydCB7IEtleSB9IGZyb20gJy4uLy4uL2VudW1zL0tleWJvYXJkJ1xuaW1wb3J0IHsgVmlzdWFsbHlIaWRkZW4gfSBmcm9tICdyZWFjdC1hcmlhJ1xuXG50eXBlIFByb3BzID0ge1xuICAvKiogSW1hZ2Ugc3JjJ3MgKi9cbiAgaW1hZ2VzOiBzdHJpbmdbXVxuICAvKiogSW1hZ2UgbGlzdCBpbmRleCB0byBkaXNwbGF5IGluaXRpYWxseSwgZGVmYXVsdHMgdG8gMCAqL1xuICBpbml0aWFsSW1hZ2U6IG51bWJlclxuICAvKiogT24gY2xvc2UgY2FsbGJhY2sgKi9cbiAgb25DbG9zZTogKCkgPT4gdm9pZFxufVxuXG5jb25zdCBJbWFnZVZpZXdlciA9ICh7IGltYWdlcywgaW5pdGlhbEltYWdlID0gMCwgb25DbG9zZSB9OiBQcm9wcykgPT4ge1xuICBjb25zdCB0aGVtZSA9IHVzZVRoZW1lKClcbiAgY29uc3QgW2lzWm9vbWVkLCBzZXRJc1pvb21lZF0gPSB1c2VTdGF0ZShmYWxzZSlcblxuICB1c2VFZmZlY3QoKCkgPT4ge1xuICAgIC8vIFRyaWdnZXIgY2xvc2UgZXZlbnQgb24gXCJlc2NhcGVcIiBrZXlkb3duXG4gICAgY29uc3QgaGFuZGxlS2V5RG93biA9IChldmVudDogS2V5Ym9hcmRFdmVudCkgPT4ge1xuICAgICAgaWYgKGV2ZW50LmtleSA9PT0gS2V5LmVzY2FwZSkgb25DbG9zZSgpXG4gICAgfVxuICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ2tleWRvd24nLCBoYW5kbGVLZXlEb3duKVxuXG4gICAgcmV0dXJuICgpID0+IHtcbiAgICAgIGRvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIoJ2tleWRvd24nLCBoYW5kbGVLZXlEb3duKVxuICAgIH1cbiAgfSwgW10pXG5cbiAgY29uc3QgaGFzTXVsdGlwbGVJbWFnZXMgPSBCb29sZWFuKGltYWdlcy5sZW5ndGggPiAxKVxuXG4gIHJldHVybiAoXG4gICAgPGRpdiBjc3M9e3N0eWxlcy5vdmVybGF5fT5cbiAgICAgIDxkaXZcbiAgICAgICAgY3NzPXtzdHlsZXMuY2Fyb3VzZWx9XG4gICAgICAgIHJvbGU9XCJkaWFsb2dcIlxuICAgICAgICBhcmlhLW1vZGFsPXt0cnVlfVxuICAgICAgICBhcmlhLWxhYmVsbGVkYnk9XCJjYXJvdXNlbC1oZWFkaW5nXCJcbiAgICAgID5cbiAgICAgICAgPFZpc3VhbGx5SGlkZGVuIGlkPVwiY2Fyb3VzZWwtaGVhZGluZ1wiPkJpbGRldmlzbmluZzwvVmlzdWFsbHlIaWRkZW4+XG4gICAgICAgIDxDYXJvdXNlbFxuICAgICAgICAgIGVuYWJsZUtleWJvYXJkQ29udHJvbHNcbiAgICAgICAgICBzd2lwaW5nPXtoYXNNdWx0aXBsZUltYWdlc31cbiAgICAgICAgICBkcmFnZ2luZz17aGFzTXVsdGlwbGVJbWFnZXN9XG4gICAgICAgICAgd3JhcEFyb3VuZFxuICAgICAgICAgIHNsaWRlSW5kZXg9e2luaXRpYWxJbWFnZX1cbiAgICAgICAgICBjZWxsU3BhY2luZz17MTV9XG4gICAgICAgICAgb25Vc2VyTmF2aWdhdGlvbj17KCkgPT4gc2V0SXNab29tZWQoZmFsc2UpfVxuICAgICAgICAgIHJlbmRlclRvcFJpZ2h0Q29udHJvbHM9eygpID0+IChcbiAgICAgICAgICAgIDxidXR0b25cbiAgICAgICAgICAgICAgY3NzPXtzdHlsZXMuY2xvc2VCdG59XG4gICAgICAgICAgICAgIG9uQ2xpY2s9e29uQ2xvc2V9XG4gICAgICAgICAgICAgIGFyaWEtbGFiZWw9XCJMdWtrIGJpbGRldmlzbmluZ1wiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxJY29uQ2xvc2UgY29sb3I9XCJ3aGl0ZVwiIC8+XG4gICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICApfVxuICAgICAgICAgIHJlbmRlckNlbnRlclJpZ2h0Q29udHJvbHM9eyh7IG5leHRTbGlkZSB9KSA9PlxuICAgICAgICAgICAgaGFzTXVsdGlwbGVJbWFnZXMgJiYgKFxuICAgICAgICAgICAgICA8YnV0dG9uXG4gICAgICAgICAgICAgICAgY3NzPXtzdHlsZXMuY29udHJvbEJ0bigncmlnaHQnKX1cbiAgICAgICAgICAgICAgICBvbkNsaWNrPXtuZXh0U2xpZGV9XG4gICAgICAgICAgICAgICAgYXJpYS1sYWJlbD1cIk5hdmlnZXIgdGlsIG5lc3RlIGJpbGRlXCJcbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIHsvKiBVc2VzIEljb25DaGV2cm9uTGVmdCwgYmVjYXVzZSBJY29uQ2hldnJvblJpZ2h0IGlzIG5vdCBjZW50ZXJlZCBwcm9wZXJseSAgKi99XG4gICAgICAgICAgICAgICAgPEljb25DaGV2cm9uTGVmdFxuICAgICAgICAgICAgICAgICAgc2l6ZT17MTh9XG4gICAgICAgICAgICAgICAgICBjb2xvcj17dGhlbWUuYnRuRGVmYXVsdEZvbnRDb2xvcn1cbiAgICAgICAgICAgICAgICAgIGZsaXBcbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgIClcbiAgICAgICAgICB9XG4gICAgICAgICAgcmVuZGVyQ2VudGVyTGVmdENvbnRyb2xzPXsoeyBwcmV2aW91c1NsaWRlIH0pID0+XG4gICAgICAgICAgICBoYXNNdWx0aXBsZUltYWdlcyAmJiAoXG4gICAgICAgICAgICAgIDxidXR0b25cbiAgICAgICAgICAgICAgICBjc3M9e3N0eWxlcy5jb250cm9sQnRuKCdsZWZ0Jyl9XG4gICAgICAgICAgICAgICAgb25DbGljaz17cHJldmlvdXNTbGlkZX1cbiAgICAgICAgICAgICAgICBhcmlhLWxhYmVsPVwiTmF2aWdlciB0aWwgZm9ycmlnZSBiaWxkZVwiXG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8SWNvbkNoZXZyb25MZWZ0IHNpemU9ezE4fSBjb2xvcj17dGhlbWUuYnRuRGVmYXVsdEZvbnRDb2xvcn0gLz5cbiAgICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgICApXG4gICAgICAgICAgfVxuICAgICAgICAgIHJlbmRlckJvdHRvbUNlbnRlckNvbnRyb2xzPXsoeyBjdXJyZW50U2xpZGUgfSkgPT4gKFxuICAgICAgICAgICAgPGRpdiBjc3M9e3N0eWxlcy5wYWdlSW5mb30+XG4gICAgICAgICAgICAgIDxUZXh0XG4gICAgICAgICAgICAgICAgY29sb3I9e3RoZW1lLmJ0bkRlZmF1bHRGb250Q29sb3J9XG4gICAgICAgICAgICAgICAgc2l6ZT1cIjE0cHhcIlxuICAgICAgICAgICAgICAgIGFyaWEtbGFiZWw9e2BCaWxkZSAke2N1cnJlbnRTbGlkZSArIDF9IGF2ICR7aW1hZ2VzLmxlbmd0aH1gfVxuICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAge2N1cnJlbnRTbGlkZSArIDF9IC8ge2ltYWdlcy5sZW5ndGh9XG4gICAgICAgICAgICAgIDwvVGV4dD5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICl9XG4gICAgICAgID5cbiAgICAgICAgICB7aW1hZ2VzLm1hcCgoaW1hZ2VTcmMsIGkpID0+IChcbiAgICAgICAgICAgIDxkaXYga2V5PXtpfSBjc3M9e1tzdHlsZXMuaW1hZ2VDb250YWluZXIoaXNab29tZWQpXX0+XG4gICAgICAgICAgICAgIDxJbWFnZVxuICAgICAgICAgICAgICAgIHNyYz17aW1hZ2VTcmN9XG4gICAgICAgICAgICAgICAgYWx0PXtgQmlsZGUgJHtpICsgMX0gYXYgJHtpbWFnZXMubGVuZ3RofWB9XG4gICAgICAgICAgICAgICAgb2JqZWN0Rml0PVwiY29udGFpblwiXG4gICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4gc2V0SXNab29tZWQoIWlzWm9vbWVkKX1cbiAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICkpfVxuICAgICAgICA8L0Nhcm91c2VsPlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gIClcbn1cbmV4cG9ydCBkZWZhdWx0IEltYWdlVmlld2VyXG4iXX0= */"],
|
84
94
|
children: _jsx(Image, {
|
85
95
|
src: imageSrc,
|
86
|
-
alt:
|
96
|
+
alt: `Bilde ${i + 1} av ${images.length}`,
|
87
97
|
objectFit: "contain",
|
88
98
|
onClick: () => setIsZoomed(!isZoomed)
|
89
99
|
})
|
90
100
|
}, i))
|
91
|
-
})
|
101
|
+
})]
|
92
102
|
})
|
93
103
|
});
|
94
104
|
};
|
@@ -1,57 +1,58 @@
|
|
1
1
|
import InfoButton from '.';
|
2
2
|
import IconHelp from '../../icons/General/IconHelp';
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
4
|
-
|
4
|
+
const meta = {
|
5
5
|
title: 'Core/InfoButton',
|
6
6
|
component: InfoButton
|
7
7
|
};
|
8
|
+
export default meta;
|
8
9
|
export const Default = {
|
9
|
-
|
10
|
+
args: {
|
11
|
+
children: 'This will be the content',
|
10
12
|
icon: /*#__PURE__*/_jsx(IconHelp, {
|
11
13
|
primary: true
|
12
|
-
})
|
13
|
-
|
14
|
-
}),
|
14
|
+
})
|
15
|
+
},
|
15
16
|
name: 'Default'
|
16
17
|
};
|
17
18
|
export const Right = {
|
18
|
-
|
19
|
+
args: {
|
20
|
+
children: 'This will be the content. This very long and unnecessary text shows how the tooltip will handle responsiveness',
|
19
21
|
icon: /*#__PURE__*/_jsx(IconHelp, {
|
20
22
|
primary: true
|
21
23
|
}),
|
22
|
-
place:
|
23
|
-
|
24
|
-
}),
|
24
|
+
place: 'right'
|
25
|
+
},
|
25
26
|
name: 'Right'
|
26
27
|
};
|
27
28
|
export const Bottom = {
|
28
|
-
|
29
|
+
args: {
|
30
|
+
children: 'This will be the content',
|
29
31
|
icon: /*#__PURE__*/_jsx(IconHelp, {
|
30
32
|
primary: true
|
31
33
|
}),
|
32
|
-
place:
|
33
|
-
|
34
|
-
}),
|
34
|
+
place: 'bottom'
|
35
|
+
},
|
35
36
|
name: 'Bottom'
|
36
37
|
};
|
37
38
|
export const Left = {
|
38
|
-
|
39
|
+
args: {
|
40
|
+
children: 'This will be the content',
|
39
41
|
icon: /*#__PURE__*/_jsx(IconHelp, {
|
40
42
|
primary: true
|
41
43
|
}),
|
42
|
-
place:
|
43
|
-
|
44
|
-
}),
|
44
|
+
place: 'left'
|
45
|
+
},
|
45
46
|
name: 'Left'
|
46
47
|
};
|
47
48
|
export const Width = {
|
48
|
-
|
49
|
+
args: {
|
50
|
+
children: 'Custom width',
|
49
51
|
icon: /*#__PURE__*/_jsx(IconHelp, {
|
50
52
|
primary: true
|
51
53
|
}),
|
52
|
-
place:
|
53
|
-
width:
|
54
|
-
|
55
|
-
}),
|
54
|
+
place: 'right',
|
55
|
+
width: '100px'
|
56
|
+
},
|
56
57
|
name: 'Width'
|
57
58
|
};
|
@@ -40,6 +40,7 @@ const InfoButton = ({
|
|
40
40
|
}, [showTooltip, ref]);
|
41
41
|
return _jsxs(Wrapper, {
|
42
42
|
ref: ref,
|
43
|
+
className: className,
|
43
44
|
children: [_jsx(StyledButton, {
|
44
45
|
"aria-label": ariaLabel,
|
45
46
|
trackingName: trackingName,
|
@@ -52,6 +53,9 @@ const InfoButton = ({
|
|
52
53
|
timeout: 80,
|
53
54
|
classNames: "tooltip",
|
54
55
|
children: _jsx(Tooltip, {
|
56
|
+
role: "tooltip",
|
57
|
+
id: "info-tooltip",
|
58
|
+
"aria-hidden": !showTooltip,
|
55
59
|
css: () => [styles.default, place === 'top' && styles.top, place === 'right' && styles.right, place === 'bottom' && styles.bottom, place === 'left' && styles.left, width && styles.width(width, place)],
|
56
60
|
children: _jsx(Text, {
|
57
61
|
children: children ? children : ''
|
package/esm/core/Input/index.js
CHANGED
@@ -62,12 +62,14 @@ const Input = /*#__PURE__*/React.forwardRef(({
|
|
62
62
|
return _jsxs("div", {
|
63
63
|
css: styles.relative,
|
64
64
|
children: [_jsxs("label", {
|
65
|
+
htmlFor: props.id,
|
65
66
|
css: theme => [styles.default(theme), props.highlight && styles.highligted(height), type === 'search' && styles.searchLabel(theme), (props.invalid || props.invalidMessage) && styles.invalid(theme), height && styles.height(height)],
|
66
67
|
className: className,
|
67
68
|
children: [props.label && _jsx("span", {
|
68
69
|
css: info && styles.pr4,
|
69
70
|
children: props.label
|
70
71
|
}), _jsx("input", {
|
72
|
+
id: props.id,
|
71
73
|
type: type,
|
72
74
|
...(type !== 'password' && {
|
73
75
|
value
|
@@ -81,6 +83,7 @@ const Input = /*#__PURE__*/React.forwardRef(({
|
|
81
83
|
maxLength: maxlength,
|
82
84
|
ref: ref,
|
83
85
|
name: props.name,
|
86
|
+
"aria-describedby": props.invalidMessage ? 'input-error-message' : undefined,
|
84
87
|
css: theme => [type === 'text' && styles.text(theme), type === 'search' && styles.search(theme), type === 'password' && styles.password(theme), type === 'number' && styles.number(theme), props.disabled && styles.disabled(theme), cardInput && styles.cardInput(theme)],
|
85
88
|
children: React.Children.map(props.children, child => {
|
86
89
|
if (!child) {
|
@@ -91,6 +94,7 @@ const Input = /*#__PURE__*/React.forwardRef(({
|
|
91
94
|
}), type === 'search' && _jsx(IconSearch, {}), props.invalidMessage && _jsx(IconErrorOutline, {
|
92
95
|
size: "16px"
|
93
96
|
}), props.invalidMessage && _jsx("span", {
|
97
|
+
id: "input-error-message",
|
94
98
|
css: theme => [styles.errorMessage(theme), !props?.label && styles.errorMessageNoLabel],
|
95
99
|
children: props.invalidMessage
|
96
100
|
})]
|
@@ -7,7 +7,6 @@ const ButtonOrLink = /*#__PURE__*/React.forwardRef(({
|
|
7
7
|
beforeIcon,
|
8
8
|
children,
|
9
9
|
disabled = false,
|
10
|
-
flexAlign,
|
11
10
|
href = '',
|
12
11
|
loading = false,
|
13
12
|
openInNewWindow = false,
|
@@ -22,6 +21,7 @@ const ButtonOrLink = /*#__PURE__*/React.forwardRef(({
|
|
22
21
|
onMouseUp,
|
23
22
|
onEnterKeyPress,
|
24
23
|
onEscapeKeyPress,
|
24
|
+
onCustomKeyPress,
|
25
25
|
onKeyPress,
|
26
26
|
...restProps
|
27
27
|
}, ref) => {
|
@@ -44,10 +44,11 @@ const ButtonOrLink = /*#__PURE__*/React.forwardRef(({
|
|
44
44
|
const handleKeyPress = event => {
|
45
45
|
if (onEnterKeyPress && event.key === 'Enter') onEnterKeyPress(event);
|
46
46
|
if (onEscapeKeyPress && event.key === 'Escape') onEscapeKeyPress(event);
|
47
|
-
if (
|
47
|
+
if (onCustomKeyPress && event.key === onCustomKeyPress.key) onCustomKeyPress.action(event);
|
48
|
+
if (onKeyPress) onKeyPress(event);
|
48
49
|
};
|
49
50
|
useEffect(() => {
|
50
|
-
const hasKeyPressEvents = onEnterKeyPress || onEscapeKeyPress || onKeyPress;
|
51
|
+
const hasKeyPressEvents = onEnterKeyPress || onEscapeKeyPress || onKeyPress || onCustomKeyPress;
|
51
52
|
if (!hasKeyPressEvents) return;
|
52
53
|
window.addEventListener('keyup', handleKeyPress);
|
53
54
|
return () => {
|
@@ -19,7 +19,45 @@ declare const styles: {
|
|
19
19
|
disabled: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
|
20
20
|
};
|
21
21
|
export declare const ErrorMessage: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
|
22
|
-
export declare const Clear: import("@emotion/styled").StyledComponent<
|
22
|
+
export declare const Clear: import("@emotion/styled").StyledComponent<import("react").HTMLAttributes<import("../private/ButtonOrLink").ButtonOrLinkTypes> & {
|
23
|
+
afterIcon?: import("react").ReactNode;
|
24
|
+
beforeIcon?: import("react").ReactNode;
|
25
|
+
children: string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | import("react").ReactPortal;
|
26
|
+
disabled?: boolean | undefined;
|
27
|
+
href?: string | undefined;
|
28
|
+
loading?: boolean | undefined;
|
29
|
+
onClick?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
|
30
|
+
onMouseUp?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
|
31
|
+
onCustomKeyPress?: {
|
32
|
+
key: string;
|
33
|
+
action: (event: KeyboardEvent) => void;
|
34
|
+
} | undefined;
|
35
|
+
onKeyPress?: ((event: KeyboardEvent) => void) | undefined;
|
36
|
+
onEnterKeyPress?: ((event: KeyboardEvent) => void) | undefined;
|
37
|
+
onEscapeKeyPress?: ((event: KeyboardEvent) => void) | undefined;
|
38
|
+
openInNewWindow?: boolean | undefined;
|
39
|
+
rel?: string | undefined;
|
40
|
+
trackingEvent?: string | undefined;
|
41
|
+
trackingName?: string | undefined;
|
42
|
+
type?: "button" | "submit" | "reset" | undefined;
|
43
|
+
target?: string | undefined;
|
44
|
+
download?: any;
|
45
|
+
tabIndex?: number | undefined;
|
46
|
+
} & {
|
47
|
+
success?: boolean | undefined;
|
48
|
+
danger?: boolean | undefined;
|
49
|
+
highlight?: boolean | undefined;
|
50
|
+
outline?: boolean | undefined;
|
51
|
+
nostyle?: boolean | undefined;
|
52
|
+
focusable?: boolean | undefined;
|
53
|
+
border?: string | undefined;
|
54
|
+
css?: import("@emotion/utils").SerializedStyles | undefined;
|
55
|
+
loading?: boolean | undefined;
|
56
|
+
back?: boolean | undefined;
|
57
|
+
small?: boolean | undefined;
|
58
|
+
transparentBg?: boolean | undefined;
|
59
|
+
tabIndex?: number | undefined;
|
60
|
+
} & import("react").RefAttributes<HTMLButtonElement> & {
|
23
61
|
theme?: import("@emotion/react").Theme | undefined;
|
24
62
|
}, {}, {}>;
|
25
63
|
export default styles;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Autocomplete/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAIjD,QAAA,MAAM,MAAM;qBACO,SAAS;;;0BA2DJ,SAAS;;;;kBAuCjB,SAAS;6BA2BE,SAAS;yBAGb,MAAM;iCAOE,MAAM;kCAGL,MAAM;qBAGnB,SAAS;4BAYF,SAAS;qBA4BhB,MAAM;sBAKL,SAAS;CAM5B,CAAA;AAED,eAAO,MAAM,YAAY,UAAW,SAAS,8CAM5C,CAAA;AAED,eAAO,MAAM,KAAK
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Autocomplete/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAIjD,QAAA,MAAM,MAAM;qBACO,SAAS;;;0BA2DJ,SAAS;;;;kBAuCjB,SAAS;6BA2BE,SAAS;yBAGb,MAAM;iCAOE,MAAM;kCAGL,MAAM;qBAGnB,SAAS;4BAYF,SAAS;qBA4BhB,MAAM;sBAKL,SAAS;CAM5B,CAAA;AAED,eAAO,MAAM,YAAY,UAAW,SAAS,8CAM5C,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAcjB,CAAA;AAED,eAAe,MAAM,CAAA;AAErB,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
package/lib/core/Box/styles.d.ts
CHANGED
@@ -16,7 +16,45 @@ declare const ContentWrapper: import("@emotion/styled").StyledComponent<{
|
|
16
16
|
theme?: import("@emotion/react").Theme | undefined;
|
17
17
|
as?: import("react").ElementType<any> | undefined;
|
18
18
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
19
|
-
declare const CollapseButton: import("@emotion/styled").StyledComponent<
|
19
|
+
declare const CollapseButton: import("@emotion/styled").StyledComponent<import("react").HTMLAttributes<import("../private/ButtonOrLink").ButtonOrLinkTypes> & {
|
20
|
+
afterIcon?: import("react").ReactNode;
|
21
|
+
beforeIcon?: import("react").ReactNode;
|
22
|
+
children: string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | import("react").ReactPortal;
|
23
|
+
disabled?: boolean | undefined;
|
24
|
+
href?: string | undefined;
|
25
|
+
loading?: boolean | undefined;
|
26
|
+
onClick?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
|
27
|
+
onMouseUp?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
|
28
|
+
onCustomKeyPress?: {
|
29
|
+
key: string;
|
30
|
+
action: (event: KeyboardEvent) => void;
|
31
|
+
} | undefined;
|
32
|
+
onKeyPress?: ((event: KeyboardEvent) => void) | undefined;
|
33
|
+
onEnterKeyPress?: ((event: KeyboardEvent) => void) | undefined;
|
34
|
+
onEscapeKeyPress?: ((event: KeyboardEvent) => void) | undefined;
|
35
|
+
openInNewWindow?: boolean | undefined;
|
36
|
+
rel?: string | undefined;
|
37
|
+
trackingEvent?: string | undefined;
|
38
|
+
trackingName?: string | undefined;
|
39
|
+
type?: "button" | "submit" | "reset" | undefined;
|
40
|
+
target?: string | undefined;
|
41
|
+
download?: any;
|
42
|
+
tabIndex?: number | undefined;
|
43
|
+
} & {
|
44
|
+
success?: boolean | undefined;
|
45
|
+
danger?: boolean | undefined;
|
46
|
+
highlight?: boolean | undefined;
|
47
|
+
outline?: boolean | undefined;
|
48
|
+
nostyle?: boolean | undefined;
|
49
|
+
focusable?: boolean | undefined;
|
50
|
+
border?: string | undefined;
|
51
|
+
css?: import("@emotion/utils").SerializedStyles | undefined;
|
52
|
+
loading?: boolean | undefined;
|
53
|
+
back?: boolean | undefined;
|
54
|
+
small?: boolean | undefined;
|
55
|
+
transparentBg?: boolean | undefined;
|
56
|
+
tabIndex?: number | undefined;
|
57
|
+
} & import("react").RefAttributes<HTMLButtonElement> & {
|
20
58
|
theme?: import("@emotion/react").Theme | undefined;
|
21
59
|
}, {}, {}>;
|
22
60
|
export default styles;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Box/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,MAAM;qBACO,SAAS;oBAWV,SAAS;;qBAQR,MAAM;CAGxB,CAAA;AAED,QAAA,MAAM,aAAa;;;;YACC,OAAO;yGAU1B,CAAA;AAED,QAAA,MAAM,cAAc;;;yGAGnB,CAAA;AAED,QAAA,MAAM,cAAc
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Box/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,MAAM;qBACO,SAAS;oBAWV,SAAS;;qBAQR,MAAM;CAGxB,CAAA;AAED,QAAA,MAAM,aAAa;;;;YACC,OAAO;yGAU1B,CAAA;AAED,QAAA,MAAM,cAAc;;;yGAGnB,CAAA;AAED,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAGnB,CAAA;AAED,eAAe,MAAM,CAAA;AAErB,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packages/core/BoxedTable/TableBody/index.tsx"],"names":[],"mappings":";AAEA,aAAK,KAAK,GAAG;IACX,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAA;AACD,QAAA,MAAM,SAAS,iBAAkB,KAAK,gCAErC,CAAA;AAED,eAAe,SAAS,CAAA"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare const BodyWrapper: import("@emotion/styled").StyledComponent<{
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, {}>;
|
6
|
+
//# sourceMappingURL=styles.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/packages/core/BoxedTable/TableBody/styles.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,WAAW;;;2HAIvB,CAAA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import _styled from "@emotion/styled/base";
|
2
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
3
|
+
export const BodyWrapper = /*#__PURE__*/_styled("tbody", process.env.NODE_ENV === "production" ? {
|
4
|
+
target: "e1u8g1t20"
|
5
|
+
} : {
|
6
|
+
target: "e1u8g1t20",
|
7
|
+
label: "BodyWrapper"
|
8
|
+
})(process.env.NODE_ENV === "production" ? {
|
9
|
+
name: "ixi98c",
|
10
|
+
styles: "display:flex;flex-direction:column;grid-row-gap:1em"
|
11
|
+
} : {
|
12
|
+
name: "ixi98c",
|
13
|
+
styles: "display:flex;flex-direction:column;grid-row-gap:1em",
|
14
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9wYWNrYWdlcy9jb3JlL0JveGVkVGFibGUvVGFibGVCb2R5L3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFdUMiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjL3BhY2thZ2VzL2NvcmUvQm94ZWRUYWJsZS9UYWJsZUJvZHkvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5cbmV4cG9ydCBjb25zdCBCb2R5V3JhcHBlciA9IHN0eWxlZC50Ym9keWBcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgZ3JpZC1yb3ctZ2FwOiAxZW07XG5gXG4iXX0= */",
|
15
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
16
|
+
});
|
@@ -1,64 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
export
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
export declare const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
export declare const
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
export declare const
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
export declare const
|
21
|
-
render: () => import("react").JSX.Element;
|
22
|
-
name: string;
|
23
|
-
};
|
24
|
-
export declare const Loading: {
|
25
|
-
render: () => import("react").JSX.Element;
|
26
|
-
name: string;
|
27
|
-
};
|
28
|
-
export declare const Disabled: {
|
29
|
-
render: () => import("react").JSX.Element;
|
30
|
-
name: string;
|
31
|
-
};
|
32
|
-
export declare const Highlighted: {
|
33
|
-
render: () => import("react").JSX.Element;
|
34
|
-
name: string;
|
35
|
-
};
|
36
|
-
export declare const OutlineHighlighted: {
|
37
|
-
render: () => import("react").JSX.Element;
|
38
|
-
name: string;
|
39
|
-
};
|
40
|
-
export declare const Back: {
|
41
|
-
render: () => import("react").JSX.Element;
|
42
|
-
name: string;
|
43
|
-
};
|
44
|
-
export declare const Small: {
|
45
|
-
render: () => import("react").JSX.Element;
|
46
|
-
name: string;
|
47
|
-
};
|
48
|
-
export declare const DangerOutline: {
|
49
|
-
render: () => import("react").JSX.Element;
|
50
|
-
name: string;
|
51
|
-
};
|
52
|
-
export declare const TransparentBackground: {
|
53
|
-
render: () => import("react").JSX.Element;
|
54
|
-
name: string;
|
55
|
-
};
|
56
|
-
export declare const NoStyle: {
|
57
|
-
render: () => import("react").JSX.Element;
|
58
|
-
name: string;
|
59
|
-
};
|
60
|
-
export declare const EventKeyPresses: {
|
61
|
-
render: () => import("react").JSX.Element;
|
62
|
-
name: string;
|
63
|
-
};
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
2
|
+
import Button from '.';
|
3
|
+
declare const meta: Meta<typeof Button>;
|
4
|
+
export default meta;
|
5
|
+
declare type Story = StoryObj<typeof Button>;
|
6
|
+
export declare const Default: Story;
|
7
|
+
export declare const IconBefore: Story;
|
8
|
+
export declare const IconAfter: Story;
|
9
|
+
export declare const Success: Story;
|
10
|
+
export declare const Danger: Story;
|
11
|
+
export declare const Loading: Story;
|
12
|
+
export declare const Disabled: Story;
|
13
|
+
export declare const Highlighted: Story;
|
14
|
+
export declare const OutlineHighlighted: Story;
|
15
|
+
export declare const Back: Story;
|
16
|
+
export declare const Small: Story;
|
17
|
+
export declare const DangerOutline: Story;
|
18
|
+
export declare const TransparentBackground: Story;
|
19
|
+
export declare const NoStyle: Story;
|
20
|
+
export declare const EventKeyPresses: Story;
|
64
21
|
//# sourceMappingURL=Button.stories.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Button/Button.stories.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Button/Button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,MAAM,MAAM,GAAG,CAAA;AAGtB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAG7B,CAAA;AAED,eAAe,IAAI,CAAA;AAEnB,aAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAA;AAEpC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAA;AAID,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAMpB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAA;AAED,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,KAOnC,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAW7B,CAAA"}
|