@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.
@@ -1,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
- import { Preferences } from '@capacitor/preferences'
3
2
  import type { BaseAlert } from '../../types/bases'
3
+ import { Preferences } from '@capacitor/preferences'
4
4
 
5
5
  const props = withDefaults(defineProps<BaseAlert>(), {
6
6
  closingId: '',
@@ -1,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
- import { NuxtLinkLocale } from '#components'
3
2
  import type { BaseAvatar } from '../../types/bases'
3
+ import { NuxtLinkLocale } from '#components'
4
4
 
5
5
  const props = withDefaults(defineProps<BaseAvatar>(), {
6
6
  bordered: true,
@@ -1,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
- import { NuxtLinkLocale } from '#components'
3
2
  import type { BaseButton } from '../../types/bases'
3
+ import { NuxtLinkLocale } from '#components'
4
4
 
5
5
  const props = withDefaults(defineProps<BaseButton>(), {
6
6
  background: true,
@@ -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: () => ({
@@ -39,7 +39,7 @@ export default {
39
39
 
40
40
  export const Default: StoryObj<typeof BaseHeading> = {
41
41
  args: { tag: 'h1' } satisfies Partial<BaseHeading>,
42
- render: (args) => ({
42
+ render: args => ({
43
43
  components: { BaseHeading },
44
44
  setup() {
45
45
  return { args }
@@ -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
  })
@@ -24,7 +24,7 @@ const performanceIcon = computed<string | undefined>(() => {
24
24
  return getIcon('arrowUp')
25
25
  }
26
26
  default: {
27
- return
27
+ return undefined
28
28
  }
29
29
  }
30
30
  })
@@ -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>(), {
@@ -26,7 +26,7 @@ export default {
26
26
 
27
27
  export const Default: StoryObj<typeof BaseParagraph> = {
28
28
  args: {},
29
- render: (args) => ({
29
+ render: args => ({
30
30
  components: { BaseParagraph },
31
31
  setup() {
32
32
  return { args }
@@ -53,7 +53,7 @@ export default {
53
53
 
54
54
  export const Default: StoryObj<typeof BaseQuote> = {
55
55
  args: {},
56
- render: (args) => ({
56
+ render: args => ({
57
57
  components: { BaseQuote },
58
58
  setup() {
59
59
  return { args }
@@ -1,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
- import { NuxtLinkLocale } from '#components'
3
2
  import type { BaseTag } from '../../types/bases'
3
+ import { NuxtLinkLocale } from '#components'
4
4
 
5
5
  const props = withDefaults(defineProps<BaseTag>(), {
6
6
  active: false,
@@ -53,7 +53,7 @@ const sortedTags = computed({
53
53
  id: tag.id,
54
54
  order,
55
55
  }))
56
- .map((tag) => ({
56
+ .map(tag => ({
57
57
  id: tag.id,
58
58
  order: tag.order,
59
59
  }))
@@ -1,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
- import { NuxtLinkLocale } from '#components'
3
2
  import type { BaseText } from '../../types/bases'
3
+ import { NuxtLinkLocale } from '#components'
4
4
 
5
5
  const props = withDefaults(defineProps<BaseText>(), {
6
6
  alignment: undefined,
@@ -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((keyword) => normalizeText(keyword).includes(searchQueryCleaned))
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((category) => category.emojis.length > 0)
42
+ .filter(category => category.emojis.length > 0)
43
43
  })
44
44
 
45
45
  function onEmojiClick(event: MouseEvent, emoji?: string) {
@@ -78,6 +78,8 @@ const validationMessage = computed(() => {
78
78
  }
79
79
  }
80
80
  }
81
+
82
+ return ''
81
83
  })
82
84
 
83
85
  const status = computed(() => {
@@ -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
- // eslint-disable-next-line id-length -- SVG path attribute
66
+
68
67
  d: {
69
68
  begin,
70
69
  dur: duration,
@@ -1,4 +1,3 @@
1
- /* eslint-disable n/no-unsupported-features/node-builtins */
2
1
  export default function useDevice() {
3
2
  const isDesktopBrowser = computed(() => {
4
3
  if (typeof navigator === 'undefined') {
@@ -1,13 +1,13 @@
1
1
  import numbroLib from 'numbro'
2
2
 
3
- const normalizeText = (text: string) => {
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
- const numbro = (number: '∞' | number | undefined, format?: string) => {
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
- "version": "0.1.116",
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.16"
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 */