@mantine-vue/spotlight 3.0.0 → 3.1.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.
Files changed (42) hide show
  1. package/cjs/index.cjs +570 -624
  2. package/cjs/index.cjs.map +1 -1
  3. package/esm/index.mjs +571 -625
  4. package/esm/index.mjs.map +1 -1
  5. package/lib/components/Spotlight/Spotlight.types.d.ts +34 -0
  6. package/lib/components/Spotlight/Spotlight.vue.d.ts +15 -0
  7. package/lib/components/Spotlight/index.d.ts +224 -0
  8. package/lib/components/SpotlightAction/SpotlightAction.types.d.ts +34 -0
  9. package/lib/components/SpotlightAction/SpotlightAction.vue.d.ts +11 -0
  10. package/lib/components/SpotlightAction/index.d.ts +18 -0
  11. package/lib/components/SpotlightActionsGroup/SpotlightActionsGroup.types.d.ts +13 -0
  12. package/lib/components/SpotlightActionsGroup/SpotlightActionsGroup.vue.d.ts +13 -0
  13. package/lib/components/SpotlightActionsGroup/index.d.ts +20 -0
  14. package/lib/components/SpotlightActionsList/SpotlightActionsList.types.d.ts +13 -0
  15. package/lib/components/SpotlightActionsList/SpotlightActionsList.vue.d.ts +13 -0
  16. package/lib/components/SpotlightActionsList/index.d.ts +20 -0
  17. package/lib/components/SpotlightEmpty/SpotlightEmpty.types.d.ts +11 -0
  18. package/lib/components/SpotlightEmpty/SpotlightEmpty.vue.d.ts +13 -0
  19. package/lib/components/SpotlightEmpty/index.d.ts +20 -0
  20. package/lib/components/SpotlightFooter/SpotlightFooter.types.d.ts +11 -0
  21. package/lib/components/SpotlightFooter/SpotlightFooter.vue.d.ts +13 -0
  22. package/lib/components/SpotlightFooter/index.d.ts +20 -0
  23. package/lib/components/SpotlightRoot/SpotlightRoot.types.d.ts +53 -0
  24. package/lib/components/SpotlightRoot/SpotlightRoot.vue.d.ts +23 -0
  25. package/lib/components/SpotlightRoot/index.d.ts +48 -0
  26. package/lib/components/SpotlightSearch/SpotlightSearch.types.d.ts +25 -0
  27. package/lib/components/SpotlightSearch/SpotlightSearch.vue.d.ts +11 -0
  28. package/lib/components/SpotlightSearch/index.d.ts +36 -0
  29. package/lib/default-spotlight-filter.d.ts +1 -1
  30. package/lib/index.d.mts +16 -9
  31. package/lib/index.d.ts +16 -9
  32. package/lib/is-actions-group.d.ts +1 -1
  33. package/lib/limit-actions.d.ts +1 -1
  34. package/package.json +4 -4
  35. package/lib/Spotlight.d.ts +0 -934
  36. package/lib/SpotlightAction.d.ts +0 -134
  37. package/lib/SpotlightActionsGroup.d.ts +0 -50
  38. package/lib/SpotlightActionsList.d.ts +0 -50
  39. package/lib/SpotlightEmpty.d.ts +0 -40
  40. package/lib/SpotlightFooter.d.ts +0 -40
  41. package/lib/SpotlightRoot.d.ts +0 -192
  42. package/lib/SpotlightSearch.d.ts +0 -81
