@saasmakers/ui 2.0.20 → 2.0.22

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.
@@ -76,7 +76,7 @@ async function onSocialConnectSuccess(payload: AuthSocialConnectSuccess) {
76
76
  <template>
77
77
  <div
78
78
  class="flex flex-col items-center"
79
- :class="{ 'rounded-lg bg-gray-100 dark:bg-gray-900 border shadow-sm border-gray-200 dark:border-gray-800 p-6 sm:p-10': hasBox }"
79
+ :class="{ 'base-box bg-gray-100 dark:bg-gray-900 p-6 sm:p-10': hasBox }"
80
80
  >
81
81
  <div class="w-full flex flex-col gap-6 sm:w-96">
82
82
  <BaseAlert
@@ -5,10 +5,10 @@ import type { BaseAvatar } from '../../types/bases'
5
5
  const props = withDefaults(defineProps<BaseAvatar>(), {
6
6
  bordered: true,
7
7
  borderWidth: 3,
8
- circular: true,
9
8
  editable: false,
10
9
  maxSizeMb: undefined,
11
10
  shadow: true,
11
+ shape: 'circle',
12
12
  src: undefined,
13
13
  to: undefined,
14
14
  })
@@ -102,7 +102,8 @@ function onMouseLeave() {
102
102
  :aria-label="editable ? t('edit') : undefined"
103
103
  class="relative h-full w-full overflow-hidden"
104
104
  :class="{
105
- 'rounded-full': circular,
105
+ 'rounded-full': shape === 'circle',
106
+ 'rounded-lg': shape === 'square',
106
107
  'shadow': shadow,
107
108
  'cursor-pointer': isClickable,
108
109
  }"
@@ -116,7 +117,8 @@ function onMouseLeave() {
116
117
  <img
117
118
  class="h-full w-full object-cover drag-none"
118
119
  :class="{
119
- 'rounded-full': circular,
120
+ 'rounded-full': shape === 'circle',
121
+ 'rounded-lg': shape === 'square',
120
122
  'border-white dark:border-white': bordered,
121
123
  'border-2': bordered && borderWidth === 2,
122
124
  'border-3': bordered && borderWidth === 3,
@@ -23,7 +23,7 @@ defineSlots<{
23
23
  'bg-gray-100 dark:bg-gray-900': background === 'gray',
24
24
  'bg-white dark:bg-gray-900': background === 'white',
25
25
  'border-black dark:border-white': borderColor === 'black',
26
- 'border-gray-200 dark:border-gray-800': borderColor === 'gray',
26
+ 'base-border': borderColor === 'gray',
27
27
  }"
28
28
  >
29
29
  <BaseText
@@ -1,10 +1,11 @@
1
1
  <script lang="ts" setup>
2
2
  import { NuxtLinkLocale } from '#components'
3
- import type { BaseButton } from '../../types/bases'
3
+ import type { BaseButton, BaseButtonShape } from '../../types/bases'
4
+
5
+ const fixedSizeButtonShapes = ['square', 'circle'] satisfies BaseButtonShape[]
4
6
 
5
7
  const props = withDefaults(defineProps<BaseButton>(), {
6
8
  background: true,
7
- circular: false,
8
9
  color: 'black',
9
10
  confirmation: false,
10
11
  disabled: false,
@@ -15,6 +16,7 @@ const props = withDefaults(defineProps<BaseButton>(), {
15
16
  light: false,
16
17
  loading: false,
17
18
  reverse: false,
19
+ shape: 'default',
18
20
  size: 'base',
19
21
  text: '',
20
22
  to: undefined,
@@ -33,6 +35,10 @@ defineSlots<{
33
35
  const confirming = ref(false)
34
36
  const { t } = useI18n()
35
37
 
38
+ const hasFixedSize = computed(() => {
39
+ return fixedSizeButtonShapes.includes(props.shape)
40
+ })
41
+
36
42
  function onClick(event: MouseEvent) {
37
43
  if (!props.loading) {
38
44
  if (props.confirmation) {
@@ -56,21 +62,21 @@ function onClick(event: MouseEvent) {
56
62
  :is="to ? NuxtLinkLocale : 'button'"
57
63
  class="relative inline-block select-none appearance-none border uppercase focus-visible:outline-none"
58
64
  :class="{
59
- 'flex items-center justify-center': circular,
65
+ 'flex items-center justify-center': hasFixedSize,
60
66
  'cursor-not-allowed opacity-50': disabled,
61
67
  'cursor-wait': loading,
62
68
  'cursor-pointer': !loading,
63
69
  'w-full': fullWidth,
64
70
  'bg-transparent shadow-none': light,
65
71
  'shadow-sm': !light,
66
- 'rounded-lg': !circular,
67
- 'rounded-full': circular,
68
- 'h-6 w-6': size === '2xs' && circular,
69
- 'h-8 w-8': size === 'xs' && circular && !confirming,
70
- 'h-10 w-10': size === 'sm' && circular && !confirming,
71
- 'h-12 w-12': size === 'base' && circular && !confirming,
72
- 'h-14 w-14': size === 'lg' && circular && !confirming,
73
- 'h-16 w-16': size === 'xl' && circular && !confirming,
72
+ 'rounded-lg': shape !== 'circle',
73
+ 'rounded-full': shape === 'circle',
74
+ 'h-6 w-6': size === '2xs' && hasFixedSize,
75
+ 'h-8 w-8': size === 'xs' && hasFixedSize && !confirming,
76
+ 'h-10 w-10': size === 'sm' && hasFixedSize && !confirming,
77
+ 'h-12 w-12': size === 'base' && hasFixedSize && !confirming,
78
+ 'h-14 w-14': size === 'lg' && hasFixedSize && !confirming,
79
+ 'h-16 w-16': size === 'xl' && hasFixedSize && !confirming,
74
80
  'border-gray-900 dark:border-gray-100 bg-gray-900 dark:bg-gray-100 text-white dark:text-black': color === 'black' && !light,
75
81
  'hover:bg-black dark:hover:bg-white hover:text-white dark:hover:text-black': color === 'black' && !light && !disabled && !loading,
76
82
  'border-gray-900 dark:border-gray-100 text-gray-900 dark:text-gray-100': color === 'black' && light,
@@ -94,12 +100,12 @@ function onClick(event: MouseEvent) {
94
100
  'border-white dark:border-gray-900 text-white dark:text-black': color === 'white' && light,
95
101
  'hover:border-black dark:hover:border-white hover:text-black dark:hover:text-white': color !== 'white' && light && !disabled && !loading,
96
102
  'hover:bg-white dark:hover:bg-gray-900 hover:text-gray-800 dark:hover:text-gray-200': color === 'white' && light && !disabled && !loading,
97
- 'h-6 px-3': size === '2xs' && (!circular || confirming),
98
- 'h-8 px-4': size === 'xs' && (!circular || confirming),
99
- 'h-10 px-5': size === 'sm' && (!circular || confirming),
100
- 'h-12 px-6': size === 'base' && (!circular || confirming),
101
- 'h-13 px-6.5': size === 'lg' && (!circular || confirming),
102
- 'h-14 px-7': size === 'xl' && (!circular || confirming),
103
+ 'h-6 px-3': size === '2xs' && (!hasFixedSize || confirming),
104
+ 'h-8 px-4': size === 'xs' && (!hasFixedSize || confirming),
105
+ 'h-10 px-5': size === 'sm' && (!hasFixedSize || confirming),
106
+ 'h-12 px-6': size === 'base' && (!hasFixedSize || confirming),
107
+ 'h-13 px-6.5': size === 'lg' && (!hasFixedSize || confirming),
108
+ 'h-14 px-7': size === 'xl' && (!hasFixedSize || confirming),
103
109
  }"
104
110
  :disabled="disabled"
105
111
  :to="to"
@@ -56,11 +56,11 @@ function onClick(event: MouseEvent) {
56
56
  'cursor-default': !isClickable,
57
57
  'cursor-pointer': isClickable,
58
58
  'opacity-50': disabled,
59
- 'border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm p-1.5 pr-2.5': hasBackground && size === 'base' && orientation === 'horizontal',
60
- 'border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm p-2.5 pr-4': hasBackground && size === 'lg' && orientation === 'horizontal',
61
- 'border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm p-3': hasBackground && size === 'base' && orientation === 'vertical',
62
- 'border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm p-4': hasBackground && size === 'lg' && orientation === 'vertical',
63
- 'hover:border-gray-300 dark:hover:border-gray-700': hasBackground && isClickable,
59
+ 'base-surface p-1.5 pr-2.5': hasBackground && size === 'base' && orientation === 'horizontal',
60
+ 'base-surface p-2.5 pr-4': hasBackground && size === 'lg' && orientation === 'horizontal',
61
+ 'base-surface p-3': hasBackground && size === 'base' && orientation === 'vertical',
62
+ 'base-surface p-4': hasBackground && size === 'lg' && orientation === 'vertical',
63
+ 'base-border-hover': hasBackground && isClickable,
64
64
  'rounded-xl': hasBackground,
65
65
  'relative': orientation === 'vertical',
66
66
  }"
@@ -83,7 +83,7 @@ function onClick(event: MouseEvent) {
83
83
  :class="{
84
84
  'border shadow-inner': !avatar && !image,
85
85
  'rounded-lg': !avatar && !image,
86
- 'border-gray-200 dark:border-gray-800 bg-gray-100 dark:bg-gray-900': !avatar && !image,
86
+ 'base-border bg-gray-100 dark:bg-gray-900': !avatar && !image,
87
87
  'mr-2': orientation === 'horizontal' && size === 'base',
88
88
  'mr-3': orientation === 'horizontal' && size === 'lg',
89
89
  'mb-2': orientation === 'vertical' && size === 'base',
@@ -34,11 +34,11 @@ function onKeyDown(event: KeyboardEvent) {
34
34
  <span
35
35
  class="flex items-center justify-center transition"
36
36
  :class="{
37
- 'border border-gray-200 dark:border-gray-800': hasBox,
37
+ 'border base-border': hasBox,
38
38
  'bg-gray-100 dark:bg-gray-900 shadow-inner': hasBox && background === 'gray',
39
39
  'bg-white dark:bg-gray-900 shadow-sm': hasBox && background === 'white',
40
40
  'cursor-pointer hover:border-gray-400 dark:hover:border-gray-600': clickable && (!hasBox || background === 'gray'),
41
- 'cursor-pointer hover:border-gray-300 focus-visible:border-gray-400 dark:hover:border-gray-700 dark:focus-visible:border-gray-600': clickable && hasBox && background === 'white',
41
+ 'cursor-pointer base-border-interactive-focus-visible': clickable && hasBox && background === 'white',
42
42
  'rounded': ['xs'].includes(size) && hasBox,
43
43
  'rounded-md': ['sm', 'base'].includes(size) && hasBox,
44
44
  'rounded-lg': ['lg', 'xl'].includes(size) && hasBox,
@@ -17,7 +17,7 @@ defineSlots<{
17
17
  <template>
18
18
  <div
19
19
  class="flex flex-col items-center bg-gray-100 text-center text-gray-900 dark:bg-gray-900 dark:text-gray-100"
20
- :class="{ 'rounded-lg border border-gray-200 dark:border-gray-800 p-6 sm:p-10': bordered }"
20
+ :class="{ 'base-border rounded-lg border p-6 sm:p-10': bordered }"
21
21
  >
22
22
  <div
23
23
  v-if="$slots.image"
@@ -81,11 +81,11 @@ function onOpenFilePicker() {
81
81
  'field-disabled': disabled,
82
82
  'pointer-events-none opacity-50': disabled,
83
83
  'pointer-events-none': loading,
84
- 'hover:border-gray-300 focus:border-gray-400 dark:hover:border-gray-700 dark:focus:border-gray-600': border === 'full' && !disabled && !loading,
84
+ 'base-border-interactive': border === 'full' && !disabled && !loading,
85
85
  'bg-gray-100 dark:bg-gray-900': background === 'gray',
86
86
  'bg-white dark:bg-gray-900': background === 'white',
87
- 'rounded-lg border border-gray-200 shadow-sm dark:border-gray-800': border === 'full',
88
- 'border-b border-gray-200 dark:border-gray-800': border === 'bottom',
87
+ 'base-box': border === 'full',
88
+ 'base-border-b': border === 'bottom',
89
89
  'border-0': border === 'none',
90
90
  'text-xs h-10': size === 'sm',
91
91
  'text-sm h-12': size === 'base',
@@ -128,7 +128,7 @@ function onOpenFilePicker() {
128
128
 
129
129
  <BaseText
130
130
  class="min-w-0 flex-1 text-gray-900 dark:text-gray-100"
131
- :size="({ base: 'sm', lg: 'base', sm: 'xs' } as const)[size]"
131
+ :size="({ base: 'sm', lg: 'base', sm: 'xs', xs: '2xs' } as const)[size]"
132
132
  :text="loading ? t('actionLoading') : (action || t('action'))"
133
133
  />
134
134
  </div>
@@ -26,7 +26,10 @@ const modelValue = defineModel<FieldCheckbox['modelValue']>({ default: false })
26
26
  :class="{ 'w-full': fullWidth }"
27
27
  @click.stop
28
28
  >
29
- <div class="group flex flex-1 items-center">
29
+ <div
30
+ class="flex flex-1 items-center"
31
+ :class="{ group: !!label }"
32
+ >
30
33
  <label
31
34
  v-if="!loading"
32
35
  class="relative flex items-center justify-center flex-initial"
@@ -49,8 +52,8 @@ const modelValue = defineModel<FieldCheckbox['modelValue']>({ default: false })
49
52
  class="flex items-center justify-center border-2 rounded-full transition-[background-color,border-color] duration-200 ease-out"
50
53
  :class="{
51
54
  'border-transparent bg-indigo-600 dark:bg-indigo-400': modelValue,
52
- 'border-gray-300 dark:border-gray-600': !modelValue,
53
- 'group-hover:border-gray-400 dark:group-hover:border-gray-500': !disabled && !modelValue,
55
+ 'base-border': !modelValue,
56
+ 'base-border-group-hover': !disabled && !modelValue,
54
57
  'group-hover:bg-indigo-700 dark:group-hover:bg-indigo-300': !disabled && modelValue,
55
58
  'h-4 w-4': size === 'sm',
56
59
  'h-4.5 w-4.5': size === 'base',
@@ -55,7 +55,7 @@ function onEmojiClick(event: MouseEvent, emoji?: string) {
55
55
 
56
56
  <template>
57
57
  <div
58
- class="border border-gray-200 rounded-lg p-4 shadow-sm dark:border-gray-800"
58
+ class="base-box p-4"
59
59
  :class="{ 'field-disabled': disabled }"
60
60
  >
61
61
  <FieldInput
@@ -166,6 +166,7 @@ defineExpose({ blur, focus })
166
166
  <div
167
167
  class="flex items-center"
168
168
  :class="{
169
+ 'h-8': size === 'xs',
169
170
  'h-10': size === 'sm',
170
171
  'h-12': size === 'base',
171
172
  'h-14': size === 'lg',
@@ -190,15 +191,16 @@ defineExpose({ blur, focus })
190
191
  'text-right': alignment === 'right',
191
192
  'bg-gray-100 dark:bg-gray-900': background === 'gray',
192
193
  'bg-white dark:bg-gray-900': background === 'white',
193
- 'border shadow-sm border-gray-200 dark:border-gray-800': border === 'full',
194
+ 'base-box': border === 'full',
194
195
  'pl-3 pr-10': border === 'full' && type === 'password',
195
196
  'px-3': border === 'full' && type !== 'password',
196
- 'hover:border-gray-300 focus:border-gray-400 dark:hover:border-gray-700 dark:focus:border-gray-600': border === 'full' && !disabled,
197
- 'border-b border-gray-200 dark:border-gray-800': border === 'bottom',
197
+ 'base-border-interactive': border === 'full' && !disabled,
198
+ 'base-border-b': border === 'bottom',
198
199
  'pl-10 pr-16': border === 'bottom' && type === 'password',
199
200
  'px-10': border === 'bottom' && type !== 'password',
200
201
  'border-0 p-0': border === 'none' && type !== 'password',
201
202
  'border-0 pr-9': border === 'none' && type === 'password',
203
+ 'text-2xs': size === 'xs',
202
204
  'text-xs': size === 'sm',
203
205
  'text-sm': size === 'base',
204
206
  'text-base': size === 'lg',
@@ -29,6 +29,8 @@ const textSize = computed<BaseSize>(() => {
29
29
  return 'base'
30
30
  case 'sm':
31
31
  return 'xs'
32
+ case 'xs':
33
+ return '2xs'
32
34
  default:
33
35
  return 'sm'
34
36
  }
@@ -69,9 +71,11 @@ function onKeyDown(event: KeyboardEvent) {
69
71
  'text-gray-500 dark:text-gray-500 line-through': lineThrough,
70
72
  'hover:text-black dark:hover:text-white': isClickable && !lineThrough,
71
73
  'w-0 truncate': truncate,
74
+ 'mb-1.5': size === 'xs' && hasMarginBottom,
72
75
  'mb-2': size === 'sm' && hasMarginBottom,
73
76
  'mb-2.5': size === 'base' && hasMarginBottom,
74
77
  'mb-3': size === 'lg' && hasMarginBottom,
78
+ 'ml-1': size === 'xs' && hasMarginLeft,
75
79
  'ml-1.5': size === 'sm' && hasMarginLeft,
76
80
  'ml-2': size === 'base' && hasMarginLeft,
77
81
  'ml-2.5': size === 'lg' && hasMarginLeft,
@@ -214,12 +214,12 @@ function selectOption(event: MouseEvent, value: string) {
214
214
  <div
215
215
  class="group flex items-center rounded-lg bg-white outline-none dark:bg-gray-900"
216
216
  :class="{
217
- 'border shadow-sm border-gray-200 dark:border-gray-800': border === 'full',
218
- 'border-b border-gray-200 dark:border-gray-800': border === 'bottom',
217
+ 'base-box': border === 'full',
218
+ 'base-border-b': border === 'bottom',
219
219
  'border-0': border === 'none',
220
- 'border-gray-400 dark:border-gray-600': opened,
221
- 'hover:border-gray-300 dark:hover:border-gray-700': !opened && !disabled,
222
- 'focus-visible:border-gray-400 dark:focus-visible:border-gray-600': !disabled,
220
+ 'base-border-active': opened,
221
+ 'base-border-hover': !opened && !disabled,
222
+ 'base-border-interactive-focus-visible': !disabled,
223
223
  'px-3': padding,
224
224
  'text-xs h-10': size === 'sm',
225
225
  'text-sm h-12': size === 'base',
@@ -276,7 +276,7 @@ function selectOption(event: MouseEvent, value: string) {
276
276
  :initial="fadeIn.initial"
277
277
  >
278
278
  <div
279
- 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"
279
+ class="options base-border-active min-w-xs overflow-y-auto border rounded-lg bg-white text-gray-600 font-medium dark:bg-gray-900 dark:text-gray-400"
280
280
  :class="{
281
281
  'md:min-w-xl p-1 pb-0': computedColumns.length >= 2,
282
282
  'mt-8': size === 'sm' && !padding && direction === 'bottom',
@@ -293,7 +293,7 @@ function selectOption(event: MouseEvent, value: string) {
293
293
  >
294
294
  <div
295
295
  v-if="searchable"
296
- class="sticky top-0 z-10 border-b border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900"
296
+ class="base-border-b sticky top-0 z-10 bg-white dark:bg-gray-900"
297
297
  @click.stop
298
298
  >
299
299
  <FieldInput
@@ -311,7 +311,7 @@ function selectOption(event: MouseEvent, value: string) {
311
311
 
312
312
  <div
313
313
  v-if="searchable && searchQueryCleaned && !firstFilteredOption"
314
- class="flex justify-center border-b border-gray-200 p-3 dark:border-gray-800"
314
+ class="base-border-b flex justify-center p-3"
315
315
  >
316
316
  <BaseIcon
317
317
  class="pointer-events-none"
@@ -337,7 +337,7 @@ function selectOption(event: MouseEvent, value: string) {
337
337
  :key="option.value"
338
338
  class="flex cursor-pointer items-center outline-none"
339
339
  :class="{
340
- 'border-b border-gray-200 dark:border-gray-800 p-3 hover:bg-gray-100 dark:hover:bg-gray-800 last:border-b-0': computedColumns.length < 2,
340
+ 'base-border-b p-3 hover:bg-gray-100 dark:hover:bg-gray-800 last:border-b-0': computedColumns.length < 2,
341
341
  'px-2 py-1 hover:bg-gray-100 dark:hover:bg-gray-800 last:mb-2': computedColumns.length >= 2,
342
342
  'font-medium underline': option.value === selectedOption?.value,
343
343
  'text-gray-900 dark:text-gray-100': option.value === selectedOption?.value,
@@ -78,8 +78,8 @@ function onFieldClick(event: MouseEvent) {
78
78
  'resize-none': !resize,
79
79
  'bg-gray-100 dark:bg-gray-900': background === 'gray',
80
80
  'bg-white dark:bg-gray-900': background === 'white',
81
- 'border shadow-sm border-gray-200 dark:border-gray-800': border,
82
- 'hover:border-gray-300 dark:hover:border-gray-700 focus:border-gray-400 dark:focus:border-gray-600': border && !disabled,
81
+ 'base-box': border,
82
+ 'base-border-interactive': border && !disabled,
83
83
  'border-0': !border,
84
84
  'text-xs': size === 'sm',
85
85
  'text-sm': size === 'base',
@@ -55,10 +55,10 @@ function onFieldBlur(event: FocusEvent) {
55
55
  />
56
56
 
57
57
  <div
58
- class="flex cursor-pointer items-center gap-2 overflow-hidden border border-gray-200 rounded-lg px-3 font-normal dark:border-gray-800"
58
+ class="base-box flex cursor-pointer items-center gap-2 overflow-hidden px-3 font-normal"
59
59
  :class="{
60
60
  'field-disabled': disabled,
61
- 'focus-within:border-gray-400 hover:border-gray-300 dark:focus-within:border-gray-600 dark:hover:border-gray-700': !disabled,
61
+ 'base-border-interactive-focus-within': !disabled,
62
62
  'bg-gray-100 dark:bg-gray-900': background === 'gray',
63
63
  'bg-white dark:bg-gray-900': background === 'white',
64
64
  'text-xs h-10': size === 'sm',
@@ -63,12 +63,6 @@ function onHeaderPointerDown(event: PointerEvent) {
63
63
  handle.setPointerCapture(event.pointerId)
64
64
  }
65
65
 
66
- function onPanelAfterEnter(element: Element) {
67
- // Drop the identity transform after the open animation so nested SortableJS
68
- // fallbacks on iOS resolve viewport coordinates instead of a transformed ancestor.
69
- element.classList.remove('translate-y-0')
70
- }
71
-
72
66
  function onPanelTransitionEnd(event: TransitionEvent) {
73
67
  if (event.propertyName !== 'transform' || !drag.closing) {
74
68
  return
@@ -215,7 +209,6 @@ watch(visible, (isVisible) => {
215
209
  leave-active-class="transition-transform duration-300 ease motion-reduce:transition-none motion-reduce:duration-0"
216
210
  leave-from-class="translate-y-0"
217
211
  leave-to-class="translate-y-full motion-reduce:translate-y-0"
218
- @after-enter="onPanelAfterEnter"
219
212
  @after-leave="onAfterLeave"
220
213
  >
221
214
  <div
@@ -24,13 +24,17 @@ export interface BaseAlert {
24
24
  // Global types for bases
25
25
  export type BaseAlignment = 'center' | 'left' | 'right'
26
26
 
27
+ export type BaseButtonShape = 'circle' | 'default' | 'square'
28
+
29
+ export type BaseAvatarShape = 'circle' | 'square'
30
+
27
31
  export interface BaseAvatar {
28
32
  bordered?: boolean
29
33
  borderWidth?: number
30
- circular?: boolean
31
34
  editable?: boolean
32
35
  maxSizeMb?: number
33
36
  shadow?: boolean
37
+ shape?: BaseAvatarShape
34
38
  src?: string
35
39
  to?: RouteLocationNamedI18n
36
40
  }
@@ -49,7 +53,6 @@ export type BaseBorderedColor = 'black' | 'gray'
49
53
 
50
54
  export interface BaseButton {
51
55
  background?: boolean
52
- circular?: boolean
53
56
  color?: BaseColor
54
57
  confirmation?: boolean
55
58
  disabled?: boolean
@@ -60,6 +63,7 @@ export interface BaseButton {
60
63
  light?: boolean
61
64
  loading?: boolean
62
65
  reverse?: boolean
66
+ shape?: BaseButtonShape
63
67
  size?: BaseButtonSize
64
68
  text?: BaseTextText
65
69
  to?: RouteLocationNamedI18n
@@ -155,7 +155,7 @@ export interface FieldSelectOption {
155
155
  value: string
156
156
  }
157
157
 
158
- export type FieldSize = 'base' | 'lg' | 'sm'
158
+ export type FieldSize = 'base' | 'lg' | 'sm' | 'xs'
159
159
 
160
160
  export type FieldStatus
161
161
  = | 'default'
@@ -66,6 +66,8 @@ declare global {
66
66
  type BaseQuoteSize = import('./bases').BaseQuoteSize
67
67
  type BaseShortcut = import('./bases').BaseShortcut
68
68
  type BaseSize = import('./bases').BaseSize
69
+ type BaseButtonShape = import('./bases').BaseButtonShape
70
+ type BaseAvatarShape = import('./bases').BaseAvatarShape
69
71
  type BaseSpinner = import('./bases').BaseSpinner
70
72
  type BaseStatus = import('./bases').BaseStatus
71
73
  type BaseTag = import('./bases').BaseTag
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasmakers/ui",
3
- "version": "2.0.20",
3
+ "version": "2.0.22",
4
4
  "private": false,
5
5
  "description": "Reusable Nuxt UI components for SaaS Makers projects",
6
6
  "license": "MIT",
package/uno.config.ts CHANGED
@@ -26,6 +26,16 @@ export const rules: [string, Record<string, string>][] = [
26
26
 
27
27
  export const shortcuts: Record<string, string> = {
28
28
  'app-text': 'font-bold leading-relaxed tracking-tight uppercase',
29
+ 'base-border': 'border-gray-200 dark:border-gray-800',
30
+ 'base-border-active': 'border-gray-400 dark:border-gray-600',
31
+ 'base-border-b': 'border-b border-gray-200 dark:border-gray-800',
32
+ 'base-border-group-hover': 'group-hover:border-gray-300 dark:group-hover:border-gray-700',
33
+ 'base-border-hover': 'hover:border-gray-300 dark:hover:border-gray-700',
34
+ 'base-border-interactive': 'hover:border-gray-300 focus:border-gray-400 dark:hover:border-gray-700 dark:focus:border-gray-600',
35
+ 'base-border-interactive-focus-visible': 'hover:border-gray-300 focus-visible:border-gray-400 dark:hover:border-gray-700 dark:focus-visible:border-gray-600',
36
+ 'base-border-interactive-focus-within': 'hover:border-gray-300 focus-within:border-gray-400 dark:hover:border-gray-700 dark:focus-within:border-gray-600',
37
+ 'base-box': 'border shadow-sm base-border rounded-lg',
38
+ 'base-surface': 'border base-border bg-white dark:bg-gray-900 shadow-sm',
29
39
  'field-disabled': 'opacity-50 cursor-not-allowed',
30
40
  'scroll-y-stable': 'overflow-y-auto [scrollbar-gutter:stable]',
31
41
  }