@motor-hero/ui-kit 0.48.1 → 0.50.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.
@@ -24,7 +24,15 @@ export interface AppShellProps {
24
24
  sidebarFooter?: ReactNode | ((collapsed: boolean) => ReactNode);
25
25
  /** Above the header, full width of the content column — `UpdateBanner` goes here. */
26
26
  banner?: ReactNode;
27
+ /**
28
+ * Merged into the sidebar (desktop and mobile drawer), e.g.
29
+ * `bg-sidebar text-sidebar-foreground border-sidebar-border`. Inner dividers
30
+ * follow the sidebar's border color.
31
+ */
32
+ sidebarClassName?: string;
33
+ /** Merged into the top header bar. */
34
+ headerClassName?: string;
27
35
  children: ReactNode;
28
36
  }
29
- export declare function AppShell({ brand, brandCollapsed, navItems, activePath, isActive, isAdmin, user, userMenuItems, onLogout, renderLink, headerActions, collapsible, defaultCollapsed, sidebarFooter, banner, children, }: AppShellProps): import("react").JSX.Element;
37
+ export declare function AppShell({ brand, brandCollapsed, navItems, activePath, isActive, isAdmin, user, userMenuItems, onLogout, renderLink, headerActions, collapsible, defaultCollapsed, sidebarFooter, banner, sidebarClassName, headerClassName, children, }: AppShellProps): import("react").JSX.Element;
30
38
  //# sourceMappingURL=app-shell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../../src/components/app-shell.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAA;AAEhD,OAAO,EAAc,KAAK,OAAO,EAAE,MAAM,eAAe,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,OAAO,EAAY,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAEvE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,SAAS,CAAA;IAChB,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAA;IACzD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,aAAa,CAAC,EAAE,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;;;OAIG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,SAAS,EAAE,OAAO,KAAK,SAAS,CAAC,CAAA;IAC/D,qFAAqF;IACrF,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,cAAc,EACd,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,OAAe,EACf,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,UAA8B,EAC9B,aAAa,EACb,WAAkB,EAClB,gBAAwB,EACxB,aAAa,EACb,MAAM,EACN,QAAQ,GACT,EAAE,aAAa,+BA4Ff"}
