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

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.
@@ -26,6 +26,7 @@ const meta = {
26
26
  maxCount: { control: 'number' },
27
27
  maxSize: { control: 'number' },
28
28
  hideTriggerOnMax: { control: 'boolean' },
29
+ hideHint: { control: 'boolean' },
29
30
  directory: { control: 'boolean' },
30
31
  text: { control: 'text' },
31
32
  icon: { control: 'text' },
@@ -40,6 +41,7 @@ const meta = {
40
41
  maxCount: undefined,
41
42
  maxSize: undefined,
42
43
  hideTriggerOnMax: false,
44
+ hideHint: false,
43
45
  directory: false,
44
46
  text: '',
45
47
  icon: '',
@@ -16,6 +16,7 @@ const props = withDefaults(defineProps<UploadProps>(), {
16
16
  text: undefined,
17
17
  icon: undefined,
18
18
  hideTriggerOnMax: false,
19
+ hideHint: false,
19
20
  directory: false,
20
21
  class: undefined,
21
22
  })
@@ -457,7 +458,10 @@ async function onDrop (e: DragEvent) {
457
458
  <Icon :name="iconName" />
458
459
  {{ triggerLabel }}
459
460
  </Button>
460
- <div class="text-xs text-muted-foreground py-1.5">
461
+ <div
462
+ v-if="!hideHint"
463
+ class="text-xs text-muted-foreground py-1.5"
464
+ >
461
465
  <slot
462
466
  name="hint"
463
467
  :lines="hintLines"
@@ -491,7 +495,10 @@ async function onDrop (e: DragEvent) {
491
495
  <div class="text-foreground font-medium">
492
496
  {{ triggerLabel }}
493
497
  </div>
494
- <div class="text-xs text-muted-foreground">
498
+ <div
499
+ v-if="!hideHint"
500
+ class="text-xs text-muted-foreground"
501
+ >
495
502
  <slot
496
503
  name="hint"
497
504
  :lines="hintLines"
@@ -659,7 +666,7 @@ async function onDrop (e: DragEvent) {
659
666
  </div>
660
667
 
661
668
  <div
662
- v-if="showTrigger"
669
+ v-if="showTrigger && !hideHint"
663
670
  class="mt-2 text-xs text-muted-foreground"
664
671
  >
665
672
  <slot
@@ -18,21 +18,38 @@ export type UploadBeforeUpload
18
18
  export type UploadHandler = (files: (File | Blob)[]) => Promise<unknown>
19
19
 
20
20
  export interface UploadProps {
21
+ /** Trigger appearance: button, thumbnail grid box, or drag-and-drop area */
21
22
  variant?: UploadVariant
23
+ /** Accepted file types, same format as the native `<input accept>` (also enforced on drag-drop) */
22
24
  accept?: string
25
+ /** Called per file before upload; return `false` to skip, or a `File | Blob` to replace it */
23
26
  beforeUpload?: UploadBeforeUpload
27
+ /** Uploads the accepted files; rejection marks them as error */
24
28
  upload?: UploadHandler
29
+ /** Disable the trigger and file removal */
25
30
  disabled?: boolean
31
+ /** Hide the trigger and only display the file list */
26
32
  readonly?: boolean
33
+ /** Show the invalid (error) style */
27
34
  invalid?: boolean
35
+ /** Controlled file list, used with `v-model:fileList` */
28
36
  fileList?: UploadFile[]
37
+ /** Allow selecting multiple files at once */
29
38
  multiple?: boolean
39
+ /** Maximum number of files */
30
40
  maxCount?: number
41
+ /** Maximum size per file in bytes */
31
42
  maxSize?: number
43
+ /** Custom trigger text */
32
44
  text?: string
45
+ /** Custom trigger icon */
33
46
  icon?: string | Component
34
47
  /** Hide the upload trigger instead of disabling it when maxCount is reached */
35
48
  hideTriggerOnMax?: boolean
49
+ /** Hide the hint lines below the trigger */
50
+ hideHint?: boolean
51
+ /** Allow selecting a directory and upload its contents */
36
52
  directory?: boolean
53
+ /** Class of the root element */
37
54
  class?: ClassValue
38
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bjj/nuxt-layer-shadcn-ui",
3
- "version": "0.12.5",
3
+ "version": "0.12.6",
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": "a2bdb9f81b90f03e98ca6cc19b5da2174f41930f"
45
+ "gitHead": "1e5b160073c61a6301d43cf82a69d6c2cf80f17f"
46
46
  }