@bagelink/vue 1.20.9 → 1.20.19

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.
Files changed (49) hide show
  1. package/dist/assets.d.ts +9 -0
  2. package/dist/assets.d.ts.map +1 -1
  3. package/dist/components/form/inputs/ArrayInput.vue.d.ts +7 -0
  4. package/dist/components/form/inputs/ArrayInput.vue.d.ts.map +1 -1
  5. package/dist/components/form/inputs/CodeEditor/Index.vue.d.ts +1 -1
  6. package/dist/components/form/inputs/Upload/AssetFileRow.vue.d.ts +37 -0
  7. package/dist/components/form/inputs/Upload/AssetFileRow.vue.d.ts.map +1 -0
  8. package/dist/components/form/inputs/Upload/AssetUploadInput.vue.d.ts +33 -3
  9. package/dist/components/form/inputs/Upload/AssetUploadInput.vue.d.ts.map +1 -1
  10. package/dist/components/form/inputs/Upload/ImageCropper.vue.d.ts +33 -0
  11. package/dist/components/form/inputs/Upload/ImageCropper.vue.d.ts.map +1 -0
  12. package/dist/components/form/inputs/Upload/UploadInput.vue.d.ts +13 -79
  13. package/dist/components/form/inputs/Upload/UploadInput.vue.d.ts.map +1 -1
  14. package/dist/components/form/inputs/Upload/upload.types.d.ts +14 -0
  15. package/dist/components/form/inputs/Upload/upload.types.d.ts.map +1 -1
  16. package/dist/components/layout/TabsNav.vue.d.ts.map +1 -1
  17. package/dist/components/lightbox/index.d.ts.map +1 -1
  18. package/dist/core.css +2 -2
  19. package/dist/form-flow/form-flow.d.ts +5 -0
  20. package/dist/form-flow/form-flow.d.ts.map +1 -1
  21. package/dist/i18n/index.d.ts +108 -0
  22. package/dist/i18n/index.d.ts.map +1 -1
  23. package/dist/index.cjs +100 -100
  24. package/dist/index.css +1 -1
  25. package/dist/index.mjs +16748 -15455
  26. package/dist/style.css +2 -2
  27. package/dist/types/BagelForm.d.ts +34 -0
  28. package/dist/types/BagelForm.d.ts.map +1 -1
  29. package/package.json +2 -2
  30. package/src/assets.ts +27 -3
  31. package/src/components/dataTable/DataTable.vue +3 -3
  32. package/src/components/form/inputs/ArrayInput.vue +68 -32
  33. package/src/components/form/inputs/Upload/AssetFileRow.vue +150 -0
  34. package/src/components/form/inputs/Upload/AssetUploadInput.vue +694 -37
  35. package/src/components/form/inputs/Upload/ImageCropper.vue +525 -0
  36. package/src/components/form/inputs/Upload/UploadInput.vue +18 -3
  37. package/src/components/form/inputs/Upload/upload.css +109 -1
  38. package/src/components/form/inputs/Upload/upload.types.ts +15 -0
  39. package/src/components/layout/TabsNav.vue +103 -20
  40. package/src/components/lightbox/index.ts +6 -3
  41. package/src/form-flow/form-flow.ts +6 -0
  42. package/src/i18n/locales/en.json +19 -1
  43. package/src/i18n/locales/es.json +19 -1
  44. package/src/i18n/locales/fr.json +21 -2
  45. package/src/i18n/locales/he.json +19 -1
  46. package/src/i18n/locales/it.json +19 -1
  47. package/src/i18n/locales/ru.json +19 -1
  48. package/src/styles/inputs.css +4 -0
  49. package/src/types/BagelForm.ts +34 -0
@@ -44,6 +44,21 @@ export interface QueueFile {
44
44
  namespace?: string
45
45
  }
46
46
 
