@xleddyl/443-components-vue 0.16.82 → 0.16.83
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/CATALOG.md
CHANGED
|
@@ -188,7 +188,7 @@ All field components work inside `FormField` and take `invalid`, `disabled`, `re
|
|
|
188
188
|
| `ColorInput` | Color text field with picker and swatches. | Model: hex string or null. Props: `swatches` (strings or `{ value, label }`), `placeholder`, `invalidText`. | `forms/color-input.vue` |
|
|
189
189
|
| `PaletteSelect` | Select of a palette color, with the dot and the localized color name. | Model: `ColorValue` (palette name or `#rrggbb`) or null. A non-searchable `Combobox` (pass `:searchable="true"` to type a filter). Props: `colors` (subset of `PALETTE_COLORS`), `clearable` (placeholder "Automatic"), `custom` (adds "Custom": choosing it shows a `ColorInput` under the select and the model becomes the hex), `customLabel` (name of the color input), `placeholder`, `size`, `disabled`, `readonly`, `invalid`. | `forms/palette-select.vue` |
|
|
190
190
|
| `Slider` | Number in a range with drag handle. | Model: number. Props: `min`, `max`, `step`, `bubble` (true, always), `marks`, `format(value)`, `label`. Event: `change` (on release). | `forms/slider.vue` |
|
|
191
|
-
| `FileInput` | Drop zone and file picker. Validates type, size and count. Supports folders and previews. | Model: `File`, `File[]` or null. Props: `accept`, `acceptMode`, `maxSize`, `maxFiles`, `multiple`, `directory`, `directoryAction`, `previews`, `list`, `loading`, `capture`, `title`, `dropText`, `hint`. Slots: `title`, `hint`, `actions`. Events: `add`, `remove`, `invalid`, `reject`.
|
|
191
|
+
| `FileInput` | Drop zone and file picker. Validates type, size and count. Supports folders and previews. | Model: `File`, `File[]` or null. Props: `accept`, `acceptMode`, `maxSize`, `maxFiles`, `multiple`, `directory`, `directoryAction`, `previews`, `list`, `fill` (fills the height of its parent, centered), `loading`, `capture`, `title`, `dropText`, `hint`. Slots: `title`, `hint`, `actions`. Events: `add`, `remove`, `invalid`, `reject`. | `forms/file-input.vue` |
|
|
192
192
|
|
|
193
193
|
## Overlays
|
|
194
194
|
|
package/README.md
CHANGED
|
@@ -536,7 +536,7 @@ On your own elements, `paletteClass(color)` gives the class of a palette name an
|
|
|
536
536
|
- `SelectionBar` shows a plural aware selected count (announced in a live region), select all (`total` plus `@select-all`) and clear (`@clear`) actions, an `#actions` slot and `placement` `inline`, `sticky` or `floating`. With `count` 0 it renders no box (only its live region), so it can sit in a flex toolbar without adding a gap; the first count after mount is announced too. `ListPage` renders it for `#bulk`.
|
|
537
537
|
- `FilterPills` is generic: the value type comes from the options, `multiple` makes the model an array and `required` drops `null` from it (like `SegmentedControl`). Options take `menu` items (a dropdown trigger showing `valueLabel`) or `panel: true`, which opens a popover with the `#panel-<value>` slot (`{ option, active, toggle, close }`, `panelLabel` names it). The `#pill` slot renders any trigger and its scope has `defaultPill`, a component that renders the built-in pill for that option, so one custom pill does not mean rewriting the others: `<component :is="defaultPill" v-else />`. `FilterPill` is exported so custom triggers match the other pills.
|
|
538
538
|
- `SegmentedControl` with `required` narrows `v-model` to a non null value. Options take `title` (tooltip and description) and `muted`, and the `#option` slot replaces the content of each option.
|
|
539
|
-
- `FileInput` takes `directory` (folder picker; dropped folders are walked, every file keeps its relative path) or `directory="drop"` (the click opens a file picker, dropped folders are still walked), `directoryAction` (an "Upload a folder" button under the dropzone, `directoryActionLabel` renames it) or the `#actions` slot (`{ browse, browseDirectory, disabled }`), `skipHidden` (ignores dot files and dot folders), `list: false` (no file list: picks and drops only emit `add`), `loading` and the `#hint` slot. `add` receives `(files, { entries: [{ file, path }], directories, source, event, dataTransfer })`; `directories` lists every folder path of a folder pick or drop, empty folders included, and `add` also fires for a drop of empty folders. `invalid` fires per file and `reject` once with every rejected file (`(events, detail)`). `acceptMode="hint"` only passes `accept` to the picker and leaves filtering to the host. The component exposes `browse()`, `browseDirectory()`, `addFiles()` and `focus()`.
|
|
539
|
+
- `FileInput` takes `directory` (folder picker; dropped folders are walked, every file keeps its relative path) or `directory="drop"` (the click opens a file picker, dropped folders are still walked), `directoryAction` (an "Upload a folder" button under the dropzone, `directoryActionLabel` renames it) or the `#actions` slot (`{ browse, browseDirectory, disabled }`), `skipHidden` (ignores dot files and dot folders), `list: false` (no file list: picks and drops only emit `add`), `fill` (the dropzone fills the height of its flex column parent, with the icon and the text centered: an import screen), `loading` and the `#hint` slot. `add` receives `(files, { entries: [{ file, path }], directories, source, event, dataTransfer })`; `directories` lists every folder path of a folder pick or drop, empty folders included, and `add` also fires for a drop of empty folders. `invalid` fires per file and `reject` once with every rejected file (`(events, detail)`). `acceptMode="hint"` only passes `accept` to the picker and leaves filtering to the host. The component exposes `browse()`, `browseDirectory()`, `addFiles()` and `focus()`.
|
|
540
540
|
- `TagList` renders `v-model` (`TagListItem[]`: `value`, `label`, `tone`, `icon`, `removable`, `disabled`) as `Tag` chips in a labelled list (`label`, default "Items"). `removable` (or `removable` per item) adds the remove button; the chip is dropped from the model, `remove(item, index)` fires, focus moves to the neighbor and "Label removed" is announced. `sortable` reorders by pointer drag (the list updates live while dragging, Escape cancels), and the chips become one tab stop: the arrow keys, Home and End move between chips, Alt with an arrow key (or Alt with Home and End) moves the focused chip, Delete removes it, and every move is announced ("Name moved to position 2 of 4", `sortable.moved`). `moveButtons` adds "Move earlier" and "Move later" buttons to every chip, a single pointer alternative to dragging. A disabled item cannot move or be removed. `move({ item, from, to })` fires after each move. `accept` (a MIME type, a list of them, or `(event) => boolean`) makes the list a drop target for native drags from outside: an insertion marker follows the pointer and `itemDrop({ index, dataTransfer, event })` (`@item-drop`, named apart from the native `drop` event) gives the insertion index, so the host inserts the item (`dropEffect`, default `copy`, must match the `effectAllowed` of the source). The `#item` slot (`{ item, index }`) replaces the chip label.
|
|
541
541
|
|
|
542
542
|
```vue
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
'is-disabled': control.disabled.value,
|
|
10
10
|
'is-invalid': control.invalid.value,
|
|
11
11
|
'is-loading': loading,
|
|
12
|
+
'is-fill': fill,
|
|
12
13
|
'has-files': list && files.length > 0
|
|
13
14
|
},
|
|
14
15
|
props.class
|
|
@@ -169,6 +170,7 @@ const props = defineProps({
|
|
|
169
170
|
capture: { type: String, required: false },
|
|
170
171
|
previews: { type: Boolean, required: false, default: true },
|
|
171
172
|
size: { type: String, required: false, default: "md" },
|
|
173
|
+
fill: { type: Boolean, required: false },
|
|
172
174
|
icon: { type: null, required: false, default: "arrow-up-tray" },
|
|
173
175
|
title: { type: String, required: false },
|
|
174
176
|
dropText: { type: String, required: false },
|
|
@@ -33,6 +33,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
33
33
|
capture?: "user" | "environment";
|
|
34
34
|
previews?: boolean;
|
|
35
35
|
size?: FieldSize;
|
|
36
|
+
fill?: boolean;
|
|
36
37
|
icon?: IconName;
|
|
37
38
|
title?: string | undefined;
|
|
38
39
|
dropText?: string;
|
|
@@ -275,6 +276,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
275
276
|
capture?: "user" | "environment";
|
|
276
277
|
previews?: boolean;
|
|
277
278
|
size?: FieldSize;
|
|
279
|
+
fill?: boolean;
|
|
278
280
|
icon?: IconName;
|
|
279
281
|
title?: string | undefined;
|
|
280
282
|
dropText?: string;
|
|
@@ -34,6 +34,31 @@
|
|
|
34
34
|
padding: 1.375rem 1.25rem;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
.k-file-input.is-fill {
|
|
38
|
+
flex: 1;
|
|
39
|
+
min-height: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.k-file-input.is-fill .k-file-input-dropzone {
|
|
43
|
+
flex: 1;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
gap: 0.875rem;
|
|
47
|
+
padding: 2rem 1.5rem;
|
|
48
|
+
text-align: center;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.k-file-input.is-fill .k-file-input-dropzone-text {
|
|
52
|
+
align-items: center;
|
|
53
|
+
gap: 0.25rem;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.k-file-input.is-fill .k-file-input-dropzone-icon {
|
|
57
|
+
--k-icon-size: 1.5rem;
|
|
58
|
+
width: 3rem;
|
|
59
|
+
height: 3rem;
|
|
60
|
+
}
|
|
61
|
+
|
|
37
62
|
.k-file-input-dropzone:hover:not(:disabled) {
|
|
38
63
|
border-color: var(--k-text-dimmed);
|
|
39
64
|
background: color-mix(in oklab, var(--k-accent) 3%, var(--k-subtle));
|
package/package.json
CHANGED