@nexxtmove/ui 1.39.0 → 1.40.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.
@@ -0,0 +1,24 @@
1
+ import { ComboboxOption } from './combobox-types';
2
+ /** A run of options in the listbox; `label` is set for a titled group only. */
3
+ export type OptionSection = {
4
+ id: string;
5
+ label?: string;
6
+ options: ComboboxOption[];
7
+ };
8
+ export interface ComboboxPanelOptionsProps {
9
+ /** Visible options per section. An untitled section renders its options straight into the list. */
10
+ sections: OptionSection[];
11
+ /** Selected values. */
12
+ selected: (string | number)[];
13
+ /** Marks the selected option with a tint and a check. */
14
+ singleSelect?: boolean;
15
+ /** Inline layout (inside `NexxtCombobox`): rows get a minimum width. */
16
+ inline?: boolean;
17
+ }
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ declare const __VLS_export: import('vue').DefineComponent<ComboboxPanelOptionsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
+ pick: (option: ComboboxOption) => any;
22
+ }, string, import('vue').PublicProps, Readonly<ComboboxPanelOptionsProps> & Readonly<{
23
+ onPick?: ((option: ComboboxOption) => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -2,6 +2,16 @@ export type ComboboxOption = string | {
2
2
  label: string;
3
3
  value: string | number;
4
4
  };
5
+ /**
6
+ * A titled group of options. Option values must be unique across **all** groups: selection is
7
+ * stored by value only, so a value that appears twice cannot tell its groups apart.
8
+ */
9
+ export type NexxtComboboxGroup = {
10
+ /** Heading shown above the group, and the accessible name of its `role="group"`. */
11
+ label: string;
12
+ /** The options of this group. */
13
+ options: ComboboxOption[];
14
+ };
5
15
  export type ComboboxOptions = {
6
16
  options: string[];
7
17
  allowNew?: boolean;
@@ -11,4 +21,11 @@ export type ComboboxOptions = {
11
21
  value: string | number;
12
22
  }[];
13
23
  allowNew?: never;
24
+ } | {
25
+ /**
26
+ * Options in titled groups. Values must be unique across all groups. Groups cannot be
27
+ * combined with `allowNew`.
28
+ */
29
+ options: NexxtComboboxGroup[];
30
+ allowNew?: never;
14
31
  };
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export type { EnergyLabelLetter } from './components/atoms/EnergyLabel/EnergyLab
5
5
  export type { IconType, NexxtIconName } from './components/atoms/Icon/Icon.vue';
6
6
  export type { CustomIconName } from './components/atoms/Icon/customIcons';
7
7
  export type { NexxtTabItem } from './components/molecules/Tabs/Tabs.vue';
8
+ export type { NexxtComboboxGroup } from './components/organisms/ComboboxPanel/combobox-types';
8
9
  export type { NexxtPageCardProps, NexxtPageCardSlots, } from './components/molecules/PageCard/PageCard.vue';
9
10
  export type { NexxtPageMockupType } from './components/molecules/PageMockup/PageMockup.vue';
10
11
  export type { NexxtPickerGroupData, NexxtPickerItemData, } from './components/molecules/PickerList/PickerList.vue';