47
+ /**
48
+ * Lab / documentation preview only — pins one of the transient upload visuals so
49
+ * every preview variant can be inspected without a real transfer. Application code
50
+ * must never set this; the state is otherwise owned by the upload queue.
51
+ */
52
+ export interface UploadPreviewState {
53
+ state: 'uploading' | 'success'
54
+ /** Name shown on the synthetic in-flight row. */
55
+ label?: string
56
+ /** Local thumbnail for the synthetic in-flight row. */
57
+ thumb?: string
58
+ /** 0–100 shown on the synthetic progress bar. @default 62 */
59
+ progress?: number
60
+ }
61
+
47
62
  // ---------------------------------------------------------------------------
48
63
  // Attachments
49
64
  // ---------------------------------------------------------------------------
@@ -41,18 +41,80 @@ const tabsWrap = ref<HTMLElement | undefined>(undefined)
41
41
  const tabEls = ref<HTMLElement[]>([])
42
42
 
43
43
  let resizeObserver: ResizeObserver | undefined
44
+ let indicatorPlaced = false
45
+ const observedTabs = new Set<HTMLElement>()
46
+
47
+ /** Keep the observer on the current tabs only (`tabs` can change on the fly). */
48
+ function observeTabs(tabs: HTMLElement[]) {
49
+ if (!resizeObserver) { return }
50
+ const next = new Set(tabs)
51
+ observedTabs.forEach((tab) => {
52
+ if (!next.has(tab)) {
53
+ resizeObserver?.unobserve(tab)
54
+ observedTabs.delete(tab)
55
+ }
56
+ })
57
+ next.forEach((tab) => {
58
+ if (!observedTabs.has(tab)) {
59
+ resizeObserver?.observe(tab)
60
+ observedTabs.add(tab)
61
+ }
62
+ })
63
+ }
44
64
 
