@douglasneuroinformatics/libui 4.8.1 → 4.8.3

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.
@@ -353,7 +353,7 @@ function useTranslation(namespace) {
353
353
  changeLanguage: i18n.changeLanguage.bind(i18n),
354
354
  t: t2
355
355
  };
356
- }, []);
356
+ }, [resolvedLanguage]);
357
357
  useEffect8(() => {
358
358
  i18n.addEventListener("languageChange", setResolvedLanguage);
359
359
  return () => {
@@ -411,4 +411,4 @@ export {
411
411
  useTranslation,
412
412
  useWindowSize
413
413
  };
414
- //# sourceMappingURL=chunk-D3AIKQQK.js.map
414
+ //# sourceMappingURL=chunk-PUSQK5BX.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/hooks/useChart/useChart.ts","../src/context/ChartContext.tsx","../src/hooks/useDestructiveAction/useDestructiveAction.ts","../src/hooks/useDestructiveAction/useDestructiveActionStore.ts","../src/hooks/useDownload/useDownload.ts","../src/hooks/useNotificationsStore/useNotificationsStore.ts","../src/hooks/useEventCallback/useEventCallback.ts","../src/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts","../src/hooks/useEventListener/useEventListener.ts","../src/hooks/useInterval/useInterval.ts","../src/hooks/useMediaQuery/useMediaQuery.ts","../src/hooks/useOnClickOutside/useOnClickOutside.ts","../src/hooks/useStorage/useStorage.ts","../src/hooks/useStorage/useLocalStorage.ts","../src/hooks/useStorage/useSessionStorage.ts","../src/hooks/useTheme/useTheme.ts","../src/hooks/useTranslation/useTranslation.ts","../src/hooks/useWindowSize/useWindowSize.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { ChartContext } from '@/context/ChartContext';\n\nexport function useChart() {\n const context = useContext(ChartContext);\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />');\n }\n return context;\n}\n","import { createContext } from 'react';\n\nimport type { ChartConfig } from '@/components';\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nexport const ChartContext = createContext<ChartContextProps | null>(null);\n","import { useCallback } from 'react';\n\nimport { useDestructiveActionStore } from './useDestructiveActionStore';\n\nimport type { DestructiveAction, DestructiveActionOptions, DestructiveActionParams } from './useDestructiveActionStore';\n\n/**\n * Returns a function that accepts a destructive action and optional configuration.\n * @returns A function that takes an action and options to add to the destructive action queue\n */\nexport function useDestructiveAction(): (action: DestructiveAction, options?: DestructiveActionOptions) => void;\n/**\n * Returns a function that wraps the provided action for destructive confirmation.\n * @param action - The destructive action to wrap\n * @returns A function that takes the action's arguments and adds it to the destructive action queue\n */\nexport function useDestructiveAction<TArgs extends any[]>(action: DestructiveAction<TArgs>): (...args: TArgs) => void;\n/**\n * Returns a function that wraps the provided action with configuration for destructive confirmation.\n * @param params - The action and its configuration (title, description)\n * @returns A function that takes the action's arguments and adds it to the destructive action queue\n */\nexport function useDestructiveAction<TArgs extends any[]>(\n params: DestructiveActionParams<TArgs>\n): (...args: TArgs) => void;\nexport function useDestructiveAction<TArgs extends any[]>(\n arg?: DestructiveAction<TArgs> | DestructiveActionParams<TArgs>\n): (...args: TArgs) => void {\n const addPendingDestructiveAction = useDestructiveActionStore((store) => store.addPendingDestructiveAction);\n return useCallback(\n (...args: TArgs) => {\n if (arg === undefined) {\n const [action, options] = args as unknown as [DestructiveAction, DestructiveActionOptions | undefined];\n addPendingDestructiveAction(action, options);\n return;\n }\n const { action, ...options } = typeof arg === 'function' ? { action: arg } : arg;\n addPendingDestructiveAction(() => action(...args), options);\n },\n [arg, addPendingDestructiveAction]\n );\n}\n","import type { Promisable } from 'type-fest';\nimport { create } from 'zustand';\n\ntype DestructiveAction<TArgs extends any[] = any[]> = (...args: TArgs) => Promisable<void>;\n\ntype DestructiveActionOptions = {\n description?: string;\n title?: string;\n};\n\ntype DestructiveActionParams<TArgs extends any[] = any[]> = DestructiveActionOptions & {\n action: DestructiveAction<TArgs>;\n};\n\ntype DestructiveActionDef<TArgs extends any[] = any[]> = DestructiveActionParams<TArgs> & {\n id: string;\n};\n\nexport type DestructiveActionStore = {\n addPendingDestructiveAction: (action: DestructiveAction, options?: DestructiveActionOptions) => void;\n deletePendingDestructiveAction: (id: string) => void;\n pendingDestructiveActions: DestructiveActionDef[];\n};\n\nexport const useDestructiveActionStore = create<DestructiveActionStore>((set) => ({\n addPendingDestructiveAction: (action, options) => {\n set((state) => ({\n pendingDestructiveActions: [...state.pendingDestructiveActions, { action, id: crypto.randomUUID(), ...options }]\n }));\n },\n deletePendingDestructiveAction: (id) => {\n set((state) => ({\n ...state,\n pendingDestructiveActions: state.pendingDestructiveActions.filter((def) => def.id !== id)\n }));\n },\n pendingDestructiveActions: []\n}));\n\nexport type { DestructiveAction, DestructiveActionDef, DestructiveActionOptions, DestructiveActionParams };\n","import { useEffect, useState } from 'react';\n\nimport type { Promisable } from 'type-fest';\n\nimport { useNotificationsStore } from '../useNotificationsStore';\n\ntype DownloadTextOptions = {\n blobType: 'text/csv' | 'text/plain';\n};\n\ntype DownloadBlobOptions = {\n blobType: 'application/zip' | 'image/jpeg' | 'image/png' | 'image/webp';\n};\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\ninterface DownloadFunction {\n (filename: string, data: Blob, options: DownloadBlobOptions): Promise<void>;\n (filename: string, data: () => Promisable<Blob>, options: DownloadBlobOptions): Promise<void>;\n (filename: string, data: string, options?: DownloadTextOptions): Promise<void>;\n (filename: string, data: () => Promisable<string>, options?: DownloadTextOptions): Promise<void>;\n}\n\ntype Downloadable = {\n blobType: string;\n data: Blob | string;\n filename: string;\n id: string;\n};\n\n/**\n * Used to trigger downloads of arbitrary data to the client\n * @returns A function to invoke the download\n */\nexport function useDownload(): DownloadFunction {\n const notifications = useNotificationsStore();\n const [downloads, setDownloads] = useState<Downloadable[]>([]);\n\n useEffect(() => {\n if (downloads.length) {\n const { blobType, data, filename, id } = downloads.at(-1)!;\n const anchor = document.createElement('a');\n document.body.appendChild(anchor);\n const blob = new Blob([data], { type: blobType });\n const url = URL.createObjectURL(blob);\n anchor.href = url;\n anchor.download = filename;\n anchor.click();\n URL.revokeObjectURL(url);\n anchor.remove();\n setDownloads((prevDownloads) => prevDownloads.filter((item) => item.id !== id));\n }\n }, [downloads]);\n\n return async (filename, _data, options) => {\n try {\n const data = typeof _data === 'function' ? await _data() : _data;\n if (typeof data !== 'string' && !options?.blobType) {\n throw new Error(\"argument 'blobType' must be defined when download is called with a Blob object\");\n }\n setDownloads((prevDownloads) => [\n ...prevDownloads,\n { blobType: options?.blobType ?? 'text/plain', data, filename, id: crypto.randomUUID() }\n ]);\n } catch (error) {\n const message = error instanceof Error ? error.message : 'An unknown error occurred';\n notifications.addNotification({\n message,\n title: 'Error',\n type: 'error'\n });\n }\n };\n}\n","import { create } from 'zustand';\n\nexport type NotificationInterface = {\n id: number;\n message?: string;\n title?: string;\n type: 'error' | 'info' | 'success' | 'warning';\n variant?: 'critical' | 'standard';\n};\n\nexport type NotificationsStore = {\n addNotification: (notification: Omit<NotificationInterface, 'id'>) => void;\n dismissNotification: (id: number) => void;\n notifications: NotificationInterface[];\n};\n\nexport const useNotificationsStore = create<NotificationsStore>((set) => ({\n addNotification: (notification) => {\n set((state) => ({\n notifications: [...state.notifications, { id: Date.now(), ...notification }]\n }));\n },\n dismissNotification: (id) => {\n set((state) => ({\n notifications: state.notifications.filter((notification) => notification.id !== id)\n }));\n },\n notifications: []\n}));\n","import { useCallback, useRef } from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect';\n\nexport function useEventCallback<Args extends unknown[], R>(fn: (...args: Args) => R) {\n const ref = useRef<typeof fn>(() => {\n throw new Error('Cannot call an event handler while rendering.');\n });\n\n useIsomorphicLayoutEffect(() => {\n ref.current = fn;\n }, [fn]);\n\n return useCallback((...args: Args) => ref.current(...args), [ref]);\n}\n","import { useEffect, useLayoutEffect } from 'react';\n\nimport { isBrowser } from '@/utils';\n\nexport const useIsomorphicLayoutEffect = isBrowser() ? useLayoutEffect : useEffect;\n","import { useEffect, useRef } from 'react';\nimport type { RefObject } from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect';\n\n// MediaQueryList Event based useEventListener interface\nfunction useEventListener<K extends keyof MediaQueryListEventMap>(\n eventName: K,\n handler: (event: MediaQueryListEventMap[K]) => void,\n element: RefObject<MediaQueryList>,\n options?: AddEventListenerOptions | boolean\n): void;\n\n// Window Event based useEventListener interface\nfunction useEventListener<K extends keyof WindowEventMap>(\n eventName: K,\n handler: (event: WindowEventMap[K]) => void,\n element?: undefined,\n options?: AddEventListenerOptions | boolean\n): void;\n\n// Element Event based useEventListener interface\nfunction useEventListener<K extends keyof HTMLElementEventMap, T extends HTMLElement = HTMLDivElement>(\n eventName: K,\n handler: (event: HTMLElementEventMap[K]) => void,\n element: RefObject<T>,\n options?: AddEventListenerOptions | boolean\n): void;\n\n// Document Event based useEventListener interface\nfunction useEventListener<K extends keyof DocumentEventMap>(\n eventName: K,\n handler: (event: DocumentEventMap[K]) => void,\n element: RefObject<Document>,\n options?: AddEventListenerOptions | boolean\n): void;\n\nfunction useEventListener<\n KW extends keyof WindowEventMap,\n KH extends keyof HTMLElementEventMap,\n KM extends keyof MediaQueryListEventMap,\n T extends HTMLElement | MediaQueryList | void = void\n>(\n eventName: KH | KM | KW,\n handler: (event: Event | HTMLElementEventMap[KH] | MediaQueryListEventMap[KM] | WindowEventMap[KW]) => void,\n element?: RefObject<T>,\n options?: AddEventListenerOptions | boolean\n) {\n // Create a ref that stores handler\n const savedHandler = useRef(handler);\n\n useIsomorphicLayoutEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n // Define the listening target\n const targetElement: T | Window = element?.current ?? window;\n\n if (!(targetElement && targetElement.addEventListener)) return;\n\n // Create event listener that calls handler function stored in ref\n const listener: typeof handler = (event) => savedHandler.current(event);\n\n targetElement.addEventListener(eventName, listener, options);\n\n // Remove event listener on cleanup\n return () => {\n targetElement.removeEventListener(eventName, listener, options);\n };\n }, [eventName, element, options]);\n}\n\nexport { useEventListener };\n","import { useEffect, useRef } from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect';\n\nexport function useInterval(callback: () => void, delay: null | number) {\n const savedCallback = useRef(callback);\n\n // Remember the latest callback if it changes.\n useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n\n // Set up the interval.\n useEffect(() => {\n // Don't schedule if no delay is specified.\n // Note: 0 is a valid value for delay.\n if (!delay && delay !== 0) {\n return;\n }\n\n const id = setInterval(() => savedCallback.current(), delay);\n\n return () => clearInterval(id);\n }, [delay]);\n}\n","import { useEffect, useState } from 'react';\n\nimport { isBrowser } from '@/utils';\n\n/**\n * Get the result of an arbitrary CSS media query\n *\n * @param query - the CSS media query\n * @returns a boolean indicating the result of the query\n * @example\n * // true if the viewport is at least 768px wide\n * const matches = useMediaQuery('(min-width: 768px)')\n */\nexport function useMediaQuery(query: string): boolean {\n const getMatches = (query: string): boolean => {\n // Prevents SSR issues\n if (isBrowser()) {\n return window.matchMedia(query).matches;\n }\n return false;\n };\n\n const [matches, setMatches] = useState<boolean>(getMatches(query));\n\n function handleChange() {\n setMatches(getMatches(query));\n }\n\n useEffect(() => {\n const matchMedia = window.matchMedia(query);\n\n // Triggered at the first client-side load and if query changes\n handleChange();\n\n matchMedia.addEventListener('change', handleChange);\n\n return () => {\n matchMedia.removeEventListener('change', handleChange);\n };\n }, [query]);\n\n return matches;\n}\n","import type { RefObject } from 'react';\n\nimport { useEventListener } from '../useEventListener';\n\ntype Handler = (event: MouseEvent) => void;\n\nexport function useOnClickOutside<T extends HTMLElement | null = HTMLElement>(\n ref: RefObject<T>,\n handler: Handler,\n mouseEvent: 'mousedown' | 'mouseup' = 'mousedown'\n): void {\n useEventListener(mouseEvent, (event) => {\n const el = ref.current;\n\n // Do nothing if clicking ref's element or descendent elements\n if (!el || el.contains(event.target as Node)) {\n return;\n }\n\n handler(event);\n });\n}\n","import { useCallback, useEffect, useState } from 'react';\nimport type { Dispatch, SetStateAction } from 'react';\n\nimport { isBrowser } from '@/utils';\n\nimport { useEventCallback } from '../useEventCallback';\nimport { useEventListener } from '../useEventListener';\n\ntype StorageName = 'localStorage' | 'sessionStorage';\n\ntype StorageEventMap = {\n [K in StorageName]: CustomEvent;\n};\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions, @typescript-eslint/no-empty-object-type\n interface WindowEventMap extends StorageEventMap {}\n}\n\n/**\n * Represents the options for customizing the behavior of serialization and deserialization.\n * @template T - The type of the state to be stored in storage.\n */\ntype UseStorageOptions<T> = {\n /** A function to deserialize the stored value. */\n deserializer?: (value: string) => T;\n /**\n * If `true` (default), the hook will initialize reading the storage. In SSR, you should set it to `false`, returning the initial value initially.\n * @default true\n */\n initializeWithValue?: boolean;\n /** A function to serialize the value before storing it. */\n serializer?: (value: T) => string;\n};\n\n/**\n * Custom hook that uses local or session storage to persist state across page reloads.\n * @template T - The type of the state to be stored in storage.\n * @param key - The key under which the value will be stored in storage.\n * @param initialValue - The initial value of the state or a function that returns the initial value.\n * @param options - Options for customizing the behavior of serialization and deserialization (optional).\n * @returns A tuple containing the stored value and a function to set the value.\n * @public\n * @example\n * ```tsx\n * const [count, setCount] = useStorage('count', 0);\n * // Access the `count` value and the `setCount` function to update it.\n * ```\n */\nexport function useStorage<T>(\n key: string,\n initialValue: (() => T) | T,\n storageName: StorageName,\n options: UseStorageOptions<T> = {}\n): [T, Dispatch<SetStateAction<T>>] {\n const { initializeWithValue = true } = options;\n const storage = window[storageName];\n\n const serializer = useCallback<(value: T) => string>(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n\n const deserializer = useCallback<(value: string) => T>(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n } else if (value === 'undefined') {\n return undefined as unknown as T;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed: unknown;\n try {\n parsed = JSON.parse(value);\n } catch (err) {\n console.error(`Error parsing JSON: ${(err as Error).message}`);\n return defaultValue;\n }\n return parsed as T;\n },\n [options, initialValue]\n );\n\n const readValue = useCallback((): T => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (!isBrowser()) {\n return initialValueToUse;\n }\n const raw = storage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n }, [initialValue, key, deserializer]);\n\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n\n const setValue: Dispatch<SetStateAction<T>> = useEventCallback((value) => {\n if (!isBrowser()) {\n console.warn(`Tried setting storage key “${key}” even though environment is not a client`);\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n storage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(storageName, { key }));\n } catch (error) {\n console.warn(`Error setting storage key “${key}”:`, error);\n }\n });\n\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n\n const handleStorageChange = useCallback(\n (event: CustomEvent | StorageEvent) => {\n if ((event as StorageEvent).key && (event as StorageEvent).key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n\n // this only works for other documents, not the current one\n useEventListener('storage', handleStorageChange);\n\n useEventListener(storageName, handleStorageChange);\n\n return [storedValue, setValue];\n}\n\nexport type { StorageName, UseStorageOptions };\n","import type { Dispatch, SetStateAction } from 'react';\n\nimport { useStorage } from './useStorage';\n\nimport type { UseStorageOptions } from './useStorage';\n\n/** Custom hook that uses local storage to persist state across page reloads */\nexport function useLocalStorage<T>(\n key: string,\n initialValue: (() => T) | T,\n options: UseStorageOptions<T> = {}\n): [T, Dispatch<SetStateAction<T>>] {\n return useStorage(key, initialValue, 'localStorage', options);\n}\n","import type { Dispatch, SetStateAction } from 'react';\n\nimport { useStorage } from './useStorage';\n\nimport type { UseStorageOptions } from './useStorage';\n\n/** Custom hook that uses session storage to persist state across page reloads */\nexport function useSessionStorage<T>(\n key: string,\n initialValue: (() => T) | T,\n options: UseStorageOptions<T> = {}\n): [T, Dispatch<SetStateAction<T>>] {\n return useStorage(key, initialValue, 'sessionStorage', options);\n}\n","import { useEffect, useState } from 'react';\n\n// this is required since our storybook manager plugin cannot use vite aliases\nimport { isBrowser } from '../../utils';\n\ntype Theme = 'dark' | 'light';\n\ntype UpdateTheme = (theme: Theme) => void;\n\n/** @private */\nconst DEFAULT_THEME: Theme = 'light';\n\n/** @private */\nconst THEME_ATTRIBUTE = 'data-mode';\n\n/** @private */\nconst THEME_KEY = 'theme';\n\n/** @private */\nconst SYS_DARK_MEDIA_QUERY = '(prefers-color-scheme: dark)';\n\n/**\n * Returns the current theme and a function to update the current theme\n *\n * The reason the implementation of this hook is rather convoluted is for\n * cases where the theme is updated outside this hook\n */\nfunction useTheme(): readonly [Theme, UpdateTheme] {\n // Initial theme value is based on the value saved in local storage or the system theme\n const [theme, setTheme] = useState<Theme>(() => {\n if (!isBrowser()) {\n return DEFAULT_THEME;\n }\n const savedTheme = window.localStorage.getItem(THEME_KEY);\n let initialTheme: Theme;\n if (savedTheme === 'dark' || savedTheme === 'light') {\n initialTheme = savedTheme;\n } else {\n initialTheme = window.matchMedia(SYS_DARK_MEDIA_QUERY).matches ? 'dark' : 'light';\n }\n document.documentElement.setAttribute(THEME_ATTRIBUTE, initialTheme);\n return initialTheme;\n });\n\n useEffect(() => {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.attributeName === THEME_ATTRIBUTE) {\n const updatedTheme = (mutation.target as HTMLHtmlElement).getAttribute(THEME_ATTRIBUTE);\n if (updatedTheme === 'light' || updatedTheme === 'dark') {\n window.localStorage.setItem(THEME_KEY, updatedTheme);\n setTheme(updatedTheme);\n } else {\n console.error(`Unexpected value for 'data-mode' attribute: ${updatedTheme}`);\n }\n }\n });\n });\n observer.observe(document.documentElement, {\n attributes: true\n });\n return () => observer.disconnect();\n }, []);\n\n // When the user wants to change the theme\n const updateTheme = (theme: Theme) => {\n document.documentElement.setAttribute(THEME_ATTRIBUTE, theme);\n };\n\n return [theme, updateTheme] as const;\n}\n\nexport { DEFAULT_THEME, SYS_DARK_MEDIA_QUERY, type Theme, THEME_ATTRIBUTE, THEME_KEY, useTheme };\n","import { useEffect, useMemo, useState } from 'react';\n\nimport type {\n TranslateFunction,\n TranslationKey,\n TranslationKeyForNamespace,\n TranslationNamespace,\n TranslatorType\n} from '@/i18n';\n\n// this is required since our storybook manager plugin cannot use vite aliases\nimport { i18n } from '../../i18n';\n\nexport function useTranslation(): TranslatorType<TranslationKey>;\nexport function useTranslation<TNamespace extends TranslationNamespace>(\n namespace: TNamespace\n): TranslatorType<TranslationKeyForNamespace<TNamespace>>;\nexport function useTranslation(namespace?: TranslationNamespace): TranslatorType<string> {\n const [resolvedLanguage, setResolvedLanguage] = useState(i18n.resolvedLanguage);\n const { changeLanguage, t } = useMemo(() => {\n const t: TranslateFunction<string> = (target, options) => {\n if (typeof target === 'object') {\n return i18n.t(target, options);\n }\n return i18n.t((namespace ? `${namespace}.${target}` : target) as TranslationKey, options);\n };\n return {\n changeLanguage: i18n.changeLanguage.bind(i18n),\n t\n };\n }, []);\n\n useEffect(() => {\n i18n.addEventListener('languageChange', setResolvedLanguage);\n return () => {\n i18n.removeEventListener('languageChange', setResolvedLanguage);\n };\n }, []);\n\n return {\n changeLanguage,\n resolvedLanguage,\n t\n };\n}\n","import { useState } from 'react';\n\nimport { useEventListener } from '../useEventListener';\nimport { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect';\n\nexport type WindowSize = {\n height: number;\n width: number;\n};\n\nexport function useWindowSize(): WindowSize {\n const [windowSize, setWindowSize] = useState<WindowSize>({\n height: 0,\n width: 0\n });\n\n const handleSize = () => {\n setWindowSize({\n height: window.innerHeight,\n width: window.innerWidth\n });\n };\n\n useEventListener('resize', handleSize);\n\n // Set size at the first client-side load\n useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n\n return windowSize;\n}\n"],"mappings":";;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ACF,GAAG,CAAC,CAAC;AAEL,EAAAC,WAAU,MAAM;AACd,SAAK,iBAAiB,kBAAkB,mBAAmB;AAC3D,WAAO,MAAM;AACX,WAAK,oBAAoB,kBAAkB,mBAAmB;AAAA,IAChE;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;;;AC5CA,SAAS,YAAAC,iBAAgB;AAUlB,SAAS,gBAA4B;AAC1C,QAAM,CAAC,YAAY,aAAa,IAAIC,UAAqB;AAAA,IACvD,QAAQ;AAAA,IACR,OAAO;AAAA,EACT,CAAC;AAED,QAAM,aAAa,MAAM;AACvB,kBAAc;AAAA,MACZ,QAAQ,OAAO;AAAA,MACf,OAAO,OAAO;AAAA,IAChB,CAAC;AAAA,EACH;AAEA,mBAAiB,UAAU,UAAU;AAGrC,4BAA0B,MAAM;AAC9B,eAAW;AAAA,EACb,GAAG,CAAC,CAAC;AAEL,SAAO;AACT;","names":["action","options","create","useCallback","useEffect","useEffect","useCallback","useEffect","useRef","useRef","useEffect","useEffect","useRef","useRef","useEffect","useEffect","useState","query","useState","useEffect","useCallback","useEffect","useState","useCallback","useState","useEffect","useEffect","useState","useState","useEffect","theme","useEffect","useState","useState","t","useEffect","useState","useState"]}
1
+ {"version":3,"sources":["../src/hooks/useChart/useChart.ts","../src/context/ChartContext.tsx","../src/hooks/useDestructiveAction/useDestructiveAction.ts","../src/hooks/useDestructiveAction/useDestructiveActionStore.ts","../src/hooks/useDownload/useDownload.ts","../src/hooks/useNotificationsStore/useNotificationsStore.ts","../src/hooks/useEventCallback/useEventCallback.ts","../src/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts","../src/hooks/useEventListener/useEventListener.ts","../src/hooks/useInterval/useInterval.ts","../src/hooks/useMediaQuery/useMediaQuery.ts","../src/hooks/useOnClickOutside/useOnClickOutside.ts","../src/hooks/useStorage/useStorage.ts","../src/hooks/useStorage/useLocalStorage.ts","../src/hooks/useStorage/useSessionStorage.ts","../src/hooks/useTheme/useTheme.ts","../src/hooks/useTranslation/useTranslation.ts","../src/hooks/useWindowSize/useWindowSize.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { ChartContext } from '@/context/ChartContext';\n\nexport function useChart() {\n const context = useContext(ChartContext);\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />');\n }\n return context;\n}\n","import { createContext } from 'react';\n\nimport type { ChartConfig } from '@/components';\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nexport const ChartContext = createContext<ChartContextProps | null>(null);\n","import { useCallback } from 'react';\n\nimport { useDestructiveActionStore } from './useDestructiveActionStore';\n\nimport type { DestructiveAction, DestructiveActionOptions, DestructiveActionParams } from './useDestructiveActionStore';\n\n/**\n * Returns a function that accepts a destructive action and optional configuration.\n * @returns A function that takes an action and options to add to the destructive action queue\n */\nexport function useDestructiveAction(): (action: DestructiveAction, options?: DestructiveActionOptions) => void;\n/**\n * Returns a function that wraps the provided action for destructive confirmation.\n * @param action - The destructive action to wrap\n * @returns A function that takes the action's arguments and adds it to the destructive action queue\n */\nexport function useDestructiveAction<TArgs extends any[]>(action: DestructiveAction<TArgs>): (...args: TArgs) => void;\n/**\n * Returns a function that wraps the provided action with configuration for destructive confirmation.\n * @param params - The action and its configuration (title, description)\n * @returns A function that takes the action's arguments and adds it to the destructive action queue\n */\nexport function useDestructiveAction<TArgs extends any[]>(\n params: DestructiveActionParams<TArgs>\n): (...args: TArgs) => void;\nexport function useDestructiveAction<TArgs extends any[]>(\n arg?: DestructiveAction<TArgs> | DestructiveActionParams<TArgs>\n): (...args: TArgs) => void {\n const addPendingDestructiveAction = useDestructiveActionStore((store) => store.addPendingDestructiveAction);\n return useCallback(\n (...args: TArgs) => {\n if (arg === undefined) {\n const [action, options] = args as unknown as [DestructiveAction, DestructiveActionOptions | undefined];\n addPendingDestructiveAction(action, options);\n return;\n }\n const { action, ...options } = typeof arg === 'function' ? { action: arg } : arg;\n addPendingDestructiveAction(() => action(...args), options);\n },\n [arg, addPendingDestructiveAction]\n );\n}\n","import type { Promisable } from 'type-fest';\nimport { create } from 'zustand';\n\ntype DestructiveAction<TArgs extends any[] = any[]> = (...args: TArgs) => Promisable<void>;\n\ntype DestructiveActionOptions = {\n description?: string;\n title?: string;\n};\n\ntype DestructiveActionParams<TArgs extends any[] = any[]> = DestructiveActionOptions & {\n action: DestructiveAction<TArgs>;\n};\n\ntype DestructiveActionDef<TArgs extends any[] = any[]> = DestructiveActionParams<TArgs> & {\n id: string;\n};\n\nexport type DestructiveActionStore = {\n addPendingDestructiveAction: (action: DestructiveAction, options?: DestructiveActionOptions) => void;\n deletePendingDestructiveAction: (id: string) => void;\n pendingDestructiveActions: DestructiveActionDef[];\n};\n\nexport const useDestructiveActionStore = create<DestructiveActionStore>((set) => ({\n addPendingDestructiveAction: (action, options) => {\n set((state) => ({\n pendingDestructiveActions: [...state.pendingDestructiveActions, { action, id: crypto.randomUUID(), ...options }]\n }));\n },\n deletePendingDestructiveAction: (id) => {\n set((state) => ({\n ...state,\n pendingDestructiveActions: state.pendingDestructiveActions.filter((def) => def.id !== id)\n }));\n },\n pendingDestructiveActions: []\n}));\n\nexport type { DestructiveAction, DestructiveActionDef, DestructiveActionOptions, DestructiveActionParams };\n","import { useEffect, useState } from 'react';\n\nimport type { Promisable } from 'type-fest';\n\nimport { useNotificationsStore } from '../useNotificationsStore';\n\ntype DownloadTextOptions = {\n blobType: 'text/csv' | 'text/plain';\n};\n\ntype DownloadBlobOptions = {\n blobType: 'application/zip' | 'image/jpeg' | 'image/png' | 'image/webp';\n};\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\ninterface DownloadFunction {\n (filename: string, data: Blob, options: DownloadBlobOptions): Promise<void>;\n (filename: string, data: () => Promisable<Blob>, options: DownloadBlobOptions): Promise<void>;\n (filename: string, data: string, options?: DownloadTextOptions): Promise<void>;\n (filename: string, data: () => Promisable<string>, options?: DownloadTextOptions): Promise<void>;\n}\n\ntype Downloadable = {\n blobType: string;\n data: Blob | string;\n filename: string;\n id: string;\n};\n\n/**\n * Used to trigger downloads of arbitrary data to the client\n * @returns A function to invoke the download\n */\nexport function useDownload(): DownloadFunction {\n const notifications = useNotificationsStore();\n const [downloads, setDownloads] = useState<Downloadable[]>([]);\n\n useEffect(() => {\n if (downloads.length) {\n const { blobType, data, filename, id } = downloads.at(-1)!;\n const anchor = document.createElement('a');\n document.body.appendChild(anchor);\n const blob = new Blob([data], { type: blobType });\n const url = URL.createObjectURL(blob);\n anchor.href = url;\n anchor.download = filename;\n anchor.click();\n URL.revokeObjectURL(url);\n anchor.remove();\n setDownloads((prevDownloads) => prevDownloads.filter((item) => item.id !== id));\n }\n }, [downloads]);\n\n return async (filename, _data, options) => {\n try {\n const data = typeof _data === 'function' ? await _data() : _data;\n if (typeof data !== 'string' && !options?.blobType) {\n throw new Error(\"argument 'blobType' must be defined when download is called with a Blob object\");\n }\n setDownloads((prevDownloads) => [\n ...prevDownloads,\n { blobType: options?.blobType ?? 'text/plain', data, filename, id: crypto.randomUUID() }\n ]);\n } catch (error) {\n const message = error instanceof Error ? error.message : 'An unknown error occurred';\n notifications.addNotification({\n message,\n title: 'Error',\n type: 'error'\n });\n }\n };\n}\n","import { create } from 'zustand';\n\nexport type NotificationInterface = {\n id: number;\n message?: string;\n title?: string;\n type: 'error' | 'info' | 'success' | 'warning';\n variant?: 'critical' | 'standard';\n};\n\nexport type NotificationsStore = {\n addNotification: (notification: Omit<NotificationInterface, 'id'>) => void;\n dismissNotification: (id: number) => void;\n notifications: NotificationInterface[];\n};\n\nexport const useNotificationsStore = create<NotificationsStore>((set) => ({\n addNotification: (notification) => {\n set((state) => ({\n notifications: [...state.notifications, { id: Date.now(), ...notification }]\n }));\n },\n dismissNotification: (id) => {\n set((state) => ({\n notifications: state.notifications.filter((notification) => notification.id !== id)\n }));\n },\n notifications: []\n}));\n","import { useCallback, useRef } from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect';\n\nexport function useEventCallback<Args extends unknown[], R>(fn: (...args: Args) => R) {\n const ref = useRef<typeof fn>(() => {\n throw new Error('Cannot call an event handler while rendering.');\n });\n\n useIsomorphicLayoutEffect(() => {\n ref.current = fn;\n }, [fn]);\n\n return useCallback((...args: Args) => ref.current(...args), [ref]);\n}\n","import { useEffect, useLayoutEffect } from 'react';\n\nimport { isBrowser } from '@/utils';\n\nexport const useIsomorphicLayoutEffect = isBrowser() ? useLayoutEffect : useEffect;\n","import { useEffect, useRef } from 'react';\nimport type { RefObject } from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect';\n\n// MediaQueryList Event based useEventListener interface\nfunction useEventListener<K extends keyof MediaQueryListEventMap>(\n eventName: K,\n handler: (event: MediaQueryListEventMap[K]) => void,\n element: RefObject<MediaQueryList>,\n options?: AddEventListenerOptions | boolean\n): void;\n\n// Window Event based useEventListener interface\nfunction useEventListener<K extends keyof WindowEventMap>(\n eventName: K,\n handler: (event: WindowEventMap[K]) => void,\n element?: undefined,\n options?: AddEventListenerOptions | boolean\n): void;\n\n// Element Event based useEventListener interface\nfunction useEventListener<K extends keyof HTMLElementEventMap, T extends HTMLElement = HTMLDivElement>(\n eventName: K,\n handler: (event: HTMLElementEventMap[K]) => void,\n element: RefObject<T>,\n options?: AddEventListenerOptions | boolean\n): void;\n\n// Document Event based useEventListener interface\nfunction useEventListener<K extends keyof DocumentEventMap>(\n eventName: K,\n handler: (event: DocumentEventMap[K]) => void,\n element: RefObject<Document>,\n options?: AddEventListenerOptions | boolean\n): void;\n\nfunction useEventListener<\n KW extends keyof WindowEventMap,\n KH extends keyof HTMLElementEventMap,\n KM extends keyof MediaQueryListEventMap,\n T extends HTMLElement | MediaQueryList | void = void\n>(\n eventName: KH | KM | KW,\n handler: (event: Event | HTMLElementEventMap[KH] | MediaQueryListEventMap[KM] | WindowEventMap[KW]) => void,\n element?: RefObject<T>,\n options?: AddEventListenerOptions | boolean\n) {\n // Create a ref that stores handler\n const savedHandler = useRef(handler);\n\n useIsomorphicLayoutEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n // Define the listening target\n const targetElement: T | Window = element?.current ?? window;\n\n if (!(targetElement && targetElement.addEventListener)) return;\n\n // Create event listener that calls handler function stored in ref\n const listener: typeof handler = (event) => savedHandler.current(event);\n\n targetElement.addEventListener(eventName, listener, options);\n\n // Remove event listener on cleanup\n return () => {\n targetElement.removeEventListener(eventName, listener, options);\n };\n }, [eventName, element, options]);\n}\n\nexport { useEventListener };\n","import { useEffect, useRef } from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect';\n\nexport function useInterval(callback: () => void, delay: null | number) {\n const savedCallback = useRef(callback);\n\n // Remember the latest callback if it changes.\n useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n\n // Set up the interval.\n useEffect(() => {\n // Don't schedule if no delay is specified.\n // Note: 0 is a valid value for delay.\n if (!delay && delay !== 0) {\n return;\n }\n\n const id = setInterval(() => savedCallback.current(), delay);\n\n return () => clearInterval(id);\n }, [delay]);\n}\n","import { useEffect, useState } from 'react';\n\nimport { isBrowser } from '@/utils';\n\n/**\n * Get the result of an arbitrary CSS media query\n *\n * @param query - the CSS media query\n * @returns a boolean indicating the result of the query\n * @example\n * // true if the viewport is at least 768px wide\n * const matches = useMediaQuery('(min-width: 768px)')\n */\nexport function useMediaQuery(query: string): boolean {\n const getMatches = (query: string): boolean => {\n // Prevents SSR issues\n if (isBrowser()) {\n return window.matchMedia(query).matches;\n }\n return false;\n };\n\n const [matches, setMatches] = useState<boolean>(getMatches(query));\n\n function handleChange() {\n setMatches(getMatches(query));\n }\n\n useEffect(() => {\n const matchMedia = window.matchMedia(query);\n\n // Triggered at the first client-side load and if query changes\n handleChange();\n\n matchMedia.addEventListener('change', handleChange);\n\n return () => {\n matchMedia.removeEventListener('change', handleChange);\n };\n }, [query]);\n\n return matches;\n}\n","import type { RefObject } from 'react';\n\nimport { useEventListener } from '../useEventListener';\n\ntype Handler = (event: MouseEvent) => void;\n\nexport function useOnClickOutside<T extends HTMLElement | null = HTMLElement>(\n ref: RefObject<T>,\n handler: Handler,\n mouseEvent: 'mousedown' | 'mouseup' = 'mousedown'\n): void {\n useEventListener(mouseEvent, (event) => {\n const el = ref.current;\n\n // Do nothing if clicking ref's element or descendent elements\n if (!el || el.contains(event.target as Node)) {\n return;\n }\n\n handler(event);\n });\n}\n","import { useCallback, useEffect, useState } from 'react';\nimport type { Dispatch, SetStateAction } from 'react';\n\nimport { isBrowser } from '@/utils';\n\nimport { useEventCallback } from '../useEventCallback';\nimport { useEventListener } from '../useEventListener';\n\ntype StorageName = 'localStorage' | 'sessionStorage';\n\ntype StorageEventMap = {\n [K in StorageName]: CustomEvent;\n};\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions, @typescript-eslint/no-empty-object-type\n interface WindowEventMap extends StorageEventMap {}\n}\n\n/**\n * Represents the options for customizing the behavior of serialization and deserialization.\n * @template T - The type of the state to be stored in storage.\n */\ntype UseStorageOptions<T> = {\n /** A function to deserialize the stored value. */\n deserializer?: (value: string) => T;\n /**\n * If `true` (default), the hook will initialize reading the storage. In SSR, you should set it to `false`, returning the initial value initially.\n * @default true\n */\n initializeWithValue?: boolean;\n /** A function to serialize the value before storing it. */\n serializer?: (value: T) => string;\n};\n\n/**\n * Custom hook that uses local or session storage to persist state across page reloads.\n * @template T - The type of the state to be stored in storage.\n * @param key - The key under which the value will be stored in storage.\n * @param initialValue - The initial value of the state or a function that returns the initial value.\n * @param options - Options for customizing the behavior of serialization and deserialization (optional).\n * @returns A tuple containing the stored value and a function to set the value.\n * @public\n * @example\n * ```tsx\n * const [count, setCount] = useStorage('count', 0);\n * // Access the `count` value and the `setCount` function to update it.\n * ```\n */\nexport function useStorage<T>(\n key: string,\n initialValue: (() => T) | T,\n storageName: StorageName,\n options: UseStorageOptions<T> = {}\n): [T, Dispatch<SetStateAction<T>>] {\n const { initializeWithValue = true } = options;\n const storage = window[storageName];\n\n const serializer = useCallback<(value: T) => string>(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n\n const deserializer = useCallback<(value: string) => T>(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n } else if (value === 'undefined') {\n return undefined as unknown as T;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed: unknown;\n try {\n parsed = JSON.parse(value);\n } catch (err) {\n console.error(`Error parsing JSON: ${(err as Error).message}`);\n return defaultValue;\n }\n return parsed as T;\n },\n [options, initialValue]\n );\n\n const readValue = useCallback((): T => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (!isBrowser()) {\n return initialValueToUse;\n }\n const raw = storage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n }, [initialValue, key, deserializer]);\n\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n\n const setValue: Dispatch<SetStateAction<T>> = useEventCallback((value) => {\n if (!isBrowser()) {\n console.warn(`Tried setting storage key “${key}” even though environment is not a client`);\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n storage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(storageName, { key }));\n } catch (error) {\n console.warn(`Error setting storage key “${key}”:`, error);\n }\n });\n\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n\n const handleStorageChange = useCallback(\n (event: CustomEvent | StorageEvent) => {\n if ((event as StorageEvent).key && (event as StorageEvent).key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n\n // this only works for other documents, not the current one\n useEventListener('storage', handleStorageChange);\n\n useEventListener(storageName, handleStorageChange);\n\n return [storedValue, setValue];\n}\n\nexport type { StorageName, UseStorageOptions };\n","import type { Dispatch, SetStateAction } from 'react';\n\nimport { useStorage } from './useStorage';\n\nimport type { UseStorageOptions } from './useStorage';\n\n/** Custom hook that uses local storage to persist state across page reloads */\nexport function useLocalStorage<T>(\n key: string,\n initialValue: (() => T) | T,\n options: UseStorageOptions<T> = {}\n): [T, Dispatch<SetStateAction<T>>] {\n return useStorage(key, initialValue, 'localStorage', options);\n}\n","import type { Dispatch, SetStateAction } from 'react';\n\nimport { useStorage } from './useStorage';\n\nimport type { UseStorageOptions } from './useStorage';\n\n/** Custom hook that uses session storage to persist state across page reloads */\nexport function useSessionStorage<T>(\n key: string,\n initialValue: (() => T) | T,\n options: UseStorageOptions<T> = {}\n): [T, Dispatch<SetStateAction<T>>] {\n return useStorage(key, initialValue, 'sessionStorage', options);\n}\n","import { useEffect, useState } from 'react';\n\n// this is required since our storybook manager plugin cannot use vite aliases\nimport { isBrowser } from '../../utils';\n\ntype Theme = 'dark' | 'light';\n\ntype UpdateTheme = (theme: Theme) => void;\n\n/** @private */\nconst DEFAULT_THEME: Theme = 'light';\n\n/** @private */\nconst THEME_ATTRIBUTE = 'data-mode';\n\n/** @private */\nconst THEME_KEY = 'theme';\n\n/** @private */\nconst SYS_DARK_MEDIA_QUERY = '(prefers-color-scheme: dark)';\n\n/**\n * Returns the current theme and a function to update the current theme\n *\n * The reason the implementation of this hook is rather convoluted is for\n * cases where the theme is updated outside this hook\n */\nfunction useTheme(): readonly [Theme, UpdateTheme] {\n // Initial theme value is based on the value saved in local storage or the system theme\n const [theme, setTheme] = useState<Theme>(() => {\n if (!isBrowser()) {\n return DEFAULT_THEME;\n }\n const savedTheme = window.localStorage.getItem(THEME_KEY);\n let initialTheme: Theme;\n if (savedTheme === 'dark' || savedTheme === 'light') {\n initialTheme = savedTheme;\n } else {\n initialTheme = window.matchMedia(SYS_DARK_MEDIA_QUERY).matches ? 'dark' : 'light';\n }\n document.documentElement.setAttribute(THEME_ATTRIBUTE, initialTheme);\n return initialTheme;\n });\n\n useEffect(() => {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.attributeName === THEME_ATTRIBUTE) {\n const updatedTheme = (mutation.target as HTMLHtmlElement).getAttribute(THEME_ATTRIBUTE);\n if (updatedTheme === 'light' || updatedTheme === 'dark') {\n window.localStorage.setItem(THEME_KEY, updatedTheme);\n setTheme(updatedTheme);\n } else {\n console.error(`Unexpected value for 'data-mode' attribute: ${updatedTheme}`);\n }\n }\n });\n });\n observer.observe(document.documentElement, {\n attributes: true\n });\n return () => observer.disconnect();\n }, []);\n\n // When the user wants to change the theme\n const updateTheme = (theme: Theme) => {\n document.documentElement.setAttribute(THEME_ATTRIBUTE, theme);\n };\n\n return [theme, updateTheme] as const;\n}\n\nexport { DEFAULT_THEME, SYS_DARK_MEDIA_QUERY, type Theme, THEME_ATTRIBUTE, THEME_KEY, useTheme };\n","import { useEffect, useMemo, useState } from 'react';\n\nimport type {\n TranslateFunction,\n TranslationKey,\n TranslationKeyForNamespace,\n TranslationNamespace,\n TranslatorType\n} from '@/i18n';\n\n// this is required since our storybook manager plugin cannot use vite aliases\nimport { i18n } from '../../i18n';\n\nexport function useTranslation(): TranslatorType<TranslationKey>;\nexport function useTranslation<TNamespace extends TranslationNamespace>(\n namespace: TNamespace\n): TranslatorType<TranslationKeyForNamespace<TNamespace>>;\nexport function useTranslation(namespace?: TranslationNamespace): TranslatorType<string> {\n const [resolvedLanguage, setResolvedLanguage] = useState(i18n.resolvedLanguage);\n const { changeLanguage, t } = useMemo(() => {\n const t: TranslateFunction<string> = (target, options) => {\n if (typeof target === 'object') {\n return i18n.t(target, options);\n }\n return i18n.t((namespace ? `${namespace}.${target}` : target) as TranslationKey, options);\n };\n return {\n changeLanguage: i18n.changeLanguage.bind(i18n),\n t\n };\n }, [resolvedLanguage]);\n\n useEffect(() => {\n i18n.addEventListener('languageChange', setResolvedLanguage);\n return () => {\n i18n.removeEventListener('languageChange', setResolvedLanguage);\n };\n }, []);\n\n return {\n changeLanguage,\n resolvedLanguage,\n t\n };\n}\n","import { useState } from 'react';\n\nimport { useEventListener } from '../useEventListener';\nimport { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect';\n\nexport type WindowSize = {\n height: number;\n width: number;\n};\n\nexport function useWindowSize(): WindowSize {\n const [windowSize, setWindowSize] = useState<WindowSize>({\n height: 0,\n width: 0\n });\n\n const handleSize = () => {\n setWindowSize({\n height: window.innerHeight,\n width: window.innerWidth\n });\n };\n\n useEventListener('resize', handleSize);\n\n // Set size at the first client-side load\n useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n\n return windowSize;\n}\n"],"mappings":";;;;;;;;;AAAA,SAAS,kBAAkB;;;ACA3B,SAAS,qBAAqB;AAQvB,IAAM,eAAe,cAAwC,IAAI;;;ADJjE,SAAS,WAAW;AACzB,QAAM,UAAU,WAAW,YAAY;AACvC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,mDAAmD;AAAA,EACrE;AACA,SAAO;AACT;;;AEVA,SAAS,mBAAmB;;;ACC5B,SAAS,cAAc;AAuBhB,IAAM,4BAA4B,OAA+B,CAAC,SAAS;AAAA,EAChF,6BAA6B,CAAC,QAAQ,YAAY;AAChD,QAAI,CAAC,WAAW;AAAA,MACd,2BAA2B,CAAC,GAAG,MAAM,2BAA2B,EAAE,QAAQ,IAAI,OAAO,WAAW,GAAG,GAAG,QAAQ,CAAC;AAAA,IACjH,EAAE;AAAA,EACJ;AAAA,EACA,gCAAgC,CAAC,OAAO;AACtC,QAAI,CAAC,WAAW;AAAA,MACd,GAAG;AAAA,MACH,2BAA2B,MAAM,0BAA0B,OAAO,CAAC,QAAQ,IAAI,OAAO,EAAE;AAAA,IAC1F,EAAE;AAAA,EACJ;AAAA,EACA,2BAA2B,CAAC;AAC9B,EAAE;;;ADZK,SAAS,qBACd,KAC0B;AAC1B,QAAM,8BAA8B,0BAA0B,CAAC,UAAU,MAAM,2BAA2B;AAC1G,SAAO;AAAA,IACL,IAAI,SAAgB;AAClB,UAAI,QAAQ,QAAW;AACrB,cAAM,CAACA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C9E,QAAM,EAAE,gBAAgB,EAAE,IAAI,QAAQ,MAAM;AAC1C,UAAMC,KAA+B,CAAC,QAAQ,YAAY;AACxD,UAAI,OAAO,WAAW,UAAU;AAC9B,eAAO,KAAK,EAAE,QAAQ,OAAO;AAAA,MAC/B;AACA,aAAO,KAAK,EAAG,YAAY,GAAG,SAAS,IAAI,MAAM,KAAK,QAA2B,OAAO;AAAA,IAC1F;AACA,WAAO;AAAA,MACL,gBAAgB,KAAK,eAAe,KAAK,IAAI;AAAA,MAC7C,GAAAA;AAAA,IACF;AAAA,EACF,GAAG,CAAC,gBAAgB,CAAC;AAErB,EAAAC,WAAU,MAAM;AACd,SAAK,iBAAiB,kBAAkB,mBAAmB;AAC3D,WAAO,MAAM;AACX,WAAK,oBAAoB,kBAAkB,mBAAmB;AAAA,IAChE;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;;;AC5CA,SAAS,YAAAC,iBAAgB;AAUlB,SAAS,gBAA4B;AAC1C,QAAM,CAAC,YAAY,aAAa,IAAIC,UAAqB;AAAA,IACvD,QAAQ;AAAA,IACR,OAAO;AAAA,EACT,CAAC;AAED,QAAM,aAAa,MAAM;AACvB,kBAAc;AAAA,MACZ,QAAQ,OAAO;AAAA,MACf,OAAO,OAAO;AAAA,IAChB,CAAC;AAAA,EACH;AAEA,mBAAiB,UAAU,UAAU;AAGrC,4BAA0B,MAAM;AAC9B,eAAW;AAAA,EACb,GAAG,CAAC,CAAC;AAEL,SAAO;AACT;","names":["action","options","create","useCallback","useEffect","useEffect","useCallback","useEffect","useRef","useRef","useEffect","useEffect","useRef","useRef","useEffect","useEffect","useState","query","useState","useEffect","useCallback","useEffect","useState","useCallback","useState","useEffect","useEffect","useState","useState","useEffect","theme","useEffect","useState","useState","t","useEffect","useState","useState"]}
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  useNotificationsStore,
4
4
  useTranslation
5
- } from "./chunk-D3AIKQQK.js";
5
+ } from "./chunk-PUSQK5BX.js";
6
6
  import {
7
7
  cn
8
8
  } from "./chunk-HCQE34RL.js";
@@ -89,41 +89,39 @@ var DialogBody = ({
89
89
  };
90
90
 
91
91
  // src/components/Dialog/DialogContent.tsx
92
- import { forwardRef as forwardRef4 } from "react";
92
+ import "react";
93
93
  import { Close, Content, Portal } from "@radix-ui/react-dialog";
94
94
  import { XIcon } from "lucide-react";
95
95
 
96
96
  // src/components/Dialog/DialogOverlay.tsx
97
- import { forwardRef as forwardRef3 } from "react";
97
+ import "react";
98
98
  import { Overlay } from "@radix-ui/react-dialog";
99
99
  import { jsx as jsx4 } from "react/jsx-runtime";
100
- var DialogOverlay = forwardRef3(function DialogOverlay2({ className, ...props }, ref) {
100
+ var DialogOverlay = ({ className, ...props }) => {
101
101
  return /* @__PURE__ */ jsx4(
102
102
  Overlay,
103
103
  {
104
104
  className: cn(
105
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-200",
105
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-300",
106
106
  className
107
107
  ),
108
- ref,
109
108
  ...props
110
109
  }
111
110
  );
112
- });
111
+ };
113
112
 
114
113
  // src/components/Dialog/DialogContent.tsx
115
114
  import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
116
- var DialogContent = forwardRef4(function DialogContent2({ children, className, ...props }, ref) {
115
+ var DialogContent = ({ children, className, ...props }) => {
117
116
  return /* @__PURE__ */ jsxs2(Portal, { children: [
118
117
  /* @__PURE__ */ jsx5(DialogOverlay, {}),
119
118
  /* @__PURE__ */ jsxs2(
120
119
  Content,
121
120
  {
122
121
  className: cn(
123
- "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",
122
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-md border p-6 shadow-lg duration-300 sm:max-w-lg sm:rounded-lg",
124
123
  className
125
124
  ),
126
- ref,
127
125
  ...props,
128
126
  children: [
129
127
  children,
@@ -132,15 +130,15 @@ var DialogContent = forwardRef4(function DialogContent2({ children, className, .
132
130
  }
133
131
  )
134
132
  ] });
135
- });
133
+ };
136
134
 
137
135
  // src/components/Dialog/DialogDescription.tsx
138
- import { forwardRef as forwardRef5 } from "react";
136
+ import "react";
139
137
  import { Description } from "@radix-ui/react-dialog";
140
138
  import { jsx as jsx6 } from "react/jsx-runtime";
141
- var DialogDescription = forwardRef5(function DialogDescription2({ className, ...props }, ref) {
142
- return /* @__PURE__ */ jsx6(Description, { className: cn("text-sm text-muted-foreground", className), ref, ...props });
143
- });
139
+ var DialogDescription = ({ className, ...props }) => {
140
+ return /* @__PURE__ */ jsx6(Description, { className: cn("text-muted-foreground text-sm", className), ...props });
141
+ };
144
142
 
145
143
  // src/components/Dialog/DialogFooter.tsx
146
144
  import "react";
@@ -153,14 +151,12 @@ import { jsx as jsx8 } from "react/jsx-runtime";
153
151
  var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx8("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
154
152
 
155
153
  // src/components/Dialog/DialogTitle.tsx
156
- import { forwardRef as forwardRef6 } from "react";
154
+ import "react";
157
155
  import { Title } from "@radix-ui/react-dialog";
158
156
  import { jsx as jsx9 } from "react/jsx-runtime";
159
- var DialogTitle = forwardRef6(
160
- function DialogTitle2({ className, ...props }, ref) {
161
- return /* @__PURE__ */ jsx9(Title, { className: cn("text-lg font-semibold leading-none tracking-tight", className), ref, ...props });
162
- }
163
- );
157
+ var DialogTitle = ({ className, ...props }) => {
158
+ return /* @__PURE__ */ jsx9(Title, { className: cn("text-lg leading-none font-semibold tracking-tight", className), ...props });
159
+ };
164
160
 
165
161
  // src/components/Dialog/Dialog.tsx
166
162
  var Dialog = Object.assign(Root.bind(null), {
@@ -322,4 +318,4 @@ export {
322
318
  Dialog,
323
319
  NotificationHub
324
320
  };
325
- //# sourceMappingURL=chunk-JRAEWBJS.js.map
321
+ //# sourceMappingURL=chunk-VWNGEXWI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Button/Button.tsx","../src/components/Card/Card.tsx","../src/components/Dialog/Dialog.tsx","../src/components/Dialog/DialogBody.tsx","../src/components/Dialog/DialogContent.tsx","../src/components/Dialog/DialogOverlay.tsx","../src/components/Dialog/DialogDescription.tsx","../src/components/Dialog/DialogFooter.tsx","../src/components/Dialog/DialogHeader.tsx","../src/components/Dialog/DialogTitle.tsx","../src/providers/CoreProvider/NotificationHub.tsx","../src/providers/CoreProvider/NotificationIcon.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Slot, Slottable } from '@radix-ui/react-slot';\nimport { cva } from 'class-variance-authority';\nimport type { VariantProps } from 'class-variance-authority';\nimport type { Simplify } from 'type-fest';\n\nimport { cn } from '@/utils';\n\nexport const BUTTON_ICON_SIZE = {\n lg: 18,\n md: 16,\n sm: 14\n};\n\nexport const buttonVariants = cva(\n 'flex items-center justify-center whitespace-nowrap cursor-pointer rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',\n {\n defaultVariants: {\n size: 'md',\n variant: 'primary'\n },\n variants: {\n size: {\n icon: 'p-1.5 aspect-square',\n lg: 'h-10 rounded-md px-8 text-base',\n md: 'h-9 px-4 py-2',\n sm: 'h-8 rounded-md px-3 text-xs'\n },\n variant: {\n danger: 'bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/70',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n outline: 'border border-input bg-inherit shadow-xs',\n primary: 'bg-primary text-primary-foreground shadow-sm hover:bg-primary/90',\n secondary: 'bg-secondary border text-secondary-foreground shadow-xs hover:bg-secondary/10'\n }\n }\n }\n);\n\nexport type ButtonProps = Simplify<\n React.ButtonHTMLAttributes<HTMLButtonElement> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n /** @deprecated - use children */\n label?: string;\n }\n>;\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n { asChild, children, className, label, size = 'md', variant = 'primary', ...props },\n ref\n) {\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp className={cn(buttonVariants({ className, size, variant }))} ref={ref} {...props}>\n {label}\n <Slottable>{children}</Slottable>\n </Comp>\n );\n});\n","import * as React from 'react';\n\nimport { cn } from '@/utils';\n\nconst CardRoot = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(function CardRoot(\n { className, ...props },\n ref\n) {\n return (\n <div\n className={cn('bg-card text-card-foreground rounded-xl border shadow-sm', className)}\n data-testid=\"card\"\n ref={ref}\n {...props}\n />\n );\n});\n\nexport const Card = Object.assign(CardRoot, {\n Content: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('p-6 pt-0', className)} {...props} />\n ),\n Description: ({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>) => (\n <p className={cn('text-muted-foreground text-sm', className)} {...props} />\n ),\n Footer: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => {\n return <div className={cn('flex items-center p-6 pt-0', className)} {...props} />;\n },\n Header: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />\n ),\n Title: ({ children, className, ...props }: React.HTMLAttributes<HTMLHeadingElement>) => (\n <h3 className={cn('leading-none font-semibold tracking-tight', className)} {...props}>\n {children}\n </h3>\n )\n});\n","import { Root, Trigger } from '@radix-ui/react-dialog';\n\nimport { DialogBody } from './DialogBody';\nimport { DialogContent } from './DialogContent';\nimport { DialogDescription } from './DialogDescription';\nimport { DialogFooter } from './DialogFooter';\nimport { DialogHeader } from './DialogHeader';\nimport { DialogTitle } from './DialogTitle';\n\nexport const Dialog = Object.assign(Root.bind(null), {\n Body: DialogBody,\n Content: DialogContent,\n Description: DialogDescription,\n Footer: DialogFooter,\n Header: DialogHeader,\n Title: DialogTitle,\n Trigger\n});\n","import * as React from 'react';\n\nimport { cn } from '@/utils';\n\nexport const DialogBody = ({\n children,\n className,\n ...props\n}: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => {\n return (\n <div className={cn('py-4', className)} {...props}>\n {children}\n </div>\n );\n};\n","import {} from 'react';\n\nimport { Close, Content, Portal } from '@radix-ui/react-dialog';\nimport { XIcon } from 'lucide-react';\n\nimport { cn } from '@/utils';\n\nimport { DialogOverlay } from './DialogOverlay';\n\nexport const DialogContent = ({ children, className, ...props }: React.ComponentProps<typeof Content>) => {\n return (\n <Portal>\n <DialogOverlay />\n <Content\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-md border p-6 shadow-lg duration-300 sm:max-w-lg sm:rounded-lg',\n className\n )}\n {...props}\n >\n {children}\n <Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none\">\n <XIcon className=\"h-4 w-4\" />\n </Close>\n </Content>\n </Portal>\n );\n};\n","import {} from 'react';\n\nimport { Overlay } from '@radix-ui/react-dialog';\n\nimport { cn } from '@/utils';\n\nexport const DialogOverlay = ({ className, ...props }: React.ComponentProps<typeof Overlay>) => {\n return (\n <Overlay\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-300',\n className\n )}\n {...props}\n />\n );\n};\n","import {} from 'react';\n\nimport { Description } from '@radix-ui/react-dialog';\n\nimport { cn } from '@/utils';\n\nexport const DialogDescription = ({ className, ...props }: React.ComponentProps<typeof Description>) => {\n return <Description className={cn('text-muted-foreground text-sm', className)} {...props} />;\n};\n","import * as React from 'react';\n\nimport { cn } from '@/utils';\n\nexport const DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-x-2 gap-y-0.5 sm:flex-row', className)} {...props} />\n);\n","import * as React from 'react';\n\nimport { cn } from '@/utils';\n\nexport const DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n);\n","import {} from 'react';\n\nimport { Title } from '@radix-ui/react-dialog';\n\nimport { cn } from '@/utils';\n\nexport const DialogTitle = ({ className, ...props }: React.ComponentProps<typeof Title>) => {\n return <Title className={cn('text-lg leading-none font-semibold tracking-tight', className)} {...props} />;\n};\n","import { XIcon } from 'lucide-react';\nimport { AnimatePresence, motion } from 'motion/react';\n\nimport { Card } from '@/components/Card';\nimport { useTranslation } from '@/hooks';\nimport { useNotificationsStore } from '@/hooks/useNotificationsStore';\n\nimport { NotificationIcon } from './NotificationIcon';\n\ntype NotificationHubProps = {\n /** The number of milliseconds before the notification is automatically cleared */\n timeout?: number;\n};\n\nconst NotificationHub = ({ timeout = 5000 }: NotificationHubProps) => {\n const { t } = useTranslation('libui');\n const { dismissNotification, notifications } = useNotificationsStore();\n\n return (\n <div className=\"fixed bottom-0 z-50 w-full print:hidden\">\n <AnimatePresence>\n {notifications.map((item) => (\n <motion.div\n animate={{ height: 'auto', opacity: 1 }}\n className=\"relative max-w-sm\"\n exit={{ height: 0, opacity: 0 }}\n initial={{ height: 0, opacity: 0 }}\n key={item.id}\n transition={{ bounce: 0.1, type: 'spring' }}\n >\n <div className=\"w-full p-2\">\n <Card className=\"w-full rounded-lg p-0\">\n <div className=\"p-4\">\n <div className=\"mb-2 flex items-center\">\n <NotificationIcon type={item.type} />\n <h5 className=\"ml-3 grow font-medium text-slate-900 dark:text-slate-100\">\n {item.title ?? t(`notifications.types.${item.type}`)}\n </h5>\n <button\n className=\"inline-flex rounded-md text-slate-400 hover:text-slate-500 focus:ring-1 focus:ring-sky-500 focus:outline-hidden dark:focus:ring-sky-600\"\n type=\"button\"\n onClick={() => {\n dismissNotification(item.id);\n }}\n >\n <XIcon aria-hidden=\"true\" className=\"h-5 w-5\" />\n </button>\n </div>\n <p className=\"text-muted-foreground my-2\">{item.message}</p>\n </div>\n <motion.div\n animate={{ width: '100%' }}\n className=\"h-1 bg-slate-500\"\n initial={{ width: '0%' }}\n transition={{ duration: timeout / 1000, ease: 'linear' }}\n onAnimationComplete={() => {\n dismissNotification(item.id);\n }}\n />\n </Card>\n </div>\n </motion.div>\n ))}\n </AnimatePresence>\n </div>\n );\n};\n\nexport { NotificationHub, type NotificationHubProps };\n","import type { NotificationInterface } from '@/hooks/useNotificationsStore';\n\nexport type NotificationIconProps = {\n type: NotificationInterface['type'];\n};\n\nexport const NotificationIcon = ({ type }: NotificationIconProps) => {\n switch (type) {\n case 'error':\n return (\n <svg\n aria-hidden=\"true\"\n className=\"h-6 w-6 text-red-500\"\n data-slot=\"icon\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z\"\n fillRule=\"evenodd\"\n ></path>\n </svg>\n );\n case 'info':\n return (\n <svg\n aria-hidden=\"true\"\n className=\"h-6 w-6 text-blue-500\"\n data-slot=\"icon\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z\"\n fillRule=\"evenodd\"\n ></path>\n </svg>\n );\n case 'success':\n return (\n <svg\n aria-hidden=\"true\"\n className=\"h-6 w-6 text-green-500\"\n data-slot=\"icon\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z\"\n fillRule=\"evenodd\"\n />\n </svg>\n );\n case 'warning':\n return (\n <svg\n aria-hidden=\"true\"\n className=\"h-6 w-6 text-yellow-500\"\n data-slot=\"icon\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z\"\n fillRule=\"evenodd\"\n ></path>\n </svg>\n );\n }\n};\n"],"mappings":";;;;;;;;;;AAAA,YAAY,WAAW;AAEvB,SAAS,MAAM,iBAAiB;AAChC,SAAS,WAAW;AAqDhB,SAEE,KAFF;AA/CG,IAAM,mBAAmB;AAAA,EAC9B,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,IAAM,iBAAiB;AAAA,EAC5B;AAAA,EACA;AAAA,IACE,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,SAAS;AAAA,QACP,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,MAAM;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,QACT,WAAW;AAAA,MACb;AAAA,IACF;AAAA,EACF;AACF;AAWO,IAAM,SAAe,iBAA2C,SAASA,QAC9E,EAAE,SAAS,UAAU,WAAW,OAAO,OAAO,MAAM,UAAU,WAAW,GAAG,MAAM,GAClF,KACA;AACA,QAAM,OAAO,UAAU,OAAO;AAC9B,SACE,qBAAC,QAAK,WAAW,GAAG,eAAe,EAAE,WAAW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,QAAG,WAAU,4DACX,eAAK,SAAS,EAAE,uBAAuB,KAAK,IAAI,EAAE,GACrD;AAAA,YACA,gBAAAA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,MAAK;AAAA,gBACL,SAAS,MAAM;AACb,sCAAoB,KAAK,EAAE;AAAA,gBAC7B;AAAA,gBAEA,0BAAAA,MAACE,QAAA,EAAM,eAAY,QAAO,WAAU,WAAU;AAAA;AAAA,YAChD;AAAA,aACF;AAAA,UACA,gBAAAF,MAAC,OAAE,WAAU,8BAA8B,eAAK,SAAQ;AAAA,WAC1D;AAAA,QACA,gBAAAA;AAAA,UAAC,OAAO;AAAA,UAAP;AAAA,YACC,SAAS,EAAE,OAAO,OAAO;AAAA,YACzB,WAAU;AAAA,YACV,SAAS,EAAE,OAAO,KAAK;AAAA,YACvB,YAAY,EAAE,UAAU,UAAU,KAAM,MAAM,SAAS;AAAA,YACvD,qBAAqB,MAAM;AACzB,kCAAoB,KAAK,EAAE;AAAA,YAC7B;AAAA;AAAA,QACF;AAAA,SACF,GACF;AAAA;AAAA,IAjCK,KAAK;AAAA,EAkCZ,CACD,GACH,GACF;AAEJ;","names":["Button","React","jsx","CardRoot","jsx","jsx","jsx","jsxs","jsx","jsx","jsx","jsx","XIcon","jsx","jsx","jsxs","XIcon"]}
@@ -1247,11 +1247,11 @@ declare const DatePicker: React$1.ForwardRefExoticComponent<DatePickerProps & Re
1247
1247
 
1248
1248
  declare const Dialog: React$1.FC<_radix_ui_react_dialog.DialogProps> & {
1249
1249
  Body: ({ children, className, ...props }: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => react_jsx_runtime.JSX.Element;
1250
- Content: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_dialog.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1251
- Description: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_dialog.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
1250
+ Content: ({ children, className, ...props }: React.ComponentProps<React$1.ForwardRefExoticComponent<_radix_ui_react_dialog.DialogContentProps & React$1.RefAttributes<HTMLDivElement>>>) => react_jsx_runtime.JSX.Element;
1251
+ Description: ({ className, ...props }: React.ComponentProps<React$1.ForwardRefExoticComponent<_radix_ui_react_dialog.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>>>) => react_jsx_runtime.JSX.Element;
1252
1252
  Footer: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => react_jsx_runtime.JSX.Element;
1253
1253
  Header: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => react_jsx_runtime.JSX.Element;
1254
- Title: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_dialog.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
1254
+ Title: ({ className, ...props }: React.ComponentProps<React$1.ForwardRefExoticComponent<_radix_ui_react_dialog.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>>>) => react_jsx_runtime.JSX.Element;
1255
1255
  Trigger: React$1.ForwardRefExoticComponent<_radix_ui_react_dialog.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
1256
1256
  };
1257
1257
 
@@ -6,14 +6,14 @@ import {
6
6
  Dialog,
7
7
  NotificationHub,
8
8
  buttonVariants
9
- } from "./chunk-JRAEWBJS.js";
9
+ } from "./chunk-VWNGEXWI.js";
10
10
  import {
11
11
  ChartContext,
12
12
  useChart,
13
13
  useNotificationsStore,
14
14
  useTheme,
15
15
  useTranslation
16
- } from "./chunk-D3AIKQQK.js";
16
+ } from "./chunk-PUSQK5BX.js";
17
17
  import "./chunk-MCINJHF5.js";
18
18
  import {
19
19
  cn
package/dist/hooks.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  useTheme,
21
21
  useTranslation,
22
22
  useWindowSize
23
- } from "./chunk-D3AIKQQK.js";
23
+ } from "./chunk-PUSQK5BX.js";
24
24
  import "./chunk-MCINJHF5.js";
25
25
  import "./chunk-HCQE34RL.js";
26
26
  import "./chunk-5B62SIBQ.js";
package/dist/providers.js CHANGED
@@ -3,11 +3,11 @@ import {
3
3
  Button,
4
4
  Dialog,
5
5
  NotificationHub
6
- } from "./chunk-JRAEWBJS.js";
6
+ } from "./chunk-VWNGEXWI.js";
7
7
  import {
8
8
  useDestructiveActionStore,
9
9
  useTranslation
10
- } from "./chunk-D3AIKQQK.js";
10
+ } from "./chunk-PUSQK5BX.js";
11
11
  import "./chunk-MCINJHF5.js";
12
12
  import "./chunk-HCQE34RL.js";
13
13
  import "./chunk-5B62SIBQ.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@douglasneuroinformatics/libui",
3
3
  "type": "module",
4
- "version": "4.8.1",
4
+ "version": "4.8.3",
5
5
  "packageManager": "pnpm@10.7.1",
6
6
  "description": "Generic UI components for DNP projects, built using React and Tailwind CSS",
7
7
  "author": "Joshua Unrau",
@@ -1,4 +1,4 @@
1
- import { forwardRef } from 'react';
1
+ import {} from 'react';
2
2
 
3
3
  import { Close, Content, Portal } from '@radix-ui/react-dialog';
4
4
  import { XIcon } from 'lucide-react';
@@ -7,19 +7,15 @@ import { cn } from '@/utils';
7
7
 
8
8
  import { DialogOverlay } from './DialogOverlay';
9
9
 
10
- export const DialogContent = forwardRef<
11
- React.ElementRef<typeof Content>,
12
- React.ComponentPropsWithoutRef<typeof Content>
13
- >(function DialogContent({ children, className, ...props }, ref) {
10
+ export const DialogContent = ({ children, className, ...props }: React.ComponentProps<typeof Content>) => {
14
11
  return (
15
12
  <Portal>
16
13
  <DialogOverlay />
17
14
  <Content
18
15
  className={cn(
19
- 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg',
16
+ 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-md border p-6 shadow-lg duration-300 sm:max-w-lg sm:rounded-lg',
20
17
  className
21
18
  )}
22
- ref={ref}
23
19
  {...props}
24
20
  >
25
21
  {children}
@@ -29,4 +25,4 @@ export const DialogContent = forwardRef<
29
25
  </Content>
30
26
  </Portal>
31
27
  );
32
- });
28
+ };
@@ -1,12 +1,9 @@
1
- import { forwardRef } from 'react';
1
+ import {} from 'react';
2
2
 
3
3
  import { Description } from '@radix-ui/react-dialog';
4
4
 
5
5
  import { cn } from '@/utils';
6
6
 
7
- export const DialogDescription = forwardRef<
8
- React.ElementRef<typeof Description>,
9
- React.ComponentPropsWithoutRef<typeof Description>
10
- >(function DialogDescription({ className, ...props }, ref) {
11
- return <Description className={cn('text-sm text-muted-foreground', className)} ref={ref} {...props} />;
12
- });
7
+ export const DialogDescription = ({ className, ...props }: React.ComponentProps<typeof Description>) => {
8
+ return <Description className={cn('text-muted-foreground text-sm', className)} {...props} />;
9
+ };
@@ -1,21 +1,17 @@
1
- import { forwardRef } from 'react';
1
+ import {} from 'react';
2
2
 
3
3
  import { Overlay } from '@radix-ui/react-dialog';
4
4
 
5
5
  import { cn } from '@/utils';
6
6
 
7
- export const DialogOverlay = forwardRef<
8
- React.ElementRef<typeof Overlay>,
9
- React.ComponentPropsWithoutRef<typeof Overlay>
10
- >(function DialogOverlay({ className, ...props }, ref) {
7
+ export const DialogOverlay = ({ className, ...props }: React.ComponentProps<typeof Overlay>) => {
11
8
  return (
12
9
  <Overlay
13
10
  className={cn(
14
- 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-200',
11
+ 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-300',
15
12
  className
16
13
  )}
17
- ref={ref}
18
14
  {...props}
19
15
  />
20
16
  );
21
- });
17
+ };
@@ -1,13 +1,9 @@
1
- import { forwardRef } from 'react';
1
+ import {} from 'react';
2
2
 
3
3
  import { Title } from '@radix-ui/react-dialog';
4
4
 
5
5
  import { cn } from '@/utils';
6
6
 
7
- export const DialogTitle = forwardRef<React.ElementRef<typeof Title>, React.ComponentPropsWithoutRef<typeof Title>>(
8
- function DialogTitle({ className, ...props }, ref) {
9
- return (
10
- <Title className={cn('text-lg font-semibold leading-none tracking-tight', className)} ref={ref} {...props} />
11
- );
12
- }
13
- );
7
+ export const DialogTitle = ({ className, ...props }: React.ComponentProps<typeof Title>) => {
8
+ return <Title className={cn('text-lg leading-none font-semibold tracking-tight', className)} {...props} />;
9
+ };
@@ -28,7 +28,7 @@ export function useTranslation(namespace?: TranslationNamespace): TranslatorType
28
28
  changeLanguage: i18n.changeLanguage.bind(i18n),
29
29
  t
30
30
  };
31
- }, []);
31
+ }, [resolvedLanguage]);
32
32
 