@@ -0,0 +1,34 @@
1
+ import type { VNodeChild } from 'vue';
2
+ import type { MantineNode, SectionSlots } from '@mantine-vue/core';
3
+ export type SpotlightActionStylesNames = 'action' | 'actionLabel' | 'actionDescription' | 'actionSection' | 'actionBody';
4
+ export interface SpotlightActionSlots extends SectionSlots {
5
+ default?: () => VNodeChild;
6
+ }
7
+ /** Props accepted by `SpotlightAction`. */
8
+ export interface SpotlightActionProps {
9
+ /** Action label, pass string to use in default filter. */
10
+ label?: string;
11
+ /** Action description, pass string to use in default filter. */
12
+ description?: string;
13
+ /** Section displayed on the left side of the label, for example, icon. */
14
+ leftSection?: MantineNode;
15
+ /** Section displayed on the right side of the label, for example, hotkey. */
16
+ rightSection?: MantineNode;
17
+ /** Determines whether left and right sections should have dimmed styles. @default true */
18
+ dimmedSections?: boolean;
19
+ /** Determines whether search query should be highlighted in action label. @default false */
20
+ highlightQuery?: boolean;
21
+ /** Key of `theme.colors` or any valid CSS color that will be used to highlight search query. @default 'yellow' */
22
+ highlightColor?: string;
23
+ /** Determines whether the spotlight should be closed when action is triggered, overrides `closeOnActionTrigger` prop set on `Spotlight`. */
24
+ closeSpotlightOnTrigger?: boolean;
25
+ /** Keywords that are used for default filtering, not displayed anywhere, can be a string: "react,router,javascript" or an array: ['react', 'router', 'javascript']. */
26
+ keywords?: string | string[];
27
+ /** CSS classes applied to component elements. */
28
+ classNames?: Record<string, any>;
29
+ /** Inline styles applied to component elements. */
30
+ styles?: Record<string, any>;
31
+ /** CSS variables applied to component elements. */
32
+ vars?: Record<string, any>;
33
+ [key: string]: any;
34
+ }
@@ -0,0 +1,11 @@
1
+ import type { SpotlightActionSlots } from './SpotlightAction.types';
2
+ type __VLS_Slots = SpotlightActionSlots;
3
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
7
+ type __VLS_WithSlots<T, S> = T & {
8
+ new (): {
9
+ $slots: S;
10
+ };
11
+ };
@@ -0,0 +1,18 @@
1
+ export declare const SpotlightAction: {
2
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
3
+ P: {};
4
+ B: {};
5
+ D: {};
6
+ C: {};
7
+ M: {};
8
+ Defaults: {};
9
+ }, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
10
+ __isFragment?: never;
11
+ __isTeleport?: never;
12
+ __isSuspense?: never;
13
+ } & import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
14
+ $slots: import("./SpotlightAction.types").SpotlightActionSlots;
15
+ }) & {
16
+ classes: Record<string, string>;
17
+ };
18
+ export type { SpotlightActionProps, SpotlightActionSlots, SpotlightActionStylesNames, } from './SpotlightAction.types';
@@ -0,0 +1,13 @@
1
+ export type SpotlightActionsGroupStylesNames = 'actionsGroup';
2
+ /** Props accepted by `SpotlightActionsGroup`. */
3
+ export interface SpotlightActionsGroupProps {
4
+ /** Group label. */
5
+ label?: string;
6
+ /** CSS classes applied to component elements. */
7
+ classNames?: Record<string, any>;
8
+ /** Inline styles applied to component elements. */
9
+ styles?: Record<string, any>;
10
+ /** CSS variables applied to component elements. */
11
+ vars?: Record<string, any>;
12
+ [key: string]: any;
13
+ }
@@ -0,0 +1,13 @@
1
+ declare var __VLS_8: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_8) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,20 @@
1
+ export declare const SpotlightActionsGroup: {
2
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
3
+ P: {};
4
+ B: {};
5
+ D: {};
6
+ C: {};
7
+ M: {};
8
+ Defaults: {};
9
+ }, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
10
+ __isFragment?: never;
11
+ __isTeleport?: never;
12
+ __isSuspense?: never;
13
+ } & import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
14
+ $slots: {
15
+ default?: (props: {}) => any;
16
+ };
17
+ }) & {
18
+ classes: Record<string, string>;
19
+ };
20
+ export type { SpotlightActionsGroupProps, SpotlightActionsGroupStylesNames, } from './SpotlightActionsGroup.types';
@@ -0,0 +1,13 @@
1
+ export type SpotlightActionsListStylesNames = 'actionsList' | 'actionsListInner';
2
+ /** Props accepted by `SpotlightActionsList`. */
3
+ export interface SpotlightActionsListProps {
4
+ /** Actions-list id used by keyboard navigation. */
5
+ id?: string;
6
+ /** CSS classes applied to component elements. */
7
+ classNames?: Record<string, any>;
8
+ /** Inline styles applied to component elements. */
9
+ styles?: Record<string, any>;
10
+ /** CSS variables applied to component elements. */
11
+ vars?: Record<string, any>;
12
+ [key: string]: any;
13
+ }
@@ -0,0 +1,13 @@
1
+ declare var __VLS_8: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_8) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,20 @@
1
+ export declare const SpotlightActionsList: {
2
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
3
+ P: {};
4
+ B: {};
5
+ D: {};
6
+ C: {};
7
+ M: {};
8
+ Defaults: {};
9
+ }, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
10
+ __isFragment?: never;
11
+ __isTeleport?: never;
12
+ __isSuspense?: never;
13
+ } & import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
14
+ $slots: {
15
+ default?: (props: {}) => any;
16
+ };
17
+ }) & {
18
+ classes: Record<string, string>;
19
+ };
20
+ export type { SpotlightActionsListProps, SpotlightActionsListStylesNames, } from './SpotlightActionsList.types';
@@ -0,0 +1,11 @@
1
+ export type SpotlightEmptyStylesNames = 'empty';
2
+ /** Props accepted by `SpotlightEmpty`. */
3
+ export interface SpotlightEmptyProps {
4
+ /** CSS classes applied to component elements. */
5
+ classNames?: Record<string, any>;
6
+ /** Inline styles applied to component elements. */
7
+ styles?: Record<string, any>;
8
+ /** CSS variables applied to component elements. */
9
+ vars?: Record<string, any>;
10
+ [key: string]: any;
11
+ }
@@ -0,0 +1,13 @@
1
+ declare var __VLS_8: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_8) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,20 @@
1
+ export declare const SpotlightEmpty: {
2
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
3
+ P: {};
4
+ B: {};
5
+ D: {};
6
+ C: {};
7
+ M: {};
8
+ Defaults: {};
9
+ }, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
10
+ __isFragment?: never;
11
+ __isTeleport?: never;
12
+ __isSuspense?: never;
13
+ } & import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
14
+ $slots: {
15
+ default?: (props: {}) => any;
16
+ };
17
+ }) & {
18
+ classes: Record<string, string>;
19
+ };
20
+ export type { SpotlightEmptyProps, SpotlightEmptyStylesNames } from './SpotlightEmpty.types';
@@ -0,0 +1,11 @@
1
+ export type SpotlightFooterStylesNames = 'footer';
2
+ /** Props accepted by `SpotlightFooter`. */
3
+ export interface SpotlightFooterProps {
4
+ /** CSS classes applied to component elements. */
5
+ classNames?: Record<string, any>;
6
+ /** Inline styles applied to component elements. */
7
+ styles?: Record<string, any>;
8
+ /** CSS variables applied to component elements. */
9
+ vars?: Record<string, any>;
10
+ [key: string]: any;
11
+ }
@@ -0,0 +1,13 @@
1
+ declare var __VLS_8: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_8) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,20 @@
1
+ export declare const SpotlightFooter: {
2
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
3
+ P: {};
4
+ B: {};
5
+ D: {};
6
+ C: {};
7
+ M: {};
8
+ Defaults: {};
9
+ }, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
10
+ __isFragment?: never;
11
+ __isTeleport?: never;
12
+ __isSuspense?: never;
13
+ } & import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
14
+ $slots: {
15
+ default?: (props: {}) => any;
16
+ };
17
+ }) & {
18
+ classes: Record<string, string>;
19
+ };
20
+ export type { SpotlightFooterProps, SpotlightFooterStylesNames } from './SpotlightFooter.types';
@@ -0,0 +1,53 @@
1
+ import type { VNodeChild } from 'vue';
2
+ import type { SpotlightStore } from '../../spotlight.store';
3
+ export type SpotlightRootStylesNames = 'root' | 'body' | 'close' | 'content' | 'header' | 'inner' | 'overlay' | 'title' | 'search' | 'actionsList' | 'actionsListInner' | 'action' | 'empty' | 'footer' | 'actionBody' | 'actionLabel' | 'actionDescription' | 'actionSection' | 'actionsGroup';
4
+ export interface SpotlightRootSlots {
5
+ default?: () => VNodeChild;
6
+ }
7
+ /** Props accepted by `SpotlightRoot`. */
8
+ export interface SpotlightRootProps {
9
+ /** Spotlight store, can be used to create multiple instances of spotlight. */
10
+ store?: SpotlightStore;
11
+ /** Controlled Spotlight search query. */
12
+ query?: string;
13
+ /** Determines whether the search query should be cleared when the spotlight is closed. @default true */
14
+ clearQueryOnClose?: boolean;
15
+ /** Keyboard shortcut or a list of shortcuts to trigger spotlight. @default 'mod + K' */
16
+ shortcut?: string | string[] | null;
17
+ /** A list of tags which when focused will be ignored by shortcut. @default ['input', 'textarea', 'select'] */
18
+ tagsToIgnore?: string[];
19
+ /** Determines whether shortcut should trigger based in contentEditable. @default false */
20
+ triggerOnContentEditable?: boolean;
21
+ /** If set, spotlight will not be rendered. */
22
+ disabled?: boolean;
23
+ /** Forces opened state, useful for tests. */
24
+ forceOpened?: boolean;
25
+ /** Determines whether spotlight should be closed when one of the actions is triggered. @default true */
26
+ closeOnActionTrigger?: boolean;
27
+ /** Spotlight content max-height. Ignored unless `scrollable` prop is set. @default 400 */
28
+ maxHeight?: string | number;
29
+ /** Determines whether the actions list should be scrollable. If not set, `maxHeight` is ignored. @default false */
30
+ scrollable?: boolean;
31
+ /** CSS classes applied to component elements. */
32
+ classNames?: Record<string, any>;
33
+ /** Inline styles applied to component elements. */
34
+ styles?: Record<string, any>;
35
+ /** CSS variables applied to component elements. */
36
+ vars?: Record<string, any>;
37
+ /** If set, all Mantine classes are removed from component elements. @default false */
38
+ unstyled?: boolean;
39
+ [key: string]: any;
40
+ }
41
+ /** Events emitted by `SpotlightRoot`. */
42
+ export interface SpotlightRootEmits {
43
+ /** Emitted when the search query changes. */
44
+ 'update:query': [query: string];
45
+ /** Emitted when the search query changes. */
46
+ 'query-change': [query: string];
47
+ /** Emitted when spotlight opens. */
48
+ 'spotlight-open': [];
49
+ /** Emitted when spotlight closes. */
50
+ 'spotlight-close': [];
51
+ /** Emitted when the spotlight exit transition finishes. */
52
+ 'exit-transition-end': [];
53
+ }
@@ -0,0 +1,23 @@
1
+ import type { SpotlightRootSlots } from './SpotlightRoot.types';
2
+ type __VLS_Slots = SpotlightRootSlots;
3
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ "update:query": (query: string) => any;
5
+ "query-change": (query: string) => any;
6
+ "spotlight-open": () => any;
7
+ "spotlight-close": () => any;
8
+ "exit-transition-end": () => any;
9
+ }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
10
+ "onUpdate:query"?: ((query: string) => any) | undefined;
11
+ "onQuery-change"?: ((query: string) => any) | undefined;
12
+ "onSpotlight-open"?: (() => any) | undefined;
13
+ "onSpotlight-close"?: (() => any) | undefined;
14
+ "onExit-transition-end"?: (() => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,48 @@
1
+ export declare const SpotlightRoot: {
2
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
3
+ "onUpdate:query"?: ((query: string) => any) | undefined;
4
+ "onQuery-change"?: ((query: string) => any) | undefined;
5
+ "onSpotlight-open"?: (() => any) | undefined;
6
+ "onSpotlight-close"?: (() => any) | undefined;
7
+ "onExit-transition-end"?: (() => any) | undefined;
8
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:query": (query: string) => any;
10
+ "query-change": (query: string) => any;
11
+ "spotlight-open": () => any;
12
+ "spotlight-close": () => any;
13
+ "exit-transition-end": () => any;
14
+ }, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
15
+ P: {};
16
+ B: {};
17
+ D: {};
18
+ C: {};
19
+ M: {};
20
+ Defaults: {};
21
+ }, Readonly<{}> & Readonly<{
22
+ "onUpdate:query"?: ((query: string) => any) | undefined;
23
+ "onQuery-change"?: ((query: string) => any) | undefined;
24
+ "onSpotlight-open"?: (() => any) | undefined;
25
+ "onSpotlight-close"?: (() => any) | undefined;
26
+ "onExit-transition-end"?: (() => any) | undefined;
27
+ }>, {}, {}, {}, {}, {}>;
28
+ __isFragment?: never;
29
+ __isTeleport?: never;
30
+ __isSuspense?: never;
31
+ } & import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{
32
+ "onUpdate:query"?: ((query: string) => any) | undefined;
33
+ "onQuery-change"?: ((query: string) => any) | undefined;
34
+ "onSpotlight-open"?: (() => any) | undefined;
35
+ "onSpotlight-close"?: (() => any) | undefined;
36
+ "onExit-transition-end"?: (() => any) | undefined;
37
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
38
+ "update:query": (query: string) => any;
39
+ "query-change": (query: string) => any;
40
+ "spotlight-open": () => any;
41
+ "spotlight-close": () => any;
42
+ "exit-transition-end": () => any;
43
+ }, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
44
+ $slots: import("./SpotlightRoot.types").SpotlightRootSlots;
45
+ }) & {
46
+ classes: Record<string, string>;
47
+ };
48
+ export type { SpotlightRootEmits, SpotlightRootProps, SpotlightRootSlots, SpotlightRootStylesNames, } from './SpotlightRoot.types';
@@ -0,0 +1,25 @@
1
+ import type { InputFactory, Vars } from '@mantine-vue/core';
2
+ export type SpotlightSearchStylesNames = 'input' | 'wrapper' | 'section' | 'bottomSection';
3
+ /** Props accepted by `SpotlightSearch`. */
4
+ export interface SpotlightSearchProps {
5
+ /** Input size @default 'lg' */
6
+ size?: string | number;
7
+ /** Controlled input value. */
8
+ modelValue?: string;
9
+ /** CSS classes applied to component elements. */
10
+ classNames?: Record<string, any>;
11
+ /** Inline styles applied to component elements. */
12
+ styles?: Record<string, any>;
13
+ /** CSS variables applied to component elements. Keyed to `Input`, which this renders. */
14
+ vars?: Vars<InputFactory>;
15
+ [key: string]: any;
16
+ }
17
+ /** Events emitted by `SpotlightSearch`. */
18
+ export interface SpotlightSearchEmits {
19
+ /** Emitted when the search input changes. */
20
+ 'update:modelValue': [value: string];
21
+ /** Emitted when the search input changes. */
22
+ change: [value: string];
23
+ /** Emitted when a key is pressed. */
24
+ keydown: [event: KeyboardEvent];
25
+ }
@@ -0,0 +1,11 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2
+ change: (value: string) => any;
3
+ keydown: (event: KeyboardEvent) => any;
4
+ "update:modelValue": (value: string) => any;
5
+ }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
6
+ onChange?: ((value: string) => any) | undefined;
7
+ onKeydown?: ((event: KeyboardEvent) => any) | undefined;
8
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -0,0 +1,36 @@
1
+ export declare const SpotlightSearch: {
2
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
3
+ onChange?: ((value: string) => any) | undefined;
4
+ onKeydown?: ((event: KeyboardEvent) => any) | undefined;
5
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
6
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ change: (value: string) => any;
8
+ keydown: (event: KeyboardEvent) => any;
9
+ "update:modelValue": (value: string) => any;
10
+ }, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
11
+ P: {};
12
+ B: {};
13
+ D: {};
14
+ C: {};
15
+ M: {};
16
+ Defaults: {};
17
+ }, Readonly<{}> & Readonly<{
18
+ onChange?: ((value: string) => any) | undefined;
19
+ onKeydown?: ((event: KeyboardEvent) => any) | undefined;
20
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
21
+ }>, {}, {}, {}, {}, {}>;
22
+ __isFragment?: never;
23
+ __isTeleport?: never;
24
+ __isSuspense?: never;
25
+ } & import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{
26
+ onChange?: ((value: string) => any) | undefined;
27
+ onKeydown?: ((event: KeyboardEvent) => any) | undefined;
28
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
29
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
30
+ change: (value: string) => any;
31
+ keydown: (event: KeyboardEvent) => any;
32
+ "update:modelValue": (value: string) => any;
33
+ }, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
34
+ classes: Record<string, string>;
35
+ };
36
+ export type { SpotlightSearchEmits, SpotlightSearchProps, SpotlightSearchStylesNames, } from './SpotlightSearch.types';
@@ -1,2 +1,2 @@
1
- import type { SpotlightFilterFunction } from './Spotlight';
1
+ import type { SpotlightFilterFunction } from './components/Spotlight/Spotlight.types';
2
2
  export declare const defaultSpotlightFilter: SpotlightFilterFunction;
