@saasmakers/ui 0.1.112 → 0.1.114

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.
@@ -1,29 +1,10 @@
1
1
  <script lang="ts" setup>
2
2
  import type { BasePower } from '../../types/bases'
3
- // import lottie from 'lottie-web'
4
3
 
5
- const props = withDefaults(defineProps<BasePower>(), {
6
- animated: false,
4
+ withDefaults(defineProps<BasePower>(), {
7
5
  power: 'welcome',
8
6
  size: 'base',
9
7
  })
10
-
11
- const animationLoaded = ref(false)
12
- const animationPlaceholder = ref<HTMLElement>()
13
-
14
- onMounted(() => {
15
- if (props.animated && ['radar'].includes(props.power) && animationPlaceholder.value) {
16
- // lottie.loadAnimation({
17
- // autoplay: true,
18
- // container: animationPlaceholder.value,
19
- // loop: true,
20
- // path: `/animations/bases/BasePower/power-${props.power}.json`,
21
- // renderer: 'svg',
22
- // })
23
-
24
- // setTimeout(() => (animationLoaded.value = true), 1 * 1000)
25
- }
26
- })
27
8
  </script>
28
9
 
29
10
  <template>
@@ -37,17 +18,10 @@ onMounted(() => {
37
18
  }"
38
19
  >
39
20
  <img
40
- v-show="!animationLoaded"
41
21
  :alt="power"
42
22
  class="h-full w-full"
43
23
  loading="lazy"
44
24
  :src="`/images/bases/BasePower/power-${power}.svg`"
45
25
  >
46
-
47
- <div
48
- v-show="animationLoaded"
49
- ref="animationPlaceholder"
50
- class="h-full w-full"
51
- />
52
26
  </div>
53
27
  </template>
@@ -37,7 +37,6 @@ export default {
37
37
  '4xl',
38
38
  ] satisfies BaseSize[],
39
39
  },
40
- skeleton: { control: 'boolean' },
41
40
  text: { control: 'text' },
42
41
  truncate: { control: 'boolean' },
43
42
  underline: { control: 'boolean' },
@@ -12,7 +12,6 @@ const props = withDefaults(defineProps<BaseText>(), {
12
12
  noWrap: false,
13
13
  reverse: false,
14
14
  size: 'base',
15
- skeleton: false,
16
15
  text: '',
17
16
  to: undefined,
18
17
  truncate: false,
@@ -116,46 +115,27 @@ function onShowMore() {
116
115
  :to="to"
117
116
  @click="onClick"
118
117
  >
119
- <template v-if="!skeleton">
120
- <span v-if="maxCharacters || typeof text === 'string'">
121
- {{ finalText }}
118
+ <span v-if="maxCharacters || typeof text === 'string'">
119
+ {{ finalText }}
120
+ </span>
121
+
122
+ <template v-else-if="typeof text === 'object'">
123
+ <span class="sm:hidden">
124
+ {{ text.sm }}
122
125
  </span>
123
126
 
124
- <template v-else-if="typeof text === 'object'">
125
- <span class="sm:hidden">
126
- {{ text.sm }}
127
- </span>
128
-
129
- <span class="hidden sm:inline">
130
- {{ text.base }}
131
- </span>
132
- </template>
133
-
134
- <BaseText
135
- v-if="maxCharacters && typeof text === 'string' && finalText?.length !== text.length"
136
- class="inline cursor-pointer text-indigo-700 dark:text-indigo-300"
137
- has-margin
138
- :size="size"
139
- :text="t('showMore')"
140
- @click="onShowMore"
141
- />
127
+ <span class="hidden sm:inline">
128
+ {{ text.base }}
129
+ </span>
142
130
  </template>
143
131
 
144
- <span
145
- v-else
146
- class="block w-full rounded bg-gray-300 dark:bg-gray-700"
147
- :class="{
148
- 'h-2': size === '3xs',
149
- 'h-2.5': size === '2xs',
150
- 'h-3': size === 'xs',
151
- 'h-3.5': size === 'sm',
152
- 'h-4': size === 'base',
153
- 'h-4.5': size === 'lg',
154
- 'h-5': size === 'xl',
155
- 'h-6': size === '2xl',
156
- 'h-7': size === '3xl',
157
- 'h-8': size === '4xl',
158
- }"
132
+ <BaseText
133
+ v-if="maxCharacters && typeof text === 'string' && finalText?.length !== text.length"
134
+ class="inline cursor-pointer text-indigo-700 dark:text-indigo-300"
135
+ has-margin
136
+ :size="size"
137
+ :text="t('showMore')"
138
+ @click="onShowMore"
159
139
  />
160
140
 
161
141
  <slot />
@@ -224,7 +224,6 @@ export interface BaseParagraph {
224
224
  export type BaseParagraphSize = 'base' | 'lg' | 'sm'
225
225
 
226
226
  export interface BasePower {
227
- animated?: boolean
228
227
  power?: BasePowerPower
229
228
  size?: BasePowerSize
230
229
  }
@@ -346,7 +345,6 @@ export interface BaseText {
346
345
  noWrap?: boolean
347
346
  reverse?: boolean
348
347
  size?: BaseSize
349
- skeleton?: boolean
350
348
  text?: BaseTextText
351
349
  to?: RouteLocationNamedI18n
352
350
  truncate?: boolean
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasmakers/ui",
3
- "version": "0.1.112",
3
+ "version": "0.1.114",
4
4
  "private": false,
5
5
  "description": "Reusable Nuxt UI components for SaaS Makers projects",
6
6
  "repository": {
@@ -43,7 +43,6 @@
43
43
  "@vueuse/nuxt": "14.1.0",
44
44
  "chartist": "1.5.0",
45
45
  "floating-vue": "5.2.2",
46
- "lottie-web": "5.13.0",
47
46
  "motion-v": "1.7.4",
48
47
  "numbro": "2.5.0",
49
48
  "snarkdown": "2.0.0",