@saasmakers/ui 2.0.75 → 2.0.77

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.
@@ -83,9 +83,9 @@ function onClick(event: MouseEvent) {
83
83
  'shadow-sm': !light || color === 'gray',
84
84
  'rounded-lg': shape !== 'circle',
85
85
  'rounded-full': shape === 'circle',
86
- 'h-10 w-10': size === 'sm' && hasFixedSize && !confirming,
87
- 'h-12 w-12': size === 'base' && hasFixedSize && !confirming,
88
- 'h-14 w-14': size === 'lg' && hasFixedSize && !confirming,
86
+ 'size-sm': size === 'sm' && hasFixedSize && !confirming,
87
+ 'size-base': size === 'base' && hasFixedSize && !confirming,
88
+ 'size-lg': size === 'lg' && hasFixedSize && !confirming,
89
89
  'border-gray-900 dark:border-gray-100 bg-gray-900 dark:bg-gray-100 text-white dark:text-black': color === 'black' && !light,
90
90
  'hover:bg-black dark:hover:bg-white hover:text-white dark:hover:text-black': color === 'black' && !light && !disabled && !loading,
91
91
  'border-gray-900 dark:border-gray-100 text-gray-900 dark:text-gray-100': color === 'black' && light,
@@ -110,9 +110,9 @@ function onClick(event: MouseEvent) {
110
110
  'border-white dark:border-gray-900 text-white dark:text-black': color === 'white' && light,
111
111
  'hover:border-black dark:hover:border-white hover:text-black dark:hover:text-white': color !== 'gray' && color !== 'white' && light && !disabled && !loading,
112
112
  'hover:bg-white dark:hover:bg-gray-900 hover:text-gray-800 dark:hover:text-gray-200': color === 'white' && light && !disabled && !loading,
113
- 'h-10 px-5': size === 'sm' && (!hasFixedSize || confirming),
114
- 'h-12 px-6': size === 'base' && (!hasFixedSize || confirming),
115
- 'h-14 px-6.5': size === 'lg' && (!hasFixedSize || confirming),
113
+ 'h-sm px-sm': size === 'sm' && (!hasFixedSize || confirming),
114
+ 'h-base px-base': size === 'base' && (!hasFixedSize || confirming),
115
+ 'h-lg px-lg': size === 'lg' && (!hasFixedSize || confirming),
116
116
  }"
117
117
  :disabled="disabled"
118
118
  :to="to"
@@ -75,7 +75,7 @@ function onOpenFilePicker() {
75
75
 
76
76
  <div
77
77
  :aria-label="loading ? t('actionLoading') : (typeof action === 'string' ? action : (action?.base || t('action')))"
78
- class="w-full flex items-center gap-2 px-3 uppercase outline-none"
78
+ class="w-full flex items-center gap-2 uppercase outline-none"
79
79
  :class="{
80
80
  'cursor-pointer': !disabled && !loading,
81
81
  'field-disabled': disabled,
@@ -87,9 +87,9 @@ function onOpenFilePicker() {
87
87
  'base-box': border === 'full',
88
88
  'base-border-b': border === 'bottom',
89
89
  'border-0': border === 'none',
90
- 'text-xs h-10': size === 'sm',
91
- 'text-sm h-12': size === 'base',
92
- 'text-base h-14': size === 'lg',
90
+ 'text-xs h-sm px-sm': size === 'sm',
91
+ 'text-sm h-base px-base': size === 'base',
92
+ 'text-base h-lg px-lg': size === 'lg',
93
93
  }"
94
94
  role="button"
95
95
  :aria-disabled="disabled || loading"
@@ -205,9 +205,9 @@ function readField(item: Item, field: string) {
205
205
  <div
206
206
  class="flex flex-wrap select-none items-center gap-1.5 p-1.5"
207
207
  :class="{
208
- 'min-h-10': size === 'sm',
209
- 'min-h-12': size === 'base',
210
- 'min-h-14': size === 'lg',
208
+ 'min-h-sm': size === 'sm',
209
+ 'min-h-base': size === 'base',
210
+ 'min-h-lg': size === 'lg',
211
211
  }"
212
212
  >
213
213
  <BaseChip
@@ -418,11 +418,15 @@ function syncFocusedDayIndex() {
418
418
  :id="id"
419
419
  class="flex cursor-pointer items-center gap-2 outline-none"
420
420
  :class="{
421
- 'h-10': size === 'sm',
422
- 'h-12': size === 'base',
423
- 'h-14': size === 'lg',
424
- 'pl-3 pr-0': modelValue,
425
- 'px-3': !modelValue,
421
+ 'h-sm': size === 'sm',
422
+ 'h-base': size === 'base',
423
+ 'h-lg': size === 'lg',
424
+ 'pl-3 pr-0': modelValue && size === 'sm',
425
+ 'pl-4 pr-0': modelValue && size === 'base',
426
+ 'pl-5 pr-0': modelValue && size === 'lg',
427
+ 'px-sm': !modelValue && size === 'sm',
428
+ 'px-base': !modelValue && size === 'base',
429
+ 'px-lg': !modelValue && size === 'lg',
426
430
  }"
427
431
  role="button"
428
432
  :aria-disabled="disabled"
@@ -181,9 +181,9 @@ defineExpose({
181
181
  <div
182
182
  class="flex items-center"
183
183
  :class="{
184
- 'h-10': size === 'sm',
185
- 'h-12': size === 'base',
186
- 'h-14': size === 'lg',
184
+ 'h-sm': size === 'sm',
185
+ 'h-base': size === 'base',
186
+ 'h-lg': size === 'lg',
187
187
  }"
188
188
  >
189
189
  <slot name="inputLeft" />
@@ -207,8 +207,12 @@ defineExpose({
207
207
  'bg-gray-100 dark:bg-gray-900': background === 'gray',
208
208
  'bg-white dark:bg-gray-900': background === 'white',
209
209
  'base-box': border === 'full',
210
- 'pl-3 pr-10': border === 'full' && type === 'password',
211
- 'px-3': border === 'full' && type !== 'password',
210
+ 'pl-3 pr-10': border === 'full' && type === 'password' && size === 'sm',
211
+ 'pl-4 pr-10': border === 'full' && type === 'password' && size === 'base',
212
+ 'pl-5 pr-10': border === 'full' && type === 'password' && size === 'lg',
213
+ 'px-sm': border === 'full' && type !== 'password' && size === 'sm',
214
+ 'px-base': border === 'full' && type !== 'password' && size === 'base',
215
+ 'px-lg': border === 'full' && type !== 'password' && size === 'lg',
212
216
  'base-border-interactive': border === 'full' && !disabled,
213
217
  'base-border-b': border === 'bottom',
214
218
  'pl-10 pr-16': border === 'bottom' && type === 'password',
@@ -243,15 +243,18 @@ function selectOption(event: MouseEvent, value: string) {
243
243
  'base-border-active': opened,
244
244
  'base-border-hover': !opened && !disabled,
245
245
  'base-border-interactive-focus-visible': !disabled,
246
- 'text-xs h-10': size === 'sm',
247
- 'text-sm h-12': size === 'base',
248
- 'text-base h-14': size === 'lg',
249
- 'px-3': padding && !hideLabel && !square,
246
+ 'text-xs h-sm': size === 'sm' && !square,
247
+ 'text-sm h-base': size === 'base' && !square,
248
+ 'text-base h-lg': size === 'lg' && !square,
249
+ 'text-xs size-sm': size === 'sm' && square,
250
+ 'text-sm size-base': size === 'base' && square,
251
+ 'text-base size-lg': size === 'lg' && square,
252
+ 'px-sm': padding && !hideLabel && !square && size === 'sm',
253
+ 'px-base': padding && !hideLabel && !square && size === 'base',
254
+ 'px-lg': padding && !hideLabel && !square && size === 'lg',
250
255
  'px-2': padding && hideLabel && !square,
251
256
  'inline-flex w-fit gap-1': hideLabel && !square,
252
- 'justify-center w-10': square && size === 'sm',
253
- 'justify-center w-12': square && size === 'base',
254
- 'justify-center w-14': square && size === 'lg',
257
+ 'justify-center': square,
255
258
  }"
256
259
  role="button"
257
260
  :aria-disabled="disabled"
@@ -350,7 +353,11 @@ function selectOption(event: MouseEvent, value: string) {
350
353
  :autocomplete="false"
351
354
  background="white"
352
355
  border="none"
353
- class="px-3"
356
+ :class="{
357
+ 'px-sm': size === 'sm',
358
+ 'px-base': size === 'base',
359
+ 'px-lg': size === 'lg',
360
+ }"
354
361
  :placeholder="searchPlaceholder || t('search')"
355
362
  :size="size"
356
363
  @keydown="onSearchKeydown"
@@ -385,10 +392,10 @@ function selectOption(event: MouseEvent, value: string) {
385
392
  :key="option.value"
386
393
  class="flex cursor-pointer items-center outline-none"
387
394
  :class="{
388
- 'base-border-b base-bg-hover px-3 last:border-b-0': computedColumns.length < 2,
389
- 'h-10': size === 'sm' && computedColumns.length < 2,
390
- 'h-12': size === 'base' && computedColumns.length < 2,
391
- 'h-14': size === 'lg' && computedColumns.length < 2,
395
+ 'base-border-b base-bg-hover last:border-b-0': computedColumns.length < 2,
396
+ 'h-sm px-sm': size === 'sm' && computedColumns.length < 2,
397
+ 'h-base px-base': size === 'base' && computedColumns.length < 2,
398
+ 'h-lg px-lg': size === 'lg' && computedColumns.length < 2,
392
399
  'base-bg-hover px-2 py-1 last:mb-2': computedColumns.length >= 2,
393
400
  'font-medium underline': option.value === selectedOption?.value,
394
401
  'text-gray-900 dark:text-gray-100': option.value === selectedOption?.value,
@@ -51,16 +51,19 @@ function onTabClick(event: MouseEvent, tabValue: string) {
51
51
  'flex-col': orientation === 'vertical',
52
52
  'text-gray-900 dark:text-gray-100': isTabActive(tab.value),
53
53
  'text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100': !isTabActive(tab.value) && !disabled,
54
- 'py-1 px-3 sm:py-2': size === 'sm' && theme === 'rounded' && orientation === 'responsive',
55
- 'py-1.5 px-3.5 sm:py-2.5': size === 'base' && theme === 'rounded' && orientation === 'responsive',
56
- 'py-2 px-4 sm:py-3': (size === 'lg' && theme === 'rounded' || size === 'sm' && theme === 'border') && orientation === 'responsive',
57
- 'py-2.5 px-4.5 sm:py-3.5': size === 'base' && theme === 'border' && orientation === 'responsive',
58
- 'py-3 px-5 sm:py-4': size === 'lg' && theme === 'border' && orientation === 'responsive',
59
- 'py-2 px-3': size === 'sm' && theme === 'rounded' && orientation !== 'responsive',
60
- 'py-2.5 px-3.5': size === 'base' && theme === 'rounded' && orientation !== 'responsive',
61
- 'py-3 px-4': (size === 'lg' && theme === 'rounded' || size === 'sm' && theme === 'border') && orientation !== 'responsive',
62
- 'py-3.5 px-4.5': size === 'base' && theme === 'border' && orientation !== 'responsive',
63
- 'py-4 px-5': size === 'lg' && theme === 'border' && orientation !== 'responsive',
54
+ 'px-sm': size === 'sm',
55
+ 'px-base': size === 'base',
56
+ 'px-lg': size === 'lg',
57
+ 'py-1 sm:py-2': size === 'sm' && theme === 'rounded' && orientation === 'responsive',
58
+ 'py-1.5 sm:py-2.5': size === 'base' && theme === 'rounded' && orientation === 'responsive',
59
+ 'py-2 sm:py-3': (size === 'lg' && theme === 'rounded' || size === 'sm' && theme === 'border') && orientation === 'responsive',
60
+ 'py-2.5 sm:py-3.5': size === 'base' && theme === 'border' && orientation === 'responsive',
61
+ 'py-3 sm:py-4': size === 'lg' && theme === 'border' && orientation === 'responsive',
62
+ 'py-2': size === 'sm' && theme === 'rounded' && orientation !== 'responsive',
63
+ 'py-2.5': size === 'base' && theme === 'rounded' && orientation !== 'responsive',
64
+ 'py-3': (size === 'lg' && theme === 'rounded' || size === 'sm' && theme === 'border') && orientation !== 'responsive',
65
+ 'py-3.5': size === 'base' && theme === 'border' && orientation !== 'responsive',
66
+ 'py-4': size === 'lg' && theme === 'border' && orientation !== 'responsive',
64
67
  'border-b-2 border-gray-300 dark:border-gray-700 transition duration-500': theme === 'border',
65
68
  'border-gray-900 dark:border-gray-100': isTabActive(tab.value) && theme === 'border',
66
69
  'border-gray-100 dark:border-gray-900': !isTabActive(tab.value) && theme === 'border',
@@ -82,7 +82,9 @@ function syncModelValueFromTarget(target: EventTarget | null) {
82
82
  'uppercase': uppercase,
83
83
  'field-disabled': disabled,
84
84
  'focus:placeholder-gray-900 hover:placeholder-gray-900 dark:focus:placeholder-gray-100 dark:hover:placeholder-gray-100': !disabled,
85
- 'p-2.5': padding,
85
+ 'px-sm py-2.5': padding && size === 'sm',
86
+ 'px-base py-2.5': padding && size === 'base',
87
+ 'px-lg py-2.5': padding && size === 'lg',
86
88
  'p-0': !padding,
87
89
  'resize-none': !resize,
88
90
  'bg-gray-100 dark:bg-gray-900': background === 'gray',
@@ -55,15 +55,15 @@ function onFieldBlur(event: FocusEvent) {
55
55
  />
56
56
 
57
57
  <div
58
- class="flex cursor-pointer items-center gap-2 overflow-hidden base-box px-3 font-normal"
58
+ class="flex cursor-pointer items-center gap-2 overflow-hidden base-box font-normal"
59
59
  :class="{
60
60
  'field-disabled': disabled,
61
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
- 'text-xs h-10': size === 'sm',
65
- 'text-sm h-12': size === 'base',
66
- 'text-base h-14': size === 'lg',
64
+ 'text-xs h-sm px-sm': size === 'sm',
65
+ 'text-sm h-base px-base': size === 'base',
66
+ 'text-base h-lg px-lg': size === 'lg',
67
67
  }"
68
68
  role="button"
69
69
  :aria-disabled="disabled"
@@ -229,7 +229,7 @@ watch(visible, (isVisible) => {
229
229
  @pointermove="onPointerMove"
230
230
  @pointerup="onPointerUp"
231
231
  >
232
- <div class="h-1.5 w-10 rounded-full bg-gray-300 dark:bg-gray-700" />
232
+ <div class="h-1 w-10 rounded-full bg-gray-300 dark:bg-gray-700" />
233
233
  </div>
234
234
 
235
235
  <slot name="hero" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasmakers/ui",
3
- "version": "2.0.75",
3
+ "version": "2.0.77",
4
4
  "private": false,
5
5
  "description": "Reusable Nuxt UI components for SaaS Makers projects",
6
6
  "license": "MIT",
package/uno.config.ts CHANGED
@@ -42,7 +42,19 @@ export const shortcuts: Record<string, string> = {
42
42
  'base-surface': 'border base-border base-bg shadow-sm',
43
43
  'field-disabled': 'opacity-50 cursor-not-allowed',
44
44
  'field-uppercase': 'uppercase [&_*]:uppercase [&_input::placeholder]:uppercase',
45
+ 'h-base': 'h-12',
46
+ 'h-lg': 'h-14',
47
+ 'h-sm': 'h-10',
48
+ 'min-h-base': 'min-h-12',
49
+ 'min-h-lg': 'min-h-14',
50
+ 'min-h-sm': 'min-h-10',
51
+ 'px-base': 'px-4',
52
+ 'px-lg': 'px-5',
53
+ 'px-sm': 'px-3',
45
54
  'scroll-y-stable': 'overflow-y-auto [scrollbar-gutter:stable]',
55
+ 'size-base': 'h-12 w-12',
56
+ 'size-lg': 'h-14 w-14',
57
+ 'size-sm': 'h-10 w-10',
46
58
  }
47
59
 
48
60
  export const theme = {