@bjj/nuxt-layer-shadcn-ui 0.12.3 → 0.12.5

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.
@@ -9,8 +9,7 @@
9
9
  [data-slot='dialog-overlay'],
10
10
  [data-slot='sheet-overlay'] {
11
11
  background-color: rgba(252, 252, 252, 0.3);
12
- backdrop-filter: blur(2px);
13
- -webkit-backdrop-filter: blur(2px);
12
+ backdrop-filter: blur(4px);
14
13
  }
15
14
 
16
15
  .dark [data-slot='dialog-overlay'],
@@ -25,6 +25,7 @@ const meta = {
25
25
  multiple: { control: 'boolean' },
26
26
  maxCount: { control: 'number' },
27
27
  maxSize: { control: 'number' },
28
+ hideTriggerOnMax: { control: 'boolean' },
28
29
  directory: { control: 'boolean' },
29
30
  text: { control: 'text' },
30
31
  icon: { control: 'text' },
@@ -38,6 +39,7 @@ const meta = {
38
39
  multiple: false,
39
40
  maxCount: undefined,
40
41
  maxSize: undefined,
42
+ hideTriggerOnMax: false,
41
43
  directory: false,
42
44
  text: '',
43
45
  icon: '',
@@ -15,6 +15,7 @@ const props = withDefaults(defineProps<UploadProps>(), {
15
15
  maxSize: undefined,
16
16
  text: undefined,
17
17
  icon: undefined,
18
+ hideTriggerOnMax: false,
18
19
  directory: false,
19
20
  class: undefined,
20
21
  })
@@ -74,7 +75,9 @@ const canPickMore = computed(() =>
74
75
 
75
76
  const canRemove = computed(() => !props.disabled && !props.readonly)
76
77
 
77
- const showTrigger = computed(() => !props.readonly)
78
+ const showTrigger = computed(() =>
79
+ !props.readonly && !(props.hideTriggerOnMax && reachedMax.value),
80
+ )
78
81
 
79
82
  const emptyStateClass = 'py-2 text-xs text-muted-foreground'
80
83
 
@@ -31,6 +31,8 @@ export interface UploadProps {
31
31
  maxSize?: number
32
32
  text?: string
33
33
  icon?: string | Component
34
+ /** Hide the upload trigger instead of disabling it when maxCount is reached */
35
+ hideTriggerOnMax?: boolean
34
36
  directory?: boolean
35
37
  class?: ClassValue
36
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bjj/nuxt-layer-shadcn-ui",
3
- "version": "0.12.3",
3
+ "version": "0.12.5",
4
4
  "description": "Nuxt layer providing shadcn-vue based UI components",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -42,5 +42,5 @@
42
42
  "vue-i18n": "^11",
43
43
  "vue-router": "^4 || ^5"
44
44
  },
45
- "gitHead": "ee465b34aeb8fb45b58b7145d940f4c9bf19a6d2"
45
+ "gitHead": "a2bdb9f81b90f03e98ca6cc19b5da2174f41930f"
46
46
  }