33
33
  useEffect(() => {
34
34
  i18n.addEventListener('languageChange', setResolvedLanguage);
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/Button/Button.tsx","../src/components/Card/Card.tsx","../src/components/Dialog/Dialog.tsx","../src/components/Dialog/DialogBody.tsx","../src/components/Dialog/DialogContent.tsx","../src/components/Dialog/DialogOverlay.tsx","../src/components/Dialog/DialogDescription.tsx","../src/components/Dialog/DialogFooter.tsx","../src/components/Dialog/DialogHeader.tsx","../src/components/Dialog/DialogTitle.tsx","../src/providers/CoreProvider/NotificationHub.tsx","../src/providers/CoreProvider/NotificationIcon.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Slot, Slottable } from '@radix-ui/react-slot';\nimport { cva } from 'class-variance-authority';\nimport type { VariantProps } from 'class-variance-authority';\nimport type { Simplify } from 'type-fest';\n\nimport { cn } from '@/utils';\n\nexport const BUTTON_ICON_SIZE = {\n lg: 18,\n md: 16,\n sm: 14\n};\n\nexport const buttonVariants = cva(\n 'flex items-center justify-center whitespace-nowrap cursor-pointer rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',\n {\n defaultVariants: {\n size: 'md',\n variant: 'primary'\n },\n variants: {\n size: {\n icon: 'p-1.5 aspect-square',\n lg: 'h-10 rounded-md px-8 text-base',\n md: 'h-9 px-4 py-2',\n sm: 'h-8 rounded-md px-3 text-xs'\n },\n variant: {\n danger: 'bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/70',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n outline: 'border border-input bg-inherit shadow-xs',\n primary: 'bg-primary text-primary-foreground shadow-sm hover:bg-primary/90',\n secondary: 'bg-secondary border text-secondary-foreground shadow-xs hover:bg-secondary/10'\n }\n }\n }\n);\n\nexport type ButtonProps = Simplify<\n React.ButtonHTMLAttributes<HTMLButtonElement> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n /** @deprecated - use children */\n label?: string;\n }\n>;\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n { asChild, children, className, label, size = 'md', variant = 'primary', ...props },\n ref\n) {\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp className={cn(buttonVariants({ className, size, variant }))} ref={ref} {...props}>\n {label}\n <Slottable>{children}</Slottable>\n </Comp>\n );\n});\n","import * as React from 'react';\n\nimport { cn } from '@/utils';\n\nconst CardRoot = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(function CardRoot(\n { className, ...props },\n ref\n) {\n return (\n <div\n className={cn('bg-card text-card-foreground rounded-xl border shadow-sm', className)}\n data-testid=\"card\"\n ref={ref}\n {...props}\n />\n );\n});\n\nexport const Card = Object.assign(CardRoot, {\n Content: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('p-6 pt-0', className)} {...props} />\n ),\n Description: ({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>) => (\n <p className={cn('text-muted-foreground text-sm', className)} {...props} />\n ),\n Footer: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => {\n return <div className={cn('flex items-center p-6 pt-0', className)} {...props} />;\n },\n Header: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />\n ),\n Title: ({ children, className, ...props }: React.HTMLAttributes<HTMLHeadingElement>) => (\n <h3 className={cn('leading-none font-semibold tracking-tight', className)} {...props}>\n {children}\n </h3>\n )\n});\n","import { Root, Trigger } from '@radix-ui/react-dialog';\n\nimport { DialogBody } from './DialogBody';\nimport { DialogContent } from './DialogContent';\nimport { DialogDescription } from './DialogDescription';\nimport { DialogFooter } from './DialogFooter';\nimport { DialogHeader } from './DialogHeader';\nimport { DialogTitle } from './DialogTitle';\n\nexport const Dialog = Object.assign(Root.bind(null), {\n Body: DialogBody,\n Content: DialogContent,\n Description: DialogDescription,\n Footer: DialogFooter,\n Header: DialogHeader,\n Title: DialogTitle,\n Trigger\n});\n","import * as React from 'react';\n\nimport { cn } from '@/utils';\n\nexport const DialogBody = ({\n children,\n className,\n ...props\n}: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => {\n return (\n <div className={cn('py-4', className)} {...props}>\n {children}\n </div>\n );\n};\n","import { forwardRef } from 'react';\n\nimport { Close, Content, Portal } from '@radix-ui/react-dialog';\nimport { XIcon } from 'lucide-react';\n\nimport { cn } from '@/utils';\n\nimport { DialogOverlay } from './DialogOverlay';\n\nexport const DialogContent = forwardRef<\n React.ElementRef<typeof Content>,\n React.ComponentPropsWithoutRef<typeof Content>\n>(function DialogContent({ children, className, ...props }, ref) {\n return (\n <Portal>\n <DialogOverlay />\n <Content\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg',\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n <Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none\">\n <XIcon className=\"h-4 w-4\" />\n </Close>\n </Content>\n </Portal>\n );\n});\n","import { forwardRef } from 'react';\n\nimport { Overlay } from '@radix-ui/react-dialog';\n\nimport { cn } from '@/utils';\n\nexport const DialogOverlay = forwardRef<\n React.ElementRef<typeof Overlay>,\n React.ComponentPropsWithoutRef<typeof Overlay>\n>(function DialogOverlay({ className, ...props }, ref) {\n return (\n <Overlay\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-200',\n className\n )}\n ref={ref}\n {...props}\n />\n );\n});\n","import { forwardRef } from 'react';\n\nimport { Description } from '@radix-ui/react-dialog';\n\nimport { cn } from '@/utils';\n\nexport const DialogDescription = forwardRef<\n React.ElementRef<typeof Description>,\n React.ComponentPropsWithoutRef<typeof Description>\n>(function DialogDescription({ className, ...props }, ref) {\n return <Description className={cn('text-sm text-muted-foreground', className)} ref={ref} {...props} />;\n});\n","import * as React from 'react';\n\nimport { cn } from '@/utils';\n\nexport const DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-x-2 gap-y-0.5 sm:flex-row', className)} {...props} />\n);\n","import * as React from 'react';\n\nimport { cn } from '@/utils';\n\nexport const DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n);\n","import { forwardRef } from 'react';\n\nimport { Title } from '@radix-ui/react-dialog';\n\nimport { cn } from '@/utils';\n\nexport const DialogTitle = forwardRef<React.ElementRef<typeof Title>, React.ComponentPropsWithoutRef<typeof Title>>(\n function DialogTitle({ className, ...props }, ref) {\n return (\n <Title className={cn('text-lg font-semibold leading-none tracking-tight', className)} ref={ref} {...props} />\n );\n }\n);\n","import { XIcon } from 'lucide-react';\nimport { AnimatePresence, motion } from 'motion/react';\n\nimport { Card } from '@/components/Card';\nimport { useTranslation } from '@/hooks';\nimport { useNotificationsStore } from '@/hooks/useNotificationsStore';\n\nimport { NotificationIcon } from './NotificationIcon';\n\ntype NotificationHubProps = {\n /** The number of milliseconds before the notification is automatically cleared */\n timeout?: number;\n};\n\nconst NotificationHub = ({ timeout = 5000 }: NotificationHubProps) => {\n const { t } = useTranslation('libui');\n const { dismissNotification, notifications } = useNotificationsStore();\n\n return (\n <div className=\"fixed bottom-0 z-50 w-full print:hidden\">\n <AnimatePresence>\n {notifications.map((item) => (\n <motion.div\n animate={{ height: 'auto', opacity: 1 }}\n className=\"relative max-w-sm\"\n exit={{ height: 0, opacity: 0 }}\n initial={{ height: 0, opacity: 0 }}\n key={item.id}\n transition={{ bounce: 0.1, type: 'spring' }}\n >\n <div className=\"w-full p-2\">\n <Card className=\"w-full rounded-lg p-0\">\n <div className=\"p-4\">\n <div className=\"mb-2 flex items-center\">\n <NotificationIcon type={item.type} />\n <h5 className=\"ml-3 grow font-medium text-slate-900 dark:text-slate-100\">\n {item.title ?? t(`notifications.types.${item.type}`)}\n </h5>\n <button\n className=\"inline-flex rounded-md text-slate-400 hover:text-slate-500 focus:ring-1 focus:ring-sky-500 focus:outline-hidden dark:focus:ring-sky-600\"\n type=\"button\"\n onClick={() => {\n dismissNotification(item.id);\n }}\n >\n <XIcon aria-hidden=\"true\" className=\"h-5 w-5\" />\n </button>\n </div>\n <p className=\"text-muted-foreground my-2\">{item.message}</p>\n </div>\n <motion.div\n animate={{ width: '100%' }}\n className=\"h-1 bg-slate-500\"\n initial={{ width: '0%' }}\n transition={{ duration: timeout / 1000, ease: 'linear' }}\n onAnimationComplete={() => {\n dismissNotification(item.id);\n }}\n />\n </Card>\n </div>\n </motion.div>\n ))}\n </AnimatePresence>\n </div>\n );\n};\n\nexport { NotificationHub, type NotificationHubProps };\n","import type { NotificationInterface } from '@/hooks/useNotificationsStore';\n\nexport type NotificationIconProps = {\n type: NotificationInterface['type'];\n};\n\nexport const NotificationIcon = ({ type }: NotificationIconProps) => {\n switch (type) {\n case 'error':\n return (\n <svg\n aria-hidden=\"true\"\n className=\"h-6 w-6 text-red-500\"\n data-slot=\"icon\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z\"\n fillRule=\"evenodd\"\n ></path>\n </svg>\n );\n case 'info':\n return (\n <svg\n aria-hidden=\"true\"\n className=\"h-6 w-6 text-blue-500\"\n data-slot=\"icon\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z\"\n fillRule=\"evenodd\"\n ></path>\n </svg>\n );\n case 'success':\n return (\n <svg\n aria-hidden=\"true\"\n className=\"h-6 w-6 text-green-500\"\n data-slot=\"icon\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z\"\n fillRule=\"evenodd\"\n />\n </svg>\n );\n case 'warning':\n return (\n <svg\n aria-hidden=\"true\"\n className=\"h-6 w-6 text-yellow-500\"\n data-slot=\"icon\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z\"\n fillRule=\"evenodd\"\n ></path>\n </svg>\n );\n }\n};\n"],"mappings":";;;;;;;;;;AAAA,YAAY,WAAW;AAEvB,SAAS,MAAM,iBAAiB;AAChC,SA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,WAAU,8BAA8B,eAAK,SAAQ;AAAA,WAC1D;AAAA,QACA,gBAAAA;AAAA,UAAC,OAAO;AAAA,UAAP;AAAA,YACC,SAAS,EAAE,OAAO,OAAO;AAAA,YACzB,WAAU;AAAA,YACV,SAAS,EAAE,OAAO,KAAK;AAAA,YACvB,YAAY,EAAE,UAAU,UAAU,KAAM,MAAM,SAAS;AAAA,YACvD,qBAAqB,MAAM;AACzB,kCAAoB,KAAK,EAAE;AAAA,YAC7B;AAAA;AAAA,QACF;AAAA,SACF,GACF;AAAA;AAAA,IAjCK,KAAK;AAAA,EAkCZ,CACD,GACH,GACF;AAEJ;","names":["Button","React","jsx","CardRoot","jsx","forwardRef","forwardRef","jsx","forwardRef","DialogOverlay","jsx","jsxs","forwardRef","DialogContent","forwardRef","jsx","forwardRef","DialogDescription","jsx","jsx","forwardRef","jsx","forwardRef","DialogTitle","XIcon","jsx","jsx","jsxs","XIcon"]}