@saasmakers/ui 0.1.116 → 0.1.117
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/app/components/bases/BaseAlert.vue +1 -1
- package/app/components/bases/BaseAvatar.vue +1 -1
- package/app/components/bases/BaseButton.vue +1 -1
- package/app/components/bases/BaseChart.vue +1 -1
- package/app/components/bases/BaseHeading.stories.ts +1 -1
- package/app/components/bases/BaseIcon.vue +3 -3
- package/app/components/bases/BaseMetric.vue +1 -1
- package/app/components/bases/BaseOverlay.vue +1 -1
- package/app/components/bases/BaseParagraph.stories.ts +1 -1
- package/app/components/bases/BaseQuote.stories.ts +1 -1
- package/app/components/bases/BaseTag.vue +1 -1
- package/app/components/bases/BaseTags.vue +1 -1
- package/app/components/bases/BaseText.vue +1 -1
- package/app/components/fields/FieldEmojis.vue +3 -3
- package/app/components/fields/FieldMessage.vue +2 -0
- package/app/components/fields/FieldSelect.vue +9 -9
- package/app/components/fields/FieldTabs.vue +1 -1
- package/app/composables/useChartist.ts +1 -2
- package/app/composables/useDevice.ts +0 -1
- package/app/composables/useLayerUtils.ts +2 -2
- package/app/composables/useToasts.ts +0 -1
- package/package.json +9 -9
- package/uno.config.ts +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { BarChart, LineChart, PieChart } from 'chartist'
|
|
3
2
|
import type { BaseChart } from '../../types/bases'
|
|
3
|
+
import { BarChart, LineChart, PieChart } from 'chartist'
|
|
4
4
|
|
|
5
5
|
const properties = withDefaults(defineProps<BaseChart>(), {
|
|
6
6
|
data: () => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { NuxtLinkLocale } from '#components'
|
|
3
2
|
import type { BaseIcon } from '../../types/bases'
|
|
3
|
+
import { NuxtLinkLocale } from '#components'
|
|
4
4
|
|
|
5
5
|
const props = withDefaults(defineProps<BaseIcon>(), {
|
|
6
6
|
bold: false,
|
|
@@ -48,7 +48,7 @@ const statusIcon = computed<string | undefined>(() => {
|
|
|
48
48
|
return getIcon('exclamationCircle')
|
|
49
49
|
}
|
|
50
50
|
default: {
|
|
51
|
-
return
|
|
51
|
+
return undefined
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
})
|
|
@@ -68,7 +68,7 @@ const statusColor = computed<BaseColor | undefined>(() => {
|
|
|
68
68
|
return 'orange'
|
|
69
69
|
}
|
|
70
70
|
default: {
|
|
71
|
-
return
|
|
71
|
+
return undefined
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
import type { BaseOverlay } from '../../types/bases'
|
|
2
3
|
import { onKeyStroke } from '@vueuse/core'
|
|
3
4
|
import { Motion } from 'motion-v'
|
|
4
|
-
import type { BaseOverlay } from '../../types/bases'
|
|
5
5
|
import useMotion from '../../composables/useMotion'
|
|
6
6
|
|
|
7
7
|
const props = withDefaults(defineProps<BaseOverlay>(), {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
import type { FieldEmojis } from '../../types/fields'
|
|
2
3
|
import { emojis } from '@saasmakers/shared'
|
|
3
4
|
import { refDebounced } from '@vueuse/core'
|
|
4
|
-
import type { FieldEmojis } from '../../types/fields'
|
|
5
5
|
|
|
6
6
|
const props = withDefaults(defineProps<Omit<FieldEmojis, 'modelValue'>>(), { disabled: false })
|
|
7
7
|
|
|
@@ -31,7 +31,7 @@ const emojisFiltered = computed(() => {
|
|
|
31
31
|
const englishKeywords = (emoji.keywords.en ?? [])
|
|
32
32
|
const allKeywords = [...localizedKeywords, ...englishKeywords]
|
|
33
33
|
|
|
34
|
-
return allKeywords.some(
|
|
34
|
+
return allKeywords.some(keyword => normalizeText(keyword).includes(searchQueryCleaned))
|
|
35
35
|
})
|
|
36
36
|
|
|
37
37
|
return {
|
|
@@ -39,7 +39,7 @@ const emojisFiltered = computed(() => {
|
|
|
39
39
|
emojis: filtered,
|
|
40
40
|
}
|
|
41
41
|
})
|
|
42
|
-
.filter(
|
|
42
|
+
.filter(category => category.emojis.length > 0)
|
|
43
43
|
})
|
|
44
44
|
|
|
45
45
|
function onEmojiClick(event: MouseEvent, emoji?: string) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { vOnClickOutside } from '@vueuse/components'
|
|
3
2
|
import type { FieldSelect, FieldSelectOption } from '../../types/fields'
|
|
3
|
+
import { vOnClickOutside } from '@vueuse/components'
|
|
4
4
|
|
|
5
5
|
const props = withDefaults(defineProps<Omit<FieldSelect, 'modelValue'>>(), {
|
|
6
6
|
border: 'full',
|
|
@@ -36,14 +36,6 @@ const modelValue = defineModel<FieldSelect['modelValue']>({ default: '' })
|
|
|
36
36
|
|
|
37
37
|
const opened = ref(false)
|
|
38
38
|
|
|
39
|
-
const computedColumns = computed(() => {
|
|
40
|
-
if (props.columns.length > 0) {
|
|
41
|
-
return props.columns
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return [{ options: computedOptions.value }]
|
|
45
|
-
})
|
|
46
|
-
|
|
47
39
|
const computedOptions = computed(() => {
|
|
48
40
|
const options: FieldSelectOption[] = []
|
|
49
41
|
|
|
@@ -64,6 +56,14 @@ const computedOptions = computed(() => {
|
|
|
64
56
|
return options
|
|
65
57
|
})
|
|
66
58
|
|
|
59
|
+
const computedColumns = computed(() => {
|
|
60
|
+
if (props.columns.length > 0) {
|
|
61
|
+
return props.columns
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return [{ options: computedOptions.value }]
|
|
65
|
+
})
|
|
66
|
+
|
|
67
67
|
const selectedOption = computed(() => {
|
|
68
68
|
return computedOptions.value.find((option) => {
|
|
69
69
|
return option.value === modelValue.value
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { NuxtLinkLocale } from '#components'
|
|
3
2
|
import type { FieldTabs, FieldTabsAction } from '../../types/fields'
|
|
3
|
+
import { NuxtLinkLocale } from '#components'
|
|
4
4
|
|
|
5
5
|
withDefaults(defineProps<Omit<FieldTabs, 'modelValue'>>(), {
|
|
6
6
|
disabled: false,
|
|
@@ -50,7 +50,6 @@ export default function useChartist() {
|
|
|
50
50
|
// Clean up the dash attributes after it finishes
|
|
51
51
|
const total = delay + duration + (stagger ? stagger * (lineCtx.seriesIndex ?? 0) : 0)
|
|
52
52
|
|
|
53
|
-
// eslint-disable-next-line sonarjs/no-nested-functions
|
|
54
53
|
globalThis.setTimeout(() => {
|
|
55
54
|
lineCtx.element.attr({
|
|
56
55
|
'stroke-dasharray': undefined,
|
|
@@ -64,7 +63,7 @@ export default function useChartist() {
|
|
|
64
63
|
const areaCtx = ctx as AreaDrawEvent
|
|
65
64
|
|
|
66
65
|
areaCtx.element.animate({
|
|
67
|
-
|
|
66
|
+
|
|
68
67
|
d: {
|
|
69
68
|
begin,
|
|
70
69
|
dur: duration,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import numbroLib from 'numbro'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
function normalizeText(text: string) {
|
|
4
4
|
return text
|
|
5
5
|
.toLowerCase()
|
|
6
6
|
.normalize('NFD')
|
|
7
7
|
.replaceAll(/[\u0300-\u036F]/g, '')
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
function numbro(number: '∞' | number | undefined, format?: string) {
|
|
11
11
|
if (!number && number !== 0) {
|
|
12
12
|
return ''
|
|
13
13
|
}
|
|
@@ -20,7 +20,6 @@ export default function useToast() {
|
|
|
20
20
|
const createToast = (message: string, status: BaseStatus = 'success', i18nParams?: Record<string, number | string>) => {
|
|
21
21
|
if (import.meta.client) {
|
|
22
22
|
const toast: BaseToast = {
|
|
23
|
-
// eslint-disable-next-line n/no-unsupported-features/node-builtins
|
|
24
23
|
id: crypto.randomUUID(),
|
|
25
24
|
status: status || 'success',
|
|
26
25
|
text: message.includes(' ') ? message : nuxtApp.$i18n.t(`toasts.${message}`, i18nParams || {}),
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasmakers/ui",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.1.117",
|
|
4
5
|
"private": false,
|
|
5
6
|
"description": "Reusable Nuxt UI components for SaaS Makers projects",
|
|
7
|
+
"author": "SaaS Makers",
|
|
8
|
+
"license": "MIT",
|
|
6
9
|
"repository": {
|
|
7
10
|
"type": "git",
|
|
8
11
|
"url": "git+https://github.com/saasmakers/saasmakers-turborepo.git",
|
|
9
12
|
"directory": "packages/ui"
|
|
10
13
|
},
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"author": "SaaS Makers",
|
|
13
14
|
"sideEffects": false,
|
|
14
|
-
"type": "module",
|
|
15
15
|
"exports": {
|
|
16
16
|
".": "./nuxt.config.ts"
|
|
17
17
|
},
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
"public",
|
|
23
23
|
"uno.config.ts"
|
|
24
24
|
],
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"@saasmakers/shared": "^0.1.17",
|
|
27
|
+
"nuxt": "4.2.2"
|
|
28
|
+
},
|
|
25
29
|
"dependencies": {
|
|
26
30
|
"@capacitor/preferences": "8.0.0",
|
|
27
31
|
"@nuxt/icon": "2.1.1",
|
|
@@ -54,11 +58,7 @@
|
|
|
54
58
|
"devDependencies": {
|
|
55
59
|
"nuxt": "4.2.2",
|
|
56
60
|
"typescript": "5.9.3",
|
|
57
|
-
"@saasmakers/shared": "0.1.
|
|
58
|
-
},
|
|
59
|
-
"peerDependencies": {
|
|
60
|
-
"@saasmakers/shared": "^0.1.16",
|
|
61
|
-
"nuxt": "4.2.2"
|
|
61
|
+
"@saasmakers/shared": "0.1.17"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
package/uno.config.ts
CHANGED
|
@@ -24,7 +24,6 @@ export const rules: [string, Record<string, string>][] = [
|
|
|
24
24
|
export const shortcuts: Record<string, string> = { 'field-disabled': 'opacity-50 cursor-not-allowed' }
|
|
25
25
|
|
|
26
26
|
export const theme = {
|
|
27
|
-
/* eslint-disable perfectionist/sort-objects */
|
|
28
27
|
container: {
|
|
29
28
|
center: true,
|
|
30
29
|
|
|
@@ -42,7 +41,6 @@ export const theme = {
|
|
|
42
41
|
'xl': '1280px',
|
|
43
42
|
},
|
|
44
43
|
},
|
|
45
|
-
/* eslint-enable perfectionist/sort-objects */
|
|
46
44
|
|
|
47
45
|
colors: {
|
|
48
46
|
black: '#000000',
|
|
@@ -171,7 +169,6 @@ export const theme = {
|
|
|
171
169
|
},
|
|
172
170
|
},
|
|
173
171
|
|
|
174
|
-
/* eslint-disable perfectionist/sort-objects */
|
|
175
172
|
fontSize: {
|
|
176
173
|
'3xs': ['0.5rem', '0.875rem'],
|
|
177
174
|
'2xs': ['0.625rem', '1rem'],
|
|
@@ -184,14 +181,11 @@ export const theme = {
|
|
|
184
181
|
'3xl': ['1.875rem', '2.5rem'],
|
|
185
182
|
'4xl': ['2.25rem', '3rem'],
|
|
186
183
|
},
|
|
187
|
-
/* eslint-enable perfectionist/sort-objects */
|
|
188
184
|
}
|
|
189
185
|
|
|
190
|
-
/* eslint-disable nuxt/nuxt-config-keys-order */
|
|
191
186
|
export default defineConfig({
|
|
192
187
|
presets,
|
|
193
188
|
rules,
|
|
194
189
|
shortcuts,
|
|
195
190
|
theme,
|
|
196
191
|
})
|
|
197
|
-
/* eslint-enable nuxt/nuxt-config-keys-order */
|