@eturnity/eturnity_reusable_components 8.19.2 → 8.19.4

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 (35) hide show
  1. package/package.json +1 -1
  2. package/src/assets/svgIcons/download.svg +3 -3
  3. package/src/assets/svgIcons/filter.svg +3 -0
  4. package/src/assets/svgIcons/kanban_view.svg +6 -0
  5. package/src/assets/svgIcons/plus_button.svg +3 -3
  6. package/src/assets/svgIcons/table_view.svg +3 -0
  7. package/src/assets/theme.js +53 -5
  8. package/src/components/banner/banner/Banner.stories.js +99 -43
  9. package/src/components/banner/infoBanner/InfoBanner.stories.js +72 -30
  10. package/src/components/buttons/buttonIcon/ButtonIcon.stories.js +167 -0
  11. package/src/components/buttons/buttonIcon/index.vue +40 -6
  12. package/src/components/buttons/mainButton/MainButton.stories.js +115 -34
  13. package/src/components/draggableCard/draggableCard.stories.js +110 -54
  14. package/src/components/filter/filterSettings.vue +1 -1
  15. package/src/components/filterComponent/viewFilter.vue +605 -0
  16. package/src/components/filterComponent/viewSettings.vue +281 -0
  17. package/src/components/filterComponent/viewSort.vue +330 -0
  18. package/src/components/icon/Icon.stories.js +220 -0
  19. package/src/components/icon/index.vue +8 -1
  20. package/src/components/infoCard/index.vue +7 -3
  21. package/src/components/inputs/searchInput/index.vue +1 -1
  22. package/src/components/inputs/select/index.vue +6 -5
  23. package/src/components/inputs/select/option/index.vue +5 -0
  24. package/src/components/projectMarker/ProjectMarker.stories.js +130 -0
  25. package/src/components/selectedOptions/index.vue +13 -2
  26. package/src/components/selectedOptions/selectedOptions.stories.js +135 -37
  27. package/src/components/spinner/Spinner.stories.js +70 -18
  28. package/src/components/spinnerGif/SpinnerGif.stories.js +86 -0
  29. package/src/components/tableDropdown/TableDropdown.stories.js +192 -0
  30. package/src/components/tables/mainTable/MainTable.stories.js +151 -0
  31. package/src/components/tabsHeader/TabsHeader.stories.js +142 -0
  32. package/src/components/tabsHeader/index.vue +33 -9
  33. package/src/components/videoThumbnail/videoThumbnail.stories.js +90 -17
  34. package/src/helpers/translateLang.js +95 -24
  35. package/src/components/icon/Icons.stories.js +0 -31
@@ -1,56 +1,137 @@
1
1
  import MainButton from './index.vue'
2
+ import theme from '../../../assets/theme'
2
3
 
