w-design-system 0.0.34 → 0.0.36

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.
Files changed (61) hide show
  1. package/dist/components/Paginate/index.d.ts +2 -1
  2. package/dist/components/Paginate/index.d.ts.map +1 -1
  3. package/dist/components/Paginate/index.js +8 -8
  4. package/dist/components/Paginate/index.js.map +1 -1
  5. package/dist/components/Paginate/stories.d.ts +1 -0
  6. package/dist/components/Paginate/stories.d.ts.map +1 -1
  7. package/dist/components/Paginate/stories.js +7 -2
  8. package/dist/components/Paginate/stories.js.map +1 -1
  9. package/dist/components/Paginate/styles.d.ts.map +1 -1
  10. package/dist/components/Paginate/styles.js +5 -38
  11. package/dist/components/Paginate/styles.js.map +1 -1
  12. package/dist/components/Select/index.d.ts.map +1 -1
  13. package/dist/components/Select/index.js +5 -5
  14. package/dist/components/Select/index.js.map +1 -1
  15. package/dist/components/Select/stories.js +1 -0
  16. package/dist/components/Select/stories.js.map +1 -1
  17. package/dist/components/Sidebar/SidebarGroup/index.js +2 -2
  18. package/dist/components/Sidebar/SidebarGroup/index.js.map +1 -1
  19. package/dist/components/Sidebar/SidebarGroup/styles.d.ts.map +1 -1
  20. package/dist/components/Sidebar/SidebarGroup/styles.js +4 -6
  21. package/dist/components/Sidebar/SidebarGroup/styles.js.map +1 -1
  22. package/dist/components/Sidebar/SidebarItem/index.d.ts.map +1 -1
  23. package/dist/components/Sidebar/SidebarItem/index.js +8 -5
  24. package/dist/components/Sidebar/SidebarItem/index.js.map +1 -1
  25. package/dist/components/Sidebar/SidebarItem/styles.d.ts.map +1 -1
  26. package/dist/components/Sidebar/SidebarItem/styles.js +3 -1
  27. package/dist/components/Sidebar/SidebarItem/styles.js.map +1 -1
  28. package/dist/components/Sidebar/SidebarLogo/index.d.ts +2 -1
  29. package/dist/components/Sidebar/SidebarLogo/index.d.ts.map +1 -1
  30. package/dist/components/Sidebar/SidebarLogo/index.js +2 -2
  31. package/dist/components/Sidebar/SidebarLogo/index.js.map +1 -1
  32. package/dist/components/Sidebar/SidebarLogo/styles.d.ts +1 -0
  33. package/dist/components/Sidebar/SidebarLogo/styles.d.ts.map +1 -1
  34. package/dist/components/Sidebar/SidebarLogo/styles.js +3 -2
  35. package/dist/components/Sidebar/SidebarLogo/styles.js.map +1 -1
  36. package/dist/components/Sidebar/index.d.ts +2 -1
  37. package/dist/components/Sidebar/index.d.ts.map +1 -1
  38. package/dist/components/Sidebar/index.js +4 -3
  39. package/dist/components/Sidebar/index.js.map +1 -1
  40. package/dist/components/Sidebar/stories.d.ts.map +1 -1
  41. package/dist/components/Sidebar/stories.js +61 -3
  42. package/dist/components/Sidebar/stories.js.map +1 -1
  43. package/dist/components/Sidebar/styles.d.ts +1 -0
  44. package/dist/components/Sidebar/styles.d.ts.map +1 -1
  45. package/dist/components/Sidebar/styles.js +1 -2
  46. package/dist/components/Sidebar/styles.js.map +1 -1
  47. package/package.json +1 -1
  48. package/src/components/Paginate/index.tsx +10 -6
  49. package/src/components/Paginate/stories.tsx +9 -3
  50. package/src/components/Paginate/styles.ts +5 -38
  51. package/src/components/Select/index.tsx +5 -3
  52. package/src/components/Select/stories.tsx +1 -1
  53. package/src/components/Sidebar/SidebarGroup/index.tsx +3 -3
  54. package/src/components/Sidebar/SidebarGroup/styles.ts +4 -6
  55. package/src/components/Sidebar/SidebarItem/index.tsx +15 -11
  56. package/src/components/Sidebar/SidebarItem/styles.ts +3 -1
  57. package/src/components/Sidebar/SidebarLogo/index.tsx +3 -2
  58. package/src/components/Sidebar/SidebarLogo/styles.ts +4 -2
  59. package/src/components/Sidebar/index.tsx +5 -3
  60. package/src/components/Sidebar/stories.tsx +88 -30
  61. package/src/components/Sidebar/styles.ts +2 -2
