@xleddyl/443-components-vue 0.16.88 → 0.16.89
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 +1 -1
- package/README.md +1 -1
- package/dist/components/data/Tree.vue +86 -16
- package/dist/components/data/Tree.vue.d.ts +18 -3
- package/dist/components/data/types.d.ts +1 -0
- package/dist/locale/de.mjs +2 -1
- package/dist/locale/en.mjs +2 -1
- package/dist/locale/it.mjs +2 -1
- package/dist/locale/types.d.ts +1 -0
- package/dist/styles/data/tree.css +23 -4
- package/dist/styles/forced-colors.css +6 -1
- package/package.json +1 -1
package/CATALOG.md
CHANGED
|
@@ -228,7 +228,7 @@ Mount `OverlayHost` once for the imperative hooks (see [Composables](#composable
|
|
|
228
228
|
| `RecordList` | Short list of records (settings, users, tokens): title, badge, description, leading and action slots, `SkeletonList` while `loading`, empty state. | Props: `items` (`RecordListItem`: `id`, `title` (truncated, full text on hover), `description`, `badge` `{ label, tone }`), `loading`, `avatar`, `action`, `label`, `skeletonRows`, `emptyText`, `emptyDescription`, `emptyIcon`, `emptyVariant` (card, the default, or plain). Event: `row-click` (`item`, `event`): each row becomes a navigation item (padding, hover and press background like a ghost button, no separators) and its title a button, so Tab reaches every row and Enter or Space opens it (focus ring on the row, the description is the button description). Clicks on buttons, links, inputs, menu items and inside an open menu, popover or dialog of the row are ignored, and pressing them does not tint the row; `rowClickable(item)` keeps some rows static in the same list (no button, no hover). Slots: `leading`, `action` (`{ item }`), `empty`, `empty-actions` (buttons in the default empty state). | `data/record-list.vue` |
|
|
229
229
|
| `DescriptionList` | Label and value pairs for a record. Use it on detail views. | Props: `items` (`key`, `label`, `value`, `hint`), `layout` (stacked, inline, grid), `columns`, `divided`, `emptyText`. Slots: `term`, `value`, `value-<key>`. | `data/description-list.vue` |
|
|
230
230
|
| `Timeline` | Vertical list of events or activity. | Props: `items` (`title`, `description`, `time`, `datetime`, `icon`, `tone`), `compact`. Slot: `item`. | `data/timeline.vue` |
|
|
231
|
-
| `Tree` | Expandable hierarchy with selection, drag to reorder and nesting. | Models: `v-model:expanded`, `v-model:selected`. Props: `nodes` (`id`, `label`, `description`, `meta`, `icon`, `children`, `disabled`), `selectable`, `reorderable`, `nestable`, `moveButtons` (default `true`; `false` hides the row arrows, drag and Alt+arrow keys still work), `canDrop`, `size`, `checkmark`, `emptyText`, `emptyDescription`, `emptyIcon`, `emptyVariant` (card, the default, or plain). Slots: `label`, `meta`, `empty`, `empty-actions` (buttons in the default empty state). Events: `select`, `move
|
|
231
|
+
| `Tree` | Expandable hierarchy with selection, drag to reorder and nesting. | Models: `v-model:expanded`, `v-model:selected`. Props: `nodes` (`id`, `label`, `description`, `meta`, `icon`, `children`, `disabled`, `invalid`), `selectable`, `highlighted` (id or ids tinted like hover), `invalidText`, `reorderable`, `nestable`, `moveButtons` (default `true`; `false` hides the row arrows, drag and Alt+arrow keys still work), `canDrop`, `size`, `checkmark`, `emptyText`, `emptyDescription`, `emptyIcon`, `emptyVariant` (card, the default, or plain). Slots: `label`, `meta`, `actions` (row end, on hover, focus and the selected row; `node`, `level`, `selected`, `expanded`, `highlighted`, `hovered`), `empty`, `empty-actions` (buttons in the default empty state). Events: `select`, `move`, `hover` (node or `null`). | `data/tree.vue` |
|
|
232
232
|
|
|
233
233
|
## Layout
|
|
234
234
|
|
package/README.md
CHANGED
|
@@ -502,7 +502,7 @@ On your own elements, `paletteClass(color)` gives the class of a palette name an
|
|
|
502
502
|
|
|
503
503
|
### Lists, trees and uploads
|
|
504
504
|
|
|
505
|
-
- `Tree` takes `size="sm"` for dense rows, `checkmark`, `descriptionVariant` (`mono`, the default for paths and slugs, or `text`; a node can override it with its own `descriptionVariant`), `emptyText`, `emptyDescription`, `emptyIcon` and `emptyVariant` (`card`, the default, or `plain`) for the `EmptyState` shown without nodes (`#empty` replaces it, `#empty-actions` adds buttons inside it, like `RecordList`) and works inside a `FormField` (labelled and described by the field). With `reorderable` rows get a drag handle and Alt with the up and down arrows moves them; `nestable` also lets rows change level (drop in the middle of a row, Alt with left and right). Each row also shows move buttons; `moveButtons: false` hides them and keeps drag and the keyboard. The `move` event carries `{ node, target, position, from: { parent, index }, to: { parent, index } }`, `to.index` being the final index, and `applyTreeMove(nodes, move)` returns the updated tree. `canDrop(move)` vetoes a move. Moves are announced to screen readers.
|
|
505
|
+
- `Tree` takes `size="sm"` for dense rows, `checkmark`, `descriptionVariant` (`mono`, the default for paths and slugs, or `text`; a node can override it with its own `descriptionVariant`), `emptyText`, `emptyDescription`, `emptyIcon` and `emptyVariant` (`card`, the default, or `plain`) for the `EmptyState` shown without nodes (`#empty` replaces it, `#empty-actions` adds buttons inside it, like `RecordList`) and works inside a `FormField` (labelled and described by the field). With `reorderable` rows get a drag handle and Alt with the up and down arrows moves them; `nestable` also lets rows change level (drop in the middle of a row, Alt with left and right). Each row also shows move buttons; `moveButtons: false` hides them and keeps drag and the keyboard. The `move` event carries `{ node, target, position, from: { parent, index }, to: { parent, index } }`, `to.index` being the final index, and `applyTreeMove(nodes, move)` returns the updated tree. `canDrop(move)` vetoes a move. Moves are announced to screen readers. The `#actions` slot (`node`, `level`, `selected`, `expanded`, `highlighted`, `hovered`) renders row actions at the end of the row, over the label, on the hovered, focused and selected rows only; Tab from the focused row reaches them, and focus returns to a row when the focused one is removed. `highlighted` (an id or an array of ids) tints rows like hover, for a link with something outside the tree (a block hovered in a preview). The `hover` event carries the node under the pointer, then `null` when the pointer leaves the tree. A node with `invalid: true` shows a danger dot and a tinted label, and its row is described by a hidden "Contains errors" (`invalidText` overrides it).
|
|
506
506
|
- `Select` takes string, number or boolean option values (`{ value: true, label: 'Yes' }`); the model gets the option value back with its type and is typed `T | null | undefined`, so `v-model` works on a narrow ref (`Ref<'a' | 'b' | null>`). An option whose value is `''` is a real option: it is selected and shown with its own label, distinct from the placeholder, which still maps to `null`.
|
|
507
507
|
- `Input` and `Textarea` take `counter`: with a `maxlength` attribute they show `length / maxlength` inside the field, describe the control with "12 of 40 characters" (`form.characterCount`) and announce "Character limit reached" when it is hit.
|
|
508
508
|
- Numbers are left aligned in every field. `Input` `numeric` sets the decimal keyboard, the number model and tabular digits; `NumberInput` takes `align="end"` to right align its value when a layout needs it (default `start`).
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
role="tree"
|
|
15
15
|
:class="rootClass"
|
|
16
16
|
data-k-shake
|
|
17
|
+
@pointerleave="onTreeLeave"
|
|
18
|
+
@focusin="hasFocus = true"
|
|
19
|
+
@focusout="onFocusOut"
|
|
17
20
|
>
|
|
18
21
|
<li
|
|
19
22
|
v-for="(entry, index) in visible"
|
|
@@ -31,7 +34,11 @@
|
|
|
31
34
|
:aria-describedby="describedBy(entry)"
|
|
32
35
|
:aria-keyshortcuts="canReorder && !entry.node.disabled ? keyShortcuts : void 0"
|
|
33
36
|
:tabindex="entry.node.id === rovingId ? 0 : -1"
|
|
34
|
-
:class="{
|
|
37
|
+
:class="{
|
|
38
|
+
'is-moving': dragId === entry.node.id,
|
|
39
|
+
'is-highlighted': highlightedSet.has(entry.node.id),
|
|
40
|
+
'is-invalid': entry.node.invalid
|
|
41
|
+
}"
|
|
35
42
|
:data-drop="dropState?.id === entry.node.id ? dropState.position : void 0"
|
|
36
43
|
:style="{
|
|
37
44
|
'--k-tree-level': entry.level - 1,
|
|
@@ -40,6 +47,7 @@
|
|
|
40
47
|
@click="activate(entry)"
|
|
41
48
|
@keydown="onKeydown($event, entry, index)"
|
|
42
49
|
@focus="focusId = entry.node.id"
|
|
50
|
+
@pointerenter="onRowEnter(entry)"
|
|
43
51
|
@dragover="onDragOver($event, entry)"
|
|
44
52
|
@dragleave="onDragLeave($event, entry)"
|
|
45
53
|
@drop="onDrop($event, entry)"
|
|
@@ -81,6 +89,7 @@
|
|
|
81
89
|
>
|
|
82
90
|
</slot>
|
|
83
91
|
</span>
|
|
92
|
+
<span v-if="entry.node.invalid" class="k-tree-invalid" aria-hidden="true" />
|
|
84
93
|
<span
|
|
85
94
|
v-if="entry.node.meta || $slots.meta"
|
|
86
95
|
:id="metaId(entry.node.id)"
|
|
@@ -92,22 +101,36 @@
|
|
|
92
101
|
<Icon v-if="selected === entry.node.id" name="check" />
|
|
93
102
|
</span>
|
|
94
103
|
<span
|
|
95
|
-
v-if="
|
|
104
|
+
v-if="hasMoveButtons(entry) || $slots.actions"
|
|
96
105
|
class="k-tree-actions"
|
|
106
|
+
:class="{ 'has-slot': $slots.actions }"
|
|
107
|
+
:inert="actionsInert(entry) || void 0"
|
|
97
108
|
@click.stop
|
|
109
|
+
@focusin="focusId = entry.node.id"
|
|
98
110
|
>
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
+
<template v-if="hasMoveButtons(entry)">
|
|
112
|
+
<Button
|
|
113
|
+
v-for="action in rowActions(entry)"
|
|
114
|
+
:key="action.direction"
|
|
115
|
+
variant="ghost"
|
|
116
|
+
tone="neutral"
|
|
117
|
+
size="xs"
|
|
118
|
+
tabindex="-1"
|
|
119
|
+
:icon="action.icon"
|
|
120
|
+
:aria-label="action.label"
|
|
121
|
+
:title="action.label"
|
|
122
|
+
:disabled="!action.move"
|
|
123
|
+
@click="action.move && commit(action.move)"
|
|
124
|
+
/>
|
|
125
|
+
</template>
|
|
126
|
+
<slot
|
|
127
|
+
name="actions"
|
|
128
|
+
:node="entry.node"
|
|
129
|
+
:level="entry.level"
|
|
130
|
+
:selected="selectable && selected === entry.node.id"
|
|
131
|
+
:expanded="entry.hasChildren && isExpanded(entry.node.id)"
|
|
132
|
+
:highlighted="highlightedSet.has(entry.node.id)"
|
|
133
|
+
:hovered="hoverId === entry.node.id"
|
|
111
134
|
/>
|
|
112
135
|
</span>
|
|
113
136
|
</li>
|
|
@@ -135,6 +158,7 @@
|
|
|
135
158
|
</EmptyState>
|
|
136
159
|
</slot>
|
|
137
160
|
</div>
|
|
161
|
+
<span v-if="hasInvalid" :id="invalidId" class="k-visually-hidden">{{ invalidLabel }}</span>
|
|
138
162
|
<template v-if="canReorder">
|
|
139
163
|
<span :id="hintId" class="k-visually-hidden">{{ hintText }}</span>
|
|
140
164
|
<LiveRegion :message="live.message.value" />
|
|
@@ -142,11 +166,12 @@
|
|
|
142
166
|
</template>
|
|
143
167
|
|
|
144
168
|
<script setup>
|
|
145
|
-
import { computed, nextTick, ref, useId, useSlots, useTemplateRef } from "vue";
|
|
169
|
+
import { computed, nextTick, ref, useId, useSlots, useTemplateRef, watch } from "vue";
|
|
146
170
|
import { useFieldControl } from "../../composables/useField";
|
|
147
171
|
import { useLocale } from "../../composables/useLocale";
|
|
148
172
|
import LiveRegion from "../../internal/core/LiveRegion.vue";
|
|
149
173
|
import { useLiveMessage } from "../../internal/core/live";
|
|
174
|
+
import { hasFocusWithin, isFocusLost } from "../../internal/core/focus";
|
|
150
175
|
import { useTypeahead } from "../../internal/core/roving";
|
|
151
176
|
import { joinIds } from "../../internal/forms/control";
|
|
152
177
|
import Button from "../core/Button.vue";
|
|
@@ -171,13 +196,15 @@ const props = defineProps({
|
|
|
171
196
|
moveButtons: { type: Boolean, required: false, default: true },
|
|
172
197
|
canDrop: { type: Function, required: false },
|
|
173
198
|
reorderText: { type: String, required: false },
|
|
199
|
+
highlighted: { type: [String, Number, Array, null], required: false },
|
|
200
|
+
invalidText: { type: String, required: false },
|
|
174
201
|
invalid: { type: Boolean, required: false, default: void 0 },
|
|
175
202
|
disabled: { type: Boolean, required: false },
|
|
176
203
|
required: { type: Boolean, required: false }
|
|
177
204
|
});
|
|
178
205
|
const { t } = useLocale();
|
|
179
206
|
const slots = useSlots();
|
|
180
|
-
const emit = defineEmits(["select", "move"]);
|
|
207
|
+
const emit = defineEmits(["select", "move", "hover"]);
|
|
181
208
|
const expanded = defineModel("expanded", { type: Array, ...{ default: () => [] } });
|
|
182
209
|
const selected = defineModel("selected", { type: [String, Number, null], ...{ default: null } });
|
|
183
210
|
const control = useFieldControl({
|
|
@@ -188,12 +215,15 @@ const control = useFieldControl({
|
|
|
188
215
|
});
|
|
189
216
|
const baseId = useId();
|
|
190
217
|
const hintId = `${baseId}-hint`;
|
|
218
|
+
const invalidId = `${baseId}-invalid`;
|
|
191
219
|
const tree = useTemplateRef("tree");
|
|
192
220
|
const focusId = ref(selected.value ?? props.nodes[0]?.id ?? null);
|
|
193
221
|
const revealAnchor = ref(-1);
|
|
194
222
|
const dragId = ref(null);
|
|
195
223
|
const dropState = ref(null);
|
|
196
224
|
const live = useLiveMessage();
|
|
225
|
+
const hoverId = ref(null);
|
|
226
|
+
const hasFocus = ref(false);
|
|
197
227
|
const ariaLabel = computed(() => {
|
|
198
228
|
if (props.label) return props.label;
|
|
199
229
|
return control.labelledBy.value ? void 0 : t("tree.label");
|
|
@@ -208,6 +238,12 @@ const keyShortcuts = computed(
|
|
|
208
238
|
() => props.nestable ? "Alt+ArrowUp Alt+ArrowDown Alt+ArrowLeft Alt+ArrowRight" : "Alt+ArrowUp Alt+ArrowDown"
|
|
209
239
|
);
|
|
210
240
|
const expandedSet = computed(() => new Set(expanded.value));
|
|
241
|
+
const highlightedSet = computed(() => {
|
|
242
|
+
const value = props.highlighted;
|
|
243
|
+
if (value === null || value === void 0) return /* @__PURE__ */ new Set();
|
|
244
|
+
return new Set(Array.isArray(value) ? value : [value]);
|
|
245
|
+
});
|
|
246
|
+
const invalidLabel = computed(() => props.invalidText ?? t("tree.invalidNode"));
|
|
211
247
|
function rowId(id) {
|
|
212
248
|
return `${baseId}-node-${id}`;
|
|
213
249
|
}
|
|
@@ -236,6 +272,7 @@ const rootClass = computed(() => [
|
|
|
236
272
|
function describedBy(entry) {
|
|
237
273
|
const hasMeta = Boolean(entry.node.meta || slots.meta);
|
|
238
274
|
return joinIds(
|
|
275
|
+
entry.node.invalid ? invalidId : void 0,
|
|
239
276
|
!slots.label && entry.node.description ? descriptionId(entry.node.id) : void 0,
|
|
240
277
|
hasMeta ? metaId(entry.node.id) : void 0,
|
|
241
278
|
canReorder.value && !entry.node.disabled ? hintId : void 0
|
|
@@ -279,6 +316,39 @@ const rovingId = computed(() => {
|
|
|
279
316
|
if (list.some((entry) => entry.node.id === focusId.value)) return focusId.value;
|
|
280
317
|
return list.find((entry) => entry.node.id === selected.value)?.node.id ?? list[0]?.node.id;
|
|
281
318
|
});
|
|
319
|
+
const hasInvalid = computed(() => visible.value.some((entry) => entry.node.invalid));
|
|
320
|
+
function hasMoveButtons(entry) {
|
|
321
|
+
return canReorder.value && props.moveButtons && !entry.node.disabled;
|
|
322
|
+
}
|
|
323
|
+
function actionsInert(entry) {
|
|
324
|
+
const id = entry.node.id;
|
|
325
|
+
return hoverId.value !== id && !(hasFocus.value && rovingId.value === id);
|
|
326
|
+
}
|
|
327
|
+
function setHover(node) {
|
|
328
|
+
const id = node?.id ?? null;
|
|
329
|
+
if (hoverId.value === id) return;
|
|
330
|
+
hoverId.value = id;
|
|
331
|
+
emit("hover", node);
|
|
332
|
+
}
|
|
333
|
+
function onRowEnter(entry) {
|
|
334
|
+
setHover(entry.node);
|
|
335
|
+
}
|
|
336
|
+
function onTreeLeave() {
|
|
337
|
+
setHover(null);
|
|
338
|
+
}
|
|
339
|
+
function onFocusOut(event) {
|
|
340
|
+
const next = event.relatedTarget;
|
|
341
|
+
if (next instanceof Node && event.currentTarget.contains(next)) return;
|
|
342
|
+
hasFocus.value = false;
|
|
343
|
+
}
|
|
344
|
+
watch(visible, (list) => {
|
|
345
|
+
if (hoverId.value !== null && !list.some((entry) => entry.node.id === hoverId.value))
|
|
346
|
+
setHover(null);
|
|
347
|
+
if (!hasFocusWithin(tree.value)) return;
|
|
348
|
+
nextTick(() => {
|
|
349
|
+
if (isFocusLost()) focusNode(rovingId.value);
|
|
350
|
+
});
|
|
351
|
+
});
|
|
282
352
|
function setExpanded(entry, position, open) {
|
|
283
353
|
if (!entry.hasChildren || isExpanded(entry.node.id) === open) return;
|
|
284
354
|
revealAnchor.value = position;
|
|
@@ -5,15 +5,24 @@ declare var __VLS_12: {
|
|
|
5
5
|
level: number;
|
|
6
6
|
}, __VLS_14: {
|
|
7
7
|
node: TreeNode;
|
|
8
|
-
}, __VLS_29: {
|
|
8
|
+
}, __VLS_29: {
|
|
9
|
+
node: TreeNode;
|
|
10
|
+
level: number;
|
|
11
|
+
selected: boolean;
|
|
12
|
+
expanded: boolean;
|
|
13
|
+
highlighted: boolean;
|
|
14
|
+
hovered: boolean;
|
|
15
|
+
}, __VLS_31: {}, __VLS_40: {};
|
|
9
16
|
type __VLS_Slots = {} & {
|
|
10
17
|
label?: (props: typeof __VLS_12) => any;
|
|
11
18
|
} & {
|
|
12
19
|
meta?: (props: typeof __VLS_14) => any;
|
|
13
20
|
} & {
|
|
14
|
-
|
|
21
|
+
actions?: (props: typeof __VLS_29) => any;
|
|
22
|
+
} & {
|
|
23
|
+
empty?: (props: typeof __VLS_31) => any;
|
|
15
24
|
} & {
|
|
16
|
-
'empty-actions'?: (props: typeof
|
|
25
|
+
'empty-actions'?: (props: typeof __VLS_40) => any;
|
|
17
26
|
};
|
|
18
27
|
declare const __VLS_base: import("vue").DefineComponent<{
|
|
19
28
|
nodes: TreeNode[];
|
|
@@ -32,6 +41,8 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
32
41
|
moveButtons?: boolean;
|
|
33
42
|
canDrop?: (move: TreeMove) => boolean;
|
|
34
43
|
reorderText?: string;
|
|
44
|
+
highlighted?: TreeNodeId | TreeNodeId[] | null;
|
|
45
|
+
invalidText?: string;
|
|
35
46
|
invalid?: boolean;
|
|
36
47
|
disabled?: boolean;
|
|
37
48
|
required?: boolean;
|
|
@@ -232,6 +243,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
232
243
|
move: (move: TreeMove) => any;
|
|
233
244
|
select: (node: TreeNode) => any;
|
|
234
245
|
"update:selected": (value: TreeNodeId | null) => any;
|
|
246
|
+
hover: (node: TreeNode | null) => any;
|
|
235
247
|
"update:expanded": (value: TreeNodeId[]) => any;
|
|
236
248
|
}, string, import("vue").PublicProps, Readonly<{
|
|
237
249
|
nodes: TreeNode[];
|
|
@@ -250,6 +262,8 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
250
262
|
moveButtons?: boolean;
|
|
251
263
|
canDrop?: (move: TreeMove) => boolean;
|
|
252
264
|
reorderText?: string;
|
|
265
|
+
highlighted?: TreeNodeId | TreeNodeId[] | null;
|
|
266
|
+
invalidText?: string;
|
|
253
267
|
invalid?: boolean;
|
|
254
268
|
disabled?: boolean;
|
|
255
269
|
required?: boolean;
|
|
@@ -450,6 +464,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
450
464
|
onMove?: ((move: TreeMove) => any) | undefined;
|
|
451
465
|
onSelect?: ((node: TreeNode) => any) | undefined;
|
|
452
466
|
"onUpdate:selected"?: ((value: TreeNodeId | null) => any) | undefined;
|
|
467
|
+
onHover?: ((node: TreeNode | null) => any) | undefined;
|
|
453
468
|
"onUpdate:expanded"?: ((value: TreeNodeId[]) => any) | undefined;
|
|
454
469
|
}>, {
|
|
455
470
|
size: TreeSize;
|
package/dist/locale/de.mjs
CHANGED
|
@@ -436,7 +436,8 @@ export const de = {
|
|
|
436
436
|
moveUp: "{label} nach oben verschieben",
|
|
437
437
|
moveDown: "{label} nach unten verschieben",
|
|
438
438
|
indent: "{label} einr\xFCcken",
|
|
439
|
-
outdent: "{label} ausr\xFCcken"
|
|
439
|
+
outdent: "{label} ausr\xFCcken",
|
|
440
|
+
invalidNode: "Enth\xE4lt Fehler"
|
|
440
441
|
},
|
|
441
442
|
treeSelect: {
|
|
442
443
|
placeholder: "Ausw\xE4hlen",
|
package/dist/locale/en.mjs
CHANGED
|
@@ -436,7 +436,8 @@ export const en = {
|
|
|
436
436
|
moveUp: "Move {label} up",
|
|
437
437
|
moveDown: "Move {label} down",
|
|
438
438
|
indent: "Indent {label}",
|
|
439
|
-
outdent: "Outdent {label}"
|
|
439
|
+
outdent: "Outdent {label}",
|
|
440
|
+
invalidNode: "Contains errors"
|
|
440
441
|
},
|
|
441
442
|
treeSelect: {
|
|
442
443
|
placeholder: "Select",
|
package/dist/locale/it.mjs
CHANGED
|
@@ -436,7 +436,8 @@ export const it = {
|
|
|
436
436
|
moveUp: "Sposta {label} in su",
|
|
437
437
|
moveDown: "Sposta {label} in gi\xF9",
|
|
438
438
|
indent: "Aumenta il rientro di {label}",
|
|
439
|
-
outdent: "Riduci il rientro di {label}"
|
|
439
|
+
outdent: "Riduci il rientro di {label}",
|
|
440
|
+
invalidNode: "Contiene errori"
|
|
440
441
|
},
|
|
441
442
|
treeSelect: {
|
|
442
443
|
placeholder: "Seleziona",
|
package/dist/locale/types.d.ts
CHANGED
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
border-top: 1px solid var(--k-line);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.k-tree-row:hover
|
|
34
|
+
.k-tree-row:hover,
|
|
35
|
+
.k-tree-row.is-highlighted {
|
|
35
36
|
background: var(--k-subtle);
|
|
36
37
|
}
|
|
37
38
|
|
|
@@ -113,6 +114,18 @@
|
|
|
113
114
|
color: var(--k-text-muted);
|
|
114
115
|
}
|
|
115
116
|
|
|
117
|
+
.k-tree-invalid {
|
|
118
|
+
width: 0.4375rem;
|
|
119
|
+
height: 0.4375rem;
|
|
120
|
+
flex: none;
|
|
121
|
+
border-radius: var(--k-radius-full);
|
|
122
|
+
background: var(--k-danger);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.k-tree .k-tree-row.is-invalid .k-tree-label {
|
|
126
|
+
color: var(--k-danger-text);
|
|
127
|
+
}
|
|
128
|
+
|
|
116
129
|
.k-tree-meta {
|
|
117
130
|
flex-shrink: 0;
|
|
118
131
|
font-size: 0.75rem;
|
|
@@ -238,7 +251,8 @@
|
|
|
238
251
|
border-top: 0;
|
|
239
252
|
}
|
|
240
253
|
|
|
241
|
-
.k-tree-sm .k-tree-row:hover:not([aria-disabled='true'])
|
|
254
|
+
.k-tree-sm .k-tree-row:hover:not([aria-disabled='true']),
|
|
255
|
+
.k-tree-sm .k-tree-row.is-highlighted {
|
|
242
256
|
background: var(--k-hover);
|
|
243
257
|
}
|
|
244
258
|
|
|
@@ -292,12 +306,17 @@
|
|
|
292
306
|
transition: opacity var(--k-duration) var(--k-ease);
|
|
293
307
|
}
|
|
294
308
|
|
|
295
|
-
.k-tree-
|
|
309
|
+
.k-tree-actions:empty {
|
|
310
|
+
display: none;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.k-tree-row:is(:hover, :focus-within) > .k-tree-actions,
|
|
314
|
+
.k-tree-row[aria-selected='true'] > .k-tree-actions.has-slot {
|
|
296
315
|
opacity: 1;
|
|
297
316
|
pointer-events: auto;
|
|
298
317
|
}
|
|
299
318
|
|
|
300
|
-
.k-tree.is-dragging .k-tree-actions {
|
|
319
|
+
.k-tree.is-dragging .k-tree-row > .k-tree-actions {
|
|
301
320
|
opacity: 0;
|
|
302
321
|
pointer-events: none;
|
|
303
322
|
}
|
|
@@ -217,11 +217,16 @@
|
|
|
217
217
|
background: Highlight;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
.k-tab-dot {
|
|
220
|
+
:is(.k-tab-dot, .k-tree-invalid) {
|
|
221
221
|
forced-color-adjust: none;
|
|
222
222
|
background: CanvasText;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
.k-tree-row.is-highlighted:not(:focus-visible) {
|
|
226
|
+
outline: 2px dashed Highlight;
|
|
227
|
+
outline-offset: -2px;
|
|
228
|
+
}
|
|
229
|
+
|
|
225
230
|
.k-tag-list.is-drop-target {
|
|
226
231
|
outline: 2px dashed Highlight;
|
|
227
232
|
}
|
package/package.json
CHANGED