1
+ {"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../../src/components/app-shell.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAA;AAEhD,OAAO,EAAc,KAAK,OAAO,EAAE,MAAM,eAAe,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,OAAO,EAAY,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAEvE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,SAAS,CAAA;IAChB,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAA;IACzD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,aAAa,CAAC,EAAE,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;;;OAIG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,SAAS,EAAE,OAAO,KAAK,SAAS,CAAC,CAAA;IAC/D,qFAAqF;IACrF,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,sCAAsC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,cAAc,EACd,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,OAAe,EACf,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,UAA8B,EAC9B,aAAa,EACb,WAAkB,EAClB,gBAAwB,EACxB,aAAa,EACb,MAAM,EACN,gBAAgB,EAChB,eAAe,EACf,QAAQ,GACT,EAAE,aAAa,+BA0Gf"}
@@ -1,10 +1,8 @@
1
- export interface PaginationProps {
1
+ interface PaginationBaseProps {
2
2
  page: number;
3
3
  onPageChange: (page: number) => void;
4
4
  hasNextPage: boolean;
5
5
  hasPreviousPage: boolean;
6
- /** Total de páginas. Quando informado, o rótulo vira "Página {page} de {totalPages}". */
7
- totalPages?: number;
8
6
  /** Exibe o seletor de itens por página. Use com `pageSize`, `onPageSizeChange` e `pageSizeOptions`. */
9
7
  showPageSizeSelector?: boolean;
10
8
  pageSize?: number;
@@ -12,5 +10,16 @@ export interface PaginationProps {
12
10
  pageSizeOptions?: number[];
13
11
  className?: string;
14
12
  }
15
- export declare function Pagination({ page, onPageChange, hasNextPage, hasPreviousPage, totalPages, showPageSizeSelector, pageSize, onPageSizeChange, pageSizeOptions, className, }: PaginationProps): import("react").JSX.Element;
13
+ type PageJumpProps = {
14
+ /** Total de páginas. Quando informado, o rótulo vira "Página {page} de {totalPages}". */
15
+ totalPages?: number;
16
+ showPageJump?: false;
17
+ } | {
18
+ totalPages: number;
19
+ /** Torna o número da página editável para pular direto a uma página. Exige `totalPages`. */
20
+ showPageJump: true;
21
+ };
22
+ export type PaginationProps = PaginationBaseProps & PageJumpProps;
23
+ export declare function Pagination({ page, onPageChange, hasNextPage, hasPreviousPage, totalPages, showPageJump, showPageSizeSelector, pageSize, onPageSizeChange, pageSizeOptions, className, }: PaginationProps): import("react").JSX.Element;
24
+ export {};
16
25
  //# sourceMappingURL=pagination.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/components/pagination.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,WAAW,EAAE,OAAO,CAAA;IACpB,eAAe,EAAE,OAAO,CAAA;IACxB,yFAAyF;IACzF,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,uGAAuG;IACvG,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAMD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,UAAU,EACV,oBAA4B,EAC5B,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,SAAS,GACV,EAAE,eAAe,+BAmDjB"}
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/components/pagination.tsx"],"names":[],"mappings":"AAEA,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,WAAW,EAAE,OAAO,CAAA;IACpB,eAAe,EAAE,OAAO,CAAA;IACxB,uGAAuG;IACvG,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,KAAK,aAAa,GACd;IACE,yFAAyF;IACzF,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,KAAK,CAAA;CACrB,GACD;IACE,UAAU,EAAE,MAAM,CAAA;IAClB,4FAA4F;IAC5F,YAAY,EAAE,IAAI,CAAA;CACnB,CAAA;AAEL,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAAG,aAAa,CAAA;AAMjE,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,UAAU,EACV,YAAoB,EACpB,oBAA4B,EAC5B,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,SAAS,GACV,EAAE,eAAe,+BAuDjB"}
package/dist/index.cjs CHANGED
@@ -345,6 +345,8 @@ function AppShell({
345
345
  defaultCollapsed = false,
346
346
  sidebarFooter,
347
347
  banner,
348
+ sidebarClassName,
349
+ headerClassName,
348
350
  children
349
351
  }) {
350
352
  const [collapsed, setCollapsed] = (0, import_react3.useState)(defaultCollapsed);
@@ -365,18 +367,21 @@ function AppShell({
365
367
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
366
368
  "aside",
367
369
  {
370
+ "data-slot": "sidebar",
368
371
  className: cn(
369
372
  "hidden shrink-0 flex-col border-r bg-card transition-all duration-300 md:flex",
370
- collapsed ? "w-16" : "w-60"
373
+ collapsed ? "w-16" : "w-60",
374
+ sidebarClassName
371
375
  ),
372
376
  children: [
373
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex h-14 shrink-0 items-center border-b px-4", children: collapsed ? brandCollapsed ?? brand : brand }),
374
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex-1 overflow-y-auto px-2 py-4", children: nav(collapsed) }),
375
- sidebarFooter && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "border-t px-3 py-2", "data-slot": "sidebar-footer", children: typeof sidebarFooter === "function" ? sidebarFooter(collapsed) : sidebarFooter }),
376
- collapsible && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "border-t p-2", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
377
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex h-14 shrink-0 items-center border-b border-inherit px-4", "data-slot": "sidebar-brand", children: collapsed ? brandCollapsed ?? brand : brand }),
378
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex-1 overflow-y-auto px-2 py-4", "data-slot": "sidebar-content", children: nav(collapsed) }),
379
+ sidebarFooter && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "border-t border-inherit px-3 py-2", "data-slot": "sidebar-footer", children: typeof sidebarFooter === "function" ? sidebarFooter(collapsed) : sidebarFooter }),
380
+ collapsible && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "border-t border-inherit p-2", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
377
381
  "button",
378
382
  {
379
383
  type: "button",
384
+ "data-slot": "sidebar-toggle",
380
385
  onClick: () => setCollapsed((v) => !v),
381
386
  className: "flex w-full items-center justify-center rounded-md px-2 py-2 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",
382
387
  "aria-label": collapsed ? "Expandir menu" : "Recolher menu",
@@ -399,14 +404,16 @@ function AppShell({
399
404
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
400
405
  "div",
401
406
  {
407
+ "data-slot": "sidebar-drawer",
402
408
  className: cn(
403
409
  "absolute left-0 top-0 flex h-full w-64 flex-col border-r bg-card transition-transform duration-300",
404
- mobileOpen ? "translate-x-0" : "-translate-x-full"
410
+ mobileOpen ? "translate-x-0" : "-translate-x-full",
411
+ sidebarClassName
405
412
  ),
406
413
  onClick: (e) => e.stopPropagation(),
407
414
  children: [
408
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex h-14 shrink-0 items-center border-b px-4", children: brand }),
409
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex-1 overflow-y-auto px-2 py-4", children: nav(false, () => setMobileOpen(false)) })
415
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex h-14 shrink-0 items-center border-b border-inherit px-4", "data-slot": "sidebar-brand", children: brand }),
416
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex-1 overflow-y-auto px-2 py-4", "data-slot": "sidebar-content", children: nav(false, () => setMobileOpen(false)) })
410
417
  ]
411
418
  }
412
419
  )
@@ -415,22 +422,29 @@ function AppShell({
415
422
  ),
416
423
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
417
424
  banner,
418
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: "flex h-14 shrink-0 items-center gap-2 border-b bg-background px-4", children: [
419
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
420
- "button",
421
- {
422
- type: "button",
423
- onClick: () => setMobileOpen(true),
424
- className: "inline-flex h-9 w-9 max-sm:h-10 max-sm:w-10 items-center justify-center rounded-md border border-input bg-background shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground md:hidden",
425
- "aria-label": "Abrir menu",
426
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.Menu, { className: "h-4 w-4" })
427
- }
428
- ),
429
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "ml-auto flex items-center gap-2", children: [
430
- headerActions,
431
- (user || onLogout) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(UserMenu, { user, items: userMenuItems, onLogout, renderLink })
432
- ] })
433
- ] }),
425
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
426
+ "header",
427
+ {
428
+ "data-slot": "header",
429
+ className: cn("flex h-14 shrink-0 items-center gap-2 border-b bg-background px-4", headerClassName),
430
+ children: [
431
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
432
+ "button",
433
+ {
434
+ type: "button",
435
+ onClick: () => setMobileOpen(true),
436
+ className: "inline-flex h-9 w-9 max-sm:h-10 max-sm:w-10 items-center justify-center rounded-md border border-input bg-background shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground md:hidden",
437
+ "aria-label": "Abrir menu",
438
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.Menu, { className: "h-4 w-4" })
439
+ }
440
+ ),
441
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "ml-auto flex items-center gap-2", children: [
442
+ headerActions,
443
+ (user || onLogout) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(UserMenu, { user, items: userMenuItems, onLogout, renderLink })
444
+ ] })
445
+ ]
446
+ }
447
+ ),
434
448
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("main", { className: "flex-1 overflow-y-auto", children })
435
449
  ] })
