@xleddyl/443-components-vue 0.16.94 → 0.16.96

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.
Files changed (41) hide show
  1. package/CATALOG.md +175 -170
  2. package/README.md +51 -7
  3. package/dist/components/data/RecordList.vue +44 -6
  4. package/dist/components/data/RecordList.vue.d.ts +4 -1
  5. package/dist/components/data/SortableList.vue +120 -0
  6. package/dist/components/data/SortableList.vue.d.ts +48 -0
  7. package/dist/components/data/Table.vue +43 -3
  8. package/dist/components/data/Table.vue.d.ts +8 -2
  9. package/dist/components/data/TileGrid.vue +274 -0
  10. package/dist/components/data/TileGrid.vue.d.ts +51 -0
  11. package/dist/components/data/Tree.vue +84 -24
  12. package/dist/components/data/Tree.vue.d.ts +9 -9
  13. package/dist/components/data/index.d.ts +2 -0
  14. package/dist/components/data/index.mjs +2 -0
  15. package/dist/components/data/types.d.ts +40 -1
  16. package/dist/components/layout/Accordion.vue +6 -2
  17. package/dist/components/layout/Accordion.vue.d.ts +3 -0
  18. package/dist/components/overlays/Popover.vue +4 -2
  19. package/dist/components/overlays/Popover.vue.d.ts +2 -0
  20. package/dist/composables/useSortable.d.ts +1 -0
  21. package/dist/composables/useSortable.mjs +53 -11
  22. package/dist/icons/builtin.d.ts +1 -0
  23. package/dist/icons/builtin.mjs +1 -0
  24. package/dist/internal/data/sortable.d.ts +6 -1
  25. package/dist/internal/data/sortable.mjs +51 -0
  26. package/dist/locale/de.mjs +12 -0
  27. package/dist/locale/en.mjs +12 -0
  28. package/dist/locale/it.mjs +12 -0
  29. package/dist/locale/types.d.ts +12 -0
  30. package/dist/styles/data/record-list.css +54 -0
  31. package/dist/styles/data/sortable-list.css +185 -0
  32. package/dist/styles/data/table.css +12 -0
  33. package/dist/styles/data/tile-grid.css +144 -0
  34. package/dist/styles/data/tree.css +57 -4
  35. package/dist/styles/data.css +2 -0
  36. package/dist/styles/forced-colors.css +34 -0
  37. package/dist/styles/layout/accordion.css +4 -5
  38. package/dist/styles/layout/card.css +2 -0
  39. package/dist/styles/overlays/popover.css +6 -0
  40. package/dist/styles/shared.css +11 -1
  41. package/package.json +1 -1
@@ -9,7 +9,8 @@
9
9
  :popover="layer.popoverMode.value"
10
10
  :data-side="layer.side.value"
11
11
  class="k-floating k-popover"
12
- :class="{ 'has-arrow': arrow }"
12
+ :class="{ 'has-arrow': arrow, 'has-width': width }"
13
+ :style="width ? { '--k-popover-custom-width': width } : void 0"
13
14
  :role="role"
14
15
  :aria-label="label"
15
16
  :aria-labelledby="fallbackLabelledBy"
@@ -36,7 +37,8 @@ const props = defineProps({
36
37
  label: { type: String, required: false },
37
38
  initialFocus: { type: Boolean, required: false, default: true },
38
39
  haspopup: { type: String, required: false, default: "dialog" },
39
- anchor: { type: null, required: false, default: null }
40
+ anchor: { type: null, required: false, default: null },
41
+ width: { type: String, required: false }
40
42
  });
41
43
  const open = defineModel("open", { type: Boolean, ...{ default: false } });
42
44
  const contentId = `${useId()}-popover`;
@@ -19,6 +19,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
19
19
  initialFocus?: boolean;
20
20
  haspopup?: string;
21
21
  anchor?: OverlayAnchorTarget | null;
22
+ width?: string;
22
23
  open?: boolean;
23
24
  key?: PropertyKey | undefined;
24
25
  prefix?: string | undefined | undefined;
