@omniumretail/component-library 1.2.71 → 1.2.73
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/package.json +6 -3
- package/NPMPUBLISH.md +0 -29
- package/bitbucket-pipelines.yml +0 -95
- package/dist/components/AnalyticsBar/AnalyticsBar.stories.d.ts +0 -5
- package/dist/components/BellNotifications/BellNotifications.stories.d.ts +0 -5
- package/dist/components/Button/Button.stories.d.ts +0 -6
- package/dist/components/Category/Category.stories.d.ts +0 -3
- package/dist/components/CategoryReadOnly/CategoryReadOnly.stories.d.ts +0 -3
- package/dist/components/CategoryResponse/CategoryResponse.stories.d.ts +0 -3
- package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -5
- package/dist/components/DatePickerTag/DatePickerTag.stories.d.ts +0 -5
- package/dist/components/DropdownButton/DropdownButton.stories.d.ts +0 -5
- package/dist/components/ExportTableData/ExportTableData.stories.d.ts +0 -3
- package/dist/components/Footer/Footer.stories.d.ts +0 -5
- package/dist/components/Footer2/Footer.stories.d.ts +0 -6
- package/dist/components/Header/Header.stories.d.ts +0 -5
- package/dist/components/Input/Input.stories.d.ts +0 -5
- package/dist/components/InputCountryCode/inputCountryCode.stories.d.ts +0 -5
- package/dist/components/Label/Label.stories.d.ts +0 -6
- package/dist/components/Link/Link.stories.d.ts +0 -7
- package/dist/components/Menu/Menu.stories.d.ts +0 -5
- package/dist/components/MobileTable/MobileTable.stories.d.ts +0 -5
- package/dist/components/ModalConfirmation/ModalConfirmation.stories.d.ts +0 -5
- package/dist/components/ModalWithTable/ModalWithTable.stories.d.ts +0 -5
- package/dist/components/Navigation/Navigation.stories.d.ts +0 -5
- package/dist/components/Notification/Notification.stories.d.ts +0 -5
- package/dist/components/Questions/Questions.stories.d.ts +0 -3
- package/dist/components/Radio/Radio.stories.d.ts +0 -5
- package/dist/components/ResponseType/ResponseType.stories.d.ts +0 -3
- package/dist/components/ResponsiveTable/ResponsiveTable.stories.d.ts +0 -9
- package/dist/components/Select/Select.stories.d.ts +0 -6
- package/dist/components/Separator/Separator.stories.d.ts +0 -6
- package/dist/components/Sidebar/Sidebar.stories.d.ts +0 -6
- package/dist/components/Switch/Switch.stories.d.ts +0 -5
- package/dist/components/Table/Table.stories.d.ts +0 -9
- package/dist/components/Tag/Tag.stories.d.ts +0 -5
- package/dist/components/Upload/Upload.stories.d.ts +0 -3
- package/dist/components/UserInfo/UserInfo.stories.d.ts +0 -3
- package/dist/components/WebCam/WebCam.stories.d.ts +0 -3
- package/dist/types/index.d.ts +0 -2
- package/public/index.ts +0 -0
- package/src/assets/code-brackets.svg +0 -1
- package/src/assets/colors.svg +0 -1
- package/src/assets/comments.svg +0 -1
- package/src/assets/direction.svg +0 -1
- package/src/assets/flow.svg +0 -1
- package/src/assets/fonts/Silka-Bold.woff2 +0 -0
- package/src/assets/fonts/Silka-Regular.woff2 +0 -0
- package/src/assets/images/A2AI-logo.png +0 -0
- package/src/assets/images/omnium-retail-logo-white.png +0 -0
- package/src/assets/images/omnium-retail-logo.png +0 -0
- package/src/assets/images/omnium-retail_icon.png +0 -0
- package/src/assets/plugin.svg +0 -1
- package/src/assets/repo.svg +0 -1
- package/src/assets/scss/_combinations.scss +0 -0
- package/src/assets/scss/_global.scss +0 -89
- package/src/assets/scss/index.scss +0 -2
- package/src/assets/stackalt.svg +0 -1
- package/src/components/AnalyticsBar/AnalyticsBar.stories.tsx +0 -236
- package/src/components/AnalyticsBar/helpers/codeMutation.tsx +0 -19
- package/src/components/AnalyticsBar/index.tsx +0 -76
- package/src/components/AnalyticsBar/interfaces/analyticsBar.tsx +0 -13
- package/src/components/AnalyticsBar/styles.module.scss +0 -137
- package/src/components/BellNotifications/BellNotifications.stories.tsx +0 -200
- package/src/components/BellNotifications/index.tsx +0 -154
- package/src/components/BellNotifications/styles.module.scss +0 -239
- package/src/components/Button/Button.stories.tsx +0 -26
- package/src/components/Button/index.tsx +0 -24
- package/src/components/Button/styles.module.scss +0 -70
- package/src/components/Category/Category.stories.tsx +0 -371
- package/src/components/Category/CategoryContent/index.tsx +0 -255
- package/src/components/Category/CategoryContent/styles.module.scss +0 -69
- package/src/components/Category/CategorySidebar/index.tsx +0 -344
- package/src/components/Category/CategorySidebar/styles.module.scss +0 -28
- package/src/components/Category/index.tsx +0 -58
- package/src/components/Category/styles.module.scss +0 -13
- package/src/components/CategoryReadOnly/CategoryReadOnly.stories.tsx +0 -274
- package/src/components/CategoryReadOnly/evaluationOptions.tsx +0 -81
- package/src/components/CategoryReadOnly/index.tsx +0 -328
- package/src/components/CategoryReadOnly/styles.module.scss +0 -214
- package/src/components/CategoryResponse/CategoryResponse.stories.tsx +0 -311
- package/src/components/CategoryResponse/evaluationOptions.tsx +0 -81
- package/src/components/CategoryResponse/index.tsx +0 -502
- package/src/components/CategoryResponse/styles.module.scss +0 -365
- package/src/components/DatePicker/DatePicker.stories.tsx +0 -16
- package/src/components/DatePicker/index.tsx +0 -38
- package/src/components/DatePicker/styles.module.scss +0 -3
- package/src/components/DatePickerTag/DatePickerTag.stories.tsx +0 -19
- package/src/components/DatePickerTag/index.tsx +0 -91
- package/src/components/DatePickerTag/styles.module.scss +0 -32
- package/src/components/DropdownButton/DropdownButton.stories.tsx +0 -24
- package/src/components/DropdownButton/index.tsx +0 -36
- package/src/components/DropdownButton/styles.module.scss +0 -9
- package/src/components/ExportTableData/ExportTableData.stories.tsx +0 -43
- package/src/components/ExportTableData/index.tsx +0 -37
- package/src/components/ExportTableData/styles.module.scss +0 -4
- package/src/components/Footer/Footer.stories.tsx +0 -15
- package/src/components/Footer/index.tsx +0 -45
- package/src/components/Footer/styles.module.scss +0 -38
- package/src/components/Footer2/Footer.stories.tsx +0 -184
- package/src/components/Footer2/index.tsx +0 -322
- package/src/components/Footer2/styles.module.scss +0 -292
- package/src/components/Header/Header.data.ts +0 -26
- package/src/components/Header/Header.stories.tsx +0 -236
- package/src/components/Header/Header.types.ts +0 -32
- package/src/components/Header/README.md +0 -38
- package/src/components/Header/index.tsx +0 -200
- package/src/components/Header/styles.module.scss +0 -216
- package/src/components/Input/Input.stories.tsx +0 -13
- package/src/components/Input/index.tsx +0 -31
- package/src/components/Input/styles.module.scss +0 -8
- package/src/components/InputCountryCode/index.tsx +0 -79
- package/src/components/InputCountryCode/inputCountryCode.stories.tsx +0 -55
- package/src/components/InputCountryCode/styles.module.scss +0 -3
- package/src/components/Label/Label.stories.tsx +0 -21
- package/src/components/Label/index.tsx +0 -19
- package/src/components/Label/styles.module.scss +0 -17
- package/src/components/Link/Link.stories.tsx +0 -30
- package/src/components/Link/index.tsx +0 -21
- package/src/components/Link/styles.module.scss +0 -24
- package/src/components/Menu/Menu.stories.tsx +0 -178
- package/src/components/Menu/helpers/codeMutation.tsx +0 -19
- package/src/components/Menu/index.tsx +0 -24
- package/src/components/Menu/styles.module.scss +0 -0
- package/src/components/MobileTable/MobileTable.stories.tsx +0 -27
- package/src/components/MobileTable/index.tsx +0 -102
- package/src/components/MobileTable/styles.module.scss +0 -75
- package/src/components/ModalConfirmation/ModalConfirmation.stories.tsx +0 -40
- package/src/components/ModalConfirmation/ModalStatusList.tsx +0 -5
- package/src/components/ModalConfirmation/index.tsx +0 -71
- package/src/components/ModalConfirmation/styles.module.scss +0 -62
- package/src/components/ModalWithTable/ModalWithTable.stories.tsx +0 -99
- package/src/components/ModalWithTable/index.tsx +0 -238
- package/src/components/ModalWithTable/styles.module.scss +0 -77
- package/src/components/Navigation/Navigation.stories.tsx +0 -21
- package/src/components/Navigation/index.tsx +0 -91
- package/src/components/Navigation/styles.module.scss +0 -91
- package/src/components/Notification/Notification.stories.tsx +0 -32
- package/src/components/Notification/index.tsx +0 -28
- package/src/components/Questions/Questions.stories.tsx +0 -37
- package/src/components/Questions/SingleQuestion/index.tsx +0 -337
- package/src/components/Questions/SingleQuestion/styles.module.scss +0 -142
- package/src/components/Questions/index.tsx +0 -124
- package/src/components/Questions/styles.modules.scss +0 -0
- package/src/components/Radio/Radio.stories.tsx +0 -43
- package/src/components/Radio/index.tsx +0 -26
- package/src/components/Radio/styles.module.scss +0 -24
- package/src/components/ResponseType/ResponseType.stories.tsx +0 -393
- package/src/components/ResponseType/index.tsx +0 -100
- package/src/components/ResponseType/styles.module.scss +0 -31
- package/src/components/ResponsiveTable/ResponsiveTable.stories.tsx +0 -386
- package/src/components/ResponsiveTable/index.tsx +0 -389
- package/src/components/ResponsiveTable/styles.module.scss +0 -153
- package/src/components/Select/Select.stories.tsx +0 -39
- package/src/components/Select/index.tsx +0 -27
- package/src/components/Select/styles.module.scss +0 -19
- package/src/components/Separator/Separator.stories.tsx +0 -22
- package/src/components/Separator/index.tsx +0 -27
- package/src/components/Separator/styles.module.scss +0 -25
- package/src/components/Sidebar/Sidebar.stories.tsx +0 -85
- package/src/components/Sidebar/index.tsx +0 -127
- package/src/components/Sidebar/styles.module.scss +0 -141
- package/src/components/Switch/Switch.stories.tsx +0 -14
- package/src/components/Switch/index.tsx +0 -18
- package/src/components/Switch/styles.module.scss +0 -7
- package/src/components/Table/Table.stories.tsx +0 -337
- package/src/components/Table/index.tsx +0 -313
- package/src/components/Table/styles.module.scss +0 -97
- package/src/components/Tag/Tag.stories.tsx +0 -32
- package/src/components/Tag/index.tsx +0 -295
- package/src/components/Tag/styles.module.scss +0 -104
- package/src/components/Upload/Upload.stories.tsx +0 -45
- package/src/components/Upload/index.tsx +0 -112
- package/src/components/Upload/styles.module.scss +0 -29
- package/src/components/UserInfo/UserInfo.stories.tsx +0 -38
- package/src/components/UserInfo/index.tsx +0 -77
- package/src/components/UserInfo/styles.module.scss +0 -35
- package/src/components/WebCam/WebCam.stories.tsx +0 -24
- package/src/components/WebCam/index.tsx +0 -73
- package/src/components/WebCam/styles.module.scss +0 -37
- package/src/components/index.tsx +0 -34
- package/src/constants/i18n.ts +0 -25
- package/src/constants/logoCompanyHelper.ts +0 -52
- package/src/constants/translationHelper.ts +0 -7
- package/src/index.ts +0 -3
- package/src/locales/en.json +0 -142
- package/src/locales/es.json +0 -142
- package/src/locales/pt.json +0 -142
- package/src/types/Global.d.ts +0 -4
- package/tsconfig.json +0 -24
- package/vite.config.js +0 -51
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { RightCircleOutlined } from "@ant-design/icons";
|
|
2
|
-
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
3
|
-
import { Sidebar, SidebarProps } from '.';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Sidebar',
|
|
7
|
-
component: Sidebar,
|
|
8
|
-
} as Meta;
|
|
9
|
-
|
|
10
|
-
const Template: StoryFn<SidebarProps> = (args: any) => {
|
|
11
|
-
const navigate = (targetRoute: string) => {
|
|
12
|
-
console.log(targetRoute);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
return <Sidebar {...args} navigateFunction={navigate}></Sidebar>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const Primary = Template.bind({});
|
|
19
|
-
Primary.args = {
|
|
20
|
-
isOpen: true,
|
|
21
|
-
links: [
|
|
22
|
-
{
|
|
23
|
-
label: "Ciclo de Avaliação",
|
|
24
|
-
targetRoute: "/ciclodeavaliacao",
|
|
25
|
-
active: true,
|
|
26
|
-
icon: <RightCircleOutlined />,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
label: "Gestão de Questionários",
|
|
30
|
-
targetRoute: "/gestaodequestionarios",
|
|
31
|
-
active: true,
|
|
32
|
-
sublinks: [
|
|
33
|
-
{
|
|
34
|
-
label: "Subpage 1121212",
|
|
35
|
-
targetRoute: "/analytics/subpage121212",
|
|
36
|
-
active: false,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
label: "Subpage 2111",
|
|
40
|
-
targetRoute: "/analytics/subpage211",
|
|
41
|
-
active: false
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
label: "Analytics",
|
|
47
|
-
targetRoute: "/analytics",
|
|
48
|
-
active: false,
|
|
49
|
-
sublinks: [
|
|
50
|
-
{
|
|
51
|
-
label: "Subpage 1",
|
|
52
|
-
targetRoute: "/analytics/subpage1",
|
|
53
|
-
active: false,
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
label: "Subpage 2",
|
|
57
|
-
targetRoute: "/analytics/subpage2",
|
|
58
|
-
active: false
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
],
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export const Secondary = Template.bind({});
|
|
66
|
-
Secondary.args = {
|
|
67
|
-
isOpen: false,
|
|
68
|
-
links: [
|
|
69
|
-
{
|
|
70
|
-
label: "Ciclo de Avaliação",
|
|
71
|
-
targetRoute: "/ciclodeavaliacao",
|
|
72
|
-
active: false,
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
label: "Gestão de Questionários",
|
|
76
|
-
targetRoute: "/gestaodequestionarios",
|
|
77
|
-
active: false,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
label: "Analytics",
|
|
81
|
-
targetRoute: "/analytics",
|
|
82
|
-
active: false,
|
|
83
|
-
},
|
|
84
|
-
],
|
|
85
|
-
};
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import styles from './styles.module.scss';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons';
|
|
4
|
-
import { useState, useEffect } from 'react';
|
|
5
|
-
|
|
6
|
-
export interface Links {
|
|
7
|
-
label: string;
|
|
8
|
-
targetRoute: string;
|
|
9
|
-
active: boolean;
|
|
10
|
-
icon?: React.ReactNode;
|
|
11
|
-
sublinks?: Links[];
|
|
12
|
-
activeSubMenu?: boolean;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface SidebarProps {
|
|
16
|
-
isOpen?: boolean;
|
|
17
|
-
links: Links[];
|
|
18
|
-
navigateFunction: (targetRoute: string) => void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const Sidebar = (props: SidebarProps) => {
|
|
22
|
-
const { isOpen = false, links, navigateFunction } = props;
|
|
23
|
-
const [sidebarOpen, setSidebarOpen] = useState<boolean>(isOpen);
|
|
24
|
-
const [activeSubMenuIndex, setActiveSubMenuIndex] = useState<number>(-1);
|
|
25
|
-
const [isMobile, setIsMobile] = useState<boolean>(false);
|
|
26
|
-
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
const handleResize = () => {
|
|
29
|
-
setIsMobile(window.innerWidth <= 768); // Altere a largura máxima para se adequar ao seu design responsivo
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
window.addEventListener('resize', handleResize);
|
|
33
|
-
handleResize();
|
|
34
|
-
|
|
35
|
-
return () => {
|
|
36
|
-
window.removeEventListener('resize', handleResize);
|
|
37
|
-
};
|
|
38
|
-
}, []);
|
|
39
|
-
|
|
40
|
-
const sidebarClasses = classNames({
|
|
41
|
-
[styles.sidebarClosed]: !sidebarOpen,
|
|
42
|
-
}, styles.sidebar);
|
|
43
|
-
|
|
44
|
-
const toggleSidebar = () => {
|
|
45
|
-
if (!isMobile) {
|
|
46
|
-
setSidebarOpen(!sidebarOpen);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const toggleSubMenu = (index: number) => {
|
|
51
|
-
setActiveSubMenuIndex(activeSubMenuIndex === index ? -1 : index);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const isLinkActive = (link: Links) => {
|
|
55
|
-
if (link.sublinks) {
|
|
56
|
-
return link.sublinks.some(sublink => sublink.active);
|
|
57
|
-
}
|
|
58
|
-
return link.active;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
useEffect(() => {
|
|
62
|
-
if (isMobile) {
|
|
63
|
-
setSidebarOpen(false);
|
|
64
|
-
}
|
|
65
|
-
}, [isMobile]);
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<div className={sidebarClasses}>
|
|
69
|
-
{!isMobile && (
|
|
70
|
-
<div className={styles.toggle} onClick={toggleSidebar}>
|
|
71
|
-
{sidebarOpen ? <DoubleLeftOutlined /> : <DoubleRightOutlined />}
|
|
72
|
-
</div>
|
|
73
|
-
)}
|
|
74
|
-
{links &&
|
|
75
|
-
links.map((link: Links, index: number) => {
|
|
76
|
-
const { label, targetRoute, icon, sublinks } = link;
|
|
77
|
-
const isActive = isLinkActive(link);
|
|
78
|
-
const isActiveSubMenu = activeSubMenuIndex === index;
|
|
79
|
-
|
|
80
|
-
const sidebarItemClasses = classNames({
|
|
81
|
-
[styles.sidebarItemActive]: isActive,
|
|
82
|
-
[styles.sidebarHasIcon]: icon
|
|
83
|
-
}, styles.sidebarItem);
|
|
84
|
-
|
|
85
|
-
return (
|
|
86
|
-
<div
|
|
87
|
-
className={sidebarItemClasses}
|
|
88
|
-
onClick={() => {
|
|
89
|
-
if (sublinks) {
|
|
90
|
-
toggleSubMenu(index);
|
|
91
|
-
} else {
|
|
92
|
-
navigateFunction(targetRoute);
|
|
93
|
-
}
|
|
94
|
-
}}
|
|
95
|
-
onMouseEnter={() => toggleSubMenu(index)}
|
|
96
|
-
onMouseLeave={() => toggleSubMenu(-1)}
|
|
97
|
-
key={index}
|
|
98
|
-
>
|
|
99
|
-
{icon ? (sidebarOpen ? label : icon) : label}
|
|
100
|
-
{sublinks && isActiveSubMenu && (
|
|
101
|
-
<div className={`${sidebarOpen ? styles.subMenu : ''}`}>
|
|
102
|
-
{sublinks.map((sublink: Links, subindex: number) => {
|
|
103
|
-
const { label: subLabel, targetRoute: subTargetRoute, active: subActive, icon: subIcon } = sublink;
|
|
104
|
-
|
|
105
|
-
const subLinkClasses = classNames({
|
|
106
|
-
[styles.sidebarItemActive]: subActive,
|
|
107
|
-
[styles.sidebarHasIcon]: icon,
|
|
108
|
-
}, styles.subMenuItem);
|
|
109
|
-
|
|
110
|
-
return (
|
|
111
|
-
<div
|
|
112
|
-
className={`${styles.sidebarItem} ${subLinkClasses}`}
|
|
113
|
-
onClick={() => navigateFunction(subTargetRoute)}
|
|
114
|
-
key={subindex}
|
|
115
|
-
>
|
|
116
|
-
{subIcon ? (sidebarOpen ? subLabel : subIcon) : (sidebarOpen ? subLabel : subLabel.charAt(0))}
|
|
117
|
-
</div>
|
|
118
|
-
);
|
|
119
|
-
})}
|
|
120
|
-
</div>
|
|
121
|
-
)}
|
|
122
|
-
</div>
|
|
123
|
-
);
|
|
124
|
-
})}
|
|
125
|
-
</div>
|
|
126
|
-
);
|
|
127
|
-
};
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
.sidebar {
|
|
2
|
-
width: 300px;
|
|
3
|
-
max-width: 300px;
|
|
4
|
-
height: 100%;
|
|
5
|
-
background-color: var(--color-white);
|
|
6
|
-
padding: 24px;
|
|
7
|
-
position: relative;
|
|
8
|
-
transition: var(--transition-fast);
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
|
|
11
|
-
@media (max-width: 1024px) {
|
|
12
|
-
width: 250px;
|
|
13
|
-
max-width: 250px;
|
|
14
|
-
padding: 12px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.sidebarClosed {
|
|
20
|
-
max-width: 100px;
|
|
21
|
-
width: 100px;
|
|
22
|
-
overflow: hidden;
|
|
23
|
-
|
|
24
|
-
@media (max-width: 1024px) {
|
|
25
|
-
max-width: 75px;
|
|
26
|
-
width: 75px;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.sidebarClosed .sidebarItem {
|
|
31
|
-
font-size: 0;
|
|
32
|
-
transition: 0;
|
|
33
|
-
padding-left: 42px;
|
|
34
|
-
|
|
35
|
-
@media (max-width: 1024px) {
|
|
36
|
-
padding-left: 30px;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.sidebarClosed .sidebarItem:first-letter {
|
|
41
|
-
font-size: var(--font-size-body-4);
|
|
42
|
-
|
|
43
|
-
@media (max-width: 1024px) {
|
|
44
|
-
font-size: var(--font-size-body-3);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.sidebarClosed .sidebarHasIcon {
|
|
49
|
-
font-size: 24px;
|
|
50
|
-
padding-left: 35px;
|
|
51
|
-
|
|
52
|
-
@media (max-width: 1024px) {
|
|
53
|
-
font-size: 20px;
|
|
54
|
-
padding-left: 26px;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.sidebarItem {
|
|
59
|
-
color: var(--color-black);
|
|
60
|
-
padding: 16px;
|
|
61
|
-
font-weight: var(--font-weight-semibold);
|
|
62
|
-
text-transform: uppercase;
|
|
63
|
-
position: relative;
|
|
64
|
-
white-space: nowrap;
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
|
|
67
|
-
@media (max-width: 1024px) {
|
|
68
|
-
font-size: var(--font-size-body-3);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.sidebarItem:after {
|
|
73
|
-
content: '';
|
|
74
|
-
position: absolute;
|
|
75
|
-
bottom: 0;
|
|
76
|
-
left: 0;
|
|
77
|
-
height: 1px;
|
|
78
|
-
width: 100%;
|
|
79
|
-
background-color: var(--color-orange);
|
|
80
|
-
transform: scaleY(.5);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.sidebarItemActive {
|
|
84
|
-
color: var(--color-orange) !important;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.toggle {
|
|
88
|
-
position: absolute;
|
|
89
|
-
top: 12px;
|
|
90
|
-
right: 24px;
|
|
91
|
-
width: 24px;
|
|
92
|
-
height: 24px;
|
|
93
|
-
display: flex;
|
|
94
|
-
align-items: center;
|
|
95
|
-
justify-content: center;
|
|
96
|
-
z-index: 1;
|
|
97
|
-
cursor: pointer;
|
|
98
|
-
|
|
99
|
-
@media (max-width: 1024px) {
|
|
100
|
-
right: 4px;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.toggle>* {
|
|
105
|
-
font-size: var(--font-size-body-5);
|
|
106
|
-
|
|
107
|
-
@media (max-width: 1024px) {
|
|
108
|
-
font-size: var(--font-size-body-4);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.subMenu {
|
|
113
|
-
margin-top: 8px;
|
|
114
|
-
padding-left: 16px;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.subMenuItem {
|
|
118
|
-
color: var(--color-black);
|
|
119
|
-
padding: 8px;
|
|
120
|
-
margin-top: 8px;
|
|
121
|
-
font-weight: var(--font-weight-semibold);
|
|
122
|
-
cursor: pointer;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/* Estilos para dispositivos móveis */
|
|
126
|
-
@media (max-width: 767px) {
|
|
127
|
-
.sidebar {
|
|
128
|
-
width: 50px;
|
|
129
|
-
max-width: 50px;
|
|
130
|
-
padding: 12px;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.sidebarClosed .sidebarItem {
|
|
134
|
-
padding: 12px 12px 12px 16px;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.sidebarClosed .sidebarHasIcon {
|
|
138
|
-
font-size: 20px;
|
|
139
|
-
padding-left: 12px;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
|
-
import { Switch } from '.';
|
|
3
|
-
import { SwitchProps } from 'antd';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Switch',
|
|
7
|
-
component: Switch,
|
|
8
|
-
} as Meta;
|
|
9
|
-
|
|
10
|
-
const Template: StoryFn<SwitchProps> = (args: any) => <Switch {...args}></Switch>;
|
|
11
|
-
|
|
12
|
-
export const Primary = Template.bind({});
|
|
13
|
-
Primary.args = {
|
|
14
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Switch as AntdSwitch, SwitchProps } from 'antd';
|
|
2
|
-
import styles from './styles.module.scss';
|
|
3
|
-
import classNames from 'classnames';
|
|
4
|
-
|
|
5
|
-
export interface NewSwitchProps extends SwitchProps {
|
|
6
|
-
customClass?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const Switch = ({ customClass, ...props }: NewSwitchProps) => {
|
|
10
|
-
const selectClasses = {
|
|
11
|
-
[styles.switch]: true,
|
|
12
|
-
[`${customClass}`]: customClass,
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<AntdSwitch {...props} className={ classNames(selectClasses) } />
|
|
17
|
-
);
|
|
18
|
-
};
|