@mantine/spotlight 9.2.1 → 9.2.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpotlightRoot.cjs","names":["spotlightStore","useSpotlight","getHotkeys","SpotlightProvider","Modal","spotlightActions","classes"],"sources":["../src/SpotlightRoot.tsx"],"sourcesContent":["import {\n factory,\n Factory,\n getDefaultZIndex,\n Modal,\n ModalProps,\n ModalStylesNames,\n rem,\n StylesApiProps,\n useProps,\n useResolvedStylesApi,\n useStyles,\n} from '@mantine/core';\nimport { useDidUpdate, useHotkeys } from '@mantine/hooks';\nimport { getHotkeys } from './get-hotkeys';\nimport { SpotlightProvider } from './Spotlight.context';\nimport { spotlightActions, SpotlightStore, spotlightStore, useSpotlight } from './spotlight.store';\nimport classes from './Spotlight.module.css';\n\nexport type SpotlightRootStylesNames =\n | ModalStylesNames\n | 'search'\n | 'actionsList'\n | 'action'\n | 'empty'\n | 'footer'\n | 'actionBody'\n | 'actionLabel'\n | 'actionDescription'\n | 'actionSection'\n | 'actionsGroup';\n\nexport interface SpotlightRootProps\n extends\n StylesApiProps<SpotlightRootFactory>,\n Omit<\n ModalProps,\n | 'styles'\n | 'classNames'\n | 'vars'\n | 'variant'\n | 'opened'\n | 'onClose'\n | 'closeButtonProps'\n | 'withCloseButton'\n > {\n /** Spotlight store, can be used to create multiple instances of spotlight */\n store?: SpotlightStore;\n\n /** Controlled Spotlight search query */\n query?: string;\n\n /** Called when query changes */\n onQueryChange?: (query: string) => void;\n\n /** Determines whether the search query should be cleared when the spotlight is closed @default true */\n clearQueryOnClose?: boolean;\n\n /** Keyboard shortcut or a list of shortcuts to trigger spotlight @default 'mod + K' */\n shortcut?: string | string[] | null;\n\n /** A list of tags which when focused will be ignored by shortcut @default ['input', 'textarea', 'select'] */\n tagsToIgnore?: string[];\n\n /** Determines whether shortcut should trigger based in contentEditable @default false */\n triggerOnContentEditable?: boolean;\n\n /** If set, spotlight will not be rendered */\n disabled?: boolean;\n\n /** Called when spotlight opens */\n onSpotlightOpen?: () => void;\n\n /** Called when spotlight closes */\n onSpotlightClose?: () => void;\n\n /** Forces opened state, useful for tests */\n forceOpened?: boolean;\n\n /** Determines whether spotlight should be closed when one of the actions is triggered @default true */\n closeOnActionTrigger?: boolean;\n\n /** Spotlight content max-height. Ignored unless `scrollable` prop is set. @default 400 */\n maxHeight?: React.CSSProperties['maxHeight'];\n\n /** Determines whether the actions list should be scrollable. If not set, `maxHeight` is ignored @default false */\n scrollable?: boolean;\n}\n\nexport type SpotlightRootFactory = Factory<{\n props: SpotlightRootProps;\n ref: HTMLDivElement;\n stylesNames: SpotlightRootStylesNames;\n
|
|
1
|
+
{"version":3,"file":"SpotlightRoot.cjs","names":["spotlightStore","useSpotlight","getHotkeys","SpotlightProvider","Modal","spotlightActions","classes"],"sources":["../src/SpotlightRoot.tsx"],"sourcesContent":["import {\n factory,\n Factory,\n getDefaultZIndex,\n Modal,\n ModalProps,\n ModalStylesNames,\n rem,\n StylesApiProps,\n useProps,\n useResolvedStylesApi,\n useStyles,\n} from '@mantine/core';\nimport { useDidUpdate, useHotkeys } from '@mantine/hooks';\nimport { getHotkeys } from './get-hotkeys';\nimport { SpotlightProvider } from './Spotlight.context';\nimport { spotlightActions, SpotlightStore, spotlightStore, useSpotlight } from './spotlight.store';\nimport classes from './Spotlight.module.css';\n\nexport type SpotlightRootStylesNames =\n | ModalStylesNames\n | 'search'\n | 'actionsList'\n | 'action'\n | 'empty'\n | 'footer'\n | 'actionBody'\n | 'actionLabel'\n | 'actionDescription'\n | 'actionSection'\n | 'actionsGroup';\n\nexport interface SpotlightRootProps\n extends\n StylesApiProps<SpotlightRootFactory>,\n Omit<\n ModalProps,\n | 'styles'\n | 'classNames'\n | 'vars'\n | 'variant'\n | 'opened'\n | 'onClose'\n | 'closeButtonProps'\n | 'withCloseButton'\n | 'attributes'\n > {\n /** Spotlight store, can be used to create multiple instances of spotlight */\n store?: SpotlightStore;\n\n /** Controlled Spotlight search query */\n query?: string;\n\n /** Called when query changes */\n onQueryChange?: (query: string) => void;\n\n /** Determines whether the search query should be cleared when the spotlight is closed @default true */\n clearQueryOnClose?: boolean;\n\n /** Keyboard shortcut or a list of shortcuts to trigger spotlight @default 'mod + K' */\n shortcut?: string | string[] | null;\n\n /** A list of tags which when focused will be ignored by shortcut @default ['input', 'textarea', 'select'] */\n tagsToIgnore?: string[];\n\n /** Determines whether shortcut should trigger based in contentEditable @default false */\n triggerOnContentEditable?: boolean;\n\n /** If set, spotlight will not be rendered */\n disabled?: boolean;\n\n /** Called when spotlight opens */\n onSpotlightOpen?: () => void;\n\n /** Called when spotlight closes */\n onSpotlightClose?: () => void;\n\n /** Forces opened state, useful for tests */\n forceOpened?: boolean;\n\n /** Determines whether spotlight should be closed when one of the actions is triggered @default true */\n closeOnActionTrigger?: boolean;\n\n /** Spotlight content max-height. Ignored unless `scrollable` prop is set. @default 400 */\n maxHeight?: React.CSSProperties['maxHeight'];\n\n /** Determines whether the actions list should be scrollable. If not set, `maxHeight` is ignored @default false */\n scrollable?: boolean;\n}\n\nexport type SpotlightRootFactory = Factory<{\n props: SpotlightRootProps;\n ref: HTMLDivElement;\n stylesNames: SpotlightRootStylesNames;\n}>;\n\nconst defaultProps = {\n size: 600,\n yOffset: 80,\n zIndex: getDefaultZIndex('max'),\n overlayProps: { backgroundOpacity: 0.35, blur: 7 },\n transitionProps: { duration: 200, transition: 'pop' },\n store: spotlightStore,\n clearQueryOnClose: true,\n closeOnActionTrigger: true,\n shortcut: 'mod + K',\n maxHeight: 400,\n} satisfies Partial<SpotlightRootProps>;\n\nexport const SpotlightRoot = factory<SpotlightRootFactory>((_props) => {\n const props = useProps('SpotlightRoot', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n store,\n children,\n query,\n onQueryChange,\n transitionProps,\n clearQueryOnClose,\n shortcut,\n tagsToIgnore,\n triggerOnContentEditable,\n disabled,\n onSpotlightOpen,\n onSpotlightClose,\n forceOpened,\n closeOnActionTrigger,\n maxHeight,\n scrollable,\n attributes,\n ...others\n } = props;\n\n const { opened, query: storeQuery } = useSpotlight(store);\n const _query = typeof query === 'string' ? query : storeQuery;\n const setQuery = (q: string) => {\n onQueryChange?.(q);\n spotlightActions.setQuery(q, store);\n };\n\n const getStyles = useStyles<SpotlightRootFactory>({\n name: 'Spotlight',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<SpotlightRootFactory>({\n classNames,\n styles,\n props,\n });\n\n useHotkeys(getHotkeys(shortcut, store), tagsToIgnore, triggerOnContentEditable);\n\n useDidUpdate(() => {\n opened ? onSpotlightOpen?.() : onSpotlightClose?.();\n }, [opened]);\n\n if (disabled) {\n return null;\n }\n\n return (\n <SpotlightProvider\n value={{\n getStyles,\n query: _query,\n setQuery,\n store,\n closeOnActionTrigger,\n }}\n >\n <Modal\n {...others}\n withCloseButton={false}\n opened={opened || !!forceOpened}\n padding={0}\n onClose={() => spotlightActions.close(store)}\n className={className}\n style={style}\n classNames={resolvedClassNames}\n styles={resolvedStyles}\n attributes={attributes}\n transitionProps={{\n ...transitionProps,\n onExited: () => {\n clearQueryOnClose && setQuery('');\n spotlightActions.clearSpotlightState({ clearQuery: clearQueryOnClose }, store);\n transitionProps?.onExited?.();\n },\n }}\n __vars={{ '--spotlight-max-height': scrollable ? rem(maxHeight) : undefined }}\n __staticSelector=\"Spotlight\"\n data-scrollable={scrollable || undefined}\n >\n {children}\n </Modal>\n </SpotlightProvider>\n );\n});\n\nSpotlightRoot.classes = classes;\nSpotlightRoot.displayName = '@mantine/spotlight/SpotlightRoot';\n"],"mappings":";;;;;;;;;AAgGA,MAAM,eAAe;CACnB,MAAM;CACN,SAAS;CACT,SAAA,GAAA,cAAA,kBAAyB,KAAK;CAC9B,cAAc;EAAE,mBAAmB;EAAM,MAAM;CAAE;CACjD,iBAAiB;EAAE,UAAU;EAAK,YAAY;CAAM;CACpD,OAAOA,wBAAAA;CACP,mBAAmB;CACnB,sBAAsB;CACtB,UAAU;CACV,WAAW;AACb;AAEA,MAAa,iBAAA,GAAA,cAAA,UAA+C,WAAW;CACrE,MAAM,SAAA,GAAA,cAAA,UAAiB,iBAAiB,cAAc,MAAM;CAC5D,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,OACA,UACA,OACA,eACA,iBACA,mBACA,UACA,cACA,0BACA,UACA,iBACA,kBACA,aACA,sBACA,WACA,YACA,YACA,GAAG,WACD;CAEJ,MAAM,EAAE,QAAQ,OAAO,eAAeC,wBAAAA,aAAa,KAAK;CACxD,MAAM,SAAS,OAAO,UAAU,WAAW,QAAQ;CACnD,MAAM,YAAY,MAAc;EAC9B,gBAAgB,CAAC;EACjB,wBAAA,iBAAiB,SAAS,GAAG,KAAK;CACpC;CAEA,MAAM,aAAA,GAAA,cAAA,WAA4C;EAChD,MAAM;EACN,SAAA,yBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,MAAM,EAAE,oBAAoB,oBAAA,GAAA,cAAA,sBAA8D;EACxF;EACA;EACA;CACF,CAAC;CAED,CAAA,GAAA,eAAA,YAAWC,oBAAAA,WAAW,UAAU,KAAK,GAAG,cAAc,wBAAwB;CAE9E,CAAA,GAAA,eAAA,oBAAmB;EACjB,SAAS,kBAAkB,IAAI,mBAAmB;CACpD,GAAG,CAAC,MAAM,CAAC;CAEX,IAAI,UACF,OAAO;CAGT,OACE,iBAAA,GAAA,kBAAA,KAACC,0BAAAA,mBAAD;EACE,OAAO;GACL;GACA,OAAO;GACP;GACA;GACA;EACF;YAEA,iBAAA,GAAA,kBAAA,KAACC,cAAAA,OAAD;GACE,GAAI;GACJ,iBAAiB;GACjB,QAAQ,UAAU,CAAC,CAAC;GACpB,SAAS;GACT,eAAeC,wBAAAA,iBAAiB,MAAM,KAAK;GAChC;GACJ;GACP,YAAY;GACZ,QAAQ;GACI;GACZ,iBAAiB;IACf,GAAG;IACH,gBAAgB;KACd,qBAAqB,SAAS,EAAE;KAChC,wBAAA,iBAAiB,oBAAoB,EAAE,YAAY,kBAAkB,GAAG,KAAK;KAC7E,iBAAiB,WAAW;IAC9B;GACF;GACA,QAAQ,EAAE,0BAA0B,cAAA,GAAA,cAAA,KAAiB,SAAS,IAAI,KAAA,EAAU;GAC5E,kBAAiB;GACjB,mBAAiB,cAAc,KAAA;GAE9B;EACI,CAAA;CACU,CAAA;AAEvB,CAAC;AAED,cAAc,UAAUC,yBAAAA;AACxB,cAAc,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpotlightRoot.mjs","names":["classes"],"sources":["../src/SpotlightRoot.tsx"],"sourcesContent":["import {\n factory,\n Factory,\n getDefaultZIndex,\n Modal,\n ModalProps,\n ModalStylesNames,\n rem,\n StylesApiProps,\n useProps,\n useResolvedStylesApi,\n useStyles,\n} from '@mantine/core';\nimport { useDidUpdate, useHotkeys } from '@mantine/hooks';\nimport { getHotkeys } from './get-hotkeys';\nimport { SpotlightProvider } from './Spotlight.context';\nimport { spotlightActions, SpotlightStore, spotlightStore, useSpotlight } from './spotlight.store';\nimport classes from './Spotlight.module.css';\n\nexport type SpotlightRootStylesNames =\n | ModalStylesNames\n | 'search'\n | 'actionsList'\n | 'action'\n | 'empty'\n | 'footer'\n | 'actionBody'\n | 'actionLabel'\n | 'actionDescription'\n | 'actionSection'\n | 'actionsGroup';\n\nexport interface SpotlightRootProps\n extends\n StylesApiProps<SpotlightRootFactory>,\n Omit<\n ModalProps,\n | 'styles'\n | 'classNames'\n | 'vars'\n | 'variant'\n | 'opened'\n | 'onClose'\n | 'closeButtonProps'\n | 'withCloseButton'\n > {\n /** Spotlight store, can be used to create multiple instances of spotlight */\n store?: SpotlightStore;\n\n /** Controlled Spotlight search query */\n query?: string;\n\n /** Called when query changes */\n onQueryChange?: (query: string) => void;\n\n /** Determines whether the search query should be cleared when the spotlight is closed @default true */\n clearQueryOnClose?: boolean;\n\n /** Keyboard shortcut or a list of shortcuts to trigger spotlight @default 'mod + K' */\n shortcut?: string | string[] | null;\n\n /** A list of tags which when focused will be ignored by shortcut @default ['input', 'textarea', 'select'] */\n tagsToIgnore?: string[];\n\n /** Determines whether shortcut should trigger based in contentEditable @default false */\n triggerOnContentEditable?: boolean;\n\n /** If set, spotlight will not be rendered */\n disabled?: boolean;\n\n /** Called when spotlight opens */\n onSpotlightOpen?: () => void;\n\n /** Called when spotlight closes */\n onSpotlightClose?: () => void;\n\n /** Forces opened state, useful for tests */\n forceOpened?: boolean;\n\n /** Determines whether spotlight should be closed when one of the actions is triggered @default true */\n closeOnActionTrigger?: boolean;\n\n /** Spotlight content max-height. Ignored unless `scrollable` prop is set. @default 400 */\n maxHeight?: React.CSSProperties['maxHeight'];\n\n /** Determines whether the actions list should be scrollable. If not set, `maxHeight` is ignored @default false */\n scrollable?: boolean;\n}\n\nexport type SpotlightRootFactory = Factory<{\n props: SpotlightRootProps;\n ref: HTMLDivElement;\n stylesNames: SpotlightRootStylesNames;\n
|
|
1
|
+
{"version":3,"file":"SpotlightRoot.mjs","names":["classes"],"sources":["../src/SpotlightRoot.tsx"],"sourcesContent":["import {\n factory,\n Factory,\n getDefaultZIndex,\n Modal,\n ModalProps,\n ModalStylesNames,\n rem,\n StylesApiProps,\n useProps,\n useResolvedStylesApi,\n useStyles,\n} from '@mantine/core';\nimport { useDidUpdate, useHotkeys } from '@mantine/hooks';\nimport { getHotkeys } from './get-hotkeys';\nimport { SpotlightProvider } from './Spotlight.context';\nimport { spotlightActions, SpotlightStore, spotlightStore, useSpotlight } from './spotlight.store';\nimport classes from './Spotlight.module.css';\n\nexport type SpotlightRootStylesNames =\n | ModalStylesNames\n | 'search'\n | 'actionsList'\n | 'action'\n | 'empty'\n | 'footer'\n | 'actionBody'\n | 'actionLabel'\n | 'actionDescription'\n | 'actionSection'\n | 'actionsGroup';\n\nexport interface SpotlightRootProps\n extends\n StylesApiProps<SpotlightRootFactory>,\n Omit<\n ModalProps,\n | 'styles'\n | 'classNames'\n | 'vars'\n | 'variant'\n | 'opened'\n | 'onClose'\n | 'closeButtonProps'\n | 'withCloseButton'\n | 'attributes'\n > {\n /** Spotlight store, can be used to create multiple instances of spotlight */\n store?: SpotlightStore;\n\n /** Controlled Spotlight search query */\n query?: string;\n\n /** Called when query changes */\n onQueryChange?: (query: string) => void;\n\n /** Determines whether the search query should be cleared when the spotlight is closed @default true */\n clearQueryOnClose?: boolean;\n\n /** Keyboard shortcut or a list of shortcuts to trigger spotlight @default 'mod + K' */\n shortcut?: string | string[] | null;\n\n /** A list of tags which when focused will be ignored by shortcut @default ['input', 'textarea', 'select'] */\n tagsToIgnore?: string[];\n\n /** Determines whether shortcut should trigger based in contentEditable @default false */\n triggerOnContentEditable?: boolean;\n\n /** If set, spotlight will not be rendered */\n disabled?: boolean;\n\n /** Called when spotlight opens */\n onSpotlightOpen?: () => void;\n\n /** Called when spotlight closes */\n onSpotlightClose?: () => void;\n\n /** Forces opened state, useful for tests */\n forceOpened?: boolean;\n\n /** Determines whether spotlight should be closed when one of the actions is triggered @default true */\n closeOnActionTrigger?: boolean;\n\n /** Spotlight content max-height. Ignored unless `scrollable` prop is set. @default 400 */\n maxHeight?: React.CSSProperties['maxHeight'];\n\n /** Determines whether the actions list should be scrollable. If not set, `maxHeight` is ignored @default false */\n scrollable?: boolean;\n}\n\nexport type SpotlightRootFactory = Factory<{\n props: SpotlightRootProps;\n ref: HTMLDivElement;\n stylesNames: SpotlightRootStylesNames;\n}>;\n\nconst defaultProps = {\n size: 600,\n yOffset: 80,\n zIndex: getDefaultZIndex('max'),\n overlayProps: { backgroundOpacity: 0.35, blur: 7 },\n transitionProps: { duration: 200, transition: 'pop' },\n store: spotlightStore,\n clearQueryOnClose: true,\n closeOnActionTrigger: true,\n shortcut: 'mod + K',\n maxHeight: 400,\n} satisfies Partial<SpotlightRootProps>;\n\nexport const SpotlightRoot = factory<SpotlightRootFactory>((_props) => {\n const props = useProps('SpotlightRoot', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n store,\n children,\n query,\n onQueryChange,\n transitionProps,\n clearQueryOnClose,\n shortcut,\n tagsToIgnore,\n triggerOnContentEditable,\n disabled,\n onSpotlightOpen,\n onSpotlightClose,\n forceOpened,\n closeOnActionTrigger,\n maxHeight,\n scrollable,\n attributes,\n ...others\n } = props;\n\n const { opened, query: storeQuery } = useSpotlight(store);\n const _query = typeof query === 'string' ? query : storeQuery;\n const setQuery = (q: string) => {\n onQueryChange?.(q);\n spotlightActions.setQuery(q, store);\n };\n\n const getStyles = useStyles<SpotlightRootFactory>({\n name: 'Spotlight',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<SpotlightRootFactory>({\n classNames,\n styles,\n props,\n });\n\n useHotkeys(getHotkeys(shortcut, store), tagsToIgnore, triggerOnContentEditable);\n\n useDidUpdate(() => {\n opened ? onSpotlightOpen?.() : onSpotlightClose?.();\n }, [opened]);\n\n if (disabled) {\n return null;\n }\n\n return (\n <SpotlightProvider\n value={{\n getStyles,\n query: _query,\n setQuery,\n store,\n closeOnActionTrigger,\n }}\n >\n <Modal\n {...others}\n withCloseButton={false}\n opened={opened || !!forceOpened}\n padding={0}\n onClose={() => spotlightActions.close(store)}\n className={className}\n style={style}\n classNames={resolvedClassNames}\n styles={resolvedStyles}\n attributes={attributes}\n transitionProps={{\n ...transitionProps,\n onExited: () => {\n clearQueryOnClose && setQuery('');\n spotlightActions.clearSpotlightState({ clearQuery: clearQueryOnClose }, store);\n transitionProps?.onExited?.();\n },\n }}\n __vars={{ '--spotlight-max-height': scrollable ? rem(maxHeight) : undefined }}\n __staticSelector=\"Spotlight\"\n data-scrollable={scrollable || undefined}\n >\n {children}\n </Modal>\n </SpotlightProvider>\n );\n});\n\nSpotlightRoot.classes = classes;\nSpotlightRoot.displayName = '@mantine/spotlight/SpotlightRoot';\n"],"mappings":";;;;;;;;;AAgGA,MAAM,eAAe;CACnB,MAAM;CACN,SAAS;CACT,QAAQ,iBAAiB,KAAK;CAC9B,cAAc;EAAE,mBAAmB;EAAM,MAAM;CAAE;CACjD,iBAAiB;EAAE,UAAU;EAAK,YAAY;CAAM;CACpD,OAAO;CACP,mBAAmB;CACnB,sBAAsB;CACtB,UAAU;CACV,WAAW;AACb;AAEA,MAAa,gBAAgB,SAA+B,WAAW;CACrE,MAAM,QAAQ,SAAS,iBAAiB,cAAc,MAAM;CAC5D,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,OACA,UACA,OACA,eACA,iBACA,mBACA,UACA,cACA,0BACA,UACA,iBACA,kBACA,aACA,sBACA,WACA,YACA,YACA,GAAG,WACD;CAEJ,MAAM,EAAE,QAAQ,OAAO,eAAe,aAAa,KAAK;CACxD,MAAM,SAAS,OAAO,UAAU,WAAW,QAAQ;CACnD,MAAM,YAAY,MAAc;EAC9B,gBAAgB,CAAC;EACjB,iBAAiB,SAAS,GAAG,KAAK;CACpC;CAEA,MAAM,YAAY,UAAgC;EAChD,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,MAAM,EAAE,oBAAoB,mBAAmB,qBAA2C;EACxF;EACA;EACA;CACF,CAAC;CAED,WAAW,WAAW,UAAU,KAAK,GAAG,cAAc,wBAAwB;CAE9E,mBAAmB;EACjB,SAAS,kBAAkB,IAAI,mBAAmB;CACpD,GAAG,CAAC,MAAM,CAAC;CAEX,IAAI,UACF,OAAO;CAGT,OACE,oBAAC,mBAAD;EACE,OAAO;GACL;GACA,OAAO;GACP;GACA;GACA;EACF;YAEA,oBAAC,OAAD;GACE,GAAI;GACJ,iBAAiB;GACjB,QAAQ,UAAU,CAAC,CAAC;GACpB,SAAS;GACT,eAAe,iBAAiB,MAAM,KAAK;GAChC;GACJ;GACP,YAAY;GACZ,QAAQ;GACI;GACZ,iBAAiB;IACf,GAAG;IACH,gBAAgB;KACd,qBAAqB,SAAS,EAAE;KAChC,iBAAiB,oBAAoB,EAAE,YAAY,kBAAkB,GAAG,KAAK;KAC7E,iBAAiB,WAAW;IAC9B;GACF;GACA,QAAQ,EAAE,0BAA0B,aAAa,IAAI,SAAS,IAAI,KAAA,EAAU;GAC5E,kBAAiB;GACjB,mBAAiB,cAAc,KAAA;GAE9B;EACI,CAAA;CACU,CAAA;AAEvB,CAAC;AAED,cAAc,UAAUA;AACxB,cAAc,cAAc"}
|
package/lib/SpotlightRoot.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Factory, ModalProps, ModalStylesNames, StylesApiProps } from '@mantine/core';
|
|
2
2
|
import { SpotlightStore } from './spotlight.store';
|
|
3
3
|
export type SpotlightRootStylesNames = ModalStylesNames | 'search' | 'actionsList' | 'action' | 'empty' | 'footer' | 'actionBody' | 'actionLabel' | 'actionDescription' | 'actionSection' | 'actionsGroup';
|
|
4
|
-
export interface SpotlightRootProps extends StylesApiProps<SpotlightRootFactory>, Omit<ModalProps, 'styles' | 'classNames' | 'vars' | 'variant' | 'opened' | 'onClose' | 'closeButtonProps' | 'withCloseButton'> {
|
|
4
|
+
export interface SpotlightRootProps extends StylesApiProps<SpotlightRootFactory>, Omit<ModalProps, 'styles' | 'classNames' | 'vars' | 'variant' | 'opened' | 'onClose' | 'closeButtonProps' | 'withCloseButton' | 'attributes'> {
|
|
5
5
|
/** Spotlight store, can be used to create multiple instances of spotlight */
|
|
6
6
|
store?: SpotlightStore;
|
|
7
7
|
/** Controlled Spotlight search query */
|
|
@@ -35,11 +35,9 @@ export type SpotlightRootFactory = Factory<{
|
|
|
35
35
|
props: SpotlightRootProps;
|
|
36
36
|
ref: HTMLDivElement;
|
|
37
37
|
stylesNames: SpotlightRootStylesNames;
|
|
38
|
-
compound: true;
|
|
39
38
|
}>;
|
|
40
39
|
export declare const SpotlightRoot: import("@mantine/core").MantineComponent<{
|
|
41
40
|
props: SpotlightRootProps;
|
|
42
41
|
ref: HTMLDivElement;
|
|
43
42
|
stylesNames: SpotlightRootStylesNames;
|
|
44
|
-
compound: true;
|
|
45
43
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantine/spotlight",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.2",
|
|
4
4
|
"description": "Command center components for react and Mantine",
|
|
5
5
|
"homepage": "https://mantine.dev",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"directory": "packages/@mantine/spotlight"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@mantine/core": "9.2.
|
|
45
|
-
"@mantine/hooks": "9.2.
|
|
44
|
+
"@mantine/core": "9.2.2",
|
|
45
|
+
"@mantine/hooks": "9.2.2",
|
|
46
46
|
"react": "^19.2.0",
|
|
47
47
|
"react-dom": "^19.2.0"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@mantine/store": "9.2.
|
|
50
|
+
"@mantine/store": "9.2.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@mantine-tests/core": "workspace:*",
|