@nexxtmove/ui 1.32.0 → 1.34.0
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/dist/components/atoms/FloatingPanel/FloatingPanel.vue.d.ts +48 -7
- package/dist/components/atoms/PickerItem/PickerItem.vue.d.ts +40 -0
- package/dist/components/atoms/PickerPreview/PickerPreview.vue.d.ts +29 -0
- package/dist/components/editor/molecules/EditorRadius/EditorRadius.vue.d.ts +4 -4
- package/dist/components/molecules/PickerGroup/PickerGroup.vue.d.ts +32 -0
- package/dist/components/molecules/PickerList/PickerList.vue.d.ts +107 -0
- package/dist/components/organisms/ColorPicker/ColorPicker.vue.d.ts +1 -1
- package/dist/components/organisms/PickerPanel/PickerPanel.vue.d.ts +93 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +2368 -1643
- package/dist/nuxt.js +5 -0
- package/package.json +1 -1
- package/src/components/atoms/FloatingPanel/FloatingPanel.vue +280 -20
- package/src/components/atoms/PickerItem/PickerItem.vue +113 -0
- package/src/components/atoms/PickerPreview/PickerPreview.vue +99 -0
- package/src/components/editor/molecules/EditorRadius/EditorRadius.vue +6 -6
- package/src/components/molecules/PickerGroup/PickerGroup.vue +107 -0
- package/src/components/molecules/PickerList/PickerList.vue +649 -0
- package/src/components/organisms/PickerPanel/PickerPanel.vue +267 -0
- package/src/components.json +5 -0
- package/src/index.ts +10 -0
|
@@ -6,29 +6,67 @@ export interface NexxtFloatingPanelProps {
|
|
|
6
6
|
offsetDistance?: number;
|
|
7
7
|
/** Stretch the panel to at least the trigger's width. */
|
|
8
8
|
matchWidth?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Wrap the content slot in the shared panel surface. `true` is the surface for small
|
|
11
|
+
* dropdowns (gray-200 border, `shadow-sm`). `'raised'` is for large panels over a white page,
|
|
12
|
+
* such as a picker: heavier border and `shadow-lg`, so the panel reads as a layer above the
|
|
13
|
+
* page instead of part of it.
|
|
14
|
+
*/
|
|
15
|
+
surface?: boolean | 'raised';
|
|
16
|
+
/**
|
|
17
|
+
* Limit the content to the room on the roomiest side of the trigger (top or bottom), minus the
|
|
18
|
+
* offset and an 8px viewport margin. The value reaches the content as the `availableHeight`
|
|
19
|
+
* slot prop and as the CSS variable `--floating-panel-available-height` on the positioning
|
|
20
|
+
* element. The panel sets no height itself: the content decides how to use it. Follows
|
|
21
|
+
* scroll and resize while open.
|
|
22
|
+
*/
|
|
23
|
+
fitHeight?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Render the panel at the end of `<body>` instead of next to the trigger, so it is no longer in
|
|
26
|
+
* the stacking context of the trigger's ancestors (a sibling with the same z-index can paint
|
|
27
|
+
* over a non-teleported panel). Keyboard order stays as if the panel followed the trigger.
|
|
28
|
+
* Costs: the panel no longer inherits font, colour or CSS variables from around the trigger,
|
|
29
|
+
* and DOM events from the panel no longer bubble through the trigger's ancestors.
|
|
30
|
+
* Ignored inside a `role="dialog"` (e.g. `NexxtModal`): Reka makes everything outside the
|
|
31
|
+
* dialog `pointer-events: none` and traps focus inside it. The panel stays in place there;
|
|
32
|
+
* `position: fixed` already escapes the dialog's overflow. Whether the panel was actually
|
|
33
|
+
* teleported is the `teleported` slot prop of `#content`, and `teleported` on the instance.
|
|
34
|
+
*
|
|
35
|
+
* Keyboard order is kept by invisible focus guards: one at the end of the trigger wrapper, and
|
|
36
|
+
* one at the start and end of the panel. A consumer that closes on `focusout` therefore sees
|
|
37
|
+
* focus land on a guard first and on its real target right after; check `relatedTarget` against
|
|
38
|
+
* the panel and the trigger, not against a list of expected elements. Listen on the exposed
|
|
39
|
+
* `floatingRef`, not on the slot content: the guards sit outside the content, so the final step
|
|
40
|
+
* out of the panel is a `focusout` of a guard that the content never sees. Focus inside the panel
|
|
41
|
+
* goes back to the trigger when it closes. Known limitation: with two teleported panels open at
|
|
42
|
+
* once, Tab from one can end up in the other.
|
|
43
|
+
*/
|
|
44
|
+
teleport?: boolean;
|
|
11
45
|
}
|
|
12
46
|
declare var __VLS_1: {
|
|
13
47
|
isOpen: boolean;
|
|
14
48
|
toggle: () => void | Promise<void>;
|
|
15
49
|
open: () => Promise<void>;
|
|
16
50
|
close: () => void;
|
|
17
|
-
},
|
|
51
|
+
}, __VLS_31: {
|
|
18
52
|
isOpen: true;
|
|
19
53
|
close: () => void;
|
|
20
54
|
toggle: () => void | Promise<void>;
|
|
21
|
-
|
|
55
|
+
availableHeight: number | null;
|
|
56
|
+
teleported: boolean;
|
|
57
|
+
}, __VLS_33: {
|
|
22
58
|
isOpen: true;
|
|
23
59
|
close: () => void;
|
|
24
60
|
toggle: () => void | Promise<void>;
|
|
61
|
+
availableHeight: number | null;
|
|
62
|
+
teleported: boolean;
|
|
25
63
|
};
|
|
26
64
|
type __VLS_Slots = {} & {
|
|
27
65
|
trigger?: (props: typeof __VLS_1) => any;
|
|
28
66
|
} & {
|
|
29
|
-
content?: (props: typeof
|
|
67
|
+
content?: (props: typeof __VLS_31) => any;
|
|
30
68
|
} & {
|
|
31
|
-
content?: (props: typeof
|
|
69
|
+
content?: (props: typeof __VLS_33) => any;
|
|
32
70
|
};
|
|
33
71
|
declare const __VLS_base: import('vue').DefineComponent<NexxtFloatingPanelProps, {
|
|
34
72
|
isOpen: import('vue').Ref<boolean, boolean>;
|
|
@@ -37,6 +75,7 @@ declare const __VLS_base: import('vue').DefineComponent<NexxtFloatingPanelProps,
|
|
|
37
75
|
toggle: () => void | Promise<void>;
|
|
38
76
|
triggerRef: Readonly<import('vue').ShallowRef<HTMLSpanElement | null, HTMLSpanElement | null>>;
|
|
39
77
|
floatingRef: Readonly<import('vue').ShallowRef<HTMLDivElement | null, HTMLDivElement | null>>;
|
|
78
|
+
teleported: Readonly<import('vue').Ref<boolean, boolean>>;
|
|
40
79
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
41
80
|
close: () => any;
|
|
42
81
|
open: () => any;
|
|
@@ -47,7 +86,9 @@ declare const __VLS_base: import('vue').DefineComponent<NexxtFloatingPanelProps,
|
|
|
47
86
|
placement: Placement;
|
|
48
87
|
offsetDistance: number;
|
|
49
88
|
matchWidth: boolean;
|
|
50
|
-
surface: boolean;
|
|
89
|
+
surface: boolean | "raised";
|
|
90
|
+
fitHeight: boolean;
|
|
91
|
+
teleport: boolean;
|
|
51
92
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
52
93
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
53
94
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { NexxtIconName } from '../Icon/Icon.vue';
|
|
2
|
+
interface NexxtPickerItemProps {
|
|
3
|
+
/** DOM id of the option; the listbox points `aria-activedescendant` at it. `NexxtPickerList` generates it. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Visible label, and the accessible name of the option. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Icon in front of the label. */
|
|
8
|
+
icon?: NexxtIconName;
|
|
9
|
+
/**
|
|
10
|
+
* Whether this is the active option. Tints the row; inside a focused listbox named
|
|
11
|
+
* `group/listbox` it also gets a ring. Outside such a listbox the item never shows a ring.
|
|
12
|
+
*/
|
|
13
|
+
highlighted?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The option stays reachable with the keyboard and the pointer, but never emits `select`.
|
|
16
|
+
* Give a `description` that names the reason: a disabled option without one is a dead end.
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** One line of extra context. Not shown; screen readers get it through `aria-describedby`. */
|
|
20
|
+
description?: string;
|
|
21
|
+
}
|
|
22
|
+
type __VLS_Slots = {
|
|
23
|
+
/** Replaces icon and label. The option element, its id and its aria stay the item's own. */
|
|
24
|
+
default?(): unknown;
|
|
25
|
+
};
|
|
26
|
+
declare const __VLS_base: import('vue').DefineComponent<NexxtPickerItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
27
|
+
select: () => any;
|
|
28
|
+
highlight: () => any;
|
|
29
|
+
}, string, import('vue').PublicProps, Readonly<NexxtPickerItemProps> & Readonly<{
|
|
30
|
+
onSelect?: (() => any) | undefined;
|
|
31
|
+
onHighlight?: (() => any) | undefined;
|
|
32
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface NexxtPickerPreviewProps {
|
|
2
|
+
/** Heading under the frame. Without it and without default-slot content the preview is empty. */
|
|
3
|
+
title?: string;
|
|
4
|
+
/** Explanation under the title, clamped to two lines. */
|
|
5
|
+
description?: string;
|
|
6
|
+
/** Centred in the frame while the preview is empty; the `empty` slot replaces it. */
|
|
7
|
+
emptyText?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Identifies what the preview shows. When it changes, the new content fades in (90ms) and the
|
|
10
|
+
* old content is gone at once: no crossfade. A change within 150ms of the previous one, as with
|
|
11
|
+
* a held arrow key, swaps without a fade. Without a key the content swaps without a fade.
|
|
12
|
+
*/
|
|
13
|
+
contentKey?: string | number;
|
|
14
|
+
}
|
|
15
|
+
type __VLS_Slots = {
|
|
16
|
+
/** Content of the 16:10 frame, e.g. an illustration or a screenshot. */
|
|
17
|
+
default?(): unknown;
|
|
18
|
+
/** Replaces `emptyText` in the frame while the preview is empty. */
|
|
19
|
+
empty?(): unknown;
|
|
20
|
+
};
|
|
21
|
+
declare const __VLS_base: import('vue').DefineComponent<NexxtPickerPreviewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<NexxtPickerPreviewProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* `full` is last and carries no px: it is a pill, not a size on the scale, so
|
|
11
11
|
* the readout names it instead of measuring it.
|
|
12
12
|
*/
|
|
13
|
-
declare const
|
|
13
|
+
export declare const EDITOR_RADIUS_STEPS: readonly [{
|
|
14
14
|
readonly token: "none";
|
|
15
15
|
readonly px: 0;
|
|
16
16
|
}, {
|
|
@@ -45,7 +45,7 @@ declare const RADIUS_STEPS: readonly [{
|
|
|
45
45
|
* The radius as the editor needs it: the Tailwind class itself, so the consumer
|
|
46
46
|
* can put the model value straight on the element it styles.
|
|
47
47
|
*/
|
|
48
|
-
export type EditorRadiusValue = `rounded-${(typeof
|
|
48
|
+
export type EditorRadiusValue = `rounded-${(typeof EDITOR_RADIUS_STEPS)[number]['token']}`;
|
|
49
49
|
/** Overridable copy of the value readout. Every key is optional. */
|
|
50
50
|
export interface EditorRadiusMessages {
|
|
51
51
|
/** Unit shown behind the value. Defaults to `'px'`. */
|
|
@@ -75,10 +75,10 @@ declare const __VLS_export: import('vue').DefineComponent<NexxtEditorRadiusProps
|
|
|
75
75
|
/** The selected radius, as the Tailwind class to apply. */
|
|
76
76
|
modelValue: EditorRadiusValue;
|
|
77
77
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
78
|
-
"update:modelValue": (value: "rounded-
|
|
78
|
+
"update:modelValue": (value: "rounded-full" | "rounded-lg" | "rounded-none" | "rounded-sm" | "rounded-md" | "rounded-xs" | "rounded-xl" | "rounded-2xl" | "rounded-3xl" | "rounded-4xl") => any;
|
|
79
79
|
}, string, import('vue').PublicProps, Readonly<NexxtEditorRadiusProps & {
|
|
80
80
|
/** The selected radius, as the Tailwind class to apply. */
|
|
81
81
|
modelValue: EditorRadiusValue;
|
|
82
82
|
}> & Readonly<{
|
|
83
|
-
"onUpdate:modelValue"?: ((value: "rounded-
|
|
83
|
+
"onUpdate:modelValue"?: ((value: "rounded-full" | "rounded-lg" | "rounded-none" | "rounded-sm" | "rounded-md" | "rounded-xs" | "rounded-xl" | "rounded-2xl" | "rounded-3xl" | "rounded-4xl") => any) | undefined;
|
|
84
84
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface NexxtPickerGroupProps {
|
|
2
|
+
/** Heading of the group, and the accessible name of its `role="group"`. */
|
|
3
|
+
label: string;
|
|
4
|
+
/**
|
|
5
|
+
* Whether the heading folds the group. `false` turns the heading into a plain label: no
|
|
6
|
+
* chevron, no click handler, no `aria-expanded`.
|
|
7
|
+
*/
|
|
8
|
+
collapsible?: boolean;
|
|
9
|
+
}
|
|
10
|
+
type __VLS_Props = NexxtPickerGroupProps;
|
|
11
|
+
type __VLS_Slots = {
|
|
12
|
+
/** The options: `NexxtPickerItem`s, or anything else with `role="option"`. */
|
|
13
|
+
default(): unknown;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_ModelProps = {
|
|
16
|
+
/** Whether the options are shown. A closed group has its options out of the DOM. */
|
|
17
|
+
'open'?: boolean;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
20
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
21
|
+
"update:open": (value: boolean) => any;
|
|
22
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
24
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { NexxtIconName } from '../../atoms/Icon/Icon.vue';
|
|
2
|
+
export interface NexxtPickerItemData {
|
|
3
|
+
/** Stable id; also the base of the option's DOM id that `aria-activedescendant` points at. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Visible label and accessible name of the option; searched and matched by type-ahead. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Icon in front of the label, also passed to the `preview` slot. */
|
|
8
|
+
icon: NexxtIconName;
|
|
9
|
+
/** Id of a group in `groups`. Missing, or not in `groups`: ungrouped, rendered at the top. */
|
|
10
|
+
group?: string;
|
|
11
|
+
/** Extra search terms (synonyms, old names). Matched, never shown. */
|
|
12
|
+
keywords?: string[];
|
|
13
|
+
/** One line, shown in the preview and read out as the option's description. */
|
|
14
|
+
description?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Reachable with the arrows, type-ahead and the pointer, but never selected. Give a
|
|
17
|
+
* `description` that names the reason.
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface NexxtPickerGroupData {
|
|
22
|
+
/** Stable id; items join the group through their `group` field. */
|
|
23
|
+
id: string;
|
|
24
|
+
/** Heading of the group, and the accessible name of its `role="group"`. */
|
|
25
|
+
label: string;
|
|
26
|
+
/** Initial state, default `true`. After that the list keeps its own open/closed state. */
|
|
27
|
+
defaultOpen?: boolean;
|
|
28
|
+
}
|
|
29
|
+
interface NexxtPickerListProps {
|
|
30
|
+
/** All items; `search` filters them. */
|
|
31
|
+
items: NexxtPickerItemData[];
|
|
32
|
+
/** Groups in display order. Ungrouped items come first. */
|
|
33
|
+
groups?: NexxtPickerGroupData[];
|
|
34
|
+
/** Search term from outside; the list renders no field of its own. Trimmed before matching. */
|
|
35
|
+
search?: string;
|
|
36
|
+
/** Whether group headings fold their group. While searching every group is open regardless. */
|
|
37
|
+
collapsible?: boolean;
|
|
38
|
+
/** Accessible name of the listbox. Required for an accessible name. */
|
|
39
|
+
ariaLabel?: string;
|
|
40
|
+
/** Heading of the empty state, shown when the search has no results. */
|
|
41
|
+
emptyTitle?: string;
|
|
42
|
+
/** Line under the empty heading. A function receives the trimmed search term. */
|
|
43
|
+
emptyDescription?: string | ((search: string) => string);
|
|
44
|
+
/** Label of the button in the empty state that clears the search. Without it there is no button. */
|
|
45
|
+
clearLabel?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Text announced in a polite live region 500ms after the search changes, e.g.
|
|
48
|
+
* `(n) => \`${n} resultaten\``. Without it the region stays empty.
|
|
49
|
+
*/
|
|
50
|
+
resultsAnnouncement?: (count: number) => string;
|
|
51
|
+
}
|
|
52
|
+
type __VLS_Props = NexxtPickerListProps;
|
|
53
|
+
type __VLS_Slots = {
|
|
54
|
+
/** Content of an option; the option element and its aria stay the list's own. */
|
|
55
|
+
item?(props: {
|
|
56
|
+
item: NexxtPickerItemData;
|
|
57
|
+
highlighted: boolean;
|
|
58
|
+
}): unknown;
|
|
59
|
+
/** Replaces the content of the empty state. */
|
|
60
|
+
empty?(props: {
|
|
61
|
+
search: string;
|
|
62
|
+
clear: () => void;
|
|
63
|
+
}): unknown;
|
|
64
|
+
};
|
|
65
|
+
type __VLS_ModelProps = {
|
|
66
|
+
/**
|
|
67
|
+
* Id of the highlighted item. The list owns the effective value: an id that is not visible, or
|
|
68
|
+
* `null` while items are visible, is replaced by the first enabled visible item right away.
|
|
69
|
+
*/
|
|
70
|
+
'highlighted'?: string | null;
|
|
71
|
+
};
|
|
72
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
73
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
74
|
+
focus: () => void;
|
|
75
|
+
move: (delta: number) => void;
|
|
76
|
+
highlightFirst: () => void;
|
|
77
|
+
highlightLast: () => void;
|
|
78
|
+
selectHighlighted: () => void;
|
|
79
|
+
/** DOM id of the listbox, for `aria-controls` on a field that drives it. */
|
|
80
|
+
listboxId: string;
|
|
81
|
+
/** DOM id of the highlighted option, for `aria-activedescendant` on a field that drives it. */
|
|
82
|
+
activeDescendantId: import('vue').ComputedRef<string | undefined>;
|
|
83
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
84
|
+
select: (item: NexxtPickerItemData) => any;
|
|
85
|
+
close: () => any;
|
|
86
|
+
clear: () => any;
|
|
87
|
+
highlight: (item: NexxtPickerItemData | null) => any;
|
|
88
|
+
"update:highlighted": (value: string | null) => any;
|
|
89
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
90
|
+
onSelect?: ((item: NexxtPickerItemData) => any) | undefined;
|
|
91
|
+
onClose?: (() => any) | undefined;
|
|
92
|
+
onClear?: (() => any) | undefined;
|
|
93
|
+
onHighlight?: ((item: NexxtPickerItemData | null) => any) | undefined;
|
|
94
|
+
"onUpdate:highlighted"?: ((value: string | null) => any) | undefined;
|
|
95
|
+
}>, {
|
|
96
|
+
search: string;
|
|
97
|
+
collapsible: boolean;
|
|
98
|
+
groups: NexxtPickerGroupData[];
|
|
99
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
100
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
101
|
+
declare const _default: typeof __VLS_export;
|
|
102
|
+
export default _default;
|
|
103
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
104
|
+
new (): {
|
|
105
|
+
$slots: S;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
@@ -20,11 +20,11 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {},
|
|
|
20
20
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
21
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
|
+
fullWidth: boolean;
|
|
23
24
|
matchWidth: boolean;
|
|
24
25
|
placeholder: string;
|
|
25
26
|
showAlpha: boolean;
|
|
26
27
|
formats: ColorFormat[];
|
|
27
|
-
fullWidth: boolean;
|
|
28
28
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
29
|
declare const _default: typeof __VLS_export;
|
|
30
30
|
export default _default;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { NexxtPickerGroupData, NexxtPickerItemData } from '../../molecules/PickerList/PickerList.vue';
|
|
2
|
+
interface NexxtPickerPanelProps {
|
|
3
|
+
/** All items; the search field filters them. */
|
|
4
|
+
items: NexxtPickerItemData[];
|
|
5
|
+
/** Groups in display order. Ungrouped items come first. */
|
|
6
|
+
groups?: NexxtPickerGroupData[];
|
|
7
|
+
/** Render the search field. Without it the listbox takes focus on mount. */
|
|
8
|
+
searchable?: boolean;
|
|
9
|
+
/** Placeholder of the search field. */
|
|
10
|
+
searchPlaceholder?: string;
|
|
11
|
+
/** Accessible name of the search field. Required for an accessible name; the placeholder is only a fallback. */
|
|
12
|
+
searchLabel?: string;
|
|
13
|
+
/** Accessible name of the panel (`role="group"`). Required for an accessible name. */
|
|
14
|
+
ariaLabel?: string;
|
|
15
|
+
/** Accessible name of the listbox. Required for an accessible name. */
|
|
16
|
+
listLabel?: string;
|
|
17
|
+
/** Panel width; a number is in pixels. The columns never shrink with it. */
|
|
18
|
+
width?: number | string;
|
|
19
|
+
/** Panel height; a number is in pixels. Clamped to `calc(100dvh - 5rem)`, and only the list gives way. */
|
|
20
|
+
height?: number | string;
|
|
21
|
+
/** Below this height of the column row (the panel minus the header), in pixels, the preview column is left out and the list takes the full width. */
|
|
22
|
+
hidePreviewBelow?: number;
|
|
23
|
+
/** Whether group headings fold their group. */
|
|
24
|
+
collapsible?: boolean;
|
|
25
|
+
/** Heading of the empty state, shown when the search has no results. */
|
|
26
|
+
emptyTitle?: string;
|
|
27
|
+
/** Line under the empty heading. A function receives the trimmed search term. */
|
|
28
|
+
emptyDescription?: string | ((search: string) => string);
|
|
29
|
+
/** Label of the button in the empty state that clears the search. Without it there is no button. */
|
|
30
|
+
clearLabel?: string;
|
|
31
|
+
/** Text in the preview frame while nothing is highlighted; the `preview-empty` slot replaces it. */
|
|
32
|
+
previewEmptyText?: string;
|
|
33
|
+
/** Text announced 500ms after the search changes, e.g. `(n) => \`${n} resultaten\``. */
|
|
34
|
+
resultsAnnouncement?: (count: number) => string;
|
|
35
|
+
}
|
|
36
|
+
type __VLS_Props = NexxtPickerPanelProps;
|
|
37
|
+
type __VLS_Slots = {
|
|
38
|
+
/** Above both columns, e.g. `NexxtTabs`. */
|
|
39
|
+
header?(): unknown;
|
|
40
|
+
/** Content of the preview frame for the highlighted item. */
|
|
41
|
+
preview?(props: {
|
|
42
|
+
item: NexxtPickerItemData;
|
|
43
|
+
}): unknown;
|
|
44
|
+
/** Replaces `previewEmptyText` in the preview frame. */
|
|
45
|
+
'preview-empty'?(): unknown;
|
|
46
|
+
/** Content of an option. */
|
|
47
|
+
item?(props: {
|
|
48
|
+
item: NexxtPickerItemData;
|
|
49
|
+
highlighted: boolean;
|
|
50
|
+
}): unknown;
|
|
51
|
+
/** Replaces the content of the empty search state. */
|
|
52
|
+
empty?(props: {
|
|
53
|
+
search: string;
|
|
54
|
+
clear: () => void;
|
|
55
|
+
}): unknown;
|
|
56
|
+
};
|
|
57
|
+
type __VLS_ModelProps = {
|
|
58
|
+
/** Id of the highlighted item; the list keeps it on a visible item. Drives the preview. */
|
|
59
|
+
'highlighted'?: string | null;
|
|
60
|
+
/** The search term. Bind it to reset or prefill the search; unbound, the panel keeps its own. */
|
|
61
|
+
'search'?: string;
|
|
62
|
+
};
|
|
63
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
64
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
65
|
+
focus: () => void;
|
|
66
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
67
|
+
select: (item: NexxtPickerItemData) => any;
|
|
68
|
+
close: () => any;
|
|
69
|
+
highlight: (item: NexxtPickerItemData | null) => any;
|
|
70
|
+
"update:highlighted": (value: string | null) => any;
|
|
71
|
+
"update:search": (value: string) => any;
|
|
72
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
73
|
+
onSelect?: ((item: NexxtPickerItemData) => any) | undefined;
|
|
74
|
+
onClose?: (() => any) | undefined;
|
|
75
|
+
onHighlight?: ((item: NexxtPickerItemData | null) => any) | undefined;
|
|
76
|
+
"onUpdate:highlighted"?: ((value: string | null) => any) | undefined;
|
|
77
|
+
"onUpdate:search"?: ((value: string) => any) | undefined;
|
|
78
|
+
}>, {
|
|
79
|
+
width: number | string;
|
|
80
|
+
collapsible: boolean;
|
|
81
|
+
groups: NexxtPickerGroupData[];
|
|
82
|
+
height: number | string;
|
|
83
|
+
searchable: boolean;
|
|
84
|
+
hidePreviewBelow: number;
|
|
85
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
86
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
87
|
+
declare const _default: typeof __VLS_export;
|
|
88
|
+
export default _default;
|
|
89
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
90
|
+
new (): {
|
|
91
|
+
$slots: S;
|
|
92
|
+
};
|
|
93
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export type { CustomIconName } from './components/atoms/Icon/customIcons';
|
|
|
7
7
|
export type { NexxtTabItem } from './components/molecules/Tabs/Tabs.vue';
|
|
8
8
|
export type { NexxtPageCardProps, NexxtPageCardSlots, } from './components/molecules/PageCard/PageCard.vue';
|
|
9
9
|
export type { NexxtPageMockupType } from './components/molecules/PageMockup/PageMockup.vue';
|
|
10
|
+
export type { NexxtPickerGroupData, NexxtPickerItemData, } from './components/molecules/PickerList/PickerList.vue';
|
|
10
11
|
export type { NexxtTreeNode, NexxtTreeProps, NexxtTreeSlots, } from './components/molecules/Tree/Tree.vue';
|
|
11
12
|
export type { NexxtPlaceholderGroup, NexxtPlaceholderInputMessages, NexxtPlaceholderInputProps, } from './components/molecules/PlaceholderInput/PlaceholderInput.vue';
|
|
12
13
|
export type { EditorAlignItemsMessages, EditorAlignItemsValue, } from './components/editor/molecules/EditorAlignItems/EditorAlignItems.vue';
|
|
@@ -16,6 +17,7 @@ export type { EditorGapMessages, EditorGapValue, } from './components/editor/mol
|
|
|
16
17
|
export type { EditorColorMessages, EditorColorProperty, EditorColorValue, } from './components/editor/molecules/EditorColor/EditorColor.vue';
|
|
17
18
|
export type { EditorBorderMessages, EditorBorderWidth, } from './components/editor/molecules/EditorBorder/EditorBorder.vue';
|
|
18
19
|
export type { EditorHeadingTypeMessages, EditorHeadingTypeValue, } from './components/editor/molecules/EditorHeadingType/EditorHeadingType.vue';
|
|
20
|
+
export { EDITOR_RADIUS_STEPS } from './components/editor/molecules/EditorRadius/EditorRadius.vue';
|
|
19
21
|
export type { EditorRadiusMessages, EditorRadiusValue, } from './components/editor/molecules/EditorRadius/EditorRadius.vue';
|
|
20
22
|
export type { EditorTextAlignMessages, EditorTextAlignValue, } from './components/editor/molecules/EditorTextAlign/EditorTextAlign.vue';
|
|
21
23
|
export type { EditorJustifyContentMessages, EditorJustifyContentValue, } from './components/editor/molecules/EditorJustifyContent/EditorJustifyContent.vue';
|
|
@@ -68,6 +70,11 @@ export { default as NexxtPageContainer } from './components/molecules/PageContai
|
|
|
68
70
|
export { default as NexxtPageMockup } from './components/molecules/PageMockup/PageMockup.vue';
|
|
69
71
|
export { default as NexxtPageTypeTile } from './components/molecules/PageTypeTile/PageTypeTile.vue';
|
|
70
72
|
export { default as NexxtPagination } from './components/molecules/Pagination/Pagination.vue';
|
|
73
|
+
export { default as NexxtPickerGroup } from './components/molecules/PickerGroup/PickerGroup.vue';
|
|
74
|
+
export { default as NexxtPickerItem } from './components/atoms/PickerItem/PickerItem.vue';
|
|
75
|
+
export { default as NexxtPickerList } from './components/molecules/PickerList/PickerList.vue';
|
|
76
|
+
export { default as NexxtPickerPanel } from './components/organisms/PickerPanel/PickerPanel.vue';
|
|
77
|
+
export { default as NexxtPickerPreview } from './components/atoms/PickerPreview/PickerPreview.vue';
|
|
71
78
|
export { default as NexxtPlaceholderInput } from './components/molecules/PlaceholderInput/PlaceholderInput.vue';
|
|
72
79
|
export { default as NexxtPresenceIndicator } from './components/atoms/PresenceIndicator/PresenceIndicator.vue';
|
|
73
80
|
export { default as NexxtProgressBar } from './components/organisms/ProgressBar/ProgressBar.vue';
|