@xleddyl/443-components-vue 0.16.99 → 0.16.101
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
CHANGED
|
@@ -661,7 +661,7 @@ On your own elements, `paletteClass(color)` gives the class of a palette name an
|
|
|
661
661
|
|
|
662
662
|
- `FileDropOverlay` shows the `over` state of `useFileDrop` over a whole area (a media gallery): it covers its positioned container (`position: relative`) with a dashed `--k-ring` border on a translucent blurred surface, an icon (`icon`, default `arrow-up-tray`, or the `#icon` slot), a title (`title` or the default slot for rich text, default "Release to add files", `fileInput.drop`) and a `description` (or `#description`). `active` shows it (default `true`, bind `over`); it fades in, ignores the pointer so the drop reaches the container, and is hidden from assistive technology like the drag itself. `--k-file-drop-overlay-inset` (default 0, a negative value bleeds past the container) and `--k-file-drop-overlay-radius` (default `--k-radius-lg`) adjust it: `<KFileDropOverlay :active="over">Drop to upload to <strong>{{ folder }}</strong></KFileDropOverlay>`.
|
|
663
663
|
- `useFileDialog({ accept, multiple, directory, onChange })` opens the native file dialog from any action (a menu item `onSelect`, a button) without a visible input. `open(overrides?)` must run inside the user gesture and resolves to the chosen `File[]` (empty when the dialog is cancelled); `files` keeps the last choice and `reset()` clears it. The options take refs or getters, `open({ accept, multiple, directory })` overrides them for one call: `const [file] = await useFileDialog({ accept: '.csv' }).open()`.
|
|
664
|
-
- `useFileDrop` returns `{ over, reset }` and takes `ignore(event)
|
|
664
|
+
- `useFileDrop` returns `{ over, reset }` and takes `ignore(event)`, called before the composable prevents the default, so `ignore: (event) => event.defaultPrevented` skips the drags a nested element has already taken (an inner drop target) and keeps `over` on for the rest of the area. A drop handled by a nested drop zone is skipped by the outer ones, and the state resets after any drop, even when a child stops propagation. `readDroppedFiles(dataTransfer)` walks dropped folders (call it synchronously in the drop handler) and resolves to `[{ file, path }]`; `readDroppedFiles(dataTransfer, { directories: true })` resolves to `{ files, directories }` with every folder path, empty ones included, and `skipHidden: true` leaves out dot entries.
|
|
665
665
|
- `Tabs` items take `badgeTone` and `badgeLabel` (the accessible name of the badge); the `#panel="{ item }"` slot renders a single panel for the active tab. `stretch` makes the tabs fill the remaining height of a flex column and the active panel grow with it (`flex: 1; min-height: 0`), and `inset` spaces the tab list from the container edges with the panel flush below it, for inspectors and side panes. `Breadcrumbs` items take `attrs` and `onClick` (an item without a link renders a button, handy for drop targets), `#item` customizes the content, and `ancestors` links every item and ends with a separator (`breadcrumbsAncestors` on `PageHeader`). `heading` (a heading level) renders the current item as that heading, for a trail that is the title of the page. `size` is `sm` (0.75rem with tighter gaps, for panel headers and inspectors), `md` (default) or `lg` (a title sized trail). `Accordion` takes `variant` `card` (default), `outline` (the same card without a shadow), `separated` or `plain`; items take `description`, and `contentVariant="neutral"` drops the text styling of the content (it inherits font size and color, for forms) and keeps the padding of the item, aligned with the trigger. `:padded="false"` drops the content padding for content that brings its own spacing or reaches the edges (a list, a table, a tree), with either content variant. `divided` draws a `--k-line` divider between the trigger and the open content (the line between the items of the `card` and `outline` variants), with a matching top padding when the content is padded; use it for a form section in `contentVariant="neutral"`.
|
|
666
666
|
- `RichTextEditor` labels heading buttons by their real level (`headingLabel="relative"` numbers them from 1) and `toolbar` picks and orders the buttons: `['headings', '|', 'bold', 'italic', 'link']`.
|
|
667
667
|
|
|
@@ -89,22 +89,19 @@ export function useFileDrop(target, options) {
|
|
|
89
89
|
over.value = false;
|
|
90
90
|
watchWindow(false);
|
|
91
91
|
}
|
|
92
|
-
function track(event) {
|
|
93
|
-
covered =
|
|
94
|
-
if (!
|
|
92
|
+
function track(event, ignored) {
|
|
93
|
+
covered = ignored;
|
|
94
|
+
if (!ignored) {
|
|
95
|
+
event.preventDefault();
|
|
96
|
+
claimedEvents.add(event);
|
|
97
|
+
}
|
|
95
98
|
sync();
|
|
96
99
|
}
|
|
97
100
|
function onDragEnter(event) {
|
|
98
101
|
if (!carriesFiles(event) || isDisabled()) return;
|
|
99
102
|
depth++;
|
|
100
103
|
watchWindow(true);
|
|
101
|
-
|
|
102
|
-
covered = true;
|
|
103
|
-
sync();
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
event.preventDefault();
|
|
107
|
-
track(event);
|
|
104
|
+
track(event, isIgnored(event));
|
|
108
105
|
}
|
|
109
106
|
function onDragOver(event) {
|
|
110
107
|
if (!carriesFiles(event)) return;
|
|
@@ -115,14 +112,9 @@ export function useFileDrop(target, options) {
|
|
|
115
112
|
}
|
|
116
113
|
return;
|
|
117
114
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
event.preventDefault();
|
|
124
|
-
if (event.dataTransfer) event.dataTransfer.dropEffect = "copy";
|
|
125
|
-
track(event);
|
|
115
|
+
const ignored = isIgnored(event);
|
|
116
|
+
track(event, ignored);
|
|
117
|
+
if (!ignored && event.dataTransfer) event.dataTransfer.dropEffect = "copy";
|
|
126
118
|
}
|
|
127
119
|
function onDragLeave(event) {
|
|
128
120
|
if (!carriesFiles(event)) return;
|
|
@@ -110,6 +110,10 @@
|
|
|
110
110
|
font-size: 1.375rem;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
.k-breadcrumbs.k-page-header-trail .k-breadcrumbs-link {
|
|
114
|
+
margin-block: -0.125rem;
|
|
115
|
+
}
|
|
116
|
+
|
|
113
117
|
.k-page-header.is-truncated .k-page-header-trail .k-breadcrumbs-list {
|
|
114
118
|
flex-wrap: nowrap;
|
|
115
119
|
}
|
|
@@ -194,6 +198,10 @@
|
|
|
194
198
|
letter-spacing: -0.006em;
|
|
195
199
|
}
|
|
196
200
|
|
|
201
|
+
.k-page-header-sm .k-breadcrumbs.k-page-header-trail .k-breadcrumbs-link {
|
|
202
|
+
margin-block: -0.0625rem;
|
|
203
|
+
}
|
|
204
|
+
|
|
197
205
|
.k-page-header-sm .k-page-header-trail .k-breadcrumbs-current {
|
|
198
206
|
font-weight: inherit;
|
|
199
207
|
}
|
package/package.json
CHANGED