@@ -226,6 +227,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
226
227
  initialFocus?: boolean;
227
228
  haspopup?: string;
228
229
  anchor?: OverlayAnchorTarget | null;
230
+ width?: string;
229
231
  open?: boolean;
230
232
  key?: PropertyKey | undefined;
231
233
  prefix?: string | undefined | undefined;
@@ -14,6 +14,7 @@ export interface UseSortableOptions<T> {
14
14
  orientation?: MaybeRefOrGetter<SortableOrientation | undefined>;
15
15
  disabled?: MaybeRefOrGetter<boolean | undefined>;
16
16
  handle?: string;
17
+ preview?: string;
17
18
  canMove?: (item: T, index: number) => boolean;
18
19
  label?: (item: T) => string;
19
20
  movedText?: (move: SortableMove<T>) => string;
@@ -2,7 +2,17 @@ import { nextTick, onScopeDispose, readonly, ref, toValue } from "vue";
2
2
  import { useLocale } from "./useLocale.mjs";
3
3
  import { useLiveMessage } from "../internal/core/live.mjs";
4
4
  import { isClient } from "../internal/core/env.mjs";
5
- import { SORTABLE_ATTR, insertionIndex, isRtl, sortableElements } from "../internal/data/sortable.mjs";
5
+ import {
6
+ SORTABLE_ATTR,
7
+ SORTABLE_DRAGGING_ATTR,
8
+ SORTABLE_LIFTED_ATTR,
9
+ gridNeighbor,
10
+ gridSlot,
11
+ insertionIndex,
12
+ isRtl,
13
+ layoutRect,
14
+ sortableElements
15
+ } from "../internal/data/sortable.mjs";
6
16
  const THRESHOLD = 4;
7
17
  const INTERACTIVE = "button, a[href], input, textarea, select, [contenteditable]";
8
18
  export function useSortable(container, options) {
@@ -54,6 +64,17 @@ export function useSortable(container, options) {
54
64
  });
55
65
  return true;
56
66
  }
