@community-release/nx-ui 0.0.23 → 0.0.25

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.23"
4
+ "version": "0.0.25"
5
5
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <section class="component-ui-accordion">
3
3
  <ui-accordion-item v-if="list.length" v-for="item of list" :title="item.title">
4
- {{ item.text }}
4
+ <div v-html="item.text"></div>
5
5
  </ui-accordion-item>
6
6
  <slot></slot>
7
7
  </section>
@@ -1,5 +1,8 @@
1
1
  <template>
2
2
  <component class="component-ui-card" :is="cardIs" :to="to">
3
+ <div class="ui-card-header" v-if="$slots?.header">
4
+ <slot name="header"></slot>
5
+ </div>
3
6
  <div class="ui-card-image" v-if="image">
4
7
  <img :src="image" :alt="imageAlt">
5
8
  </div>
@@ -9,7 +12,10 @@
9
12
  {{ iconTitle }}
10
13
  </component>
11
14
  </div>
12
- <div class="ui-card-title" v-if="title"><strong>{{ title }}</strong></div>
15
+ <component v-if="title" :is="titleUrl ? 'a' : 'div'" class="ui-card-title" :href="titleUrl">
16
+ <strong>{{ title }}</strong>
17
+ <div v-if="subtitle" class="ui-card-subtitle">{{ subtitle }}</div>
18
+ </component>
13
19
  <div class="ui-card-content" v-if="$slots?.default">
14
20
  <slot></slot>
15
21
  </div>
@@ -53,6 +59,18 @@ const props = defineProps({
53
59
  type: String,
54
60
  default: ''
55
61
  },
62
+ subtitle: {
63
+ type: String,
64
+ default: ''
65
+ },
66
+ titleUrl: {
67
+ type: String,
68
+ default: ''
69
+ },
70
+ href: {
71
+ type: String,
72
+ default: ''
73
+ },
56
74
  });
57
75
 
58
76
  const cardIs = (props.to || props.href) ? resolveComponent('NuxtLink') : 'div';
@@ -70,14 +88,22 @@ const iconTitleIs = props.iconLink ? resolveComponent('NuxtLink') : 'b';
70
88
  // Font family
71
89
  @com-font-header: var(--ui-font-header);
72
90
 
91
+ // Font size
92
+ @com-text-default: var(--ui-text-default);
93
+ @com-text-small: var(--ui-text-small);
94
+
73
95
  // Color
74
96
  @com-color-header-text: var(--ui-color-header-text);
97
+ @com-color-gray-text: var(--ui-color-gray-text);
75
98
  @com-color-surface: var(--ui-color-surface);
76
99
  @com-color-text: var(--ui-color-text);
77
100
  @com-color-primary: var(--ui-color-primary);
78
101
 
79
102
  // Padding
103
+ @com-space-big: var(--ui-space-big);
104
+ @com-space-medium: var(--ui-space-medium);
80
105
  @com-space-default: var(--ui-space-default);
106
+ @com-space-small: var(--ui-space-small);
81
107
  @com-space-micro: var(--ui-space-micro);
82
108
  @com-space-mini: var(--ui-space-mini);
83
109
 
@@ -91,6 +117,7 @@ const iconTitleIs = props.iconLink ? resolveComponent('NuxtLink') : 'b';
91
117
  border-radius: @com-border-radius-default;
92
118
 
93
119
  .ui-card-image {
120
+ padding: @com-space-big @com-space-big @com-space-mini @com-space-big;
94
121
  overflow: hidden;
95
122
  border-top-left-radius: @com-border-radius-default;
96
123
  border-top-right-radius: @com-border-radius-default;
@@ -123,6 +150,8 @@ const iconTitleIs = props.iconLink ? resolveComponent('NuxtLink') : 'b';
123
150
  display: block;
124
151
  padding: var(--ui-card-padding) var(--ui-card-padding) @com-space-micro var(--ui-card-padding);
125
152
  font-family: @com-font-header;
153
+ font-size: @com-text-default;
154
+ color: @com-color-header-text;
126
155
 
127
156
  strong {
128
157
  position: relative;
@@ -141,6 +170,11 @@ const iconTitleIs = props.iconLink ? resolveComponent('NuxtLink') : 'b';
141
170
  background: @com-color-primary;
142
171
  }
143
172
  }
173
+
174
+ .ui-card-subtitle {
175
+ font-size: @com-text-small;
176
+ color: @com-color-gray-text;
177
+ }
144
178
  }
145
179
 
146
180
  .ui-card-content {
@@ -0,0 +1,50 @@
1
+ <template>
2
+ <label class="component-ui-label" :class="`tag-size-${size}`">
3
+ <span class="component-ui-label--text">{{ text }}</span>
4
+ <slot></slot>
5
+ </label>
6
+ </template>
7
+
8
+ <script setup>
9
+ // Import
10
+ import comProps from '#build/ui.label.mjs';
11
+
12
+ // Date
13
+ const props = defineProps({
14
+ text: {
15
+ default: '',
16
+ },
17
+ size: {
18
+ type: String,
19
+ default: comProps.size,
20
+ }
21
+ });
22
+ </script>
23
+
24
+ <style lang="less">
25
+ @com-space-micro: var(--ui-space-micro);
26
+ @com-color-header-text: var(--ui-color-header-text);
27
+ @com-font-weight-medium: var(--ui-font-weight-medium);
28
+
29
+ @com-text-big: var(--ui-text-big);
30
+ @com-text-medium: var(--ui-text-medium);
31
+ @com-text-default: var(--ui-text-default);
32
+ @com-text-small: var(--ui-text-small);
33
+
34
+ .component-ui-label {
35
+ display: block;
36
+
37
+ .component-ui-label--text {
38
+ display: block;
39
+ padding-bottom: @com-space-micro;
40
+ font-weight: @com-font-weight-medium;
41
+ font-size: @com-text-medium;
42
+ color: @com-color-header-text;
43
+ }
44
+
45
+ // Text size
46
+ &.tag-size-big .component-ui-label--text { font-size: @com-text-big; }
47
+ &.tag-size-medium .component-ui-label--text { font-size: @com-text-medium; }
48
+ &.tag-size-small .component-ui-label--text { font-size: @com-text-small; }
49
+ }
50
+ </style>
@@ -0,0 +1,3 @@
1
+ {
2
+ "size": ""
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@community-release/nx-ui",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "nx-ui - Nuxt UI library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,33 +0,0 @@
1
- <template>
2
- <label class="component-ui-label">
3
- <span class="component-ui-label--text">{{ text }}</span>
4
- <slot></slot>
5
- </label>
6
- </template>
7
-
8
- <script setup>
9
- const props = defineProps({
10
- text: {
11
- default: ''
12
- }
13
- });
14
- </script>
15
-
16
- <style lang="less">
17
- @com-space-micro: var(--ui-space-micro);
18
- @com-font-weight-medium: var(--ui-font-weight-medium);
19
- @com-text-medium: var(--ui-text-medium);
20
- @com-color-header-text: var(--ui-color-header-text);
21
-
22
- .component-ui-label {
23
- display: block;
24
-
25
- .component-ui-label--text {
26
- display: block;
27
- padding-bottom: @com-space-micro;
28
- font-weight: @com-font-weight-medium;
29
- font-size: @com-text-medium;
30
- color: @com-color-header-text;
31
- }
32
- }
33
- </style>