@community-release/nx-ui 0.0.22 → 0.0.23

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/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "ui",
3
3
  "configKey": "ui",
4
- "version": "0.0.22"
4
+ "version": "0.0.23"
5
5
  }
@@ -1,5 +1,8 @@
1
1
  <template>
2
2
  <component class="component-ui-card" :is="cardIs" :to="to">
3
+ <div class="ui-card-image" v-if="image">
4
+ <img :src="image" :alt="imageAlt">
5
+ </div>
3
6
  <div class="ui-card-icon" v-if="icon">
4
7
  <img :src="icon">
5
8
  <component v-if="iconTitle" :is="iconTitleIs" :to="iconLink" target="_blank" class="ui-card-icon-title">
@@ -7,10 +10,10 @@
7
10
  </component>
8
11
  </div>
9
12
  <div class="ui-card-title" v-if="title"><strong>{{ title }}</strong></div>
10
- <div class="ui-card-content" v-if="slots?.default">
13
+ <div class="ui-card-content" v-if="$slots?.default">
11
14
  <slot></slot>
12
15
  </div>
13
- <div class="ui-card-footer" v-if="slots?.footer">
16
+ <div class="ui-card-footer" v-if="$slots?.footer">
14
17
  <slot name="footer"></slot>
15
18
  </div>
16
19
  </component>
@@ -18,16 +21,22 @@
18
21
 
19
22
  <script setup>
20
23
  // Imports
21
- import { useSlots, resolveComponent } from 'vue';
22
-
23
- //
24
- const slots = useSlots()
24
+ import { resolveComponent } from 'vue';
25
25
 
26
+ // Data
26
27
  const props = defineProps({
27
28
  to: {
28
29
  type: String,
29
30
  default: ''
30
31
  },
32
+ image: {
33
+ type: String,
34
+ default: ''
35
+ },
36
+ imageAlt: {
37
+ type: String,
38
+ default: ''
39
+ },
31
40
  icon: {
32
41
  type: String,
33
42
  default: ''
@@ -81,6 +90,12 @@ const iconTitleIs = props.iconLink ? resolveComponent('NuxtLink') : 'b';
81
90
  background: @com-color-surface;
82
91
  border-radius: @com-border-radius-default;
83
92
 
93
+ .ui-card-image {
94
+ overflow: hidden;
95
+ border-top-left-radius: @com-border-radius-default;
96
+ border-top-right-radius: @com-border-radius-default;
97
+ }
98
+
84
99
  .ui-card-icon {
85
100
  display: grid;
86
101
  grid-template-columns: 50px auto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@community-release/nx-ui",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "nx-ui - Nuxt UI library",
5
5
  "repository": {
6
6
  "type": "git",