67
+ function rowTarget(index, step) {
68
+ const rects = sortableElements(toValue(container)).map(layoutRect);
69
+ return gridNeighbor(rects, index, step);
70
+ }
71
+ function keyTarget(event, index) {
72
+ if (axis() === "grid" && (event.key === "ArrowUp" || event.key === "ArrowDown"))
73
+ return rowTarget(index, event.key === "ArrowUp" ? -1 : 1);
74
+ const delta = keyDelta(event);
75
+ if (!delta) return null;
76
+ return delta === -Infinity ? 0 : delta === Infinity ? list().length - 1 : index + delta;
77
+ }
57
78
  function keyDelta(event) {
58
79
  const rtl = isRtl(event.currentTarget);
59
80
  switch (event.key) {
@@ -75,11 +96,11 @@ export function useSortable(container, options) {
75
96
  }
76
97
  function onKeydown(event, index) {
77
98
  if (!event.altKey || event.ctrlKey || event.metaKey) return;
78
- const delta = keyDelta(event);
79
- if (!delta) return;
99
+ if (!["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key))
100
+ return;
80
101
  event.preventDefault();
81
- const to = delta === -Infinity ? 0 : delta === Infinity ? list().length - 1 : index + delta;
82
- move(index, to, { announce: true, source: "keyboard" });
102
+ const to = keyTarget(event, index);
103
+ if (to !== null) move(index, to, { announce: true, source: "keyboard" });
83
104
  }
84
105
  function preventSelection(event) {
85
106
  event.preventDefault();
@@ -105,7 +126,7 @@ export function useSortable(container, options) {
105
126
  }
106
127
  function follow(event) {
107
128
  if (!drag) return;
108
- const element = drag.element;
129
+ const element = drag.preview;
109
130
  const current = element.style.translate.split(" ").map((value) => parseFloat(value) || 0);
110
131
  const rect = element.getBoundingClientRect();
111
132
  const layoutX = rect.left - (current[0] ?? 0);
@@ -122,10 +143,12 @@ export function useSortable(container, options) {
122
143
  if (!target.closest(options.handle)) return;
123
144
  } else if (target !== element && target.closest(INTERACTIVE)) return;
124
145
  if (!movable(index)) return;
125
- const rect = element.getBoundingClientRect();
146
+ const preview = options.preview && element.querySelector(options.preview) || element;
147
+ const rect = preview.getBoundingClientRect();
126
148
  drag = {
127
149
  pointerId: event.pointerId,
128
150
  element,
151
+ preview,
129
152
  origin: index,
130
153
  index,
131
154
  startX: event.clientX,
@@ -143,12 +166,11 @@ export function useSortable(container, options) {
143
166
  return;
144
167
  drag.active = true;
145
168
  dragging.value = drag.index;
169
+ lift(drag, true);
146
170
  window.getSelection()?.removeAllRanges();
147
171
  }
148
172
  event.preventDefault();
149
- const root = toValue(container);
150
- const others = sortableElements(root).filter((element) => element !== drag.element);
151
- const target = insertionIndex(others, event.clientX, event.clientY, axis(), isRtl(root));
173
+ const target = pointerTarget(event);
152
174
  if (target !== drag.index && move(drag.index, target, { source: "pointer" })) {
153
175
  drag.index = target;
154
176
  dragging.value = target;
@@ -156,12 +178,32 @@ export function useSortable(container, options) {
156
178
  }
157
179
  follow(event);
158
180
  }
181
+ function pointerTarget(event) {
182
+ const root = toValue(container);
183
+ const elements = sortableElements(root);
184
+ if (axis() === "grid") {
185
+ const slot = gridSlot(elements.map(layoutRect), event.clientX, event.clientY);
186
+ return slot === -1 ? drag.index : slot;
187
+ }
188
+ const others = elements.filter((element) => element !== drag.element);
189
+ return insertionIndex(others, event.clientX, event.clientY, axis(), isRtl(root));
190
+ }
191
+ function lift(state, lifted) {
192
+ if (lifted) {
193
+ state.element.setAttribute(SORTABLE_DRAGGING_ATTR, "");
194
+ state.preview.setAttribute(SORTABLE_LIFTED_ATTR, axis());
195
+ return;
196
+ }
197
+ state.element.removeAttribute(SORTABLE_DRAGGING_ATTR);
198
+ state.preview.removeAttribute(SORTABLE_LIFTED_ATTR);
199
+ }
159
200
  function finish(cancelled) {
160
201
  const state = drag;
161
202
  drag = null;
162
203
  listen(false);
163
204
  if (!state) return;
164
- state.element.style.translate = "";
205
+ state.preview.style.translate = "";
206
+ lift(state, false);
165
207
  dragging.value = null;
166
208
  if (!state.active) return;
167
209
  window.addEventListener("click", suppressClick, { capture: true, once: true });
@@ -31,6 +31,7 @@ export declare const builtinIcons: {
31
31
  readonly 'arrow-up-tray': readonly ["M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"];
32
32
  readonly document: readonly ["M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"];
33
33
  readonly 'ellipsis-horizontal': readonly ["M6.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM12.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM18.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z"];
34
+ readonly 'bars-2': readonly ["M3.75 9h16.5m-16.5 6.75h16.5"];
34
35
  readonly 'bars-3': readonly ["M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"];
35
36
  readonly sun: readonly ["M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"];
36
37
  readonly moon: readonly ["M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"];
@@ -60,6 +60,7 @@ export const builtinIcons = {
60
60
  "ellipsis-horizontal": [
61
61
  "M6.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM12.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM18.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z"
62
62
  ],
63
+ "bars-2": ["M3.75 9h16.5m-16.5 6.75h16.5"],
63
64
  "bars-3": ["M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"],
64
65
  sun: [
65
66
  "M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"
@@ -1,5 +1,10 @@
1
- export type SortableAxis = 'horizontal' | 'vertical';
1
+ export type SortableAxis = 'horizontal' | 'vertical' | 'grid';
2
2
  export declare const SORTABLE_ATTR = "data-k-sortable";
3
+ export declare const SORTABLE_DRAGGING_ATTR = "data-k-sortable-dragging";
4
+ export declare const SORTABLE_LIFTED_ATTR = "data-k-sortable-lifted";
3
5
  export declare function sortableElements(container: HTMLElement | null | undefined): HTMLElement[];
4
6
  export declare function isRtl(element: Element | null | undefined): boolean;
5
7
  export declare function insertionIndex(elements: HTMLElement[], x: number, y: number, axis: SortableAxis, rtl: boolean): number;
8
+ export declare function layoutRect(element: HTMLElement): DOMRect;
9
+ export declare function gridSlot(rects: DOMRect[], x: number, y: number): number;
10
+ export declare function gridNeighbor(rects: DOMRect[], index: number, step: 1 | -1): null;
@@ -1,4 +1,6 @@
1
1
  export const SORTABLE_ATTR = "data-k-sortable";
2
+ export const SORTABLE_DRAGGING_ATTR = "data-k-sortable-dragging";
3
+ export const SORTABLE_LIFTED_ATTR = "data-k-sortable-lifted";
2
4
  export function sortableElements(container) {
3
5
  if (!container) return [];
4
6
  return Array.from(container.querySelectorAll(`[${SORTABLE_ATTR}]`)).sort(
@@ -21,3 +23,52 @@ export function insertionIndex(elements, x, y, axis, rtl) {
21
23
  if (isBefore(element.getBoundingClientRect(), x, y, axis, rtl)) index++;
22
24
  return index;
23
25
  }
26
+ export function layoutRect(element) {
27
+ const rect = element.getBoundingClientRect();
28
+ const [x = 0, y = 0] = element.style.translate.split(" ").map((value) => parseFloat(value) || 0);
29
+ return new DOMRect(rect.left - x, rect.top - y, rect.width, rect.height);
30
+ }
31
+ function distance(rect, x, y) {
32
+ const dx = Math.max(rect.left - x, 0, x - rect.right);
33
+ const dy = Math.max(rect.top - y, 0, y - rect.bottom);
34
+ return Math.hypot(dx, dy);
35
+ }
36
+ export function gridSlot(rects, x, y) {
37
+ let best = -1;
38
+ let bestDistance = Infinity;
39
+ rects.forEach((rect, index) => {
40
+ const value = distance(rect, x, y);
41
+ if (value < bestDistance) {
42
+ best = index;
43
+ bestDistance = value;
44
+ }
45
+ });
46
+ return best;
47
+ }
48
+ function sameRow(a, b) {
49
+ return a.top < b.bottom && b.top < a.bottom;
50
+ }
51
+ export function gridNeighbor(rects, index, step) {
52
+ const current = rects[index];
53
+ if (!current) return null;
54
+ const center = current.left + current.width / 2;
55
+ let row = null;
56
+ for (let position = index + step; position >= 0 && position < rects.length; position += step) {
57
+ const rect = rects[position];
58
+ if (sameRow(rect, current)) continue;
59
+ if (!row) row = rect;
60
+ else if (!sameRow(rect, row)) break;
61
+ }
62
+ if (!row) return null;
63
+ let best = null;
64
+ let bestDistance = Infinity;
65
+ rects.forEach((rect, position) => {
66
+ if (!sameRow(rect, row)) return;
67
+ const value = Math.abs(rect.left + rect.width / 2 - center);
68
+ if (value < bestDistance) {
69
+ best = position;
70
+ bestDistance = value;
71
+ }
72
+ });
73
+ return best;
74
+ }
@@ -315,6 +315,18 @@ export const de = {
315
315
  sortable: {
316
316
  moved: "{label} an Position {position} von {count} verschoben"
317
317
  },
318
+ sortableList: {
319
+ label: "Elemente",
320
+ empty: "Keine Elemente",
321
+ handle: "{label} verschieben",
322
+ hint: "Mit den Pfeiltasten nach oben und unten verschieben"
323
+ },
324
+ tileGrid: {
325
+ label: "Elemente",
326
+ navigateHint: "Mit den Pfeiltasten zwischen den Kacheln wechseln",
327
+ selectHint: "Leertaste w\xE4hlt aus, Umschalt mit Leertaste oder ein Klick w\xE4hlt einen Bereich",
328
+ sortHint: "Alt mit einer Pfeiltaste verschiebt die Kachel"
329
+ },
318
330
  tagList: {
319
331
  label: "Elemente",
320
332
  empty: "Keine Elemente",
@@ -315,6 +315,18 @@ export const en = {
315
315
  sortable: {
316
316
  moved: "{label} moved to position {position} of {count}"
317
317
  },
318
+ sortableList: {
319
+ label: "Items",
320
+ empty: "No items",
321
+ handle: "Move {label}",
322
+ hint: "Press the up and down arrow keys to move the item"
323
+ },
324
+ tileGrid: {
325
+ label: "Items",
326
+ navigateHint: "Use the arrow keys to move between tiles",
327
+ selectHint: "Press Space to select, Shift with Space or a click selects a range",
328
+ sortHint: "Alt with an arrow key moves the tile"
329
+ },
318
330
  tagList: {
319
331
  label: "Items",
320
332
  empty: "No items",
@@ -315,6 +315,18 @@ export const it = {
315
315
  sortable: {
316
316
  moved: "{label} spostato in posizione {position} di {count}"
317
317
  },
318
+ sortableList: {
319
+ label: "Elementi",
320
+ empty: "Nessun elemento",
321
+ handle: "Sposta {label}",
322
+ hint: "Premi le frecce su e gi\xF9 per spostare l'elemento"
323
+ },
324
+ tileGrid: {
325
+ label: "Elementi",
326
+ navigateHint: "Usa le frecce per spostarti tra i riquadri",
327
+ selectHint: "Premi Spazio per selezionare, Maiusc con Spazio o un clic seleziona un intervallo",
328
+ sortHint: "Alt con una freccia sposta il riquadro"
329
+ },
318
330
  tagList: {
319
331
  label: "Elementi",
320
332
  empty: "Nessun elemento",
@@ -302,6 +302,18 @@ export interface KMessages {
302
302
  sortable: {
303
303
  moved: string;
304
304
  };
305
+ sortableList: {
306
+ label: string;
307
+ empty: string;
308
+ handle: string;
309
+ hint: string;
310
+ };
311
+ tileGrid: {
312
+ label: string;
313
+ navigateHint: string;
314
+ selectHint: string;
315
+ sortHint: string;
316
+ };
305
317
  tagList: {
306
318
  label: string;
307
319
  empty: string;
@@ -7,6 +7,7 @@
7
7
  }
8
8
 
9
9
  .k-record-list-item {
10
+ position: relative;
10
11
  display: flex;
11
12
  align-items: center;
12
13
  gap: 0.75rem;
@@ -48,6 +49,34 @@
48
49
  white-space: nowrap;
49
50
  }
50
51
 
52
+ .k-record-list-icon {
53
+ --k-icon-size: 1rem;
54
+ display: grid;
55
+ place-items: center;
56
+ width: 2rem;
57
+ height: 2rem;
58
+ flex: none;
59
+ border-radius: var(--k-radius-md);
60
+ background: var(--k-subtle);
61
+ box-shadow: inset 0 0 0 1px var(--k-line);
62
+ color: var(--k-text-muted);
63
+ }
64
+
65
+ .k-record-list-meta {
66
+ flex: 0 1 auto;
67
+ min-width: 0;
68
+ max-width: 40%;
69
+ overflow: hidden;
70
+ font-size: 0.75rem;
71
+ color: var(--k-text-muted);
72
+ text-overflow: ellipsis;
73
+ white-space: nowrap;
74
+ }
75
+
76
+ .k-record-list-meta:empty {
77
+ display: none;
78
+ }
79
+
51
80
  .k-record-list-description {
52
81
  font-size: 0.8125rem;
53
82
  color: var(--k-text-muted);
@@ -99,6 +128,24 @@
99
128
  border: 0;
100
129
  }
101
130
 
131
+ .k-record-list-link {
132
+ text-decoration: none;
133
+ }
134
+
135
+ .k-record-list-link::after {
136
+ content: '';
137
+ position: absolute;
138
+ inset: 0;
139
+ }
140
+
141
+ .k-record-list-item.is-link
142
+ :is(a[href], button, input, select, textarea, label, summary, [tabindex]):not(
143
+ .k-record-list-link
144
+ ) {
145
+ position: relative;
146
+ z-index: 1;
147
+ }
148
+
102
149
  .k-record-list-trigger:focus-visible {
103
150
  outline: 2px solid transparent;
104
151
  }
@@ -107,3 +154,10 @@
107
154
  outline: 2px solid var(--k-ring);
108
155
  outline-offset: -2px;
109
156
  }
157
+
158
+ .k-record-list-hint {
159
+ margin: 0;
160
+ font-size: 0.8125rem;
161
+ line-height: 1.4;
162
+ color: var(--k-text-muted);
163
+ }
@@ -0,0 +1,185 @@
1
+ .k-sortable-list {
2
+ --k-sortable-list-row: 2.5rem;
3
+ min-width: 0;
4
+ }
5
+
6
+ .k-sortable-list-sm {
7
+ --k-sortable-list-row: 2.125rem;
8
+ }
9
+
10
+ .k-sortable-list-items {
11
+ display: flex;
12
+ flex-direction: column;
13
+ margin: 0;
14
+ padding: 0;
15
+ list-style: none;
16
+ border: 1px solid var(--k-line);
17
+ border-radius: var(--k-radius-md);
18
+ background: var(--k-surface);
19
+ }
20
+
21
+ .k-sortable-list-item {
22
+ position: relative;
23
+ }
24
+
25
+ .k-sortable-list-item + .k-sortable-list-item {
26
+ border-top: 1px solid var(--k-line);
27
+ }
28
+
29
+ .k-sortable-list-row {
30
+ --k-icon-size: 1rem;
31
+ display: flex;
32
+ align-items: center;
33
+ gap: 0.5rem;
34
+ min-height: var(--k-sortable-list-row);
35
+ padding: 0.25rem 0.75rem 0.25rem 0.375rem;
36
+ background: var(--k-surface);
37
+ transition:
38
+ background-color var(--k-duration) var(--k-ease),
39
+ box-shadow var(--k-duration) var(--k-ease),
40
+ scale var(--k-duration) var(--k-ease);
41
+ }
42
+
43
+ .k-sortable-list-item:first-child > .k-sortable-list-row {
44
+ border-start-start-radius: calc(var(--k-radius-md) - 1px);
45
+ border-start-end-radius: calc(var(--k-radius-md) - 1px);
46
+ }
47
+
48
+ .k-sortable-list-item:last-child > .k-sortable-list-row {
49
+ border-end-start-radius: calc(var(--k-radius-md) - 1px);
50
+ border-end-end-radius: calc(var(--k-radius-md) - 1px);
51
+ }
52
+
53
+ .k-sortable-list.is-sortable:not(.is-dragging)
54
+ .k-sortable-list-item:not(.is-locked):hover
55
+ > .k-sortable-list-row {
56
+ background: var(--k-subtle);
57
+ }
58
+
59
+ .k-sortable-list-handle {
60
+ position: relative;
61
+ display: grid;
62
+ place-items: center;
63
+ width: 1.5rem;
64
+ height: 1.5rem;
65
+ flex: none;
66
+ border-radius: var(--k-radius-sm);
67
+ color: var(--k-text-dimmed);
68
+ cursor: grab;
69
+ touch-action: none;
70
+ transition:
71
+ color var(--k-duration) var(--k-ease),
72
+ background-color var(--k-duration) var(--k-ease);
73
+ }
74
+
75
+ .k-sortable-list-handle:hover:not(:disabled) {
76
+ background: var(--k-hover);
77
+ color: var(--k-text);
78
+ }
79
+
80
+ .k-sortable-list-handle:disabled {
81
+ opacity: 0.4;
82
+ cursor: not-allowed;
83
+ }
84
+
85
+ .k-sortable-list.is-dragging,
86
+ .k-sortable-list.is-dragging .k-sortable-list-handle {
87
+ cursor: grabbing;
88
+ }
89
+
90
+ .k-sortable-list-content {
91
+ display: flex;
92
+ flex: 1;
93
+ align-items: center;
94
+ gap: 0.5rem;
95
+ min-width: 0;
96
+ }
97
+
98
+ .k-sortable-list.is-sortable .k-sortable-list-item:not(.is-locked) .k-sortable-list-content {
99
+ cursor: grab;
100
+ user-select: none;
101
+ -webkit-user-select: none;
102
+ }
103
+
104
+ .k-sortable-list-icon {
105
+ flex: none;
106
+ color: var(--k-text-dimmed);
107
+ }
108
+
109
+ .k-sortable-list-text {
110
+ display: flex;
111
+ flex: 1;
112
+ flex-direction: column;
113
+ gap: 0.0625rem;
114
+ min-width: 0;
115
+ }
116
+
117
+ .k-sortable-list-label {
118
+ overflow: hidden;
119
+ font-size: 0.8125rem;
120
+ font-weight: var(--k-font-weight-medium, 500);
121
+ color: var(--k-text);
122
+ text-overflow: ellipsis;
123
+ white-space: nowrap;
124
+ }
125
+
126
+ .k-sortable-list-description {
127
+ overflow: hidden;
128
+ font-size: 0.75rem;
129
+ line-height: 1.4;
130
+ color: var(--k-text-muted);
131
+ text-overflow: ellipsis;
132
+ white-space: nowrap;
133
+ }
134
+
135
+ .k-sortable-list-item.is-locked .k-sortable-list-label {
136
+ color: var(--k-text-muted);
137
+ }
138
+
139
+ .k-sortable-list-trailing {
140
+ display: flex;
141
+ flex: none;
142
+ align-items: center;
143
+ gap: 0.25rem;
144
+ margin-inline-start: auto;
145
+ }
146
+
147
+ .k-sortable-list-item.is-moving {
148
+ z-index: 1;
149
+ background: var(--k-accent-soft);
150
+ }
151
+
152
+ .k-sortable-list-item.is-moving::after {
153
+ content: '';
154
+ position: absolute;
155
+ inset: 0.25rem;
156
+ border: 1px dashed var(--k-accent-line);
157
+ border-radius: var(--k-radius-sm);
158
+ pointer-events: none;
159
+ }
160
+
161
+ .k-sortable-list-item.is-moving > .k-sortable-list-row {
162
+ position: relative;
163
+ z-index: 1;
164
+ border-radius: var(--k-radius-md);
165
+ box-shadow: var(--k-shadow-raised), var(--k-shadow-sm);
166
+ scale: 1.01;
167
+ }
168
+
169
+ .k-sortable-list.is-disabled .k-sortable-list-items {
170
+ background: var(--k-subtle);
171
+ }
172
+
173
+ .k-sortable-list.is-disabled .k-sortable-list-row {
174
+ background: transparent;
175
+ }
176
+
177
+ .k-sortable-list-empty {
178
+ margin: 0;
179
+ padding: 0.75rem;
180
+ border: 1px dashed var(--k-line-strong);
181
+ border-radius: var(--k-radius-md);
182
+ font-size: 0.8125rem;
183
+ color: var(--k-text-muted);
184
+ text-align: center;
185
+ }
@@ -180,6 +180,18 @@
180
180
  background: var(--k-accent-soft);
181
181
  }
182
182
 
183
+ .k-table-row[draggable='true'] {
184
+ cursor: grab;
185
+ }
186
+
187
+ .k-table-row[draggable='true'] :is(img, a) {
188
+ -webkit-user-drag: none;
189
+ }
190
+
191
+ .k-table-row.is-dragging {
192
+ opacity: 0.45;
193
+ }
194
+
183
195
  .k-table-link {
184
196
  border-radius: var(--k-radius-xs);
185
197
  color: inherit;