@saasmakers/ui 0.1.19 → 0.1.20
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/app.vue
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
withDefaults(defineProps<BaseDivider>(), {
|
|
3
|
+
borderStyle: 'solid',
|
|
4
|
+
margin: 6,
|
|
5
|
+
size: 'base',
|
|
6
|
+
title: '',
|
|
7
|
+
})
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div
|
|
12
|
+
class="relative block border-t border-gray-300 text-center dark:border-gray-700"
|
|
13
|
+
:class="{
|
|
14
|
+
'border-dashed': borderStyle === 'dashed',
|
|
15
|
+
'border-dotted': borderStyle === 'dotted',
|
|
16
|
+
'border-solid': borderStyle === 'solid',
|
|
17
|
+
|
|
18
|
+
'my-3': margin === 3,
|
|
19
|
+
'my-4': margin === 4,
|
|
20
|
+
'my-5': margin === 5,
|
|
21
|
+
'my-6': margin === 6,
|
|
22
|
+
'my-7': margin === 7,
|
|
23
|
+
'my-8': margin === 8,
|
|
24
|
+
'my-10': margin === 10,
|
|
25
|
+
'my-12': margin === 12,
|
|
26
|
+
'my-16': margin === 16,
|
|
27
|
+
'my-20': margin === 20,
|
|
28
|
+
|
|
29
|
+
'mx-auto max-w-xs': size === 'sm',
|
|
30
|
+
'w-full': size === 'base',
|
|
31
|
+
}"
|
|
32
|
+
style="height: 1px"
|
|
33
|
+
>
|
|
34
|
+
<BaseText
|
|
35
|
+
v-if="title"
|
|
36
|
+
class="absolute inline-block transform whitespace-nowrap bg-gray-100 px-4 text-center -mt-3 -translate-x-1/2 dark:bg-gray-900"
|
|
37
|
+
size="sm"
|
|
38
|
+
:text="title"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
@@ -1,59 +1,20 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import { NuxtLinkLocale } from '#components'
|
|
3
3
|
|
|
4
|
-
const props = defineProps({
|
|
5
|
-
background:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
default: 0,
|
|
19
|
-
type: Number,
|
|
20
|
-
},
|
|
21
|
-
noWrap: {
|
|
22
|
-
default: false,
|
|
23
|
-
type: Boolean,
|
|
24
|
-
},
|
|
25
|
-
reverse: {
|
|
26
|
-
default: false,
|
|
27
|
-
type: Boolean,
|
|
28
|
-
},
|
|
29
|
-
size: {
|
|
30
|
-
default: 'base',
|
|
31
|
-
type: String as PropType<BaseSize>,
|
|
32
|
-
},
|
|
33
|
-
skeleton: {
|
|
34
|
-
default: false,
|
|
35
|
-
type: Boolean,
|
|
36
|
-
},
|
|
37
|
-
text: {
|
|
38
|
-
default: '',
|
|
39
|
-
type: [String, Object] as PropType<BaseTextText>,
|
|
40
|
-
},
|
|
41
|
-
to: {
|
|
42
|
-
default: undefined,
|
|
43
|
-
type: [Object, String] as PropType<RouteLocationRaw | string>,
|
|
44
|
-
},
|
|
45
|
-
truncate: {
|
|
46
|
-
default: false,
|
|
47
|
-
type: Boolean,
|
|
48
|
-
},
|
|
49
|
-
underline: {
|
|
50
|
-
default: false,
|
|
51
|
-
type: Boolean,
|
|
52
|
-
},
|
|
53
|
-
uppercase: {
|
|
54
|
-
default: false,
|
|
55
|
-
type: Boolean,
|
|
56
|
-
},
|
|
4
|
+
const props = withDefaults(defineProps<BaseText>(), {
|
|
5
|
+
background: '',
|
|
6
|
+
bold: false,
|
|
7
|
+
hasMargin: false,
|
|
8
|
+
maxCharacters: 0,
|
|
9
|
+
noWrap: false,
|
|
10
|
+
reverse: false,
|
|
11
|
+
size: 'base',
|
|
12
|
+
skeleton: false,
|
|
13
|
+
text: '',
|
|
14
|
+
to: undefined,
|
|
15
|
+
truncate: false,
|
|
16
|
+
underline: false,
|
|
17
|
+
uppercase: false,
|
|
57
18
|
})
|
|
58
19
|
|
|
59
20
|
const emit = defineEmits<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare global {
|
|
2
|
-
|
|
2
|
+
type BaseColor
|
|
3
3
|
= | 'black'
|
|
4
4
|
| 'gray'
|
|
5
5
|
| 'green'
|
|
@@ -8,7 +8,7 @@ declare global {
|
|
|
8
8
|
| 'red'
|
|
9
9
|
| 'white'
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
type BaseSize
|
|
12
12
|
= | '2xl'
|
|
13
13
|
| '2xs'
|
|
14
14
|
| '3xl'
|
|
@@ -20,12 +20,23 @@ declare global {
|
|
|
20
20
|
| 'xl'
|
|
21
21
|
| 'xs'
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
type BaseStatus
|
|
24
24
|
= | 'error'
|
|
25
25
|
| 'info'
|
|
26
26
|
| 'success'
|
|
27
27
|
| 'warning'
|
|
28
28
|
|
|
29
|
+
interface BaseDivider {
|
|
30
|
+
borderStyle?: BaseDividerBorderStyle
|
|
31
|
+
margin?: number
|
|
32
|
+
size?: BaseDividerSize
|
|
33
|
+
title?: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
type BaseDividerBorderStyle = 'dashed' | 'dotted' | 'solid'
|
|
37
|
+
|
|
38
|
+
type BaseDividerSize = 'base' | 'sm'
|
|
39
|
+
|
|
29
40
|
interface BaseText {
|
|
30
41
|
background?: BaseTextBackground
|
|
31
42
|
bold?: boolean
|
|
@@ -42,7 +53,7 @@ declare global {
|
|
|
42
53
|
uppercase?: boolean
|
|
43
54
|
}
|
|
44
55
|
|
|
45
|
-
type BaseTextBackground = 'gray' | 'white'
|
|
56
|
+
type BaseTextBackground = '' | 'gray' | 'white'
|
|
46
57
|
|
|
47
58
|
type BaseTextText = string | { base: string, sm: string }
|
|
48
59
|
}
|
package/nuxt.config.ts
CHANGED
|
@@ -11,15 +11,6 @@ export default defineNuxtConfig({
|
|
|
11
11
|
|
|
12
12
|
experimental: { typedPages: true },
|
|
13
13
|
|
|
14
|
-
typescript: {
|
|
15
|
-
tsConfig: {
|
|
16
|
-
compilerOptions: {
|
|
17
|
-
noUncheckedIndexedAccess: false,
|
|
18
|
-
types: ['@saasmakers/ui'],
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
|
|
23
14
|
// --> COMPONENTS, CSS, MODULES & PLUGINS <--
|
|
24
15
|
|
|
25
16
|
components: [
|
|
@@ -59,6 +50,7 @@ export default defineNuxtConfig({
|
|
|
59
50
|
|
|
60
51
|
i18n: {
|
|
61
52
|
defaultLocale: 'en',
|
|
53
|
+
locales: ['en', 'fr'],
|
|
62
54
|
strategy: 'prefix_except_default',
|
|
63
55
|
|
|
64
56
|
detectBrowserLanguage: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasmakers/ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.20",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Reusable Nuxt UI components for SaaS Makers projects",
|
|
7
7
|
"license": "MIT",
|
|
@@ -11,19 +11,18 @@
|
|
|
11
11
|
"directory": "packages/ui"
|
|
12
12
|
},
|
|
13
13
|
"main": "nuxt.config.ts",
|
|
14
|
-
"types": "types/index.d.ts",
|
|
14
|
+
"types": "app/types/index.d.ts",
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"app",
|
|
20
|
-
"nuxt.config.ts"
|
|
21
|
-
"types"
|
|
20
|
+
"nuxt.config.ts"
|
|
22
21
|
],
|
|
23
22
|
"scripts": {
|
|
24
|
-
"dev": "nuxi dev
|
|
25
|
-
"dev:prepare": "nuxi prepare .playground",
|
|
23
|
+
"dev": "nuxi dev",
|
|
26
24
|
"lint": "eslint .",
|
|
25
|
+
"prepare": "nuxi prepare",
|
|
27
26
|
"typecheck": "nuxi typecheck"
|
|
28
27
|
},
|
|
29
28
|
"peerDependencies": {
|
|
File without changes
|