@htmlbricks/hb-input-file 0.66.26 → 0.67.0
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/README.md +6 -1
- package/main.iife.js +64 -73
- package/main.iife.js.map +1 -1
- package/manifest.json +39 -4
- package/package.json +2 -2
- package/types/webcomponent.type.d.json +4 -0
- package/types/webcomponent.type.d.ts +2 -0
package/README.md
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## Description
|
|
4
4
|
|
|
5
|
-
File picker with `accept` from `schemaentry.params.accept` (defaults to any file)
|
|
5
|
+
File picker with `accept` from `schemaentry.params.accept` (defaults to any file). **Standard mode** uses Bulma `file has-name`: CTA → **clear** (`×`) → filename strip (MIME icon + name) as one continuous control inside the same `file-label`. The clear button uses `preventDefault` / `stopPropagation` so it does not open the file dialog. **Placeholder image mode** (`params.placeHolderImage`) keeps the clickable image + translated “select image” copy and, after selection, preview (or MIME icon), filename, and clear. Set **`i18nlang`** (e.g. `en`, `it`) for UI strings; `hb-form` forwards its `i18nlang` to this control. Validates required fields against an actual chosen file. Dispatches `setVal` with `{ value, valid, id }`.
|
|
6
|
+
|
|
7
|
+
## Styling (Bulma)
|
|
8
|
+
|
|
9
|
+
Shadow bundle: `form/shared`, `form/input-textarea`, `form/file`, `form/tools`, `elements/button`. Bootstrap Icons CSS is `@import`ed from `styles/webcomponent.scss` so glyph rules and `@font-face` apply inside the shadow root (document-level `<link>` / `<svelte:head>` would not).
|
|
6
10
|
|
|
7
11
|
## Types
|
|
8
12
|
|
|
@@ -51,6 +55,7 @@ export type Component = {
|
|
|
51
55
|
|
|
52
56
|
show_validation?: "yes" | "no";
|
|
53
57
|
schemaentry: FormSchemaEntry;
|
|
58
|
+
i18nlang?: string;
|
|
54
59
|
};
|
|
55
60
|
|
|
56
61
|
export type Events = { setVal: { value: string; valid: boolean; id: string } };
|