@bbl-digital/snorre 4.0.6 → 4.0.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +106 -16
- package/esm/core/Alert/Alert.stories.js +17 -17
- package/esm/core/Alert/index.js +32 -2
- package/esm/core/AppLoader/AppLoader.stories.js +2 -3
- package/esm/core/AppLoader/index.js +9 -1
- package/esm/core/Banner/Banner.stories.js +26 -18
- package/esm/core/Banner/index.js +4 -1
- package/esm/core/Modal/Modal.stories.js +56 -39
- package/esm/core/Modal/index.js +29 -1
- package/esm/index.js +2 -1
- package/esm/shared/components/VisuallyHidden/index.js +22 -0
- package/esm/utils/file.js +1 -1
- package/lib/core/Alert/Alert.stories.d.ts +10 -23
- package/lib/core/Alert/Alert.stories.d.ts.map +1 -1
- package/lib/core/Alert/Alert.stories.js +17 -17
- package/lib/core/Alert/index.d.ts +2 -1
- package/lib/core/Alert/index.d.ts.map +1 -1
- package/lib/core/Alert/index.js +32 -2
- package/lib/core/AppLoader/AppLoader.stories.d.ts +6 -7
- package/lib/core/AppLoader/AppLoader.stories.d.ts.map +1 -1
- package/lib/core/AppLoader/AppLoader.stories.js +2 -3
- package/lib/core/AppLoader/index.d.ts +2 -1
- package/lib/core/AppLoader/index.d.ts.map +1 -1
- package/lib/core/AppLoader/index.js +9 -1
- package/lib/core/Autocomplete/styles.d.ts +26 -1
- package/lib/core/Autocomplete/styles.d.ts.map +1 -1
- package/lib/core/Banner/Banner.stories.d.ts +10 -23
- package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
- package/lib/core/Banner/Banner.stories.js +26 -18
- package/lib/core/Banner/index.d.ts +2 -1
- package/lib/core/Banner/index.d.ts.map +1 -1
- package/lib/core/Banner/index.js +4 -1
- package/lib/core/Box/styles.d.ts +25 -1
- package/lib/core/Box/styles.d.ts.map +1 -1
- package/lib/core/CollapseList/styles.d.ts +26 -1
- package/lib/core/CollapseList/styles.d.ts.map +1 -1
- package/lib/core/FileInput/styles.d.ts +25 -1
- package/lib/core/FileInput/styles.d.ts.map +1 -1
- package/lib/core/InfoButton/styles.d.ts +25 -1
- package/lib/core/InfoButton/styles.d.ts.map +1 -1
- package/lib/core/Modal/Modal.stories.d.ts +11 -23
- package/lib/core/Modal/Modal.stories.d.ts.map +1 -1
- package/lib/core/Modal/Modal.stories.js +56 -39
- package/lib/core/Modal/index.d.ts +3 -2
- package/lib/core/Modal/index.d.ts.map +1 -1
- package/lib/core/Modal/index.js +29 -1
- package/lib/core/private/ButtonOrLink.d.ts +2 -1
- package/lib/core/private/ButtonOrLink.d.ts.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/layout/Footer/FooterButton/styles.d.ts +26 -1
- package/lib/layout/Footer/FooterButton/styles.d.ts.map +1 -1
- package/lib/layout/Footer/FooterLink/styles.d.ts +26 -1
- package/lib/layout/Footer/FooterLink/styles.d.ts.map +1 -1
- package/lib/layout/Menu/MenuTop/styles.d.ts +25 -1
- package/lib/layout/Menu/MenuTop/styles.d.ts.map +1 -1
- package/lib/shared/components/VisuallyHidden/index.d.ts +11 -0
- package/lib/shared/components/VisuallyHidden/index.d.ts.map +1 -0
- package/lib/shared/components/VisuallyHidden/index.js +22 -0
- package/lib/shared/types/Accessibility.d.ts +2 -2
- package/lib/shared/types/Accessibility.d.ts.map +1 -1
- package/lib/utils/file.js +1 -1
- 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
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Alert/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Alert/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAiB,MAAM,OAAO,CAAA;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAItD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAGrE,UAAU,MAAO,SAAQ,kBAAkB;IACzC,0BAA0B;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kBAAkB;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,wBAAwB;IACxB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,uBAAuB;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,gBAAgB,CAAA;IACtB,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,eAAe;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAA;CAC/C;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAiE3B,CAAA;AAED,eAAe,KAAK,CAAA"}
|
package/lib/core/Alert/index.js
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
2
|
-
import React from 'react';
|
2
|
+
import React, { useRef } from 'react';
|
3
3
|
import { styles } from './styles';
|
4
4
|
import Button from '../Button';
|
5
5
|
import IconClose from '../../icons/General/IconClose';
|
6
|
+
import VisuallyHidden from '../../shared/components/VisuallyHidden';
|
6
7
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
7
8
|
import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
8
9
|
const Alert = ({
|
@@ -14,17 +15,46 @@ const Alert = ({
|
|
14
15
|
css,
|
15
16
|
children,
|
16
17
|
className,
|
17
|
-
onClose
|
18
|
+
onClose,
|
19
|
+
...restProps
|
18
20
|
}) => {
|
21
|
+
const ariaLivePolicy = success ? 'polite' : 'assertive';
|
22
|
+
// Random id for aria-describedby
|
23
|
+
const id = Math.random().toString(36).substring(7);
|
24
|
+
const descriptionId = useRef(`aria-describedby-${id}`);
|
25
|
+
const childTextContent = React.Children.toArray(children).filter(child => typeof child === 'string');
|
26
|
+
const getDefaultAriaLabel = () => {
|
27
|
+
if (success) {
|
28
|
+
return 'Suksess';
|
29
|
+
}
|
30
|
+
if (danger) {
|
31
|
+
return 'Fare';
|
32
|
+
}
|
33
|
+
return 'Informasjon';
|
34
|
+
};
|
35
|
+
const accessibilityProps = {
|
36
|
+
role: restProps['role'] || 'alert',
|
37
|
+
'aria-live': ariaLivePolicy,
|
38
|
+
'aria-atomic': restProps['aria-atomic'] || true,
|
39
|
+
'aria-label': restProps['aria-label'] || getDefaultAriaLabel(),
|
40
|
+
'aria-relevant': restProps['aria-relevant'] || 'all',
|
41
|
+
'aria-describedby': descriptionId.current
|
42
|
+
};
|
19
43
|
return _jsxs("div", {
|
20
44
|
css: theme => [styles.default(theme), success && styles.success(theme), info && styles.info(theme), danger && styles.danger(theme), rounded && styles.rounded, primary && styles.primary(theme), css && css],
|
21
45
|
className: className,
|
46
|
+
...restProps,
|
47
|
+
...accessibilityProps,
|
22
48
|
children: [children, onClose && _jsx(Button, {
|
23
49
|
onClick: onClose,
|
24
50
|
nostyle: true,
|
51
|
+
"aria-label": "Lukk",
|
25
52
|
children: _jsx(IconClose, {
|
26
53
|
size: 14
|
27
54
|
})
|
55
|
+
}), _jsx(VisuallyHidden, {
|
56
|
+
id: descriptionId.current,
|
57
|
+
children: childTextContent
|
28
58
|
})]
|
29
59
|
});
|
30
60
|
};
|
@@ -1,8 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
export
|
5
|
-
|
6
|
-
|
7
|
-
};
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
2
|
+
import AppLoader from '.';
|
3
|
+
declare const meta: Meta<typeof AppLoader>;
|
4
|
+
export default meta;
|
5
|
+
declare type Story = StoryObj<typeof AppLoader>;
|
6
|
+
export declare const Default: Story;
|
8
7
|
//# sourceMappingURL=AppLoader.stories.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AppLoader.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/AppLoader/AppLoader.stories.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"AppLoader.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/AppLoader/AppLoader.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,SAAS,MAAM,GAAG,CAAA;AAEzB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAGN,CAAA;AAE3B,eAAe,IAAI,CAAA;AAEnB,aAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAA;AAEvC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAA"}
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import AppLoader from '.';
|
2
|
-
|
3
|
-
export default {
|
2
|
+
const meta = {
|
4
3
|
title: 'Core/AppLoader',
|
5
4
|
component: AppLoader
|
6
5
|
};
|
6
|
+
export default meta;
|
7
7
|
export const Default = {
|
8
|
-
render: () => /*#__PURE__*/_jsx(AppLoader, {}),
|
9
8
|
name: 'Default'
|
10
9
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/AppLoader/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/AppLoader/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAErE,UAAU,MAAO,SAAQ,kBAAkB;IACzC,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAkB/B,CAAA;AAED,eAAe,SAAS,CAAA"}
|
@@ -4,10 +4,18 @@ import { styles } from './styles';
|
|
4
4
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
5
5
|
import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
6
6
|
const AppLoader = ({
|
7
|
-
color
|
7
|
+
color,
|
8
|
+
...restProps
|
8
9
|
}) => {
|
10
|
+
const accessibilityProps = {
|
11
|
+
role: restProps['role'] || 'status',
|
12
|
+
'aria-live': restProps['aria-live'] || 'polite',
|
13
|
+
'aria-label': restProps['aria-label'] || 'Laster innhold'
|
14
|
+
};
|
9
15
|
return _jsxs("div", {
|
10
16
|
css: theme => [styles.default(theme, color)],
|
17
|
+
...restProps,
|
18
|
+
...accessibilityProps,
|
11
19
|
children: [_jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {})]
|
12
20
|
});
|
13
21
|
};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
import { IAppTheme } from '../../app-shell/theme';
|
2
3
|
declare const styles: {
|
3
4
|
default: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
|
@@ -18,7 +19,31 @@ declare const styles: {
|
|
18
19
|
disabled: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
|
19
20
|
};
|
20
21
|
export declare const ErrorMessage: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
|
21
|
-
export declare const Clear: import("@emotion/styled").StyledComponent<import("
|
22
|
+
export declare const Clear: import("@emotion/styled").StyledComponent<import("../../shared/types/Accessibility").AccessibilityProps & {
|
23
|
+
[prop: string]: unknown;
|
24
|
+
afterIcon?: import("react").ReactNode;
|
25
|
+
beforeIcon?: import("react").ReactNode;
|
26
|
+
children: string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | import("react").ReactPortal;
|
27
|
+
disabled?: boolean | undefined;
|
28
|
+
href?: string | undefined;
|
29
|
+
loading?: boolean | undefined;
|
30
|
+
onClick?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
|
31
|
+
onMouseUp?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
|
32
|
+
onKeyPress?: {
|
33
|
+
key: string;
|
34
|
+
action: (event: KeyboardEvent) => void;
|
35
|
+
} | 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" | "reset" | "submit" | undefined;
|
43
|
+
target?: string | undefined;
|
44
|
+
download?: any;
|
45
|
+
tabIndex?: number | undefined;
|
46
|
+
} & {
|
22
47
|
success?: boolean | undefined;
|
23
48
|
danger?: boolean | undefined;
|
24
49
|
highlight?: boolean | undefined;
|
@@ -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"}
|
@@ -1,24 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
export
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
export declare const
|
9
|
-
|
10
|
-
|
11
|
-
};
|
12
|
-
export declare const Info: {
|
13
|
-
render: () => import("react").JSX.Element;
|
14
|
-
name: string;
|
15
|
-
};
|
16
|
-
export declare const Danger: {
|
17
|
-
render: () => import("react").JSX.Element;
|
18
|
-
name: string;
|
19
|
-
};
|
20
|
-
export declare const WithoutChildren: {
|
21
|
-
render: () => import("react").JSX.Element;
|
22
|
-
name: string;
|
23
|
-
};
|
1
|
+
import Banner from '.';
|
2
|
+
import { Meta, StoryObj } from '@storybook/react';
|
3
|
+
declare const meta: Meta<typeof Banner>;
|
4
|
+
export default meta;
|
5
|
+
declare type Story = StoryObj<typeof Banner>;
|
6
|
+
export declare const Default: Story;
|
7
|
+
export declare const Success: Story;
|
8
|
+
export declare const Info: Story;
|
9
|
+
export declare const Danger: Story;
|
10
|
+
export declare const WithoutChildren: Story;
|
24
11
|
//# sourceMappingURL=Banner.stories.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Banner.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Banner/Banner.stories.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Banner.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Banner/Banner.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,GAAG,CAAA;AAGtB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAGrB,CAAA;AAET,eAAe,IAAI,CAAA;AAEnB,aAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAA;AAEpC,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAerB,CAAA;AAED,eAAO,MAAM,IAAI,EAAE,KAclB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAepB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAQ7B,CAAA"}
|
@@ -2,12 +2,13 @@ import Banner from '.';
|
|
2
2
|
import Header from '../Header';
|
3
3
|
import Button from '../Button';
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
|
-
|
5
|
+
const meta = {
|
6
6
|
title: 'Core/Banner',
|
7
7
|
component: Banner
|
8
8
|
};
|
9
|
+
export default meta;
|
9
10
|
export const Default = {
|
10
|
-
|
11
|
+
args: {
|
11
12
|
header: /*#__PURE__*/_jsx(Header, {
|
12
13
|
level: 4,
|
13
14
|
children: "Title"
|
@@ -16,53 +17,60 @@ export const Default = {
|
|
16
17
|
onClick: () => console.log('Hello'),
|
17
18
|
children: "Hello I am button"
|
18
19
|
}),
|
19
|
-
children: "
|
20
|
-
|
20
|
+
children: /*#__PURE__*/_jsx("p", {
|
21
|
+
children: "Eu irure eiusmod amet tempor nisi veniam cupidatat duis nulla dolor. Eiusmod amet sit nostrud adipisicing qui pariatur do et duis fugiat magna laboris elit irure. Officia fugiat incididunt ipsum commodo quis aute qui reprehenderit reprehenderit fugiat. Voluptate quis tempor ea consequat."
|
22
|
+
})
|
23
|
+
},
|
21
24
|
name: 'Default'
|
22
25
|
};
|
23
26
|
export const Success = {
|
24
|
-
|
27
|
+
args: {
|
25
28
|
success: true,
|
26
29
|
header: /*#__PURE__*/_jsx(Header, {
|
27
30
|
level: 4,
|
28
31
|
children: "Title"
|
29
32
|
}),
|
30
|
-
children: "
|
31
|
-
|
33
|
+
children: /*#__PURE__*/_jsx("p", {
|
34
|
+
children: "Eu irure eiusmod amet tempor nisi veniam cupidatat duis nulla dolor. Eiusmod amet sit nostrud adipisicing qui pariatur do et duis fugiat magna laboris elit irure. Officia fugiat incididunt ipsum commodo quis aute qui reprehenderit reprehenderit fugiat. Voluptate quis tempor ea consequat."
|
35
|
+
})
|
36
|
+
},
|
32
37
|
name: 'Success'
|
33
38
|
};
|
34
39
|
export const Info = {
|
35
|
-
|
40
|
+
args: {
|
36
41
|
info: true,
|
37
42
|
header: /*#__PURE__*/_jsx(Header, {
|
38
43
|
level: 4,
|
39
44
|
children: "Title"
|
40
45
|
}),
|
41
|
-
children: "
|
42
|
-
|
43
|
-
|
46
|
+
children: /*#__PURE__*/_jsx("p", {
|
47
|
+
children: "Eu irure eiusmod amet tempor nisi veniam cupidatat duis nulla dolor. Eiusmod amet sit nostrud adipisicing qui pariatur do et duis fugiat magna laboris elit irure. Officia fugiat incididunt ipsum commodo quis aute qui reprehenderit reprehenderit fugiat. Voluptate quis tempor ea consequat."
|
48
|
+
})
|
49
|
+
}
|
44
50
|
};
|
45
51
|
export const Danger = {
|
46
|
-
|
52
|
+
args: {
|
47
53
|
danger: true,
|
48
54
|
header: /*#__PURE__*/_jsx(Header, {
|
49
55
|
level: 4,
|
50
56
|
children: "Title"
|
51
57
|
}),
|
52
|
-
children: "
|
53
|
-
|
58
|
+
children: /*#__PURE__*/_jsx("p", {
|
59
|
+
children: "Eu irure eiusmod amet tempor nisi veniam cupidatat duis nulla dolor. Eiusmod amet sit nostrud adipisicing qui pariatur do et duis fugiat magna laboris elit irure. Officia fugiat incididunt ipsum commodo quis aute qui reprehenderit reprehenderit fugiat. Voluptate quis tempor ea consequat."
|
60
|
+
})
|
61
|
+
},
|
54
62
|
name: 'Danger'
|
55
63
|
};
|
56
64
|
export const WithoutChildren = {
|
57
|
-
|
65
|
+
args: {
|
58
66
|
header: /*#__PURE__*/_jsx(Header, {
|
59
67
|
level: 4,
|
60
|
-
children: "
|
68
|
+
children: "Title"
|
61
69
|
}),
|
62
70
|
actionButton: /*#__PURE__*/_jsx(Button, {
|
63
71
|
onClick: () => console.log('Hello'),
|
64
|
-
children: "
|
72
|
+
children: "Hello I am button"
|
65
73
|
})
|
66
|
-
}
|
74
|
+
},
|
67
75
|
name: 'Without children'
|
68
76
|
};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
2
2
|
import React from 'react';
|
3
|
-
|
3
|
+
import { AccessibilityProps } from '../../shared/types/Accessibility';
|
4
|
+
interface IProps extends AccessibilityProps {
|
4
5
|
/** Banner header */
|
5
6
|
header?: React.ReactNode;
|
6
7
|
/** Success banner */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Banner/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Banner/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAErE,UAAU,MAAO,SAAQ,kBAAkB;IACzC,oBAAoB;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,qBAAqB;IACrB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mBAAmB;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,yBAAyB;IACzB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,qBAAqB;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAA;IAC9C,6CAA6C;IAC7C,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC/B;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CA6B5B,CAAA;AAED,eAAe,MAAM,CAAA"}
|
package/lib/core/Banner/index.js
CHANGED
@@ -10,15 +10,18 @@ const Banner = ({
|
|
10
10
|
info,
|
11
11
|
success,
|
12
12
|
header,
|
13
|
-
actionButton
|
13
|
+
actionButton,
|
14
|
+
...restProps
|
14
15
|
}) => {
|
15
16
|
const isDefault = !success && !danger && !info;
|
16
17
|
return _jsx(Alert, {
|
18
|
+
role: "banner",
|
17
19
|
rounded: true,
|
18
20
|
primary: isDefault,
|
19
21
|
success: success,
|
20
22
|
danger: danger,
|
21
23
|
info: info,
|
24
|
+
...restProps,
|
22
25
|
children: _jsxs(Wrapper, {
|
23
26
|
children: [_jsxs(LeftSide, {
|
24
27
|
children: [header, children && _jsx(Content, {
|
package/lib/core/Box/styles.d.ts
CHANGED
@@ -16,7 +16,31 @@ 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<import("
|
19
|
+
declare const CollapseButton: import("@emotion/styled").StyledComponent<import("../../shared/types/Accessibility").AccessibilityProps & {
|
20
|
+
[prop: string]: unknown;
|
21
|
+
afterIcon?: import("react").ReactNode;
|
22
|
+
beforeIcon?: import("react").ReactNode;
|
23
|
+
children: string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | import("react").ReactPortal;
|
24
|
+
disabled?: boolean | undefined;
|
25
|
+
href?: string | undefined;
|
26
|
+
loading?: boolean | undefined;
|
27
|
+
onClick?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
|
28
|
+
onMouseUp?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
|
29
|
+
onKeyPress?: {
|
30
|
+
key: string;
|
31
|
+
action: (event: KeyboardEvent) => void;
|
32
|
+
} | 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" | "reset" | "submit" | undefined;
|
40
|
+
target?: string | undefined;
|
41
|
+
download?: any;
|
42
|
+
tabIndex?: number | undefined;
|
43
|
+
} & {
|
20
44
|
success?: boolean | undefined;
|
21
45
|
danger?: boolean | undefined;
|
22
46
|
highlight?: boolean | undefined;
|
@@ -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"}
|
@@ -1,5 +1,30 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
import { IAppTheme } from '../../app-shell/theme';
|
2
|
-
export declare const CollapseButton: import("@emotion/styled").StyledComponent<import("
|
3
|
+
export declare const CollapseButton: import("@emotion/styled").StyledComponent<import("../../shared/types/Accessibility").AccessibilityProps & {
|
4
|
+
[prop: string]: unknown;
|
5
|
+
afterIcon?: import("react").ReactNode;
|
6
|
+
beforeIcon?: import("react").ReactNode;
|
7
|
+
children: string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | import("react").ReactPortal;
|
8
|
+
disabled?: boolean | undefined;
|
9
|
+
href?: string | undefined;
|
10
|
+
loading?: boolean | undefined;
|
11
|
+
onClick?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
|
12
|
+
onMouseUp?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
|
13
|
+
onKeyPress?: {
|
14
|
+
key: string;
|
15
|
+
action: (event: KeyboardEvent) => void;
|
16
|
+
} | undefined;
|
17
|
+
onEnterKeyPress?: ((event: KeyboardEvent) => void) | undefined;
|
18
|
+
onEscapeKeyPress?: ((event: KeyboardEvent) => void) | undefined;
|
19
|
+
openInNewWindow?: boolean | undefined;
|
20
|
+
rel?: string | undefined;
|
21
|
+
trackingEvent?: string | undefined;
|
22
|
+
trackingName?: string | undefined;
|
23
|
+
type?: "button" | "reset" | "submit" | undefined;
|
24
|
+
target?: string | undefined;
|
25
|
+
download?: any;
|
26
|
+
tabIndex?: number | undefined;
|
27
|
+
} & {
|
3
28
|
success?: boolean | undefined;
|
4
29
|
danger?: boolean | undefined;
|
5
30
|
highlight?: boolean | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/CollapseList/styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,eAAO,MAAM,cAAc
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/CollapseList/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAM1B,CAAA;AAED,eAAO,MAAM,MAAM;qBACA,SAAS;CAyB3B,CAAA"}
|
@@ -19,7 +19,31 @@ export declare const Document: import("@emotion/styled").StyledComponent<{
|
|
19
19
|
theme?: import("@emotion/react").Theme | undefined;
|
20
20
|
as?: import("react").ElementType<any> | undefined;
|
21
21
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
22
|
-
export declare const Delete: import("@emotion/styled").StyledComponent<import("
|
22
|
+
export declare const Delete: import("@emotion/styled").StyledComponent<import("../../shared/types/Accessibility").AccessibilityProps & {
|
23
|
+
[prop: string]: unknown;
|
24
|
+
afterIcon?: import("react").ReactNode;
|
25
|
+
beforeIcon?: import("react").ReactNode;
|
26
|
+
children: string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | import("react").ReactPortal;
|
27
|
+
disabled?: boolean | undefined;
|
28
|
+
href?: string | undefined;
|
29
|
+
loading?: boolean | undefined;
|
30
|
+
onClick?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
|
31
|
+
onMouseUp?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
|
32
|
+
onKeyPress?: {
|
33
|
+
key: string;
|
34
|
+
action: (event: KeyboardEvent) => void;
|
35
|
+
} | 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" | "reset" | "submit" | undefined;
|
43
|
+
target?: string | undefined;
|
44
|
+
download?: any;
|
45
|
+
tabIndex?: number | undefined;
|
46
|
+
} & {
|
23
47
|
success?: boolean | undefined;
|
24
48
|
danger?: boolean | undefined;
|
25
49
|
highlight?: boolean | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/FileInput/styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,OAAO;;;yGAGnB,CAAA;AAED,eAAO,MAAM,WAAW;;;yGAAe,CAAA;AAEvC,eAAO,MAAM,YAAY;;;yGAIxB,CAAA;AACD,eAAO,MAAM,eAAe;;;yGAI3B,CAAA;AAED,eAAO,MAAM,QAAQ;;;2GAcpB,CAAA;AAED,eAAO,MAAM,MAAM
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/FileInput/styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,OAAO;;;yGAGnB,CAAA;AAED,eAAO,MAAM,WAAW;;;yGAAe,CAAA;AAEvC,eAAO,MAAM,YAAY;;;yGAIxB,CAAA;AACD,eAAO,MAAM,eAAe;;;yGAI3B,CAAA;AAED,eAAO,MAAM,QAAQ;;;2GAcpB,CAAA;AAED,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAOlB,CAAA;AAED,eAAO,MAAM,UAAU;;;;WACJ,MAAM;;qHAsBxB,CAAA;AAED,eAAO,MAAM,aAAa;;;2GAOzB,CAAA;AAED,eAAO,MAAM,WAAW;;;kHAEvB,CAAA;AAED,eAAO,MAAM,IAAI;;;;;2GAOhB,CAAA;AAED,eAAO,MAAM,KAAK;;;2GAKjB,CAAA;AAED,eAAO,MAAM,YAAY;;;yGAMxB,CAAA"}
|
@@ -1,5 +1,29 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
export declare const StyledButton: import("@emotion/styled").StyledComponent<import("
|
2
|
+
export declare const StyledButton: import("@emotion/styled").StyledComponent<import("../../shared/types/Accessibility").AccessibilityProps & {
|
3
|
+
[prop: string]: unknown;
|
4
|
+
afterIcon?: import("react").ReactNode;
|
5
|
+
beforeIcon?: import("react").ReactNode;
|
6
|
+
children: string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | import("react").ReactPortal;
|
7
|
+
disabled?: boolean | undefined;
|
8
|
+
href?: string | undefined;
|
9
|
+
loading?: boolean | undefined;
|
10
|
+
onClick?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
|
11
|
+
onMouseUp?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
|
12
|
+
onKeyPress?: {
|
13
|
+
key: string;
|
14
|
+
action: (event: KeyboardEvent) => void;
|
15
|
+
} | undefined;
|
16
|
+
onEnterKeyPress?: ((event: KeyboardEvent) => void) | undefined;
|
17
|
+
onEscapeKeyPress?: ((event: KeyboardEvent) => void) | undefined;
|
18
|
+
openInNewWindow?: boolean | undefined;
|
19
|
+
rel?: string | undefined;
|
20
|
+
trackingEvent?: string | undefined;
|
21
|
+
trackingName?: string | undefined;
|
22
|
+
type?: "button" | "reset" | "submit" | undefined;
|
23
|
+
target?: string | undefined;
|
24
|
+
download?: any;
|
25
|
+
tabIndex?: number | undefined;
|
26
|
+
} & {
|
3
27
|
success?: boolean | undefined;
|
4
28
|
danger?: boolean | undefined;
|
5
29
|
highlight?: boolean | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/InfoButton/styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,YAAY
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/InfoButton/styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAOxB,CAAA;AAED,eAAO,MAAM,MAAM;;;;;;mBAmFF,MAAM,SAAS,MAAM;CAQrC,CAAA;AAED,eAAO,MAAM,OAAO;;;yGAiCnB,CAAA;AAED,eAAO,MAAM,OAAO;;;2GAInB,CAAA"}
|
@@ -1,24 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
export
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
export declare const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
export declare const Dynamic: {
|
13
|
-
render: () => import("react").JSX.Element;
|
14
|
-
name: string;
|
15
|
-
};
|
16
|
-
export declare const Scrollable: {
|
17
|
-
render: () => import("react").JSX.Element;
|
18
|
-
name: string;
|
19
|
-
};
|
20
|
-
export declare const Fullscreeen: {
|
21
|
-
render: () => import("react").JSX.Element;
|
22
|
-
name: string;
|
23
|
-
};
|
1
|
+
import Modal from '.';
|
2
|
+
import { Meta, StoryObj } from '@storybook/react';
|
3
|
+
declare const meta: Meta<typeof Modal>;
|
4
|
+
export default meta;
|
5
|
+
declare type Story = StoryObj<typeof Modal>;
|
6
|
+
export declare const Default: Story;
|
7
|
+
export declare const Collapse: Story;
|
8
|
+
export declare const Dynamic: Story;
|
9
|
+
export declare const Scrollable: Story;
|
10
|
+
export declare const Accessible: Story;
|
11
|
+
export declare const Fullscreen: Story;
|
24
12
|
//# sourceMappingURL=Modal.stories.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Modal.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Modal/Modal.stories.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Modal.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Modal/Modal.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,GAAG,CAAA;AACrB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAGjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAGpB,CAAA;AACT,eAAe,IAAI,CAAA;AAEnB,aAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAA;AAEnC,eAAO,MAAM,OAAO,EAAE,KAoBrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAetB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAoBrB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAsIxB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAA"}
|