@xleddyl/443-components-vue 0.16.113 → 0.16.114
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 +20 -20
- package/README.md +1 -1
- package/dist/components/layout/PageHeader.vue +25 -4
- package/dist/components/layout/PageHeader.vue.d.ts +5 -3
- package/dist/components/layout/ResizeHandle.vue +8 -3
- package/dist/internal/core/actions-collapse.d.ts +10 -0
- package/dist/internal/core/actions-collapse.mjs +38 -0
- package/dist/internal/overlays/ActionsMenu.vue +32 -0
- package/dist/internal/overlays/ActionsMenu.vue.d.ts +435 -0
- package/dist/internal/overlays/DialogFrame.vue +15 -68
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/types.d.ts +1 -1
- package/dist/styles/layout/app-shell.css +3 -0
- package/dist/styles/layout/page-header.css +7 -1
- package/dist/styles/overlays/actions-menu.css +46 -0
- package/dist/styles/overlays/drawer.css +0 -49
- package/dist/styles/overlays.css +1 -0
- package/package.json +1 -1
package/CATALOG.md
CHANGED
|
@@ -250,26 +250,26 @@ Mount `OverlayHost` once for the imperative hooks (see [Composables](#composable
|
|
|
250
250
|
|
|
251
251
|
## Layout
|
|
252
252
|
|
|
253
|
-
| Component | Purpose and when to use it | Main props, models, slots, events
|
|
254
|
-
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
255
|
-
| `Card` | Container with optional title, description, icon, actions and footer. Can be a link or a selectable button. | Props: `title`, `description`, `icon`, `variant` (raised, outline, subtle, dashed: a centered add or empty tile), `padding`, `as`, `to`, `href`, `selected`, `disabled`, `disabledReason` (with `disabled` on a button or link card: it stays focusable with `aria-disabled`, ignores clicks and shows the reason in a tooltip and as its description), `animated`, `fill` (takes the rest of the parent height, the body is a scrolling flex column, the footer pinned at the bottom). Slots: default, `header`, `title`, `description`, `icon`, `actions`, `footer`.
|
|
256
|
-
| `PageHeader` | Page title with description, breadcrumbs, badge and actions. The page templates include it. | Props: `title`, `description`, `icon`, `breadcrumbs` (small trail above the title), `trail` (the earlier levels as links: the title becomes a breadcrumb trail whose last item is the heading), `trailLabel`, `level`, `bordered`, `align`, `truncate` (one line; with a `trail` the title keeps a minimum width and the earlier crumbs truncate), `size` (`md`, `sm` for a panel or inspector header), `dockToggle` (default `true`: while the dock is detached, on a page with a docked drawer in a wide shell, a button at the end of the actions docks it again, `attachLabel`). Slots: `actions
|
|
257
|
-
| `Breadcrumbs` | Path navigation. | Props: `items` (`label`, `to`, `href`, `icon`), `separator`, `linkLast`, `ancestors`, `size` (`sm` for panel headers, `md`, `lg` for a title sized trail), `heading` (the current item is a heading of that level). Slot: `item`.
|
|
258
|
-
| `Stepper` | Step indicator for wizards and multi step flows (import, checkout). Horizontal or vertical, compact on narrow widths. | Model: `v-model` (current step value). Props: `steps` (`value`, `label`, `description`, `icon`, `disabled`, `state`: `complete` or `error`), `label`, `orientation`, `size`, `linear` (only completed and current steps clickable), `readonly`, `compact` (`'auto'` by default, `true`, `false`), `summary` (false hides the compact "Step 2 of 4" line), `positionLabel`, `completeLabel`, `errorLabel`. Event: `select`.
|
|
259
|
-
| `Tabs` | Tabs with panels, badges and dots. Segmented or underline. | Model: `v-model` (active value). Props: `items` (`value`, `label`, `icon`, `color` (a palette name or hex, a dot before the label), `badge`, `badgeTone`, `dot`, `title` (a tooltip on hover and focus, also on a disabled tab; native `title` until mount), `disabled`), `variant`, `size`, `lazy`, `fill`, `stretch`, `inset`, `controls` (id of a panel outside the component: only the tab list renders). Slots: `panel-<value>`, `panel`.
|
|
260
|
-
| `Accordion` | Collapsible sections. | Model: `v-model` (open value or values). Props: `items` (`value`, `title`, `description`, `content`, `icon`), `multiple`, `collapsible`, `variant`, `contentVariant` (text, or neutral: inherited font and color for forms, same padding), `padded` (default `true`; `false` for flush content), `divided` (a line between the trigger and the open content). Slots: default, `title`.
|
|
261
|
-
| `ResizeHandle` | Draggable and keyboard resizable separator between a panel and the rest (a side pane, a split editor). | Model: `v-model` (size in px). Props: `orientation` (`vertical`, `horizontal`), `target` (`before`, `after`: where the resized panel is), `min`, `max`, `step` (arrow keys, default 16), `label`, `onReset` (double click). Events: `resizeStart`, `resizeEnd`.
|
|
262
|
-
| `Separator` | Divider, labelled divider, or section heading with description and actions. | Props: `orientation`, `variant` (label, heading), `label`, `description`, `align`, `level`, `lines` (default `true`; `false` hides the lines of either variant). Slots: default, `description`, `actions`.
|
|
263
|
-
| `Stack` | Flex row or column with gap. | Props: `direction`, `gap` (none to xl), `align`, `justify`, `wrap`, `responsive`, `grow` (flex 1 with `min-height: 0`, passes a height down to a fill card), `as`.
|
|
264
|
-
| `Grid` | Responsive CSS grid. | Props: `columns` (number or breakpoints), `minItemWidth` (auto fit), `gap`, `as`.
|
|
265
|
-
| `Toolbar` | Group of controls with arrow key navigation (ARIA toolbar). | Props: `label`, `orientation`, `roving`, `bordered`.
|
|
266
|
-
| `CopyButton` | Button that copies a value and shows "copied". | Props: `value`, `label`, `copiedLabel`, `showLabel`, `size`, `variant`, `tone`, `resetAfter`. Event: `copy(success)`.
|
|
267
|
-
| `ThemeSwitch` | Light, dark and system switch. | Props: `variant` (segmented, icon), `size`, `showLabels`.
|
|
268
|
-
| `NavLink` | One navigation link with icon, badge and active state. | Props: `label`, `to`, `href`, `icon`, `badge`, `active`, `match` (exact, prefix), `external`, `disabled`. In the collapsed rail the label shows as a tooltip on hover and focus (also for a group). Slots: default, `icon`.
|
|
269
|
-
| `AppShell` | App frame: sidebar, topbar, mobile menu, collapse, skip link. Use it for a custom frame. Use `DashboardLayout` for the ready one. | Models: `v-model:collapsed`, `v-model:open`. Props: `variant` (inset, sidebar, floating), `content` (`page`, `fill`, `centered`, `bleed`), `fluid`, `fill`, `topbar`, `storageKey` (collapsed state in the preferences store), `dockStorageKey`, `dockLabel`, `dockEmptyTitle`, `dockEmptyDescription`, `dockResizeLabel` (the dock of docked drawers on the right: shown while a page has a mounted `docked` drawer, empty state, resize handle, width in the preferences store under `dock:<key>`), `shortcut`, `loading` (hides the page content and shows a page skeleton, `aria-busy` on `main`), `loadingLabel`. Slots: default, `sidebar`, `topbar`, `overlays`, `loading` (replaces the default page skeleton).
|
|
270
|
-
| `Sidebar` | Sidebar content with header, collapse button and footer. Goes in the `sidebar` slot of `AppShell`. | Props: `label`, `collapsible`, `collapseLabel`, `brandAlign` (`start`, `center`). Icons `sidebar-collapse` and `sidebar-expand` for the collapse button. Slots: default, `header`, `top`, `footer`.
|
|
271
|
-
| `SidebarNav` | Navigation list from data, with groups and children. | Props: `items` (`NavItem[]` or `NavSection[]`: `label`, `to`, `icon`, `badge`, `children`), `currentPath`.
|
|
272
|
-
| `SidebarSection` | Labelled block inside a sidebar for hand written links. | Prop: `label`. Slot: default.
|
|
253
|
+
| Component | Purpose and when to use it | Main props, models, slots, events | Playground |
|
|
254
|
+
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- |
|
|
255
|
+
| `Card` | Container with optional title, description, icon, actions and footer. Can be a link or a selectable button. | Props: `title`, `description`, `icon`, `variant` (raised, outline, subtle, dashed: a centered add or empty tile), `padding`, `as`, `to`, `href`, `selected`, `disabled`, `disabledReason` (with `disabled` on a button or link card: it stays focusable with `aria-disabled`, ignores clicks and shows the reason in a tooltip and as its description), `animated`, `fill` (takes the rest of the parent height, the body is a scrolling flex column, the footer pinned at the bottom). Slots: default, `header`, `title`, `description`, `icon`, `actions`, `footer`. | `layout/card.vue` |
|
|
256
|
+
| `PageHeader` | Page title with description, breadcrumbs, badge and actions. The page templates include it. | Props: `title`, `description`, `icon`, `breadcrumbs` (small trail above the title), `trail` (the earlier levels as links: the title becomes a breadcrumb trail whose last item is the heading), `trailLabel`, `level`, `bordered`, `align`, `truncate` (one line; with a `trail` the title keeps a minimum width and the earlier crumbs truncate), `size` (`md`, `sm` for a panel or inspector header), `dockToggle` (default `true`: while the dock is detached, on a page with a docked drawer in a wide shell, a button at the end of the actions docks it again, `attachLabel`). Slots: `actions` (moves into an "Actions" menu when it does not fit next to the title), `badge`, `description`, `title`, `icon`, `breadcrumbs`. | `layout/page-header.vue` |
|
|
257
|
+
| `Breadcrumbs` | Path navigation. | Props: `items` (`label`, `to`, `href`, `icon`), `separator`, `linkLast`, `ancestors`, `size` (`sm` for panel headers, `md`, `lg` for a title sized trail), `heading` (the current item is a heading of that level). Slot: `item`. | `layout/breadcrumbs.vue` |
|
|
258
|
+
| `Stepper` | Step indicator for wizards and multi step flows (import, checkout). Horizontal or vertical, compact on narrow widths. | Model: `v-model` (current step value). Props: `steps` (`value`, `label`, `description`, `icon`, `disabled`, `state`: `complete` or `error`), `label`, `orientation`, `size`, `linear` (only completed and current steps clickable), `readonly`, `compact` (`'auto'` by default, `true`, `false`), `summary` (false hides the compact "Step 2 of 4" line), `positionLabel`, `completeLabel`, `errorLabel`. Event: `select`. | `layout/stepper.vue` |
|
|
259
|
+
| `Tabs` | Tabs with panels, badges and dots. Segmented or underline. | Model: `v-model` (active value). Props: `items` (`value`, `label`, `icon`, `color` (a palette name or hex, a dot before the label), `badge`, `badgeTone`, `dot`, `title` (a tooltip on hover and focus, also on a disabled tab; native `title` until mount), `disabled`), `variant`, `size`, `lazy`, `fill`, `stretch`, `inset`, `controls` (id of a panel outside the component: only the tab list renders). Slots: `panel-<value>`, `panel`. | `layout/tabs.vue` |
|
|
260
|
+
| `Accordion` | Collapsible sections. | Model: `v-model` (open value or values). Props: `items` (`value`, `title`, `description`, `content`, `icon`), `multiple`, `collapsible`, `variant`, `contentVariant` (text, or neutral: inherited font and color for forms, same padding), `padded` (default `true`; `false` for flush content), `divided` (a line between the trigger and the open content). Slots: default, `title`. | `layout/accordion.vue` |
|
|
261
|
+
| `ResizeHandle` | Draggable and keyboard resizable separator between a panel and the rest (a side pane, a split editor). | Model: `v-model` (size in px). Props: `orientation` (`vertical`, `horizontal`), `target` (`before`, `after`: where the resized panel is), `min`, `max`, `step` (arrow keys, default 16), `label`, `onReset` (double click). Events: `resizeStart`, `resizeEnd`. | `layout/resize-handle.vue` |
|
|
262
|
+
| `Separator` | Divider, labelled divider, or section heading with description and actions. | Props: `orientation`, `variant` (label, heading), `label`, `description`, `align`, `level`, `lines` (default `true`; `false` hides the lines of either variant). Slots: default, `description`, `actions`. | `layout/separator.vue` |
|
|
263
|
+
| `Stack` | Flex row or column with gap. | Props: `direction`, `gap` (none to xl), `align`, `justify`, `wrap`, `responsive`, `grow` (flex 1 with `min-height: 0`, passes a height down to a fill card), `as`. | `layout/stack.vue` |
|
|
264
|
+
| `Grid` | Responsive CSS grid. | Props: `columns` (number or breakpoints), `minItemWidth` (auto fit), `gap`, `as`. | `layout/grid.vue` |
|
|
265
|
+
| `Toolbar` | Group of controls with arrow key navigation (ARIA toolbar). | Props: `label`, `orientation`, `roving`, `bordered`. | `layout/toolbar.vue` |
|
|
266
|
+
| `CopyButton` | Button that copies a value and shows "copied". | Props: `value`, `label`, `copiedLabel`, `showLabel`, `size`, `variant`, `tone`, `resetAfter`. Event: `copy(success)`. | `layout/copy-button.vue` |
|
|
267
|
+
| `ThemeSwitch` | Light, dark and system switch. | Props: `variant` (segmented, icon), `size`, `showLabels`. | `layout/theme-switch.vue` |
|
|
268
|
+
| `NavLink` | One navigation link with icon, badge and active state. | Props: `label`, `to`, `href`, `icon`, `badge`, `active`, `match` (exact, prefix), `external`, `disabled`. In the collapsed rail the label shows as a tooltip on hover and focus (also for a group). Slots: default, `icon`. | `layout/nav-link.vue` |
|
|
269
|
+
| `AppShell` | App frame: sidebar, topbar, mobile menu, collapse, skip link. Use it for a custom frame. Use `DashboardLayout` for the ready one. | Models: `v-model:collapsed`, `v-model:open`. Props: `variant` (inset, sidebar, floating), `content` (`page`, `fill`, `centered`, `bleed`), `fluid`, `fill`, `topbar`, `storageKey` (collapsed state in the preferences store), `dockStorageKey`, `dockLabel`, `dockEmptyTitle`, `dockEmptyDescription`, `dockResizeLabel` (the dock of docked drawers on the right: shown while a page has a mounted `docked` drawer, empty state, resize handle, width in the preferences store under `dock:<key>`), `shortcut`, `loading` (hides the page content and shows a page skeleton, `aria-busy` on `main`), `loadingLabel`. Slots: default, `sidebar`, `topbar`, `overlays`, `loading` (replaces the default page skeleton). | `layout/app-shell.vue` |
|
|
270
|
+
| `Sidebar` | Sidebar content with header, collapse button and footer. Goes in the `sidebar` slot of `AppShell`. | Props: `label`, `collapsible`, `collapseLabel`, `brandAlign` (`start`, `center`). Icons `sidebar-collapse` and `sidebar-expand` for the collapse button. Slots: default, `header`, `top`, `footer`. | `layout/app-shell.vue` |
|
|
271
|
+
| `SidebarNav` | Navigation list from data, with groups and children. | Props: `items` (`NavItem[]` or `NavSection[]`: `label`, `to`, `icon`, `badge`, `children`), `currentPath`. | `layout/app-shell.vue` |
|
|
272
|
+
| `SidebarSection` | Labelled block inside a sidebar for hand written links. | Prop: `label`. Slot: default. | `layout/app-shell.vue` |
|
|
273
273
|
|
|
274
274
|
## Feedback
|
|
275
275
|
|
package/README.md
CHANGED
|
@@ -559,7 +559,7 @@ On your own elements, `paletteClass(color)` gives the class of a palette name an
|
|
|
559
559
|
- `Tabs` items take `dot: true` for a small indicator without a number (`dotTone`, default `danger`; `dotLabel` is the hidden text, default "Needs attention"). `color` (a palette name or a hex, `ColorValue`) draws a small color dot before the label, separate from the status dot. `title` shows a tooltip on hover and keyboard focus (the native `title` only until mount) and becomes the tab description; a disabled tab keeps it (it uses `aria-disabled`, cannot be selected and is skipped by Tab and the arrow keys), so it can say why it is disabled. The same items work in the `tabs` of `Modal`, `Drawer`, `FormDrawer` and `DetailPage`.
|
|
560
560
|
- `Card` takes `variant="dashed"` (`CardVariant`) for a placeholder tile: a dashed `--k-line-strong` border on `--k-subtle`, with the icon, title and description centered in a column (the icon in a raised box, the title at 0.8125rem). As a button (`as="button"`) or a link (`to`, `href`) it gets the hover and focus of the `FileInput` dropzone (`--k-fill` and a `--k-text-dimmed` border on hover, a solid `--k-ring` border and the focus ring on focus); `disabled` dims it, and `selected` tints it with the accent, for a drop target while something is dragged over it. Use it for an "Add" tile at the end of a grid of items and for an empty area: `<KCard variant="dashed" as="button" icon="plus" title="Add block" @click="add" />`.
|
|
561
561
|
- `DropdownMenu` takes `matchTriggerWidth` (the menu is at least as wide as its trigger) and `minWidth` (a CSS length).
|
|
562
|
-
- `PageHeader` takes `align` (`'end'` by default, `'start'` or `'center'`) for the title block and the actions, and `truncate` to keep the title on one line with an ellipsis (the full title is in its `title` attribute). `trail` (`BreadcrumbItem[]`, the earlier levels as links) turns the title into a breadcrumb trail that ends with `title`, at the page title size: a `nav` (named by `trailLabel`, default "Breadcrumb") around an ordered list whose last item is the heading (`h<level>`, `aria-current="page"`, only the title, `#title` fills it). With `truncate` the trail stays on one line: the title truncates down to a minimum width (6em, or its own width when shorter), then the earlier crumbs truncate with an ellipsis (the full label in their `title`), so the current item never shrinks to nothing. Use it for a record or a nested page instead of `Breadcrumbs` in `#title` (a `nav` inside a heading). `breadcrumbs` stays the small trail above the title. `size="sm"` (`PageHeaderSize`, default `md`) is the compact header of a panel or an inspector: the title at the card title size (0.9375rem, 600), a 1.75rem icon box, tighter gaps, a 0.75rem description, `breadcrumbs` at `Breadcrumbs` size `sm` and the `trail` at the title size.
|
|
562
|
+
- `PageHeader` takes `align` (`'end'` by default, `'start'` or `'center'`) for the title block and the actions, and `truncate` to keep the title on one line with an ellipsis (the full title is in its `title` attribute). `trail` (`BreadcrumbItem[]`, the earlier levels as links) turns the title into a breadcrumb trail that ends with `title`, at the page title size: a `nav` (named by `trailLabel`, default "Breadcrumb") around an ordered list whose last item is the heading (`h<level>`, `aria-current="page"`, only the title, `#title` fills it). With `truncate` the trail stays on one line: the title truncates down to a minimum width (6em, or its own width when shorter), then the earlier crumbs truncate with an ellipsis (the full label in their `title`), so the current item never shrinks to nothing. Use it for a record or a nested page instead of `Breadcrumbs` in `#title` (a `nav` inside a heading). `breadcrumbs` stays the small trail above the title. `size="sm"` (`PageHeaderSize`, default `md`) is the compact header of a panel or an inspector: the title at the card title size (0.9375rem, 600), a 1.75rem icon box, tighter gaps, a 0.75rem description, `breadcrumbs` at `Breadcrumbs` size `sm` and the `trail` at the title size. The `#actions` slot stays on the title row: when the actions do not fit next to the heading (its `flex-basis`, 18rem, 10rem with `size="sm"`), they move into an "Actions" menu, as in the header of a `Modal` or a `Drawer`. A modal or a drawer that is not docked stays in the DOM of its parent, so do not put one in `#actions`: the closed menu hides it.
|
|
563
563
|
- `ResizeHandle` is a focusable `separator` that resizes the panel next to it: `v-model` is the size in pixels (`aria-valuenow`), `min` (default 0) and `max` clamp it (`aria-valuemin`, `aria-valuemax`), `orientation` is `vertical` (default, a vertical line that resizes a width, Left and Right arrows) or `horizontal` (a height, Up and Down arrows), and `target` says where the panel is: `before` (default, left or above, dragging right or down grows it) or `after` (an inspector on the right). The arrow keys move it by `step` (default 16), Home and End jump to `min` and `max`, a double click calls `onReset`. Dragging captures the pointer (it keeps working over iframes) and emits `resizeStart` and `resizeEnd(size)`. Name it with `label` and point `aria-controls` at the panel. The 1px line has a 11px hit area and turns `--k-ring` on hover, while dragging and on focus (with the `--k-ring-soft` halo).
|
|
564
564
|
- `RichTextEditor` accepts `'underline'` in `toolbar` (not in the default toolbar).
|
|
565
565
|
- `RichTextEditor` takes `linkTypes` (`EditorLinkType[]`, `'url' | 'email' | 'phone'`, default `['url']`). With more than one type the link form shows a type select; email links get `mailto:` and phone links `tel:` (spaces and separators removed). When no text is selected the form asks for the link text too (`editor.linkText`) and inserts it as a link, falling back to the address.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
+
ref="header"
|
|
3
4
|
class="k-page-header"
|
|
4
5
|
:class="[
|
|
5
6
|
`k-page-header-${size}`,
|
|
@@ -7,7 +8,7 @@
|
|
|
7
8
|
{ 'is-bordered': bordered, 'is-truncated': truncate }
|
|
8
9
|
]"
|
|
9
10
|
>
|
|
10
|
-
<div class="k-page-header-heading">
|
|
11
|
+
<div ref="heading" class="k-page-header-heading">
|
|
11
12
|
<slot name="breadcrumbs">
|
|
12
13
|
<Breadcrumbs
|
|
13
14
|
v-if="breadcrumbs?.length"
|
|
@@ -59,8 +60,17 @@
|
|
|
59
60
|
</div>
|
|
60
61
|
</div>
|
|
61
62
|
</div>
|
|
62
|
-
<div v-if="$slots.actions || showDockToggle" class="k-page-header-actions">
|
|
63
|
-
<
|
|
63
|
+
<div v-if="$slots.actions || showDockToggle" ref="actions" class="k-page-header-actions">
|
|
64
|
+
<ActionsMenu
|
|
65
|
+
v-if="actionsCollapsed && $slots.actions"
|
|
66
|
+
ref="actionsMenu"
|
|
67
|
+
:label="actionsText"
|
|
68
|
+
>
|
|
69
|
+
<slot name="actions" />
|
|
70
|
+
</ActionsMenu>
|
|
71
|
+
<div v-else-if="$slots.actions" ref="inlineActions" class="k-page-header-actions-inline">
|
|
72
|
+
<slot name="actions" />
|
|
73
|
+
</div>
|
|
64
74
|
<Button
|
|
65
75
|
v-if="showDockToggle"
|
|
66
76
|
variant="ghost"
|
|
@@ -80,8 +90,10 @@
|
|
|
80
90
|
</template>
|
|
81
91
|
|
|
82
92
|
<script setup>
|
|
83
|
-
import { computed, inject } from "vue";
|
|
93
|
+
import { computed, inject, useTemplateRef } from "vue";
|
|
84
94
|
import { useLocale } from "../../composables/useLocale";
|
|
95
|
+
import { useActionsCollapse } from "../../internal/core/actions-collapse";
|
|
96
|
+
import ActionsMenu from "../../internal/overlays/ActionsMenu.vue";
|
|
85
97
|
import { DOCK_KEY } from "../../internal/overlays/dock";
|
|
86
98
|
import Button from "../core/Button.vue";
|
|
87
99
|
import Icon from "../core/Icon.vue";
|
|
@@ -108,6 +120,15 @@ const showDockToggle = computed(
|
|
|
108
120
|
() => Boolean(props.dockToggle && dockHost?.available.value && dockHost.detached.value)
|
|
109
121
|
);
|
|
110
122
|
const attachText = computed(() => props.attachLabel ?? t("dock.attach"));
|
|
123
|
+
const actionsText = computed(() => t("common.actions"));
|
|
124
|
+
const heading = useTemplateRef("heading");
|
|
125
|
+
const actionsCollapsed = useActionsCollapse({
|
|
126
|
+
container: useTemplateRef("header"),
|
|
127
|
+
actions: useTemplateRef("actions"),
|
|
128
|
+
inline: useTemplateRef("inlineActions"),
|
|
129
|
+
menu: useTemplateRef("actionsMenu"),
|
|
130
|
+
headingMin: () => heading.value ? parseFloat(getComputedStyle(heading.value).flexBasis) || 0 : 0
|
|
131
|
+
});
|
|
111
132
|
function attachDock() {
|
|
112
133
|
if (dockHost) dockHost.detached.value = false;
|
|
113
134
|
}
|
|
@@ -4,7 +4,7 @@ declare var __VLS_1: {}, __VLS_10: {
|
|
|
4
4
|
item: BreadcrumbItem;
|
|
5
5
|
index: number;
|
|
6
6
|
current: boolean;
|
|
7
|
-
}, __VLS_12: {}, __VLS_26: {}, __VLS_39: {}, __VLS_41: {}, __VLS_43: {},
|
|
7
|
+
}, __VLS_12: {}, __VLS_26: {}, __VLS_39: {}, __VLS_41: {}, __VLS_43: {}, __VLS_51: {}, __VLS_53: {}, __VLS_62: {};
|
|
8
8
|
type __VLS_Slots = {} & {
|
|
9
9
|
breadcrumbs?: (props: typeof __VLS_1) => any;
|
|
10
10
|
} & {
|
|
@@ -20,9 +20,11 @@ type __VLS_Slots = {} & {
|
|
|
20
20
|
} & {
|
|
21
21
|
description?: (props: typeof __VLS_43) => any;
|
|
22
22
|
} & {
|
|
23
|
-
actions?: (props: typeof
|
|
23
|
+
actions?: (props: typeof __VLS_51) => any;
|
|
24
24
|
} & {
|
|
25
|
-
|
|
25
|
+
actions?: (props: typeof __VLS_53) => any;
|
|
26
|
+
} & {
|
|
27
|
+
default?: (props: typeof __VLS_62) => any;
|
|
26
28
|
};
|
|
27
29
|
declare const __VLS_base: import("vue").DefineComponent<{
|
|
28
30
|
title?: string | undefined;
|
|
@@ -37,7 +37,7 @@ const model = defineModel({ type: Number, ...{ required: true } });
|
|
|
37
37
|
const attrs = useAttrs();
|
|
38
38
|
const handle = useTemplateRef("handle");
|
|
39
39
|
const dragging = ref(false);
|
|
40
|
-
let origin = { position: 0, size: 0, pointer: -1 };
|
|
40
|
+
let origin = { position: 0, size: 0, pointer: -1, reversed: false };
|
|
41
41
|
warnUnnamed("ResizeHandle", () => Boolean(props.label) || hasNameAttrs(attrs));
|
|
42
42
|
function clamp(size) {
|
|
43
43
|
const upper = props.max ?? Number.POSITIVE_INFINITY;
|
|
@@ -59,14 +59,19 @@ function onPointerDown(event) {
|
|
|
59
59
|
event.preventDefault();
|
|
60
60
|
handle.value?.focus({ preventScroll: true });
|
|
61
61
|
handle.value?.setPointerCapture(event.pointerId);
|
|
62
|
-
origin = {
|
|
62
|
+
origin = {
|
|
63
|
+
position: pointerPosition(event),
|
|
64
|
+
size: model.value,
|
|
65
|
+
pointer: event.pointerId,
|
|
66
|
+
reversed: isReversed()
|
|
67
|
+
};
|
|
63
68
|
dragging.value = true;
|
|
64
69
|
emit("resizeStart");
|
|
65
70
|
}
|
|
66
71
|
function onPointerMove(event) {
|
|
67
72
|
if (!dragging.value || event.pointerId !== origin.pointer) return;
|
|
68
73
|
const delta = pointerPosition(event) - origin.position;
|
|
69
|
-
set(origin.size + (
|
|
74
|
+
set(origin.size + (origin.reversed ? -delta : delta));
|
|
70
75
|
}
|
|
71
76
|
function stop() {
|
|
72
77
|
if (!dragging.value) return;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
export interface ActionsCollapseOptions {
|
|
3
|
+
container: Readonly<Ref<HTMLElement | null>>;
|
|
4
|
+
actions: Readonly<Ref<HTMLElement | null>>;
|
|
5
|
+
inline: Readonly<Ref<HTMLElement | null>>;
|
|
6
|
+
menu: Readonly<Ref<unknown>>;
|
|
7
|
+
headingMin: (container: HTMLElement) => number;
|
|
8
|
+
}
|
|
9
|
+
export declare function remPixels(): number;
|
|
10
|
+
export declare function useActionsCollapse(options: ActionsCollapseOptions): Ref<boolean, boolean>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { onBeforeUnmount, ref, watch } from "vue";
|
|
2
|
+
export function remPixels() {
|
|
3
|
+
return parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
|
4
|
+
}
|
|
5
|
+
export function useActionsCollapse(options) {
|
|
6
|
+
const collapsed = ref(false);
|
|
7
|
+
let inlineWidth = 0;
|
|
8
|
+
let observer;
|
|
9
|
+
function measure() {
|
|
10
|
+
const container = options.container.value;
|
|
11
|
+
const actions = options.actions.value;
|
|
12
|
+
if (!container || !actions) return;
|
|
13
|
+
const style = getComputedStyle(container);
|
|
14
|
+
const width = container.clientWidth - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight);
|
|
15
|
+
if (width <= 0) return;
|
|
16
|
+
const inline = options.inline.value;
|
|
17
|
+
const menu = actions.querySelector(":scope > .k-overlay-trigger");
|
|
18
|
+
if (inline) inlineWidth = inline.scrollWidth;
|
|
19
|
+
const current = inline?.offsetWidth ?? menu?.offsetWidth ?? 0;
|
|
20
|
+
const others = actions.offsetWidth - current;
|
|
21
|
+
const gap = parseFloat(style.columnGap) || 0;
|
|
22
|
+
const next = options.headingMin(container) + gap + others + inlineWidth > width;
|
|
23
|
+
if (next !== collapsed.value) collapsed.value = next;
|
|
24
|
+
}
|
|
25
|
+
watch(
|
|
26
|
+
() => [options.container.value, options.inline.value, options.menu.value],
|
|
27
|
+
([container, inline]) => {
|
|
28
|
+
observer?.disconnect();
|
|
29
|
+
if (!container || typeof ResizeObserver === "undefined") return;
|
|
30
|
+
observer ??= new ResizeObserver(() => measure());
|
|
31
|
+
observer.observe(container);
|
|
32
|
+
if (inline) observer.observe(inline);
|
|
33
|
+
},
|
|
34
|
+
{ flush: "post" }
|
|
35
|
+
);
|
|
36
|
+
onBeforeUnmount(() => observer?.disconnect());
|
|
37
|
+
return collapsed;
|
|
38
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Popover placement="bottom-end" :label="label" class="k-actions-menu">
|
|
3
|
+
<Button
|
|
4
|
+
variant="soft"
|
|
5
|
+
tone="neutral"
|
|
6
|
+
size="sm"
|
|
7
|
+
trailing-icon="chevron-down"
|
|
8
|
+
:disabled="disabled"
|
|
9
|
+
>
|
|
10
|
+
{{ label }}
|
|
11
|
+
</Button>
|
|
12
|
+
<template #content="{ close }">
|
|
13
|
+
<div class="k-actions-list" @click="onClick($event, close)">
|
|
14
|
+
<slot />
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
</Popover>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup>
|
|
21
|
+
import Button from "../../components/core/Button.vue";
|
|
22
|
+
import Popover from "../../components/overlays/Popover.vue";
|
|
23
|
+
defineProps({
|
|
24
|
+
label: { type: String, required: true },
|
|
25
|
+
disabled: { type: Boolean, required: false }
|
|
26
|
+
});
|
|
27
|
+
function onClick(event, close) {
|
|
28
|
+
const target = event.target instanceof Element ? event.target.closest("button, a") : null;
|
|
29
|
+
if (!target || target.matches('[aria-haspopup]:not([aria-haspopup="false"])')) return;
|
|
30
|
+
close();
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
declare var __VLS_14: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_14) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{
|
|
6
|
+
label: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
placement?: import("../floating/position.ts").Placement;
|
|
9
|
+
offset?: number;
|
|
10
|
+
arrow?: boolean;
|
|
11
|
+
role?: string | undefined;
|
|
12
|
+
initialFocus?: boolean;
|
|
13
|
+
haspopup?: string;
|
|
14
|
+
anchor?: import("../floating/position.ts").AnchorTarget | null;
|
|
15
|
+
width?: string;
|
|
16
|
+
sheet?: boolean;
|
|
17
|
+
open?: boolean;
|
|
18
|
+
key?: PropertyKey | undefined;
|
|
19
|
+
prefix?: string | undefined;
|
|
20
|
+
title?: string | undefined;
|
|
21
|
+
style?: import("vue").StyleValue;
|
|
22
|
+
results?: (string | number) | undefined;
|
|
23
|
+
placeholder?: string | undefined;
|
|
24
|
+
id?: string | undefined;
|
|
25
|
+
onSelect?: ((payload: Event) => void) | undefined;
|
|
26
|
+
dir?: string | undefined;
|
|
27
|
+
contextmenu?: string | undefined;
|
|
28
|
+
hidden?: (boolean | "true" | "false") | "" | "hidden" | "until-found" | undefined;
|
|
29
|
+
class?: import("vue").ClassValue;
|
|
30
|
+
'aria-label'?: string | undefined;
|
|
31
|
+
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
32
|
+
onCopy?: ((payload: ClipboardEvent) => void) | undefined;
|
|
33
|
+
onCut?: ((payload: ClipboardEvent) => void) | undefined;
|
|
34
|
+
onPaste?: ((payload: ClipboardEvent) => void) | undefined;
|
|
35
|
+
onCompositionend?: ((payload: CompositionEvent) => void) | undefined;
|
|
36
|
+
onCompositionstart?: ((payload: CompositionEvent) => void) | undefined;
|
|
37
|
+
onCompositionupdate?: ((payload: CompositionEvent) => void) | undefined;
|
|
38
|
+
onDrag?: ((payload: DragEvent) => void) | undefined;
|
|
39
|
+
onDragend?: ((payload: DragEvent) => void) | undefined;
|
|
40
|
+
onDragenter?: ((payload: DragEvent) => void) | undefined;
|
|
41
|
+
onDragexit?: ((payload: DragEvent) => void) | undefined;
|
|
42
|
+
onDragleave?: ((payload: DragEvent) => void) | undefined;
|
|
43
|
+
onDragover?: ((payload: DragEvent) => void) | undefined;
|
|
44
|
+
onDragstart?: ((payload: DragEvent) => void) | undefined;
|
|
45
|
+
onDrop?: ((payload: DragEvent) => void) | undefined;
|
|
46
|
+
onFocus?: ((payload: FocusEvent) => void) | undefined;
|
|
47
|
+
onFocusin?: ((payload: FocusEvent) => void) | undefined;
|
|
48
|
+
onFocusout?: ((payload: FocusEvent) => void) | undefined;
|
|
49
|
+
onBlur?: ((payload: FocusEvent) => void) | undefined;
|
|
50
|
+
onChange?: ((payload: Event) => void) | undefined;
|
|
51
|
+
onBeforeinput?: ((payload: InputEvent) => void) | undefined;
|
|
52
|
+
onFormdata?: ((payload: FormDataEvent) => void) | undefined;
|
|
53
|
+
onInput?: ((payload: InputEvent) => void) | undefined;
|
|
54
|
+
onReset?: ((payload: Event) => void) | undefined;
|
|
55
|
+
onSubmit?: ((payload: SubmitEvent) => void) | undefined;
|
|
56
|
+
onInvalid?: ((payload: Event) => void) | undefined;
|
|
57
|
+
onFullscreenchange?: ((payload: Event) => void) | undefined;
|
|
58
|
+
onFullscreenerror?: ((payload: Event) => void) | undefined;
|
|
59
|
+
onLoad?: ((payload: Event) => void) | undefined;
|
|
60
|
+
onError?: ((payload: Event) => void) | undefined;
|
|
61
|
+
onKeydown?: ((payload: KeyboardEvent) => void) | undefined;
|
|
62
|
+
onKeypress?: ((payload: KeyboardEvent) => void) | undefined;
|
|
63
|
+
onKeyup?: ((payload: KeyboardEvent) => void) | undefined;
|
|
64
|
+
onDblclick?: ((payload: MouseEvent) => void) | undefined;
|
|
65
|
+
onMousedown?: ((payload: MouseEvent) => void) | undefined;
|
|
66
|
+
onMouseenter?: ((payload: MouseEvent) => void) | undefined;
|
|
67
|
+
onMouseleave?: ((payload: MouseEvent) => void) | undefined;
|
|
68
|
+
onMousemove?: ((payload: MouseEvent) => void) | undefined;
|
|
69
|
+
onMouseout?: ((payload: MouseEvent) => void) | undefined;
|
|
70
|
+
onMouseover?: ((payload: MouseEvent) => void) | undefined;
|
|
71
|
+
onMouseup?: ((payload: MouseEvent) => void) | undefined;
|
|
72
|
+
onAbort?: ((payload: UIEvent) => void) | undefined;
|
|
73
|
+
onCanplay?: ((payload: Event) => void) | undefined;
|
|
74
|
+
onCanplaythrough?: ((payload: Event) => void) | undefined;
|
|
75
|
+
onDurationchange?: ((payload: Event) => void) | undefined;
|
|
76
|
+
onEmptied?: ((payload: Event) => void) | undefined;
|
|
77
|
+
onEncrypted?: ((payload: MediaEncryptedEvent) => void) | undefined;
|
|
78
|
+
onEnded?: ((payload: Event) => void) | undefined;
|
|
79
|
+
onLoadeddata?: ((payload: Event) => void) | undefined;
|
|
80
|
+
onLoadedmetadata?: ((payload: Event) => void) | undefined;
|
|
81
|
+
onLoadstart?: ((payload: Event) => void) | undefined;
|
|
82
|
+
onPause?: ((payload: Event) => void) | undefined;
|
|
83
|
+
onPlay?: ((payload: Event) => void) | undefined;
|
|
84
|
+
onPlaying?: ((payload: Event) => void) | undefined;
|
|
85
|
+
onProgress?: ((payload: ProgressEvent<EventTarget>) => void) | undefined;
|
|
86
|
+
onRatechange?: ((payload: Event) => void) | undefined;
|
|
87
|
+
onSeeked?: ((payload: Event) => void) | undefined;
|
|
88
|
+
onSeeking?: ((payload: Event) => void) | undefined;
|
|
89
|
+
onStalled?: ((payload: Event) => void) | undefined;
|
|
90
|
+
onSuspend?: ((payload: Event) => void) | undefined;
|
|
91
|
+
onTimeupdate?: ((payload: Event) => void) | undefined;
|
|
92
|
+
onVolumechange?: ((payload: Event) => void) | undefined;
|
|
93
|
+
onWaiting?: ((payload: Event) => void) | undefined;
|
|
94
|
+
onScroll?: ((payload: Event) => void) | undefined;
|
|
95
|
+
onScrollend?: ((payload: Event) => void) | undefined;
|
|
96
|
+
onTouchcancel?: ((payload: TouchEvent) => void) | undefined;
|
|
97
|
+
onTouchend?: ((payload: TouchEvent) => void) | undefined;
|
|
98
|
+
onTouchmove?: ((payload: TouchEvent) => void) | undefined;
|
|
99
|
+
onTouchstart?: ((payload: TouchEvent) => void) | undefined;
|
|
100
|
+
onAuxclick?: ((payload: PointerEvent) => void) | undefined;
|
|
101
|
+
onClick?: ((payload: PointerEvent) => void) | undefined;
|
|
102
|
+
onContextmenu?: ((payload: PointerEvent) => void) | undefined;
|
|
103
|
+
onGotpointercapture?: ((payload: PointerEvent) => void) | undefined;
|
|
104
|
+
onLostpointercapture?: ((payload: PointerEvent) => void) | undefined;
|
|
105
|
+
onPointerdown?: ((payload: PointerEvent) => void) | undefined;
|
|
106
|
+
onPointermove?: ((payload: PointerEvent) => void) | undefined;
|
|
107
|
+
onPointerup?: ((payload: PointerEvent) => void) | undefined;
|
|
108
|
+
onPointercancel?: ((payload: PointerEvent) => void) | undefined;
|
|
109
|
+
onPointerenter?: ((payload: PointerEvent) => void) | undefined;
|
|
110
|
+
onPointerleave?: ((payload: PointerEvent) => void) | undefined;
|
|
111
|
+
onPointerover?: ((payload: PointerEvent) => void) | undefined;
|
|
112
|
+
onPointerout?: ((payload: PointerEvent) => void) | undefined;
|
|
113
|
+
onBeforetoggle?: ((payload: ToggleEvent) => void) | undefined;
|
|
114
|
+
onToggle?: ((payload: ToggleEvent) => void) | undefined;
|
|
115
|
+
onWheel?: ((payload: WheelEvent) => void) | undefined;
|
|
116
|
+
onAnimationcancel?: ((payload: AnimationEvent) => void) | undefined;
|
|
117
|
+
onAnimationstart?: ((payload: AnimationEvent) => void) | undefined;
|
|
118
|
+
onAnimationend?: ((payload: AnimationEvent) => void) | undefined;
|
|
119
|
+
onAnimationiteration?: ((payload: AnimationEvent) => void) | undefined;
|
|
120
|
+
onSecuritypolicyviolation?: ((payload: SecurityPolicyViolationEvent) => void) | undefined;
|
|
121
|
+
onTransitioncancel?: ((payload: TransitionEvent) => void) | undefined;
|
|
122
|
+
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
123
|
+
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
124
|
+
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
125
|
+
innerHTML?: string | undefined;
|
|
126
|
+
color?: string | undefined;
|
|
127
|
+
lang?: string | undefined;
|
|
128
|
+
tabindex?: (string | number) | undefined;
|
|
129
|
+
'aria-activedescendant'?: string | undefined;
|
|
130
|
+
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
131
|
+
'aria-autocomplete'?: "none" | "inline" | "list" | "both" | undefined;
|
|
132
|
+
'aria-busy'?: (boolean | "true" | "false") | undefined;
|
|
133
|
+
'aria-checked'?: (boolean | "true" | "false") | "mixed" | undefined;
|
|
134
|
+
'aria-colcount'?: (string | number) | undefined;
|
|
135
|
+
'aria-colindex'?: (string | number) | undefined;
|
|
136
|
+
'aria-colspan'?: (string | number) | undefined;
|
|
137
|
+
'aria-controls'?: string | undefined;
|
|
138
|
+
'aria-current'?: (boolean | "true" | "false") | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
139
|
+
'aria-describedby'?: string | undefined;
|
|
140
|
+
'aria-details'?: string | undefined;
|
|
141
|
+
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
142
|
+
'aria-dropeffect'?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
143
|
+
'aria-errormessage'?: string | undefined;
|
|
144
|
+
'aria-expanded'?: (boolean | "true" | "false") | undefined;
|
|
145
|
+
'aria-flowto'?: string | undefined;
|
|
146
|
+
'aria-grabbed'?: (boolean | "true" | "false") | undefined;
|
|
147
|
+
'aria-haspopup'?: (boolean | "true" | "false") | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
148
|
+
'aria-invalid'?: (boolean | "true" | "false") | "grammar" | "spelling" | undefined;
|
|
149
|
+
'aria-keyshortcuts'?: string | undefined;
|
|
150
|
+
'aria-labelledby'?: string | undefined;
|
|
151
|
+
'aria-level'?: (string | number) | undefined;
|
|
152
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
153
|
+
'aria-modal'?: (boolean | "true" | "false") | undefined;
|
|
154
|
+
'aria-multiline'?: (boolean | "true" | "false") | undefined;
|
|
155
|
+
'aria-multiselectable'?: (boolean | "true" | "false") | undefined;
|
|
156
|
+
'aria-orientation'?: "horizontal" | "vertical" | undefined;
|
|
157
|
+
'aria-owns'?: string | undefined;
|
|
158
|
+
'aria-placeholder'?: string | undefined;
|
|
159
|
+
'aria-posinset'?: (string | number) | undefined;
|
|
160
|
+
'aria-pressed'?: (boolean | "true" | "false") | "mixed" | undefined;
|
|
161
|
+
'aria-readonly'?: (boolean | "true" | "false") | undefined;
|
|
162
|
+
'aria-relevant'?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
163
|
+
'aria-required'?: (boolean | "true" | "false") | undefined;
|
|
164
|
+
'aria-roledescription'?: string | undefined;
|
|
165
|
+
'aria-rowcount'?: (string | number) | undefined;
|
|
166
|
+
'aria-rowindex'?: (string | number) | undefined;
|
|
167
|
+
'aria-rowspan'?: (string | number) | undefined;
|
|
168
|
+
'aria-selected'?: (boolean | "true" | "false") | undefined;
|
|
169
|
+
'aria-setsize'?: (string | number) | undefined;
|
|
170
|
+
'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
171
|
+
'aria-valuemax'?: (string | number) | undefined;
|
|
172
|
+
'aria-valuemin'?: (string | number) | undefined;
|
|
173
|
+
'aria-valuenow'?: (string | number) | undefined;
|
|
174
|
+
'aria-valuetext'?: string | undefined;
|
|
175
|
+
ref?: import("vue").VNodeRef | undefined;
|
|
176
|
+
ref_for?: boolean | undefined | undefined;
|
|
177
|
+
ref_key?: string | undefined | undefined;
|
|
178
|
+
accesskey?: string | undefined;
|
|
179
|
+
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
180
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
181
|
+
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
182
|
+
enterKeyHint?: import("vue").HTMLAttributes["enterkeyhint"];
|
|
183
|
+
inert?: (boolean | "true" | "false") | undefined;
|
|
184
|
+
spellcheck?: (boolean | "true" | "false") | undefined;
|
|
185
|
+
translate?: "yes" | "no" | undefined;
|
|
186
|
+
radiogroup?: string | undefined;
|
|
187
|
+
about?: string | undefined;
|
|
188
|
+
datatype?: string | undefined;
|
|
189
|
+
inlist?: any;
|
|
190
|
+
property?: string | undefined;
|
|
191
|
+
resource?: string | undefined;
|
|
192
|
+
typeof?: string | undefined;
|
|
193
|
+
vocab?: string | undefined;
|
|
194
|
+
autocapitalize?: string | undefined;
|
|
195
|
+
autocorrect?: string | undefined;
|
|
196
|
+
autosave?: string | undefined;
|
|
197
|
+
itemprop?: string | undefined;
|
|
198
|
+
itemscope?: (boolean | "true" | "false") | undefined;
|
|
199
|
+
itemtype?: string | undefined;
|
|
200
|
+
itemid?: string | undefined;
|
|
201
|
+
itemref?: string | undefined;
|
|
202
|
+
security?: string | undefined;
|
|
203
|
+
unselectable?: "on" | "off" | undefined;
|
|
204
|
+
inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
205
|
+
is?: string | undefined;
|
|
206
|
+
exportparts?: string;
|
|
207
|
+
part?: string;
|
|
208
|
+
popover?: import("../../index.ts").PopoverMode | "" | boolean;
|
|
209
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
210
|
+
onVnodeBeforeMount?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
|
|
211
|
+
onVnodeMounted?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
|
|
212
|
+
onVnodeBeforeUpdate?: (((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void) | ((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void)[]) | undefined;
|
|
213
|
+
onVnodeUpdated?: (((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void) | ((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void)[]) | undefined;
|
|
214
|
+
onVnodeBeforeUnmount?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
|
|
215
|
+
onVnodeUnmounted?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
|
|
216
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
217
|
+
label: string;
|
|
218
|
+
disabled?: boolean;
|
|
219
|
+
placement?: import("../floating/position.ts").Placement;
|
|
220
|
+
offset?: number;
|
|
221
|
+
arrow?: boolean;
|
|
222
|
+
role?: string | undefined;
|
|
223
|
+
initialFocus?: boolean;
|
|
224
|
+
haspopup?: string;
|
|
225
|
+
anchor?: import("../floating/position.ts").AnchorTarget | null;
|
|
226
|
+
width?: string;
|
|
227
|
+
sheet?: boolean;
|
|
228
|
+
open?: boolean;
|
|
229
|
+
key?: PropertyKey | undefined;
|
|
230
|
+
prefix?: string | undefined;
|
|
231
|
+
title?: string | undefined;
|
|
232
|
+
style?: import("vue").StyleValue;
|
|
233
|
+
results?: (string | number) | undefined;
|
|
234
|
+
placeholder?: string | undefined;
|
|
235
|
+
id?: string | undefined;
|
|
236
|
+
onSelect?: ((payload: Event) => void) | undefined;
|
|
237
|
+
dir?: string | undefined;
|
|
238
|
+
contextmenu?: string | undefined;
|
|
239
|
+
hidden?: (boolean | "true" | "false") | "" | "hidden" | "until-found" | undefined;
|
|
240
|
+
class?: import("vue").ClassValue;
|
|
241
|
+
'aria-label'?: string | undefined;
|
|
242
|
+
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
243
|
+
onCopy?: ((payload: ClipboardEvent) => void) | undefined;
|
|
244
|
+
onCut?: ((payload: ClipboardEvent) => void) | undefined;
|
|
245
|
+
onPaste?: ((payload: ClipboardEvent) => void) | undefined;
|
|
246
|
+
onCompositionend?: ((payload: CompositionEvent) => void) | undefined;
|
|
247
|
+
onCompositionstart?: ((payload: CompositionEvent) => void) | undefined;
|
|
248
|
+
onCompositionupdate?: ((payload: CompositionEvent) => void) | undefined;
|
|
249
|
+
onDrag?: ((payload: DragEvent) => void) | undefined;
|
|
250
|
+
onDragend?: ((payload: DragEvent) => void) | undefined;
|
|
251
|
+
onDragenter?: ((payload: DragEvent) => void) | undefined;
|
|
252
|
+
onDragexit?: ((payload: DragEvent) => void) | undefined;
|
|
253
|
+
onDragleave?: ((payload: DragEvent) => void) | undefined;
|
|
254
|
+
onDragover?: ((payload: DragEvent) => void) | undefined;
|
|
255
|
+
onDragstart?: ((payload: DragEvent) => void) | undefined;
|
|
256
|
+
onDrop?: ((payload: DragEvent) => void) | undefined;
|
|
257
|
+
onFocus?: ((payload: FocusEvent) => void) | undefined;
|
|
258
|
+
onFocusin?: ((payload: FocusEvent) => void) | undefined;
|
|
259
|
+
onFocusout?: ((payload: FocusEvent) => void) | undefined;
|
|
260
|
+
onBlur?: ((payload: FocusEvent) => void) | undefined;
|
|
261
|
+
onChange?: ((payload: Event) => void) | undefined;
|
|
262
|
+
onBeforeinput?: ((payload: InputEvent) => void) | undefined;
|
|
263
|
+
onFormdata?: ((payload: FormDataEvent) => void) | undefined;
|
|
264
|
+
onInput?: ((payload: InputEvent) => void) | undefined;
|
|
265
|
+
onReset?: ((payload: Event) => void) | undefined;
|
|
266
|
+
onSubmit?: ((payload: SubmitEvent) => void) | undefined;
|
|
267
|
+
onInvalid?: ((payload: Event) => void) | undefined;
|
|
268
|
+
onFullscreenchange?: ((payload: Event) => void) | undefined;
|
|
269
|
+
onFullscreenerror?: ((payload: Event) => void) | undefined;
|
|
270
|
+
onLoad?: ((payload: Event) => void) | undefined;
|
|
271
|
+
onError?: ((payload: Event) => void) | undefined;
|
|
272
|
+
onKeydown?: ((payload: KeyboardEvent) => void) | undefined;
|
|
273
|
+
onKeypress?: ((payload: KeyboardEvent) => void) | undefined;
|
|
274
|
+
onKeyup?: ((payload: KeyboardEvent) => void) | undefined;
|
|
275
|
+
onDblclick?: ((payload: MouseEvent) => void) | undefined;
|
|
276
|
+
onMousedown?: ((payload: MouseEvent) => void) | undefined;
|
|
277
|
+
onMouseenter?: ((payload: MouseEvent) => void) | undefined;
|
|
278
|
+
onMouseleave?: ((payload: MouseEvent) => void) | undefined;
|
|
279
|
+
onMousemove?: ((payload: MouseEvent) => void) | undefined;
|
|
280
|
+
onMouseout?: ((payload: MouseEvent) => void) | undefined;
|
|
281
|
+
onMouseover?: ((payload: MouseEvent) => void) | undefined;
|
|
282
|
+
onMouseup?: ((payload: MouseEvent) => void) | undefined;
|
|
283
|
+
onAbort?: ((payload: UIEvent) => void) | undefined;
|
|
284
|
+
onCanplay?: ((payload: Event) => void) | undefined;
|
|
285
|
+
onCanplaythrough?: ((payload: Event) => void) | undefined;
|
|
286
|
+
onDurationchange?: ((payload: Event) => void) | undefined;
|
|
287
|
+
onEmptied?: ((payload: Event) => void) | undefined;
|
|
288
|
+
onEncrypted?: ((payload: MediaEncryptedEvent) => void) | undefined;
|
|
289
|
+
onEnded?: ((payload: Event) => void) | undefined;
|
|
290
|
+
onLoadeddata?: ((payload: Event) => void) | undefined;
|
|
291
|
+
onLoadedmetadata?: ((payload: Event) => void) | undefined;
|
|
292
|
+
onLoadstart?: ((payload: Event) => void) | undefined;
|
|
293
|
+
onPause?: ((payload: Event) => void) | undefined;
|
|
294
|
+
onPlay?: ((payload: Event) => void) | undefined;
|
|
295
|
+
onPlaying?: ((payload: Event) => void) | undefined;
|
|
296
|
+
onProgress?: ((payload: ProgressEvent<EventTarget>) => void) | undefined;
|
|
297
|
+
onRatechange?: ((payload: Event) => void) | undefined;
|
|
298
|
+
onSeeked?: ((payload: Event) => void) | undefined;
|
|
299
|
+
onSeeking?: ((payload: Event) => void) | undefined;
|
|
300
|
+
onStalled?: ((payload: Event) => void) | undefined;
|
|
301
|
+
onSuspend?: ((payload: Event) => void) | undefined;
|
|
302
|
+
onTimeupdate?: ((payload: Event) => void) | undefined;
|
|
303
|
+
onVolumechange?: ((payload: Event) => void) | undefined;
|
|
304
|
+
onWaiting?: ((payload: Event) => void) | undefined;
|
|
305
|
+
onScroll?: ((payload: Event) => void) | undefined;
|
|
306
|
+
onScrollend?: ((payload: Event) => void) | undefined;
|
|
307
|
+
onTouchcancel?: ((payload: TouchEvent) => void) | undefined;
|
|
308
|
+
onTouchend?: ((payload: TouchEvent) => void) | undefined;
|
|
309
|
+
onTouchmove?: ((payload: TouchEvent) => void) | undefined;
|
|
310
|
+
onTouchstart?: ((payload: TouchEvent) => void) | undefined;
|
|
311
|
+
onAuxclick?: ((payload: PointerEvent) => void) | undefined;
|
|
312
|
+
onClick?: ((payload: PointerEvent) => void) | undefined;
|
|
313
|
+
onContextmenu?: ((payload: PointerEvent) => void) | undefined;
|
|
314
|
+
onGotpointercapture?: ((payload: PointerEvent) => void) | undefined;
|
|
315
|
+
onLostpointercapture?: ((payload: PointerEvent) => void) | undefined;
|
|
316
|
+
onPointerdown?: ((payload: PointerEvent) => void) | undefined;
|
|
317
|
+
onPointermove?: ((payload: PointerEvent) => void) | undefined;
|
|
318
|
+
onPointerup?: ((payload: PointerEvent) => void) | undefined;
|
|
319
|
+
onPointercancel?: ((payload: PointerEvent) => void) | undefined;
|
|
320
|
+
onPointerenter?: ((payload: PointerEvent) => void) | undefined;
|
|
321
|
+
onPointerleave?: ((payload: PointerEvent) => void) | undefined;
|
|
322
|
+
onPointerover?: ((payload: PointerEvent) => void) | undefined;
|
|
323
|
+
onPointerout?: ((payload: PointerEvent) => void) | undefined;
|
|
324
|
+
onBeforetoggle?: ((payload: ToggleEvent) => void) | undefined;
|
|
325
|
+
onToggle?: ((payload: ToggleEvent) => void) | undefined;
|
|
326
|
+
onWheel?: ((payload: WheelEvent) => void) | undefined;
|
|
327
|
+
onAnimationcancel?: ((payload: AnimationEvent) => void) | undefined;
|
|
328
|
+
onAnimationstart?: ((payload: AnimationEvent) => void) | undefined;
|
|
329
|
+
onAnimationend?: ((payload: AnimationEvent) => void) | undefined;
|
|
330
|
+
onAnimationiteration?: ((payload: AnimationEvent) => void) | undefined;
|
|
331
|
+
onSecuritypolicyviolation?: ((payload: SecurityPolicyViolationEvent) => void) | undefined;
|
|
332
|
+
onTransitioncancel?: ((payload: TransitionEvent) => void) | undefined;
|
|
333
|
+
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
334
|
+
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
335
|
+
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
336
|
+
innerHTML?: string | undefined;
|
|
337
|
+
color?: string | undefined;
|
|
338
|
+
lang?: string | undefined;
|
|
339
|
+
tabindex?: (string | number) | undefined;
|
|
340
|
+
'aria-activedescendant'?: string | undefined;
|
|
341
|
+
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
342
|
+
'aria-autocomplete'?: "none" | "inline" | "list" | "both" | undefined;
|
|
343
|
+
'aria-busy'?: (boolean | "true" | "false") | undefined;
|
|
344
|
+
'aria-checked'?: (boolean | "true" | "false") | "mixed" | undefined;
|
|
345
|
+
'aria-colcount'?: (string | number) | undefined;
|
|
346
|
+
'aria-colindex'?: (string | number) | undefined;
|
|
347
|
+
'aria-colspan'?: (string | number) | undefined;
|
|
348
|
+
'aria-controls'?: string | undefined;
|
|
349
|
+
'aria-current'?: (boolean | "true" | "false") | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
350
|
+
'aria-describedby'?: string | undefined;
|
|
351
|
+
'aria-details'?: string | undefined;
|
|
352
|
+
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
353
|
+
'aria-dropeffect'?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
354
|
+
'aria-errormessage'?: string | undefined;
|
|
355
|
+
'aria-expanded'?: (boolean | "true" | "false") | undefined;
|
|
356
|
+
'aria-flowto'?: string | undefined;
|
|
357
|
+
'aria-grabbed'?: (boolean | "true" | "false") | undefined;
|
|
358
|
+
'aria-haspopup'?: (boolean | "true" | "false") | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
359
|
+
'aria-invalid'?: (boolean | "true" | "false") | "grammar" | "spelling" | undefined;
|
|
360
|
+
'aria-keyshortcuts'?: string | undefined;
|
|
361
|
+
'aria-labelledby'?: string | undefined;
|
|
362
|
+
'aria-level'?: (string | number) | undefined;
|
|
363
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
364
|
+
'aria-modal'?: (boolean | "true" | "false") | undefined;
|
|
365
|
+
'aria-multiline'?: (boolean | "true" | "false") | undefined;
|
|
366
|
+
'aria-multiselectable'?: (boolean | "true" | "false") | undefined;
|
|
367
|
+
'aria-orientation'?: "horizontal" | "vertical" | undefined;
|
|
368
|
+
'aria-owns'?: string | undefined;
|
|
369
|
+
'aria-placeholder'?: string | undefined;
|
|
370
|
+
'aria-posinset'?: (string | number) | undefined;
|
|
371
|
+
'aria-pressed'?: (boolean | "true" | "false") | "mixed" | undefined;
|
|
372
|
+
'aria-readonly'?: (boolean | "true" | "false") | undefined;
|
|
373
|
+
'aria-relevant'?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
374
|
+
'aria-required'?: (boolean | "true" | "false") | undefined;
|
|
375
|
+
'aria-roledescription'?: string | undefined;
|
|
376
|
+
'aria-rowcount'?: (string | number) | undefined;
|
|
377
|
+
'aria-rowindex'?: (string | number) | undefined;
|
|
378
|
+
'aria-rowspan'?: (string | number) | undefined;
|
|
379
|
+
'aria-selected'?: (boolean | "true" | "false") | undefined;
|
|
380
|
+
'aria-setsize'?: (string | number) | undefined;
|
|
381
|
+
'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
382
|
+
'aria-valuemax'?: (string | number) | undefined;
|
|
383
|
+
'aria-valuemin'?: (string | number) | undefined;
|
|
384
|
+
'aria-valuenow'?: (string | number) | undefined;
|
|
385
|
+
'aria-valuetext'?: string | undefined;
|
|
386
|
+
ref?: import("vue").VNodeRef | undefined;
|
|
387
|
+
ref_for?: boolean | undefined | undefined;
|
|
388
|
+
ref_key?: string | undefined | undefined;
|
|
389
|
+
accesskey?: string | undefined;
|
|
390
|
+
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
391
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
392
|
+
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
393
|
+
enterKeyHint?: import("vue").HTMLAttributes["enterkeyhint"];
|
|
394
|
+
inert?: (boolean | "true" | "false") | undefined;
|
|
395
|
+
spellcheck?: (boolean | "true" | "false") | undefined;
|
|
396
|
+
translate?: "yes" | "no" | undefined;
|
|
397
|
+
radiogroup?: string | undefined;
|
|
398
|
+
about?: string | undefined;
|
|
399
|
+
datatype?: string | undefined;
|
|
400
|
+
inlist?: any;
|
|
401
|
+
property?: string | undefined;
|
|
402
|
+
resource?: string | undefined;
|
|
403
|
+
typeof?: string | undefined;
|
|
404
|
+
vocab?: string | undefined;
|
|
405
|
+
autocapitalize?: string | undefined;
|
|
406
|
+
autocorrect?: string | undefined;
|
|
407
|
+
autosave?: string | undefined;
|
|
408
|
+
itemprop?: string | undefined;
|
|
409
|
+
itemscope?: (boolean | "true" | "false") | undefined;
|
|
410
|
+
itemtype?: string | undefined;
|
|
411
|
+
itemid?: string | undefined;
|
|
412
|
+
itemref?: string | undefined;
|
|
413
|
+
security?: string | undefined;
|
|
414
|
+
unselectable?: "on" | "off" | undefined;
|
|
415
|
+
inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
416
|
+
is?: string | undefined;
|
|
417
|
+
exportparts?: string;
|
|
418
|
+
part?: string;
|
|
419
|
+
popover?: import("../../index.ts").PopoverMode | "" | boolean;
|
|
420
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
421
|
+
onVnodeBeforeMount?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
|
|
422
|
+
onVnodeMounted?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
|
|
423
|
+
onVnodeBeforeUpdate?: (((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void) | ((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void)[]) | undefined;
|
|
424
|
+
onVnodeUpdated?: (((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void) | ((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void)[]) | undefined;
|
|
425
|
+
onVnodeBeforeUnmount?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
|
|
426
|
+
onVnodeUnmounted?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
|
|
427
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
428
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
429
|
+
declare const _default: typeof __VLS_export;
|
|
430
|
+
export default _default;
|
|
431
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
432
|
+
new (): {
|
|
433
|
+
$slots: S;
|
|
434
|
+
};
|
|
435
|
+
};
|
|
@@ -67,37 +67,16 @@
|
|
|
67
67
|
>
|
|
68
68
|
{{ backText }}
|
|
69
69
|
</Button>
|
|
70
|
-
<
|
|
70
|
+
<ActionsMenu
|
|
71
71
|
v-if="actionsCollapsed && slots.actions"
|
|
72
72
|
ref="actionsMenuRef"
|
|
73
|
-
placement="bottom-end"
|
|
74
73
|
:label="actionsText"
|
|
75
|
-
|
|
76
|
-
>
|
|
77
|
-
<Button
|
|
78
|
-
variant="soft"
|
|
79
|
-
tone="neutral"
|
|
80
|
-
size="sm"
|
|
81
|
-
trailing-icon="chevron-down"
|
|
82
|
-
:disabled="loading"
|
|
83
|
-
>
|
|
84
|
-
{{ actionsText }}
|
|
85
|
-
</Button>
|
|
86
|
-
<template #content="{ close: closeActions }">
|
|
87
|
-
<div
|
|
88
|
-
class="k-dialog-actions-list"
|
|
89
|
-
@click="onActionsClick($event, closeActions)"
|
|
90
|
-
>
|
|
91
|
-
<slot name="actions" :close="close" />
|
|
92
|
-
</div>
|
|
93
|
-
</template>
|
|
94
|
-
</Popover>
|
|
95
|
-
<div
|
|
96
|
-
v-else-if="slots.actions"
|
|
97
|
-
ref="inlineActionsRef"
|
|
98
|
-
class="k-dialog-actions-inline"
|
|
74
|
+
:disabled="loading"
|
|
99
75
|
>
|
|
100
76
|
<slot name="actions" :close="close" />
|
|
77
|
+
</ActionsMenu>
|
|
78
|
+
<div v-else-if="slots.actions" ref="inlineActionsRef" class="k-actions-inline">
|
|
79
|
+
<slot name="actions" :close="close" />
|
|
101
80
|
</div>
|
|
102
81
|
<Button
|
|
103
82
|
v-if="showDockToggle"
|
|
@@ -176,13 +155,14 @@ import {
|
|
|
176
155
|
} from "vue";
|
|
177
156
|
import Button from "../../components/core/Button.vue";
|
|
178
157
|
import Tabs from "../../components/layout/Tabs.vue";
|
|
179
|
-
import
|
|
158
|
+
import ActionsMenu from "./ActionsMenu.vue";
|
|
180
159
|
import DialogTrail from "./DialogTrail.vue";
|
|
181
160
|
import { useConfirm } from "../../composables/useConfirm";
|
|
182
161
|
import { useLeaveScope } from "../../composables/useLeaveGuard";
|
|
183
162
|
import { useLocale } from "../../composables/useLocale";
|
|
184
163
|
import { createLeaveScope, provideScope, setDialogScope } from "../forms/leave";
|
|
185
164
|
import { provideFieldBoundary } from "../../composables/useFieldBoundary";
|
|
165
|
+
import { remPixels, useActionsCollapse } from "../core/actions-collapse";
|
|
186
166
|
import { useScrollEdges } from "../core/scroll-edges";
|
|
187
167
|
import { useModalDialog } from "./dialog";
|
|
188
168
|
import { DOCK_KEY } from "./dock";
|
|
@@ -231,7 +211,7 @@ const closeText = computed(() => props.closeLabel ?? t("common.close"));
|
|
|
231
211
|
const backText = computed(() => props.backLabel ?? t("common.back"));
|
|
232
212
|
const detachText = computed(() => props.detachLabel ?? t("dock.detach"));
|
|
233
213
|
const attachText = computed(() => props.attachLabel ?? t("dock.attach"));
|
|
234
|
-
const actionsText = computed(() => t("
|
|
214
|
+
const actionsText = computed(() => t("common.actions"));
|
|
235
215
|
const dockHost = inject(DOCK_KEY, null);
|
|
236
216
|
const mounted = ref(false);
|
|
237
217
|
const dockable = computed(() => Boolean(props.dock && dockHost));
|
|
@@ -301,47 +281,14 @@ const headerRef = useTemplateRef("headerRef");
|
|
|
301
281
|
const actionsRef = useTemplateRef("actionsRef");
|
|
302
282
|
const inlineActionsRef = useTemplateRef("inlineActionsRef");
|
|
303
283
|
const actionsMenuRef = useTemplateRef("actionsMenuRef");
|
|
304
|
-
const actionsCollapsed = ref(false);
|
|
305
284
|
const HEADING_MIN_REM = 12;
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
const actions = actionsRef.value;
|
|
314
|
-
if (!header || !actions) return;
|
|
315
|
-
const style = getComputedStyle(header);
|
|
316
|
-
const width = header.clientWidth - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight);
|
|
317
|
-
if (width <= 0) return;
|
|
318
|
-
const inline = inlineActionsRef.value;
|
|
319
|
-
const menu = actions.querySelector(":scope > .k-overlay-trigger");
|
|
320
|
-
if (inline) inlineActionsWidth = inline.scrollWidth;
|
|
321
|
-
const current = inline?.offsetWidth ?? menu?.offsetWidth ?? 0;
|
|
322
|
-
const others = actions.offsetWidth - current;
|
|
323
|
-
const gap = parseFloat(style.columnGap) || 0;
|
|
324
|
-
const needed = HEADING_MIN_REM * remPixels() + gap + others + inlineActionsWidth;
|
|
325
|
-
const collapse = needed > width;
|
|
326
|
-
if (collapse !== actionsCollapsed.value) actionsCollapsed.value = collapse;
|
|
327
|
-
}
|
|
328
|
-
watch(
|
|
329
|
-
() => [headerRef.value, inlineActionsRef.value, actionsMenuRef.value],
|
|
330
|
-
([header, inline]) => {
|
|
331
|
-
actionsObserver?.disconnect();
|
|
332
|
-
if (!header || typeof ResizeObserver === "undefined") return;
|
|
333
|
-
actionsObserver ??= new ResizeObserver(() => measureActions());
|
|
334
|
-
actionsObserver.observe(header);
|
|
335
|
-
if (inline) actionsObserver.observe(inline);
|
|
336
|
-
},
|
|
337
|
-
{ flush: "post" }
|
|
338
|
-
);
|
|
339
|
-
onBeforeUnmount(() => actionsObserver?.disconnect());
|
|
340
|
-
function onActionsClick(event, closeActions) {
|
|
341
|
-
const target = event.target instanceof Element ? event.target.closest("button, a") : null;
|
|
342
|
-
if (!target || target.matches('[aria-haspopup]:not([aria-haspopup="false"])')) return;
|
|
343
|
-
closeActions();
|
|
344
|
-
}
|
|
285
|
+
const actionsCollapsed = useActionsCollapse({
|
|
286
|
+
container: headerRef,
|
|
287
|
+
actions: actionsRef,
|
|
288
|
+
inline: inlineActionsRef,
|
|
289
|
+
menu: actionsMenuRef,
|
|
290
|
+
headingMin: () => HEADING_MIN_REM * remPixels()
|
|
291
|
+
});
|
|
345
292
|
function onDockedEscape(event) {
|
|
346
293
|
const dialog = dialogRef.value;
|
|
347
294
|
if (!docked.value || !dialog || event.defaultPrevented) return;
|
package/dist/locale/de.mjs
CHANGED
|
@@ -3,6 +3,7 @@ export const de = {
|
|
|
3
3
|
dir: "ltr",
|
|
4
4
|
messages: {
|
|
5
5
|
common: {
|
|
6
|
+
actions: "Aktionen",
|
|
6
7
|
cancel: "Abbrechen",
|
|
7
8
|
confirm: "Best\xE4tigen",
|
|
8
9
|
close: "Schlie\xDFen",
|
|
@@ -262,7 +263,6 @@ export const de = {
|
|
|
262
263
|
cancel: "Weiter bearbeiten"
|
|
263
264
|
},
|
|
264
265
|
dock: {
|
|
265
|
-
actions: "Aktionen",
|
|
266
266
|
label: "Details",
|
|
267
267
|
emptyTitle: "Nichts ausgew\xE4hlt",
|
|
268
268
|
emptyDescription: "W\xE4hlen Sie ein Element der Liste, um hier seine Details zu sehen.",
|
package/dist/locale/en.mjs
CHANGED
|
@@ -3,6 +3,7 @@ export const en = {
|
|
|
3
3
|
dir: "ltr",
|
|
4
4
|
messages: {
|
|
5
5
|
common: {
|
|
6
|
+
actions: "Actions",
|
|
6
7
|
cancel: "Cancel",
|
|
7
8
|
confirm: "Confirm",
|
|
8
9
|
close: "Close",
|
|
@@ -262,7 +263,6 @@ export const en = {
|
|
|
262
263
|
cancel: "Keep editing"
|
|
263
264
|
},
|
|
264
265
|
dock: {
|
|
265
|
-
actions: "Actions",
|
|
266
266
|
label: "Details",
|
|
267
267
|
emptyTitle: "Nothing selected",
|
|
268
268
|
emptyDescription: "Select an item in the list to see its details here.",
|
package/dist/locale/it.mjs
CHANGED
|
@@ -3,6 +3,7 @@ export const it = {
|
|
|
3
3
|
dir: "ltr",
|
|
4
4
|
messages: {
|
|
5
5
|
common: {
|
|
6
|
+
actions: "Azioni",
|
|
6
7
|
cancel: "Annulla",
|
|
7
8
|
confirm: "Conferma",
|
|
8
9
|
close: "Chiudi",
|
|
@@ -262,7 +263,6 @@ export const it = {
|
|
|
262
263
|
cancel: "Continua a modificare"
|
|
263
264
|
},
|
|
264
265
|
dock: {
|
|
265
|
-
actions: "Azioni",
|
|
266
266
|
label: "Dettagli",
|
|
267
267
|
emptyTitle: "Nessun elemento selezionato",
|
|
268
268
|
emptyDescription: "Seleziona un elemento della lista per vederne qui i dettagli.",
|
package/dist/locale/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { PaletteColor } from '../components/core/types';
|
|
|
2
2
|
export type MessageParams = Record<string, string | number>;
|
|
3
3
|
export interface KMessages {
|
|
4
4
|
common: {
|
|
5
|
+
actions: string;
|
|
5
6
|
cancel: string;
|
|
6
7
|
confirm: string;
|
|
7
8
|
close: string;
|
|
@@ -249,7 +250,6 @@ export interface KMessages {
|
|
|
249
250
|
cancel: string;
|
|
250
251
|
};
|
|
251
252
|
dock: {
|
|
252
|
-
actions: string;
|
|
253
253
|
label: string;
|
|
254
254
|
emptyTitle: string;
|
|
255
255
|
emptyDescription: string;
|
|
@@ -256,6 +256,9 @@ html.k-root body {
|
|
|
256
256
|
.k-shell:not(.is-dock-detached):has(.k-drawer.is-dockable) > .k-shell-dock {
|
|
257
257
|
width: var(--k-shell-dock-width, 30rem);
|
|
258
258
|
visibility: visible;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.k-shell:not(.is-dock-detached):has(.k-drawer.is-dockable) > .k-shell-dock:not(.is-resizing) {
|
|
259
262
|
transition: width var(--k-duration-xl) var(--k-ease-drawer);
|
|
260
263
|
}
|
|
261
264
|
}
|
|
@@ -73,11 +73,17 @@
|
|
|
73
73
|
|
|
74
74
|
.k-page-header-actions {
|
|
75
75
|
display: flex;
|
|
76
|
-
flex-wrap: wrap;
|
|
77
76
|
align-items: center;
|
|
78
77
|
gap: 0.5rem;
|
|
79
78
|
}
|
|
80
79
|
|
|
80
|
+
.k-page-header-actions-inline {
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-shrink: 0;
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: inherit;
|
|
85
|
+
}
|
|
86
|
+
|
|
81
87
|
.k-page-header-extra {
|
|
82
88
|
flex-basis: 100%;
|
|
83
89
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.k-actions-inline {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-shrink: 0;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 0.375rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.k-popover.k-actions-menu {
|
|
9
|
+
padding: 0.25rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.k-actions-list {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: 0.125rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.k-actions-list :where(.k-overlay-trigger) {
|
|
19
|
+
display: flex;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.k-actions-list div:not([popover], [popover] *, .k-btn *) {
|
|
23
|
+
display: contents;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.k-actions-list.k-actions-list .k-btn.k-btn {
|
|
27
|
+
width: 100%;
|
|
28
|
+
justify-content: flex-start;
|
|
29
|
+
color: var(--k-text);
|
|
30
|
+
background: transparent;
|
|
31
|
+
border-color: transparent;
|
|
32
|
+
box-shadow: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.k-actions-list.k-actions-list .k-btn.k-btn-danger {
|
|
36
|
+
color: var(--k-danger-text);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.k-actions-list.k-actions-list .k-btn.k-btn:hover:not(:disabled, [aria-disabled='true']) {
|
|
40
|
+
background: var(--k-hover);
|
|
41
|
+
box-shadow: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.k-actions-list.k-actions-list .k-btn.k-btn:active:not(:disabled, [aria-disabled='true']) {
|
|
45
|
+
background: var(--k-press);
|
|
46
|
+
}
|
|
@@ -157,55 +157,6 @@
|
|
|
157
157
|
--k-drawer-size: 48rem;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
.k-dialog-actions-inline {
|
|
161
|
-
display: flex;
|
|
162
|
-
flex-shrink: 0;
|
|
163
|
-
align-items: center;
|
|
164
|
-
gap: 0.375rem;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.k-popover.k-dialog-actions-menu {
|
|
168
|
-
padding: 0.25rem;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.k-dialog-actions-list {
|
|
172
|
-
display: flex;
|
|
173
|
-
flex-direction: column;
|
|
174
|
-
gap: 0.125rem;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.k-dialog-actions-list :where(.k-overlay-trigger) {
|
|
178
|
-
display: flex;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.k-dialog-actions-list div:not([popover], [popover] *, .k-btn *) {
|
|
182
|
-
display: contents;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.k-dialog-actions-list.k-dialog-actions-list .k-btn.k-btn {
|
|
186
|
-
width: 100%;
|
|
187
|
-
justify-content: flex-start;
|
|
188
|
-
color: var(--k-text);
|
|
189
|
-
background: transparent;
|
|
190
|
-
border-color: transparent;
|
|
191
|
-
box-shadow: none;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.k-dialog-actions-list.k-dialog-actions-list .k-btn.k-btn-danger {
|
|
195
|
-
color: var(--k-danger-text);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.k-dialog-actions-list.k-dialog-actions-list
|
|
199
|
-
.k-btn.k-btn:hover:not(:disabled, [aria-disabled='true']) {
|
|
200
|
-
background: var(--k-hover);
|
|
201
|
-
box-shadow: none;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.k-dialog-actions-list.k-dialog-actions-list
|
|
205
|
-
.k-btn.k-btn:active:not(:disabled, [aria-disabled='true']) {
|
|
206
|
-
background: var(--k-press);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
160
|
.k-drawer.is-docked {
|
|
210
161
|
position: static;
|
|
211
162
|
inset: auto;
|
package/dist/styles/overlays.css
CHANGED
package/package.json
CHANGED