45
- /** Position relative to tabs wrap content box (works after breakpoint / font / scroll changes). */
46
- function measureActiveTabIndicator(wrap: HTMLElement, activeTab: HTMLElement) {
65
+ /**
66
+ * Geometry of the active tab in the wrapper's layout space.
67
+ *
68
+ * Uses offsetLeft/offsetWidth on purpose: getBoundingClientRect is multiplied by
69
+ * every ancestor transform / zoom (enter animations, scaled panels or previews),
70
+ * which placed and sized the pill wrong — the error grows with the tab's offset,
71
+ * so the first tab looked fine while any later tab did not. offset* is also
72
+ * scroll-independent, and the ::before scrolls with the wrapper content anyway.
73
+ */
74
+ function measureActiveTab(wrap: HTMLElement, activeTab: HTMLElement) {
75
+ const width = activeTab.offsetWidth
76
+ if (!width) { return undefined }
77
+
78
+ // offsetLeft is relative to the wrapper's padding box — the same origin the
79
+ // absolutely positioned ::before uses for `left`.
80
+ if (activeTab.offsetParent === wrap) {
81
+ return { left: activeTab.offsetLeft, width }
82
+ }
83
+
84
+ // Unexpected offsetParent (custom markup): fall back to rect math, scaled back
85
+ // into layout pixels so ancestor transforms / zoom still cancel out.
47
86
  const wrapRect = wrap.getBoundingClientRect()
48
87
  const tabRect = activeTab.getBoundingClientRect()
49
- const left = tabRect.left - wrapRect.left + wrap.scrollLeft
50
- const width = tabRect.width
51
- if (width > 0) {
52
- wrap.style.setProperty('--indicator-left', `${left}px`)
53
- wrap.style.setProperty('--indicator-width', `${width}px`)
54
- wrap.style.setProperty('--indicator-opacity', '1')
88
+ const scale = tabRect.width ? width / tabRect.width : 1
89
+ const left = (tabRect.left - wrapRect.left) / scale + wrap.scrollLeft - wrap.clientLeft
90
+ return { left, width }
91
+ }
92
+
93
+ function placeIndicator(wrap: HTMLElement, left: number, width: number) {
94
+ if (!indicatorPlaced) {
95
+ // First placement must not animate in from the wrapper's left edge when a
96
+ // non-first tab is already active on open.
97
+ indicatorPlaced = true
98
+ wrap.classList.add('bgl_tabs-indicator-snap')
99
+ requestAnimationFrame(() => wrap.classList.remove('bgl_tabs-indicator-snap'))
55
100
  }
101
+ wrap.style.setProperty('--indicator-left', `${left}px`)
102
+ wrap.style.setProperty('--indicator-width', `${width}px`)
103
+ wrap.style.setProperty('--indicator-opacity', '1')
104
+ }
105
+
106
+ function applyIndicator(wrap: HTMLElement) {
107
+ tabEls.value = Array.from(wrap.querySelectorAll<HTMLElement>('.bgl_tab'))
108
+ observeTabs(tabEls.value)
109
+
110
+ const activeTab = tabEls.value.find(tab => tab.classList.contains('active'))
111
+ if (!activeTab) {
112
+ wrap.style.setProperty('--indicator-opacity', '0')
113
+ return
114
+ }
115
+
116
+ const box = measureActiveTab(wrap, activeTab)
117
+ if (box) { placeIndicator(wrap, box.left, box.width) }
56
118
  }
57
119
 
58
120
  function updateIndicator() {
@@ -60,23 +122,26 @@ function updateIndicator() {
60
122
  const wrap = tabsWrap.value
61
123
  if (!wrap) { return }
62
124
 
63
- const apply = () => {
64
- tabEls.value = Array.from(wrap.querySelectorAll<HTMLElement>('.bgl_tab'))
65
- const activeTab = tabEls.value.find(tab => tab.classList.contains('active'))
66
- if (!activeTab) {
67
- wrap.style.setProperty('--indicator-opacity', '0')
68
- return
69
- }
70
- measureActiveTabIndicator(wrap, activeTab)
71
- }
72
-
73
125
  // Double rAF: layout + media-query / font metrics often settle after one frame (e.g. mobile ↔ desktop).
74
126
  requestAnimationFrame(() => {
75
- requestAnimationFrame(apply)
127
+ requestAnimationFrame(() => applyIndicator(wrap))
76
128
  })
77
129
  })
78
130
  }
79
131
 
132
+ /**
133
+ * Enter animations (dialog / panel scale, slide, ...) change the wrapper's visual
134
+ * box without resizing anything the ResizeObserver could see. Re-measure once an
135
+ * ancestor animation finishes; unrelated transitions are ignored.
136
+ */
137
+ function handleMotionEnd(event: Event) {
138
+ const wrap = tabsWrap.value
139
+ const target = event.target
140
+ if (!wrap || !(target instanceof Element)) { return }
141
+ if (target === wrap || !target.contains(wrap)) { return }
142
+ updateIndicator()
143
+ }
144
+
80
145
  function selectTab(tab: Tab) {
81
146
  currentTab.value = typeof tab === 'string' ? tab : tab.value
82
147
  emit('update:modelValue', currentTab.value)
@@ -119,9 +184,18 @@ onMounted(() => {
119
184
  resizeObserver.observe(tabsWrap.value)
120
185
  // The active tab can finish sizing after the wrapper (webfonts, a direct
121
186
  // deep link). Wrapper observation misses that, so the indicator stays at 0.
122
- tabsWrap.value.querySelectorAll('.bgl_tab').forEach(tab => resizeObserver?.observe(tab))
187
+ observeTabs(tabEls.value)
123
188
  }
124
189
 
190
+ // Webfonts can swap in without a ResizeObserver resize (metrics round the same).
191
+ if (typeof document !== 'undefined' && document.fonts) {
192
+ document.fonts.ready.then(() => updateIndicator()).catch(() => {})
193
+ }
194
+
195
+ // Catch ancestor enter/exit animations that page/dialog wrappers run on open.
196
+ document.addEventListener('transitionend', handleMotionEnd, true)
197
+ document.addEventListener('animationend', handleMotionEnd, true)
198
+
125
199
  if (typeof window !== 'undefined' && window.visualViewport) {
126
200
  // Mobile browser chrome / zoom — window "resize" alone can miss this.
127
201
  window.visualViewport.addEventListener('resize', updateIndicator)
@@ -139,8 +213,11 @@ watch(
139
213
  onBeforeUnmount(() => {
140
214
  window.removeEventListener('resize', updateIndicator)
141
215
  tabsWrap.value?.removeEventListener('scroll', updateIndicator)
216
+ document.removeEventListener('transitionend', handleMotionEnd, true)
217
+ document.removeEventListener('animationend', handleMotionEnd, true)
142
218
  resizeObserver?.disconnect()
143
219
  resizeObserver = undefined
220
+ observedTabs.clear()
144
221
  if (typeof window !== 'undefined' && window.visualViewport) {
145
222
  window.visualViewport.removeEventListener('resize', updateIndicator)
146
223
  }
@@ -260,6 +337,12 @@ z-index: 0;
260
337
  opacity: var(--indicator-opacity, 0);
261
338
  }
262
339
 
340
+ /* First placement (e.g. a non-first tab active on open) snaps into place instead
341
+ of sliding across the wrapper from its left edge. */
342
+ .bgl_tabs_wrap.bgl_tabs-indicator-snap::before {
343
+ transition: none;
344
+ }
345
+
263
346
  .bgl_flat-tabs.bgl_tabs_wrap {
264
347
  background: transparent;
265
348
  box-shadow: none;
@@ -100,7 +100,10 @@ function getLightboxInstance(binding: DirectiveBinding): InstanceType<typeof Lig
100
100
  const element = document.createElement('div')
101
101
  document.body.prepend(element)
102
102
  const child = createApp(Lightbox)
103
- const client = owner.runWithContext(() => injectAssetClient())
103
+ // Resolve from the app context first, then from the directive host's own
104
+ // provides — an asset client may be provided by a component (e.g. a lab
105
+ // page or an embedded widget) rather than globally by `app.provide`.
106
+ const client = owner.runWithContext(() => injectAssetClient(binding.instance?.$.provides))
104
107
  if (client) child.provide(ASSET_CLIENT_KEY, client)
105
108
  const instance = child.mount(element) as InstanceType<typeof Lightbox>
106
109
  instances.set(owner, instance)
@@ -116,8 +119,8 @@ function getLightboxInstance(binding: DirectiveBinding): InstanceType<typeof Lig
116
119
  return lightboxInstance
117
120
  }
118
121
 
119
- function injectAssetClient(): AssetClient | undefined {
120
- return inject(ASSET_CLIENT_KEY, undefined)
122
+ function injectAssetClient(provides?: Record<symbol | string, unknown>): AssetClient | undefined {
123
+ return inject(ASSET_CLIENT_KEY, undefined) ?? provides?.[ASSET_CLIENT_KEY] as AssetClient | undefined
121
124
  }
122
125
 
123
126
  const lightboxPlugin: Plugin = {
@@ -454,6 +454,8 @@ export const $ = {
454
454
  max?: number
455
455
  simple?: boolean
456
456
  reorderOnly?: boolean
457
+ /** Row insertion order and Add button placement: 'newest-first' (default) or 'oldest-first'. */
458
+ sortOrder?: 'newest-first' | 'oldest-first'
457
459
  }),
458
460
  maybeConfig?: BaseFieldConfig & {
459
461
  allowAdd?: boolean
@@ -464,6 +466,8 @@ export const $ = {
464
466
  max?: number
465
467
  simple?: boolean
466
468
  reorderOnly?: boolean
469
+ /** Row insertion order and Add button placement: 'newest-first' (default) or 'oldest-first'. */
470
+ sortOrder?: 'newest-first' | 'oldest-first'
467
471
  }
468
472
  ): FieldBuilder<any[]> {
469
473
  // Label-first: $.array('Items', schema) or $.array('Items', schema, { min: 1 })
@@ -852,6 +856,7 @@ type JSONSchemaProperty = Omit<
852
856
  hidden?: boolean
853
857
  allowAdd?: boolean
854
858
  allowDelete?: boolean
859
+ sortOrder?: 'newest-first' | 'oldest-first'
855
860
  component?: string
856
861
  componentProps?: Record<string, any>
857
862
  radioAlign?: 'start' | 'center' | 'end'
@@ -1262,6 +1267,7 @@ function createFieldFromProperty(
1262
1267
  const arrayConfig: Record<string, any> = { ...config }
1263
1268
  if (xUi.allowAdd !== undefined) arrayConfig.allowAdd = xUi.allowAdd
1264
1269
  if (xUi.allowDelete !== undefined) arrayConfig.allowDelete = xUi.allowDelete
1270
+ if (xUi.sortOrder !== undefined) arrayConfig.sortOrder = xUi.sortOrder
1265
1271
  const itemSchema = resolvedProp.items?.type === 'object'
1266
1272
  ? fromJSONSchema(resolvedProp.items as JSONSchemaObject, { loadOptionsSource })
1267
1273
  : undefined
@@ -12,7 +12,25 @@
12
12
  "dropPlaceholder": "Drag and Drop files here or click to upload",
13
13
  "delete": "Delete",
14
14
  "replace": "Replace",
15
- "download": "Download"
15
+ "download": "Download",
16
+ "cancel": "Cancel",
17
+ "crop": "Crop",
18
+ "cropTitle": "Crop image",
19
+ "cropApply": "Crop and upload",
20
+ "cropReset": "Reset",
21
+ "cropExisting": "Crop",
22
+ "cropApplyExisting": "Apply crop",
23
+ "cropOriginal": "Original",
24
+ "cropFree": "Free",
25
+ "cropSize": "Crop size",
26
+ "cropPixels": "Size in pixels",
27
+ "cropWidth": "Width",
28
+ "cropHeight": "Height",
29
+ "cropMax": "Max {w}×{h} px",
30
+ "cropHint": "Drag to move · drag a corner to resize",
31
+ "tooMany": "Too many files (max {max})",
32
+ "tooLarge": "File is too large (max {max} MB)",
33
+ "failed": "Upload failed. Please try again."
16
34
  },
17
35
  "pagination": {
18
36
  "of": "of",
@@ -12,7 +12,25 @@
12
12
  "dropPlaceholder": "Arrastra y suelta archivos aquí o haz clic para subir",
13
13
  "delete": "Eliminar",
14
14
  "replace": "Reemplazar",
15
- "download": "Descargar"
15
+ "download": "Descargar",
16
+ "cancel": "Cancelar",
17
+ "crop": "Recortar",
18
+ "cropTitle": "Recortar imagen",
19
+ "cropApply": "Recortar y subir",
20
+ "cropReset": "Restablecer",
21
+ "cropExisting": "Recortar",
22
+ "cropApplyExisting": "Aplicar recorte",
23
+ "cropOriginal": "Original",
24
+ "cropFree": "Libre",
25
+ "cropSize": "Tamaño del recorte",
26
+ "cropPixels": "Tamaño en píxeles",
27
+ "cropWidth": "Ancho",
28
+ "cropHeight": "Alto",
29
+ "cropMax": "Máx. {w}×{h} px",
30
+ "cropHint": "Arrastra para mover · arrastra una esquina para cambiar el tamaño",
31
+ "tooMany": "Demasiados archivos (máx. {max})",
32
+ "tooLarge": "El archivo es demasiado grande (máx. {max} MB)",
33
+ "failed": "Error al subir. Inténtalo de nuevo."
16
34
  },
17
35
  "pagination": {
18
36
  "of": "de",
@@ -12,7 +12,25 @@
12
12
  "dropPlaceholder": "Glissez-déposez des fichiers ici ou cliquez pour télécharger",
13
13
  "delete": "Supprimer",
14
14
  "replace": "Remplacer",
15
- "download": "Télécharger"
15
+ "download": "Télécharger",
16
+ "cancel": "Annuler",
17
+ "crop": "Recadrer",
18
+ "cropTitle": "Recadrer l'image",
19
+ "cropApply": "Recadrer et téléverser",
20
+ "cropReset": "Réinitialiser",
21
+ "cropExisting": "Recadrer",
22
+ "cropApplyExisting": "Appliquer le recadrage",
23
+ "cropOriginal": "Original",
24
+ "cropFree": "Libre",
25
+ "cropSize": "Taille du recadrage",
26
+ "cropPixels": "Taille en pixels",
27
+ "cropWidth": "Largeur",
28
+ "cropHeight": "Hauteur",
29
+ "cropMax": "Max. {w}×{h} px",
30
+ "cropHint": "Glissez pour déplacer · glissez un coin pour redimensionner",
31
+ "tooMany": "Trop de fichiers (max {max})",
32
+ "tooLarge": "Fichier trop volumineux (max {max} Mo)",
33
+ "failed": "Échec du téléversement. Réessayez."
16
34
  },
17
35
  "pagination": {
18
36
  "of": "de",
@@ -256,7 +274,8 @@
256
274
  "inviteError": "Erreur lors de l'envoi de l'invitation",
257
275
  "deleteInviteConfirm": "Supprimer l'invitation ?",
258
276
  "deleteInviteError": "Erreur lors de la suppression de l'invitation",
259
- "removeUserConfirm": "Retirer {email} ?" },
277
+ "removeUserConfirm": "Retirer {email} ?"
278
+ },
260
279
  "calendar": {
261
280
  "today": "Aujourd'hui",
262
281
  "views": {
@@ -12,7 +12,25 @@
12
12
  "dropPlaceholder": "גרור ושחרר קבצים כאן או לחץ להעלאה",
13
13
  "delete": "מחק",
14
14
  "replace": "החלף",
15
- "download": "הורד"
15
+ "download": "הורד",
16
+ "cancel": "ביטול",
17
+ "crop": "חיתוך",
18
+ "cropTitle": "חיתוך תמונה",
19
+ "cropApply": "חתוך והעלה",
20
+ "cropReset": "איפוס",
21
+ "cropExisting": "חיתוך",
22
+ "cropApplyExisting": "החל חיתוך",
23
+ "cropOriginal": "מקורי",
24
+ "cropFree": "חופשי",
25
+ "cropSize": "גודל החיתוך",
26
+ "cropPixels": "גודל בפיקסלים",
27
+ "cropWidth": "רוחב",
28
+ "cropHeight": "גובה",
29
+ "cropMax": "מקסימום {w}×{h} px",
30
+ "cropHint": "גרור להזזה · גרור פינה לשינוי הגודל",
31
+ "tooMany": "יותר מדי קבצים (מקסימום {max})",
32
+ "tooLarge": "הקובץ גדול מדי (מקסימום {max}MB)",
33
+ "failed": "ההעלאה נכשלה. נסה שוב."
16
34
  },
17
35
  "pagination": {
18
36
  "of": "מתוך",
@@ -12,7 +12,25 @@
12
12
  "dropPlaceholder": "Trascina e rilascia i file qui o clicca per caricare",
13
13
  "delete": "Elimina",
14
14
  "replace": "Sostituisci",
15
- "download": "Scarica"
15
+ "download": "Scarica",
16
+ "cancel": "Annulla",
17
+ "crop": "Ritaglia",
18
+ "cropTitle": "Ritaglia immagine",
19
+ "cropApply": "Ritaglia e carica",
20
+ "cropReset": "Reimposta",
21
+ "cropExisting": "Ritaglia",
22
+ "cropApplyExisting": "Applica ritaglio",
23
+ "cropOriginal": "Originale",
24
+ "cropFree": "Libero",
25
+ "cropSize": "Dimensione del ritaglio",
26
+ "cropPixels": "Dimensione in pixel",
27
+ "cropWidth": "Larghezza",
28
+ "cropHeight": "Altezza",
29
+ "cropMax": "Max {w}×{h} px",
30
+ "cropHint": "Trascina per spostare · trascina un angolo per ridimensionare",
31
+ "tooMany": "Troppi file (max {max})",
32
+ "tooLarge": "File troppo grande (max {max}MB)",
33
+ "failed": "Caricamento non riuscito. Riprova."
16
34
  },
17
35
  "pagination": {
18
36
  "of": "di",
@@ -12,7 +12,25 @@
12
12
  "dropPlaceholder": "Перетащите файлы сюда или нажмите для загрузки",
13
13
  "delete": "Удалить",
14
14
  "replace": "Заменить",
15
- "download": "Скачать"
15
+ "download": "Скачать",
16
+ "cancel": "Отмена",
17
+ "crop": "Обрезать",
18
+ "cropTitle": "Обрезать изображение",
19
+ "cropApply": "Обрезать и загрузить",
20
+ "cropReset": "Сбросить",
21
+ "cropExisting": "Обрезать",
22
+ "cropApplyExisting": "Применить обрезку",
23
+ "cropOriginal": "Оригинал",
24
+ "cropFree": "Свободно",
25
+ "cropSize": "Размер обрезки",
26
+ "cropPixels": "Размер в пикселях",
27
+ "cropWidth": "Ширина",
28
+ "cropHeight": "Высота",
29
+ "cropMax": "Макс. {w}×{h} px",
30
+ "cropHint": "Перетащите, чтобы переместить · потяните за угол, чтобы изменить размер",
31
+ "tooMany": "Слишком много файлов (макс. {max})",
32
+ "tooLarge": "Файл слишком большой (макс. {max} МБ)",
33
+ "failed": "Не удалось загрузить. Попробуйте снова."
16
34
  },
17
35
  "pagination": {
18
36
  "of": "из",
@@ -100,6 +100,10 @@ select {
100
100
  width: 100%;
101
101
  }
102
102
 
103
+ .bg-input-bg {
104
+ background: var(--bgl-input-bg);
105
+ }
106
+
103
107
  /* A multiline textarea is a tall box, not a single input row — a pill/large
104
108
  `--bgl-input-border-radius` (e.g. an app that rounds inputs into pills) looks
105
109
  wrong on it (the huge corners bite into the top/bottom lines). Use a dedicated
@@ -231,4 +231,38 @@ export interface UploadInputProps extends BagelInputShellProps {
231
231
  icon?: string
232
232
  iconSize?: number | string
233
233
  iconMobileSize?: number | string
234
+ /** Stroke weight of the leading icon (Material Symbols `wght` axis, 100–700). @default 300 */
235
+ iconWeight?: number | string
236
+ /**
237
+ * Dropzone theme — render the inner upload button; the whole area stays clickable.
238
+ * `auto` hides it for `oval`, where the circle is the affordance. @default 'auto'
239
+ */
240
+ showButton?: boolean | 'auto'
241
+ /** Show a short-lived success check over a file once its upload finishes. */
242
+ showSuccess?: boolean
243
+ /** Cap the preview area; requires `scroll` to scroll instead of growing. */
244
+ maxHeight?: string
245
+ scroll?: boolean
246
+ /** `inside` renders previews in the drop frame; `below` keeps the frame empty and lists files under it. */
247
+ previewLayout?: 'inside' | 'below'
248
+ /** Multiple-image preview arrangement. */
249
+ previewType?: 'list' | 'grid'
250
+ /** Largest accepted file count for `multiple`. */
251
+ maxFiles?: number
252
+ /** Largest accepted file size in megabytes. */
253
+ maxSize?: number
254
+ /** Return false (or throw) to reject a file before it is queued. */
255
+ beforeUpload?: (file: File) => boolean | Promise<boolean>
256
+ /** Let the user crop picked images before they are uploaded (asset mode). */
257
+ crop?: boolean
258
+ /** Crop frame ratio, e.g. `'1'`, `'16-9'`, `'3-4'`; omit for a free frame. */
259
+ cropAspect?: string
260
+ /**
261
+ * Let the user re-crop an image that is already stored (single, list and grid previews).
262
+ * On by default — the crop action is hidden only while a file is still uploading, so
263
+ * pass `false` to remove it entirely. @default true
264
+ */
265
+ cropExisting?: boolean
266
+ /** Longest side of the cropped output in pixels. @default 2048 */
267
+ cropOutputSize?: number
234
268
  }