package/lib/index.d.mts CHANGED
@@ -1,12 +1,19 @@
1
1
  export { spotlight, createSpotlight, createSpotlightStore, useSpotlight, openSpotlight, closeSpotlight, toggleSpotlight, } from './spotlight.store';
2
2
  export type { SpotlightState, SpotlightStore } from './spotlight.store';
3
3
  export { isActionsGroup } from './is-actions-group';
4
- export { Spotlight } from './Spotlight';
5
- export { SpotlightRoot } from './SpotlightRoot';
6
- export { SpotlightAction } from './SpotlightAction';
7
- export { SpotlightActionsGroup } from './SpotlightActionsGroup';
8
- export { SpotlightActionsList } from './SpotlightActionsList';
9
- export { SpotlightEmpty } from './SpotlightEmpty';
10
- export { SpotlightFooter } from './SpotlightFooter';
11
- export { SpotlightSearch } from './SpotlightSearch';
12
- export type { SpotlightActionData, SpotlightActionGroupData, SpotlightActions, SpotlightActionProps, SpotlightActionStylesNames, SpotlightActionsGroupProps, SpotlightActionsGroupStylesNames, SpotlightActionsListProps, SpotlightActionsListStylesNames, SpotlightEmptyProps, SpotlightEmptyStylesNames, SpotlightFilterFunction, SpotlightFooterProps, SpotlightFooterStylesNames, SpotlightProps, SpotlightRootProps, SpotlightRootStylesNames, SpotlightSearchProps, SpotlightSearchStylesNames, SpotlightStylesNames, } from './Spotlight';
4
+ export { Spotlight } from './components/Spotlight';
5
+ export { SpotlightRoot } from './components/SpotlightRoot';
6
+ export { SpotlightAction } from './components/SpotlightAction';
7
+ export { SpotlightActionsGroup } from './components/SpotlightActionsGroup';
8
+ export { SpotlightActionsList } from './components/SpotlightActionsList';
9
+ export { SpotlightEmpty } from './components/SpotlightEmpty';
10
+ export { SpotlightFooter } from './components/SpotlightFooter';
11
+ export { SpotlightSearch } from './components/SpotlightSearch';
12
+ export type { SpotlightActionData, SpotlightActionGroupData, SpotlightActions, SpotlightEmits, SpotlightFilterFunction, SpotlightProps, SpotlightStylesNames, } from './components/Spotlight';
13
+ export type { SpotlightActionProps, SpotlightActionStylesNames } from './components/SpotlightAction';
14
+ export type { SpotlightActionsGroupProps, SpotlightActionsGroupStylesNames, } from './components/SpotlightActionsGroup';
15
+ export type { SpotlightActionsListProps, SpotlightActionsListStylesNames, } from './components/SpotlightActionsList';
16
+ export type { SpotlightEmptyProps, SpotlightEmptyStylesNames } from './components/SpotlightEmpty';
17
+ export type { SpotlightFooterProps, SpotlightFooterStylesNames } from './components/SpotlightFooter';
18
+ export type { SpotlightRootEmits, SpotlightRootProps, SpotlightRootStylesNames, } from './components/SpotlightRoot';
19
+ export type { SpotlightSearchEmits, SpotlightSearchProps, SpotlightSearchStylesNames, } from './components/SpotlightSearch';
package/lib/index.d.ts CHANGED
@@ -1,12 +1,19 @@
1
1
  export { spotlight, createSpotlight, createSpotlightStore, useSpotlight, openSpotlight, closeSpotlight, toggleSpotlight, } from './spotlight.store';
