@burh/nuxt-core 1.0.260 → 1.0.261

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.
@@ -1,145 +1,145 @@
1
- <template>
2
- <div class="job__status" v-if="selectedOptionId">
3
- <p class="job__status__title" @click.stop.prevent="toggleDropdown">
4
- <span :class="`color--${options[(selectedOptionId - 1)].color}`"></span>
5
- {{ options[(selectedOptionId - 1)].title }}
6
- <i class="fas fa-caret-down"></i>
7
- </p>
8
- <ul class="job__status__dropdown" :class="{ 'job__status__dropdown--open': isDropdownOpen }">
9
- <li
10
- v-for="item in options"
11
- :key="item.id"
12
- >
13
- <p
14
- class="job__status__title"
15
- v-if="item.id !== selectedOptionId"
16
- @click.stop.prevent="selectOption(item.id)"
17
- >
18
- <span :class="`color--${item.color}`"></span>
19
- {{ item.title }}
20
- </p>
21
- </li>
22
- </ul>
23
- </div>
24
- </template>
25
-
26
- <script>
27
- export default {
28
- name: 'job-status-dropdown',
29
- props: {
30
- status: {
31
- type: Number,
32
- default: 1
33
- }
34
- },
35
- data() {
36
- return {
37
- isDropdownOpen: false,
38
- selectedOptionId: null,
39
- options: [
40
- {
41
- id: 1,
42
- title: 'Aberta',
43
- color: 'green'
44
- },
45
- {
46
- id: 2,
47
- title: 'Em Análise',
48
- color: 'yellow'
49
- },
50
- {
51
- id: 3,
52
- title: 'Pausada',
53
- color: 'pink'
54
- },
55
- {
56
- id: 4,
57
- title: 'Finalizada',
58
- color: 'blue'
59
- }
60
- ]
61
- };
62
- },
63
- mounted() {
64
- this.selectedOptionId = this.status;
65
- },
66
- methods: {
67
- toggleDropdown() {
68
- this.isDropdownOpen = !this.isDropdownOpen;
69
- },
70
- selectOption(id) {
71
- this.selectedOptionId = id;
72
- this.isDropdownOpen = false;
73
- this.$emit('select', id);
74
- }
75
- }
76
- };
77
- </script>
78
-
79
- <style lang="scss" scoped>
80
- .job__status {
81
- position: relative;
82
- &__dropdown {
83
- position: absolute;
84
- left: -20px;
85
- transform: translateY(-10px);
86
- opacity: 0;
87
- pointer-events: none;
88
- background: #fff;
89
- box-shadow: 3px 3px 20px rgba(0, 0, 0, 0.2);
90
- list-style: none;
91
- border-radius: 4px;
92
- overflow: hidden;
93
- min-width: 220px;
94
- padding: 0!important;
95
- margin: 0!important;
96
- transition: transform 0.3s, opacity 0.3s;
97
- transform-origin: top;
98
- &--open {
99
- transform: translateY(10px);
100
- opacity: 1;
101
- pointer-events: all;
102
- }
103
- li {
104
- display: block;
105
- p {
106
- padding: 15px 20px;
107
- transition: background 0.5s, color 0.5s;
108
- &:hover {
109
- background: #F6F9FC;
110
- color: #1F8CEB;
111
- }
112
- }
113
- }
114
- }
115
- &__title {
116
- cursor: pointer;
117
- display: flex;
118
- align-items: center;
119
- user-select: none;
120
- margin: 0!important;
121
- span {
122
- display: block;
123
- border-radius: 100px;
124
- width: 12px;
125
- height: 12px;
126
- margin-right: 10px;
127
- &.color--green {
128
- background: #3AC089;
129
- }
130
- &.color--yellow {
131
- background: #FFCF02;
132
- }
133
- &.color--pink {
134
- background: #FF539D;
135
- }
136
- &.color--blue {
137
- background: #0C95FC;
138
- }
139
- }
140
- i {
141
- margin-left: 10px;
142
- }
143
- }
144
- }
145
- </style>
1
+ <template>
2
+ <div class="job__status" v-if="selectedOptionId">
3
+ <p class="job__status__title" @click.stop.prevent="toggleDropdown">
4
+ <span :class="`color--${options[(selectedOptionId - 1)].color}`"></span>
5
+ {{ options[(selectedOptionId - 1)].title }}
6
+ <i class="fas fa-caret-down"></i>
7
+ </p>
8
+ <ul class="job__status__dropdown" :class="{ 'job__status__dropdown--open': isDropdownOpen }">
9
+ <li
10
+ v-for="item in options"
11
+ :key="item.id"
12
+ >
13
+ <p
14
+ class="job__status__title"
15
+ v-if="item.id !== selectedOptionId"
16
+ @click.stop.prevent="selectOption(item.id)"
17
+ >
18
+ <span :class="`color--${item.color}`"></span>
19
+ {{ item.title }}
20
+ </p>
21
+ </li>
22
+ </ul>
23
+ </div>
24
+ </template>
25
+
26
+ <script>
27
+ export default {
28
+ name: 'job-status-dropdown',
29
+ props: {
30
+ status: {
31
+ type: Number,
32
+ default: 1
33
+ }
34
+ },
35
+ data() {
36
+ return {
37
+ isDropdownOpen: false,
38
+ selectedOptionId: null,
39
+ options: [
40
+ {
41
+ id: 1,
42
+ title: 'Aberta',
43
+ color: 'green'
44
+ },
45
+ {
46
+ id: 2,
47
+ title: 'Em Análise',
48
+ color: 'yellow'
49
+ },
50
+ {
51
+ id: 3,
52
+ title: 'Pausada',
53
+ color: 'pink'
54
+ },
55
+ {
56
+ id: 4,
57
+ title: 'Finalizada',
58
+ color: 'blue'
59
+ }
60
+ ]
61
+ };
62
+ },
63
+ mounted() {
64
+ this.selectedOptionId = this.status;
65
+ },
66
+ methods: {
67
+ toggleDropdown() {
68
+ this.isDropdownOpen = !this.isDropdownOpen;
69
+ },
70
+ selectOption(id) {
71
+ this.selectedOptionId = id;
72
+ this.isDropdownOpen = false;
73
+ this.$emit('select', id);
74
+ }
75
+ }
76
+ };
77
+ </script>
78
+
79
+ <style lang="scss" scoped>
80
+ .job__status {
81
+ position: relative;
82
+ &__dropdown {
83
+ position: absolute;
84
+ left: -20px;
85
+ transform: translateY(-10px);
86
+ opacity: 0;
87
+ pointer-events: none;
88
+ background: #fff;
89
+ box-shadow: 3px 3px 20px rgba(0, 0, 0, 0.2);
90
+ list-style: none;
91
+ border-radius: 4px;
92
+ overflow: hidden;
93
+ min-width: 220px;
94
+ padding: 0!important;
95
+ margin: 0!important;
96
+ transition: transform 0.3s, opacity 0.3s;
97
+ transform-origin: top;
98
+ &--open {
99
+ transform: translateY(10px);
100
+ opacity: 1;
101
+ pointer-events: all;
102
+ }
103
+ li {
104
+ display: block;
105
+ p {
106
+ padding: 15px 20px;
107
+ transition: background 0.5s, color 0.5s;
108
+ &:hover {
109
+ background: #F6F9FC;
110
+ color: #1F8CEB;
111
+ }
112
+ }
113
+ }
114
+ }
115
+ &__title {
116
+ cursor: pointer;
117
+ display: flex;
118
+ align-items: center;
119
+ user-select: none;
120
+ margin: 0!important;
121
+ span {
122
+ display: block;
123
+ border-radius: 100px;
124
+ width: 12px;
125
+ height: 12px;
126
+ margin-right: 10px;
127
+ &.color--green {
128
+ background: #3AC089;
129
+ }
130
+ &.color--yellow {
131
+ background: #FFCF02;
132
+ }
133
+ &.color--pink {
134
+ background: #FF539D;
135
+ }
136
+ &.color--blue {
137
+ background: #0C95FC;
138
+ }
139
+ }
140
+ i {
141
+ margin-left: 10px;
142
+ }
143
+ }
144
+ }
145
+ </style>
@@ -1,138 +1,138 @@
1
- <template>
2
- <base-header class="app-header" :type="'white'">
3
- <div class="row justify-content-center">
4
- <div
5
- :class="{ 'images__container': images.length }"
6
- class="col-6 my-auto header__container"
7
- >
8
- <slot name="header-top" />
9
-
10
- <div class="header__content">
11
- <h2 class="font-weight-bold display-3">{{name}}</h2>
12
- <div class="images" v-if="images.length">
13
- <el-tooltip
14
- v-for="(image, index) in images"
15
- :key="index"
16
- placement="top"
17
- :content="image.name"
18
- >
19
- <img
20
- :src="image.src"
21
- :alt="image.name"
22
- >
23
- </el-tooltip>
24
- </div>
25
- </div>
26
-
27
- <span id="credits-amount" v-if="subheader !== null">
28
- {{ subheader }} Créditos
29
- </span>
30
-
31
- <slot name="header-bottom" />
32
- </div>
33
-
34
- <div class="col-6 d-flex justify-content-end align-items-center">
35
- <el-tooltip v-for="(item, index) in icons" :key="index"
36
- v-show="!item.disabled"
37
- class="item" effect="dark" :content="item.title" placement="top">
38
- <base-button size="md" type="link" class="text-primary px-2 w-auto"
39
- @click="$emit(item.event, item)">
40
- <font-awesome-icon :icon="item.icon" class="mr-2" />
41
- </base-button>
42
- </el-tooltip>
43
-
44
- <slot name="buttons" />
45
- </div>
46
-
47
- <slot/>
48
- </div>
49
- </base-header>
50
- </template>
51
- <script>
52
- export default {
53
- data(){
54
- return{
55
- default: ''
56
- };
57
- },
58
- props:{
59
- icons:{
60
- type: Array,
61
- default: () =>[{ event: 'view', icon: ['fas', 'eye'], disabled: false, title: 'Visualizar' }, { event: 'config', icon: ['fas', 'cog'], disabled: false, title: 'Editar' } ]
62
- },
63
- name: {
64
- type: String,
65
- default: 'Teste de matematica'
66
- },
67
- subheader: {
68
- type: Number,
69
- default: null
70
- },
71
- images: {
72
- type: Array,
73
- default: () => []
74
- }
75
- },
76
- };
77
- </script>
78
- <style lang="scss" scoped>
79
- #credits-amount {
80
- margin: 0!important;
81
- min-width: 8em;
82
- margin: 1rem 1rem 1rem 0;
83
- padding: 0.25em 1em;
84
- font-size: 0.85rem;
85
- line-height: 1.4em;
86
- border-radius: 23rem;
87
- font-weight: 400;
88
- text-align: center;
89
- background-color: rgba(29, 161, 241, 0.1);
90
- color: #1da1f1;
91
- }
92
- </style>
93
- <style lang="scss">
94
-
95
- .app-header {
96
- width: 100%;
97
- padding-top: 1.25rem;
98
- box-shadow: 0 0 2rem 0 rgba(136, 152, 170, 0.15);
99
- }
100
-
101
- .header__container {
102
- display: flex;
103
- flex-direction: column;
104
- justify-content: center;
105
- align-items: flex-start;
106
- }
107
-
108
- .images__container {
109
- display: flex;
110
- align-items: flex-start;
111
- justify-content: center;
112
- .header__content {
113
- display: flex;
114
- flex-direction: row;
115
- h2 {
116
- margin-bottom: 0;
117
- }
118
- .images {
119
- margin-left: 10px;
120
- display: flex;
121
- align-items: center;
122
- user-select: none;
123
- img {
124
- $size: 32px;
125
- display: block;
126
- width: $size;
127
- height: $size;
128
- object-fit: cover;
129
- border-radius: 100px;
130
- border: 2px solid #fff;
131
- &:not(:first-child) {
132
- margin-left: -10px;
133
- }
134
- }
135
- }
136
- }
137
- }
138
- </style>
1
+ <template>
2
+ <base-header class="app-header" :type="'white'">
3
+ <div class="row justify-content-center">
4
+ <div
5
+ :class="{ 'images__container': images.length }"
6
+ class="col-6 my-auto header__container"
7
+ >
8
+ <slot name="header-top" />
9
+
10
+ <div class="header__content">
11
+ <h2 class="font-weight-bold display-3">{{name}}</h2>
12
+ <div class="images" v-if="images.length">
13
+ <el-tooltip
14
+ v-for="(image, index) in images"
15
+ :key="index"
16
+ placement="top"
17
+ :content="image.name"
18
+ >
19
+ <img
20
+ :src="image.src"
21
+ :alt="image.name"
22
+ >
23
+ </el-tooltip>
24
+ </div>
25
+ </div>
26
+
27
+ <span id="credits-amount" v-if="subheader !== null">
28
+ {{ subheader }} Créditos
29
+ </span>
30
+
31
+ <slot name="header-bottom" />
32
+ </div>
33
+
34
+ <div class="col-6 d-flex justify-content-end align-items-center">
35
+ <el-tooltip v-for="(item, index) in icons" :key="index"
36
+ v-show="!item.disabled"
37
+ class="item" effect="dark" :content="item.title" placement="top">
38
+ <base-button size="md" type="link" class="text-primary px-2 w-auto"
39
+ @click="$emit(item.event, item)">
40
+ <font-awesome-icon :icon="item.icon" class="mr-2" />
41
+ </base-button>
42
+ </el-tooltip>
43
+
44
+ <slot name="buttons" />
45
+ </div>
46
+
47
+ <slot/>
48
+ </div>
49
+ </base-header>
50
+ </template>
51
+ <script>
52
+ export default {
53
+ data(){
54
+ return{
55
+ default: ''
56
+ };
57
+ },
58
+ props:{
59
+ icons:{
60
+ type: Array,
61
+ default: () =>[{ event: 'view', icon: ['fas', 'eye'], disabled: false, title: 'Visualizar' }, { event: 'config', icon: ['fas', 'cog'], disabled: false, title: 'Editar' } ]
62
+ },
63
+ name: {
64
+ type: String,
65
+ default: 'Teste de matematica'
66
+ },
67
+ subheader: {
68
+ type: Number,
69
+ default: null
70
+ },
71
+ images: {
72
+ type: Array,
73
+ default: () => []
74
+ }
75
+ },
76
+ };
77
+ </script>
78
+ <style lang="scss" scoped>
79
+ #credits-amount {
80
+ margin: 0!important;
81
+ min-width: 8em;
82
+ margin: 1rem 1rem 1rem 0;
83
+ padding: 0.25em 1em;
84
+ font-size: 0.85rem;
85
+ line-height: 1.4em;
86
+ border-radius: 23rem;
87
+ font-weight: 400;
88
+ text-align: center;
89
+ background-color: rgba(29, 161, 241, 0.1);
90
+ color: #1da1f1;
91
+ }
92
+ </style>
93
+ <style lang="scss">
94
+
95
+ .app-header {
96
+ width: 100%;
97
+ padding-top: 1.25rem;
98
+ box-shadow: 0 0 2rem 0 rgba(136, 152, 170, 0.15);
99
+ }
100
+
101
+ .header__container {
102
+ display: flex;
103
+ flex-direction: column;
104
+ justify-content: center;
105
+ align-items: flex-start;
106
+ }
107
+
108
+ .images__container {
109
+ display: flex;
110
+ align-items: flex-start;
111
+ justify-content: center;
112
+ .header__content {
113
+ display: flex;
114
+ flex-direction: row;
115
+ h2 {
116
+ margin-bottom: 0;
117
+ }
118
+ .images {
119
+ margin-left: 10px;
120
+ display: flex;
121
+ align-items: center;
122
+ user-select: none;
123
+ img {
124
+ $size: 32px;
125
+ display: block;
126
+ width: $size;
127
+ height: $size;
128
+ object-fit: cover;
129
+ border-radius: 100px;
130
+ border: 2px solid #fff;
131
+ &:not(:first-child) {
132
+ margin-left: -10px;
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+ </style>