@human-kit/ui 1.0.0-beta.5 → 1.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -17
- package/dist/accordion/README.md +3 -3
- package/dist/accordion/types.d.ts +37 -23
- package/dist/autocomplete/README.md +6 -7
- package/dist/autocomplete/empty/autocomplete-empty.svelte +1 -1
- package/dist/autocomplete/empty/autocomplete-empty.svelte.d.ts +1 -1
- package/dist/autocomplete/input/autocomplete-input.svelte +3 -3
- package/dist/autocomplete/input/autocomplete-input.svelte.d.ts +3 -3
- package/dist/autocomplete/item-indicator/autocomplete-item-indicator.svelte +2 -2
- package/dist/autocomplete/item-indicator/autocomplete-item-indicator.svelte.d.ts +2 -2
- package/dist/autocomplete/list/autocomplete-list.svelte +2 -2
- package/dist/autocomplete/list/autocomplete-list.svelte.d.ts +2 -2
- package/dist/autocomplete/root/autocomplete.svelte +7 -7
- package/dist/autocomplete/root/autocomplete.svelte.d.ts +7 -7
- package/dist/autocomplete/status/autocomplete-status.svelte +1 -1
- package/dist/autocomplete/status/autocomplete-status.svelte.d.ts +1 -1
- package/dist/button/README.md +1 -1
- package/dist/button/root/button-root.svelte +15 -10
- package/dist/button/root/button-root.svelte.d.ts +15 -10
- package/dist/calendar/README.md +3 -3
- package/dist/calendar/grid-header/calendar-grid-header.svelte +3 -4
- package/dist/calendar/grid-header/calendar-grid-header.svelte.d.ts +3 -4
- package/dist/calendar/root/calendar-root.svelte +8 -2
- package/dist/calendar/root/calendar-root.svelte.d.ts +8 -2
- package/dist/calendar/trigger-next/README.md +1 -1
- package/dist/calendar/trigger-previous/README.md +1 -1
- package/dist/checkbox/README.md +1 -1
- package/dist/checkbox/indicator/README.md +1 -1
- package/dist/checkbox/root/README.md +2 -2
- package/dist/checkbox/root/checkbox-root.svelte +12 -10
- package/dist/checkbox/root/checkbox-root.svelte.d.ts +12 -10
- package/dist/clock/README.md +3 -3
- package/dist/clock/axis/README.md +1 -1
- package/dist/clock/root/README.md +1 -1
- package/dist/clock/wheel-column/clock-wheel-column.svelte +1 -1
- package/dist/clock/wheel-column/clock-wheel-column.svelte.d.ts +1 -1
- package/dist/collapsible/README.md +3 -3
- package/dist/collapsible/types.d.ts +10 -7
- package/dist/combobox/README.md +2 -2
- package/dist/combobox/button/README.md +6 -6
- package/dist/combobox/input/README.md +1 -1
- package/dist/combobox/input/combobox-input.svelte +3 -3
- package/dist/combobox/input/combobox-input.svelte.d.ts +3 -3
- package/dist/combobox/item/combobox-listboxitem.svelte +4 -2
- package/dist/combobox/item/combobox-listboxitem.svelte.d.ts +4 -2
- package/dist/combobox/item-indicator/README.md +1 -1
- package/dist/combobox/item-indicator/combobox-item-indicator.svelte +2 -2
- package/dist/combobox/item-indicator/combobox-item-indicator.svelte.d.ts +2 -2
- package/dist/combobox/list/combobox-listbox.svelte +11 -8
- package/dist/combobox/list/combobox-listbox.svelte.d.ts +11 -8
- package/dist/combobox/popover/README.md +1 -1
- package/dist/combobox/root/README.md +24 -24
- package/dist/combobox/root/combobox.svelte +26 -17
- package/dist/combobox/root/combobox.svelte.d.ts +26 -17
- package/dist/combobox/status/README.md +1 -1
- package/dist/combobox/status/combobox-status.svelte +1 -1
- package/dist/combobox/status/combobox-status.svelte.d.ts +1 -1
- package/dist/combobox/tag/README.md +1 -1
- package/dist/combobox/tag/combobox-tag.svelte +1 -1
- package/dist/combobox/tag/combobox-tag.svelte.d.ts +1 -1
- package/dist/combobox/tag-remove/README.md +1 -1
- package/dist/combobox/tag-remove/combobox-tag-remove.svelte +4 -5
- package/dist/combobox/tag-remove/combobox-tag-remove.svelte.d.ts +4 -5
- package/dist/combobox/tags/README.md +1 -1
- package/dist/combobox/tags/combobox-tags.svelte +11 -11
- package/dist/combobox/tags/combobox-tags.svelte.d.ts +11 -11
- package/dist/combobox/trigger/README.md +7 -7
- package/dist/datepicker/README.md +4 -4
- package/dist/datepicker/input/date-picker-input.svelte +3 -4
- package/dist/datepicker/input/date-picker-input.svelte.d.ts +3 -4
- package/dist/datepicker/root/date-picker-root.svelte +1 -1
- package/dist/datepicker/trigger/README.md +1 -1
- package/dist/daterangepicker/README.md +3 -3
- package/dist/daterangepicker/input/date-range-picker-input.svelte +3 -4
- package/dist/daterangepicker/input/date-range-picker-input.svelte.d.ts +3 -4
- package/dist/dialog/README.md +1 -1
- package/dist/dialog/close/dialog-close.svelte +3 -3
- package/dist/dialog/close/dialog-close.svelte.d.ts +3 -3
- package/dist/dialog/content/dialog-content.svelte +4 -4
- package/dist/dialog/content/dialog-content.svelte.d.ts +4 -4
- package/dist/dialog/description/dialog-description.svelte +3 -3
- package/dist/dialog/description/dialog-description.svelte.d.ts +3 -3
- package/dist/dialog/overlay/dialog-overlay.svelte +1 -1
- package/dist/dialog/overlay/dialog-overlay.svelte.d.ts +1 -1
- package/dist/dialog/portal/dialog-portal.svelte +1 -1
- package/dist/dialog/portal/dialog-portal.svelte.d.ts +1 -1
- package/dist/dialog/root/README.md +1 -1
- package/dist/dialog/root/dialog-root.svelte +36 -11
- package/dist/dialog/root/dialog-root.svelte.d.ts +11 -9
- package/dist/dialog/title/dialog-title.svelte +3 -3
- package/dist/dialog/title/dialog-title.svelte.d.ts +3 -3
- package/dist/dialog/trigger/README.md +1 -1
- package/dist/drawer/README.md +3 -3
- package/dist/drawer/body/drawer-body.svelte +2 -2
- package/dist/drawer/body/drawer-body.svelte.d.ts +2 -2
- package/dist/drawer/close/drawer-close.svelte +3 -3
- package/dist/drawer/close/drawer-close.svelte.d.ts +3 -3
- package/dist/drawer/content/drawer-content.svelte +12 -9
- package/dist/drawer/content/drawer-content.svelte.d.ts +12 -9
- package/dist/drawer/description/drawer-description.svelte +3 -3
- package/dist/drawer/description/drawer-description.svelte.d.ts +3 -3
- package/dist/drawer/indent/drawer-indent-background.svelte +1 -1
- package/dist/drawer/indent/drawer-indent-background.svelte.d.ts +1 -1
- package/dist/drawer/indent/drawer-indent.svelte +2 -2
- package/dist/drawer/indent/drawer-indent.svelte.d.ts +2 -2
- package/dist/drawer/overlay/drawer-overlay.svelte +1 -1
- package/dist/drawer/overlay/drawer-overlay.svelte.d.ts +1 -1
- package/dist/drawer/portal/drawer-portal.svelte +1 -1
- package/dist/drawer/portal/drawer-portal.svelte.d.ts +1 -1
- package/dist/drawer/root/context.d.ts +1 -1
- package/dist/drawer/root/drawer-root.svelte +25 -23
- package/dist/drawer/root/drawer-root.svelte.d.ts +25 -23
- package/dist/drawer/swipe-area/drawer-swipe-area.svelte +3 -3
- package/dist/drawer/swipe-area/drawer-swipe-area.svelte.d.ts +3 -3
- package/dist/drawer/title/drawer-title.svelte +3 -3
- package/dist/drawer/title/drawer-title.svelte.d.ts +3 -3
- package/dist/drawer/trigger/drawer-trigger.svelte +6 -6
- package/dist/drawer/trigger/drawer-trigger.svelte.d.ts +6 -6
- package/dist/drawer/viewport/drawer-viewport.svelte +2 -2
- package/dist/drawer/viewport/drawer-viewport.svelte.d.ts +2 -2
- package/dist/drawer/virtual-keyboard/drawer-virtual-keyboard-provider.svelte +1 -1
- package/dist/drawer/virtual-keyboard/drawer-virtual-keyboard-provider.svelte.d.ts +1 -1
- package/dist/dropzone/README.md +4 -6
- package/dist/input/input.svelte +6 -6
- package/dist/input/input.svelte.d.ts +6 -6
- package/dist/listbox/README.md +3 -10
- package/dist/listbox/item/listbox-item.svelte +24 -15
- package/dist/listbox/item/listbox-item.svelte.d.ts +24 -15
- package/dist/listbox/root/README.md +1 -1
- package/dist/listbox/root/context.d.ts +1 -1
- package/dist/listbox/root/listbox.svelte +50 -38
- package/dist/listbox/root/listbox.svelte.d.ts +50 -38
- package/dist/locale-provider/README.md +1 -6
- package/dist/menu/README.md +6 -15
- package/dist/menu/content/menu-content.svelte +14 -10
- package/dist/menu/content/menu-content.svelte.d.ts +14 -10
- package/dist/menu/context-trigger/menu-context-trigger.svelte +8 -9
- package/dist/menu/context-trigger/menu-context-trigger.svelte.d.ts +8 -9
- package/dist/menu/group/menu-group-label.svelte +1 -1
- package/dist/menu/group/menu-group-label.svelte.d.ts +1 -1
- package/dist/menu/item/menu-item.svelte +11 -8
- package/dist/menu/item/menu-item.svelte.d.ts +11 -8
- package/dist/menu/overlay/menu-overlay.svelte +1 -1
- package/dist/menu/overlay/menu-overlay.svelte.d.ts +1 -1
- package/dist/menu/root/context.d.ts +6 -3
- package/dist/menu/root/menu-root.svelte +14 -8
- package/dist/menu/root/menu-root.svelte.d.ts +14 -8
- package/dist/menu/root/menu-state.svelte.d.ts +1 -1
- package/dist/menu/separator/menu-separator.svelte +1 -1
- package/dist/menu/separator/menu-separator.svelte.d.ts +1 -1
- package/dist/menu/submenu/menu-submenu-root.svelte +10 -7
- package/dist/menu/submenu/menu-submenu-root.svelte.d.ts +10 -7
- package/dist/numberfield/root/README.md +1 -1
- package/dist/numberfield/scrub-area-cursor/README.md +1 -1
- package/dist/popover/README.md +1 -1
- package/dist/popover/content/popover-content.svelte +19 -14
- package/dist/popover/content/popover-content.svelte.d.ts +19 -14
- package/dist/popover/overlay/popover-overlay.svelte +1 -1
- package/dist/popover/overlay/popover-overlay.svelte.d.ts +1 -1
- package/dist/popover/root/README.md +1 -1
- package/dist/popover/root/popover-root.svelte +13 -10
- package/dist/popover/root/popover-root.svelte.d.ts +13 -10
- package/dist/popover/trigger/README.md +1 -1
- package/dist/primitives/floating.d.ts +3 -3
- package/dist/primitives/scroll-lock.js +37 -8
- package/dist/switch/root/README.md +2 -2
- package/dist/switch/root/switch-root.svelte +23 -18
- package/dist/switch/root/switch-root.svelte.d.ts +23 -18
- package/dist/switch/thumb/switch-thumb.svelte +1 -1
- package/dist/switch/thumb/switch-thumb.svelte.d.ts +1 -1
- package/dist/table/README.md +15 -10
- package/dist/table/checkbox-indicator/README.md +1 -1
- package/dist/table/column-resizer/README.md +2 -2
- package/dist/table/root/README.md +1 -1
- package/dist/table/sort-trigger/README.md +1 -1
- package/dist/table/types.d.ts +21 -20
- package/dist/tabs/types.d.ts +6 -6
- package/dist/timepicker/README.md +3 -2
- package/dist/timepicker/input/README.md +1 -1
- package/dist/timepicker/input/time-picker-input.svelte +58 -5
- package/dist/timepicker/input/time-picker-input.svelte.d.ts +10 -1
- package/dist/timepicker/root/README.md +1 -1
- package/dist/timepicker/trigger/README.md +1 -1
- package/dist/toggle/README.md +1 -1
- package/dist/toggle-group/README.md +2 -6
- package/dist/toggle-group/types.d.ts +7 -6
- package/dist/transfer-list/README.md +6 -17
- package/dist/transfer-list/item/transfer-list-item.svelte +4 -4
- package/dist/transfer-list/item/transfer-list-item.svelte.d.ts +4 -4
- package/dist/transfer-list/list/transfer-list-list.svelte +12 -12
- package/dist/transfer-list/list/transfer-list-list.svelte.d.ts +12 -12
- package/dist/transfer-list/move/transfer-list-move-button.svelte +4 -4
- package/dist/transfer-list/move/transfer-list-move-button.svelte.d.ts +4 -4
- package/dist/transfer-list/move/transfer-list-reorder-button.svelte +3 -3
- package/dist/transfer-list/move/transfer-list-reorder-button.svelte.d.ts +3 -3
- package/dist/transfer-list/root/transfer-list-root.svelte +23 -20
- package/dist/transfer-list/root/transfer-list-root.svelte.d.ts +23 -20
- package/dist/transfer-list/status/transfer-list-status.svelte +1 -1
- package/dist/transfer-list/status/transfer-list-status.svelte.d.ts +1 -1
- package/dist/tree/README.md +3 -3
- package/dist/tree/checkbox-indicator/README.md +1 -1
- package/dist/tree/root/README.md +1 -1
- package/dist/tree/types.d.ts +19 -10
- package/package.json +1 -1
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
* is the move buttons, which are in the tab order.
|
|
16
16
|
*/
|
|
17
17
|
type TransferListItemProps = {
|
|
18
|
-
/** The item this row
|
|
18
|
+
/** The item of this row. The `getKey` function of the Root gives its key. */
|
|
19
19
|
item: T;
|
|
20
|
-
/**
|
|
20
|
+
/** The text for the typeahead. Without it, the component uses the text content of the row. */
|
|
21
21
|
textValue?: string;
|
|
22
|
-
/** CSS class
|
|
22
|
+
/** The CSS class names of the row. */
|
|
23
23
|
class?: string;
|
|
24
|
-
/**
|
|
24
|
+
/** The content of the row. */
|
|
25
25
|
children?: Snippet;
|
|
26
26
|
} & Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'class' | 'children'>;
|
|
27
27
|
|
|
@@ -2,13 +2,13 @@ import type { Snippet } from 'svelte';
|
|
|
2
2
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
3
|
declare function $$render<T extends object = object>(): {
|
|
4
4
|
props: {
|
|
5
|
-
/** The item this row
|
|
5
|
+
/** The item of this row. The `getKey` function of the Root gives its key. */
|
|
6
6
|
item: T;
|
|
7
|
-
/**
|
|
7
|
+
/** The text for the typeahead. Without it, the component uses the text content of the row. */
|
|
8
8
|
textValue?: string;
|
|
9
|
-
/** CSS class
|
|
9
|
+
/** The CSS class names of the row. */
|
|
10
10
|
class?: string;
|
|
11
|
-
/**
|
|
11
|
+
/** The content of the row. */
|
|
12
12
|
children?: Snippet;
|
|
13
13
|
} & Omit<HTMLAttributes<HTMLDivElement>, "children" | "class" | "id">;
|
|
14
14
|
exports: {};
|
|
@@ -17,28 +17,28 @@
|
|
|
17
17
|
/** Which side this list shows. Set by Source and Target, never by a consumer. */
|
|
18
18
|
side: TransferListSide;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* The accessible name of the list. The move buttons and the live region also use it. This is why
|
|
21
|
+
* it is a string, and not only an `aria-label` value: "Move selected to Selected" is clearer
|
|
22
|
+
* than "move right", and it stays correct in a right-to-left layout.
|
|
23
23
|
*/
|
|
24
24
|
label: string;
|
|
25
|
-
/**
|
|
25
|
+
/** The id of a heading that the user sees, for when the list already has one. */
|
|
26
26
|
'aria-labelledby'?: string;
|
|
27
27
|
/**
|
|
28
|
-
* Shows only the items this returns `true
|
|
29
|
-
*
|
|
28
|
+
* Shows only the items for which this function returns `true`. The input that controls it is
|
|
29
|
+
* yours, and this prop decides only which items the list shows.
|
|
30
30
|
*
|
|
31
|
-
* "
|
|
32
|
-
* the button appears to promise while a filter is
|
|
31
|
+
* With a filter, "move all" means the rows that the user sees, and not all of the items at that
|
|
32
|
+
* side. This is what the button appears to promise while a filter is on.
|
|
33
33
|
*/
|
|
34
34
|
filter?: (item: T, index: number) => boolean;
|
|
35
|
-
/**
|
|
35
|
+
/** The content for each item at this side. */
|
|
36
36
|
children?: Snippet<[T]>;
|
|
37
|
-
/**
|
|
37
|
+
/** The content while the side has no items. If you give none, the component makes nothing. */
|
|
38
38
|
emptyPlaceholder?: string | Snippet;
|
|
39
|
-
/**
|
|
39
|
+
/** Makes only the rows near the viewport. Read the `virtualizer` prop of `ListBox`. */
|
|
40
40
|
virtualizer?: { rowHeight?: number; overscan?: number };
|
|
41
|
-
/** CSS class
|
|
41
|
+
/** The CSS class names of the list element. */
|
|
42
42
|
class?: string;
|
|
43
43
|
};
|
|
44
44
|
|
|
@@ -5,31 +5,31 @@ declare function $$render<T extends object = object>(): {
|
|
|
5
5
|
/** Which side this list shows. Set by Source and Target, never by a consumer. */
|
|
6
6
|
side: TransferListSide;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* The accessible name of the list. The move buttons and the live region also use it. This is why
|
|
9
|
+
* it is a string, and not only an `aria-label` value: "Move selected to Selected" is clearer
|
|
10
|
+
* than "move right", and it stays correct in a right-to-left layout.
|
|
11
11
|
*/
|
|
12
12
|
label: string;
|
|
13
|
-
/**
|
|
13
|
+
/** The id of a heading that the user sees, for when the list already has one. */
|
|
14
14
|
'aria-labelledby'?: string;
|
|
15
15
|
/**
|
|
16
|
-
* Shows only the items this returns `true
|
|
17
|
-
*
|
|
16
|
+
* Shows only the items for which this function returns `true`. The input that controls it is
|
|
17
|
+
* yours, and this prop decides only which items the list shows.
|
|
18
18
|
*
|
|
19
|
-
* "
|
|
20
|
-
* the button appears to promise while a filter is
|
|
19
|
+
* With a filter, "move all" means the rows that the user sees, and not all of the items at that
|
|
20
|
+
* side. This is what the button appears to promise while a filter is on.
|
|
21
21
|
*/
|
|
22
22
|
filter?: (item: T, index: number) => boolean;
|
|
23
|
-
/**
|
|
23
|
+
/** The content for each item at this side. */
|
|
24
24
|
children?: Snippet<[T]>;
|
|
25
|
-
/**
|
|
25
|
+
/** The content while the side has no items. If you give none, the component makes nothing. */
|
|
26
26
|
emptyPlaceholder?: string | Snippet;
|
|
27
|
-
/**
|
|
27
|
+
/** Makes only the rows near the viewport. Read the `virtualizer` prop of `ListBox`. */
|
|
28
28
|
virtualizer?: {
|
|
29
29
|
rowHeight?: number;
|
|
30
30
|
overscan?: number;
|
|
31
31
|
};
|
|
32
|
-
/** CSS class
|
|
32
|
+
/** The CSS class names of the list element. */
|
|
33
33
|
class?: string;
|
|
34
34
|
};
|
|
35
35
|
exports: {};
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
HTMLButtonAttributes,
|
|
20
20
|
'children' | 'class' | 'disabled' | 'aria-disabled' | 'type'
|
|
21
21
|
> & {
|
|
22
|
-
/**
|
|
22
|
+
/** The list that the items go to. */
|
|
23
23
|
to: TransferListSide;
|
|
24
24
|
/** Whether it moves the selection or everything movable. */
|
|
25
25
|
scope: 'selected' | 'all';
|
|
26
|
-
/**
|
|
26
|
+
/** The content of the button: an arrow, a name, or a different element of your layout. */
|
|
27
27
|
children?: Snippet;
|
|
28
|
-
/** CSS class
|
|
28
|
+
/** The CSS class names of the button. */
|
|
29
29
|
class?: string;
|
|
30
|
-
/**
|
|
30
|
+
/** A bindable reference to the button element. */
|
|
31
31
|
element?: HTMLButtonElement | null;
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -9,15 +9,15 @@ import { type TransferListSide } from '../root/types';
|
|
|
9
9
|
* hand-off — live here once.
|
|
10
10
|
*/
|
|
11
11
|
type MoveButtonProps = Omit<HTMLButtonAttributes, 'children' | 'class' | 'disabled' | 'aria-disabled' | 'type'> & {
|
|
12
|
-
/**
|
|
12
|
+
/** The list that the items go to. */
|
|
13
13
|
to: TransferListSide;
|
|
14
14
|
/** Whether it moves the selection or everything movable. */
|
|
15
15
|
scope: 'selected' | 'all';
|
|
16
|
-
/**
|
|
16
|
+
/** The content of the button: an arrow, a name, or a different element of your layout. */
|
|
17
17
|
children?: Snippet;
|
|
18
|
-
/** CSS class
|
|
18
|
+
/** The CSS class names of the button. */
|
|
19
19
|
class?: string;
|
|
20
|
-
/**
|
|
20
|
+
/** A bindable reference to the button element. */
|
|
21
21
|
element?: HTMLButtonElement | null;
|
|
22
22
|
};
|
|
23
23
|
declare const TransferListMoveButton: import("svelte").Component<MoveButtonProps, {}, "element">;
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
> & {
|
|
20
20
|
/** Which way the selection moves. */
|
|
21
21
|
direction: 'up' | 'down';
|
|
22
|
-
/**
|
|
22
|
+
/** The content of the button: an arrow, a name, or a different element of your layout. */
|
|
23
23
|
children?: Snippet;
|
|
24
|
-
/** CSS class
|
|
24
|
+
/** The CSS class names of the button. */
|
|
25
25
|
class?: string;
|
|
26
|
-
/**
|
|
26
|
+
/** A bindable reference to the button element. */
|
|
27
27
|
element?: HTMLButtonElement | null;
|
|
28
28
|
};
|
|
29
29
|
|
|
@@ -9,11 +9,11 @@ import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
|
9
9
|
type ReorderButtonProps = Omit<HTMLButtonAttributes, 'children' | 'class' | 'disabled' | 'aria-disabled' | 'type'> & {
|
|
10
10
|
/** Which way the selection moves. */
|
|
11
11
|
direction: 'up' | 'down';
|
|
12
|
-
/**
|
|
12
|
+
/** The content of the button: an arrow, a name, or a different element of your layout. */
|
|
13
13
|
children?: Snippet;
|
|
14
|
-
/** CSS class
|
|
14
|
+
/** The CSS class names of the button. */
|
|
15
15
|
class?: string;
|
|
16
|
-
/**
|
|
16
|
+
/** A bindable reference to the button element. */
|
|
17
17
|
element?: HTMLButtonElement | null;
|
|
18
18
|
};
|
|
19
19
|
declare const TransferListReorderButton: import("svelte").Component<ReorderButtonProps, {}, "element">;
|
|
@@ -17,42 +17,45 @@
|
|
|
17
17
|
* free — items land in the order they were moved.
|
|
18
18
|
*/
|
|
19
19
|
type TransferListRootProps = {
|
|
20
|
-
/** The
|
|
20
|
+
/** The full collection, in the sequence of the left list. */
|
|
21
21
|
items?: Iterable<T>;
|
|
22
|
-
/**
|
|
22
|
+
/** The identity of an item. The default is its `id` field. */
|
|
23
23
|
getKey?: (item: T) => TransferListKey;
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* The keys at the right side, in their sequence. By default it goes in the two directions: use
|
|
26
|
+
* `bind:value`.
|
|
27
|
+
*/
|
|
25
28
|
value?: TransferListKey[];
|
|
26
|
-
/**
|
|
29
|
+
/** The keys at the right side at the start, for when you give no `value`. */
|
|
27
30
|
defaultValue?: TransferListKey[];
|
|
28
31
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* the new value
|
|
32
|
-
* needs the write-back
|
|
32
|
+
* Give your own code full control of the state. The component stops to write back to `value`,
|
|
33
|
+
* and it reports only through `onChange`. Thus the parent can refuse a move: the parent does not
|
|
34
|
+
* send the new value down. The default is off, because `bind:value` is the usual case and it
|
|
35
|
+
* needs the write-back.
|
|
33
36
|
*/
|
|
34
37
|
controlledValue?: boolean;
|
|
35
|
-
/**
|
|
38
|
+
/** The component calls it after a move, with the new value and with the items that moved. */
|
|
36
39
|
onChange?: (value: TransferListKey[], details: TransferListMoveDetails) => void;
|
|
37
|
-
/**
|
|
40
|
+
/** The keys of the items that stay at their side. */
|
|
38
41
|
disabledKeys?: Iterable<TransferListKey>;
|
|
39
42
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* is empty,
|
|
43
|
+
* The name of the hidden inputs that hold `value`. Thus the field submits with the form and
|
|
44
|
+
* needs no other code. The component makes one input for each key, in their sequence. If the
|
|
45
|
+
* right list is empty, it makes no input, and this is the behavior of a native field with more
|
|
46
|
+
* than one value.
|
|
43
47
|
*/
|
|
44
48
|
name?: string;
|
|
45
49
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* with something in the surrounding app.
|
|
50
|
+
* Lets `Ctrl`+`Enter` or `Cmd`+`Enter` in a list move its selection to the other list. Each list
|
|
51
|
+
* has one destination, thus the shortcut needs no direction. It also stays correct when the
|
|
52
|
+
* layout is a mirror image. Set it to `false` when it is the same as a shortcut of your
|
|
53
|
+
* application.
|
|
51
54
|
*/
|
|
52
55
|
moveShortcut?: boolean;
|
|
53
|
-
/** CSS class
|
|
56
|
+
/** The CSS class names of the container element. */
|
|
54
57
|
class?: string;
|
|
55
|
-
/** The two lists, the move buttons, and
|
|
58
|
+
/** The two lists, the move buttons, and each other element of the layout. */
|
|
56
59
|
children?: Snippet;
|
|
57
60
|
} & Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'children'>;
|
|
58
61
|
|
|
@@ -3,42 +3,45 @@ import type { HTMLAttributes } from 'svelte/elements';
|
|
|
3
3
|
import { type TransferListKey, type TransferListMoveDetails } from './types';
|
|
4
4
|
declare function $$render<T extends object = object>(): {
|
|
5
5
|
props: {
|
|
6
|
-
/** The
|
|
6
|
+
/** The full collection, in the sequence of the left list. */
|
|
7
7
|
items?: Iterable<T>;
|
|
8
|
-
/**
|
|
8
|
+
/** The identity of an item. The default is its `id` field. */
|
|
9
9
|
getKey?: (item: T) => TransferListKey;
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* The keys at the right side, in their sequence. By default it goes in the two directions: use
|
|
12
|
+
* `bind:value`.
|
|
13
|
+
*/
|
|
11
14
|
value?: TransferListKey[];
|
|
12
|
-
/**
|
|
15
|
+
/** The keys at the right side at the start, for when you give no `value`. */
|
|
13
16
|
defaultValue?: TransferListKey[];
|
|
14
17
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* the new value
|
|
18
|
-
* needs the write-back
|
|
18
|
+
* Give your own code full control of the state. The component stops to write back to `value`,
|
|
19
|
+
* and it reports only through `onChange`. Thus the parent can refuse a move: the parent does not
|
|
20
|
+
* send the new value down. The default is off, because `bind:value` is the usual case and it
|
|
21
|
+
* needs the write-back.
|
|
19
22
|
*/
|
|
20
23
|
controlledValue?: boolean;
|
|
21
|
-
/**
|
|
24
|
+
/** The component calls it after a move, with the new value and with the items that moved. */
|
|
22
25
|
onChange?: (value: TransferListKey[], details: TransferListMoveDetails) => void;
|
|
23
|
-
/**
|
|
26
|
+
/** The keys of the items that stay at their side. */
|
|
24
27
|
disabledKeys?: Iterable<TransferListKey>;
|
|
25
28
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* is empty,
|
|
29
|
+
* The name of the hidden inputs that hold `value`. Thus the field submits with the form and
|
|
30
|
+
* needs no other code. The component makes one input for each key, in their sequence. If the
|
|
31
|
+
* right list is empty, it makes no input, and this is the behavior of a native field with more
|
|
32
|
+
* than one value.
|
|
29
33
|
*/
|
|
30
34
|
name?: string;
|
|
31
35
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* with something in the surrounding app.
|
|
36
|
+
* Lets `Ctrl`+`Enter` or `Cmd`+`Enter` in a list move its selection to the other list. Each list
|
|
37
|
+
* has one destination, thus the shortcut needs no direction. It also stays correct when the
|
|
38
|
+
* layout is a mirror image. Set it to `false` when it is the same as a shortcut of your
|
|
39
|
+
* application.
|
|
37
40
|
*/
|
|
38
41
|
moveShortcut?: boolean;
|
|
39
|
-
/** CSS class
|
|
42
|
+
/** The CSS class names of the container element. */
|
|
40
43
|
class?: string;
|
|
41
|
-
/** The two lists, the move buttons, and
|
|
44
|
+
/** The two lists, the move buttons, and each other element of the layout. */
|
|
42
45
|
children?: Snippet;
|
|
43
46
|
} & Omit<HTMLAttributes<HTMLDivElement>, "children" | "class">;
|
|
44
47
|
exports: {};
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* many went or where.
|
|
14
14
|
*/
|
|
15
15
|
type TransferListStatusProps = {
|
|
16
|
-
/**
|
|
16
|
+
/** Makes the announced message from the move. */
|
|
17
17
|
formatMessage?: (details: TransferListMoveDetails, label: string) => string;
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -7,7 +7,7 @@ import type { TransferListMoveDetails } from '../root/types';
|
|
|
7
7
|
* many went or where.
|
|
8
8
|
*/
|
|
9
9
|
type TransferListStatusProps = {
|
|
10
|
-
/**
|
|
10
|
+
/** Makes the announced message from the move. */
|
|
11
11
|
formatMessage?: (details: TransferListMoveDetails, label: string) => string;
|
|
12
12
|
};
|
|
13
13
|
declare const TransferListStatus: import("svelte").Component<TransferListStatusProps, {}, "">;
|
package/dist/tree/README.md
CHANGED
|
@@ -46,14 +46,14 @@ All public Tree part prop types are exported from the tree barrel, including `Tr
|
|
|
46
46
|
- Use `defaultExpandedKeys` for uncontrolled initial expansion.
|
|
47
47
|
- Use `selectedKeys` / `onSelectionChange` for controlled selection.
|
|
48
48
|
- Use `defaultSelectedKeys` for uncontrolled initial selection.
|
|
49
|
-
-
|
|
49
|
+
- In the component, each key is a string. Thus a numeric item id and a string key point at the same node. The key sets of `onExpandedKeysChange` and `onSelectionChange` hold the string form.
|
|
50
50
|
- Use `selectionPropagation="none"` for flat RAC-style selection where ancestors stay unchecked unless explicitly selected, or `selectionPropagation="descendants"` to propagate selection through a subtree.
|
|
51
51
|
- Use `Tree.Section` and `Tree.Header` to group related top-level items; when a section does not render a header, provide `aria-label` on the section.
|
|
52
52
|
- Use `Tree.Item` for every node, regardless of whether it is currently a branch or a leaf.
|
|
53
53
|
- Place nested descendants inside `Tree.Children`; the presence of `Tree.Children` is what makes the parent expandible on the first render and during SSR.
|
|
54
54
|
- Put the interactive parts (`Tree.Trigger`, `Tree.Checkbox`, `Tree.Label`, and any custom content) directly inside `Tree.Item`.
|
|
55
|
-
- Use `Tree.Trigger`
|
|
56
|
-
- `Tree.Item` is the
|
|
55
|
+
- Use `Tree.Trigger` as the control that expands a node. Use `Tree.Checkbox` and `Tree.CheckboxIndicator` as the controls that select a node.
|
|
56
|
+
- `Tree.Item` is the true `treeitem` element. It shows the focus, hover, selection, and pressed states on the item.
|
|
57
57
|
- Collapsed descendants are omitted from the rendered tree DOM while their structural state remains in the internal collection.
|
|
58
58
|
|
|
59
59
|
## Accessibility
|
|
@@ -11,7 +11,7 @@ Description: Indicator wrapper for `Tree.Checkbox`. It only renders when the che
|
|
|
11
11
|
| ------------ | --------- | ----------- | ----------------------------------------------------------- |
|
|
12
12
|
| `forceMount` | `boolean` | `false` | Keeps the indicator mounted when the checkbox is unchecked. |
|
|
13
13
|
| `children` | `Snippet` | `undefined` | Indicator content, typically an icon. |
|
|
14
|
-
| `class` | `string` | `''` | CSS class names
|
|
14
|
+
| `class` | `string` | `''` | The CSS class names of the indicator container. |
|
|
15
15
|
|
|
16
16
|
## Usage notes
|
|
17
17
|
|
package/dist/tree/root/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Description: State container for tree focus, expansion, selection, typeahead, an
|
|
|
29
29
|
| `onAction` | `(id: string \| number) => void` | `undefined` | Called when the focused item is activated with `Enter`. |
|
|
30
30
|
| `aria-label` | `string` | `undefined` | Accessible label for the tree. |
|
|
31
31
|
| `aria-labelledby` | `string` | `undefined` | Id reference to an external label. |
|
|
32
|
-
| `class` | `string` | `''` | CSS class names
|
|
32
|
+
| `class` | `string` | `''` | The CSS class names of the root element. |
|
|
33
33
|
| `context` | `TreeContext` | `bindable` | Exposes the internal tree context for advanced compositions and tests. |
|
|
34
34
|
| `element` | `HTMLElement` | `bindable` | Exposes the rendered root element. |
|
|
35
35
|
|
package/dist/tree/types.d.ts
CHANGED
|
@@ -16,22 +16,28 @@ export type TreeEmptyStateRenderProps = {
|
|
|
16
16
|
empty: boolean;
|
|
17
17
|
};
|
|
18
18
|
export type TreeRootProps<T extends object = object> = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* The keys of the expanded nodes. By default it goes in the two directions: use
|
|
21
|
+
* `bind:expandedKeys`.
|
|
22
|
+
*/
|
|
20
23
|
expandedKeys?: Iterable<TreeNodeId>;
|
|
21
|
-
/**
|
|
24
|
+
/** The expanded keys at the start, for when you give no `expandedKeys`. */
|
|
22
25
|
defaultExpandedKeys?: Iterable<TreeNodeId>;
|
|
23
26
|
/**
|
|
24
|
-
*
|
|
25
|
-
* `expandedKeys
|
|
26
|
-
*
|
|
27
|
-
* `bind:expandedKeys`
|
|
27
|
+
* Give your own code full control of the expansion. The component stops to write back to
|
|
28
|
+
* `expandedKeys`, and it reports only through `onExpandedKeysChange`. Thus the parent can refuse
|
|
29
|
+
* a change: the parent does not send the new keys down. The default is off, because
|
|
30
|
+
* `bind:expandedKeys` is the usual case and it needs the write-back.
|
|
28
31
|
*/
|
|
29
32
|
controlledExpandedKeys?: boolean;
|
|
30
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* The keys of the selected nodes. By default it goes in the two directions: use
|
|
35
|
+
* `bind:selectedKeys`.
|
|
36
|
+
*/
|
|
31
37
|
selectedKeys?: Iterable<TreeNodeId>;
|
|
32
|
-
/**
|
|
38
|
+
/** The selected keys at the start, for when you give no `selectedKeys`. */
|
|
33
39
|
defaultSelectedKeys?: Iterable<TreeNodeId>;
|
|
34
|
-
/**
|
|
40
|
+
/** Give your own code full control of the selection. Read `controlledExpandedKeys`. */
|
|
35
41
|
controlledSelectedKeys?: boolean;
|
|
36
42
|
disabledKeys?: Iterable<TreeNodeId>;
|
|
37
43
|
selectionMode?: TreeSelectionMode;
|
|
@@ -45,7 +51,10 @@ export type TreeRootProps<T extends object = object> = Omit<HTMLAttributes<HTMLD
|
|
|
45
51
|
onExpandedKeysChange?: (keys: Set<TreeNodeId>) => void;
|
|
46
52
|
onSelectionChange?: (keys: Set<TreeNodeId>) => void;
|
|
47
53
|
onAction?: TreeActionHandler;
|
|
48
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* The enter transition and the exit transition of each item row, when a node expands or closes.
|
|
56
|
+
* The default is none.
|
|
57
|
+
*/
|
|
49
58
|
itemTransition?: TreeItemTransition;
|
|
50
59
|
class?: string;
|
|
51
60
|
context?: TreeContext;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@human-kit/ui",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.6",
|
|
4
4
|
"description": "Accessible, typed UI components for Svelte 5 — shipped as native ESM with per-component subpath exports so bundlers only include what you import.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Agustin Delgado <agustindariodelgado@gmail.com>",
|