design-system-dashboard-devmunity 0.3.0 → 0.4.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ # [0.4.0](https://github.com/vicventum/design-system-dashboard-devmunity/compare/v0.3.0...v0.4.0) (2025-11-17)
2
+
3
+
4
+ ### Features
5
+
6
+ * **components:** :recycle: Reubica y cambia el nombre a los componentes `BCardInner` y `BCardHeader` ([bf321ce](https://github.com/vicventum/design-system-dashboard-devmunity/commit/bf321ce9a7991e032349074a90b336680a79c2e2))
7
+ * **components:** :sparkles: Crea componente DUploadAvatar ([babbd45](https://github.com/vicventum/design-system-dashboard-devmunity/commit/babbd45ebaf47182375d95d8081e571314e12438))
8
+ * **components:** :sparkles: Crea componentes `BBadge` y `CBadgeStatus` ([7aeb85a](https://github.com/vicventum/design-system-dashboard-devmunity/commit/7aeb85ae765604fdbb6f334312a7615fda32a868))
9
+
1
10
  # [0.3.0](https://github.com/vicventum/design-system-dashboard-devmunity/compare/v0.2.0...v0.3.0) (2025-11-15)
2
11
 
3
12
 
@@ -1,38 +1,38 @@
1
1
  @layer base {
2
- * {
3
- /* @apply border-neutral-300; */
4
- }
5
- body {
6
- @apply overflow-x-hidden scroll-smooth text-pretty text-neutral-950;
7
- scrollbar-gutter: stable;
8
- }
9
- h1,
10
- h2,
11
- h3,
12
- h4,
13
- h5,
14
- h6 {
15
- @apply text-balance;
16
- }
2
+ * {
3
+ /* @apply border-neutral-300; */
4
+ }
5
+ body {
6
+ @apply text-default overflow-x-hidden scroll-smooth text-pretty;
7
+ scrollbar-gutter: stable;
8
+ }
9
+ h1,
10
+ h2,
11
+ h3,
12
+ h4,
13
+ h5,
14
+ h6 {
15
+ @apply text-balance;
16
+ }
17
17
 
18
- label {
19
- @apply block cursor-pointer text-sm font-medium text-neutral-800;
20
- }
18
+ label {
19
+ @apply block cursor-pointer text-sm font-medium text-neutral-800;
20
+ }
21
21
 
22
- ::-webkit-scrollbar {
23
- @apply size-1;
24
- }
25
- ::-webkit-scrollbar-thumb {
26
- @apply rounded-sm bg-primary-400 transition-colors;
27
- }
28
- ::-webkit-scrollbar-track {
29
- @apply bg-transparent;
30
- }
22
+ ::-webkit-scrollbar {
23
+ @apply size-1;
24
+ }
25
+ ::-webkit-scrollbar-thumb {
26
+ @apply bg-primary-400 rounded-sm transition-colors;
27
+ }
28
+ ::-webkit-scrollbar-track {
29
+ @apply bg-transparent;
30
+ }
31
31
 
32
- ::selection {
33
- @apply !bg-primary-500 text-neutral-50;
34
- }
35
- ::-moz-selection {
36
- @apply !bg-primary-500 text-neutral-50;
37
- }
32
+ ::selection {
33
+ @apply !bg-primary-500 text-neutral-50;
34
+ }
35
+ ::-moz-selection {
36
+ @apply !bg-primary-500 text-neutral-50;
37
+ }
38
38
  }
@@ -0,0 +1,7 @@
1
+ export default {
2
+ defaultVariants: {
3
+ color: 'neutral',
4
+ variant: 'soft',
5
+ size: 'sm',
6
+ },
7
+ }
@@ -1,4 +1,4 @@
1
1
  export { default as card } from './components/card.js'
2
2
  export { default as button } from './components/button.js'
3
3
  export { default as modal } from './components/modal.js'
4
- // export { default as dropdownMenu } from './components/dropdown-menu.js'
4
+ export { default as badge } from './components/badge.js'
@@ -0,0 +1,31 @@
1
+ <script lang="jsx" setup>
2
+ import { badge } from '~/assets/css/themes'
3
+
4
+ const props = defineProps({
5
+ label: {
6
+ type: String,
7
+ required: true,
8
+ },
9
+ value: {
10
+ type: String,
11
+ default: true,
12
+ },
13
+ styles: {
14
+ type: Object,
15
+ default: () => ({}),
16
+ required: true,
17
+ },
18
+ defaultStyle: {
19
+ type: Object,
20
+ default: () => badge,
21
+ },
22
+ })
23
+ </script>
24
+
25
+ <template>
26
+ <UBadge :label="label" v-bind="styles[value] ?? props.defaultStyle">
27
+ <template v-for="(_, name) in $slots" v-slot:[name]="slotData">
28
+ <slot :name="name" v-bind="slotData" />
29
+ </template>
30
+ </UBadge>
31
+ </template>
@@ -0,0 +1,39 @@
1
+ <script setup>
2
+ const props = defineProps({
3
+ label: {
4
+ type: String,
5
+ default: '',
6
+ required: true,
7
+ },
8
+ value: {
9
+ type: String,
10
+ default: '',
11
+ required: true,
12
+ },
13
+ })
14
+
15
+ const styles = {
16
+ PLANNED: {
17
+ color: 'accent',
18
+ variant: 'soft',
19
+ },
20
+ FINISHED: {
21
+ color: 'success',
22
+ variant: 'soft',
23
+ },
24
+ CANCELLED: {
25
+ color: 'error',
26
+ variant: 'soft',
27
+ icon: 'material-symbols:info-outline',
28
+ },
29
+ OTHER: {
30
+ color: 'neutral',
31
+ variant: 'soft',
32
+ },
33
+ }
34
+ const defaultStyle = styles.OTHER
35
+ </script>
36
+
37
+ <template>
38
+ <BBadge :label="label" :value="value" :styles="styles" :default-style="defaultStyle" />
39
+ </template>
@@ -55,9 +55,9 @@ function handleClickLeftButtonIcon() {
55
55
  </script>
56
56
 
57
57
  <template>
58
- <BCardInner
58
+ <ACardInner
59
59
  :class="[
60
- 'flex items-center justify-between',
60
+ 'text-default flex items-center justify-between',
61
61
  { 'bg-muted border-y border-neutral-200': variant === 'secondary' },
62
62
  ]"
63
63
  >
@@ -98,5 +98,5 @@ function handleClickLeftButtonIcon() {
98
98
  <div v-if="$slots.actions" class="p-0">
99
99
  <slot name="actions" />
100
100
  </div>
101
- </BCardInner>
101
+ </ACardInner>
102
102
  </template>
@@ -0,0 +1,76 @@
1
+ <script setup>
2
+ const props = defineProps({
3
+ src: {
4
+ type: String,
5
+ default: '',
6
+ required: false,
7
+ },
8
+ buttonSize: {
9
+ type: String,
10
+ default: 'sm',
11
+ required: false,
12
+ validator: (value) => ['xs', 'sm', 'md', 'lg', 'xl'].includes(value),
13
+ },
14
+ buttonColor: {
15
+ type: String,
16
+ default: 'neutral',
17
+ required: false,
18
+ },
19
+ })
20
+ const emit = defineEmits('on-upload-image')
21
+
22
+ // Data
23
+
24
+ const fileName = ref(null)
25
+ const inputFileRef = ref(null)
26
+
27
+ // Computed
28
+
29
+ const getImage = computed(() => {
30
+ if (fileName.value) {
31
+ const imgUrl = globalThis.URL.createObjectURL(fileName.value)
32
+ return imgUrl
33
+ } else if (props.src) {
34
+ return props.src
35
+ }
36
+
37
+ return null
38
+ })
39
+
40
+ // Methods
41
+
42
+ function handleUploadImage(event) {
43
+ if (event.target.files) {
44
+ fileName.value = event.target.files[0]
45
+ } else {
46
+ fileName.value = event.dataTransfer.files[0]
47
+ }
48
+
49
+ emit('on-upload-image', fileName.value)
50
+ }
51
+ </script>
52
+
53
+ <template>
54
+ <div class="flex items-end gap-x-6">
55
+ <div>
56
+ <input
57
+ ref="inputFileRef"
58
+ type="file"
59
+ accept="image/*"
60
+ class="sr-only"
61
+ @change="handleUploadImage"
62
+ />
63
+ <img v-if="getImage" :src="getImage" alt="User image" class="size-20 rounded-md object-cover" />
64
+ <div
65
+ v-else
66
+ class="bg-primary-50 grid size-20 place-items-center rounded-md"
67
+ @click="inputFileRef.click()"
68
+ >
69
+ <UIcon name="heroicons:photo" class="size-6 text-neutral-900" />
70
+ </div>
71
+ </div>
72
+ <UButton :color="buttonColor" variant="outline" @click="inputFileRef.click()" :size="buttonSize">
73
+ {{ 'Cambiar' }}
74
+ </UButton>
75
+ </div>
76
+ </template>
@@ -11,7 +11,7 @@ const modalDanger = overlay.create(CModalDanger)
11
11
  <template>
12
12
  <div class="mb-16 min-h-full">
13
13
  <UContainer>
14
- <BCardInner class="h-full">
14
+ <ACardInner class="h-full">
15
15
  <BCard :has-footer-divider="false">
16
16
  <template #header>
17
17
  <h1>Header</h1>
@@ -23,13 +23,13 @@ const modalDanger = overlay.create(CModalDanger)
23
23
  </BCard>
24
24
  <UCard variant="ghost"> oli </UCard>
25
25
  <AButtonBack icon="heroicons:arrow-left-16-solid" is-back-action />
26
- </BCardInner>
26
+ </ACardInner>
27
27
 
28
28
  <hr class="my-6" />
29
29
 
30
30
  <BCard>
31
31
  <template #header>
32
- <BCardHeader title="Crear una nueva actividad" subtitle="Subtitle" has-left-button-icon>
32
+ <DCardHeader title="Crear una nueva actividad" subtitle="Subtitle" has-left-button-icon>
33
33
  <template #actions>
34
34
  <DActionButtons
35
35
  primary-button-text="Guardar"
@@ -38,16 +38,16 @@ const modalDanger = overlay.create(CModalDanger)
38
38
  is-block-buttons
39
39
  />
40
40
  </template>
41
- </BCardHeader>
41
+ </DCardHeader>
42
42
  </template>
43
43
 
44
- <BCardInner>
44
+ <ACardInner>
45
45
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci eos perspiciatis
46
46
  asperiores suscipit voluptate magni excepturi. Doloribus in fugit quam voluptatibus,
47
47
  molestiae maxime illum explicabo ut corrupti, distinctio atque dolor.
48
- </BCardInner>
48
+ </ACardInner>
49
49
 
50
- <BCardHeader
50
+ <DCardHeader
51
51
  title="Crear una nueva actividad"
52
52
  subtitle="Subtitle"
53
53
  variant="secondary"
@@ -57,9 +57,9 @@ const modalDanger = overlay.create(CModalDanger)
57
57
  <template #actions>
58
58
  <UButton label="Action" />
59
59
  </template>
60
- </BCardHeader>
60
+ </DCardHeader>
61
61
 
62
- <BCardInner class="space-y-2">
62
+ <ACardInner class="space-y-2">
63
63
  <p>
64
64
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci eos perspiciatis
65
65
  asperiores suscipit voluptate magni excepturi. Doloribus in fugit quam voluptatibus,
@@ -73,7 +73,7 @@ const modalDanger = overlay.create(CModalDanger)
73
73
  class-buttons="w-[200px]"
74
74
  has-buttons-block
75
75
  />
76
- </BCardInner>
76
+ </ACardInner>
77
77
  </BCard>
78
78
 
79
79
  <hr class="my-6" />
@@ -140,14 +140,25 @@ const modalDanger = overlay.create(CModalDanger)
140
140
 
141
141
  <hr class="my-6" />
142
142
 
143
- <!-- <APillAvatar text="test 1" /> -->
143
+ <!-- <APill text="test 1" /> -->
144
144
  <p>
145
- <APillAvatar label="xs" size="xs" />
146
- <APillAvatar label="sm" size="sm" color="warning" variant="subtle" />
147
- <APillAvatar label="md" size="md" color="error" />
148
- <APillAvatar label="lg" size="lg" color="success" />
149
- <APillAvatar label="xl" size="xl" />
145
+ <APill label="xs" size="xs" />
146
+ <APill label="sm" size="sm" color="warning" variant="subtle" />
147
+ <APill label="md" size="md" color="error" />
148
+ <APill label="lg" size="lg" color="success" />
149
+ <APill label="xl" size="xl" />
150
150
  </p>
151
+
152
+ <hr class="my-6" />
153
+
154
+ <DUploadAvatar button-size="xl" button-color="error" />
155
+
156
+ <hr class="my-6" />
157
+
158
+ <div class="flex gap-x-2">
159
+ <CBadgeStatus label="Urgente" value="CANCELLED" />
160
+ <CBadgeStatus label="Normal" value="normal" />
161
+ </div>
151
162
  </UContainer>
152
163
  </div>
153
164
  </template>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "design-system-dashboard-devmunity",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.4.0",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev",