norma-library 0.6.86 → 0.6.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.ts +7 -0
- package/dist/esm/components/Box/interfaces.d.ts +1 -0
- package/dist/esm/components/Breadcrumb/index.d.ts +2 -2
- package/dist/esm/components/Breadcrumb/index.js +13 -9
- package/dist/esm/components/Breadcrumb/index.js.map +1 -1
- package/dist/esm/components/Breadcrumb/interface.d.ts +11 -6
- package/dist/esm/components/Breadcrumb/styles.d.ts +3 -3
- package/dist/esm/components/Breadcrumb/styles.js +3 -3
- package/dist/esm/components/Breadcrumb/styles.js.map +1 -1
- package/dist/esm/components/ProductCard/ProductCard.js +7 -5
- package/dist/esm/components/ProductCard/ProductCard.js.map +1 -1
- package/dist/esm/components/ProductCard/ProductCard.style.js +1 -1
- package/dist/esm/components/ProductCard/ProductCard.style.js.map +1 -1
- package/dist/esm/components/Typography/Text/interfaces.d.ts +1 -0
- package/dist/esm/components/Typography/Title/interfaces.d.ts +1 -0
- package/dist/esm/hooks/useClickOutside.d.ts +1 -1
- package/dist/esm/hooks/useClickOutside.js.map +1 -1
- package/dist/esm/interfaces/ProductCard.d.ts +1 -1
- package/package.json +24 -24
- package/src/components/Box/interfaces.ts +2 -0
- package/src/components/Breadcrumb/index.tsx +16 -11
- package/src/components/Breadcrumb/interface.ts +12 -6
- package/src/components/Breadcrumb/styles.tsx +10 -11
- package/src/components/ProductCard/ProductCard.style.ts +0 -1
- package/src/components/ProductCard/ProductCard.tsx +6 -5
- package/src/components/Typography/Text/interfaces.ts +3 -1
- package/src/components/Typography/Title/interfaces.ts +2 -0
- package/src/hooks/useClickOutside.tsx +1 -1
- package/src/interfaces/ProductCard.ts +1 -1
- package/src/stories/Accordion.stories.tsx +19 -19
- package/src/stories/Avatar.stories.tsx +32 -28
- package/src/stories/Badge.stories.tsx +17 -15
- package/src/stories/Box.stories.tsx +16 -12
- package/src/stories/Breadcrumb.stories.tsx +62 -18
- package/src/stories/Button.stories.tsx +24 -16
- package/src/stories/Card.stories.tsx +21 -13
- package/src/stories/ChatMessage.stories.tsx +10 -9
- package/src/stories/ChatMessageBalloon.stories.tsx +83 -66
- package/src/stories/CheckBox.stories.tsx +23 -23
- package/src/stories/DateInput.stories.tsx +15 -16
- package/src/stories/DatePicker.stories.tsx +17 -12
- package/src/stories/DropDown.stories.tsx +16 -16
- package/src/stories/IconButton.stories.tsx +45 -21
- package/src/stories/Modal.stories.tsx +49 -49
- package/src/stories/ModalStatus.stories.tsx +34 -18
- package/src/stories/MultiSelectInput.stories.tsx +30 -28
- package/src/stories/NormaChatMessageBalloon.stories.tsx +119 -82
- package/src/stories/Paper.stories.tsx +14 -14
- package/src/stories/ProductCard.stories.tsx +123 -51
- package/src/stories/ProgressBar.stories.tsx +27 -19
- package/src/stories/RadioGroup.stories.tsx +28 -21
- package/src/stories/RangerSlider.stories.tsx +43 -35
- package/src/stories/Select.stories.tsx +61 -33
- package/src/stories/SelectInput.stories.tsx +27 -25
- package/src/stories/ServiceCard.stories.tsx +36 -27
- package/src/stories/Table.stories.tsx +211 -276
- package/src/stories/Tabs.stories.tsx +17 -17
- package/src/stories/Tag.stories.tsx +22 -14
- package/src/stories/Text.stories.tsx +9 -9
- package/src/stories/TextField.stories.tsx +116 -35
- package/src/stories/TextInput.stories.tsx +14 -15
- package/src/stories/TimeLine.stories.tsx +22 -20
- package/src/stories/TimePicker.stories.tsx +54 -30
- package/src/stories/Title.stories.tsx +9 -9
- package/src/stories/UncontrolledTable.stories.tsx +196 -66
- package/src/stories/UncontrolledTabs.stories.tsx +28 -23
- /package/src/stories/{Colors.stories.mdx → Colors.mdx} +0 -0
package/.storybook/main.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { StorybookConfig } from '@storybook/react-vite';
|
|
|
2
2
|
|
|
3
3
|
const config: StorybookConfig = {
|
|
4
4
|
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
5
|
+
|
|
5
6
|
addons: [
|
|
6
7
|
'@storybook/addon-links',
|
|
7
8
|
'@storybook/addon-essentials',
|
|
@@ -9,12 +10,18 @@ const config: StorybookConfig = {
|
|
|
9
10
|
'@storybook/addon-interactions',
|
|
10
11
|
'@storybook/addon-mdx-gfm'
|
|
11
12
|
],
|
|
13
|
+
|
|
12
14
|
framework: {
|
|
13
15
|
name: '@storybook/react-vite',
|
|
14
16
|
options: {},
|
|
15
17
|
},
|
|
18
|
+
|
|
16
19
|
docs: {
|
|
17
20
|
autodocs: 'tag',
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
typescript: {
|
|
24
|
+
reactDocgen: 'react-docgen-typescript'
|
|
18
25
|
}
|
|
19
26
|
};
|
|
20
27
|
export default config;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import * as S from "./styles";
|
|
3
|
+
import { Icons } from '../Icons';
|
|
4
|
+
import { Home } from '@mui/icons-material';
|
|
3
5
|
var Breadcrumb = function (_a) {
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return
|
|
6
|
+
var items = _a.items, onHomeClick = _a.onHomeClick, onPathClick = _a.onPathClick;
|
|
7
|
+
var listItems = useMemo(function () {
|
|
8
|
+
return items.map(function (item, index, self) {
|
|
7
9
|
var showIcon = self.length > index + 1;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
var isFixedIcon = items[0] === item;
|
|
11
|
+
return (React.createElement("div", { className: 'content', key: index, onClick: function (event) { return items[0] === item ? onHomeClick(event) : onPathClick(item, event); } },
|
|
12
|
+
isFixedIcon && React.createElement(Icons, { icon: Home }),
|
|
13
|
+
!isFixedIcon && item.icon && React.createElement(Icons, { icon: item.icon, color: 'inherit' }),
|
|
14
|
+
React.createElement(S.Item, null, item.label),
|
|
15
|
+
showIcon && React.createElement(S.Divisor, null, "/")));
|
|
12
16
|
});
|
|
13
|
-
}, [
|
|
17
|
+
}, [items]);
|
|
14
18
|
return (React.createElement(S.Container, null,
|
|
15
|
-
React.createElement(S.
|
|
19
|
+
React.createElement(S.ListItems, null, listItems)));
|
|
16
20
|
};
|
|
17
21
|
export default Breadcrumb;
|
|
18
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Breadcrumb/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Breadcrumb/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAE7B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,IAAM,UAAU,GAA8B,UAAC,EAAmC;QAAjC,KAAK,WAAA,EAAE,WAAW,iBAAA,EAAE,WAAW,iBAAA;IAC9E,IAAM,SAAS,GAAG,OAAO,CAAC;QACxB,OAAO,KAAK,CAAC,GAAG,CAAC,UAAC,IAAU,EAAE,KAAa,EAAE,IAAY;YACvD,IAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,GAAG,KAAK,GAAG,CAAC,CAAA;YACxC,IAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,CAAA;YACrC,OAAO,CACL,6BAAK,SAAS,EAAC,SAAS,EAAC,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,EAAjE,CAAiE;gBACvH,WAAW,IAAI,oBAAC,KAAK,IAAC,IAAI,EAAE,IAAI,GAAI;gBACpC,CAAC,WAAW,IAAI,IAAI,CAAC,IAAI,IAAI,oBAAC,KAAK,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAC,SAAS,GAAG;gBACxE,oBAAC,CAAC,CAAC,IAAI,QAAE,IAAI,CAAC,KAAK,CAAU;gBAC5B,QAAQ,IAAI,oBAAC,CAAC,CAAC,OAAO,YAAc,CACjC,CACP,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IAEX,OAAO,CACL,oBAAC,CAAC,CAAC,SAAS;QACV,oBAAC,CAAC,CAAC,SAAS,QACT,SAAS,CACE,CACF,CACf,CAAA;AACH,CAAC,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { IconType } from "../../types";
|
|
2
|
+
import { SvgIconComponent } from "@mui/icons-material";
|
|
3
|
+
export interface Item {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
href: string;
|
|
7
|
+
icon?: SvgIconComponent | IconType;
|
|
4
8
|
}
|
|
5
|
-
export interface
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
export interface BreadCrumbProps {
|
|
10
|
+
onPathClick: Function;
|
|
11
|
+
onHomeClick: Function;
|
|
12
|
+
items: Item[];
|
|
8
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
2
|
+
export declare const ListItems: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const Item: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
|
|
4
|
+
export declare const Divisor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __makeTemplateObject } from "tslib";
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
export var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin: 0 0 16px 0;\n"], ["\n margin: 0 0 16px 0;\n"])));
|
|
4
|
-
export var
|
|
5
|
-
export var
|
|
6
|
-
export var
|
|
4
|
+
export var ListItems = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n gap: 8px;\n .content {\n display: flex;\n gap: 8px;\n align-items: center;\n }\n"], ["\n display: flex;\n gap: 8px;\n .content {\n display: flex;\n gap: 8px;\n align-items: center;\n }\n"])));
|
|
5
|
+
export var Item = styled.p(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: #666;\n font-size: 14px;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n"], ["\n color: #666;\n font-size: 14px;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n"])));
|
|
6
|
+
export var Divisor = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n color: #666;\n content: '/';\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n color: #666;\n content: '/';\n"])));
|
|
7
7
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
8
8
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/Breadcrumb/styles.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,IAAM,SAAS,GAAG,MAAM,CAAC,GAAG,8FAAA,2BAElC,IAAA,CAAA;AAED,MAAM,CAAC,IAAM,SAAS,GAAG,MAAM,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/Breadcrumb/styles.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,IAAM,SAAS,GAAG,MAAM,CAAC,GAAG,8FAAA,2BAElC,IAAA,CAAA;AAED,MAAM,CAAC,IAAM,SAAS,GAAG,MAAM,CAAC,GAAG,sLAAA,mHAQlC,IAAA,CAAA;AAED,MAAM,CAAC,IAAM,IAAI,GAAG,MAAM,CAAC,CAAC,kLAAA,+GAO3B,IAAA,CAAA;AAED,MAAM,CAAC,IAAM,OAAO,GAAG,MAAM,CAAC,GAAG,8KAAA,2GAMhC,IAAA,CAAA"}
|
|
@@ -18,15 +18,17 @@ export var ProductCard = function (_a) {
|
|
|
18
18
|
*/
|
|
19
19
|
return (React.createElement(ProductCardStyle, { disabled: disabled, "$bColor": icon === null || icon === void 0 ? void 0 : icon.iconColor, hasBorder: hasBorder },
|
|
20
20
|
React.createElement(Card, { variant: "outlined", onClick: function () { return onClick && onClick(); } },
|
|
21
|
-
|
|
21
|
+
favorite && (React.createElement(Grid, { container: true, justifyContent: 'flex-end', alignItems: 'flex-start', position: 'relative' },
|
|
22
22
|
React.createElement(Grid, { item: true },
|
|
23
23
|
React.createElement(IconButton, { sx: {
|
|
24
24
|
padding: 0,
|
|
25
25
|
position: 'absolute',
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
right: '2px',
|
|
27
|
+
}, "aria-label": "favorite", onClick: favorite.onFlag, cursor: "pointer" },
|
|
28
|
+
React.createElement(GradeIcon, { sx: {
|
|
29
|
+
color: favorite.flagged ? '#FDDA0D' : '#666',
|
|
30
|
+
fontSize: 24,
|
|
31
|
+
} }))))),
|
|
30
32
|
React.createElement(TitleContainer, null,
|
|
31
33
|
React.createElement(IconCardStyle, { "$iColor": (icon === null || icon === void 0 ? void 0 : icon.iconColor) || "", "$bColor": color },
|
|
32
34
|
React.createElement(Icons, { icon: icon === null || icon === void 0 ? void 0 : icon.iconName, color: icon === null || icon === void 0 ? void 0 : icon.iconColor, scale: icon === null || icon === void 0 ? void 0 : icon.scale, width: icon === null || icon === void 0 ? void 0 : icon.iconWidth, height: icon === null || icon === void 0 ? void 0 : icon.iconHeight })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCard.js","sourceRoot":"","sources":["../../../../src/components/ProductCard/ProductCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,SAAS,MAAM,2BAA2B,CAAA;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAIhC,MAAM,CAAC,IAAM,WAAW,GAA+B,UAAC,EAUvD;;IATC,wBAAwB;IACxB,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,OAAO,aAAA,EACP,iBAAgB,EAAhB,SAAS,mBAAG,IAAI,KAAA,EAChB,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,QAAQ,cAAA;IAGR;;;;;;IAMA;IACA,OAAO,CACL,oBAAC,gBAAgB,IAAC,QAAQ,EAAE,QAAQ,aAAW,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QAClF,oBAAC,IAAI,IACH,OAAO,EAAC,UAAU,EAClB,OAAO,EAAE,cAAM,OAAA,OAAO,IAAI,OAAO,EAAE,EAApB,CAAoB;YAElC,
|
|
1
|
+
{"version":3,"file":"ProductCard.js","sourceRoot":"","sources":["../../../../src/components/ProductCard/ProductCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,SAAS,MAAM,2BAA2B,CAAA;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAIhC,MAAM,CAAC,IAAM,WAAW,GAA+B,UAAC,EAUvD;;IATC,wBAAwB;IACxB,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,OAAO,aAAA,EACP,iBAAgB,EAAhB,SAAS,mBAAG,IAAI,KAAA,EAChB,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,QAAQ,cAAA;IAGR;;;;;;IAMA;IACA,OAAO,CACL,oBAAC,gBAAgB,IAAC,QAAQ,EAAE,QAAQ,aAAW,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QAClF,oBAAC,IAAI,IACH,OAAO,EAAC,UAAU,EAClB,OAAO,EAAE,cAAM,OAAA,OAAO,IAAI,OAAO,EAAE,EAApB,CAAoB;YAElC,QAAQ,IAAI,CACX,oBAAC,IAAI,IAAC,SAAS,QAAC,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU;gBACxF,oBAAC,IAAI,IAAC,IAAI;oBACR,oBAAC,UAAU,IACT,EAAE,EAAE;4BACF,OAAO,EAAE,CAAC;4BACV,QAAQ,EAAE,UAAU;4BACpB,KAAK,EAAE,KAAK;yBACb,gBACU,UAAU,EACrB,OAAO,EAAE,QAAQ,CAAC,MAAM,EACxB,MAAM,EAAC,SAAS;wBAEhB,oBAAC,SAAS,IAAC,EAAE,EAAE;gCACb,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM;gCAC5C,QAAQ,EAAE,EAAE;6BACb,GAAG,CACO,CACR,CACF,CACR;YAED,oBAAC,cAAc;gBACb,oBAAC,aAAa,eACH,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,KAAI,EAAE,aACrB,KAAK;oBAEd,oBAAC,KAAK,IAAC,IAAI,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,QAAoB,EAAE,KAAK,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,EAAE,KAAK,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAkB,EAAE,KAAK,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,EAAE,MAAM,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU,GAAI,CACxI;gBAChB,2BAAG,SAAS,EAAC,OAAO,IAAE,KAAK,CAAK,CACjB;YAEjB,2BAAG,SAAS,EAAC,aAAa,IACvB,WAAW,CACV,CACC,CACU,CACpB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __makeTemplateObject } from "tslib";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { pxToRem } from "../../utils/pxToRem";
|
|
4
|
-
export var ProductCardStyle = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([" \n max-width: 380px;\n cursor: ", ";\n opacity: ", ";\n
|
|
4
|
+
export var ProductCardStyle = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([" \n max-width: 380px;\n cursor: ", ";\n opacity: ", ";\n border-left: 7px solid ", " !important;\n border-radius: 5px;\n\n p.title {\n font-weight: 600;\n }\n\n p.description {\n margin-bottom: ", ";\n line-height: ", ";\n }\n\n .MuiPaper-root {\n min-height: 180px;\n }\n\n @media (max-width: 1535px) {\n max-width: 100%;\n }\n"], [" \n max-width: 380px;\n cursor: ", ";\n opacity: ", ";\n border-left: 7px solid ", " !important;\n border-radius: 5px;\n\n p.title {\n font-weight: 600;\n }\n\n p.description {\n margin-bottom: ", ";\n line-height: ", ";\n }\n\n .MuiPaper-root {\n min-height: 180px;\n }\n\n @media (max-width: 1535px) {\n max-width: 100%;\n }\n"])), function (props) { return (props.disabled ? "not-allowed" : "pointer"); }, function (props) { return (props.disabled ? 0.5 : 1); }, function (props) { return props.hasBorder ? props.$bColor : 'transparent'; }, pxToRem(17), pxToRem(24));
|
|
5
5
|
export var IconCardStyle = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: inline-flex;\n border-radius: 5px;\n align-items: center;\n justify-content: center;\n padding: 10px;\n background-color: ", ";\n min-width: ", ";\n min-height: ", ";\n margin-right: ", ";\n box-sizing: border-box;\n\n svg {\n max-height: 100%;\n max-width: 100%;\n path {\n fill: ", ";\n }\n }\n"], ["\n display: inline-flex;\n border-radius: 5px;\n align-items: center;\n justify-content: center;\n padding: 10px;\n background-color: ", ";\n min-width: ", ";\n min-height: ", ";\n margin-right: ", ";\n box-sizing: border-box;\n\n svg {\n max-height: 100%;\n max-width: 100%;\n path {\n fill: ", ";\n }\n }\n"])), function (props) { return props.$bColor; }, pxToRem(50), pxToRem(50), pxToRem(10), function (props) { return props.$iColor; });
|
|
6
6
|
export var TitleContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-bottom: ", ";\n\n p {\n font-size: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n margin-bottom: ", ";\n\n p {\n font-size: ", ";\n }\n"])), pxToRem(16), pxToRem(24));
|
|
7
7
|
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCard.style.js","sourceRoot":"","sources":["../../../../src/components/ProductCard/ProductCard.style.ts"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,MAAM,CAAC,IAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"ProductCard.style.js","sourceRoot":"","sources":["../../../../src/components/ProductCard/ProductCard.style.ts"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,MAAM,CAAC,IAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,yaAA+D,oCAE7F,EAAuD,gBACtD,EAAqC,8BACvB,EAA0D,0HAQhE,EAAW,sBACb,EAAW,0HAU7B,KArBW,UAAC,KAAK,IAAK,OAAA,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,EAA5C,CAA4C,EACtD,UAAC,KAAK,IAAK,OAAA,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAA1B,CAA0B,EACvB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,EAA/C,CAA+C,EAQhE,OAAO,CAAC,EAAE,CAAC,EACb,OAAO,CAAC,EAAE,CAAC,CAU7B,CAAC;AAEF,MAAM,CAAC,IAAM,aAAa,GAAG,MAAM,CAAC,GAAG,kZAAuC,8IAMxD,EAAwB,kBAC/B,EAAW,mBACV,EAAW,qBACT,EAAW,4GAOf,EAAwB,iBAGrC,KAbqB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,OAAO,EAAb,CAAa,EAC/B,OAAO,CAAC,EAAE,CAAC,EACV,OAAO,CAAC,EAAE,CAAC,EACT,OAAO,CAAC,EAAE,CAAC,EAOf,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,OAAO,EAAb,CAAa,CAGrC,CAAC;AAEF,MAAM,CAAC,IAAM,cAAc,GAAG,MAAM,CAAC,GAAG,6KAAA,+DAGrB,EAAW,6BAGb,EAAW,UAE3B,KALkB,OAAO,CAAC,EAAE,CAAC,EAGb,OAAO,CAAC,EAAE,CAAC,CAE3B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useClickOutside: (ref: React.RefObject<HTMLElement>, callback: () => void) => void;
|
|
1
|
+
declare const useClickOutside: (ref: React.RefObject<HTMLElement | null>, callback: () => void) => void;
|
|
2
2
|
export default useClickOutside;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useClickOutside.js","sourceRoot":"","sources":["../../../src/hooks/useClickOutside.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,IAAM,eAAe,GAAG,UAAC,
|
|
1
|
+
{"version":3,"file":"useClickOutside.js","sourceRoot":"","sources":["../../../src/hooks/useClickOutside.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,IAAM,eAAe,GAAG,UAAC,GAAwC,EAAE,QAAoB;IACrF,IAAM,kBAAkB,GAAG,UAAC,KAAiB;QAC3C,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,EAAE,CAAC;YAC/D,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC,CAAC;IAEF,SAAS,CAAC;QACR,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;QAC3D,OAAO;YACL,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;QAChE,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;AACtB,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -16,7 +16,7 @@ export interface ProductCardProps {
|
|
|
16
16
|
icon?: {
|
|
17
17
|
bgColor?: string;
|
|
18
18
|
iconColor?: string;
|
|
19
|
-
iconName?: keyof typeof iconsSVG | SvgIconComponent;
|
|
19
|
+
iconName?: keyof typeof iconsSVG | SvgIconComponent | string;
|
|
20
20
|
iconWidth?: string | number;
|
|
21
21
|
iconHeight?: string | number;
|
|
22
22
|
scale?: IconScale;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "norma-library",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.88",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Olos/Norma-DS. Design System based on Material UI, developed with TypeScript and Styled Components to create reusable and consistent components in web applications.",
|
|
6
6
|
"scripts": {
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
"@emotion/core": "^11.0.0",
|
|
35
35
|
"@emotion/styled-base": "^11.0.0",
|
|
36
36
|
"@mdx-js/loader": "^2.3.0",
|
|
37
|
-
"@storybook/addon-essentials": "^
|
|
38
|
-
"@storybook/addon-interactions": "^
|
|
39
|
-
"@storybook/addon-links": "^
|
|
40
|
-
"@storybook/addon-onboarding": "^
|
|
37
|
+
"@storybook/addon-essentials": "^8.5.6",
|
|
38
|
+
"@storybook/addon-interactions": "^8.5.6",
|
|
39
|
+
"@storybook/addon-links": "^8.5.6",
|
|
40
|
+
"@storybook/addon-onboarding": "^8.5.6",
|
|
41
41
|
"@storybook/addon-styling": "^1.3.7",
|
|
42
|
-
"@storybook/blocks": "^
|
|
43
|
-
"@storybook/react": "^
|
|
44
|
-
"@storybook/react-vite": "^
|
|
45
|
-
"@storybook/react-webpack5": "^
|
|
46
|
-
"@storybook/
|
|
47
|
-
"@types/react": "^
|
|
48
|
-
"@types/react-datepicker": "^
|
|
49
|
-
"@types/react-dom": "^
|
|
42
|
+
"@storybook/blocks": "^8.5.6",
|
|
43
|
+
"@storybook/react": "^8.5.6",
|
|
44
|
+
"@storybook/react-vite": "^8.5.6",
|
|
45
|
+
"@storybook/react-webpack5": "^8.5.6",
|
|
46
|
+
"@storybook/test": "^8.5.6",
|
|
47
|
+
"@types/react": "^19.0.0",
|
|
48
|
+
"@types/react-datepicker": "^7.0.0",
|
|
49
|
+
"@types/react-dom": "^19.0.0",
|
|
50
50
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
51
51
|
"@typescript-eslint/parser": "^6.0.0",
|
|
52
52
|
"@vitejs/plugin-react": "^4.0.3",
|
|
@@ -60,17 +60,17 @@
|
|
|
60
60
|
"eslint": "^8.45.0",
|
|
61
61
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
62
62
|
"eslint-plugin-react-refresh": "^0.4.3",
|
|
63
|
-
"eslint-plugin-storybook": "^0.
|
|
63
|
+
"eslint-plugin-storybook": "^0.11.2",
|
|
64
64
|
"git-cz": "^4.9.0",
|
|
65
65
|
"lint-staged": "^14.0.1",
|
|
66
66
|
"path": "^0.12.7",
|
|
67
67
|
"postcss": "^8.4.29",
|
|
68
68
|
"postcss-prettify": "^0.3.4",
|
|
69
|
-
"react": "^
|
|
70
|
-
"react-dom": "^
|
|
69
|
+
"react": "^19.0.0",
|
|
70
|
+
"react-dom": "^19.0.0",
|
|
71
71
|
"rimraf": "^5.0.5",
|
|
72
|
-
"storybook": "^
|
|
73
|
-
"storybook-dark-mode": "^
|
|
72
|
+
"storybook": "^8.5.6",
|
|
73
|
+
"storybook-dark-mode": "^4.0.2",
|
|
74
74
|
"style-loader": "^3.3.3",
|
|
75
75
|
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
|
76
76
|
"typescript": "^5.0.2",
|
|
@@ -92,24 +92,24 @@
|
|
|
92
92
|
"@dnd-kit/core": "^6.3.1",
|
|
93
93
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
94
94
|
"@dnd-kit/sortable": "^10.0.0",
|
|
95
|
-
"@emotion/react": "^11.
|
|
95
|
+
"@emotion/react": "^11.14.0",
|
|
96
96
|
"@emotion/styled": "^11.11.0",
|
|
97
97
|
"@mui/icons-material": "^5.14.9",
|
|
98
98
|
"@mui/lab": "^5.0.0-alpha.152",
|
|
99
99
|
"@mui/material": "^5.16.7",
|
|
100
|
-
"@mui/x-date-pickers": "^
|
|
101
|
-
"@storybook/addon-mdx-gfm": "^
|
|
100
|
+
"@mui/x-date-pickers": "^7.26.0",
|
|
101
|
+
"@storybook/addon-mdx-gfm": "^8.5.6",
|
|
102
102
|
"@tanstack/react-table": "^8.10.7",
|
|
103
103
|
"dayjs": "^1.11.9",
|
|
104
104
|
"react-datepicker": "^7.5.0",
|
|
105
|
-
"react-i18next": "^
|
|
105
|
+
"react-i18next": "^15.4.0",
|
|
106
106
|
"react-select": "^5.8.0",
|
|
107
107
|
"styled-components": "^6.1.0",
|
|
108
108
|
"tslib": "^2.6.2"
|
|
109
109
|
},
|
|
110
110
|
"peerDependencies": {
|
|
111
|
-
"react": "^17.0.0 || ^18.0.0",
|
|
112
|
-
"react-dom": "^17.0.0 || ^18.0.0"
|
|
111
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
112
|
+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
113
113
|
},
|
|
114
114
|
"browserslist": {
|
|
115
115
|
"production": [
|
|
@@ -1,25 +1,30 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import * as S from "./styles"
|
|
3
|
-
import {
|
|
3
|
+
import { BreadCrumbProps, Item } from './interface';
|
|
4
|
+
import { Icons } from '../Icons';
|
|
5
|
+
import { Home } from '@mui/icons-material';
|
|
4
6
|
|
|
5
|
-
const Breadcrumb:React.FC<
|
|
6
|
-
const
|
|
7
|
-
return
|
|
7
|
+
const Breadcrumb: React.FC<BreadCrumbProps> = ({ items, onHomeClick, onPathClick }) => {
|
|
8
|
+
const listItems = useMemo(() => {
|
|
9
|
+
return items.map((item: Item, index: number, self: Item[]) => {
|
|
8
10
|
const showIcon = self.length > index + 1
|
|
11
|
+
const isFixedIcon = items[0] === item
|
|
9
12
|
return (
|
|
10
|
-
<div className='content' key={index}>
|
|
11
|
-
<
|
|
12
|
-
{
|
|
13
|
+
<div className='content' key={index} onClick={(event) => items[0] === item ? onHomeClick(event) : onPathClick(item, event)}>
|
|
14
|
+
{isFixedIcon && <Icons icon={Home} />}
|
|
15
|
+
{!isFixedIcon && item.icon && <Icons icon={item.icon} color='inherit' />}
|
|
16
|
+
<S.Item>{item.label}</S.Item>
|
|
17
|
+
{showIcon && <S.Divisor>/</S.Divisor>}
|
|
13
18
|
</div>
|
|
14
19
|
)
|
|
15
20
|
})
|
|
16
|
-
}, [
|
|
21
|
+
}, [items])
|
|
17
22
|
|
|
18
23
|
return (
|
|
19
24
|
<S.Container>
|
|
20
|
-
<S.
|
|
21
|
-
{
|
|
22
|
-
</S.
|
|
25
|
+
<S.ListItems>
|
|
26
|
+
{listItems}
|
|
27
|
+
</S.ListItems>
|
|
23
28
|
</S.Container>
|
|
24
29
|
)
|
|
25
30
|
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { IconType } from "../../types";
|
|
2
|
+
import { SvgIconComponent } from "@mui/icons-material";
|
|
3
|
+
|
|
4
|
+
export interface Item {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
href: string;
|
|
8
|
+
icon?: SvgIconComponent | IconType;
|
|
4
9
|
}
|
|
5
10
|
|
|
6
|
-
export interface
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
export interface BreadCrumbProps {
|
|
12
|
+
onPathClick: Function;
|
|
13
|
+
onHomeClick: Function;
|
|
14
|
+
items: Item[];
|
|
9
15
|
}
|
|
@@ -4,30 +4,29 @@ export const Container = styled.div`
|
|
|
4
4
|
margin: 0 0 16px 0;
|
|
5
5
|
`
|
|
6
6
|
|
|
7
|
-
export const
|
|
7
|
+
export const ListItems = styled.div`
|
|
8
8
|
display: flex;
|
|
9
9
|
gap: 8px;
|
|
10
10
|
.content {
|
|
11
11
|
display: flex;
|
|
12
12
|
gap: 8px;
|
|
13
|
+
align-items: center;
|
|
13
14
|
}
|
|
14
15
|
`
|
|
15
16
|
|
|
16
|
-
export const
|
|
17
|
+
export const Item = styled.p`
|
|
17
18
|
color: #666;
|
|
18
19
|
font-size: 14px;
|
|
19
20
|
cursor: pointer;
|
|
21
|
+
&:hover {
|
|
22
|
+
text-decoration: underline;
|
|
23
|
+
}
|
|
20
24
|
`
|
|
21
25
|
|
|
22
|
-
export const
|
|
26
|
+
export const Divisor = styled.div`
|
|
23
27
|
display: flex;
|
|
24
28
|
align-items: center;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
display: inline-block;
|
|
29
|
-
padding: 2px;
|
|
30
|
-
transform: rotate(-45deg);
|
|
31
|
-
-webkit-transform: rotate(-45deg);
|
|
32
|
-
}
|
|
29
|
+
justify-content: center;
|
|
30
|
+
color: #666;
|
|
31
|
+
content: '/';
|
|
33
32
|
`
|
|
@@ -5,7 +5,6 @@ export const ProductCardStyle = styled.div<{ disabled?: boolean, $bColor?: strin
|
|
|
5
5
|
max-width: 380px;
|
|
6
6
|
cursor: ${(props) => (props.disabled ? "not-allowed" : "pointer")};
|
|
7
7
|
opacity: ${(props) => (props.disabled ? 0.5 : 1)};
|
|
8
|
-
height: 100%;
|
|
9
8
|
border-left: 7px solid ${(props) => props.hasBorder ? props.$bColor : 'transparent'} !important;
|
|
10
9
|
border-radius: 5px;
|
|
11
10
|
|
|
@@ -34,22 +34,23 @@ export const ProductCard: React.FC<ProductCardProps> = ({
|
|
|
34
34
|
variant="outlined"
|
|
35
35
|
onClick={() => onClick && onClick()}
|
|
36
36
|
>
|
|
37
|
-
{favorite
|
|
37
|
+
{favorite && (
|
|
38
38
|
<Grid container justifyContent={'flex-end'} alignItems={'flex-start'} position={'relative'}>
|
|
39
39
|
<Grid item>
|
|
40
40
|
<IconButton
|
|
41
41
|
sx={{
|
|
42
42
|
padding: 0,
|
|
43
43
|
position: 'absolute',
|
|
44
|
-
|
|
45
|
-
right: '5px',
|
|
44
|
+
right: '2px',
|
|
46
45
|
}}
|
|
47
46
|
aria-label="favorite"
|
|
48
47
|
onClick={favorite.onFlag}
|
|
49
|
-
color={favorite.flagged ? 'primary' : 'inherit'}
|
|
50
48
|
cursor="pointer"
|
|
51
49
|
>
|
|
52
|
-
<GradeIcon
|
|
50
|
+
<GradeIcon sx={{
|
|
51
|
+
color: favorite.flagged ? '#FDDA0D' : '#666',
|
|
52
|
+
fontSize: 24,
|
|
53
|
+
}}/>
|
|
53
54
|
</IconButton>
|
|
54
55
|
</Grid>
|
|
55
56
|
</Grid>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
|
|
3
|
-
const useClickOutside = (ref: React.RefObject<HTMLElement>, callback: () => void) => {
|
|
3
|
+
const useClickOutside = (ref: React.RefObject<HTMLElement | null>, callback: () => void) => {
|
|
4
4
|
const handleClickOutside = (event: MouseEvent) => {
|
|
5
5
|
if (ref.current && !ref.current.contains(event.target as Node)) {
|
|
6
6
|
callback();
|
|
@@ -18,7 +18,7 @@ export interface ProductCardProps {
|
|
|
18
18
|
icon?: {
|
|
19
19
|
bgColor?: string;
|
|
20
20
|
iconColor?: string;
|
|
21
|
-
iconName?: keyof typeof iconsSVG | SvgIconComponent;
|
|
21
|
+
iconName?: keyof typeof iconsSVG | SvgIconComponent | string;
|
|
22
22
|
iconWidth?: string | number;
|
|
23
23
|
iconHeight?: string | number;
|
|
24
24
|
scale?: IconScale;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React from 'react'
|
|
2
2
|
|
|
3
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
4
|
-
import { Accordion } from '../components'
|
|
5
|
-
import { DataAccordion } from '../types'
|
|
6
|
-
import { Typography } from '@mui/material'
|
|
3
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
4
|
+
import { Accordion } from '../components'
|
|
5
|
+
import { DataAccordion } from '../types'
|
|
6
|
+
import { Typography } from '@mui/material'
|
|
7
7
|
|
|
8
8
|
const data: DataAccordion[] = [
|
|
9
9
|
{
|
|
@@ -11,8 +11,8 @@ const data: DataAccordion[] = [
|
|
|
11
11
|
id: 'panel-1',
|
|
12
12
|
children: (
|
|
13
13
|
<Typography>
|
|
14
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit
|
|
15
|
-
lobortis eget.
|
|
14
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit
|
|
15
|
+
amet blandit leo lobortis eget.
|
|
16
16
|
</Typography>
|
|
17
17
|
),
|
|
18
18
|
},
|
|
@@ -21,12 +21,12 @@ const data: DataAccordion[] = [
|
|
|
21
21
|
id: 'panel-2',
|
|
22
22
|
children: (
|
|
23
23
|
<Typography>
|
|
24
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit
|
|
25
|
-
lobortis eget.
|
|
24
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit
|
|
25
|
+
amet blandit leo lobortis eget.
|
|
26
26
|
</Typography>
|
|
27
27
|
),
|
|
28
28
|
},
|
|
29
|
-
]
|
|
29
|
+
]
|
|
30
30
|
|
|
31
31
|
const meta = {
|
|
32
32
|
title: 'Display/Accordion',
|
|
@@ -38,28 +38,28 @@ const meta = {
|
|
|
38
38
|
argTypes: {
|
|
39
39
|
data: data,
|
|
40
40
|
},
|
|
41
|
-
} satisfies Meta<typeof Accordion
|
|
41
|
+
} satisfies Meta<typeof Accordion>
|
|
42
42
|
|
|
43
|
-
export default meta
|
|
43
|
+
export default meta
|
|
44
44
|
|
|
45
|
-
type Story = StoryObj<typeof meta
|
|
45
|
+
type Story = StoryObj<typeof meta>
|
|
46
46
|
|
|
47
47
|
export const AccordionBasic = () => {
|
|
48
48
|
return (
|
|
49
49
|
<div style={{ width: '480px', marginBottom: 30 }}>
|
|
50
50
|
<Accordion data={data} />
|
|
51
51
|
</div>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
54
|
|
|
55
|
-
AccordionBasic.storyName = 'Accordion Basic'
|
|
55
|
+
AccordionBasic.storyName = 'Accordion Basic'
|
|
56
56
|
|
|
57
57
|
export const AccordionExpanded = () => {
|
|
58
58
|
return (
|
|
59
59
|
<div style={{ width: '480px', marginBottom: 30 }}>
|
|
60
60
|
<Accordion data={data} defaultExpanded="panel-1" />
|
|
61
61
|
</div>
|
|
62
|
-
)
|
|
63
|
-
}
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
64
|
|
|
65
|
-
AccordionExpanded.storyName = 'Accordion Expanded'
|
|
65
|
+
AccordionExpanded.storyName = 'Accordion Expanded'
|