@akira-io/ui 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/blocks.d.ts +27 -27
  2. package/dist/blocks.js +79 -66
  3. package/dist/blocks.js.map +1 -1
  4. package/dist/{chunk-SA5LM2GD.js → chunk-2HLBBU3O.js} +44 -20
  5. package/dist/chunk-2HLBBU3O.js.map +1 -0
  6. package/dist/{chunk-MNGNBEYN.js → chunk-3HKIYFWI.js} +263 -166
  7. package/dist/chunk-3HKIYFWI.js.map +1 -0
  8. package/dist/{chunk-UUTXPPRN.js → chunk-DW42Z75X.js} +147 -90
  9. package/dist/chunk-DW42Z75X.js.map +1 -0
  10. package/dist/{chunk-DSD7MVLL.js → chunk-I5UZAJB4.js} +13 -9
  11. package/dist/chunk-I5UZAJB4.js.map +1 -0
  12. package/dist/{chunk-JAHTUAQL.js → chunk-MCMBS2SB.js} +6 -5
  13. package/dist/chunk-MCMBS2SB.js.map +1 -0
  14. package/dist/{chunk-YOVY3KT6.js → chunk-NGMG2UWX.js} +3 -3
  15. package/dist/{chunk-YOVY3KT6.js.map → chunk-NGMG2UWX.js.map} +1 -1
  16. package/dist/{chunk-6QM5BA7B.js → chunk-O5DZTX7D.js} +40 -23
  17. package/dist/chunk-O5DZTX7D.js.map +1 -0
  18. package/dist/{chunk-5AJFQ6C4.js → chunk-QNF4LJVT.js} +2 -2
  19. package/dist/chunk-QNF4LJVT.js.map +1 -0
  20. package/dist/{chunk-LKSM3WLK.js → chunk-SBLZ6T3D.js} +6 -5
  21. package/dist/chunk-SBLZ6T3D.js.map +1 -0
  22. package/dist/{chunk-KYWA5UYN.js → chunk-SH5QZCOW.js} +46 -28
  23. package/dist/chunk-SH5QZCOW.js.map +1 -0
  24. package/dist/chunk-UTSTTTH5.js +48 -0
  25. package/dist/chunk-UTSTTTH5.js.map +1 -0
  26. package/dist/code.d.ts +5 -2
  27. package/dist/code.js +52 -53
  28. package/dist/code.js.map +1 -1
  29. package/dist/{context-VgHq4U98.d.ts → context-OwSoVEri.d.ts} +55 -27
  30. package/dist/editor.d.ts +8 -6
  31. package/dist/editor.js +31 -18
  32. package/dist/editor.js.map +1 -1
  33. package/dist/field-DWm5NXeV.d.ts +39 -0
  34. package/dist/index.d.ts +230 -238
  35. package/dist/index.js +451 -337
  36. package/dist/index.js.map +1 -1
  37. package/dist/inertia.d.ts +1 -1
  38. package/dist/inertia.js +6 -7
  39. package/dist/inertia.js.map +1 -1
  40. package/dist/{button-B6wQRe7p.d.ts → input-Dxnsxi-f.d.ts} +6 -2
  41. package/dist/{json-viewer-BTHBACj9.d.ts → json-viewer-BARA2RCW.d.ts} +3 -2
  42. package/dist/{language-Dgjr9bm3.d.ts → language-Cv_N_53L.d.ts} +5 -2
  43. package/dist/locales/pt.d.ts +9 -9
  44. package/dist/locales/pt.js +7 -1
  45. package/dist/locales/pt.js.map +1 -1
  46. package/dist/shells.d.ts +6 -7
  47. package/dist/shells.js +9 -9
  48. package/dist/shells.js.map +1 -1
  49. package/dist/sidebar-Bp6Q46j-.d.ts +80 -0
  50. package/dist/{types-CT0rBsFc.d.ts → types-B-eGPoFD.d.ts} +3 -2
  51. package/dist/{types-B4QS3h5p.d.ts → types-cmBL8zOc.d.ts} +4 -1
  52. package/package.json +3 -3
  53. package/dist/chunk-5AJFQ6C4.js.map +0 -1
  54. package/dist/chunk-6QM5BA7B.js.map +0 -1
  55. package/dist/chunk-6X4TKSF6.js +0 -21
  56. package/dist/chunk-6X4TKSF6.js.map +0 -1
  57. package/dist/chunk-DSD7MVLL.js.map +0 -1
  58. package/dist/chunk-JAHTUAQL.js.map +0 -1
  59. package/dist/chunk-KYWA5UYN.js.map +0 -1
  60. package/dist/chunk-LKSM3WLK.js.map +0 -1
  61. package/dist/chunk-MNGNBEYN.js.map +0 -1
  62. package/dist/chunk-SA5LM2GD.js.map +0 -1
  63. package/dist/chunk-UUEWFCKT.js +0 -28
  64. package/dist/chunk-UUEWFCKT.js.map +0 -1
  65. package/dist/chunk-UUTXPPRN.js.map +0 -1
  66. package/dist/input-4uxAHW6y.d.ts +0 -5
  67. package/dist/password-input-r39y2pCT.d.ts +0 -50
  68. package/dist/sidebar-BhOIlSjt.d.ts +0 -80
package/dist/inertia.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ReactNode, ReactElement, PropsWithChildren } from 'react';
2
2
  import { d as TourLabels } from './types-u1qfmJQi.js';
3
- import { U as UrlLike, N as NavGroup, b as NavItem, S as SharedUser, B as BreadcrumbItem, c as LinkComponent } from './types-B4QS3h5p.js';
3
+ import { U as UrlLike, N as NavGroup, b as NavItem, c as SharedUser, B as BreadcrumbItem, d as LinkComponent } from './types-cmBL8zOc.js';
4
4
  import '@tanstack/react-table';
5
5
  import 'lucide-react';
6
6
 
package/dist/inertia.js CHANGED
@@ -1,11 +1,10 @@
1
- import { TourProvider } from './chunk-YOVY3KT6.js';
2
- import './chunk-5AJFQ6C4.js';
3
- import { AppSidebar, AppSidebarHeader, Breadcrumbs, NavMain, SettingsLayout } from './chunk-KYWA5UYN.js';
4
- import './chunk-MNGNBEYN.js';
1
+ import { TourProvider } from './chunk-NGMG2UWX.js';
2
+ import './chunk-QNF4LJVT.js';
3
+ import { AppSidebar, AppSidebarHeader, Breadcrumbs, NavMain, SettingsLayout } from './chunk-SH5QZCOW.js';
4
+ import './chunk-3HKIYFWI.js';
5
5
  import './chunk-L2H5GIF7.js';
6
- import './chunk-UUEWFCKT.js';
7
- import './chunk-6X4TKSF6.js';
8
- import './chunk-DSD7MVLL.js';
6
+ import './chunk-UTSTTTH5.js';
7
+ import './chunk-I5UZAJB4.js';
9
8
  import { Link, usePage, router } from '@inertiajs/react';
10
9
  import { createElement, useState, useRef, useCallback, useEffect } from 'react';
