@bbl-digital/snorre 4.0.9 → 4.0.11
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +129 -46
- package/esm/core/Alert/index.js +1 -1
- package/esm/core/AppLoader/index.js +1 -1
- package/esm/core/Banner/Banner.stories.js +17 -0
- package/esm/core/Banner/index.js +1 -1
- package/esm/core/Box/Box.stories.js +32 -31
- package/esm/core/Box/index.js +10 -3
- package/esm/core/Button/index.js +3 -2
- package/esm/core/Card/Card.stories.js +8 -7
- package/esm/core/Card/index.js +1 -0
- package/esm/core/Checkbox/Checkbox.stories.js +22 -22
- package/esm/core/CollapseList/CollapseList.stories.js +36 -28
- package/esm/core/CollapseList/Item.js +36 -3
- package/esm/core/CollapseList/index.js +3 -1
- package/esm/core/CommentsTimeline/CommentLine/index.js +13 -4
- package/esm/core/CommentsTimeline/CommentsTimeline.stories.js +67 -62
- package/esm/core/CommentsTimeline/index.js +2 -0
- package/esm/core/CustomText/CustomText.stories.js +12 -12
- package/esm/core/CustomText/index.js +4 -1
- package/esm/core/Dropdown/Dropdown.stories.js +16 -15
- package/esm/core/Dropdown/index.js +18 -0
- package/esm/core/Header/index.js +2 -1
- package/esm/core/Header/styles.js +7 -7
- package/esm/core/Modal/index.js +1 -1
- package/esm/core/Modal/styles.js +9 -9
- package/esm/core/Text/index.js +3 -1
- package/esm/core/Textarea/Textarea.stories.js +26 -19
- package/esm/core/Textarea/index.js +4 -2
- package/esm/core/Textarea/styles.js +7 -6
- package/esm/core/private/ButtonOrLink.js +5 -4
- package/lib/core/Alert/index.d.ts +1 -2
- package/lib/core/Alert/index.d.ts.map +1 -1
- package/lib/core/Alert/index.js +1 -1
- package/lib/core/AppLoader/index.d.ts +1 -2
- package/lib/core/AppLoader/index.d.ts.map +1 -1
- package/lib/core/AppLoader/index.js +1 -1
- package/lib/core/Autocomplete/styles.d.ts +1 -39
- package/lib/core/Autocomplete/styles.d.ts.map +1 -1
- package/lib/core/Banner/Banner.stories.d.ts +1 -0
- package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
- package/lib/core/Banner/Banner.stories.js +17 -0
- package/lib/core/Banner/index.d.ts +1 -2
- package/lib/core/Banner/index.d.ts.map +1 -1
- package/lib/core/Banner/index.js +1 -1
- package/lib/core/Box/Box.stories.d.ts +14 -39
- package/lib/core/Box/Box.stories.d.ts.map +1 -1
- package/lib/core/Box/Box.stories.js +32 -31
- package/lib/core/Box/index.d.ts +1 -1
- package/lib/core/Box/index.d.ts.map +1 -1
- package/lib/core/Box/index.js +10 -3
- package/lib/core/Box/styles.d.ts +1 -39
- package/lib/core/Box/styles.d.ts.map +1 -1
- package/lib/core/Button/index.d.ts +3 -4
- package/lib/core/Button/index.d.ts.map +1 -1
- package/lib/core/Button/index.js +3 -2
- package/lib/core/Card/Card.stories.d.ts +10 -24
- package/lib/core/Card/Card.stories.d.ts.map +1 -1
- package/lib/core/Card/Card.stories.js +8 -7
- package/lib/core/Card/index.d.ts +1 -1
- package/lib/core/Card/index.d.ts.map +1 -1
- package/lib/core/Card/index.js +1 -0
- package/lib/core/Checkbox/Checkbox.stories.d.ts +10 -23
- package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.js +22 -22
- package/lib/core/CollapseList/CollapseList.stories.d.ts +7 -11
- package/lib/core/CollapseList/CollapseList.stories.d.ts.map +1 -1
- package/lib/core/CollapseList/CollapseList.stories.js +36 -28
- package/lib/core/CollapseList/Item.d.ts +4 -4
- package/lib/core/CollapseList/Item.d.ts.map +1 -1
- package/lib/core/CollapseList/Item.js +36 -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 +3 -1
- package/lib/core/CollapseList/styles.d.ts +1 -39
- package/lib/core/CollapseList/styles.d.ts.map +1 -1
- package/lib/core/CommentsTimeline/CommentLine/index.d.ts +1 -1
- package/lib/core/CommentsTimeline/CommentLine/index.d.ts.map +1 -1
- package/lib/core/CommentsTimeline/CommentLine/index.js +13 -4
- package/lib/core/CommentsTimeline/CommentsTimeline.stories.d.ts +7 -11
- package/lib/core/CommentsTimeline/CommentsTimeline.stories.d.ts.map +1 -1
- package/lib/core/CommentsTimeline/CommentsTimeline.stories.js +67 -62
- package/lib/core/CommentsTimeline/index.d.ts.map +1 -1
- package/lib/core/CommentsTimeline/index.js +2 -0
- package/lib/core/CustomText/CustomText.stories.d.ts +9 -19
- package/lib/core/CustomText/CustomText.stories.d.ts.map +1 -1
- package/lib/core/CustomText/CustomText.stories.js +12 -12
- package/lib/core/CustomText/index.d.ts.map +1 -1
- package/lib/core/CustomText/index.js +4 -1
- package/lib/core/Dropdown/Dropdown.stories.d.ts +10 -23
- package/lib/core/Dropdown/Dropdown.stories.d.ts.map +1 -1
- package/lib/core/Dropdown/Dropdown.stories.js +16 -15
- package/lib/core/Dropdown/index.d.ts +1 -1
- package/lib/core/Dropdown/index.d.ts.map +1 -1
- package/lib/core/Dropdown/index.js +18 -0
- package/lib/core/FileInput/styles.d.ts +1 -39
- package/lib/core/FileInput/styles.d.ts.map +1 -1
- package/lib/core/Header/index.d.ts +3 -1
- package/lib/core/Header/index.d.ts.map +1 -1
- package/lib/core/Header/index.js +2 -1
- package/lib/core/Header/styles.d.ts +1 -1
- package/lib/core/Header/styles.d.ts.map +1 -1
- package/lib/core/Header/styles.js +7 -7
- package/lib/core/InfoButton/styles.d.ts +1 -39
- package/lib/core/InfoButton/styles.d.ts.map +1 -1
- package/lib/core/Modal/index.d.ts +1 -2
- package/lib/core/Modal/index.d.ts.map +1 -1
- package/lib/core/Modal/index.js +1 -1
- package/lib/core/Modal/styles.d.ts +1 -1
- package/lib/core/Modal/styles.d.ts.map +1 -1
- package/lib/core/Modal/styles.js +9 -9
- package/lib/core/Text/index.d.ts +2 -1
- package/lib/core/Text/index.d.ts.map +1 -1
- package/lib/core/Text/index.js +3 -1
- package/lib/core/Textarea/Textarea.stories.d.ts +10 -19
- package/lib/core/Textarea/Textarea.stories.d.ts.map +1 -1
- package/lib/core/Textarea/Textarea.stories.js +26 -19
- package/lib/core/Textarea/index.d.ts +2 -0
- package/lib/core/Textarea/index.d.ts.map +1 -1
- package/lib/core/Textarea/index.js +4 -2
- package/lib/core/Textarea/styles.d.ts +5 -4
- package/lib/core/Textarea/styles.d.ts.map +1 -1
- package/lib/core/Textarea/styles.js +7 -6
- package/lib/core/private/ButtonOrLink.d.ts +2 -3
- package/lib/core/private/ButtonOrLink.d.ts.map +1 -1
- package/lib/core/private/ButtonOrLink.js +5 -4
- package/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/layout/Footer/FooterButton/styles.d.ts +1 -1
- package/lib/layout/Footer/FooterLink/styles.d.ts +1 -1
- package/lib/layout/Menu/MenuTop/styles.d.ts +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
package/lib/core/Alert/index.js
CHANGED
@@ -33,7 +33,6 @@ const Alert = ({
|
|
33
33
|
return 'Informasjon';
|
34
34
|
};
|
35
35
|
const accessibilityProps = {
|
36
|
-
role: restProps['role'] || 'alert',
|
37
36
|
'aria-live': ariaLivePolicy,
|
38
37
|
'aria-atomic': restProps['aria-atomic'] || true,
|
39
38
|
'aria-label': restProps['aria-label'] || getDefaultAriaLabel(),
|
@@ -41,6 +40,7 @@ const Alert = ({
|
|
41
40
|
'aria-describedby': descriptionId.current
|
42
41
|
};
|
43
42
|
return _jsxs("div", {
|
43
|
+
role: "alert",
|
44
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],
|
45
45
|
className: className,
|
46
46
|
...restProps,
|
@@ -1,7 +1,6 @@
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
2
2
|
import React from 'react';
|
3
|
-
|
4
|
-
interface IProps extends AccessibilityProps {
|
3
|
+
interface IProps extends React.HTMLAttributes<HTMLDivElement> {
|
5
4
|
/** Color of loading dots */
|
6
5
|
color?: string;
|
7
6
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/AppLoader/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/AppLoader/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAyB,MAAM,OAAO,CAAA;AAI7C,UAAU,MAAO,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3D,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"}
|
@@ -8,11 +8,11 @@ const AppLoader = ({
|
|
8
8
|
...restProps
|
9
9
|
}) => {
|
10
10
|
const accessibilityProps = {
|
11
|
-
role: restProps['role'] || 'status',
|
12
11
|
'aria-live': restProps['aria-live'] || 'polite',
|
13
12
|
'aria-label': restProps['aria-label'] || 'Laster innhold'
|
14
13
|
};
|
15
14
|
return _jsxs("div", {
|
15
|
+
role: "status",
|
16
16
|
css: theme => [styles.default(theme, color)],
|
17
17
|
...restProps,
|
18
18
|
...accessibilityProps,
|
@@ -19,45 +19,7 @@ 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<import("
|
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
|
-
} & {
|
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
|
-
} & {
|
22
|
+
export declare const Clear: import("@emotion/styled").StyledComponent<Omit<import("../Button").IProps, "ref"> & import("react").RefAttributes<HTMLButtonElement> & {
|
61
23
|
theme?: import("@emotion/react").Theme | undefined;
|
62
24
|
}, {}, {}>;
|
63
25
|
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"}
|
@@ -1 +1 @@
|
|
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"}
|
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;AACD,eAAO,MAAM,aAAa,EAAE,KAU3B,CAAA"}
|
@@ -73,4 +73,21 @@ export const WithoutChildren = {
|
|
73
73
|
})
|
74
74
|
},
|
75
75
|
name: 'Without children'
|
76
|
+
};
|
77
|
+
export const WithAriaLabel = {
|
78
|
+
args: {
|
79
|
+
header: /*#__PURE__*/_jsx(Header, {
|
80
|
+
level: 4,
|
81
|
+
children: "Title"
|
82
|
+
}),
|
83
|
+
'aria-label': 'Title. Some content.',
|
84
|
+
children: /*#__PURE__*/_jsx("p", {
|
85
|
+
children: "Some content"
|
86
|
+
}),
|
87
|
+
actionButton: /*#__PURE__*/_jsx(Button, {
|
88
|
+
onClick: () => console.log('Hello'),
|
89
|
+
children: "Hello I am button"
|
90
|
+
})
|
91
|
+
},
|
92
|
+
name: 'With aria-label'
|
76
93
|
};
|
@@ -1,7 +1,6 @@
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
2
2
|
import React from 'react';
|
3
|
-
|
4
|
-
interface IProps extends AccessibilityProps {
|
3
|
+
interface IProps extends React.HTMLAttributes<HTMLDivElement> {
|
5
4
|
/** Banner header */
|
6
5
|
header?: React.ReactNode;
|
7
6
|
/** 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;AAIzB,UAAU,MAAO,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3D,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,CA8B5B,CAAA;AAED,eAAe,MAAM,CAAA"}
|
package/lib/core/Banner/index.js
CHANGED
@@ -1,40 +1,15 @@
|
|
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 WithHeader: {
|
17
|
-
render: () => import("react").JSX.Element;
|
18
|
-
name: string;
|
19
|
-
};
|
20
|
-
export declare const WithHeaderAndCollapse: {
|
21
|
-
render: () => import("react").JSX.Element;
|
22
|
-
name: string;
|
23
|
-
};
|
24
|
-
export declare const CollapsableMysite: {
|
25
|
-
render: () => import("react").JSX.Element;
|
26
|
-
name: string;
|
27
|
-
};
|
28
|
-
export declare const Noshadow: {
|
29
|
-
render: () => import("react").JSX.Element;
|
30
|
-
name: string;
|
31
|
-
};
|
32
|
-
export declare const Background: {
|
33
|
-
render: () => import("react").JSX.Element;
|
34
|
-
name: string;
|
35
|
-
};
|
36
|
-
export declare const HideContent: {
|
37
|
-
render: () => import("react").JSX.Element;
|
38
|
-
name: string;
|
39
|
-
};
|
1
|
+
import Box from '.';
|
2
|
+
import { Meta, StoryObj } from '@storybook/react';
|
3
|
+
declare const meta: Meta<typeof Box>;
|
4
|
+
export default meta;
|
5
|
+
declare type Story = StoryObj<typeof Box>;
|
6
|
+
export declare const Default: Story;
|
7
|
+
export declare const Collapsable: Story;
|
8
|
+
export declare const Rounded: Story;
|
9
|
+
export declare const WithHeader: Story;
|
10
|
+
export declare const WithHeaderAndCollapse: Story;
|
11
|
+
export declare const CollapsableMysite: Story;
|
12
|
+
export declare const Noshadow: Story;
|
13
|
+
export declare const Background: Story;
|
14
|
+
export declare const HideContent: Story;
|
40
15
|
//# sourceMappingURL=Box.stories.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Box.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Box/Box.stories.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Box.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Box/Box.stories.tsx"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,GAAG,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,GAAG,CAG1B,CAAA;AAED,eAAe,IAAI,CAAA;AAEnB,aAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAA;AAEjC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAQzB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,KAQnC,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAS/B,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAQzB,CAAA"}
|
@@ -1,89 +1,90 @@
|
|
1
1
|
import Header from '../Header';
|
2
2
|
import Box from '.';
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
4
|
-
|
4
|
+
const meta = {
|
5
5
|
title: 'Core/Box',
|
6
6
|
component: Box
|
7
7
|
};
|
8
|
+
export default meta;
|
8
9
|
export const Default = {
|
9
|
-
|
10
|
-
children:
|
11
|
-
}
|
10
|
+
args: {
|
11
|
+
children: 'Stuff'
|
12
|
+
},
|
12
13
|
name: 'Default'
|
13
14
|
};
|
14
15
|
export const Collapsable = {
|
15
|
-
|
16
|
+
args: {
|
16
17
|
header: /*#__PURE__*/_jsx(Header, {
|
17
18
|
level: 3,
|
18
19
|
children: "Header"
|
19
20
|
}),
|
20
21
|
collapsable: true,
|
21
|
-
children:
|
22
|
-
}
|
22
|
+
children: 'Stuff'
|
23
|
+
},
|
23
24
|
name: 'Collapsable'
|
24
25
|
};
|
25
26
|
export const Rounded = {
|
26
|
-
|
27
|
-
type:
|
28
|
-
children:
|
29
|
-
}
|
27
|
+
args: {
|
28
|
+
type: 'mysite',
|
29
|
+
children: 'Stuff'
|
30
|
+
},
|
30
31
|
name: 'Rounded'
|
31
32
|
};
|
32
33
|
export const WithHeader = {
|
33
|
-
|
34
|
+
args: {
|
34
35
|
header: /*#__PURE__*/_jsx(Header, {
|
35
36
|
level: 3,
|
36
37
|
children: "Header"
|
37
38
|
}),
|
38
|
-
children:
|
39
|
-
}
|
39
|
+
children: 'Stuff'
|
40
|
+
},
|
40
41
|
name: 'With header'
|
41
42
|
};
|
42
43
|
export const WithHeaderAndCollapse = {
|
43
|
-
|
44
|
+
args: {
|
44
45
|
header: /*#__PURE__*/_jsx(Header, {
|
45
46
|
level: 3,
|
46
47
|
children: "Header"
|
47
48
|
}),
|
48
49
|
collapsable: true,
|
49
|
-
children:
|
50
|
-
}
|
50
|
+
children: 'Stuff'
|
51
|
+
},
|
51
52
|
name: 'With header and collapse'
|
52
53
|
};
|
53
54
|
export const CollapsableMysite = {
|
54
|
-
|
55
|
+
args: {
|
55
56
|
header: /*#__PURE__*/_jsx(Header, {
|
56
57
|
level: 3,
|
57
58
|
children: "Header"
|
58
59
|
}),
|
59
60
|
collapsable: true,
|
60
|
-
type:
|
61
|
-
children:
|
62
|
-
}
|
61
|
+
type: 'mysite',
|
62
|
+
children: 'Stuff'
|
63
|
+
},
|
63
64
|
name: 'Collapsable mysite'
|
64
65
|
};
|
65
66
|
export const Noshadow = {
|
66
|
-
|
67
|
+
args: {
|
67
68
|
noshadow: true,
|
68
|
-
children:
|
69
|
-
}
|
69
|
+
children: 'Stuff'
|
70
|
+
},
|
70
71
|
name: 'Noshadow'
|
71
72
|
};
|
72
73
|
export const Background = {
|
73
|
-
|
74
|
-
background:
|
75
|
-
children:
|
76
|
-
}
|
74
|
+
args: {
|
75
|
+
background: '#ececec',
|
76
|
+
children: 'Stuff'
|
77
|
+
},
|
77
78
|
name: 'Background'
|
78
79
|
};
|
79
80
|
export const HideContent = {
|
80
|
-
|
81
|
+
args: {
|
81
82
|
header: /*#__PURE__*/_jsx(Header, {
|
82
83
|
level: 3,
|
83
84
|
children: "Header"
|
84
85
|
}),
|
85
86
|
hideContent: true,
|
86
|
-
children:
|
87
|
-
}
|
87
|
+
children: 'Stuff'
|
88
|
+
},
|
88
89
|
name: 'Hide content'
|
89
90
|
};
|
package/lib/core/Box/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
2
2
|
import React from 'react';
|
3
3
|
import { SerializedStyles } from '@emotion/react';
|
4
|
-
declare type IProps = {
|
4
|
+
declare type IProps = React.HTMLAttributes<HTMLDivElement> & {
|
5
5
|
/** Header component */
|
6
6
|
header?: React.ReactNode;
|
7
7
|
/** Collapsable box prop */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Box/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAA8B,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAMjD,aAAK,MAAM,GAAG;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Box/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAA8B,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAMjD,aAAK,MAAM,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IACnD,uBAAuB;IACvB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,2BAA2B;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,qCAAqC;IACrC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,gBAAgB,CAAA;IACtB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qBAAqB;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,yCAAyC;IACzC,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;IAC3B,mFAAmF;IACnF,YAAY,CAAC,EAAE,SAAS,GAAG,YAAY,CAAA;IACvC,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,oBAAoB;IACpB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,eAAe;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAA;CAC/C,CAAA;AAED,QAAA,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAsEzB,CAAA;AAED,eAAe,GAAG,CAAA"}
|
package/lib/core/Box/index.js
CHANGED
@@ -28,12 +28,18 @@ const Box = ({
|
|
28
28
|
const onCollapseIconClicked = e => {
|
29
29
|
setIsOpen(!isOpen);
|
30
30
|
};
|
31
|
-
const icon = collapseIcon === 'plus/minus' ? isOpen ? _jsx(IconMinus, {
|
31
|
+
const icon = collapseIcon === 'plus/minus' ? isOpen ? _jsx(IconMinus, {
|
32
|
+
"aria-hidden": "true"
|
33
|
+
}) : _jsx(IconPlus, {
|
34
|
+
"aria-hidden": "true"
|
35
|
+
}) : _jsx(IconChevronDown, {
|
32
36
|
flipVertical: isOpen,
|
33
|
-
size: "14px"
|
37
|
+
size: "14px",
|
38
|
+
"aria-hidden": "true"
|
34
39
|
});
|
35
40
|
const headerWrapper = collapsable ? _jsx(CollapseButton, {
|
36
|
-
"aria-label":
|
41
|
+
"aria-label": `Toggle box ${isOpen ? 'closed' : 'open'}`,
|
42
|
+
"aria-expanded": isOpen,
|
37
43
|
onClick: onCollapseIconClicked,
|
38
44
|
nostyle: true,
|
39
45
|
children: _jsxs(HeaderWrapper, {
|
@@ -45,6 +51,7 @@ const Box = ({
|
|
45
51
|
children: header
|
46
52
|
});
|
47
53
|
return _jsxs("div", {
|
54
|
+
role: "group",
|
48
55
|
css: theme => [styles.default(theme), css && css, type === 'mysite' && styles.mysite(theme), noshadow && styles.noshadow, background && styles.background(background)],
|
49
56
|
className: className,
|
50
57
|
...restProps,
|
package/lib/core/Box/styles.d.ts
CHANGED
@@ -16,45 +16,7 @@ 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("
|
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
|
-
} & {
|
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
|
-
} & {
|
19
|
+
declare const CollapseButton: import("@emotion/styled").StyledComponent<Omit<import("../Button").IProps, "ref"> & import("react").RefAttributes<HTMLButtonElement> & {
|
58
20
|
theme?: import("@emotion/react").Theme | undefined;
|
59
21
|
}, {}, {}>;
|
60
22
|
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"}
|
@@ -1,9 +1,8 @@
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
2
|
-
import React from 'react';
|
2
|
+
import React, { HTMLAttributes } from 'react';
|
3
3
|
import { SerializedStyles } from '@emotion/react';
|
4
4
|
import { Props as ButtonOrLinkProps } from '../private/ButtonOrLink';
|
5
|
-
|
6
|
-
export declare type IProps = ButtonOrLinkProps & AccessibilityProps & {
|
5
|
+
export declare type IProps = ButtonOrLinkProps & HTMLAttributes<HTMLAnchorElement | HTMLButtonElement> & {
|
7
6
|
/** Success color styling */
|
8
7
|
success?: boolean;
|
9
8
|
/** Danger color styling */
|
@@ -31,6 +30,6 @@ export declare type IProps = ButtonOrLinkProps & AccessibilityProps & {
|
|
31
30
|
/** Set tabindex */
|
32
31
|
tabIndex?: number;
|
33
32
|
};
|
34
|
-
declare const Button: React.
|
33
|
+
declare const Button: React.ForwardRefExoticComponent<Omit<IProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
35
34
|
export default Button;
|
36
35
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Button/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Button/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAkB,cAAc,EAAE,MAAM,OAAO,CAAA;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAqB,EACnB,KAAK,IAAI,iBAAiB,EAC3B,MAAM,yBAAyB,CAAA;AAOhC,oBAAY,MAAM,GAAG,iBAAiB,GACpC,cAAc,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,GAAG;IACtD,4BAA4B;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2BAA2B;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oBAAoB;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mDAAmD;IACnD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,oBAAoB;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,iBAAiB;IACjB,GAAG,CAAC,EAAE,gBAAgB,CAAA;IACtB,uCAAuC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,uBAAuB;IACvB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,0BAA0B;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,4BAA4B;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,mBAAmB;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAEH,QAAA,MAAM,MAAM,+FAkFV,CAAA;AACF,eAAe,MAAM,CAAA"}
|
package/lib/core/Button/index.js
CHANGED
@@ -6,7 +6,7 @@ import AppLoader from '../AppLoader';
|
|
6
6
|
import { useTheme } from '@emotion/react';
|
7
7
|
import IconChevronLeft from '../../icons/General/IconChevronLeft';
|
8
8
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
9
|
-
const Button = props => {
|
9
|
+
const Button = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
10
|
const {
|
11
11
|
danger,
|
12
12
|
success,
|
@@ -49,6 +49,7 @@ const Button = props => {
|
|
49
49
|
tabIndex: tabIndex,
|
50
50
|
disabled: disabled,
|
51
51
|
loading: loading,
|
52
|
+
ref: ref,
|
52
53
|
css: theme => [styles.default(theme), outline && styles.outline(theme), danger && styles.danger(theme), success && styles.success(theme), highlight && styles.highlighted, disabled && styles.disabled(theme), (beforeIcon || afterIcon) && styles.icon(theme), beforeIcon && styles.beforeIcon, afterIcon && styles.afterIcon, border && styles.border(border), nostyle && styles.nostyle, loading && styles.loading(theme), back && styles.back(theme), css && css, small && styles.small, danger && outline && styles.dangerOutline(theme), success && outline && styles.successOutline(theme), transparentBg && styles.transparentBg, focusable && styles.focusable],
|
53
54
|
afterIcon: afterIcon,
|
54
55
|
beforeIcon: back ? _jsx(IconChevronLeft, {
|
@@ -60,5 +61,5 @@ const Button = props => {
|
|
60
61
|
color: getLoaderColor()
|
61
62
|
}) : props.children
|
62
63
|
});
|
63
|
-
};
|
64
|
+
});
|
64
65
|
export default Button;
|
@@ -1,29 +1,15 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
onClick?: (() => void) | undefined;
|
9
|
-
noPadding?: boolean | undefined;
|
10
|
-
largePadding?: boolean | undefined;
|
11
|
-
height?: number | undefined;
|
12
|
-
nobackground?: boolean | undefined;
|
13
|
-
shadow?: boolean | undefined;
|
14
|
-
overflowvisible?: boolean | undefined;
|
15
|
-
css?: import("@emotion/utils").SerializedStyles | undefined;
|
16
|
-
className?: string | undefined;
|
17
|
-
children?: import("react").ReactNode | import("react").ReactNode[];
|
18
|
-
}>;
|
19
|
-
};
|
20
|
-
export default _default;
|
21
|
-
export declare const Default: {
|
22
|
-
render: () => import("react").JSX.Element;
|
23
|
-
name: string;
|
24
|
-
};
|
2
|
+
import { Meta, StoryObj } from '@storybook/react';
|
3
|
+
import Card from '.';
|
4
|
+
declare const meta: Meta<typeof Card>;
|
5
|
+
export default meta;
|
6
|
+
declare type Story = StoryObj<typeof Card>;
|
7
|
+
export declare const Default: Story;
|
25
8
|
export declare const WithHover: {
|
26
|
-
|
9
|
+
args: {
|
10
|
+
withhover: boolean;
|
11
|
+
children: string;
|
12
|
+
};
|
27
13
|
name: string;
|
28
14
|
};
|
29
15
|
export declare const WithShadow: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Card/Card.stories.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Card/Card.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,IAAI,MAAM,GAAG,CAAA;AAGpB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CAG3B,CAAA;AAED,eAAe,IAAI,CAAA;AAEnB,aAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAA;AAED,eAAO,MAAM,SAAS;;;;;;CAMrB,CAAA;AAED,eAAO,MAAM,UAAU;;;CAGtB,CAAA;AAED,eAAO,MAAM,WAAW;;;CAGvB,CAAA;AAED,eAAO,MAAM,QAAQ;;;CAGpB,CAAA;AAED,eAAO,MAAM,mBAAmB;;;CAa/B,CAAA;AAED,eAAO,MAAM,aAAa;;;CAOzB,CAAA"}
|
@@ -2,21 +2,22 @@ import Card from '.';
|
|
2
2
|
import Dropdown from '../Dropdown';
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
4
4
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
5
|
-
|
5
|
+
const meta = {
|
6
6
|
title: 'Core/Card',
|
7
7
|
component: Card
|
8
8
|
};
|
9
|
+
export default meta;
|
9
10
|
export const Default = {
|
10
|
-
|
11
|
-
children:
|
12
|
-
}
|
11
|
+
args: {
|
12
|
+
children: 'Stuff'
|
13
|
+
},
|
13
14
|
name: 'Default'
|
14
15
|
};
|
15
16
|
export const WithHover = {
|
16
|
-
|
17
|
+
args: {
|
17
18
|
withhover: true,
|
18
|
-
children:
|
19
|
-
}
|
19
|
+
children: 'Hover me!'
|
20
|
+
},
|
20
21
|
name: 'With hover'
|
21
22
|
};
|
22
23
|
export const WithShadow = {
|
package/lib/core/Card/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
2
2
|
import React from 'react';
|
3
3
|
import { SerializedStyles } from '@emotion/react';
|
4
|
-
declare type IProps = {
|
4
|
+
declare type IProps = React.HTMLAttributes<HTMLDivElement> & {
|
5
5
|
/** Set to true for hover effect */
|
6
6
|
withhover?: boolean;
|
7
7
|
/** To set primary background color*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Card/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAIjD,aAAK,MAAM,GAAG;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Card/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAIjD,aAAK,MAAM,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IACnD,mCAAmC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,iBAAiB;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,iCAAiC;IACjC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,yBAAyB;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,0CAA0C;IAC1C,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,6BAA6B;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,gBAAgB,CAAA;IACtB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAA;CAC/C,CAAA;AAED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAiC1B,CAAA;AAED,eAAe,IAAI,CAAA"}
|