nuxt-unified-ui 0.1.5 → 0.2.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.
@@ -0,0 +1,89 @@
1
+ <script setup>
2
+
3
+ /* interface */
4
+
5
+ const props = defineProps({
6
+
7
+ icon: String,
8
+ title: String,
9
+ subtitle: String,
10
+ text: String,
11
+ iconClasses: String,
12
+ titleClasses: String,
13
+ subtitleClasses: String,
14
+ textClasses: String,
15
+
16
+ fluidBody: Boolean,
17
+
18
+ actions: Array,
19
+ verticalActions: Boolean,
20
+
21
+ });
22
+
23
+ </script>
24
+
25
+
26
+ <template>
27
+ <u-card :ui="{ body: 'p-0' }">
28
+
29
+ <un-typography
30
+ :icon="props.icon"
31
+ :title="props.title"
32
+ :subtitle="props.subtitle"
33
+ :icon-classes="props.iconClasses"
34
+ :title-classes="props.titleClasses"
35
+ :subtitle-classes="props.subtitleClasses"
36
+ class="p-3 border-b border-default">
37
+ <template v-if="$slots.append" #append>
38
+ <slot name="append" />
39
+ </template>
40
+ </un-typography>
41
+
42
+ <div
43
+ v-if="$slots.default || props.text"
44
+ :class="{
45
+ 'p-3': !props.fluidBody,
46
+ }">
47
+
48
+ <p
49
+ v-if="props.text"
50
+ :class="[
51
+ {
52
+ 'mb-3': !!$slots.default,
53
+ },
54
+ props.textClasses,
55
+ ]">
56
+ {{ props.text }}
57
+ </p>
58
+
59
+ <slot />
60
+
61
+ </div>
62
+
63
+ <div
64
+ v-if="props.actions?.length"
65
+ class="flex items-end gap-1 p-2 border-t border-default"
66
+ :class="{
67
+ 'flex-col': props.verticalActions,
68
+ }">
69
+
70
+ <template v-for="(action, index) of props.actions" :key="index">
71
+
72
+ <template v-if="!action.actionType || action.actionType === 'button'">
73
+ <u-button
74
+ loading-auto
75
+ :block="props.verticalActions"
76
+ v-bind="radOmit(action, [ 'actionType' ])"
77
+ />
78
+ </template>
79
+
80
+ <template v-if="action.actionType === 'spacer'">
81
+ <div class="grow" />
82
+ </template>
83
+
84
+ </template>
85
+
86
+ </div>
87
+
88
+ </u-card>
89
+ </template>
@@ -61,7 +61,7 @@ const shouldShow = computed(() => {
61
61
  </h1>
62
62
  </div>
63
63
  <template v-if="$slots.append">
64
- <div class="mt-1 ms-auto">
64
+ <div class="ms-auto flex items-start gap-2">
65
65
  <slot name="append" />
66
66
  </div>
67
67
  </template>
@@ -89,5 +89,5 @@ const shouldShow = computed(() => {
89
89
  {{ props.text }}
90
90
  </p>
91
91
 
92
- </div>
92
+ </div>
93
93
  </template>
@@ -1,21 +1,21 @@
1
1
  import { defineNuxtModule, addImports } from '@nuxt/kit';
2
- import * as radash from 'radash';
2
+ import * as radashi from 'radashi';
3
3
 
4
4
 
5
5
  export default defineNuxtModule({
6
6
  meta: {
7
- name: 'nuxt-radash',
7
+ name: 'nuxt-radashi',
8
8
  },
9
9
  setup() {
10
- for (const name of Object.keys(radash)) {
10
+ for (const name of Object.keys(radashi)) {
11
11
 
12
12
  const prefix = 'rad';
13
- const as = `${prefix}${radash.pascal(name)}`;
13
+ const as = `${prefix}${radashi.pascal(name)}`;
14
14
 
15
15
  addImports({
16
16
  name,
17
17
  as,
18
- from: 'radash',
18
+ from: 'radashi',
19
19
  });
20
20
 
21
21
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-unified-ui",
3
3
  "type": "module",
4
- "version": "0.1.5",
4
+ "version": "0.2.0",
5
5
  "main": "./nuxt.config.js",
6
6
  "exports": {
7
7
  ".": "./nuxt.config.js",
@@ -20,7 +20,7 @@
20
20
  "@nuxt/ui": "4.2.1",
21
21
  "@vueuse/core": "14.1.0",
22
22
  "@vueuse/nuxt": "14.1.0",
23
- "radash": "12.1.1",
23
+ "radashi": "12.7.1",
24
24
  "unified-mongo-filter": "0.4.0"
25
25
  },
26
26
  "peerDependencies": {