@namelivia/vue-components 4.4.5 → 4.6.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 (54) hide show
  1. package/dist/index.esm.js +1083 -939
  2. package/dist/index.esm.js.map +1 -1
  3. package/dist/index.js +1111 -962
  4. package/dist/index.js.map +1 -1
  5. package/package.json +1 -1
  6. package/src/Badge/Badge.vue +3 -7
  7. package/src/Buttons/DangerButton/DangerButton.vue +5 -13
  8. package/src/Buttons/RegularButton/RegularButton.vue +24 -28
  9. package/src/Buttons/ResetButton/ResetButton.vue +3 -7
  10. package/src/Buttons/SecondaryButton/SecondaryButton.vue +5 -13
  11. package/src/Buttons/SubmitButton/SubmitButton.vue +4 -12
  12. package/src/Card/Card.vue +13 -19
  13. package/src/Card/CardBody.vue +4 -9
  14. package/src/Card/CardImage.vue +17 -24
  15. package/src/CardGrid/CardGrid.vue +2 -5
  16. package/src/Container/Container.vue +2 -5
  17. package/src/Icons/CalendarIcon/CalendarIcon.cy.js +10 -0
  18. package/src/Icons/CalendarIcon/CalendarIcon.stories.js +24 -0
  19. package/src/Icons/CalendarIcon/CalendarIcon.vue +16 -0
  20. package/src/Icons/CreateIcon/CreateIcon.cy.js +10 -0
  21. package/src/Icons/CreateIcon/CreateIcon.stories.js +24 -0
  22. package/src/Icons/CreateIcon/CreateIcon.vue +16 -0
  23. package/src/Icons/DropIcon/DropIcon.cy.js +33 -0
  24. package/src/Icons/DropIcon/DropIcon.stories.js +24 -0
  25. package/src/Icons/DropIcon/DropIcon.vue +30 -0
  26. package/src/Icons/SaveIcon/SaveIcon.cy.js +10 -0
  27. package/src/Icons/SaveIcon/SaveIcon.stories.js +24 -0
  28. package/src/Icons/SaveIcon/SaveIcon.vue +16 -0
  29. package/src/Icons/SkullIcon/SkullIcon.cy.js +10 -0
  30. package/src/Icons/SkullIcon/SkullIcon.stories.js +24 -0
  31. package/src/Icons/SkullIcon/SkullIcon.vue +16 -0
  32. package/src/Inputs/CheckBoxInput/CheckBoxInput.vue +9 -27
  33. package/src/Inputs/ImageInput/ImageInput.vue +10 -30
  34. package/src/Inputs/NumberInput/NumberInput.vue +12 -37
  35. package/src/Inputs/ResizeImageUpload/ResizeImageUpload.vue +28 -50
  36. package/src/Inputs/Selector/Selector.vue +27 -52
  37. package/src/Inputs/TextInput/TextInput.vue +10 -31
  38. package/src/Loading/Loading.vue +3 -7
  39. package/src/Modal/Modal.vue +9 -16
  40. package/src/Navbar/MobileMenuButton.vue +5 -17
  41. package/src/Navbar/MobileNavigationLink.vue +9 -27
  42. package/src/Navbar/MobileNavigationLinks.vue +6 -19
  43. package/src/Navbar/Navbar.vue +22 -53
  44. package/src/Navbar/NavbarTitle.vue +7 -19
  45. package/src/Navbar/NavigationLink.vue +9 -27
  46. package/src/Navbar/NavigationLinks.vue +5 -15
  47. package/src/Navbar/RightContent.vue +9 -24
  48. package/src/Pagination/Pagination.vue +8 -14
  49. package/src/RangeView/RangeView.vue +3 -7
  50. package/src/SectionTitle/SectionTitle.vue +5 -9
  51. package/src/Spinner/Spinner.vue +2 -5
  52. package/src/StyledTable/StyledTable.vue +2 -5
  53. package/src/Temperature/Temperature.vue +11 -22
  54. package/src/index.js +5 -0