436
450
  ] });
@@ -2050,6 +2064,7 @@ function PageHeader({ title, description, action, className }) {
2050
2064
  }
2051
2065
 
2052
2066
  // src/components/pagination.tsx
2067
+ var import_react7 = require("react");
2053
2068
  var import_jsx_runtime23 = require("react/jsx-runtime");
2054
2069
  var navButtonClass2 = "inline-flex h-8 max-sm:h-10 items-center justify-center rounded-md border border-input bg-background px-3 text-xs font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground cursor-pointer disabled:pointer-events-none disabled:opacity-50";
2055
2070
  function Pagination({
@@ -2058,6 +2073,7 @@ function Pagination({
2058
2073
  hasNextPage,
2059
2074
  hasPreviousPage,
2060
2075
  totalPages,
2076
+ showPageJump = false,
2061
2077
  showPageSizeSelector = false,
2062
2078
  pageSize,
2063
2079
  onPageSizeChange,
@@ -2093,7 +2109,7 @@ function Pagination({
2093
2109
  children: "Anterior"
2094
2110
  }
2095
2111
  ),
2096
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
2112
+ showPageJump && totalPages !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PageJumpInput, { page, totalPages, onPageChange }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
2097
2113
  "P\xE1gina ",
2098
2114
  page,
2099
2115
  totalPages ? ` de ${totalPages}` : ""
@@ -2113,6 +2129,50 @@ function Pagination({
2113
2129
  }
2114
2130
  );
2115
2131
  }
2132
+ function PageJumpInput({ page, totalPages, onPageChange }) {
2133
+ const inputId = (0, import_react7.useId)();
2134
+ const [draft, setDraft] = (0, import_react7.useState)(null);
2135
+ const [prevPage, setPrevPage] = (0, import_react7.useState)(page);
2136
+ if (page !== prevPage) {
2137
+ setPrevPage(page);
2138
+ setDraft(null);
2139
+ }
2140
+ const commit = () => {
2141
+ if (draft === null) return;
2142
+ setDraft(null);
2143
+ if (draft === "") return;
2144
+ const target = Math.max(1, Math.min(Number(draft), totalPages));
2145
+ if (target !== page) onPageChange(target);
2146
+ };
2147
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "flex items-center gap-1.5 whitespace-nowrap text-sm text-muted-foreground", children: [
2148
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: inputId, className: "max-sm:sr-only", children: "P\xE1gina" }),
2149
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2150
+ "input",
2151
+ {
2152
+ id: inputId,
2153
+ type: "text",
2154
+ inputMode: "numeric",
2155
+ enterKeyHint: "go",
2156
+ autoComplete: "off",
2157
+ "aria-label": "Ir para a p\xE1gina",
2158
+ value: draft ?? String(page),
2159
+ onChange: (e) => setDraft(e.target.value.replace(/\D/g, "")),
2160
+ onFocus: (e) => e.target.select(),
2161
+ onBlur: commit,
2162
+ onKeyDown: (e) => {
2163
+ if (e.key === "Enter") commit();
2164
+ else if (e.key === "Escape") setDraft(null);
2165
+ },
2166
+ style: { width: `${String(totalPages).length + 3}ch` },
2167
+ className: "h-8 max-sm:h-10 rounded-md border border-input bg-background px-1.5 text-center text-xs font-medium tabular-nums text-foreground shadow-sm transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
2168
+ }
2169
+ ),
2170
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { children: [
2171
+ "de ",
2172
+ totalPages
2173
+ ] })
2174
+ ] });
2175
+ }
2116
2176
 