@@ -7,8 +7,65 @@ import { dashboardSVG } from '../../assets/icon'
7
7
  const meta: Meta<typeof Sidebar> = {
8
8
  title: 'Components/Sidebar',
9
9
  tags: ['autodocs'],
10
-
11
10
  component: Sidebar,
11
+ argTypes: {
12
+ layout: {
13
+ control: 'object',
14
+ description: 'Array of sidebar layout',
15
+ },
16
+ currentItemId: {
17
+ control: 'text',
18
+ description: 'Current item id',
19
+ },
20
+ currentGroupId: {
21
+ control: 'text',
22
+ description: 'Current group id',
23
+ },
24
+ setLink: {
25
+ action: 'setLink',
26
+ description: 'Function to set link',
27
+ },
28
+ items: {
29
+ control: 'object',
30
+ description: 'Items data',
31
+ },
32
+ groups: {
33
+ control: 'object',
34
+ description: 'Groups data',
35
+ },
36
+ logoUrl: {
37
+ control: 'text',
38
+ description: 'Logo url',
39
+ },
40
+ },
41
+ args: {
42
+ layout: [
43
+ {
44
+ type: 'item',
45
+ id: 'DASHBOARD',
46
+ },
47
+ { type: 'group', id: 'group1' },
48
+ ],
49
+ currentItemId: 'DASHBOARD',
50
+ currentGroupId: 'DASHBOARD',
51
+ items: {
52
+ DASHBOARD: {
53
+ menuTitle: 'Dashboard',
54
+ icon: dashboardSVG,
55
+ link: '/dashboard',
56
+ disabled: true,
57
+ },
58
+ },
59
+ groups: {
60
+ group1: {
61
+ name: 'Group 1',
62
+ icon: dashboardSVG,
63
+ itemIds: ['DASHBOARD'],
64
+ },
65
+ },
66
+ logoUrl: '',
67
+ baseColor: '',
68
+ },
12
69
  } satisfies Meta<typeof Sidebar>
13
70
 
14
71
  export default meta
@@ -16,36 +73,37 @@ export default meta
16
73
  type Story = StoryObj<typeof Sidebar>
17
74
 
18
75
  export const Playground: Story = {
19
- render: () => {
76
+ render: args => {
20
77
  return (
21
- <Sidebar
22
- layout={[
23
- {
24
- type: 'item',
25
- id: 'DASHBOARD',
26
- },
27
- { type: 'group', id: 'group1' },
28
- ]}
29
- items={{
30
- DASHBOARD: {
31
- menuTitle: 'Dashboard',
32
- icon: dashboardSVG,
33
- link: '/dashboard',
34
- disabled: false,
35
- },
36
- }}
37
- currentItemId={''}
38
- currentGroupId={''}
39
- setLink={action('setLink')}
40
- groups={{
41
- group1: {
42
- name: 'Group 1',
43
- icon: dashboardSVG,
44
- itemIds: ['DASHBOARD'],
45
- },
46
- }}
47
- logoUrl={''}
48
- />
78
+ <Sidebar
79
+ {...args}
80
+ layout={[
81
+ {
82
+ type: 'item',
83
+ id: 'DASHBOARD',
84
+ },
85
+ { type: 'group', id: 'group1' },
86
+ ]}
87
+ items={{
88
+ DASHBOARD: {
89
+ menuTitle: 'Dashboard',
90
+ icon: dashboardSVG,
91
+ link: '/dashboard',
92
+ disabled: false,
93
+ },
94
+ }}
95
+ currentItemId={''}
96
+ currentGroupId={''}
97
+ setLink={action('setLink')}
98
+ groups={{
99
+ group1: {
100
+ name: 'Group 1',
101
+ icon: dashboardSVG,
102
+ itemIds: ['DASHBOARD'],
103
+ },
104
+ }}
105
+ logoUrl={''}
106
+ />
49
107
  )
50
108
  },
51
109
  }
@@ -3,6 +3,7 @@ import { theme } from '../Themes'
3
3
 
4
4
  interface SidebarContainerProps {
5
5
  sidebarOpen: boolean
6
+ baseColor?: string
6
7
  }
7
8
 
8
9
  export const SidebarContainer = styled.div<SidebarContainerProps>`
@@ -12,13 +13,12 @@ export const SidebarContainer = styled.div<SidebarContainerProps>`
12
13
  position: relative;
13
14
  box-sizing: border-box;
14
15
  color: white;
15
- background: ${theme.colors.cyan50};
16
16
  height: 100vh;
17
17
  height: 100dvh;
18
18
  padding: 16px 16px 0 16px;
19
19
  width: min-content;
20
20
  border-radius: ${({ sidebarOpen }) => sidebarOpen && '0 60px 0px 0;'};
21
-
21
+ background: ${({ baseColor }) => baseColor || theme.colors.cyan50};
22
22
  /* Mantenha o estilo do container ao passar o mouse */
23
23
  &:hover {
24
24
  &::-webkit-scrollbar {