3
4
  export default {
4
- title: 'MainButton',
5
+ title: 'Buttons/MainButton',
5
6
  component: MainButton,
6
7
  tags: ['autodocs'],
7
- parameters: {
8
- layout: 'centered',
8
+ argTypes: {
9
+ type: {
10
+ control: 'select',
11
+ options: ['primary', 'secondary', 'tertiary', 'ghost'],
12
+ description: 'Button type',
13
+ },
14
+ variant: {
15
+ control: 'select',
16
+ options: ['main', 'cancel'],
17
+ description: 'Button variant',
18
+ },
19
+ buttonSize: {
20
+ control: 'select',
21
+ options: ['small', 'medium', 'large'],
22
+ description: 'Button size',
23
+ },
24
+ appTheme: {
25
+ control: 'select',
26
+ options: ['light', 'dark'],
27
+ description: 'Application theme',
28
+ },
9
29
  },
10
30
  }
11
31
 
12
- export const DefaultButton = {
13
- args: {
14
- type: 'primary',
15
- text: 'Click me',
32
+ const Template = (args) => ({
33
+ components: { MainButton },
34
+ setup() {
35
+ return { args }
36
+ },
37
+ template: '<MainButton v-bind="args" />',
38
+ provide: {
39
+ theme,
16
40
  },
41
+ })
42
+
43
+ export const Default = Template.bind({})
44
+ Default.args = {
45
+ type: 'primary',
46
+ variant: 'main',
47
+ text: 'Default Button',
48
+ buttonSize: 'medium',
49
+ appTheme: 'light',
17
50
  }
18
51
 
19
- export const SecondaryButton = {
20
- args: {
21
- type: 'secondary',
22
- text: 'Click me',
23
- },
52
+ export const Primary = Template.bind({})
53
+ Primary.args = {
54
+ type: 'primary',
55
+ variant: 'main',
56
+ text: 'Primary Button',
57
+ buttonSize: 'medium',
58
+ appTheme: 'light',
24
59
  }
25
60
 
26
- export const CancelButton = {
27
- args: {
28
- type: 'cancel',
29
- text: 'Click me',
30
- },
61
+ export const Secondary = Template.bind({})
62
+ Secondary.args = {
63
+ type: 'secondary',
64
+ variant: 'main',
65
+ text: 'Secondary Button',
66
+ buttonSize: 'medium',
67
+ appTheme: 'light',
31
68
  }
32
69
 
33
- export const DisabledButton = {
34
- args: {
35
- text: 'Click me',
36
- isDisabled: true,
37
- },
70
+ export const Tertiary = Template.bind({})
71
+ Tertiary.args = {
72
+ type: 'tertiary',
73
+ variant: 'main',
74
+ text: 'Tertiary Button',
75
+ buttonSize: 'medium',
76
+ appTheme: 'light',
38
77
  }
39
78
 
40
- export const CustomColorButton = {
41
- args: {
42
- text: 'Click me',
43
- customColor: '#0068DE',
44
- fontColor: '#fdb813',
45
- },
79
+ export const Ghost = Template.bind({})
80
+ Ghost.args = {
81
+ type: 'ghost',
82
+ variant: 'main',
83
+ text: 'Ghost Button',
84
+ buttonSize: 'medium',
85
+ appTheme: 'light',
46
86
  }
47
87
 
48
- export const IconButton = {
49
- args: {
50
- text: 'Click me',
51
- icon: 'bell',
52
- customColor: '#fdb813',
53
- },
88
+ export const Cancel = Template.bind({})
89
+ Cancel.args = {
90
+ type: 'primary',
91
+ variant: 'cancel',
92
+ text: 'Cancel Button',
93
+ buttonSize: 'medium',
94
+ appTheme: 'light',
95
+ }
96
+
97
+ export const WithIcon = Template.bind({})
98
+ WithIcon.args = {
99
+ type: 'primary',
100
+ variant: 'main',
101
+ text: 'Button with Icon',
102
+ icon: 'bell',
103
+ buttonSize: 'medium',
104
+ appTheme: 'light',
105
+ }
106
+
107
+ export const Disabled = Template.bind({})
108
+ Disabled.args = {
109
+ type: 'primary',
110
+ variant: 'main',
111
+ text: 'Disabled Button',
112
+ isDisabled: true,
113
+ buttonSize: 'medium',
114
+ appTheme: 'light',
115
+ }
116
+
117
+ export const CustomSize = Template.bind({})
118
+ CustomSize.args = {
119
+ type: 'primary',
120
+ variant: 'main',
121
+ text: 'Custom Size',
122
+ minWidth: '200px',
123
+ height: '50px',
124
+ buttonSize: 'medium',
125
+ appTheme: 'light',
126
+ }
127
+
128
+ export const DarkTheme = Template.bind({})
129
+ DarkTheme.args = {
130
+ type: 'primary',
131
+ variant: 'main',
132
+ text: 'Dark Theme',
133
+ buttonSize: 'medium',
134
+ appTheme: 'dark',
54
135
  }
55
136
 
56
137
  export const IconAltDesignButton = {
@@ -1,79 +1,135 @@
1
- import defaultProps from './defaultProps'
2
1
  import DraggableCard from './index.vue'
3
- import styled from 'vue3-styled-components'
4
2
  import theme from '@/assets/theme'
5
3
 
6
4
  export default {
7
5
  title: 'DraggableCard',
8
6
  component: DraggableCard,
9
7
  tags: ['autodocs'],
8
+ argTypes: {
9
+ width: {
10
+ control: 'text',
11
+ description: 'Width of the card',
12
+ },
13
+ initialPosition: {
14
+ control: 'object',
15
+ description: 'Initial position of the card (top, right, bottom, left)',
16
+ },
17
+ title: {
18
+ control: 'text',
19
+ description: 'Title of the card',
20
+ },
21
+ titleDataId: {
22
+ control: 'text',
23
+ description: 'Data ID for the title',
24
+ },
25
+ isCollapsible: {
26
+ control: 'boolean',
27
+ description: 'Whether the card can be collapsed',
28
+ },
29
+ infoText: {
30
+ control: 'text',
31
+ description: 'Additional info text to display next to the title',
32
+ },
33
+ dragTargets: {
34
+ control: 'array',
35
+ description: 'Targets where the card can be dragged',
36
+ },
37
+ dragBounds: {
38
+ control: 'object',
39
+ description: 'Boundaries for dragging the card',
40
+ },
41
+ },
10
42
  }
11
43
 
12
- const TextContainer = styled.div`
13
- font-family: ${theme.fonts.mainFont};
14
- color: ${theme.colors.white};
15
- font-weight: 400;
16
- font-size: 14px;
17
- line-height: 21px;
18
- letter-spacing: 0%;
19
- `
20
-
21
- const CompleteTemplate = (args) => {
22
- return {
23
- components: { DraggableCard, TextContainer },
24
- setup() {
25
- return { args }
26
- },
27
- template: `
28
- <DraggableCard v-bind="args">
44
+ const Template = (args) => ({
45
+ components: { DraggableCard },
46
+ setup() {
47
+ return { args }
48
+ },
49
+ template: `
50
+ <DraggableCard v-bind="args">
29
51
  <template #body>
30
- <TextContainer>{{ args.sampleBody1 }}</TextContainer>
31
- <TextContainer>{{ args.sampleBody2 }}</TextContainer>
52
+ <div style="color: white;">Card body content</div>
32
53
  </template>
33
54
  <template #footer>
34
- <TextContainer>{{ args.sampleFooter }}</TextContainer>
55
+ <div style="color: white;">Card footer content</div>
35
56
  </template>
36
- </DraggableCard>
37
- `,
38
- }
39
- }
57
+ </DraggableCard>
58
+ `,
59
+ provide: {
60
+ theme,
61
+ },
62
+ })
40
63
 
41
- export const Default = CompleteTemplate.bind({})
64
+ export const Default = Template.bind({})
42
65
  Default.args = {
43
- ...defaultProps,
66
+ width: '300px',
67
+ initialPosition: {
68
+ top: '20px',
69
+ left: '20px',
70
+ },
71
+ title: 'Default Card',
72
+ isCollapsible: true,
73
+ }
74
+
75
+ export const WithInfoText = Template.bind({})
76
+ WithInfoText.args = {
77
+ width: '300px',
78
+ initialPosition: {
79
+ top: '20px',
80
+ left: '20px',
81
+ },
82
+ title: 'Card with Info',
83
+ infoText: 'This is some additional information',
84
+ isCollapsible: true,
44
85
  }
45
86
 
46
- export const NotCollapsible = CompleteTemplate.bind({})
47
- NotCollapsible.args = {
48
- ...defaultProps,
87
+ export const NonCollapsible = Template.bind({})
88
+ NonCollapsible.args = {
89
+ width: '300px',
90
+ initialPosition: {
91
+ top: '20px',
92
+ left: '20px',
93
+ },
94
+ title: 'Non-Collapsible Card',
49
95
  isCollapsible: false,
50
96
  }
51
97
 
52
- export const AdjustWidth = CompleteTemplate.bind({})
53
- AdjustWidth.args = {
54
- ...defaultProps,
55
- minWidth: '100px',
56
- maxWidth: '500px',
98
+ export const WithDragBounds = Template.bind({})
99
+ WithDragBounds.args = {
100
+ width: '300px',
101
+ initialPosition: {
102
+ top: '20px',
103
+ left: '20px',
104
+ },
105
+ title: 'Card with Drag Bounds',
106
+ dragBounds: {
107
+ min: { top: 0, left: 0 },
108
+ max: { top: 500, left: 500 },
109
+ },
110
+ isCollapsible: true,
57
111
  }
58
112
 
59
- const NoFooterTemplate = (args) => {
60
- return {
61
- components: { DraggableCard, TextContainer },
62
- setup() {
63
- return { args }
64
- },
65
- template: `
66
- <DraggableCard v-bind="args">
67
- <template #body>
68
- <TextContainer>{{ args.sampleBody1 }}</TextContainer>
69
- <TextContainer>{{ args.sampleBody2 }}</TextContainer>
70
- </template>
71
- </DraggableCard>
72
- `,
73
- }
113
+ export const WithCustomDragTargets = Template.bind({})
114
+ WithCustomDragTargets.args = {
115
+ width: '300px',
116
+ initialPosition: {
117
+ top: '20px',
118
+ left: '20px',
119
+ },
120
+ title: 'Card with Custom Drag Targets',
121
+ dragTargets: ['document', 'parent'],
122
+ isCollapsible: true,
74
123
  }
75
124
 
76
- export const NoFooter = NoFooterTemplate.bind({})
77
- NoFooter.args = {
78
- ...defaultProps,
125
+ export const WithTitleDataId = Template.bind({})
126
+ WithTitleDataId.args = {
127
+ width: '300px',
128
+ initialPosition: {
129
+ top: '20px',
130
+ left: '20px',
131
+ },
132
+ title: 'Card with Data ID',
133
+ titleDataId: 'custom-data-id',
134
+ isCollapsible: true,
79
135
  }
@@ -628,7 +628,7 @@
628
628
  return selectedDate >= currentDate
629
629
  },
630
630
  getDatePickerLanguage() {
631
- return datePickerLang(this.activeLanguage)
631
+ return this.activeLanguage
632
632
  },
633
633
  onDragChange({ data }) {
634
634
  this.$emit('on-drag-change', data)