@htmlbricks/hb-input-file 0.66.27 → 0.67.1

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.
package/manifest.json CHANGED
@@ -42,6 +42,10 @@
42
42
  "Component": {
43
43
  "additionalProperties": false,
44
44
  "properties": {
45
+ "i18nlang": {
46
+ "description": "BCP-47 / short code (e.g. `en`, `it`) for built-in UI strings.",
47
+ "type": "string"
48
+ },
45
49
  "id": {
46
50
  "type": "string"
47
51
  },
@@ -113,7 +117,7 @@
113
117
  }
114
118
  }
115
119
  },
116
- "description": "File picker with `accept` from `schemaentry.params.accept` (defaults to any file), optional image preview or Bootstrap Icons by MIME type, and an optional clickable `placeHolderImage` that opens the hidden input. Clears selection with the remove control; validates required fields against an actual chosen file. Dispatches `setVal` with `{ value, valid, id }`.",
120
+ "description": "File picker with `accept` from `schemaentry.params.accept` (defaults to any file). Standard layout uses Bulma `file has-name` plus a MIME Bootstrap Icons glyph when a file is selected, and a text × clear control. With `placeHolderImage`, a clickable placeholder opens the hidden input; after selection, preview / MIME icon, filename, and clear. When `accept` includes `image` and the chosen file is a raster/SVG image, the placeholder preview shows the filename on a semi-transparent bar over the image and an outlined clear button at the top-right. `File.type` from the browser is preferred over extension mapping. Strings come from `i18nlang` (`en` / `it`). Dispatches `setVal` with `{ value, valid, id }`.",
117
121
  "storybookArgs": {
118
122
  "schemaentry": {
119
123
  "control": {
@@ -125,6 +129,15 @@
125
129
  "type": "boolean"
126
130
  }
127
131
  },
132
+ "i18nlang": {
133
+ "control": {
134
+ "type": "select"
135
+ },
136
+ "options": [
137
+ "en",
138
+ "it"
139
+ ]
140
+ },
128
141
  "setVal": {
129
142
  "action": "setVal"
130
143
  }
@@ -132,6 +145,18 @@
132
145
  "styleSetup": {
133
146
  "vars": [],
134
147
  "parts": [
148
+ {
149
+ "name": "input",
150
+ "description": "Native file input."
151
+ },
152
+ {
153
+ "name": "file-name",
154
+ "description": "Filename when a file is chosen, or the “no file selected” hint (standard mode)."
155
+ },
156
+ {
157
+ "name": "clear",
158
+ "description": "Clear button between the choose-file CTA and the filename strip (standard mode, when a file is selected)."
159
+ },
135
160
  {
136
161
  "name": "invalid-feedback",
137
162
  "description": ""
@@ -140,7 +165,16 @@
140
165
  },
141
166
  "contributors": [],
142
167
  "htmlSlots": [],
143
- "i18n": [],
168
+ "i18n": [
169
+ {
170
+ "lang": "en",
171
+ "language": "english"
172
+ },
173
+ {
174
+ "lang": "it",
175
+ "language": "italian"
176
+ }
177
+ ],
144
178
  "examples": [
145
179
  {
146
180
  "name": "default",
@@ -175,7 +209,8 @@
175
209
  }
176
210
  }
177
211
  ],
178
- "iifeIntegrity": "sha384-cpFyxewYGdgTCLfa0xq89uwwHvie6UI6ur5b5zxpw3jVFg1SstDLeoHEx+rng5oT",
212
+ "iifeIntegrity": "sha384-/GKYndYZbLWOX0BA9Y45q26cBiiuMpBOeOBdg4CLxEScbvbUxXiI029LCNsut/Ut",
213
+ "dependencies": [],
179
214
  "screenshots": [],
180
215
  "licenses": [
181
216
  {
@@ -194,5 +229,5 @@
194
229
  "size": {},
195
230
  "iifePath": "main.iife.js",
196
231
  "repoName": "@htmlbricks/hb-input-file",
197
- "version": "0.66.27"
232
+ "version": "0.67.1"
198
233
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-input-file",
3
- "version": "0.66.27",
3
+ "version": "0.67.1",
4
4
  "contributors": [],
5
- "description": "File picker with `accept` from `schemaentry.params.accept` (defaults to any file), optional image preview or Bootstrap Icons by MIME type, and an optional clickable `placeHolderImage` that opens the hidden input. Clears selection with the remove control; validates required fields against an actual chosen file. Dispatches `setVal` with `{ value, valid, id }`.",
5
+ "description": "File picker with `accept` from `schemaentry.params.accept` (defaults to any file). Standard layout uses Bulma `file has-name` plus a MIME Bootstrap Icons glyph when a file is selected, and a text × clear control. With `placeHolderImage`, a clickable placeholder opens the hidden input; after selection, preview / MIME icon, filename, and clear. When `accept` includes `image` and the chosen file is a raster/SVG image, the placeholder preview shows the filename on a semi-transparent bar over the image and an outlined clear button at the top-right. `File.type` from the browser is preferred over extension mapping. Strings come from `i18nlang` (`en` / `it`). Dispatches `setVal` with `{ value, valid, id }`.",
6
6
  "licenses": [
7
7
  {
8
8
  "type": "Apache-2.0",
@@ -5,6 +5,10 @@
5
5
  "Component": {
6
6
  "additionalProperties": false,
7
7
  "properties": {
8
+ "i18nlang": {
9
+ "description": "BCP-47 / short code (e.g. `en`, `it`) for built-in UI strings.",
10
+ "type": "string"
11
+ },
8
12
  "id": {
9
13
  "type": "string"
10
14
  },
@@ -42,6 +42,8 @@ export type Component = {
42
42
 
43
43
  show_validation?: "yes" | "no";
44
44
  schemaentry: FormSchemaEntry;
45
+ /** BCP-47 / short code (e.g. `en`, `it`) for built-in UI strings. */
46
+ i18nlang?: string;
45
47
  };
46
48
 
47
49
  export type Events = { setVal: { value: string; valid: boolean; id: string } };