2117
2177
  // src/components/password-input.tsx
2118
2178
  var import_lucide_react11 = require("lucide-react");
@@ -2235,7 +2295,7 @@ function ResponsiveDataView({
2235
2295
  // src/components/row-actions-menu.tsx
2236
2296
  var DropdownMenu3 = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
2237
2297
  var import_lucide_react12 = require("lucide-react");
2238
- var import_react7 = require("react");
2298
+ var import_react8 = require("react");
2239
2299
  var import_vaul6 = require("vaul");
2240
2300
  var import_jsx_runtime27 = require("react/jsx-runtime");
2241
2301
  var triggerClass = "inline-flex h-8 w-8 max-sm:h-10 max-sm:w-10 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50";
@@ -2249,7 +2309,7 @@ function RowActionsMenu({
2249
2309
  renderLink = defaultRenderLink
2250
2310
  }) {
2251
2311
  const isDesktop = useIsDesktop();
2252
- const [open, setOpen] = (0, import_react7.useState)(false);
2312
+ const [open, setOpen] = (0, import_react8.useState)(false);
2253
2313
  if (actions.length === 0) return null;
2254
2314
  const trigger = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2255
2315
  "button",
@@ -2593,15 +2653,15 @@ function Toaster(props) {
2593
2653
  var import_lucide_react13 = require("lucide-react");
2594
2654
 
2595
2655
  // src/hooks/use-version-check.ts
2596
- var import_react8 = require("react");
2656
+ var import_react9 = require("react");
2597
2657
  function useVersionCheck({
2598
2658
  currentBuild,
2599
2659
  url = "/version.json",
2600
2660
  intervalMs = 6e4
2601
2661
  }) {
2602
- const [latestBuild, setLatestBuild] = (0, import_react8.useState)(null);
2603
- const [staleChecks, setStaleChecks] = (0, import_react8.useState)(0);
2604
- (0, import_react8.useEffect)(() => {
2662
+ const [latestBuild, setLatestBuild] = (0, import_react9.useState)(null);
2663
+ const [staleChecks, setStaleChecks] = (0, import_react9.useState)(0);
2664
+ (0, import_react9.useEffect)(() => {
2605
2665
  if (!currentBuild) return;
2606
2666
  let cancelled = false;
2607
2667
  const check = async () => {
@@ -2632,7 +2692,7 @@ function useVersionCheck({
2632
2692
  document.removeEventListener("visibilitychange", onVisible);
2633
2693
  };
2634
2694
  }, [currentBuild, url, intervalMs]);
2635
- const reload = (0, import_react8.useCallback)(() => window.location.reload(), []);
2695
+ const reload = (0, import_react9.useCallback)(() => window.location.reload(), []);
2636
2696
  return { updateAvailable: latestBuild !== null, staleChecks, latestBuild, reload };
2637
2697
  }
2638
2698
 
@@ -2678,7 +2738,7 @@ function UpdateBanner({
2678
2738
  }
2679
2739
 
2680
2740
  // src/hooks/use-company-subdomain.ts
2681
- var import_react9 = require("react");
2741
+ var import_react10 = require("react");
2682
2742
  var ALWAYS_RESERVED = ["www", "localhost"];
2683
2743
  function getSubdomain(hostname, reservedSubdomains = []) {
2684
2744
  const labels = hostname.split(".");
@@ -2711,7 +2771,7 @@ function useCompanySubdomain(opts = {}) {
2711
2771
  overrideStorageKey = "company-subdomain",
2712
2772
  reservedSubdomains = []
2713
2773
  } = opts;
2714
- const [subdomain] = (0, import_react9.useState)(() => {
2774
+ const [subdomain] = (0, import_react10.useState)(() => {
2715
2775
  if (enableOverride) {
2716
2776
  const override = resolveOverride(overrideStorageKey);
2717
2777
  if (override) return override;
@@ -2723,20 +2783,20 @@ function useCompanySubdomain(opts = {}) {
2723
2783
  }
2724
2784
 
2725
2785
  // src/hooks/use-disclosure.ts
2726
- var import_react10 = require("react");
2786
+ var import_react11 = require("react");
2727
2787
  function useDisclosure(initial = false) {
2728
- const [open, setOpen] = (0, import_react10.useState)(initial);
2729
- const onOpen = (0, import_react10.useCallback)(() => setOpen(true), []);
2730
- const onClose = (0, import_react10.useCallback)(() => setOpen(false), []);
2731
- const onToggle = (0, import_react10.useCallback)(() => setOpen((v) => !v), []);
2788
+ const [open, setOpen] = (0, import_react11.useState)(initial);
2789
+ const onOpen = (0, import_react11.useCallback)(() => setOpen(true), []);
2790
+ const onClose = (0, import_react11.useCallback)(() => setOpen(false), []);
2791
+ const onToggle = (0, import_react11.useCallback)(() => setOpen((v) => !v), []);
2732
2792
  return { open, onOpen, onClose, onToggle, setOpen };
2733
2793
  }
2734
2794
 
2735
2795
  // src/hooks/use-toast.ts
2736
2796
  var import_sonner2 = require("sonner");
2737
- var import_react11 = require("react");
2797
+ var import_react12 = require("react");
2738
2798
  function useCustomToast() {
2739
- const showToast = (0, import_react11.useCallback)(
2799
+ const showToast = (0, import_react12.useCallback)(
2740
2800
  (title, description, status = "success") => {
2741
2801
  switch (status) {
2742
2802
  case "success":