2
2
  export type { SpotlightState, SpotlightStore } from './spotlight.store';
3
3
  export { isActionsGroup } from './is-actions-group';
4
- export { Spotlight } from './Spotlight';
5
- export { SpotlightRoot } from './SpotlightRoot';
6
- export { SpotlightAction } from './SpotlightAction';
7
- export { SpotlightActionsGroup } from './SpotlightActionsGroup';
8
- export { SpotlightActionsList } from './SpotlightActionsList';
9
- export { SpotlightEmpty } from './SpotlightEmpty';
10
- export { SpotlightFooter } from './SpotlightFooter';
11
- export { SpotlightSearch } from './SpotlightSearch';
12
- export type { SpotlightActionData, SpotlightActionGroupData, SpotlightActions, SpotlightActionProps, SpotlightActionStylesNames, SpotlightActionsGroupProps, SpotlightActionsGroupStylesNames, SpotlightActionsListProps, SpotlightActionsListStylesNames, SpotlightEmptyProps, SpotlightEmptyStylesNames, SpotlightFilterFunction, SpotlightFooterProps, SpotlightFooterStylesNames, SpotlightProps, SpotlightRootProps, SpotlightRootStylesNames, SpotlightSearchProps, SpotlightSearchStylesNames, SpotlightStylesNames, } from './Spotlight';
4
+ export { Spotlight } from './components/Spotlight';
5
+ export { SpotlightRoot } from './components/SpotlightRoot';
6
+ export { SpotlightAction } from './components/SpotlightAction';
7
+ export { SpotlightActionsGroup } from './components/SpotlightActionsGroup';
8
+ export { SpotlightActionsList } from './components/SpotlightActionsList';
9
+ export { SpotlightEmpty } from './components/SpotlightEmpty';
10
+ export { SpotlightFooter } from './components/SpotlightFooter';
11
+ export { SpotlightSearch } from './components/SpotlightSearch';
12
+ export type { SpotlightActionData, SpotlightActionGroupData, SpotlightActions, SpotlightEmits, SpotlightFilterFunction, SpotlightProps, SpotlightStylesNames, } from './components/Spotlight';
13
+ export type { SpotlightActionProps, SpotlightActionStylesNames } from './components/SpotlightAction';
14
+ export type { SpotlightActionsGroupProps, SpotlightActionsGroupStylesNames, } from './components/SpotlightActionsGroup';
15
+ export type { SpotlightActionsListProps, SpotlightActionsListStylesNames, } from './components/SpotlightActionsList';
16
+ export type { SpotlightEmptyProps, SpotlightEmptyStylesNames } from './components/SpotlightEmpty';
17
+ export type { SpotlightFooterProps, SpotlightFooterStylesNames } from './components/SpotlightFooter';
18
+ export type { SpotlightRootEmits, SpotlightRootProps, SpotlightRootStylesNames, } from './components/SpotlightRoot';
19
+ export type { SpotlightSearchEmits, SpotlightSearchProps, SpotlightSearchStylesNames, } from './components/SpotlightSearch';
@@ -1,2 +1,2 @@
1
- import type { SpotlightActionData, SpotlightActionGroupData } from './Spotlight';
1
+ import type { SpotlightActionData, SpotlightActionGroupData } from './components/Spotlight/Spotlight.types';
2
2
  export declare function isActionsGroup(item: SpotlightActionData | SpotlightActionGroupData): item is SpotlightActionGroupData;
@@ -1,2 +1,2 @@
1
- import type { SpotlightActions } from './Spotlight';
1
+ import type { SpotlightActions } from './components/Spotlight/Spotlight.types';
2
2
  export declare function limitActions(actions: SpotlightActions[], limit: number): SpotlightActions[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantine-vue/spotlight",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Vue command center components equivalent to @mantine/spotlight",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -36,9 +36,9 @@
36
36
  "vue": "^3.5.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "@mantine-vue/core": "3.0.0",
40
- "@mantine-vue/hooks": "3.0.0",
41
- "@mantine-vue/store": "3.0.0",
39
+ "@mantine-vue/core": "3.1.0",
40
+ "@mantine-vue/hooks": "3.1.0",
41
+ "@mantine-vue/store": "3.1.0",
42
42
  "vue": "^3.5.0"
43
43
  }
44
44
  }