@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.
- package/package.json +1 -1
- package/src/assets/svgIcons/download.svg +3 -3
- package/src/assets/svgIcons/filter.svg +3 -0
- package/src/assets/svgIcons/kanban_view.svg +6 -0
- package/src/assets/svgIcons/plus_button.svg +3 -3
- package/src/assets/svgIcons/table_view.svg +3 -0
- package/src/assets/theme.js +53 -5
- package/src/components/banner/banner/Banner.stories.js +99 -43
- package/src/components/banner/infoBanner/InfoBanner.stories.js +72 -30
- package/src/components/buttons/buttonIcon/ButtonIcon.stories.js +167 -0
- package/src/components/buttons/buttonIcon/index.vue +40 -6
- package/src/components/buttons/mainButton/MainButton.stories.js +115 -34
- package/src/components/draggableCard/draggableCard.stories.js +110 -54
- package/src/components/filter/filterSettings.vue +1 -1
- package/src/components/filterComponent/viewFilter.vue +605 -0
- package/src/components/filterComponent/viewSettings.vue +281 -0
- package/src/components/filterComponent/viewSort.vue +330 -0
- package/src/components/icon/Icon.stories.js +220 -0
- package/src/components/icon/index.vue +8 -1
- package/src/components/infoCard/index.vue +7 -3
- package/src/components/inputs/searchInput/index.vue +1 -1
- package/src/components/inputs/select/index.vue +6 -5
- package/src/components/inputs/select/option/index.vue +5 -0
- package/src/components/projectMarker/ProjectMarker.stories.js +130 -0
- package/src/components/selectedOptions/index.vue +13 -2
- package/src/components/selectedOptions/selectedOptions.stories.js +135 -37
- package/src/components/spinner/Spinner.stories.js +70 -18
- package/src/components/spinnerGif/SpinnerGif.stories.js +86 -0
- package/src/components/tableDropdown/TableDropdown.stories.js +192 -0
- package/src/components/tables/mainTable/MainTable.stories.js +151 -0
- package/src/components/tabsHeader/TabsHeader.stories.js +142 -0
- package/src/components/tabsHeader/index.vue +33 -9
- package/src/components/videoThumbnail/videoThumbnail.stories.js +90 -17
- package/src/helpers/translateLang.js +95 -24
- package/src/components/icon/Icons.stories.js +0 -31
@@ -8,11 +8,24 @@
|
|
8
8
|
:is-active="activeTab === item.id"
|
9
9
|
@click="onTabClick({ id: item.id })"
|
10
10
|
>
|
11
|
-
<
|
12
|
-
|
13
|
-
|
11
|
+
<RCIcon
|
12
|
+
v-if="item.icon"
|
13
|
+
:color="
|
14
|
+
activeTab === item.id
|
15
|
+
? theme.semanticColors.purple[500]
|
16
|
+
: theme.semanticColors.teal[800]
|
17
|
+
"
|
18
|
+
:hovered-color="
|
19
|
+
activeTab === item.id
|
20
|
+
? theme.semanticColors.purple[500]
|
21
|
+
: theme.semanticColors.teal[800]
|
22
|
+
"
|
23
|
+
:name="item.icon"
|
24
|
+
size="14px"
|
25
|
+
/>
|
26
|
+
<div>{{ item.text }}</div>
|
27
|
+
<DotIcon v-if="item.subText" :is-active="activeTab === item.id" />
|
14
28
|
<SubText v-if="item.subText">{{ item.subText }}</SubText>
|
15
|
-
</NameContainer>
|
16
29
|
<RCIcon v-if="item.hasError" name="warning" size="14px" />
|
17
30
|
</TabItem>
|
18
31
|
</TabsContainer>
|
@@ -39,6 +52,7 @@
|
|
39
52
|
// />
|
40
53
|
import styled from 'vue3-styled-components'
|
41
54
|
import RCIcon from '../icon'
|
55
|
+
import theme from '@/assets/theme'
|
42
56
|
|
43
57
|
const NameContainer = styled.div`
|
44
58
|
display: flex;
|
@@ -79,12 +93,17 @@
|
|
79
93
|
gap: 8px;
|
80
94
|
padding: 10px 25px;
|
81
95
|
font-size: 14px;
|
82
|
-
font-weight: 400;
|
96
|
+
font-weight: ${(props) => (props.isActive ? '500' : '400')};
|
83
97
|
color: ${(props) =>
|
84
|
-
props.isActive
|
85
|
-
|
86
|
-
|
98
|
+
props.isActive
|
99
|
+
? props.theme.semanticColors.purple[500]
|
100
|
+
: props.theme.semanticColors.teal[800]};
|
87
101
|
flex-grow: ${(props) => (props.fullSize ? 1 : 0)};
|
102
|
+
background-color: ${(props) => props.theme.colors.white};
|
103
|
+
border-bottom: ${(props) =>
|
104
|
+
props.isActive
|
105
|
+
? '1px solid' + props.theme.semanticColors.purple[400]
|
106
|
+
: '1px solid' + props.theme.semanticColors.grey[400]};
|
88
107
|
`
|
89
108
|
|
90
109
|
export default {
|
@@ -105,7 +124,7 @@
|
|
105
124
|
},
|
106
125
|
activeTab: {
|
107
126
|
required: true,
|
108
|
-
type: Number,
|
127
|
+
type: [Number, String],
|
109
128
|
},
|
110
129
|
fullSize: {
|
111
130
|
type: Boolean,
|
@@ -113,6 +132,11 @@
|
|
113
132
|
},
|
114
133
|
},
|
115
134
|
emits: ['on-tab-change'],
|
135
|
+
data() {
|
136
|
+
return {
|
137
|
+
theme,
|
138
|
+
}
|
139
|
+
},
|
116
140
|
methods: {
|
117
141
|
onTabClick({ id }) {
|
118
142
|
if (id === this.activeTab) {
|
@@ -1,33 +1,106 @@
|
|
1
1
|
import VideoThumbnail from './index.vue'
|
2
|
+
import theme from '@/assets/theme'
|
2
3
|
|
3
4
|
export default {
|
4
5
|
title: 'VideoThumbnail',
|
5
6
|
component: VideoThumbnail,
|
6
|
-
|
7
|
+
tags: ['autodocs'],
|
8
|
+
argTypes: {
|
9
|
+
src: {
|
10
|
+
control: 'text',
|
11
|
+
description: 'URL of the thumbnail image',
|
12
|
+
},
|
13
|
+
fit: {
|
14
|
+
control: 'select',
|
15
|
+
options: ['cover', 'contain', 'fill', 'none', 'scale-down'],
|
16
|
+
description: 'How the image should fit within its container',
|
17
|
+
},
|
18
|
+
width: {
|
19
|
+
control: 'text',
|
20
|
+
description: 'Width of the thumbnail (e.g., "300px")',
|
21
|
+
},
|
22
|
+
height: {
|
23
|
+
control: 'text',
|
24
|
+
description: 'Height of the thumbnail (e.g., "200px")',
|
25
|
+
},
|
26
|
+
playIconSize: {
|
27
|
+
control: 'text',
|
28
|
+
description: 'Size of the play icon (e.g., "50px")',
|
29
|
+
},
|
30
|
+
playIconColor: {
|
31
|
+
control: 'color',
|
32
|
+
description: 'Color of the play icon',
|
33
|
+
},
|
34
|
+
},
|
7
35
|
}
|
8
36
|
|
9
|
-
const Template = (args
|
10
|
-
// Components used in your story `template` are defined in the `components` object
|
37
|
+
const Template = (args) => ({
|
11
38
|
components: { VideoThumbnail },
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
// playIconSize="20px"
|
20
|
-
// width="400px"
|
21
|
-
// height="600px"
|
22
|
-
// />
|
39
|
+
setup() {
|
40
|
+
return { args }
|
41
|
+
},
|
42
|
+
template: '<VideoThumbnail v-bind="args" />',
|
43
|
+
provide: {
|
44
|
+
theme,
|
45
|
+
},
|
23
46
|
})
|
24
47
|
|
25
48
|
export const Default = Template.bind({})
|
26
49
|
Default.args = {
|
27
|
-
src: 'https://
|
50
|
+
src: 'https://images.unsplash.com/photo-1574717024653-61fd2cf4d44d?w=400&h=300&fit=crop',
|
51
|
+
fit: 'cover',
|
52
|
+
width: '300px',
|
53
|
+
height: '200px',
|
54
|
+
playIconSize: '50px',
|
55
|
+
playIconColor: 'blue',
|
56
|
+
}
|
57
|
+
|
58
|
+
export const Small = Template.bind({})
|
59
|
+
Small.args = {
|
60
|
+
src: 'https://images.unsplash.com/photo-1574717024653-61fd2cf4d44d?w=200&h=150&fit=crop',
|
61
|
+
fit: 'cover',
|
62
|
+
width: '200px',
|
63
|
+
height: '150px',
|
64
|
+
playIconSize: '30px',
|
65
|
+
playIconColor: 'blue',
|
66
|
+
}
|
67
|
+
|
68
|
+
export const Large = Template.bind({})
|
69
|
+
Large.args = {
|
70
|
+
src: 'https://images.unsplash.com/photo-1574717024653-61fd2cf4d44d?w=800&h=600&fit=crop',
|
71
|
+
fit: 'cover',
|
72
|
+
width: '600px',
|
73
|
+
height: '400px',
|
74
|
+
playIconSize: '80px',
|
75
|
+
playIconColor: 'blue',
|
76
|
+
}
|
77
|
+
|
78
|
+
export const CustomFit = Template.bind({})
|
79
|
+
CustomFit.args = {
|
80
|
+
src: 'https://images.unsplash.com/photo-1574717024653-61fd2cf4d44d?w=400&h=300&fit=crop',
|
81
|
+
fit: 'contain',
|
82
|
+
width: '300px',
|
83
|
+
height: '200px',
|
84
|
+
playIconSize: '50px',
|
85
|
+
playIconColor: 'blue',
|
86
|
+
}
|
87
|
+
|
88
|
+
export const CustomIconColor = Template.bind({})
|
89
|
+
CustomIconColor.args = {
|
90
|
+
src: 'https://images.unsplash.com/photo-1574717024653-61fd2cf4d44d?w=400&h=300&fit=crop',
|
91
|
+
fit: 'cover',
|
92
|
+
width: '300px',
|
93
|
+
height: '200px',
|
28
94
|
playIconSize: '50px',
|
29
95
|
playIconColor: 'red',
|
30
|
-
|
31
|
-
|
96
|
+
}
|
97
|
+
|
98
|
+
export const Square = Template.bind({})
|
99
|
+
Square.args = {
|
100
|
+
src: 'https://images.unsplash.com/photo-1574717024653-61fd2cf4d44d?w=400&h=400&fit=crop',
|
32
101
|
fit: 'cover',
|
102
|
+
width: '300px',
|
103
|
+
height: '300px',
|
104
|
+
playIconSize: '50px',
|
105
|
+
playIconColor: 'blue',
|
33
106
|
}
|
@@ -1,3 +1,21 @@
|
|
1
|
+
import {
|
2
|
+
enUS,
|
3
|
+
enGB,
|
4
|
+
de,
|
5
|
+
fr,
|
6
|
+
it,
|
7
|
+
es,
|
8
|
+
da,
|
9
|
+
pl,
|
10
|
+
sv,
|
11
|
+
nb,
|
12
|
+
nl,
|
13
|
+
cs,
|
14
|
+
fi,
|
15
|
+
pt,
|
16
|
+
ca,
|
17
|
+
} from 'date-fns/locale'
|
18
|
+
|
1
19
|
export const translateLang = (lang) => {
|
2
20
|
// this is needed so that we use the correct keys for Phrase
|
3
21
|
if (lang === 'en') {
|
@@ -55,30 +73,83 @@ export const translateLang = (lang) => {
|
|
55
73
|
}
|
56
74
|
}
|
57
75
|
|
76
|
+
export const getDateFormat = (lang) => {
|
77
|
+
const formatMap = {
|
78
|
+
'en-us': 'MM/dd/yyyy',
|
79
|
+
'en-gb': 'dd/MM/yyyy',
|
80
|
+
en: 'MM/dd/yyyy',
|
81
|
+
'de-de': 'dd.MM.yyyy',
|
82
|
+
'de-at': 'dd.MM.yyyy',
|
83
|
+
'de-ch': 'dd.MM.yyyy',
|
84
|
+
'de-lu': 'dd.MM.yyyy',
|
85
|
+
'de-be': 'dd.MM.yyyy',
|
86
|
+
de: 'dd.MM.yyyy',
|
87
|
+
'fr-fr': 'dd/MM/yyyy',
|
88
|
+
'fr-be': 'dd/MM/yyyy',
|
89
|
+
'fr-lu': 'dd/MM/yyyy',
|
90
|
+
'fr-ch': 'dd/MM/yyyy',
|
91
|
+
fr: 'dd/MM/yyyy',
|
92
|
+
'it-it': 'dd/MM/yyyy',
|
93
|
+
'it-ch': 'dd/MM/yyyy',
|
94
|
+
it: 'dd/MM/yyyy',
|
95
|
+
'da-dk': 'dd.MM.yyyy',
|
96
|
+
'pl-pl': 'dd.MM.yyyy',
|
97
|
+
'sv-se': 'yyyy-MM-dd',
|
98
|
+
'no-no': 'dd.MM.yyyy',
|
99
|
+
'nb-no': 'dd.MM.yyyy',
|
100
|
+
'nl-nl': 'dd-MM-yyyy',
|
101
|
+
'nl-be': 'dd-MM-yyyy',
|
102
|
+
cs: 'dd.MM.yyyy',
|
103
|
+
'fi-fi': 'dd.MM.yyyy',
|
104
|
+
'pt-pt': 'dd/MM/yyyy',
|
105
|
+
'es-es': 'dd/MM/yyyy',
|
106
|
+
'ca-es': 'dd/MM/yyyy',
|
107
|
+
}
|
108
|
+
|
109
|
+
return formatMap[lang.toLowerCase()] || 'MM/dd/yyyy' // Fallback to en-US format
|
110
|
+
}
|
111
|
+
|
58
112
|
export const datePickerLang = (lang) => {
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
113
|
+
const localeMap = {
|
114
|
+
'en-us': enUS,
|
115
|
+
'en-gb': enGB,
|
116
|
+
en: enUS,
|
117
|
+
'de-de': de,
|
118
|
+
'de-at': de,
|
119
|
+
'de-ch': de,
|
120
|
+
'de-lu': de,
|
121
|
+
'de-be': de,
|
122
|
+
de: de,
|
123
|
+
'fr-fr': fr,
|
124
|
+
'fr-be': fr,
|
125
|
+
'fr-lu': fr,
|
126
|
+
'fr-ch': fr,
|
127
|
+
fr: fr,
|
128
|
+
'it-it': it,
|
129
|
+
'it-ch': it,
|
130
|
+
it: it,
|
131
|
+
'da-dk': da,
|
132
|
+
'pl-pl': pl,
|
133
|
+
'sv-se': sv,
|
134
|
+
'no-no': nb,
|
135
|
+
'nb-no': nb,
|
136
|
+
'nl-nl': nl,
|
137
|
+
'nl-be': nl,
|
138
|
+
cs: cs,
|
139
|
+
'fi-fi': fi,
|
140
|
+
'pt-pt': pt,
|
141
|
+
'es-es': es,
|
142
|
+
'ca-es': ca,
|
143
|
+
}
|
144
|
+
|
145
|
+
const normalizedLang = lang ? lang.toLowerCase() : 'en-us'
|
146
|
+
const locale = localeMap[normalizedLang] || enUS
|
147
|
+
if (!localeMap[normalizedLang]) {
|
148
|
+
console.warn(
|
149
|
+
`Unsupported language for datePickerLang: ${lang}, falling back to enUS`
|
150
|
+
)
|
81
151
|
}
|
152
|
+
return locale
|
82
153
|
}
|
83
154
|
|
84
155
|
export const tinyLanguage = (lang) => {
|
@@ -123,6 +194,6 @@ export const langForLocaleString = () => {
|
|
123
194
|
: localStorage.getItem('lang') === 'ca-es'
|
124
195
|
? 'es-es'
|
125
196
|
: localStorage.getItem('lang')
|
126
|
-
: 'en-
|
127
|
-
return selectedLang !== 'null' ? selectedLang : 'en-
|
197
|
+
: 'en-us'
|
198
|
+
return selectedLang !== 'null' ? selectedLang : 'en-us'
|
128
199
|
}
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import IconCollection from './iconCollection.vue'
|
2
|
-
|
3
|
-
export default {
|
4
|
-
title: 'icon',
|
5
|
-
component: IconCollection,
|
6
|
-
}
|
7
|
-
|
8
|
-
const Template = (args) => ({
|
9
|
-
components: { IconCollection },
|
10
|
-
setup() {
|
11
|
-
return { args }
|
12
|
-
},
|
13
|
-
template: '<IconCollection v-bind="args" />',
|
14
|
-
})
|
15
|
-
|
16
|
-
export const Default = Template.bind({})
|
17
|
-
Default.args = {
|
18
|
-
size: '30px',
|
19
|
-
}
|
20
|
-
|
21
|
-
export const WithColor = Template.bind({})
|
22
|
-
WithColor.args = {
|
23
|
-
size: '30px',
|
24
|
-
color: 'red',
|
25
|
-
hoveredColor: 'crimson',
|
26
|
-
}
|
27
|
-
|
28
|
-
export const Large = Template.bind({})
|
29
|
-
Large.args = {
|
30
|
-
size: '60px',
|
31
|
-
}
|