@saasmakers/ui 0.1.75 → 0.1.76
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 +12 -12
- package/app/components/bases/BaseAvatar.vue +12 -12
- package/app/components/bases/BaseBordered.vue +0 -2
- package/app/components/bases/BaseButton.vue +0 -4
- package/app/components/bases/BaseDivider.vue +0 -2
- package/app/components/bases/BaseEmoji.vue +0 -2
- package/app/components/bases/BaseHeading.vue +0 -2
- package/app/components/bases/BaseIcon.vue +10 -10
- package/app/components/bases/BaseOverlay.vue +0 -2
- package/app/components/bases/BaseParagraph.vue +0 -1
- package/app/components/bases/BaseQuote.vue +10 -13
- package/app/components/bases/BaseSpinner.vue +0 -1
- package/app/components/bases/BaseTag.vue +0 -2
- package/app/components/bases/BaseTags.vue +18 -19
- package/app/components/bases/BaseText.vue +0 -3
- package/app/components/fields/FieldCheckbox.vue +0 -1
- package/app/components/fields/FieldDays.vue +15 -15
- package/app/components/fields/FieldInput.vue +0 -4
- package/app/components/fields/FieldLabel.vue +0 -1
- package/app/components/fields/FieldMessage.vue +1 -2
- package/app/components/fields/FieldSelect.vue +4 -15
- package/app/components/fields/FieldTabs.vue +0 -3
- package/app/components/fields/FieldTextarea.vue +0 -3
- package/app/types/bases.d.ts +43 -11
- package/app/types/fields.d.ts +20 -2
- package/package.json +3 -3
|
@@ -99,16 +99,16 @@ async function onClose(event: MouseEvent) {
|
|
|
99
99
|
</div>
|
|
100
100
|
</template>
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
102
|
+
<i18n lang="json">
|
|
103
|
+
{
|
|
104
|
+
"en": {
|
|
105
|
+
"closeThisMessage": "Close this message"
|
|
106
|
+
},
|
|
107
|
+
"fr": {
|
|
108
|
+
"closeThisMessage": "Fermer ce message"
|
|
109
|
+
},
|
|
110
|
+
"ja": {
|
|
111
|
+
"closeThisMessage": "このメッセージを閉じる"
|
|
113
112
|
}
|
|
114
|
-
|
|
113
|
+
}
|
|
114
|
+
</i18n>
|
|
@@ -127,16 +127,16 @@ function onLoad() {
|
|
|
127
127
|
</component>
|
|
128
128
|
</template>
|
|
129
129
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
130
|
+
<i18n lang="json">
|
|
131
|
+
{
|
|
132
|
+
"en": {
|
|
133
|
+
"edit": "Edit"
|
|
134
|
+
},
|
|
135
|
+
"fr": {
|
|
136
|
+
"edit": "Modifier"
|
|
137
|
+
},
|
|
138
|
+
"ja": {
|
|
139
|
+
"edit": "編集"
|
|
141
140
|
}
|
|
142
|
-
|
|
141
|
+
}
|
|
142
|
+
</i18n>
|
|
@@ -20,10 +20,8 @@ defineSlots<{
|
|
|
20
20
|
:class="{
|
|
21
21
|
'rounded-xl border pt-0 sm:pt-0': hasBorder,
|
|
22
22
|
'shadow-sm': shadow,
|
|
23
|
-
|
|
24
23
|
'bg-gray-100 dark:bg-gray-900': background === 'gray',
|
|
25
24
|
'bg-white dark:bg-gray-900': background === 'white',
|
|
26
|
-
|
|
27
25
|
'border-black dark:border-white': borderColor === 'black',
|
|
28
26
|
'border-gray-200 dark:border-gray-800': borderColor === 'gray',
|
|
29
27
|
}"
|
|
@@ -66,21 +66,18 @@ function onClick(event: MouseEvent) {
|
|
|
66
66
|
'w-full': fullWidth,
|
|
67
67
|
'bg-transparent shadow-none': light,
|
|
68
68
|
'shadow-sm': !light,
|
|
69
|
-
|
|
70
69
|
'rounded-none': rounded === 'none' && !circular,
|
|
71
70
|
'rounded-sm': rounded === 'sm' && !circular,
|
|
72
71
|
'rounded': rounded === 'base' && !circular,
|
|
73
72
|
'rounded-md': rounded === 'md' && !circular,
|
|
74
73
|
'rounded-lg': rounded === 'lg' && !circular,
|
|
75
74
|
'rounded-full': rounded === 'full' || circular,
|
|
76
|
-
|
|
77
75
|
'h-6 w-6': size === '2xs' && circular,
|
|
78
76
|
'h-8 w-8': size === 'xs' && circular && !confirming,
|
|
79
77
|
'h-10 w-10': size === 'sm' && circular && !confirming,
|
|
80
78
|
'h-12 w-12': size === 'base' && circular && !confirming,
|
|
81
79
|
'h-14 w-14': size === 'lg' && circular && !confirming,
|
|
82
80
|
'h-16 w-16': size === 'xl' && circular && !confirming,
|
|
83
|
-
|
|
84
81
|
'border-gray-900 dark:border-gray-100 bg-gray-900 dark:bg-gray-100 text-white dark:text-black': color === 'black' && !light,
|
|
85
82
|
'hover:bg-black dark:hover:bg-white hover:text-white dark:hover:text-black': color === 'black' && !light && !disabled && !loading,
|
|
86
83
|
'border-gray-900 dark:border-gray-100 text-gray-900 dark:text-gray-100': color === 'black' && light,
|
|
@@ -104,7 +101,6 @@ function onClick(event: MouseEvent) {
|
|
|
104
101
|
'border-white dark:border-gray-900 text-white dark:text-black': color === 'white' && light,
|
|
105
102
|
'hover:border-black dark:hover:border-white hover:text-black dark:hover:text-white': color !== 'white' && light && !disabled && !loading,
|
|
106
103
|
'hover:bg-white dark:hover:bg-gray-900 hover:text-gray-800 dark:hover:text-gray-200': color === 'white' && light && !disabled && !loading,
|
|
107
|
-
|
|
108
104
|
'h-6 px-3': size === '2xs' && (!circular || confirming),
|
|
109
105
|
'h-8 px-4': size === 'xs' && (!circular || confirming),
|
|
110
106
|
'h-10 px-5': size === 'sm' && (!circular || confirming),
|
|
@@ -16,7 +16,6 @@ withDefaults(defineProps<BaseDivider>(), {
|
|
|
16
16
|
'border-dashed': borderStyle === 'dashed',
|
|
17
17
|
'border-dotted': borderStyle === 'dotted',
|
|
18
18
|
'border-solid': borderStyle === 'solid',
|
|
19
|
-
|
|
20
19
|
'my-3': margin === 3,
|
|
21
20
|
'my-4': margin === 4,
|
|
22
21
|
'my-5': margin === 5,
|
|
@@ -27,7 +26,6 @@ withDefaults(defineProps<BaseDivider>(), {
|
|
|
27
26
|
'my-12': margin === 12,
|
|
28
27
|
'my-16': margin === 16,
|
|
29
28
|
'my-20': margin === 20,
|
|
30
|
-
|
|
31
29
|
'mx-auto max-w-xs': size === 'sm',
|
|
32
30
|
'w-full': size === 'base',
|
|
33
31
|
}"
|
|
@@ -25,11 +25,9 @@ function onClick(event: MouseEvent) {
|
|
|
25
25
|
:class="{
|
|
26
26
|
'border border-gray-200 dark:border-gray-800 bg-gray-100 dark:bg-gray-900 shadow-inner': hasBox,
|
|
27
27
|
'cursor-pointer hover:border-gray-400 dark:hover:border-gray-600': clickable,
|
|
28
|
-
|
|
29
28
|
'rounded': ['xs'].includes(size) && hasBox,
|
|
30
29
|
'rounded-md': ['sm', 'base'].includes(size) && hasBox,
|
|
31
30
|
'rounded-lg': ['lg', 'xl'].includes(size) && hasBox,
|
|
32
|
-
|
|
33
31
|
'h-2 w-2': size === '3xs' && hasBox,
|
|
34
32
|
'h-4 w-4': size === '2xs' && hasBox,
|
|
35
33
|
'h-5 w-5': size === 'xs' && hasBox,
|
|
@@ -20,10 +20,8 @@ defineSlots<{
|
|
|
20
20
|
'justify-start': alignment === 'left',
|
|
21
21
|
'justify-center text-center': alignment === 'center',
|
|
22
22
|
'justify-end': alignment === 'right',
|
|
23
|
-
|
|
24
23
|
'font-bold': ['xs', 'sm'].includes(size),
|
|
25
24
|
'font-extrabold': ['base', 'lg', 'xl'].includes(size),
|
|
26
|
-
|
|
27
25
|
'text-xl sm:text-2xl': size === 'sm',
|
|
28
26
|
'text-2xl sm:text-3xl': size === 'base',
|
|
29
27
|
'text-2xl sm:text-4xl': size === 'lg',
|
|
@@ -141,15 +141,15 @@ function onClick(event: MouseEvent) {
|
|
|
141
141
|
</template>
|
|
142
142
|
|
|
143
143
|
<i18n lang="json">
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
144
|
+
{
|
|
145
|
+
"en": {
|
|
146
|
+
"confirm": "Confirm"
|
|
147
|
+
},
|
|
148
|
+
"fr": {
|
|
149
|
+
"confirm": "Confirmer"
|
|
150
|
+
},
|
|
151
|
+
"ja": {
|
|
152
|
+
"confirm": "確認"
|
|
154
153
|
}
|
|
154
|
+
}
|
|
155
155
|
</i18n>
|
|
@@ -66,14 +66,12 @@ function onClose(event: MouseEvent) {
|
|
|
66
66
|
class="inset-0 bg-gray-900 dark:bg-gray-100"
|
|
67
67
|
:class="{
|
|
68
68
|
'h-0 w-0': !active,
|
|
69
|
-
|
|
70
69
|
'opacity-0': opacity === 0,
|
|
71
70
|
'opacity-25': opacity === 25,
|
|
72
71
|
'opacity-50': opacity === 50,
|
|
73
72
|
'opacity-75': opacity === 75,
|
|
74
73
|
'opacity-95': opacity === 95,
|
|
75
74
|
'opacity-100': opacity === 100,
|
|
76
|
-
|
|
77
75
|
'absolute': position === 'absolute',
|
|
78
76
|
'fixed': position === 'fixed',
|
|
79
77
|
}"
|
|
@@ -18,7 +18,6 @@ defineSlots<{
|
|
|
18
18
|
'text-center': alignment === 'center',
|
|
19
19
|
'text-left': alignment === 'left',
|
|
20
20
|
'text-right': alignment === 'right',
|
|
21
|
-
|
|
22
21
|
'text-sm sm:text-base': size === 'sm',
|
|
23
22
|
'text-base sm:text-lg': size === 'base',
|
|
24
23
|
'text-lg sm:text-xl': size === 'lg',
|
|
@@ -82,7 +82,6 @@ function onClose(event: MouseEvent) {
|
|
|
82
82
|
class="mt-1 self-start flex-initial"
|
|
83
83
|
:class="{
|
|
84
84
|
'hidden sm:block': hideCharacterOnMobile,
|
|
85
|
-
|
|
86
85
|
'ml-3': finalReverse && size === 'xs',
|
|
87
86
|
'mr-3': !finalReverse && size === 'xs',
|
|
88
87
|
'ml-4': finalReverse && size !== 'xs',
|
|
@@ -99,11 +98,9 @@ function onClose(event: MouseEvent) {
|
|
|
99
98
|
'border bg-gray-100 dark:bg-gray-900 shadow-inner': finalBackground === 'gray-light',
|
|
100
99
|
'border border-gray-400 dark:border-gray-600 bg-gray-200 dark:bg-gray-800 shadow-inner': finalBackground === 'gray',
|
|
101
100
|
'bg-white dark:bg-gray-900 shadow': finalBackground === 'white',
|
|
102
|
-
|
|
103
101
|
'px-4 py-2 text-sm leading-6': size === 'xs',
|
|
104
102
|
'px-4 py-2.5 text-sm leading-6 sm:text-base sm:leading-7': size === 'sm',
|
|
105
103
|
'px-5 py-4 text-base leading-7 sm:text-lg sm:leading-8': size === 'base',
|
|
106
|
-
|
|
107
104
|
'border': status,
|
|
108
105
|
'text-black dark:text-white': !status,
|
|
109
106
|
'border-red-700 dark:border-red-300 text-red-700 dark:text-red-300': status === 'error',
|
|
@@ -158,15 +155,15 @@ function onClose(event: MouseEvent) {
|
|
|
158
155
|
</template>
|
|
159
156
|
|
|
160
157
|
<i18n lang="json">
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
158
|
+
{
|
|
159
|
+
"en": {
|
|
160
|
+
"close": "Close"
|
|
161
|
+
},
|
|
162
|
+
"fr": {
|
|
163
|
+
"close": "Fermer"
|
|
164
|
+
},
|
|
165
|
+
"ja": {
|
|
166
|
+
"close": "閉じる"
|
|
171
167
|
}
|
|
168
|
+
}
|
|
172
169
|
</i18n>
|
|
@@ -52,7 +52,6 @@ function onClick(event: MouseEvent) {
|
|
|
52
52
|
class="base-spinner__wave absolute left-0 top-0 h-full w-full rounded-full opacity-75"
|
|
53
53
|
:class="{
|
|
54
54
|
'base-spinner__wave--delayed': wave === 2,
|
|
55
|
-
|
|
56
55
|
'bg-gray-900 dark:bg-gray-100': color === 'black' || !color,
|
|
57
56
|
'bg-gray-700 dark:bg-gray-300': color === 'gray',
|
|
58
57
|
'bg-green-700 dark:bg-green-300': color === 'green',
|
|
@@ -94,7 +94,6 @@ function onRemove(event: MouseEvent) {
|
|
|
94
94
|
'rounded-md': !rounded,
|
|
95
95
|
'rounded-full': rounded,
|
|
96
96
|
'uppercase': uppercase,
|
|
97
|
-
|
|
98
97
|
'border-gray-200 dark:border-gray-800 bg-gray-200 dark:bg-gray-800 text-gray-800 dark:text-gray-200': (color === 'black' && light && !active) || removable,
|
|
99
98
|
'border-gray-900 dark:border-gray-100 bg-gray-900 dark:bg-gray-100 text-white dark:text-black': color === 'black' && (!light || active),
|
|
100
99
|
'border-gray-700 dark:border-gray-300 bg-gray-100 dark:bg-gray-900 text-gray-700 dark:text-gray-300': color === 'gray' && light && !active,
|
|
@@ -110,7 +109,6 @@ function onRemove(event: MouseEvent) {
|
|
|
110
109
|
'border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-900 text-gray-800 dark:text-gray-200': color === 'white' && light && !active,
|
|
111
110
|
'border-white dark:border-gray-900 text-white dark:text-black': color === 'white' && (!light || active),
|
|
112
111
|
'border-dashed border-gray-400 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-800 dark:text-gray-200': color === 'white' && light && !active,
|
|
113
|
-
|
|
114
112
|
'py-1.5 px-2.5 text-2xs': size === 'sm',
|
|
115
113
|
'py-2 px-3 text-xs': size === 'base',
|
|
116
114
|
}"
|
|
@@ -132,7 +132,6 @@ function onRemoveTag(event: MouseEvent, tagId?: number | string) {
|
|
|
132
132
|
:class="{
|
|
133
133
|
'flex-wrap': wrap,
|
|
134
134
|
'w-full overflow-x-auto': !wrap,
|
|
135
|
-
|
|
136
135
|
'-mt-0.75 -ml-0.75': size === 'sm',
|
|
137
136
|
'-mt-1 -ml-1': size === 'base',
|
|
138
137
|
}"
|
|
@@ -221,22 +220,22 @@ function onRemoveTag(event: MouseEvent, tagId?: number | string) {
|
|
|
221
220
|
</div>
|
|
222
221
|
</template>
|
|
223
222
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}
|
|
223
|
+
<i18n lang="json">
|
|
224
|
+
{
|
|
225
|
+
"en": {
|
|
226
|
+
"cancel": "Cancel",
|
|
227
|
+
"newTag": "New tag",
|
|
228
|
+
"showMore": "& {value} other | & {value} others"
|
|
229
|
+
},
|
|
230
|
+
"fr": {
|
|
231
|
+
"cancel": "Annuler",
|
|
232
|
+
"newTag": "Nouveau tag",
|
|
233
|
+
"showMore": "& {value} autre | & {value} autres"
|
|
234
|
+
},
|
|
235
|
+
"ja": {
|
|
236
|
+
"cancel": "キャンセル",
|
|
237
|
+
"newTag": "新しいタグ",
|
|
238
|
+
"showMore": "& {value} その他 | & {value} その他"
|
|
241
239
|
}
|
|
242
|
-
|
|
240
|
+
}
|
|
241
|
+
</i18n>
|
|
@@ -84,10 +84,8 @@ function onShowMore() {
|
|
|
84
84
|
'uppercase': uppercase,
|
|
85
85
|
'whitespace-nowrap': noWrap,
|
|
86
86
|
'underline': underline,
|
|
87
|
-
|
|
88
87
|
'bg-gray-100 dark:bg-gray-900': background === 'gray',
|
|
89
88
|
'bg-white dark:bg-gray-900': background === 'white',
|
|
90
|
-
|
|
91
89
|
'ml-0.5': ['3xs'].includes(size) && !reverse && hasMargin,
|
|
92
90
|
'ml-1.5': ['2xs', 'xs', 'sm'].includes(size) && !reverse && hasMargin,
|
|
93
91
|
'ml-2': ['base', 'lg'].includes(size) && !reverse && hasMargin,
|
|
@@ -98,7 +96,6 @@ function onShowMore() {
|
|
|
98
96
|
'mr-2': ['base', 'lg'].includes(size) && reverse && hasMargin,
|
|
99
97
|
'mr-2.5': ['xl', '2xl'].includes(size) && reverse && hasMargin,
|
|
100
98
|
'mr-3': ['3xl', '4xl'].includes(size) && reverse && hasMargin,
|
|
101
|
-
|
|
102
99
|
'text-3xs': (size === '3xs') && !uppercase,
|
|
103
100
|
'text-2xs': (size === '2xs') || (size === 'xs' && uppercase),
|
|
104
101
|
'text-xs': (size === 'xs' && !uppercase) || (size === 'sm' && uppercase),
|
|
@@ -36,7 +36,6 @@ const uuid = ref(`${Math.floor((1 + Math.random()) * 0x100000)}`)
|
|
|
36
36
|
class="cursor-pointer border border-gray-300 rounded-lg accent-indigo-700 transition-shadow flex-initial dark:border-gray-700 focus:border-gray-500 hover:border-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-indigo-500/40 dark:focus:border-gray-500 dark:hover:border-gray-600"
|
|
37
37
|
:class="{
|
|
38
38
|
'disabled:opacity-50 disabled:cursor-not-allowed': disabled,
|
|
39
|
-
|
|
40
39
|
'h-3.5 w-3.5': size === 'xs',
|
|
41
40
|
'h-4 w-4': size === 'sm',
|
|
42
41
|
'h-4.5 w-4.5': size === 'base',
|
|
@@ -74,35 +74,35 @@ function onUpdateDays(event: MouseEvent, day: number) {
|
|
|
74
74
|
{
|
|
75
75
|
"en": {
|
|
76
76
|
"days": {
|
|
77
|
-
"monday": "Monday",
|
|
78
|
-
"tuesday": "Tuesday",
|
|
79
|
-
"wednesday": "Wednesday",
|
|
80
|
-
"thursday": "Thursday",
|
|
81
77
|
"friday": "Friday",
|
|
78
|
+
"monday": "Monday",
|
|
82
79
|
"saturday": "Saturday",
|
|
83
|
-
"sunday": "Sunday"
|
|
80
|
+
"sunday": "Sunday",
|
|
81
|
+
"thursday": "Thursday",
|
|
82
|
+
"tuesday": "Tuesday",
|
|
83
|
+
"wednesday": "Wednesday"
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
"fr": {
|
|
87
87
|
"days": {
|
|
88
|
-
"monday": "Lundi",
|
|
89
|
-
"tuesday": "Mardi",
|
|
90
|
-
"wednesday": "Mercredi",
|
|
91
|
-
"thursday": "Jeudi",
|
|
92
88
|
"friday": "Vendredi",
|
|
89
|
+
"monday": "Lundi",
|
|
93
90
|
"saturday": "Samedi",
|
|
94
|
-
"sunday": "Dimanche"
|
|
91
|
+
"sunday": "Dimanche",
|
|
92
|
+
"thursday": "Jeudi",
|
|
93
|
+
"tuesday": "Mardi",
|
|
94
|
+
"wednesday": "Mercredi"
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
"ja": {
|
|
98
98
|
"days": {
|
|
99
|
-
"monday": "月曜日",
|
|
100
|
-
"tuesday": "火曜日",
|
|
101
|
-
"wednesday": "水曜日",
|
|
102
|
-
"thursday": "木曜日",
|
|
103
99
|
"friday": "金曜日",
|
|
100
|
+
"monday": "月曜日",
|
|
104
101
|
"saturday": "土曜日",
|
|
105
|
-
"sunday": "日曜日"
|
|
102
|
+
"sunday": "日曜日",
|
|
103
|
+
"thursday": "木曜日",
|
|
104
|
+
"tuesday": "火曜日",
|
|
105
|
+
"wednesday": "水曜日"
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
}
|
|
@@ -157,18 +157,14 @@ defineExpose({ focus })
|
|
|
157
157
|
'text-gray-500 dark:text-gray-500 line-through': lineThrough,
|
|
158
158
|
'font-medium tracking-tight uppercase': uppercase,
|
|
159
159
|
'font-normal': !uppercase,
|
|
160
|
-
|
|
161
160
|
'text-center': alignment === 'center',
|
|
162
161
|
'text-left': alignment === 'left',
|
|
163
162
|
'text-right': alignment === 'right',
|
|
164
|
-
|
|
165
163
|
'bg-gray-100 dark:bg-gray-900': background === 'gray',
|
|
166
164
|
'bg-white dark:bg-gray-900': background === 'white',
|
|
167
|
-
|
|
168
165
|
'border shadow-sm border-gray-200 dark:border-gray-800 px-4 hover:border-gray-300 focus:border-gray-400 dark:hover:border-gray-700 dark:focus:border-gray-600': border === 'full',
|
|
169
166
|
'border-b border-gray-200 dark:border-gray-800 px-10': border === 'bottom',
|
|
170
167
|
'border-0 p-0': border === 'none',
|
|
171
|
-
|
|
172
168
|
'text-xs': size === 'xs',
|
|
173
169
|
'text-sm': size === 'sm',
|
|
174
170
|
'text-base': size === 'base',
|
|
@@ -35,7 +35,6 @@ function onClick(event: MouseEvent) {
|
|
|
35
35
|
'text-gray-500 dark:text-gray-500 line-through': lineThrough,
|
|
36
36
|
'hover:text-black dark:hover:text-white': !loading && !disabled && !lineThrough,
|
|
37
37
|
'w-0 truncate': truncate,
|
|
38
|
-
|
|
39
38
|
'mb-1.5': size === 'xs' && hasMarginBottom,
|
|
40
39
|
'mb-2': size === 'sm' && hasMarginBottom,
|
|
41
40
|
'mb-2.5': size === 'base' && hasMarginBottom,
|
|
@@ -135,7 +135,6 @@ const text = computed<BaseTextText>(() => {
|
|
|
135
135
|
:class="{
|
|
136
136
|
'text-red-700 dark:text-red-300': status === 'error',
|
|
137
137
|
'text-gray-700 dark:text-gray-300': status === 'default',
|
|
138
|
-
|
|
139
138
|
'mt-2': size === 'xs',
|
|
140
139
|
'mt-2.5': size === 'sm',
|
|
141
140
|
'mt-3': size === 'base',
|
|
@@ -174,8 +173,8 @@ const text = computed<BaseTextText>(() => {
|
|
|
174
173
|
"decimal": "La valeur naccepte que les nombres décimaux positifs et négatifs",
|
|
175
174
|
"email": "La valeur n'est pas un email valide",
|
|
176
175
|
"integer": "La valeur n'accepte que des entiers positifs et négatifs",
|
|
177
|
-
"ipAddress": "La valeur n'accepte qu'une adresse IPv4 valide",
|
|
178
176
|
"invalid": "La valeur n'est pas valide",
|
|
177
|
+
"ipAddress": "La valeur n'accepte qu'une adresse IPv4 valide",
|
|
179
178
|
"macAddress": "La valeur n'accepte qu'une adresse MAC valide",
|
|
180
179
|
"maxLength": "La valeur est trop longue (max: {max})",
|
|
181
180
|
"maxValue": "La valeur maximum acceptée: {max}",
|
|
@@ -168,18 +168,11 @@ function onOptionClick(event: MouseEvent, option: FieldSelectOption) {
|
|
|
168
168
|
'border-gray-400 dark:border-gray-600': opened,
|
|
169
169
|
'hover:border-gray-300 dark:hover:border-gray-700': !opened,
|
|
170
170
|
'focus:border-gray-400 dark:focus:border-gray-600': !disabled,
|
|
171
|
-
|
|
172
|
-
'text-2xs': size === 'xs',
|
|
173
|
-
'text-xs': size === 'sm',
|
|
174
|
-
'text-sm': size === 'base',
|
|
175
|
-
'text-base': size === 'lg',
|
|
176
|
-
|
|
177
171
|
'px-4': padding,
|
|
178
|
-
|
|
179
|
-
'h-
|
|
180
|
-
'h-
|
|
181
|
-
'h-
|
|
182
|
-
'h-14': size === 'lg',
|
|
172
|
+
'text-2xs h-8': size === 'xs',
|
|
173
|
+
'text-xs h-10': size === 'sm',
|
|
174
|
+
'text-sm h-12': size === 'base',
|
|
175
|
+
'text-base h-14': size === 'lg',
|
|
183
176
|
}"
|
|
184
177
|
tabindex="0"
|
|
185
178
|
@click="onContainerClick"
|
|
@@ -228,14 +221,12 @@ function onOptionClick(event: MouseEvent, option: FieldSelectOption) {
|
|
|
228
221
|
class="options min-w-xs overflow-y-auto border border-gray-400 rounded-lg bg-white text-gray-600 font-medium dark:border-gray-600 dark:bg-gray-900 dark:text-gray-400"
|
|
229
222
|
:class="{
|
|
230
223
|
'md:min-w-xl p-1 pb-0': computedColumns.length >= 2,
|
|
231
|
-
|
|
232
224
|
'mt-8': ['xs', 'sm'].includes(size) && !padding && direction === 'bottom',
|
|
233
225
|
'mt-10': ((['xs', 'sm'].includes(size) && padding) || (size === 'base' && !padding)) && direction === 'bottom',
|
|
234
226
|
'mt-12': size === 'base' && padding && direction === 'bottom',
|
|
235
227
|
'mb-8': ['xs', 'sm'].includes(size) && !padding && direction === 'top',
|
|
236
228
|
'mb-10': ((['xs', 'sm'].includes(size) && padding) || (size === 'base' && !padding)) && direction === 'top',
|
|
237
229
|
'mb-12': size === 'base' && padding && direction === 'top',
|
|
238
|
-
|
|
239
230
|
'max-h-xs': maxHeight === 'xs',
|
|
240
231
|
'max-h-sm': maxHeight === 'sm',
|
|
241
232
|
'max-h-md': maxHeight === 'md',
|
|
@@ -259,11 +250,9 @@ function onOptionClick(event: MouseEvent, option: FieldSelectOption) {
|
|
|
259
250
|
:class="{
|
|
260
251
|
'border-b border-gray-200 dark:border-gray-800 px-4 py-3 hover:bg-gray-100 dark:hover:bg-gray-900 last:border-b-0': computedColumns.length < 2,
|
|
261
252
|
'px-2 py-1 last:mb-2': computedColumns.length >= 2,
|
|
262
|
-
|
|
263
253
|
'font-medium underline': selectedOption && option.value === selectedOption.value,
|
|
264
254
|
'text-gray-900 dark:text-gray-100': selectedOption && option.value === selectedOption.value,
|
|
265
255
|
'bg-white dark:bg-gray-900': selectedOption && option.value !== selectedOption.value,
|
|
266
|
-
|
|
267
256
|
}"
|
|
268
257
|
@click="onOptionClick($event, option)"
|
|
269
258
|
>
|
|
@@ -73,18 +73,15 @@ function onTabClick(event: MouseEvent, tabValue: number | string) {
|
|
|
73
73
|
'text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100': !isTabActive(tab.value),
|
|
74
74
|
'flex-1': !minimizeOnMobile || !isTabActive(tab.value),
|
|
75
75
|
'flex-2 sm:flex-1': minimizeOnMobile && isTabActive(tab.value),
|
|
76
|
-
|
|
77
76
|
'py-1.5 px-2.5': size === 'xs' && theme === 'rounded',
|
|
78
77
|
'py-2 px-3': size === 'sm' && theme === 'rounded',
|
|
79
78
|
'py-2.5 px-3.5': size === 'base' && theme === 'rounded' || size === 'xs' && theme === 'border',
|
|
80
79
|
'py-3 px-4': size === 'lg' && theme === 'rounded' || size === 'sm' && theme === 'border',
|
|
81
80
|
'py-3.5 px-4.5': size === 'base' && theme === 'border',
|
|
82
81
|
'py-4 px-5': size === 'lg' && theme === 'border',
|
|
83
|
-
|
|
84
82
|
'border-b-2 border-gray-300 dark:border-gray-700 transition duration-500': theme === 'border',
|
|
85
83
|
'border-gray-900 dark:border-gray-100': isTabActive(tab.value) && theme === 'border',
|
|
86
84
|
'border-gray-100 dark:border-gray-900': !isTabActive(tab.value) && theme === 'border',
|
|
87
|
-
|
|
88
85
|
'rounded-lg': theme === 'rounded',
|
|
89
86
|
'bg-white dark:bg-gray-900 shadow': isTabActive(tab.value) && theme === 'rounded',
|
|
90
87
|
'bg-gray-200 dark:bg-gray-800': !isTabActive(tab.value) && theme === 'rounded',
|
|
@@ -74,13 +74,10 @@ function onFieldClick(event: MouseEvent) {
|
|
|
74
74
|
'p-2.5': padding,
|
|
75
75
|
'p-0': !padding,
|
|
76
76
|
'resize-none': !resize,
|
|
77
|
-
|
|
78
77
|
'bg-gray-100 dark:bg-gray-900': background === 'gray',
|
|
79
78
|
'bg-white dark:bg-gray-900': background === 'white',
|
|
80
|
-
|
|
81
79
|
'border shadow-sm border-gray-200 dark:border-gray-800 hover:border-gray-300 dark:hover:border-gray-700 focus:border-gray-400 dark:focus:border-gray-600': border,
|
|
82
80
|
'border-0': !border,
|
|
83
|
-
|
|
84
81
|
'text-xs': size === 'xs',
|
|
85
82
|
'text-sm': size === 'sm',
|
|
86
83
|
'text-base': size === 'base',
|
package/app/types/bases.d.ts
CHANGED
|
@@ -21,11 +21,7 @@ export type BaseSize
|
|
|
21
21
|
| 'xl'
|
|
22
22
|
| 'xs'
|
|
23
23
|
|
|
24
|
-
export type BaseStatus
|
|
25
|
-
= | 'error'
|
|
26
|
-
| 'info'
|
|
27
|
-
| 'success'
|
|
28
|
-
| 'warning'
|
|
24
|
+
export type BaseStatus = | 'error' | 'info' | 'success' | 'warning'
|
|
29
25
|
|
|
30
26
|
export interface BaseAlert {
|
|
31
27
|
closingId?: string
|
|
@@ -68,9 +64,22 @@ export interface BaseButton {
|
|
|
68
64
|
type?: BaseButtonType
|
|
69
65
|
}
|
|
70
66
|
|
|
71
|
-
export type BaseButtonRounded
|
|
67
|
+
export type BaseButtonRounded
|
|
68
|
+
= | 'base'
|
|
69
|
+
| 'full'
|
|
70
|
+
| 'lg'
|
|
71
|
+
| 'md'
|
|
72
|
+
| 'none'
|
|
73
|
+
| 'sm'
|
|
74
|
+
| 'xl'
|
|
72
75
|
|
|
73
|
-
export type BaseButtonSize
|
|
76
|
+
export type BaseButtonSize
|
|
77
|
+
= | '2xs'
|
|
78
|
+
| 'base'
|
|
79
|
+
| 'lg'
|
|
80
|
+
| 'sm'
|
|
81
|
+
| 'xl'
|
|
82
|
+
| 'xs'
|
|
74
83
|
|
|
75
84
|
export type BaseButtonType = 'button' | 'reset' | 'submit'
|
|
76
85
|
|
|
@@ -87,7 +96,13 @@ export interface BaseCharacter {
|
|
|
87
96
|
size?: BaseCharacterSize
|
|
88
97
|
}
|
|
89
98
|
|
|
90
|
-
export type BaseCharacterCharacter
|
|
99
|
+
export type BaseCharacterCharacter
|
|
100
|
+
= | 'anthony'
|
|
101
|
+
| 'julien'
|
|
102
|
+
| 'mathieu'
|
|
103
|
+
| 'nada'
|
|
104
|
+
| 'power'
|
|
105
|
+
| 'yoda'
|
|
91
106
|
|
|
92
107
|
export type BaseCharacterSize = 'base' | 'lg' | 'sm' | 'xs'
|
|
93
108
|
|
|
@@ -126,9 +141,20 @@ export interface BaseHeading {
|
|
|
126
141
|
|
|
127
142
|
export type BaseHeadingAlignment = 'center' | 'left' | 'right'
|
|
128
143
|
|
|
129
|
-
export type BaseHeadingSize
|
|
144
|
+
export type BaseHeadingSize
|
|
145
|
+
= | 'base'
|
|
146
|
+
| 'lg'
|
|
147
|
+
| 'sm'
|
|
148
|
+
| 'xl'
|
|
149
|
+
| 'xs'
|
|
130
150
|
|
|
131
|
-
export type BaseHeadingTag
|
|
151
|
+
export type BaseHeadingTag
|
|
152
|
+
= | 'h1'
|
|
153
|
+
| 'h2'
|
|
154
|
+
| 'h3'
|
|
155
|
+
| 'h4'
|
|
156
|
+
| 'h5'
|
|
157
|
+
| 'h6'
|
|
132
158
|
|
|
133
159
|
export interface BaseIcon {
|
|
134
160
|
bold?: boolean
|
|
@@ -178,7 +204,13 @@ export interface BaseOverlay {
|
|
|
178
204
|
position?: BaseOverlayPosition
|
|
179
205
|
}
|
|
180
206
|
|
|
181
|
-
export type BaseOverlayOpacity
|
|
207
|
+
export type BaseOverlayOpacity
|
|
208
|
+
= | 0
|
|
209
|
+
| 25
|
|
210
|
+
| 50
|
|
211
|
+
| 75
|
|
212
|
+
| 95
|
|
213
|
+
| 100
|
|
182
214
|
|
|
183
215
|
export type BaseOverlayPosition = 'absolute' | 'fixed'
|
|
184
216
|
|
package/app/types/fields.d.ts
CHANGED
|
@@ -2,7 +2,12 @@ export type FieldBackground = 'gray' | 'white'
|
|
|
2
2
|
|
|
3
3
|
export type FieldSize = 'base' | 'lg' | 'sm' | 'xs'
|
|
4
4
|
|
|
5
|
-
export type FieldStatus
|
|
5
|
+
export type FieldStatus
|
|
6
|
+
= | 'default'
|
|
7
|
+
| 'error'
|
|
8
|
+
| 'info'
|
|
9
|
+
| 'success'
|
|
10
|
+
| 'warning'
|
|
6
11
|
|
|
7
12
|
export interface FieldCheckbox {
|
|
8
13
|
description?: BaseTextText
|
|
@@ -59,7 +64,20 @@ export type FieldInputAlignment = 'center' | 'left' | 'right'
|
|
|
59
64
|
|
|
60
65
|
export type FieldInputBorder = 'bottom' | 'full' | 'none'
|
|
61
66
|
|
|
62
|
-
export type FieldInputType
|
|
67
|
+
export type FieldInputType
|
|
68
|
+
= | 'currency'
|
|
69
|
+
| 'date'
|
|
70
|
+
| 'datetime-local'
|
|
71
|
+
| 'email'
|
|
72
|
+
| 'month'
|
|
73
|
+
| 'number'
|
|
74
|
+
| 'password'
|
|
75
|
+
| 'search'
|
|
76
|
+
| 'tel'
|
|
77
|
+
| 'text'
|
|
78
|
+
| 'time'
|
|
79
|
+
| 'url'
|
|
80
|
+
| 'week'
|
|
63
81
|
|
|
64
82
|
export interface FieldLabel {
|
|
65
83
|
disabled?: boolean
|
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.76",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Reusable Nuxt UI components for SaaS Makers projects",
|
|
7
7
|
"license": "MIT",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"uno.config.ts"
|
|
23
23
|
],
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@saasmakers/shared": "^0.1.
|
|
25
|
+
"@saasmakers/shared": "^0.1.9",
|
|
26
26
|
"nuxt": "4.2.1"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"nuxt": "4.2.1",
|
|
56
56
|
"typescript": "5.9.3",
|
|
57
|
-
"@saasmakers/shared": "0.1.
|
|
57
|
+
"@saasmakers/shared": "0.1.9"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"dev": "nuxi dev",
|