@@ -2,33 +2,15 @@
2
2
  a(:href="linkDestination" :class="linkClass" aria-current="page")
3
3
  | {{ text }}
4
4
  </template>
5
- <script lang="js">
6
- import { defineComponent } from 'vue'
7
- export default defineComponent({
8
- name: "NavigationLink",
9
- props: {
10
- text: {
11
- type: String,
12
- },
13
- href: {
14
- type: String,
15
- },
16
- current: {
17
- type: Boolean,
18
- },
19
- },
20
- computed: {
21
- linkClass: function () {
22
- if (this.current) {
23
- return 'current-link'
24
- }
25
- return 'regular-link'
26
- },
27
- linkDestination: function () {
28
- return this.current ? '#' : this.href
29
- },
30
- },
31
- })
5
+ <script setup>
6
+ import { computed } from 'vue';
7
+ const props = defineProps({
8
+ text: String,
9
+ href: String,
10
+ current: Boolean,
11
+ });
12
+ const linkClass = computed(() => props.current ? 'current-link' : 'regular-link');
13
+ const linkDestination = computed(() => props.current ? '#' : props.href);
32
14
  </script>
33
15
  <style scoped>
34
16
  .current-link {
@@ -9,21 +9,11 @@ div(class="links-container")
9
9
  :current="link.current"
10
10
  )
11
11
  </template>
12
- <script lang="js">
13
- import NavigationLink from './NavigationLink.vue'
14
-
15
- import { defineComponent } from 'vue'
16
- export default defineComponent({
17
- name: "NavigationLinks",
18
- components: {
19
- NavigationLink: NavigationLink,
20
- },
21
- props: {
22
- links: {
23
- type: Array,
24
- },
25
- },
26
- })
12
+ <script setup>
13
+ import NavigationLink from './NavigationLink.vue';
14
+ defineProps({
15
+ links: Array,
16
+ });
27
17
  </script>
28
18
  <style scoped>
