@eturnity/eturnity_reusable_components 7.30.3 → 7.32.0

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 (81) hide show
  1. package/.eslintrc.js +184 -0
  2. package/.prettierrc +8 -6
  3. package/package.json +9 -21
  4. package/src/App.vue +79 -78
  5. package/src/assets/theme.js +3 -3
  6. package/src/components/addNewButton/AddNewButton.stories.js +2 -2
  7. package/src/components/addNewButton/index.vue +48 -51
  8. package/src/components/banner/actionBanner/index.vue +54 -55
  9. package/src/components/banner/banner/banner.stories.js +5 -5
  10. package/src/components/banner/banner/index.vue +159 -159
  11. package/src/components/banner/infoBanner/index.vue +41 -53
  12. package/src/components/buttons/buttonIcon/index.vue +125 -122
  13. package/src/components/buttons/closeButton/CloseButton.stories.js +3 -3
  14. package/src/components/buttons/closeButton/index.vue +49 -49
  15. package/src/components/buttons/mainButton/index.vue +108 -108
  16. package/src/components/card/index.vue +70 -70
  17. package/src/components/collapsableInfoText/index.vue +96 -94
  18. package/src/components/deleteIcon/DeleteIcon.stories.js +4 -4
  19. package/src/components/deleteIcon/index.vue +54 -54
  20. package/src/components/draggableInputHandle/index.vue +37 -37
  21. package/src/components/dropdown/Dropdown.stories.js +9 -10
  22. package/src/components/dropdown/index.vue +106 -106
  23. package/src/components/errorMessage/index.vue +52 -52
  24. package/src/components/filter/filterSettings.vue +428 -422
  25. package/src/components/filter/index.vue +135 -135
  26. package/src/components/filter/parentDropdown.vue +73 -73
  27. package/src/components/icon/Icons.stories.js +7 -7
  28. package/src/components/icon/iconCollection.vue +53 -53
  29. package/src/components/icon/index.vue +122 -122
  30. package/src/components/iconWrapper/index.vue +156 -156
  31. package/src/components/infoCard/index.vue +30 -32
  32. package/src/components/infoText/index.vue +142 -137
  33. package/src/components/inputs/checkbox/Checkbox.stories.js +8 -8
  34. package/src/components/inputs/checkbox/index.vue +190 -180
  35. package/src/components/inputs/inputNumber/InputNumber.stories.js +41 -41
  36. package/src/components/inputs/inputNumber/index.vue +696 -696
  37. package/src/components/inputs/inputNumberQuestion/index.vue +185 -182
  38. package/src/components/inputs/inputText/InputText.stories.js +22 -22
  39. package/src/components/inputs/inputText/index.vue +337 -336
  40. package/src/components/inputs/radioButton/RadioButton.stories.js +16 -16
  41. package/src/components/inputs/radioButton/index.vue +222 -219
  42. package/src/components/inputs/searchInput/SearchInput.stories.js +8 -8
  43. package/src/components/inputs/searchInput/index.vue +127 -126
  44. package/src/components/inputs/select/index.vue +792 -791
  45. package/src/components/inputs/select/option/index.vue +124 -124
  46. package/src/components/inputs/select/select.stories.js +31 -32
  47. package/src/components/inputs/slider/index.vue +99 -99
  48. package/src/components/inputs/switchField/index.vue +220 -222
  49. package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +57 -57
  50. package/src/components/inputs/textAreaInput/index.vue +171 -173
  51. package/src/components/inputs/toggle/Toggle.stories.js +14 -14
  52. package/src/components/inputs/toggle/index.vue +214 -217
  53. package/src/components/label/index.vue +82 -82
  54. package/src/components/markerItem/index.vue +68 -66
  55. package/src/components/modals/actionModal/index.vue +54 -54
  56. package/src/components/modals/infoModal/index.vue +39 -36
  57. package/src/components/modals/modal/index.vue +134 -134
  58. package/src/components/modals/modal/modal.stories.js +5 -5
  59. package/src/components/navigationTabs/index.vue +96 -94
  60. package/src/components/pageSubtitle/index.vue +55 -49
  61. package/src/components/pageTitle/index.vue +56 -56
  62. package/src/components/pagination/index.vue +92 -89
  63. package/src/components/progressBar/index.vue +107 -107
  64. package/src/components/projectMarker/index.vue +246 -244
  65. package/src/components/rangeSlider/Slider.vue +491 -465
  66. package/src/components/rangeSlider/index.vue +410 -410
  67. package/src/components/rangeSlider/utils/dom.js +5 -5
  68. package/src/components/selectedOptions/index.vue +119 -119
  69. package/src/components/sideMenu/index.vue +199 -199
  70. package/src/components/spinner/index.vue +57 -57
  71. package/src/components/tableDropdown/index.vue +520 -520
  72. package/src/components/tables/mainTable/index.vue +417 -400
  73. package/src/components/tables/viewTable/index.vue +171 -171
  74. package/src/components/threeDots/index.vue +340 -334
  75. package/src/components/videoThumbnail/index.vue +86 -86
  76. package/src/components/videoThumbnail/videoThumbnail.stories.js +14 -16
  77. package/src/helpers/numberConverter.js +2 -2
  78. package/src/helpers/translateLang.js +9 -9
  79. package/src/mixins/inputValidations.js +5 -5
  80. package/public/favicon.ico +0 -0
  81. package/public/index.html +0 -17