11
10
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/inertia-table-filters.ts","../src/inertia-tour-progress.ts","../src/inertia.ts"],"names":["router","useTableFilters","AppSidebar","App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AQ,KAAA,EAOP;AACb,EAAA,OAAO,cAAc,OAAA,EAAa;AAAA,IAC9B,GAAG,KAAA;AAAA,IACH,UAAA,EAAY,SAAQ,CAAE,GAAA;AAAA,IACtB,aAAA,EAAe;AAAA,GAClB,CAAA;AACL;AAEO,SAASC,gBACZ,KAAA,EAMY;AACZ,EAAA,OAAO,cAAc,cAAA,EAAoB;AAAA,IACrC,GAAG,KAAA;AAAA,IACH,WAAA,EAAa,SAAQ,CAAE,GAAA;AAAA,IACvB,aAAA,EAAe;AAAA,GAClB,CAAA;AACL;AAEO,SAAS,mBAAA,CAAoB;AAAA,EAChC,QAAA;AAAA,EACA,WAAA;AAAA,EACA;AACJ,CAAA,EAGkB;AACd,EAAA,MAAM,IAAA,GAAQ,OAAA,EAAQ,CAAE,KAAA,CAAM,SAAS,EAAC;AAExC,EAAA,OAAO,cAAc,YAAA,EAAkB;AAAA,IACnC,IAAA;AAAA,IACA,MAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA,EAAY,CAAC,QAAA,KACT,kBAAA,CAAmB,YAAY,QAAA,CAAS,IAAI,GAAG,QAAQ;AAAA,GAC9D,CAAA;AACL","file":"inertia.js","sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\n\nexport type TableFilterValue = string | string[] | number | null | undefined;\n\nexport type TableFilterQuery = Record<string, string | string[]>;\n\nexport interface TableFiltersVisitOptions {\n data: TableFilterQuery;\n only?: string[];\n preserveState: boolean;\n preserveScroll: boolean;\n replace: boolean;\n onCancelToken: (token: { cancel: () => void }) => void;\n}\n\nexport interface TableFiltersRouter {\n visit: (url: string, options: TableFiltersVisitOptions) => void;\n}\n\nexport interface TableFiltersOptions {\n url: string;\n filters: Record<string, TableFilterValue>;\n only?: string[];\n searchKey?: string;\n pageKey?: string;\n debounce?: number;\n}\n\nexport interface TableFilters {\n search: string;\n setSearch: (value: string) => void;\n filterValues: Record<string, string[]>;\n setFilter: (key: string, values: string[]) => void;\n clearFilters: () => void;\n setPage: (pageIndex: number) => void;\n apply: (changes: Record<string, TableFilterValue>) => void;\n}\n\nexport type UseTableFilters = (options: TableFiltersOptions) => TableFilters;\n\nconst DEFAULT_DEBOUNCE = 300;\n\nexport function toQuery(\n filters: Record<string, TableFilterValue>,\n): TableFilterQuery {\n const query: TableFilterQuery = {};\n\n for (const [key, value] of Object.entries(filters)) {\n if (Array.isArray(value)) {\n const values = value.filter((entry) => entry !== '');\n\n if (values.length > 0) {\n query[key] = values;\n }\n\n continue;\n }\n\n if (value === null || value === undefined || value === '') {\n continue;\n }\n\n query[key] = String(value);\n }\n\n return query;\n}\n\nexport function toFilterValues(\n filters: Record<string, TableFilterValue>,\n exclude: string[] = [],\n): Record<string, string[]> {\n const values: Record<string, string[]> = {};\n\n for (const [key, value] of Object.entries(toQuery(filters))) {\n if (exclude.includes(key)) {\n continue;\n }\n\n values[key] = Array.isArray(value) ? value : [value];\n }\n\n return values;\n}\n\nexport function createTableFiltersHook(\n router: TableFiltersRouter,\n): UseTableFilters {\n return function useTableFilters({\n url,\n filters,\n only,\n searchKey = 'search',\n pageKey = 'page',\n debounce = DEFAULT_DEBOUNCE,\n }: TableFiltersOptions): TableFilters {\n const initialSearch = filters[searchKey];\n const [search, setSearchState] = useState(\n typeof initialSearch === 'string' ? initialSearch : '',\n );\n const timer = useRef<ReturnType<typeof setTimeout> | null>(null);\n const pending = useRef<{ cancel: () => void } | null>(null);\n const state = useRef({ url, filters, only, searchKey, pageKey });\n\n state.current = { url, filters, only, searchKey, pageKey };\n\n const visit = useCallback(\n (changes: Record<string, TableFilterValue>) => {\n const current = state.current;\n\n pending.current?.cancel();\n\n router.visit(current.url, {\n data: toQuery({ ...current.filters, ...changes }),\n only: current.only,\n preserveState: true,\n preserveScroll: true,\n replace: true,\n onCancelToken: (token) => {\n pending.current = token;\n },\n });\n },\n [],\n );\n\n const cancelPendingSearch = useCallback(() => {\n if (timer.current !== null) {\n clearTimeout(timer.current);\n timer.current = null;\n }\n }, []);\n\n useEffect(() => cancelPendingSearch, [cancelPendingSearch]);\n\n const setSearch = useCallback(\n (value: string) => {\n setSearchState(value);\n cancelPendingSearch();\n\n timer.current = setTimeout(() => {\n timer.current = null;\n visit({\n [state.current.searchKey]: value,\n [state.current.pageKey]: null,\n });\n }, debounce);\n },\n [cancelPendingSearch, debounce, visit],\n );\n\n const setFilter = useCallback(\n (key: string, values: string[]) => {\n cancelPendingSearch();\n visit({ [key]: values, [state.current.pageKey]: null });\n },\n [cancelPendingSearch, visit],\n );\n\n const clearFilters = useCallback(() => {\n cancelPendingSearch();\n setSearchState('');\n\n const current = state.current;\n const cleared = Object.fromEntries(\n Object.keys(current.filters).map((key) => [key, null]),\n );\n\n visit({ ...cleared, [current.pageKey]: null });\n }, [cancelPendingSearch, visit]);\n\n const setPage = useCallback(\n (pageIndex: number) => {\n visit({\n [state.current.pageKey]:\n pageIndex > 0 ? pageIndex + 1 : null,\n });\n },\n [visit],\n );\n\n const apply = useCallback(\n (changes: Record<string, TableFilterValue>) => {\n cancelPendingSearch();\n visit({ ...changes, [state.current.pageKey]: null });\n },\n [cancelPendingSearch, visit],\n );\n\n return {\n search,\n setSearch,\n filterValues: toFilterValues(filters, [searchKey, pageKey]),\n setFilter,\n clearFilters,\n setPage,\n apply,\n };\n };\n}\n","import type { TourProgress } from '@/blocks/tour';\n\nexport function xsrfToken(): string {\n const cookie = document.cookie\n .split('; ')\n .find((entry) => entry.startsWith('XSRF-TOKEN='));\n\n return cookie ? decodeURIComponent(cookie.slice('XSRF-TOKEN='.length)) : '';\n}\n\nexport function recordTourProgress(url: string, progress: TourProgress): void {\n void fetch(url, {\n method: 'POST',\n credentials: 'same-origin',\n keepalive: true,\n headers: {\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n 'X-Requested-With': 'XMLHttpRequest',\n 'X-XSRF-TOKEN': xsrfToken(),\n },\n body: JSON.stringify({\n version: progress.version,\n last_step: progress.lastStep,\n outcome: progress.outcome,\n }),\n });\n}\n","import { Link, router, usePage } from '@inertiajs/react';\nimport {\n createElement,\n type PropsWithChildren,\n type ReactElement,\n type ReactNode,\n} from 'react';\n\nimport {\n TourProvider as BaseTourProvider,\n type TourLabels,\n type TourProgress,\n} from '@/blocks/tour';\nimport {\n createTableFiltersHook,\n type TableFilters,\n type TableFiltersOptions,\n type TableFiltersRouter,\n type TableFilterValue,\n} from '@/inertia-table-filters';\nimport { recordTourProgress } from '@/inertia-tour-progress';\nimport { AppSidebar as BaseAppSidebar } from '@/shells/app-sidebar';\nimport { AppSidebarHeader as BaseAppSidebarHeader } from '@/shells/app-sidebar-header';\nimport { Breadcrumbs as BaseBreadcrumbs } from '@/shells/breadcrumbs';\nimport { NavMain as BaseNavMain } from '@/shells/nav-main';\nimport { SettingsLayout as BaseSettingsLayout } from '@/shells/settings-layout';\nimport type {\n BreadcrumbItem,\n LinkComponent,\n NavGroup,\n NavItem,\n SharedUser,\n UrlLike,\n} from '@/types';\n\nexport const InertiaLink = Link as unknown as LinkComponent;\n\nexport type {\n TableFilters,\n TableFiltersOptions,\n TableFiltersRouter,\n TableFilterValue,\n};\n\nexport const useTableFilters = createTableFiltersHook(router);\n\nexport function useCurrentUrl(): string {\n return usePage().url;\n}\n\nexport function AppSidebar(props: {\n logo: ReactNode;\n logoHref: UrlLike;\n groups: NavGroup[];\n footerItems?: NavItem[];\n user: SharedUser;\n settingsHref: UrlLike;\n logoutHref: UrlLike;\n collapsibleGroups?: boolean;\n collapsedGroups?: string[];\n onCollapsedChange?: (collapsedGroups: string[]) => void;\n onSettingsClick?: () => void;\n onLogout?: () => void;\n}): ReactElement {\n return createElement(BaseAppSidebar, {\n ...props,\n currentUrl: usePage().url,\n linkComponent: InertiaLink,\n });\n}\n\nexport function AppSidebarHeader(props: {\n breadcrumbs?: BreadcrumbItem[];\n onSearchClick?: () => void;\n searchLabel?: string;\n}): ReactElement {\n return createElement(BaseAppSidebarHeader, {\n ...props,\n linkComponent: InertiaLink,\n });\n}\n\nexport function Breadcrumbs(props: {\n breadcrumbs: BreadcrumbItem[];\n}): ReactElement {\n return createElement(BaseBreadcrumbs, {\n ...props,\n linkComponent: InertiaLink,\n });\n}\n\nexport function NavMain(props: {\n items: NavItem[];\n label?: string;\n collapsible?: boolean;\n defaultOpen?: boolean;\n collapsedGroups?: string[];\n onCollapsedChange?: (collapsedGroups: string[]) => void;\n}): ReactElement {\n return createElement(BaseNavMain, {\n ...props,\n currentUrl: usePage().url,\n linkComponent: InertiaLink,\n });\n}\n\nexport function SettingsLayout(\n props: PropsWithChildren<{\n items: NavItem[];\n title?: string;\n description?: string;\n wide?: boolean;\n }>,\n): ReactElement {\n return createElement(BaseSettingsLayout, {\n ...props,\n currentPath: usePage().url,\n linkComponent: InertiaLink,\n });\n}\n\nexport function InertiaTourProvider({\n children,\n progressUrl,\n labels,\n}: PropsWithChildren<{\n progressUrl: (tour: string) => string;\n labels?: Partial<TourLabels>;\n}>): ReactElement {\n const seen = (usePage().props.tours ?? {}) as Record<string, number>;\n\n return createElement(BaseTourProvider, {\n seen,\n labels,\n children,\n onProgress: (progress: TourProgress) =>\n recordTourProgress(progressUrl(progress.tour), progress),\n });\n}\n"]}
1
+ {"version":3,"sources":["../src/inertia-table-filters.ts","../src/inertia-tour-progress.ts","../src/inertia.ts"],"names":["router","useTableFilters","AppSidebar","AppSidebarHeader","Breadcrumbs","NavMain","SettingsLayout"],"mappings":";;;;;;;;;;AAwCA,IAAM,gBAAA,GAAmB,GAAA;AAElB,SAAS,QACZ,OAAA,EACgB;AAChB,EAAA,MAAM,QAA0B,EAAC;AAEjC,EAAA,KAAA,MAAW,CAAC,GAAA,EAAK,KAAK,KAAK,MAAA,CAAO,OAAA,CAAQ,OAAO,CAAA,EAAG;AAChD,IAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA,EAAG;AACtB,MAAA,MAAM,SAAS,KAAA,CAAM,MAAA,CAAO,CAAC,KAAA,KAAU,UAAU,EAAE,CAAA;AAEnD,MAAA,IAAI,MAAA,CAAO,SAAS,CAAA,EAAG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EAAA,MAAM,IAAA,GAAQ,OAAA,EAAQ,CAAE,KAAA,CAAM,SAAS,EAAC;AAExC,EAAA,OAAO,cAAc,YAAA,EAAkB;AAAA,IACnC,IAAA;AAAA,IACA,MAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA,EAAY,CAAC,QAAA,KACT,kBAAA,CAAmB,YAAY,QAAA,CAAS,IAAI,GAAG,QAAQ;AAAA,GAC9D,CAAA;AACL","file":"inertia.js","sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\n\nexport type TableFilterValue = string | string[] | number | null | undefined;\n\nexport type TableFilterQuery = Record<string, string | string[]>;\n\nexport interface TableFiltersVisitOptions {\n data: TableFilterQuery;\n only?: string[];\n preserveState: boolean;\n preserveScroll: boolean;\n replace: boolean;\n onCancelToken: (token: { cancel: () => void }) => void;\n}\n\nexport interface TableFiltersRouter {\n visit: (url: string, options: TableFiltersVisitOptions) => void;\n}\n\nexport interface TableFiltersOptions {\n url: string;\n filters: Record<string, TableFilterValue>;\n only?: string[];\n searchKey?: string;\n pageKey?: string;\n debounce?: number;\n}\n\nexport interface TableFilters {\n search: string;\n setSearch: (value: string) => void;\n filterValues: Record<string, string[]>;\n setFilter: (key: string, values: string[]) => void;\n clearFilters: () => void;\n setPage: (pageIndex: number) => void;\n apply: (changes: Record<string, TableFilterValue>) => void;\n}\n\nexport type UseTableFilters = (options: TableFiltersOptions) => TableFilters;\n\nconst DEFAULT_DEBOUNCE = 300;\n\nexport function toQuery(\n filters: Record<string, TableFilterValue>,\n): TableFilterQuery {\n const query: TableFilterQuery = {};\n\n for (const [key, value] of Object.entries(filters)) {\n if (Array.isArray(value)) {\n const values = value.filter((entry) => entry !== '');\n\n if (values.length > 0) {\n query[key] = values;\n }\n\n continue;\n }\n\n if (value === null || value === undefined || value === '') {\n continue;\n }\n\n query[key] = String(value);\n }\n\n return query;\n}\n\nexport function toFilterValues(\n filters: Record<string, TableFilterValue>,\n exclude: string[] = [],\n): Record<string, string[]> {\n const values: Record<string, string[]> = {};\n\n for (const [key, value] of Object.entries(toQuery(filters))) {\n if (exclude.includes(key)) {\n continue;\n }\n\n values[key] = Array.isArray(value) ? value : [value];\n }\n\n return values;\n}\n\nexport function createTableFiltersHook(\n router: TableFiltersRouter,\n): UseTableFilters {\n return function useTableFilters({\n url,\n filters,\n only,\n searchKey = 'search',\n pageKey = 'page',\n debounce = DEFAULT_DEBOUNCE,\n }: TableFiltersOptions): TableFilters {\n const initialSearch = filters[searchKey];\n const [search, setSearchState] = useState(\n typeof initialSearch === 'string' ? initialSearch : '',\n );\n const timer = useRef<ReturnType<typeof setTimeout> | null>(null);\n const pending = useRef<{ cancel: () => void } | null>(null);\n const state = useRef({ url, filters, only, searchKey, pageKey });\n\n state.current = { url, filters, only, searchKey, pageKey };\n\n const visit = useCallback(\n (changes: Record<string, TableFilterValue>) => {\n const current = state.current;\n\n pending.current?.cancel();\n\n router.visit(current.url, {\n data: toQuery({ ...current.filters, ...changes }),\n only: current.only,\n preserveState: true,\n preserveScroll: true,\n replace: true,\n onCancelToken: (token) => {\n pending.current = token;\n },\n });\n },\n [],\n );\n\n const cancelPendingSearch = useCallback(() => {\n if (timer.current !== null) {\n clearTimeout(timer.current);\n timer.current = null;\n }\n }, []);\n\n useEffect(() => cancelPendingSearch, [cancelPendingSearch]);\n\n const setSearch = useCallback(\n (value: string) => {\n setSearchState(value);\n cancelPendingSearch();\n\n timer.current = setTimeout(() => {\n timer.current = null;\n visit({\n [state.current.searchKey]: value,\n [state.current.pageKey]: null,\n });\n }, debounce);\n },\n [cancelPendingSearch, debounce, visit],\n );\n\n const setFilter = useCallback(\n (key: string, values: string[]) => {\n cancelPendingSearch();\n visit({ [key]: values, [state.current.pageKey]: null });\n },\n [cancelPendingSearch, visit],\n );\n\n const clearFilters = useCallback(() => {\n cancelPendingSearch();\n setSearchState('');\n\n const current = state.current;\n const cleared = Object.fromEntries(\n Object.keys(current.filters).map((key) => [key, null]),\n );\n\n visit({ ...cleared, [current.pageKey]: null });\n }, [cancelPendingSearch, visit]);\n\n const setPage = useCallback(\n (pageIndex: number) => {\n visit({\n [state.current.pageKey]:\n pageIndex > 0 ? pageIndex + 1 : null,\n });\n },\n [visit],\n );\n\n const apply = useCallback(\n (changes: Record<string, TableFilterValue>) => {\n cancelPendingSearch();\n visit({ ...changes, [state.current.pageKey]: null });\n },\n [cancelPendingSearch, visit],\n );\n\n return {\n search,\n setSearch,\n filterValues: toFilterValues(filters, [searchKey, pageKey]),\n setFilter,\n clearFilters,\n setPage,\n apply,\n };\n };\n}\n","import type { TourProgress } from '@/blocks/tour';\n\nexport function xsrfToken(): string {\n const cookie = document.cookie\n .split('; ')\n .find((entry) => entry.startsWith('XSRF-TOKEN='));\n\n return cookie ? decodeURIComponent(cookie.slice('XSRF-TOKEN='.length)) : '';\n}\n\nexport function recordTourProgress(url: string, progress: TourProgress): void {\n void fetch(url, {\n method: 'POST',\n credentials: 'same-origin',\n keepalive: true,\n headers: {\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n 'X-Requested-With': 'XMLHttpRequest',\n 'X-XSRF-TOKEN': xsrfToken(),\n },\n body: JSON.stringify({\n version: progress.version,\n last_step: progress.lastStep,\n outcome: progress.outcome,\n }),\n });\n}\n","import { Link, router, usePage } from '@inertiajs/react';\nimport {\n createElement,\n type PropsWithChildren,\n type ReactElement,\n type ReactNode,\n} from 'react';\n\nimport {\n TourProvider as BaseTourProvider,\n type TourLabels,\n type TourProgress,\n} from '@/blocks/tour';\nimport {\n createTableFiltersHook,\n type TableFilters,\n type TableFiltersOptions,\n type TableFiltersRouter,\n type TableFilterValue,\n} from '@/inertia-table-filters';\nimport { recordTourProgress } from '@/inertia-tour-progress';\nimport { AppSidebar as BaseAppSidebar } from '@/shells/app-sidebar';\nimport { AppSidebarHeader as BaseAppSidebarHeader } from '@/shells/app-sidebar-header';\nimport { Breadcrumbs as BaseBreadcrumbs } from '@/shells/breadcrumbs';\nimport { NavMain as BaseNavMain } from '@/shells/nav-main';\nimport { SettingsLayout as BaseSettingsLayout } from '@/shells/settings-layout';\nimport type {\n BreadcrumbItem,\n LinkComponent,\n NavGroup,\n NavItem,\n SharedUser,\n UrlLike,\n} from '@/types';\n\nexport const InertiaLink = Link as unknown as LinkComponent;\n\nexport type {\n TableFilters,\n TableFiltersOptions,\n TableFiltersRouter,\n TableFilterValue,\n};\n\nexport const useTableFilters = createTableFiltersHook(router);\n\nexport function useCurrentUrl(): string {\n return usePage().url;\n}\n\nexport function AppSidebar(props: {\n logo: ReactNode;\n logoHref: UrlLike;\n groups: NavGroup[];\n footerItems?: NavItem[];\n user: SharedUser;\n settingsHref: UrlLike;\n logoutHref: UrlLike;\n collapsibleGroups?: boolean;\n collapsedGroups?: string[];\n onCollapsedChange?: (collapsedGroups: string[]) => void;\n onSettingsClick?: () => void;\n onLogout?: () => void;\n}): ReactElement {\n return createElement(BaseAppSidebar, {\n ...props,\n currentUrl: usePage().url,\n linkComponent: InertiaLink,\n });\n}\n\nexport function AppSidebarHeader(props: {\n breadcrumbs?: BreadcrumbItem[];\n onSearchClick?: () => void;\n searchLabel?: string;\n}): ReactElement {\n return createElement(BaseAppSidebarHeader, {\n ...props,\n linkComponent: InertiaLink,\n });\n}\n\nexport function Breadcrumbs(props: {\n breadcrumbs: BreadcrumbItem[];\n}): ReactElement {\n return createElement(BaseBreadcrumbs, {\n ...props,\n linkComponent: InertiaLink,\n });\n}\n\nexport function NavMain(props: {\n items: NavItem[];\n label?: string;\n collapsible?: boolean;\n defaultOpen?: boolean;\n collapsedGroups?: string[];\n onCollapsedChange?: (collapsedGroups: string[]) => void;\n}): ReactElement {\n return createElement(BaseNavMain, {\n ...props,\n currentUrl: usePage().url,\n linkComponent: InertiaLink,\n });\n}\n\nexport function SettingsLayout(\n props: PropsWithChildren<{\n items: NavItem[];\n title?: string;\n description?: string;\n wide?: boolean;\n }>,\n): ReactElement {\n return createElement(BaseSettingsLayout, {\n ...props,\n currentPath: usePage().url,\n linkComponent: InertiaLink,\n });\n}\n\nexport function InertiaTourProvider({\n children,\n progressUrl,\n labels,\n}: PropsWithChildren<{\n progressUrl: (tour: string) => string;\n labels?: Partial<TourLabels>;\n}>): ReactElement {\n const seen = (usePage().props.tours ?? {}) as Record<string, number>;\n\n return createElement(BaseTourProvider, {\n seen,\n labels,\n children,\n onProgress: (progress: TourProgress) =>\n recordTourProgress(progressUrl(progress.tour), progress),\n });\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  import * as class_variance_authority_types from 'class-variance-authority/types';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import * as React from 'react';
4
+ import { S as SlotNameProps } from './types-cmBL8zOc.js';
4
5
 
5
6
  declare const buttonVariants: (props?: ({
6
7
  variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
@@ -10,7 +11,10 @@ interface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeo
10
11
  asChild?: boolean;
11
12
  loading?: boolean;
12
13
  loadingLabel?: string;
14
+ slotName?: string;
13
15
  }
14
- declare function Button({ className, variant, size, asChild, loading, loadingLabel, disabled, children, onClick, ...props }: ButtonProps): React.JSX.Element;
16
+ declare function Button({ className, variant, size, asChild, loading, loadingLabel, slotName, disabled, children, onClick, ...props }: ButtonProps): React.JSX.Element;
15
17
 
16
- export { Button as B, type ButtonProps as a, buttonVariants as b };
18
+ declare function Input({ className, type, slotName, ...props }: React.ComponentProps<'input'> & SlotNameProps): React.JSX.Element;
19
+
20
+ export { Button as B, Input as I, type ButtonProps as a, buttonVariants as b };
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { S as SlotNameProps } from './types-cmBL8zOc.js';
2
3
 
3
4
  interface CodeBlockLabels {
4
5
  copyLabel: string;
@@ -20,7 +21,7 @@ interface CodeBlockProps extends Omit<React.ComponentProps<'div'>, 'children'> {
20
21
  expandLabel?: CodeBlockLabels['expandLabel'];
21
22
  collapseLabel?: CodeBlockLabels['collapseLabel'];
22
23
  }
23
- declare function CodeBlock({ code, language, html, filename, lineNumbers, highlightLines, maxHeight, copyLabel, copiedLabel, expandLabel, collapseLabel, className, ...props }: CodeBlockProps): React.JSX.Element;
24
+ declare function CodeBlock({ code, language, html, filename, lineNumbers, highlightLines, maxHeight, copyLabel, copiedLabel, expandLabel, collapseLabel, className, slotName, ...props }: CodeBlockProps & SlotNameProps): React.JSX.Element;
24
25
 
25
26
  interface JsonNodeLabels {
26
27
  expandLabel: string;
@@ -45,6 +46,6 @@ interface JsonViewerProps extends Omit<React.ComponentProps<'div'>, 'children'>
45
46
  circularLabel?: JsonViewerLabels['circularLabel'];
46
47
  entriesLabel?: JsonViewerLabels['entriesLabel'];
47
48
  }
48
- declare function JsonViewer({ value, initialDepth, maxHeight, copyLabel, copiedLabel, expandLabel, collapseLabel, circularLabel, entriesLabel, className, ...props }: JsonViewerProps): React.JSX.Element;
49
+ declare function JsonViewer({ value, initialDepth, maxHeight, copyLabel, copiedLabel, expandLabel, collapseLabel, circularLabel, entriesLabel, className, slotName, ...props }: JsonViewerProps & SlotNameProps): React.JSX.Element;
49
50
 
50
51
  export { CodeBlock as C, JsonViewer as J, type CodeBlockLabels as a, type CodeBlockProps as b, type JsonViewerLabels as c, type JsonViewerProps as d, codeBlockLabels as e, jsonViewerLabels as j };
@@ -4,11 +4,14 @@ declare const nestedRadius = "rounded-2xl";
4
4
  declare const nestedSurfaceReset = "nested-surface:border-0 nested-surface:ring-0 nested-surface:bg-transparent nested-surface:shadow-none nested-surface:backdrop-blur-none";
5
5
  declare const nestedEdgeToEdge = "nested-surface:rounded-none";
6
6
  declare const controlFill = "bg-surface-control";
7
- declare const focusRing = "outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50";
7
+ declare const focusRing = "focus-visible:outline-solid focus-visible:outline-1 focus-visible:outline-offset-0 focus-visible:outline-ring";
8
8
  declare const menuHighlight = "outline-hidden focus:bg-accent focus:text-accent-foreground";
9
9
  interface SurfaceProps {
10
10
  inset?: boolean;
11
11
  }
12
+ interface FlatSurfaceProps extends SurfaceProps {
13
+ flat?: boolean;
14
+ }
12
15
  declare function surface(inset?: boolean | null): string;
13
16
 
14
- export { type SurfaceProps as S, nestedRadius as a, nestedSurfaceReset as b, controlFill as c, elevatedSurface as e, focusRing as f, menuHighlight as m, nestedEdgeToEdge as n, recessedSurface as r, surface as s };
17
+ export { type FlatSurfaceProps as F, type SurfaceProps as S, nestedRadius as a, nestedSurfaceReset as b, controlFill as c, elevatedSurface as e, focusRing as f, menuHighlight as m, nestedEdgeToEdge as n, recessedSurface as r, surface as s };
@@ -1,19 +1,19 @@
1
- import { E as AppearanceToggleLabels, I as ComboboxLabels, ah as CommandPaletteLabels, L as ConfirmDialogLabels, C as CopyButtonLabels, P as DataTableFacetedFilterLabels, R as DataTableLabels, a as DateFilterLabels, b as DateFilterOption, X as DatePickerLabels, _ as DateRangeFilterLabels, F as FloatingSheetLabels, v as UiLabels, a3 as SaveStatusLabels, q as SettingsLabels } from '../context-VgHq4U98.js';
2
- import { e as DangerZoneLabels, a as FormOverlayLabels, i as TwoFactorLabels } from '../types-CT0rBsFc.js';
1
+ import { G as AlertLabels, J as AppearanceToggleLabels, M as ComboboxLabels, ar as CommandPaletteLabels, Q as ConfirmDialogLabels, C as CopyButtonLabels, W as DataTableFacetedFilterLabels, Y as DataTableLabels, a as DateFilterLabels, b as DateFilterOption, a0 as DatePickerLabels, a3 as DateRangeFilterLabels, F as FloatingSheetLabels, a7 as PasswordInputLabels, v as UiLabels, ab as SaveStatusLabels, q as SettingsLabels } from '../context-OwSoVEri.js';
2
+ import { e as DangerZoneLabels, a as FormOverlayLabels, i as TwoFactorLabels } from '../types-B-eGPoFD.js';
3
3
  import { d as TourLabels } from '../types-u1qfmJQi.js';
4
- import { a as CodeBlockLabels, c as JsonViewerLabels } from '../json-viewer-BTHBACj9.js';
5
- import { f as FieldLabels, h as PasswordInputLabels } from '../password-input-r39y2pCT.js';
4
+ import { a as CodeBlockLabels, c as JsonViewerLabels } from '../json-viewer-BARA2RCW.js';
5
+ import { f as FieldLabels } from '../field-DWm5NXeV.js';
6
6
  import 'react';
7
7
  import 'lucide-react';
8
- import '../types-B4QS3h5p.js';
8
+ import '../types-cmBL8zOc.js';
9
9
  import '@tanstack/react-table';
10
- import 'class-variance-authority';
11
- import '../button-B6wQRe7p.js';
12
10
  import 'class-variance-authority/types';
11
+ import 'class-variance-authority';
12
+ import '../input-Dxnsxi-f.js';
13
13
  import '@radix-ui/react-slot';
14
14
  import '@radix-ui/react-label';
15
- import '../input-4uxAHW6y.js';
16
15
 
16
+ declare const alertLabelsPt: AlertLabels;
17
17
  declare const appearanceToggleLabelsPt: AppearanceToggleLabels;
18
18
  declare const dataTableLabelsPt: DataTableLabels;
19
19
  declare const floatingSheetLabelsPt: FloatingSheetLabels;
@@ -40,4 +40,4 @@ declare const codeBlockLabelsPt: CodeBlockLabels;
40
40
  declare const jsonViewerLabelsPt: JsonViewerLabels;
41
41
  declare const ptLabels: UiLabels;
42
42
 
43
- export { appearanceToggleLabelsPt, codeBlockLabelsPt, comboboxLabelsPt, commandPaletteLabelsPt, confirmDialogLabelsPt, copyButtonLabelsPt, dangerZoneLabelsPt, dataTableFacetedFilterLabelsPt, dataTableLabelsPt, dateFilterLabelsPt, dateFilterOperatorsPt, dateFilterPresetsPt, dateFilterUnitsPt, datePickerLabelsPt, dateRangeFilterLabelsPt, fieldLabelsPt, floatingSheetLabelsPt, formOverlayLabelsPt, jsonViewerLabelsPt, passwordInputLabelsPt, ptLabels, saveStatusLabelsPt, settingsLabelsPt, tourLabelsPt, twoFactorLabelsPt };
43
+ export { alertLabelsPt, appearanceToggleLabelsPt, codeBlockLabelsPt, comboboxLabelsPt, commandPaletteLabelsPt, confirmDialogLabelsPt, copyButtonLabelsPt, dangerZoneLabelsPt, dataTableFacetedFilterLabelsPt, dataTableLabelsPt, dateFilterLabelsPt, dateFilterOperatorsPt, dateFilterPresetsPt, dateFilterUnitsPt, datePickerLabelsPt, dateRangeFilterLabelsPt, fieldLabelsPt, floatingSheetLabelsPt, formOverlayLabelsPt, jsonViewerLabelsPt, passwordInputLabelsPt, ptLabels, saveStatusLabelsPt, settingsLabelsPt, tourLabelsPt, twoFactorLabelsPt };
@@ -1,4 +1,8 @@
1
1
  // src/locales/pt.ts
2
+ var alertLabelsPt = {
3
+ warningLabel: "Aviso",
4
+ infoLabel: "Informa\xE7\xE3o"
5
+ };
2
6
  var appearanceToggleLabelsPt = {
3
7
  groupLabel: "Apar\xEAncia",
4
8
  lightLabel: "Claro",
@@ -179,6 +183,7 @@ var jsonViewerLabelsPt = {
179
183
  entriesLabel: (count) => `${count} ${count === 1 ? "entrada" : "entradas"}`
180
184
  };
181
185
  var ptLabels = {
186
+ alert: alertLabelsPt,
182
187
  codeBlock: codeBlockLabelsPt,
183
188
  combobox: comboboxLabelsPt,
184
189
  commandPalette: commandPaletteLabelsPt,
@@ -195,11 +200,12 @@ var ptLabels = {
195
200
  dateRangeFilter: dateRangeFilterLabelsPt,
196
201
  floatingSheet: floatingSheetLabelsPt,
197
202
  jsonViewer: jsonViewerLabelsPt,
203
+ passwordInput: passwordInputLabelsPt,
198
204
  saveStatus: saveStatusLabelsPt,
199
205
  settings: settingsLabelsPt,
200
206
  tour: tourLabelsPt
201
207
  };
202
208
 
203
- export { appearanceToggleLabelsPt, codeBlockLabelsPt, comboboxLabelsPt, commandPaletteLabelsPt, confirmDialogLabelsPt, copyButtonLabelsPt, dangerZoneLabelsPt, dataTableFacetedFilterLabelsPt, dataTableLabelsPt, dateFilterLabelsPt, dateFilterOperatorsPt, dateFilterPresetsPt, dateFilterUnitsPt, datePickerLabelsPt, dateRangeFilterLabelsPt, fieldLabelsPt, floatingSheetLabelsPt, formOverlayLabelsPt, jsonViewerLabelsPt, passwordInputLabelsPt, ptLabels, saveStatusLabelsPt, settingsLabelsPt, tourLabelsPt, twoFactorLabelsPt };
209
+ export { alertLabelsPt, appearanceToggleLabelsPt, codeBlockLabelsPt, comboboxLabelsPt, commandPaletteLabelsPt, confirmDialogLabelsPt, copyButtonLabelsPt, dangerZoneLabelsPt, dataTableFacetedFilterLabelsPt, dataTableLabelsPt, dateFilterLabelsPt, dateFilterOperatorsPt, dateFilterPresetsPt, dateFilterUnitsPt, datePickerLabelsPt, dateRangeFilterLabelsPt, fieldLabelsPt, floatingSheetLabelsPt, formOverlayLabelsPt, jsonViewerLabelsPt, passwordInputLabelsPt, ptLabels, saveStatusLabelsPt, settingsLabelsPt, tourLabelsPt, twoFactorLabelsPt };
204
210
  //# sourceMappingURL=pt.js.map
205
211
  //# sourceMappingURL=pt.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/locales/pt.ts"],"names":[],"mappings":";AA0BO,IAAM,wBAAA,GAAmD;AAAA,EAC5D,UAAA,EAAY,cAAA;AAAA,EACZ,UAAA,EAAY,OAAA;AAAA,EACZ,SAAA,EAAW,QAAA;AAAA,EACX,WAAA,EAAa;AACjB;AAEO,IAAM,iBAAA,GAAqC;AAAA,EAC9C,iBAAA,EAAmB,cAAA;AAAA,EACnB,UAAA,EAAY,eAAA;AAAA,EACZ,WAAA,EAAa,MAAA;AAAA,EACb,iBAAA,EAAmB,gBAAA;AAAA,EACnB,iBAAiB,CAAC,IAAA,EAAM,UAAU,CAAA,UAAA,EAAU,IAAI,OAAO,KAAK,CAAA,CAAA;AAAA,EAC5D,cAAA,EAAgB,mBAAA;AAAA,EAChB,YAAY,CAAC,KAAA,KAAU,GAAG,KAAA,CAAM,cAAA,CAAe,OAAO,CAAC,CAAA,SAAA;AAC3D;AAEO,IAAM,qBAAA,GAA6C;AAAA,EACtD,SAAA,EAAW,QAAA;AAAA,EACX,UAAA,EAAY;AAChB;AAEO,IAAM,mBAAA,GAAyC;AAAA,EAClD,WAAA,EAAa,UAAA;AAAA,EACb,SAAA,EAAW,SAAA;AAAA,EACX,WAAA,EAAa;AACjB;AAEO,IAAM,uBAAA,GAAiD;AAAA,EAC1D,UAAA,EAAY,YAAA;AAAA,EACZ,UAAA,EAAY;AAChB;AAEO,IAAM,k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,EAAwB,8BAAA;AAAA,EACxB,UAAA,EAAY,kBAAA;AAAA,EACZ,mBAAA,EAAqB,qBAAA;AAAA,EACrB,iBAAA,EAAmB,mBAAA;AAAA,EACnB,eAAA,EAAiB,iBAAA;AAAA,EACjB,UAAA,EAAY,kBAAA;AAAA,EACZ,eAAA,EAAiB,uBAAA;AAAA,EACjB,aAAA,EAAe,qBAAA;AAAA,EACf,UAAA,EAAY,kBAAA;AAAA,EACZ,UAAA,EAAY,kBAAA;AAAA,EACZ,QAAA,EAAU,gBAAA;AAAA,EACV,IAAA,EAAM;AACV","file":"pt.js","sourcesContent":["import type { CommandPaletteLabels } from '@/blocks/command-palette';\nimport type { DangerZoneLabels } from '@/blocks/danger-zone';\nimport type {\n DateFilterLabels,\n DateFilterOption,\n} from '@/blocks/date-filter/types';\nimport type { FormOverlayLabels } from '@/blocks/form-overlay';\nimport type { SettingsLabels } from '@/blocks/settings-page';\nimport type { TourLabels } from '@/blocks/tour/types';\nimport type { TwoFactorLabels } from '@/blocks/two-factor/types';\nimport type { AppearanceToggleLabels } from '@/components/ui/appearance-toggle';\nimport type { CodeBlockLabels } from '@/components/ui/code-block';\nimport type { ComboboxLabels } from '@/components/ui/combobox';\nimport type { ConfirmDialogLabels } from '@/components/ui/confirm-dialog';\nimport type { CopyButtonLabels } from '@/components/ui/copy-button';\nimport type { DataTableLabels } from '@/components/ui/data-table';\nimport type { DataTableFacetedFilterLabels } from '@/components/ui/data-table-faceted-filter';\nimport type { DatePickerLabels } from '@/components/ui/date-picker';\nimport type { DateRangeFilterLabels } from '@/components/ui/date-range-filter';\nimport type { FieldLabels } from '@/components/ui/field';\nimport type { FloatingSheetLabels } from '@/components/ui/floating-sheet';\nimport type { JsonViewerLabels } from '@/components/ui/json-viewer';\nimport type { PasswordInputLabels } from '@/components/ui/password-input';\nimport type { SaveStatusLabels } from '@/components/ui/save-status';\nimport type { UiLabels } from '@/locales/context';\n\nexport const appearanceToggleLabelsPt: AppearanceToggleLabels = {\n groupLabel: 'Aparência',\n lightLabel: 'Claro',\n darkLabel: 'Escuro',\n systemLabel: 'Sistema',\n};\n\nexport const dataTableLabelsPt: DataTableLabels = {\n searchPlaceholder: 'Pesquisar...',\n emptyLabel: 'Sem registos.',\n createLabel: 'Novo',\n clearFiltersLabel: 'Limpar filtros',\n paginationLabel: (page, pages) => `Página ${page} de ${pages}`,\n noOptionsLabel: 'Sem opções.',\n totalLabel: (total) => `${total.toLocaleString('pt-PT')} registos`,\n};\n\nexport const floatingSheetLabelsPt: FloatingSheetLabels = {\n backLabel: 'Voltar',\n closeLabel: 'Fechar',\n};\n\nexport const formOverlayLabelsPt: FormOverlayLabels = {\n cancelLabel: 'Cancelar',\n saveLabel: 'Guardar',\n savingLabel: 'A guardar...',\n};\n\nexport const dateRangeFilterLabelsPt: DateRangeFilterLabels = {\n emptyLabel: 'Período',\n dateFormat: 'dd/MM/yy',\n};\n\nexport const datePickerLabelsPt: DatePickerLabels = {\n placeholder: 'Escolha uma data',\n dateFormat: 'dd/MM/yy',\n clearLabel: 'Limpar data',\n};\n\nexport const comboboxLabelsPt: ComboboxLabels = {\n placeholder: 'Seleccione uma opção',\n searchPlaceholder: 'Pesquisar...',\n emptyText: 'Sem resultados.',\n};\n\nexport const confirmDialogLabelsPt: ConfirmDialogLabels = {\n title: 'Confirmar Ação',\n description:\n 'Tem a certeza que pretende continuar? Esta ação não pode ser desfeita.',\n confirmText: 'Confirmar',\n cancelText: 'Cancelar',\n};\n\nexport const fieldLabelsPt: FieldLabels = {\n requiredLabel: 'Obrigatório',\n};\n\nexport const passwordInputLabelsPt: PasswordInputLabels = {\n showLabel: 'Mostrar palavra-passe',\n hideLabel: 'Ocultar palavra-passe',\n};\n\nexport const dataTableFacetedFilterLabelsPt: DataTableFacetedFilterLabels = {\n noOptionsLabel: 'Sem opções.',\n};\n\nexport const commandPaletteLabelsPt: CommandPaletteLabels = {\n placeholder: 'Pesquisar...',\n noResultsLabel: 'Nenhum resultado encontrado',\n};\n\nexport const tourLabelsPt: TourLabels = {\n next: 'Seguinte',\n previous: 'Anterior',\n done: 'Concluir',\n progress: '{{current}} de {{total}}',\n};\n\nexport const dateFilterPresetsPt: DateFilterOption[] = [\n { value: 'today', label: 'Hoje' },\n { value: 'yesterday', label: 'Ontem' },\n { value: 'previous_week', label: 'Semana anterior' },\n { value: 'previous_7_days', label: 'Últimos 7 dias' },\n { value: 'previous_30_days', label: 'Últimos 30 dias' },\n { value: 'previous_month', label: 'Mês anterior' },\n { value: 'previous_3_months', label: 'Últimos 3 meses' },\n { value: 'previous_12_months', label: 'Últimos 12 meses' },\n];\n\nexport const dateFilterOperatorsPt: DateFilterOption[] = [\n { value: 'between', label: 'Entre' },\n { value: 'before', label: 'Antes de' },\n { value: 'on', label: 'Em' },\n { value: 'after', label: 'Depois de' },\n];\n\nexport const dateFilterUnitsPt: DateFilterOption[] = [\n { value: 'day', label: 'dias' },\n { value: 'week', label: 'semanas' },\n { value: 'month', label: 'meses' },\n { value: 'quarter', label: 'trimestres' },\n { value: 'year', label: 'anos' },\n];\n\nexport const dateFilterLabelsPt: DateFilterLabels = {\n all: 'Todo o período',\n fixed: 'Intervalo fixo...',\n relative: 'Intervalo relativo...',\n relativeTitle: 'Intervalo relativo',\n apply: 'Aplicar filtro',\n back: 'Voltar',\n latest: 'Últimos',\n ago: 'há',\n includeCurrent: 'Incluir período atual',\n startingAgo: 'A começar há',\n removeOffset: 'Remover deslocamento',\n fallback: 'Data',\n};\n\nexport const settingsLabelsPt: SettingsLabels = {\n back: 'Voltar',\n};\n\nexport const saveStatusLabelsPt: SaveStatusLabels = {\n error: 'Não foi possível guardar as alterações',\n idle: 'As alterações são guardadas automaticamente',\n saved: 'Guardado',\n saving: 'A guardar',\n};\n\nexport const copyButtonLabelsPt: CopyButtonLabels = {\n copyLabel: 'Copiar',\n copiedLabel: 'Copiado',\n};\n\nexport const twoFactorLabelsPt: TwoFactorLabels = {\n setupTitle: 'Autenticação de dois fatores',\n setupDescription:\n 'Acrescente um segundo passo ao seu início de sessão com uma aplicação autenticadora.',\n pendingLabel: 'A preparar a sua chave de configuração',\n scanTitle: 'Leia o código',\n scanDescription:\n 'Abra a aplicação autenticadora e leia o código abaixo para adicionar esta conta.',\n qrFallbackLabel: 'O código QR ainda não está disponível.',\n manualKeyLabel: 'Chave de configuração',\n manualKeyDescription:\n 'Introduza esta chave manualmente se a aplicação não conseguir ler o código.',\n manualKeyRevealLabel: 'Mostrar chave',\n manualKeyHideLabel: 'Ocultar chave',\n continueLabel: 'Continuar',\n confirmTitle: 'Confirme o código',\n confirmDescription:\n 'Introduza o código de seis dígitos apresentado na aplicação autenticadora.',\n codeLabel: 'Código de autenticação',\n recoveryCodeLabel: 'Código de recuperação',\n recoveryCodePlaceholder: 'Introduza um código de recuperação',\n useRecoveryCodeLabel: 'Usar um código de recuperação',\n useCodeLabel: 'Usar um código de autenticação',\n verifyLabel: 'Verificar',\n verifyingLabel: 'A verificar',\n errorFallbackLabel: 'Não resultou. Tente novamente.',\n cancelLabel: 'Cancelar',\n challengeTitle: 'Confirmação em dois passos',\n challengeDescription:\n 'Confirme o acesso à sua conta com o código da aplicação autenticadora.',\n recoveryTitle: 'Códigos de recuperação',\n recoveryDescription:\n 'Guarde estes códigos em lugar seguro. Cada um permite um início de sessão se perder o dispositivo.',\n recoveryWarning:\n 'São mostrados uma única vez e não podem ser lidos depois.',\n revealLabel: 'Mostrar códigos',\n hideLabel: 'Ocultar códigos',\n copyLabel: 'Copiar',\n copiedLabel: 'Copiado',\n copyFailedLabel:\n 'Não é possível copiar aqui. Selecione os códigos manualmente.',\n regenerateLabel: 'Gerar novos códigos',\n doneLabel: 'Concluir',\n disableLabel: 'Desativar autenticação de dois fatores',\n disableTitle: 'Desativar autenticação de dois fatores',\n disableDescription:\n 'A sua conta fica protegida apenas pela palavra-passe. Os códigos de recuperação deixam de funcionar.',\n disableConfirmLabel: 'Desativar',\n disableCancelLabel: 'Manter ativa',\n};\n\nexport const dangerZoneLabelsPt: DangerZoneLabels = {\n title: 'Zona de perigo',\n description: 'Estas ações são permanentes e não podem ser desfeitas.',\n actionLabel: 'Eliminar',\n confirmTitle: 'Confirmar Ação',\n confirmDescription:\n 'Tem a certeza que pretende continuar? Esta ação não pode ser desfeita.',\n confirmText: 'Confirmar',\n cancelText: 'Cancelar',\n requiredValueLabel: 'Escreva {{value}} para confirmar',\n};\n\nexport const codeBlockLabelsPt: CodeBlockLabels = {\n copyLabel: 'Copiar',\n copiedLabel: 'Copiado',\n expandLabel: 'Expandir',\n collapseLabel: 'Recolher',\n};\n\nexport const jsonViewerLabelsPt: JsonViewerLabels = {\n copyLabel: 'Copiar',\n copiedLabel: 'Copiado',\n expandLabel: 'Expandir',\n collapseLabel: 'Recolher',\n circularLabel: 'Referência circular',\n entriesLabel: (count) => `${count} ${count === 1 ? 'entrada' : 'entradas'}`,\n};\n\nexport const ptLabels: UiLabels = {\n codeBlock: codeBlockLabelsPt,\n combobox: comboboxLabelsPt,\n commandPalette: commandPaletteLabelsPt,\n confirmDialog: confirmDialogLabelsPt,\n appearanceToggle: appearanceToggleLabelsPt,\n copyButton: copyButtonLabelsPt,\n dataTable: dataTableLabelsPt,\n dataTableFacetedFilter: dataTableFacetedFilterLabelsPt,\n dateFilter: dateFilterLabelsPt,\n dateFilterOperators: dateFilterOperatorsPt,\n dateFilterPresets: dateFilterPresetsPt,\n dateFilterUnits: dateFilterUnitsPt,\n datePicker: datePickerLabelsPt,\n dateRangeFilter: dateRangeFilterLabelsPt,\n floatingSheet: floatingSheetLabelsPt,\n jsonViewer: jsonViewerLabelsPt,\n saveStatus: saveStatusLabelsPt,\n settings: settingsLabelsPt,\n tour: tourLabelsPt,\n};\n"]}
1
+ {"version":3,"sources":["../../src/locales/pt.ts"],"names":[],"mappings":";AA2BO,IAAM,aAAA,GAA6B;AAAA,EACtC,YAAA,EAAc,OAAA;AAAA,EACd,SAAA,EAAW;AACf;AAEO,IAAM,wBAAA,GAAmD;AAAA,EAC5D,UAAA,EAAY,cAAA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ks/command-palette';\nimport type { DangerZoneLabels } from '@/blocks/danger-zone';\nimport type {\n DateFilterLabels,\n DateFilterOption,\n} from '@/blocks/date-filter/types';\nimport type { FormOverlayLabels } from '@/blocks/form-overlay';\nimport type { SettingsLabels } from '@/blocks/settings-page';\nimport type { TourLabels } from '@/blocks/tour/types';\nimport type { TwoFactorLabels } from '@/blocks/two-factor/types';\nimport type { AlertLabels } from '@/components/ui/alert';\nimport type { AppearanceToggleLabels } from '@/components/ui/appearance-toggle';\nimport type { CodeBlockLabels } from '@/components/ui/code-block';\nimport type { ComboboxLabels } from '@/components/ui/combobox';\nimport type { ConfirmDialogLabels } from '@/components/ui/confirm-dialog';\nimport type { CopyButtonLabels } from '@/components/ui/copy-button';\nimport type { DataTableLabels } from '@/components/ui/data-table';\nimport type { DataTableFacetedFilterLabels } from '@/components/ui/data-table-faceted-filter';\nimport type { DatePickerLabels } from '@/components/ui/date-picker';\nimport type { DateRangeFilterLabels } from '@/components/ui/date-range-filter';\nimport type { FieldLabels } from '@/components/ui/field';\nimport type { FloatingSheetLabels } from '@/components/ui/floating-sheet';\nimport type { JsonViewerLabels } from '@/components/ui/json-viewer';\nimport type { PasswordInputLabels } from '@/components/ui/password-input';\nimport type { SaveStatusLabels } from '@/components/ui/save-status';\nimport type { UiLabels } from '@/locales/context';\n\nexport const alertLabelsPt: AlertLabels = {\n warningLabel: 'Aviso',\n infoLabel: 'Informação',\n};\n\nexport const appearanceToggleLabelsPt: AppearanceToggleLabels = {\n groupLabel: 'Aparência',\n lightLabel: 'Claro',\n darkLabel: 'Escuro',\n systemLabel: 'Sistema',\n};\n\nexport const dataTableLabelsPt: DataTableLabels = {\n searchPlaceholder: 'Pesquisar...',\n emptyLabel: 'Sem registos.',\n createLabel: 'Novo',\n clearFiltersLabel: 'Limpar filtros',\n paginationLabel: (page, pages) => `Página ${page} de ${pages}`,\n noOptionsLabel: 'Sem opções.',\n totalLabel: (total) => `${total.toLocaleString('pt-PT')} registos`,\n};\n\nexport const floatingSheetLabelsPt: FloatingSheetLabels = {\n backLabel: 'Voltar',\n closeLabel: 'Fechar',\n};\n\nexport const formOverlayLabelsPt: FormOverlayLabels = {\n cancelLabel: 'Cancelar',\n saveLabel: 'Guardar',\n savingLabel: 'A guardar...',\n};\n\nexport const dateRangeFilterLabelsPt: DateRangeFilterLabels = {\n emptyLabel: 'Período',\n dateFormat: 'dd/MM/yy',\n};\n\nexport const datePickerLabelsPt: DatePickerLabels = {\n placeholder: 'Escolha uma data',\n dateFormat: 'dd/MM/yy',\n clearLabel: 'Limpar data',\n};\n\nexport const comboboxLabelsPt: ComboboxLabels = {\n placeholder: 'Seleccione uma opção',\n searchPlaceholder: 'Pesquisar...',\n emptyText: 'Sem resultados.',\n};\n\nexport const confirmDialogLabelsPt: ConfirmDialogLabels = {\n title: 'Confirmar Ação',\n description:\n 'Tem a certeza que pretende continuar? Esta ação não pode ser desfeita.',\n confirmText: 'Confirmar',\n cancelText: 'Cancelar',\n};\n\nexport const fieldLabelsPt: FieldLabels = {\n requiredLabel: 'Obrigatório',\n};\n\nexport const passwordInputLabelsPt: PasswordInputLabels = {\n showLabel: 'Mostrar palavra-passe',\n hideLabel: 'Ocultar palavra-passe',\n};\n\nexport const dataTableFacetedFilterLabelsPt: DataTableFacetedFilterLabels = {\n noOptionsLabel: 'Sem opções.',\n};\n\nexport const commandPaletteLabelsPt: CommandPaletteLabels = {\n placeholder: 'Pesquisar...',\n noResultsLabel: 'Nenhum resultado encontrado',\n};\n\nexport const tourLabelsPt: TourLabels = {\n next: 'Seguinte',\n previous: 'Anterior',\n done: 'Concluir',\n progress: '{{current}} de {{total}}',\n};\n\nexport const dateFilterPresetsPt: DateFilterOption[] = [\n { value: 'today', label: 'Hoje' },\n { value: 'yesterday', label: 'Ontem' },\n { value: 'previous_week', label: 'Semana anterior' },\n { value: 'previous_7_days', label: 'Últimos 7 dias' },\n { value: 'previous_30_days', label: 'Últimos 30 dias' },\n { value: 'previous_month', label: 'Mês anterior' },\n { value: 'previous_3_months', label: 'Últimos 3 meses' },\n { value: 'previous_12_months', label: 'Últimos 12 meses' },\n];\n\nexport const dateFilterOperatorsPt: DateFilterOption[] = [\n { value: 'between', label: 'Entre' },\n { value: 'before', label: 'Antes de' },\n { value: 'on', label: 'Em' },\n { value: 'after', label: 'Depois de' },\n];\n\nexport const dateFilterUnitsPt: DateFilterOption[] = [\n { value: 'day', label: 'dias' },\n { value: 'week', label: 'semanas' },\n { value: 'month', label: 'meses' },\n { value: 'quarter', label: 'trimestres' },\n { value: 'year', label: 'anos' },\n];\n\nexport const dateFilterLabelsPt: DateFilterLabels = {\n all: 'Todo o período',\n fixed: 'Intervalo fixo...',\n relative: 'Intervalo relativo...',\n relativeTitle: 'Intervalo relativo',\n apply: 'Aplicar filtro',\n back: 'Voltar',\n latest: 'Últimos',\n ago: 'há',\n includeCurrent: 'Incluir período atual',\n startingAgo: 'A começar há',\n removeOffset: 'Remover deslocamento',\n fallback: 'Data',\n};\n\nexport const settingsLabelsPt: SettingsLabels = {\n back: 'Voltar',\n};\n\nexport const saveStatusLabelsPt: SaveStatusLabels = {\n error: 'Não foi possível guardar as alterações',\n idle: 'As alterações são guardadas automaticamente',\n saved: 'Guardado',\n saving: 'A guardar',\n};\n\nexport const copyButtonLabelsPt: CopyButtonLabels = {\n copyLabel: 'Copiar',\n copiedLabel: 'Copiado',\n};\n\nexport const twoFactorLabelsPt: TwoFactorLabels = {\n setupTitle: 'Autenticação de dois fatores',\n setupDescription:\n 'Acrescente um segundo passo ao seu início de sessão com uma aplicação autenticadora.',\n pendingLabel: 'A preparar a sua chave de configuração',\n scanTitle: 'Leia o código',\n scanDescription:\n 'Abra a aplicação autenticadora e leia o código abaixo para adicionar esta conta.',\n qrFallbackLabel: 'O código QR ainda não está disponível.',\n manualKeyLabel: 'Chave de configuração',\n manualKeyDescription:\n 'Introduza esta chave manualmente se a aplicação não conseguir ler o código.',\n manualKeyRevealLabel: 'Mostrar chave',\n manualKeyHideLabel: 'Ocultar chave',\n continueLabel: 'Continuar',\n confirmTitle: 'Confirme o código',\n confirmDescription:\n 'Introduza o código de seis dígitos apresentado na aplicação autenticadora.',\n codeLabel: 'Código de autenticação',\n recoveryCodeLabel: 'Código de recuperação',\n recoveryCodePlaceholder: 'Introduza um código de recuperação',\n useRecoveryCodeLabel: 'Usar um código de recuperação',\n useCodeLabel: 'Usar um código de autenticação',\n verifyLabel: 'Verificar',\n verifyingLabel: 'A verificar',\n errorFallbackLabel: 'Não resultou. Tente novamente.',\n cancelLabel: 'Cancelar',\n challengeTitle: 'Confirmação em dois passos',\n challengeDescription:\n 'Confirme o acesso à sua conta com o código da aplicação autenticadora.',\n recoveryTitle: 'Códigos de recuperação',\n recoveryDescription:\n 'Guarde estes códigos em lugar seguro. Cada um permite um início de sessão se perder o dispositivo.',\n recoveryWarning:\n 'São mostrados uma única vez e não podem ser lidos depois.',\n revealLabel: 'Mostrar códigos',\n hideLabel: 'Ocultar códigos',\n copyLabel: 'Copiar',\n copiedLabel: 'Copiado',\n copyFailedLabel:\n 'Não é possível copiar aqui. Selecione os códigos manualmente.',\n regenerateLabel: 'Gerar novos códigos',\n doneLabel: 'Concluir',\n disableLabel: 'Desativar autenticação de dois fatores',\n disableTitle: 'Desativar autenticação de dois fatores',\n disableDescription:\n 'A sua conta fica protegida apenas pela palavra-passe. Os códigos de recuperação deixam de funcionar.',\n disableConfirmLabel: 'Desativar',\n disableCancelLabel: 'Manter ativa',\n};\n\nexport const dangerZoneLabelsPt: DangerZoneLabels = {\n title: 'Zona de perigo',\n description: 'Estas ações são permanentes e não podem ser desfeitas.',\n actionLabel: 'Eliminar',\n confirmTitle: 'Confirmar Ação',\n confirmDescription:\n 'Tem a certeza que pretende continuar? Esta ação não pode ser desfeita.',\n confirmText: 'Confirmar',\n cancelText: 'Cancelar',\n requiredValueLabel: 'Escreva {{value}} para confirmar',\n};\n\nexport const codeBlockLabelsPt: CodeBlockLabels = {\n copyLabel: 'Copiar',\n copiedLabel: 'Copiado',\n expandLabel: 'Expandir',\n collapseLabel: 'Recolher',\n};\n\nexport const jsonViewerLabelsPt: JsonViewerLabels = {\n copyLabel: 'Copiar',\n copiedLabel: 'Copiado',\n expandLabel: 'Expandir',\n collapseLabel: 'Recolher',\n circularLabel: 'Referência circular',\n entriesLabel: (count) => `${count} ${count === 1 ? 'entrada' : 'entradas'}`,\n};\n\nexport const ptLabels: UiLabels = {\n alert: alertLabelsPt,\n codeBlock: codeBlockLabelsPt,\n combobox: comboboxLabelsPt,\n commandPalette: commandPaletteLabelsPt,\n confirmDialog: confirmDialogLabelsPt,\n appearanceToggle: appearanceToggleLabelsPt,\n copyButton: copyButtonLabelsPt,\n dataTable: dataTableLabelsPt,\n dataTableFacetedFilter: dataTableFacetedFilterLabelsPt,\n dateFilter: dateFilterLabelsPt,\n dateFilterOperators: dateFilterOperatorsPt,\n dateFilterPresets: dateFilterPresetsPt,\n dateFilterUnits: dateFilterUnitsPt,\n datePicker: datePickerLabelsPt,\n dateRangeFilter: dateRangeFilterLabelsPt,\n floatingSheet: floatingSheetLabelsPt,\n jsonViewer: jsonViewerLabelsPt,\n passwordInput: passwordInputLabelsPt,\n saveStatus: saveStatusLabelsPt,\n settings: settingsLabelsPt,\n tour: tourLabelsPt,\n};\n"]}
package/dist/shells.d.ts CHANGED
@@ -1,14 +1,13 @@
1
- import { U as UrlLike, N as NavGroup, b as NavItem, S as SharedUser, c as LinkComponent, B as BreadcrumbItem } from './types-B4QS3h5p.js';
2
- export { C as Column, a as ColumnDef, F as FilterFn, I as IconComponent, d as LinkProps, L as LucideIcon, R as Row, T as TableInstance } from './types-B4QS3h5p.js';
1
+ import { U as UrlLike, N as NavGroup, b as NavItem, c as SharedUser, d as LinkComponent, B as BreadcrumbItem, S as SlotNameProps } from './types-cmBL8zOc.js';
2
+ export { C as Column, a as ColumnDef, F as FilterFn, I as IconComponent, e as LinkProps, L as LucideIcon, R as Row, T as TableInstance } from './types-cmBL8zOc.js';
3
3
  import * as React from 'react';
4
4
  import { ReactNode, ComponentPropsWithoutRef, PropsWithChildren } from 'react';
5
- import { d as SidebarGroup } from './sidebar-BhOIlSjt.js';
5
+ import { d as SidebarGroup } from './sidebar-Bp6Q46j-.js';
6
6
  import '@tanstack/react-table';
7
7
  import 'lucide-react';
8
8
  import 'class-variance-authority/types';
9
9
  import 'class-variance-authority';
10
- import './button-B6wQRe7p.js';
11
- import './input-4uxAHW6y.js';
10
+ import './input-Dxnsxi-f.js';
12
11
  import '@radix-ui/react-separator';
13
12
  import '@radix-ui/react-tooltip';
14
13
 
@@ -91,7 +90,7 @@ interface AuthShellProps {
91
90
  children: ReactNode;
92
91
  className?: string;
93
92
  }
94
- declare function AuthShell({ logo, title, description, arrangement, panel, panelDecorative, footer, appearanceControl, surface, children, className, }: AuthShellProps): React.JSX.Element;
93
+ declare function AuthShell({ logo, title, description, arrangement, panel, panelDecorative, footer, appearanceControl, surface, children, className, slotName, }: AuthShellProps & SlotNameProps): React.JSX.Element;
95
94
 
96
95
  declare function Breadcrumbs({ breadcrumbs, linkComponent, }: {
97
96
  breadcrumbs: BreadcrumbItem[];
@@ -156,4 +155,4 @@ interface UserMenuContentProps {
156
155
  }
157
156
  declare function UserMenuContent({ user, settingsHref, logoutHref, linkComponent, onSettingsClick, onLogout, settingsLabel, logoutLabel, }: UserMenuContentProps): React.JSX.Element;
158
157
 
159
- export { AppContent, AppShell, AppSidebar, AppSidebarHeader, type Appearance, type AuthArrangement, AuthShell, type AuthShellProps, BreadcrumbItem, Breadcrumbs, Heading, LinkComponent, NavFooter, NavGroup, NavItem, NavMain, type NavMainProps, NavUser, SIDEBAR_COLLAPSED_GROUPS_KEY, SettingsLayout, type SettingsLayoutProps, SharedUser, UrlLike, UserInfo, UserMenuContent, hrefToString, initializeTheme, useAppearance, useCollapsedGroup, useInitials, useIsMobile };
158
+ export { AppContent, AppShell, AppSidebar, AppSidebarHeader, type Appearance, type AuthArrangement, AuthShell, type AuthShellProps, BreadcrumbItem, Breadcrumbs, Heading, LinkComponent, NavFooter, NavGroup, NavItem, NavMain, type NavMainProps, NavUser, SIDEBAR_COLLAPSED_GROUPS_KEY, SettingsLayout, type SettingsLayoutProps, SharedUser, SlotNameProps, UrlLike, UserInfo, UserMenuContent, hrefToString, initializeTheme, useAppearance, useCollapsedGroup, useInitials, useIsMobile };
package/dist/shells.js CHANGED
@@ -1,12 +1,11 @@
1
1
  export { initializeTheme, useAppearance } from './chunk-IQMRJXEO.js';
2
- import { Card } from './chunk-SA5LM2GD.js';
3
- export { AppSidebar, AppSidebarHeader, Breadcrumbs, Heading, NavFooter, NavMain, NavUser, SIDEBAR_COLLAPSED_GROUPS_KEY, SettingsLayout, UserInfo, UserMenuContent, useCollapsedGroup, useInitials } from './chunk-KYWA5UYN.js';
4
- import { SidebarInset, SidebarProvider } from './chunk-MNGNBEYN.js';
5
- export { useIsMobile } from './chunk-MNGNBEYN.js';
2
+ import { Card } from './chunk-2HLBBU3O.js';
3
+ export { AppSidebar, AppSidebarHeader, Breadcrumbs, Heading, NavFooter, NavMain, NavUser, SIDEBAR_COLLAPSED_GROUPS_KEY, SettingsLayout, UserInfo, UserMenuContent, useCollapsedGroup, useInitials } from './chunk-SH5QZCOW.js';
4
+ import { SidebarInset, SidebarProvider } from './chunk-3HKIYFWI.js';
5
+ export { useIsMobile } from './chunk-3HKIYFWI.js';
6
6
  export { hrefToString } from './chunk-L2H5GIF7.js';
7
- import './chunk-UUEWFCKT.js';
8
- import './chunk-6X4TKSF6.js';
9
- import { cn } from './chunk-DSD7MVLL.js';
7
+ import './chunk-UTSTTTH5.js';
8
+ import { cn } from './chunk-I5UZAJB4.js';
10
9
  import { jsx, jsxs } from 'react/jsx-runtime';
11
10
 
12
11
  function AppContent({
@@ -57,7 +56,8 @@ function AuthShell({
57
56
  appearanceControl,
58
57
  surface = true,
59
58
  children,
60
- className
59
+ className,
60
+ slotName = "auth-shell"
61
61
  }) {
62
62
  const split = arrangement === "split";
63
63
  const form = /* @__PURE__ */ jsxs(
@@ -93,13 +93,13 @@ function AuthShell({
93
93
  return /* @__PURE__ */ jsxs(
94
94
  "div",
95
95
  {
96
- "data-slot": "auth-shell",
97
96
  "data-arrangement": arrangement,
98
97
  className: cn(
99
98
  "relative flex min-h-screen w-full",
100
99
  split && "lg:grid lg:grid-cols-2",
101
100
  className
102
101
  ),
102
+ "data-slot": slotName,
103
103
  children: [
104
104
  split && panel && /* @__PURE__ */ jsx(
105
105
  "aside",
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/shells/app-content.tsx","../src/shells/app-shell.tsx","../src/shells/auth-shell.tsx"],"names":["jsx"],"mappings":";;;;;;;;;;;AAQO,SAAS,UAAA,CAAW;AAAA,EACvB,OAAA,GAAU,QAAA;AAAA,EACV,QAAA;AAAA,EACA,GAAG;AACP,CAAA,EAAoB;AAChB,EAAA,IAAI,YAAY,SAAA,EAAW;AACvB,IAAA,uBAAO,GAAA,CAAC,YAAA,EAAA,EAAc,GAAG,KAAA,EAAQ,QAAA,EAAS,CAAA;AAAA,EAC9C;AAEA,EAAA,uBACI,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACG,SAAA,EAAU,uEAAA;AAAA,MACT,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACL;AAER;ACbO,SAAS,QAAA,CAAS;AAAA,EACrB,QAAA;AAAA,EACA,OAAA,GAAU,QAAA;AAAA,EACV,IAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA,GAAc;AAClB,CAAA,EAAkB;AACd,EAAA,IAAI,YAAY,QAAA,EAAU;AACtB,IAAA,uBACIA,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,qCAAqC,QAAA,EAAS,CAAA;AAAA,EAErE;AAEA,EAAA,uBACIA,GAAAA;AAAA,IAAC,eAAA;AAAA,IAAA;AAAA,MACG,IAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,MAEC;AAAA;AAAA,GACL;AAER;ACdO,SAAS,SAAA,CAAU;AAAA,EACtB,IAAA;AAA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AET,QAAA,EAAA;AAAA;AAAA;AACL;AAAA;AAAA,GAER;AAGJ,EAAA,uBACI,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACG,WAAA,EAAU,YAAA;AAAA,MACV,kBAAA,EAAkB,WAAA;AAAA,MAClB,SAAA,EAAW,EAAA;AAAA,QACP,mCAAA;AAAA,QACA,KAAA,IAAS,wBAAA;AAAA,QACT;AAAA,OACJ;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,KAAA,IAAS,yBACNA,GAAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACG,WAAA,EAAU,kBAAA;AAAA,YACV,eAAa,eAAA,IAAmB,MAAA;AAAA,YAChC,SAAA,EAAU,iFAAA;AAAA,YAET,QAAA,EAAA;AAAA;AAAA,SACL;AAAA,wBAGJA,GAAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACG,WAAA,EAAU,iBAAA;AAAA,YACV,SAAA,EAAU,6CAAA;AAAA,YAET,QAAA,EAAA;AAAA;AAAA,SACL;AAAA,QAEC,qCACGA,GAAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACG,WAAA,EAAU,uBAAA;AAAA,YACV,SAAA,EAAU,wBAAA;AAAA,YAET,QAAA,EAAA;AAAA;AAAA;AACL;AAAA;AAAA,GAER;AAER","file":"shells.js","sourcesContent":["import * as React from 'react';\n\nimport { SidebarInset } from '@/components/ui/sidebar';\n\ninterface AppContentProps extends React.ComponentProps<'main'> {\n variant?: 'header' | 'sidebar';\n}\n\nexport function AppContent({\n variant = 'header',\n children,\n ...props\n}: AppContentProps) {\n if (variant === 'sidebar') {\n return <SidebarInset {...props}>{children}</SidebarInset>;\n }\n\n return (\n <main\n className=\"max-w-7xl gap-4 rounded-xl mx-auto flex h-full w-full flex-1 flex-col\"\n {...props}\n >\n {children}\n </main>\n );\n}\n","import * as React from 'react';\n\nimport { SidebarProvider } from '@/components/ui/sidebar';\n\ninterface AppShellProps {\n children: React.ReactNode;\n variant?: 'header' | 'sidebar';\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n defaultOpen?: boolean;\n}\n\nexport function AppShell({\n children,\n variant = 'header',\n open,\n onOpenChange,\n defaultOpen = true,\n}: AppShellProps) {\n if (variant === 'header') {\n return (\n <div className=\"flex min-h-screen w-full flex-col\">{children}</div>\n );\n }\n\n return (\n <SidebarProvider\n open={open}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n {children}\n </SidebarProvider>\n );\n}\n","import { Card } from '@/components/ui/card';\nimport { cn } from '@/lib/utils';\nimport { type ReactNode } from 'react';\n\nexport type AuthArrangement = 'centred' | 'split';\n\nexport interface AuthShellProps {\n logo?: ReactNode;\n title: string;\n description?: string;\n arrangement?: AuthArrangement;\n panel?: ReactNode;\n panelDecorative?: boolean;\n footer?: ReactNode;\n appearanceControl?: ReactNode;\n surface?: boolean;\n children: ReactNode;\n className?: string;\n}\n\nexport function AuthShell({\n logo,\n title,\n description,\n arrangement = 'centred',\n panel,\n panelDecorative = true,\n footer,\n appearanceControl,\n surface = true,\n children,\n className,\n}: AuthShellProps) {\n const split = arrangement === 'split';\n\n const form = (\n <div\n data-slot=\"auth-shell-form\"\n className=\"gap-6 max-w-md flex w-full flex-col\"\n >\n {logo && (\n <div\n data-slot=\"auth-shell-logo\"\n className=\"flex justify-center\"\n >\n {logo}\n </div>\n )}\n\n <div data-slot=\"auth-shell-heading\" className=\"space-y-2\">\n <h1 className=\"text-xl font-bold tracking-tight text-foreground\">\n {title}\n </h1>\n {description && (\n <p className=\"text-sm font-medium text-muted-foreground\">\n {description}\n </p>\n )}\n </div>\n\n {surface ? (\n <Card className=\"p-6\">\n <div data-slot=\"auth-shell-body\">{children}</div>\n </Card>\n ) : (\n <div data-slot=\"auth-shell-body\">{children}</div>\n )}\n\n {footer && (\n <footer\n data-slot=\"auth-shell-footer\"\n className=\"gap-2 text-sm font-medium flex flex-wrap items-center justify-center text-muted-foreground\"\n >\n {footer}\n </footer>\n )}\n </div>\n );\n\n return (\n <div\n data-slot=\"auth-shell\"\n data-arrangement={arrangement}\n className={cn(\n 'relative flex min-h-screen w-full',\n split && 'lg:grid lg:grid-cols-2',\n className,\n )}\n >\n {split && panel && (\n <aside\n data-slot=\"auth-shell-panel\"\n aria-hidden={panelDecorative || undefined}\n className=\"p-10 lg:flex hidden flex-col justify-between bg-primary text-primary-foreground\"\n >\n {panel}\n </aside>\n )}\n\n <main\n data-slot=\"auth-shell-main\"\n className=\"p-6 flex flex-1 items-center justify-center\"\n >\n {form}\n </main>\n\n {appearanceControl && (\n <div\n data-slot=\"auth-shell-appearance\"\n className=\"top-4 right-4 absolute\"\n >\n {appearanceControl}\n </div>\n )}\n </div>\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/shells/app-content.tsx","../src/shells/app-shell.tsx","../src/shells/auth-shell.tsx"],"names":["jsx"],"mappings":";;;;;;;;;;AAQO,SAAS,UAAA,CAAW;AAAA,EACvB,OAAA,GAAU,QAAA;AAAA,EACV,QAAA;AAAA,EACA,GAAG;AACP,CAAA,EAAoB;AAChB,EAAA,IAAI,YAAY,SAAA,EAAW;AACvB,IAAA,uBAAO,GAAA,CAAC,YAAA,EAAA,EAAc,GAAG,KAAA,EAAQ,QAAA,EAAS,CAAA;AAAA,EAC9C;AAEA,EAAA,uBACI,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACG,SAAA,EAAU,uEAAA;AAAA,MACT,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACL;AAER;ACbO,SAAS,QAAA,CAAS;AAAA,EACrB,QAAA;AAAA,EACA,OAAA,GAAU,QAAA;AAAA,EACV,IAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA,GAAc;AAClB,CAAA,EAAkB;AACd,EAAA,IAAI,YAAY,QAAA,EAAU;AACtB,IAAA,uBACIA,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,qCAAqC,QAAA,EAAS,CAAA;AAAA,EAErE;AAEA,EA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AC/C,CAAA,mBAEAA,IAAC,KAAA,EAAA,EAAI,WAAA,EAAU,mBAAmB,QAAA,EAAS,CAAA;AAAA,QAG9C,0BACGA,GAAAA;AAAA,UAAC,QAAA;AAAA,UAAA;AAAA,YACG,WAAA,EAAU,mBAAA;AAAA,YACV,SAAA,EAAU,4FAAA;AAAA,YAET,QAAA,EAAA;AAAA;AAAA;AACL;AAAA;AAAA,GAER;AAGJ,EAAA,uBACI,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACG,kBAAA,EAAkB,WAAA;AAAA,MAClB,SAAA,EAAW,EAAA;AAAA,QACP,mCAAA;AAAA,QACA,KAAA,IAAS,wBAAA;AAAA,QACT;AAAA,OACJ;AAAA,MACA,WAAA,EAAW,QAAA;AAAA,MAEV,QAAA,EAAA;AAAA,QAAA,KAAA,IAAS,yBACNA,GAAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACG,WAAA,EAAU,kBAAA;AAAA,YACV,eAAa,eAAA,IAAmB,MAAA;AAAA,YAChC,SAAA,EAAU,iFAAA;AAAA,YAET,QAAA,EAAA;AAAA;AAAA,SACL;AAAA,wBAGJA,GAAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACG,WAAA,EAAU,iBAAA;AAAA,YACV,SAAA,EAAU,6CAAA;AAAA,YAET,QAAA,EAAA;AAAA;AAAA,SACL;AAAA,QAEC,qCACGA,GAAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACG,WAAA,EAAU,uBAAA;AAAA,YACV,SAAA,EAAU,wBAAA;AAAA,YAET,QAAA,EAAA;AAAA;AAAA;AACL;AAAA;AAAA,GAER;AAER","file":"shells.js","sourcesContent":["import * as React from 'react';\n\nimport { SidebarInset } from '@/components/ui/sidebar';\n\ninterface AppContentProps extends React.ComponentProps<'main'> {\n variant?: 'header' | 'sidebar';\n}\n\nexport function AppContent({\n variant = 'header',\n children,\n ...props\n}: AppContentProps) {\n if (variant === 'sidebar') {\n return <SidebarInset {...props}>{children}</SidebarInset>;\n }\n\n return (\n <main\n className=\"max-w-7xl gap-4 rounded-xl mx-auto flex h-full w-full flex-1 flex-col\"\n {...props}\n >\n {children}\n </main>\n );\n}\n","import * as React from 'react';\n\nimport { SidebarProvider } from '@/components/ui/sidebar';\n\ninterface AppShellProps {\n children: React.ReactNode;\n variant?: 'header' | 'sidebar';\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n defaultOpen?: boolean;\n}\n\nexport function AppShell({\n children,\n variant = 'header',\n open,\n onOpenChange,\n defaultOpen = true,\n}: AppShellProps) {\n if (variant === 'header') {\n return (\n <div className=\"flex min-h-screen w-full flex-col\">{children}</div>\n );\n }\n\n return (\n <SidebarProvider\n open={open}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n {children}\n </SidebarProvider>\n );\n}\n","import { Card } from '@/components/ui/card';\nimport { cn } from '@/lib/utils';\nimport type { SlotNameProps } from '@/types';\nimport { type ReactNode } from 'react';\n\nexport type AuthArrangement = 'centred' | 'split';\n\nexport interface AuthShellProps {\n logo?: ReactNode;\n title: string;\n description?: string;\n arrangement?: AuthArrangement;\n panel?: ReactNode;\n panelDecorative?: boolean;\n footer?: ReactNode;\n appearanceControl?: ReactNode;\n surface?: boolean;\n children: ReactNode;\n className?: string;\n}\n\nexport function AuthShell({\n logo,\n title,\n description,\n arrangement = 'centred',\n panel,\n panelDecorative = true,\n footer,\n appearanceControl,\n surface = true,\n children,\n className,\n slotName = 'auth-shell',\n}: AuthShellProps & SlotNameProps) {\n const split = arrangement === 'split';\n\n const form = (\n <div\n data-slot=\"auth-shell-form\"\n className=\"gap-6 max-w-md flex w-full flex-col\"\n >\n {logo && (\n <div\n data-slot=\"auth-shell-logo\"\n className=\"flex justify-center\"\n >\n {logo}\n </div>\n )}\n\n <div data-slot=\"auth-shell-heading\" className=\"space-y-2\">\n <h1 className=\"text-xl font-bold tracking-tight text-foreground\">\n {title}\n </h1>\n {description && (\n <p className=\"text-sm font-medium text-muted-foreground\">\n {description}\n </p>\n )}\n </div>\n\n {surface ? (\n <Card className=\"p-6\">\n <div data-slot=\"auth-shell-body\">{children}</div>\n </Card>\n ) : (\n <div data-slot=\"auth-shell-body\">{children}</div>\n )}\n\n {footer && (\n <footer\n data-slot=\"auth-shell-footer\"\n className=\"gap-2 text-sm font-medium flex flex-wrap items-center justify-center text-muted-foreground\"\n >\n {footer}\n </footer>\n )}\n </div>\n );\n\n return (\n <div\n data-arrangement={arrangement}\n className={cn(\n 'relative flex min-h-screen w-full',\n split && 'lg:grid lg:grid-cols-2',\n className,\n )}\n data-slot={slotName}\n >\n {split && panel && (\n <aside\n data-slot=\"auth-shell-panel\"\n aria-hidden={panelDecorative || undefined}\n className=\"p-10 lg:flex hidden flex-col justify-between bg-primary text-primary-foreground\"\n >\n {panel}\n </aside>\n )}\n\n <main\n data-slot=\"auth-shell-main\"\n className=\"p-6 flex flex-1 items-center justify-center\"\n >\n {form}\n </main>\n\n {appearanceControl && (\n <div\n data-slot=\"auth-shell-appearance\"\n className=\"top-4 right-4 absolute\"\n >\n {appearanceControl}\n </div>\n )}\n </div>\n );\n}\n"]}
@@ -0,0 +1,80 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import * as React from 'react';
4
+ import { I as Input, B as Button } from './input-Dxnsxi-f.js';
5
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
6
+ import { S as SlotNameProps } from './types-cmBL8zOc.js';
7
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
8
+
9
+ declare function Separator({ className, orientation, decorative, slotName, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root> & SlotNameProps): React.JSX.Element;
10
+
11
+ declare function TooltipProvider({ delayDuration, slotName, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider> & SlotNameProps): React.JSX.Element;
12
+ declare function Tooltip({ slotName, ...props }: React.ComponentProps<typeof TooltipPrimitive.Root> & SlotNameProps): React.JSX.Element;
13
+ declare function TooltipTrigger({ slotName, ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger> & SlotNameProps): React.JSX.Element;
14
+ declare function TooltipContent({ className, sideOffset, children, slotName, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content> & SlotNameProps): React.JSX.Element;
15
+
16
+ type SidebarContext = {
17
+ state: 'expanded' | 'collapsed';
18
+ open: boolean;
19
+ setOpen: (open: boolean) => void;
20
+ openMobile: boolean;
21
+ setOpenMobile: (open: boolean) => void;
22
+ isMobile: boolean;
23
+ toggleSidebar: () => void;
24
+ };
25
+ declare const SidebarContext: React.Context<SidebarContext | null>;
26
+ declare function useSidebar(): SidebarContext;
27
+ declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, slotName, ...props }: React.ComponentProps<'div'> & {
28
+ defaultOpen?: boolean;
29
+ open?: boolean;
30
+ onOpenChange?: (open: boolean) => void;
31
+ } & SlotNameProps): React.JSX.Element;
32
+ declare function Sidebar({ side, variant, collapsible, className, children, slotName, ...props }: React.ComponentProps<'div'> & {
33
+ side?: 'left' | 'right';
34
+ variant?: 'sidebar' | 'floating' | 'inset';
35
+ collapsible?: 'offcanvas' | 'icon' | 'none';
36
+ } & SlotNameProps): React.JSX.Element;
37
+ declare function SidebarTrigger({ className, onClick, slotName, ...props }: React.ComponentProps<typeof Button> & SlotNameProps): React.JSX.Element;
38
+ declare function SidebarRail({ className, slotName, ...props }: React.ComponentProps<'button'> & SlotNameProps): React.JSX.Element;
39
+ declare function SidebarInset({ className, slotName, ...props }: React.ComponentProps<'main'> & SlotNameProps): React.JSX.Element;
40
+ declare function SidebarInput({ className, slotName, ...props }: React.ComponentProps<typeof Input> & SlotNameProps): React.JSX.Element;
41
+ declare function SidebarHeader({ className, slotName, ...props }: React.ComponentProps<'div'> & SlotNameProps): React.JSX.Element;
42
+ declare function SidebarFooter({ className, slotName, ...props }: React.ComponentProps<'div'> & SlotNameProps): React.JSX.Element;
43
+ declare function SidebarSeparator({ className, slotName, ...props }: React.ComponentProps<typeof Separator> & SlotNameProps): React.JSX.Element;
44
+ declare function SidebarContent({ className, slotName, ...props }: React.ComponentProps<'div'> & SlotNameProps): React.JSX.Element;
45
+ declare function SidebarGroup({ className, slotName, ...props }: React.ComponentProps<'div'> & SlotNameProps): React.JSX.Element;
46
+ declare function SidebarGroupLabel({ className, asChild, slotName, ...props }: React.ComponentProps<'div'> & {
47
+ asChild?: boolean;
48
+ } & SlotNameProps): React.JSX.Element;
49
+ declare function SidebarGroupAction({ className, asChild, slotName, ...props }: React.ComponentProps<'button'> & {
50
+ asChild?: boolean;
51
+ } & SlotNameProps): React.JSX.Element;
52
+ declare function SidebarGroupContent({ className, slotName, ...props }: React.ComponentProps<'div'> & SlotNameProps): React.JSX.Element;
53
+ declare function SidebarMenu({ className, slotName, ...props }: React.ComponentProps<'ul'> & SlotNameProps): React.JSX.Element;
54
+ declare function SidebarMenuItem({ className, slotName, ...props }: React.ComponentProps<'li'> & SlotNameProps): React.JSX.Element;
55
+ declare const sidebarMenuButtonVariants: (props?: ({
56
+ variant?: "default" | "outline" | null | undefined;
57
+ size?: "sm" | "default" | "lg" | null | undefined;
58
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
59
+ declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, slotName, ...props }: React.ComponentProps<'button'> & {
60
+ asChild?: boolean;
61
+ isActive?: boolean;
62
+ tooltip?: string | React.ComponentProps<typeof TooltipContent>;
63
+ } & VariantProps<typeof sidebarMenuButtonVariants> & SlotNameProps): React.JSX.Element;
64
+ declare function SidebarMenuAction({ className, asChild, showOnHover, slotName, ...props }: React.ComponentProps<'button'> & {
65
+ asChild?: boolean;
66
+ showOnHover?: boolean;
67
+ } & SlotNameProps): React.JSX.Element;
68
+ declare function SidebarMenuBadge({ className, slotName, ...props }: React.ComponentProps<'div'> & SlotNameProps): React.JSX.Element;
69
+ declare function SidebarMenuSkeleton({ className, showIcon, slotName, ...props }: React.ComponentProps<'div'> & {
70
+ showIcon?: boolean;
71
+ } & SlotNameProps): React.JSX.Element;
72
+ declare function SidebarMenuSub({ className, slotName, ...props }: React.ComponentProps<'ul'> & SlotNameProps): React.JSX.Element;
73
+ declare function SidebarMenuSubItem({ className, slotName, ...props }: React.ComponentProps<'li'> & SlotNameProps): React.JSX.Element;
74
+ declare function SidebarMenuSubButton({ asChild, size, isActive, className, slotName, ...props }: React.ComponentProps<'a'> & {
75
+ asChild?: boolean;
76
+ size?: 'sm' | 'md';
77
+ isActive?: boolean;
78
+ } & SlotNameProps): React.JSX.Element;
79
+
80
+ export { useSidebar as A, Separator as S, Tooltip as T, Sidebar as a, SidebarContent as b, SidebarFooter as c, SidebarGroup as d, SidebarGroupAction as e, SidebarGroupContent as f, SidebarGroupLabel as g, SidebarHeader as h, SidebarInput as i, SidebarInset as j, SidebarMenu as k, SidebarMenuAction as l, SidebarMenuBadge as m, SidebarMenuButton as n, SidebarMenuItem as o, SidebarMenuSkeleton as p, SidebarMenuSub as q, SidebarMenuSubButton as r, SidebarMenuSubItem as s, SidebarProvider as t, SidebarRail as u, SidebarSeparator as v, SidebarTrigger as w, TooltipContent as x, TooltipProvider as y, TooltipTrigger as z };
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
+ import { S as SlotNameProps } from './types-cmBL8zOc.js';
3
4
 
4
5
  interface DangerZoneLabels {
5
6
  title: string;
@@ -35,7 +36,7 @@ interface DangerZoneProps {
35
36
  footer?: ReactNode;
36
37
  className?: string;
37
38
  }
38
- declare function DangerZone({ title, description, actions, processing, labels, footer, className, }: DangerZoneProps): React.JSX.Element;
39
+ declare function DangerZone({ title, description, actions, processing, labels, footer, className, slotName, }: DangerZoneProps & SlotNameProps): React.JSX.Element;
39
40
 
40
41
  interface FormOverlayLabels {
41
42
  cancelLabel: string;
@@ -53,7 +54,7 @@ interface FormOverlayActionsProps {
53
54
  onCancel: () => void;
54
55
  onSave?: () => void;
55
56
  }
56
- declare function FormOverlayActions({ labels, processing, intent, submit, className, onCancel, onSave, }: FormOverlayActionsProps): React.JSX.Element;
57
+ declare function FormOverlayActions({ labels, processing, intent, submit, className, onCancel, onSave, slotName, }: FormOverlayActionsProps & SlotNameProps): React.JSX.Element;
57
58
 
58
59
  type TwoFactorSetupStep = 'pending' | 'scan' | 'confirm' | 'recovery';
59
60
  type TwoFactorCodeMode = 'code' | 'recovery';
@@ -2,6 +2,9 @@ import { Column as Column$1, ColumnDef as ColumnDef$1, FilterFn as FilterFn$1, R
2
2
  import { LucideIcon as LucideIcon$1 } from 'lucide-react';
3
3
  import { ComponentType, ReactNode, MouseEvent } from 'react';
4
4
 
5
+ interface SlotNameProps {
6
+ slotName?: string;
7
+ }
5
8
  type UrlLike = string | {
6
9
  url: string;
7
10
  method?: string;
@@ -45,4 +48,4 @@ interface LinkProps {
45
48
  }
46
49
  type LinkComponent = ComponentType<LinkProps>;
47
50
 
48
- export type { BreadcrumbItem as B, Column as C, FilterFn as F, IconComponent as I, LucideIcon as L, NavGroup as N, Row as R, SharedUser as S, TableInstance as T, UrlLike as U, ColumnDef as a, NavItem as b, LinkComponent as c, LinkProps as d };
51
+ export type { BreadcrumbItem as B, Column as C, FilterFn as F, IconComponent as I, LucideIcon as L, NavGroup as N, Row as R, SlotNameProps as S, TableInstance as T, UrlLike as U, ColumnDef as a, NavItem as b, SharedUser as c, LinkComponent as d, LinkProps as e };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akira-io/ui",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Open-source React component library: the full shadcn/ui set on an OKLCH design-token system with swappable brand palettes.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -75,8 +75,8 @@
75
75
  "dev": "tsup --watch",
76
76
  "test": "vitest run",
77
77
  "typecheck": "tsc --noEmit",
78
- "format": "prettier --write \"src/**/*.{ts,tsx}\" \"tests/**/*.ts\" theme.css",
79
- "format:check": "prettier --check \"src/**/*.{ts,tsx}\" \"tests/**/*.ts\" theme.css",
78
+ "format": "prettier --write \"src/**/*.{ts,tsx}\" \"tests/**/*.{ts,tsx}\" theme.css",
79
+ "format:check": "prettier --check \"src/**/*.{ts,tsx}\" \"tests/**/*.{ts,tsx}\" theme.css",
80
80
  "prepublishOnly": "bun run build"
81
81
  },
82
82
  "dependencies": {
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/locales/context.tsx"],"names":[],"mappings":";;;;AAgDA,IAAM,QAAkB,EAAC;AAEzB,IAAM,eAAA,GAAkB,cAAwB,KAAK,CAAA;AAE9C,SAAS,gBAAA,CAAiB;AAAA,EAC7B,MAAA;AAAA,EACA;AACJ,CAAA,EAGG;AACC,EAAA,2BACK,eAAA,CAAgB,QAAA,EAAhB,EAAyB,KAAA,EAAO,QAC5B,QAAA,EACL,CAAA;AAER;AAEO,SAAS,WAAA,GAAwB;AACpC,EAAA,OAAO,WAAW,eAAe,CAAA;AACrC;AAEA,SAAS,QAAQ,MAAA,EAAqD;AAClE,EAAA,IAAI,CAAC,MAAA,EAAQ;AACT,IAAA,OAAO,EAAC;AAAA,EACZ;AAEA,EAAA,OAAO,MAAA,CAAO,WAAA;AAAA,IACV,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAA,CAAE,MAAA,CAAO,CAAC,GAAG,KAAK,CAAA,KAAM,KAAA,KAAU,MAAS;AAAA,GACpE;AACJ;AAEO,SAAS,WAAA,CACZ,OAAA,EACA,QAAA,EACA,SAAA,EACwB;AACxB,EAAA,MAAM,SAAS,WAAA,EAAY;AAE3B,EAAA,OAAO;AAAA,IACH,GAAG,QAAA;AAAA,IACH,GAAG,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAC,CAAA;AAAA,IAC1B,GAAG,QAAQ,SAAS;AAAA,GACxB;AACJ","file":"chunk-5AJFQ6C4.js","sourcesContent":["import type { CommandPaletteLabels } from '@/blocks/command-palette';\nimport type {\n DateFilterLabels,\n DateFilterOption,\n} from '@/blocks/date-filter/types';\nimport type { SettingsLabels } from '@/blocks/settings-page';\nimport type { TourLabels } from '@/blocks/tour/types';\nimport type { AppearanceToggleLabels } from '@/components/ui/appearance-toggle';\nimport type { CodeBlockLabels } from '@/components/ui/code-block';\nimport type { ComboboxLabels } from '@/components/ui/combobox';\nimport type { ConfirmDialogLabels } from '@/components/ui/confirm-dialog';\nimport type { CopyButtonLabels } from '@/components/ui/copy-button';\nimport type { DataTableLabels } from '@/components/ui/data-table';\nimport type { DataTableFacetedFilterLabels } from '@/components/ui/data-table-faceted-filter';\nimport type { DatePickerLabels } from '@/components/ui/date-picker';\nimport type { DateRangeFilterLabels } from '@/components/ui/date-range-filter';\nimport type { FloatingSheetLabels } from '@/components/ui/floating-sheet-context';\nimport type { JsonViewerLabels } from '@/components/ui/json-viewer';\nimport type { SaveStatusLabels } from '@/components/ui/save-status';\nimport { createContext, useContext, type ReactNode } from 'react';\n\nexport interface UiLabelSections {\n appearanceToggle: AppearanceToggleLabels;\n codeBlock: CodeBlockLabels;\n combobox: ComboboxLabels;\n commandPalette: CommandPaletteLabels;\n confirmDialog: ConfirmDialogLabels;\n copyButton: CopyButtonLabels;\n dataTable: DataTableLabels;\n dataTableFacetedFilter: DataTableFacetedFilterLabels;\n dateFilter: DateFilterLabels;\n datePicker: DatePickerLabels;\n dateRangeFilter: DateRangeFilterLabels;\n floatingSheet: FloatingSheetLabels;\n jsonViewer: JsonViewerLabels;\n saveStatus: SaveStatusLabels;\n settings: SettingsLabels;\n tour: TourLabels;\n}\n\nexport type UiLabels = {\n [Section in keyof UiLabelSections]?: Partial<UiLabelSections[Section]>;\n} & {\n dateFilterPresets?: DateFilterOption[];\n dateFilterOperators?: DateFilterOption[];\n dateFilterUnits?: DateFilterOption[];\n};\n\nconst EMPTY: UiLabels = {};\n\nconst UiLocaleContext = createContext<UiLabels>(EMPTY);\n\nexport function UiLocaleProvider({\n labels,\n children,\n}: {\n labels: UiLabels;\n children: ReactNode;\n}) {\n return (\n <UiLocaleContext.Provider value={labels}>\n {children}\n </UiLocaleContext.Provider>\n );\n}\n\nexport function useUiLocale(): UiLabels {\n return useContext(UiLocaleContext);\n}\n\nfunction defined(source: object | undefined): Record<string, unknown> {\n if (!source) {\n return {};\n }\n\n return Object.fromEntries(\n Object.entries(source).filter(([, value]) => value !== undefined),\n );\n}\n\nexport function useUiLabels<Section extends keyof UiLabelSections>(\n section: Section,\n defaults: UiLabelSections[Section],\n overrides?: Partial<UiLabelSections[Section]>,\n): UiLabelSections[Section] {\n const locale = useUiLocale();\n\n return {\n ...defaults,\n ...defined(locale[section]),\n ...defined(overrides),\n } as UiLabelSections[Section];\n}\n"]}