29
19
  .links-container {
@@ -8,30 +8,15 @@ div(
8
8
  :alt="avatarAlt"
9
9
  )
10
10
  </template>
11
- <script lang="js">
12
- import { defineComponent } from 'vue'
13
- export default defineComponent({
14
- name: "RightContent",
15
- props: {
16
- locale: {
17
- type: String,
18
- },
19
- currentUserEmail: {
20
- type: String,
21
- },
22
- currentUserName: {
23
- type: String,
24
- },
25
- currentUserPicture: {
26
- type: String,
27
- },
28
- },
29
- computed: {
30
- avatarAlt: function () {
31
- return this.currentUserName + ` (${this.currentUserEmail})`
32
- },
33
- },
34
- })
11
+ <script setup>
12
+ import { computed } from 'vue';
13
+ const props = defineProps({
14
+ locale: String,
15
+ currentUserEmail: String,
16
+ currentUserName: String,
17
+ currentUserPicture: String,
18
+ });
19
+ const avatarAlt = computed(() => `${props.currentUserName} (${props.currentUserEmail})`);
35
20
  </script>
36
21
  <style scoped>
37
22
  .action-container {
@@ -6,21 +6,15 @@ div(class="pagination-container")
6
6
  regular-button(:text="nextLabel")
7
7
  </template>
8
8
 
9
- <script lang="js">
9
+ <script setup>
10
10
  import { default as RegularButton } from '../Buttons/RegularButton/RegularButton.vue';
11
- import { defineComponent } from 'vue';
12
- export default defineComponent({
13
- name: "Pagination",
14
- props: {
15
- previousLabel: String,
16
- nextLabel: String,
17
- showPrevious: Boolean,
18
- previousLink: String,
19
- nextLink: String,
20
- },
21
- components: {
22
- RegularButton,
23
- },
11
+
12
+ defineProps({
13
+ previousLabel: String,
14
+ nextLabel: String,
15
+ showPrevious: Boolean,
16
+ previousLink: String,
17
+ nextLink: String,
24
18
  });
25
19
  </script>
26
20
 
@@ -7,13 +7,9 @@ div.ranges-editor
7
7
  span.label {{ range.label }}
8
8
  </template>
9
9
 
10
- <script lang="js">
11
- import { defineComponent } from 'vue';
12
- export default defineComponent({
13
- name: "RangeView",
14
- props: {
15
- ranges: Array,
16
- },
10
+ <script setup>
11
+ defineProps({
12
+ ranges: Array,
17
13
  });
18
14
  </script>
19
15
 
@@ -2,15 +2,11 @@
2
2
  h1(class="section-title") {{text}}
3
3
  </template>
4
4
 
5
- <script lang="js">
6
- import { defineComponent } from 'vue';
7
- export default defineComponent({
8
- name: 'SectionTitle',
9
- props: {
10
- text: {
11
- type: String,
12
- default: ''
13
- }
5
+ <script setup>
6
+ defineProps({
7
+ text: {
8
+ type: String,
9
+ default: ''
14
10
  }
15
11
  });
16
12
  </script>
@@ -4,11 +4,8 @@ div(class="spinner" role="status")
4
4
  | Please wait...
5
5
  </template>
6
6
 
7
- <script lang="js">
8
- import { defineComponent } from 'vue';
9
- export default defineComponent({
10
- name: "Spinner",
11
- });
7
+ <script setup>
8
+ // No logic needed
12
9
  </script>
13
10
 
14
11
  <style scoped>
@@ -3,11 +3,8 @@ table(class="styled-table")
3
3
  slot
4
4
  </template>
5
5
 
6
- <script lang="js">
7
- import { defineComponent } from 'vue';
8
- export default defineComponent({
9
- name: "StyledTable",
10
- });
6
+ <script setup>
7
+ // No logic needed
11
8
  </script>
12
9
 
13
10
  <style scoped>
@@ -12,28 +12,17 @@
12
12
  .max
13
13
  | {{maxFormatted}} ℃
14
14
  </template>
15
- <script lang="js">
16
- import { defineComponent } from 'vue'
17
- export default defineComponent({
18
- name: "Temperature",
19
- props: {
20
- title: String,
21
- min: Number,
22
- max: Number,
23
- avg: Number
24
- },
25
- computed: {
26
- minFormatted() {
27
- return this.min.toFixed(2);
28
- },
29
- avgFormatted() {
30
- return this.avg.toFixed(2);
31
- },
32
- maxFormatted() {
33
- return this.max.toFixed(2);
34
- },
35
- },
36
- })
15
+ <script setup>
16
+ import { computed } from 'vue';
17
+ const props = defineProps({
18
+ title: String,
19
+ min: Number,
20
+ max: Number,
21
+ avg: Number
22
+ });
23
+ const minFormatted = computed(() => props.min.toFixed(2));
24
+ const avgFormatted = computed(() => props.avg.toFixed(2));
25
+ const maxFormatted = computed(() => props.max.toFixed(2));
37
26
  </script>
38
27
  <style scoped>
39
28
  .wrapper {
package/src/index.js CHANGED
@@ -24,3 +24,8 @@ export { default as NumberInput } from './Inputs/NumberInput/NumberInput.vue'
24
24
  export { default as ImageInput } from './Inputs/ImageInput/ImageInput.vue'
25
25
  export { default as ResizeImageUpload } from './Inputs/ResizeImageUpload/ResizeImageUpload.vue'
26
26
  export { default as Selector } from './Inputs/Selector/Selector.vue'
27
+ export { default as DropIcon } from './Icons/DropIcon/DropIcon.vue'
28
+ export { default as SkullIcon } from './Icons/SkullIcon/SkullIcon.vue'
29
+ export { default as CalendarIcon } from './Icons/CalendarIcon/CalendarIcon.vue'
30
+ export { default as SaveIcon } from './Icons/SaveIcon/SaveIcon.vue'
31
+ export { default as CreateIcon } from './Icons/CreateIcon/CreateIcon.vue'