@@ -1,10 +1,10 @@
1
- import Modal from "./index.vue";
1
+ import Modal from './index.vue'
2
2
 
3
3
  export default {
4
- title: "Modal",
4
+ title: 'Modal',
5
5
  component: Modal,
6
6
  // argTypes: {},
7
- };
7
+ }
8
8
 
9
9
  const Template = (args, { argTypes }) => ({
10
10
  // Components used in your story `template` are defined in the `components` object
@@ -19,7 +19,7 @@ const Template = (args, { argTypes }) => ({
19
19
  // <modal :isOpen="isOpen" @on-close="$emit('on-close-summary')" :preventOutsideClose="true" :isLoading="true" :hideClose="true">
20
20
  // <div>Data....</div>
21
21
  // </modal>
22
- });
22
+ })
23
23
 
24
24
  export const Default = Template.bind({
25
25
  isOpen: true,
@@ -28,4 +28,4 @@ export const Default = Template.bind({
28
28
  hideClose: false,
29
29
  backdrop: 'dark',
30
30
  })
31
- Default.args = {};
31
+ Default.args = {}
@@ -1,112 +1,114 @@
1
1
  <template>
2
- <roofTabWrap>
3
- <tab
2
+ <RoofTabWrap>
3
+ <Tab
4
4
  v-for="(tab, index) in tabsData"
5
5
  :key="tab.id"
6
- :isDisabled="!!tab['isDisabled']"
7
- :textColor="tab['textColor']"
8
6
  :active="isIndexKey ? index === activeTab : tab[tabKey] === activeTab"
7
+ :is-disabled="!!tab['isDisabled']"
8
+ :text-color="tab['textColor']"
9
9
  @click="$emit('tab-click', isIndexKey ? index : tab[tabKey])"
10
10
  >
11
- <Option :isDisabled="!!tab['isDisabled']" :textColor="tab['textColor']">
12
- <Uppercase>{{ tab[tabLabel] }}</Uppercase>
13
- <info-text
14
- v-if="tab['labelInfoText']"
15
- :text="tab['labelInfoText']"
16
- :alignArrow="tab['labelInfoAlign']"
17
- />
18
- </Option>
19
- </tab>
20
- <bottomLine />
21
- </roofTabWrap>
11
+ <Option :is-disabled="!!tab['isDisabled']" :text-color="tab['textColor']">
12
+ <Uppercase>{{ tab[tabLabel] }}</Uppercase>
13
+ <InfoText
14
+ v-if="tab['labelInfoText']"
15
+ :align-arrow="tab['labelInfoAlign']"
16
+ :text="tab['labelInfoText']"
17
+ />
18
+ </Option>
19
+ </Tab>
20
+ <BottomLine />
21
+ </RoofTabWrap>
22
22
  </template>
23
23
 
24
24
  <script>
25
- import styled from 'vue3-styled-components'
26
- import InfoText from '../infoText'
27
- const TabAttr = {
28
- active: Boolean,
29
- isDisabled: Boolean,
30
- textColor: String
31
- }
25
+ import styled from 'vue3-styled-components'
26
+ import InfoText from '../infoText'
27
+ const TabAttr = {
28
+ active: Boolean,
29
+ isDisabled: Boolean,
30
+ textColor: String,
31
+ }
32
32
 
33
- const bottomLine = styled('div')`
34
- position: absolute;
35
- bottom: 0;
36
- left: 0;
37
- height: 1px;
38
- width: 100%;
39
- background-color: ${(props) => props.theme.colors.grey3};
40
- `
41
- const roofTabWrap = styled('div')`
42
- display: flex;
43
- align-items: center;
44
- position: relative;
45
- font-size: 13px;
46
- font-weight: 700;
47
- `
48
- const Uppercase = styled('span')`
49
- text-transform: uppercase;
50
- `
51
- const Option = styled('div', TabAttr)`
52
- font-size: 13px;
53
- font-weight: 700;
54
- display: flex;
55
- justify-content: center;
56
- flex-direction: row;
57
- gap: 10px;
58
- color: ${(props) =>
59
- props.textColor
60
- ? props.theme.colors[props.textColor]
33
+ const BottomLine = styled('div')`
34
+ position: absolute;
35
+ bottom: 0;
36
+ left: 0;
37
+ height: 1px;
38
+ width: 100%;
39
+ background-color: ${(props) => props.theme.colors.grey3};
40
+ `
41
+ const RoofTabWrap = styled('div')`
42
+ display: flex;
43
+ align-items: center;
44
+ position: relative;
45
+ font-size: 13px;
46
+ font-weight: 700;
47
+ `
48
+ const Uppercase = styled('span')`
49
+ text-transform: uppercase;
50
+ `
51
+ const Option = styled('div', TabAttr)`
52
+ font-size: 13px;
53
+ font-weight: 700;
54
+ display: flex;
55
+ justify-content: center;
56
+ flex-direction: row;
57
+ gap: 10px;
58
+ color: ${(props) =>
59
+ props.textColor
61
60
  ? props.theme.colors[props.textColor]
62
- : props.textColor
63
- : props.isDisabled
64
- ? props.theme.colors.grey2
65
- : props.theme.colors.black};
66
- `
67
- const Tab = styled('div', TabAttr)`
68
- padding: 16px 10px;
69
- margin-right: 5px;
70
- position: relative;
71
- top: ${(props) => (props.isDisabled ? '-1px' : '0')};
72
- z-index: 10;
73
- border-bottom: 2px solid
74
- ${(props) => (props.active ? props.theme.colors.primary : 'transparent')};
75
- background-color: ${(props) =>
76
- props.isDisabled ? props.theme.colors.grey5 : 'transparent'};
77
- transition: 0.2s ease;
78
- cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
79
- min-width: 140px;
80
- display: flex !important;
81
- align-items: center;
82
- justify-content: space-between;
83
- min-height: 55px;
84
- &:hover {
85
- border-color: ${(props) =>
86
- props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.primary};
87
- }
88
- `
61
+ ? props.theme.colors[props.textColor]
62
+ : props.textColor
63
+ : props.isDisabled
64
+ ? props.theme.colors.grey2
65
+ : props.theme.colors.black};
66
+ `
67
+ const Tab = styled('div', TabAttr)`
68
+ padding: 16px 10px;
69
+ margin-right: 5px;
70
+ position: relative;
71
+ top: ${(props) => (props.isDisabled ? '-1px' : '0')};
72
+ z-index: 10;
73
+ border-bottom: 2px solid
74
+ ${(props) => (props.active ? props.theme.colors.primary : 'transparent')};
75
+ background-color: ${(props) =>
76
+ props.isDisabled ? props.theme.colors.grey5 : 'transparent'};
77
+ transition: 0.2s ease;
78
+ cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
79
+ min-width: 140px;
80
+ display: flex !important;
81
+ align-items: center;
82
+ justify-content: space-between;
83
+ min-height: 55px;
84
+ &:hover {
85
+ border-color: ${(props) =>
86
+ props.isDisabled
87
+ ? props.theme.colors.grey2
88
+ : props.theme.colors.primary};
89
+ }
90
+ `
89
91
 
90
- export default {
91
- name: 'Tabs',
92
+ export default {
93
+ name: 'Tabs',
92
94
 
93
- components: {
94
- Tab,
95
- bottomLine,
96
- roofTabWrap,
97
- Option,
98
- InfoText,
99
- Uppercase
100
- },
95
+ components: {
96
+ Tab,
97
+ BottomLine,
98
+ RoofTabWrap,
99
+ Option,
100
+ InfoText,
101
+ Uppercase,
102
+ },
101
103
 
102
- props: {
103
- tabsData: { required: true },
104
- activeTab: { required: true },
105
- isIndexKey: { type: Boolean, default: false },
106
- tabKey: { type: String, default: '' },
107
- tabLabel: { type: String, default: '' }
104
+ props: {
105
+ tabsData: { required: true },
106
+ activeTab: { required: true },
107
+ isIndexKey: { type: Boolean, default: false },
108
+ tabKey: { type: String, default: '' },
109
+ tabLabel: { type: String, default: '' },
110
+ },
108
111
  }
109
- }
110
112
  </script>
111
113
 
112
114
  <style lang="scss" scoped></style>
@@ -1,61 +1,67 @@
1
1
  <template>
2
- <subtitle-text :color="color" :marginBottom="marginBottom" :hasInfoText="!!infoText">
2
+ <SubtitleText
3
+ :color="color"
4
+ :has-info-text="!!infoText"
5
+ :margin-bottom="marginBottom"
6
+ >
3
7
  <span>
4
8
  {{ text }}
5
9
  </span>
6
- <info-text
7
- v-if="!!infoText"
8
- :text="infoText"
9
- />
10
- </subtitle-text>
10
+ <InfoText v-if="!!infoText" :text="infoText" />
11
+ </SubtitleText>
11
12
  </template>
12
13
 
13
14
  <script>
14
- // import PageSubtitle from "@eturnity/eturnity_reusable_components/src/components/pageSubtitle"
15
- // To use:
16
- // <page-subtitle
17
- // text="My Page Subitle"
18
- // color="red"
19
- // infoText="My info text"
20
- // />
21
- import styled from "vue3-styled-components"
22
- import InfoText from "../infoText"
15
+ // import PageSubtitle from "@eturnity/eturnity_reusable_components/src/components/pageSubtitle"
16
+ // To use:
17
+ // <page-subtitle
18
+ // text="My Page Subitle"
19
+ // color="red"
20
+ // infoText="My info text"
21
+ // />
22
+ import styled from 'vue3-styled-components'
23
+ import InfoText from '../infoText'
23
24
 
24
- const textAttrs = { color: String, hasInfoText: Boolean, marginBottom: String }
25
- const SubtitleText = styled("div", textAttrs)`
26
- display: grid;
27
- align-items: center;
28
- grid-gap: 12px;
29
- grid-template-columns: ${(props) =>
30
- props.hasInfoText ? "auto auto 1fr" : "1fr"};
31
- color: ${(props) => (props.color ? props.color : props.theme.colors.gray1)};
32
- font-size: 13px;
33
- margin-bottom: ${(props) => (props.marginBottom ? props.marginBottom : '30px')};
34
- line-height: 1.5;
35
- position: relative;
36
- `
25
+ const textAttrs = {
26
+ color: String,
27
+ hasInfoText: Boolean,
28
+ marginBottom: String,
29
+ }
30
+ const SubtitleText = styled('div', textAttrs)`
31
+ display: grid;
32
+ align-items: center;
33
+ grid-gap: 12px;
34
+ grid-template-columns: ${(props) =>
35
+ props.hasInfoText ? 'auto auto 1fr' : '1fr'};
36
+ color: ${(props) => (props.color ? props.color : props.theme.colors.gray1)};
37
+ font-size: 13px;
38
+ margin-bottom: ${(props) =>
39
+ props.marginBottom ? props.marginBottom : '30px'};
40
+ line-height: 1.5;
41
+ position: relative;
42
+ `
37
43
 
38
- export default {
39
- name: "page-subtitle",
40
- components: {
41
- SubtitleText,
42
- InfoText,
43
- },
44
- props: {
45
- text: {
46
- required: true,
44
+ export default {
45
+ name: 'PageSubtitle',
46
+ components: {
47
+ SubtitleText,
48
+ InfoText,
47
49
  },
48
- color: {
49
- required: false,
50
+ props: {
51
+ text: {
52
+ required: true,
53
+ },
54
+ color: {
55
+ required: false,
56
+ },
57
+ infoText: {
58
+ required: false,
59
+ default: null,
60
+ },
61
+ marginBottom: {
62
+ required: false,
63
+ default: '30px',
64
+ },
50
65
  },
51
- infoText: {
52
- required: false,
53
- default: null,
54
- },
55
- marginBottom: {
56
- required: false,
57
- default: "30px",
58
- }
59
- },
60
- }
66
+ }
61
67
  </script>
@@ -1,68 +1,68 @@
1
1
  <template>
2
- <title-wrap :hasInfoText="!!infoText">
3
- <title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">
2
+ <TitleWrap :has-info-text="!!infoText">
3
+ <TitleText :color="color" :font-size="fontSize" :uppercase="uppercase">
4
4
  {{ text }}
5
- </title-text>
6
- <info-text v-if="!!infoText" :text="infoText" :alignArrow="infoAlign" />
7
- </title-wrap>
5
+ </TitleText>
6
+ <InfoText v-if="!!infoText" :align-arrow="infoAlign" :text="infoText" />
7
+ </TitleWrap>
8
8
  </template>
9
9
 
10
10
  <script>
11
- // import PageTitle from "@eturnity/eturnity_reusable_components/src/components/pageTitle"
12
- // To use:
13
- // <page-title
14
- // text="My Page Title"
15
- // color="red"
16
- // />
17
- import styled from 'vue3-styled-components'
18
- import InfoText from '../infoText'
11
+ // import PageTitle from "@eturnity/eturnity_reusable_components/src/components/pageTitle"
12
+ // To use:
13
+ // <page-title
14
+ // text="My Page Title"
15
+ // color="red"
16
+ // />
17
+ import styled from 'vue3-styled-components'
18
+ import InfoText from '../infoText'
19
19
 
20
- const wrapAttrs = { hasInfoText: Boolean }
21
- const TitleWrap = styled('div', wrapAttrs)`
22
- display: grid;
23
- align-items: center;
24
- grid-gap: 12px;
25
- grid-template-columns: ${(props) =>
26
- props.hasInfoText ? 'auto auto 1fr' : '1fr'};
27
- margin-bottom: 20px;
28
- `
20
+ const wrapAttrs = { hasInfoText: Boolean }
21
+ const TitleWrap = styled('div', wrapAttrs)`
22
+ display: grid;
23
+ align-items: center;
24
+ grid-gap: 12px;
25
+ grid-template-columns: ${(props) =>
26
+ props.hasInfoText ? 'auto auto 1fr' : '1fr'};
27
+ margin-bottom: 20px;
28
+ `
29
29
 
30
- const titleAttrs = { color: String, fontSize: String, uppercase: Boolean }
31
- const TitleText = styled('span', titleAttrs)`
32
- color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
33
- font-weight: bold;
34
- font-size: ${(props) => (props.fontSize ? props.fontSize : '20px')};
35
- text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
36
- `
30
+ const titleAttrs = { color: String, fontSize: String, uppercase: Boolean }
31
+ const TitleText = styled('span', titleAttrs)`
32
+ color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
33
+ font-weight: bold;
34
+ font-size: ${(props) => (props.fontSize ? props.fontSize : '20px')};
35
+ text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
36
+ `
37
37
 
38
- export default {
39
- name: 'page-title',
40
- components: {
41
- TitleText,
42
- TitleWrap,
43
- InfoText
44
- },
45
- props: {
46
- text: {
47
- required: true
38
+ export default {
39
+ name: 'PageTitle',
40
+ components: {
41
+ TitleText,
42
+ TitleWrap,
43
+ InfoText,
48
44
  },
49
- color: {
50
- required: false
45
+ props: {
46
+ text: {
47
+ required: true,
48
+ },
49
+ color: {
50
+ required: false,
51
+ },
52
+ fontSize: {
53
+ required: false,
54
+ },
55
+ uppercase: {
56
+ required: false,
57
+ default: true,
58
+ },
59
+ infoText: {
60
+ required: false,
61
+ default: null,
62
+ },
63
+ infoAlign: {
64
+ required: false,
65
+ },
51
66
  },
52
- fontSize: {
53
- required: false
54
- },
55
- uppercase: {
56
- required: false,
57
- default: true
58
- },
59
- infoText: {
60
- required: false,
61
- default: null
62
- },
63
- infoAlign: {
64
- required: false
65
- }
66
67
  }
67
- }
68
68
  </script>