@krosoft/react 0.0.305 → 0.0.307

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.
@@ -0,0 +1,28 @@
1
+ import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
+ import { t } from "./i18n-Iyf3fyzr.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ //#region src/components/core/layouts/AppTitle.tsx
5
+ function i({ titleKey: i, descriptionKey: a, isSubTitle: o, inline: s }) {
6
+ let { t: c } = t(), l = o ? "text-xl md:text-2xl font-semibold" : "text-xl md:text-3xl font-bold";
7
+ return s ? /* @__PURE__ */ r("div", {
8
+ className: "flex min-w-0 flex-wrap items-baseline gap-x-2",
9
+ children: [/* @__PURE__ */ n("h1", {
10
+ className: e("shrink-0", l),
11
+ children: c(i) ?? ""
12
+ }), a ? /* @__PURE__ */ n("p", {
13
+ className: "min-w-0 truncate text-sm font-normal text-muted-foreground md:text-base",
14
+ children: c(a)
15
+ }) : null]
16
+ }) : /* @__PURE__ */ r("div", {
17
+ className: "flex min-w-0 flex-col gap-1",
18
+ children: [/* @__PURE__ */ n("h1", {
19
+ className: l,
20
+ children: c(i) ?? ""
21
+ }), a ? /* @__PURE__ */ n("p", {
22
+ className: e("hidden md:block text-muted-foreground", o && "text-sm"),
23
+ children: c(a)
24
+ }) : null]
25
+ });
26
+ }
27
+ //#endregion
28
+ export { i as t };
@@ -15,7 +15,7 @@ import "./forms/index.js";
15
15
  import { n as W, t as G } from "../../icons-n0m_1w7z.js";
16
16
  import { t as K } from "../../inputs-Cxz5kfwF.js";
17
17
  import { t as q } from "../../language-DgO7XgOg.js";
18
- import { t as J } from "../../AppTitle-BShUHen9.js";
18
+ import { t as J } from "../../AppTitle-C8t_LSuG.js";
19
19
  import { n as Y, t as X } from "../../states-Bs9lIWQe.js";
20
20
  import { AppPageHeader as Z, KpiCardsLayout as Q } from "./layouts/index.js";
21
21
  import { a as $, i as ee, n as te, o as ne, r as re, t as ie } from "../../navbar-tmnNnH3O.js";
@@ -8,6 +8,8 @@ export interface AppPageHeaderProps {
8
8
  onBack?: (() => void) | null;
9
9
  renderPreActions?: () => React.JSX.Element;
10
10
  className?: string;
11
+ /** Affiche le sous-titre (descriptionKey) sur la même ligne que le titre. */
12
+ inline?: boolean;
11
13
  }
12
- export declare function AppPageHeader({ icon: Icon, titleKey, descriptionKey, actions, onBack, renderPreActions, className }: AppPageHeaderProps): React.JSX.Element;
14
+ export declare function AppPageHeader({ icon: Icon, titleKey, descriptionKey, actions, onBack, renderPreActions, className, inline }: AppPageHeaderProps): React.JSX.Element;
13
15
  //# sourceMappingURL=AppPageHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppPageHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/core/layouts/AppPageHeader.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IACtB,MAAM,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE,kBAAkB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA0B3J"}
1
+ {"version":3,"file":"AppPageHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/core/layouts/AppPageHeader.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IACtB,MAAM,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,kBAAkB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA0BnK"}
@@ -2,6 +2,8 @@ export interface AppTitleProps {
2
2
  titleKey: string;
3
3
  descriptionKey?: string;
4
4
  isSubTitle?: boolean;
5
+ /** Rend le sous-titre sur la même ligne que le titre (au lieu d'en dessous), en gris plus léger. */
6
+ inline?: boolean;
5
7
  }
6
- export declare function AppTitle({ titleKey, descriptionKey, isSubTitle }: AppTitleProps): React.JSX.Element;
8
+ export declare function AppTitle({ titleKey, descriptionKey, isSubTitle, inline }: AppTitleProps): React.JSX.Element;
7
9
  //# sourceMappingURL=AppTitle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/core/layouts/AppTitle.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,EAAE,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CASnG"}
1
+ {"version":3,"file":"AppTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/core/layouts/AppTitle.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oGAAoG;IACpG,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAoB3G"}
@@ -4,16 +4,16 @@ import "../../../ui-BdLutnCT.js";
4
4
  import { c as r } from "../../../tooltip-_geGvbS7.js";
5
5
  import { t as i } from "../../../AppActions-CvT8dDnQ.js";
6
6
  import { t as a } from "../../../AppSubTitle-DJQjeSdC.js";
7
- import { t as o } from "../../../AppTitle-BShUHen9.js";
7
+ import { t as o } from "../../../AppTitle-C8t_LSuG.js";
8
8
  import { t as s } from "../../../useDocumentTitle--JeBsMsb.js";
9
9
  import { n as c } from "../../../states-Bs9lIWQe.js";
10
10
  import "react";
11
11
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
12
12
  import { ArrowLeftIcon as d } from "lucide-react";
13
13
  //#region src/components/core/layouts/AppPageHeader.tsx
14
- function f({ icon: t, titleKey: n, descriptionKey: a, actions: c, onBack: f, renderPreActions: p, className: m }) {
15
- let { t: h } = e();
16
- return s(h(n)), /* @__PURE__ */ u("div", {
14
+ function f({ icon: t, titleKey: n, descriptionKey: a, actions: c, onBack: f, renderPreActions: p, className: m, inline: h }) {
15
+ let { t: g } = e();
16
+ return s(g(n)), /* @__PURE__ */ u("div", {
17
17
  className: "flex flex-row items-center justify-between gap-3 md:gap-4",
18
18
  children: [/* @__PURE__ */ u("div", {
19
19
  className: "flex min-w-0 items-center gap-3 md:gap-4",
@@ -31,7 +31,8 @@ function f({ icon: t, titleKey: n, descriptionKey: a, actions: c, onBack: f, ren
31
31
  }),
32
32
  /* @__PURE__ */ l(o, {
33
33
  titleKey: n,
34
- descriptionKey: a
34
+ descriptionKey: a,
35
+ inline: h
35
36
  })
36
37
  ]
37
38
  }), /* @__PURE__ */ u("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../../src/components/core/table/DataTable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE5E,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,SAAiB,EAAE,KAAY,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAqJ5H"}
1
+ {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../../src/components/core/table/DataTable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE5E,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,SAAiB,EAAE,KAAY,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAsJ5H"}
@@ -10,6 +10,7 @@ export interface TableBodyProps<T> {
10
10
  rowKey: (row: T) => string;
11
11
  onRowClick?: (row: T, event: React.MouseEvent<HTMLTableRowElement>) => void;
12
12
  onRowNavigate?: (row: T) => string;
13
+ rowNavigable?: (row: T) => boolean;
13
14
  hasBulkActions: boolean;
14
15
  rowSelectable?: (row: T) => boolean;
15
16
  selectedKeys: Set<string>;
@@ -24,5 +25,5 @@ export interface TableBodyProps<T> {
24
25
  resizableColumns?: boolean;
25
26
  fixedColumns?: Record<string, FixedColumnOffset>;
26
27
  }
27
- export declare function TableBody<T>({ isLoading, error, colSpanCount, messages, paginatedData, rowKey, onRowClick, onRowNavigate, hasBulkActions, rowSelectable, selectedKeys, toggleRowSelection, visibleColumnsArray, columnWidths, hasActions, actions, columns, bordered, dense, resizableColumns, fixedColumns, }: TableBodyProps<T>): React.JSX.Element;
28
+ export declare function TableBody<T>({ isLoading, error, colSpanCount, messages, paginatedData, rowKey, onRowClick, onRowNavigate, rowNavigable, hasBulkActions, rowSelectable, selectedKeys, toggleRowSelection, visibleColumnsArray, columnWidths, hasActions, actions, columns, bordered, dense, resizableColumns, fixedColumns, }: TableBodyProps<T>): React.JSX.Element;
28
29
  //# sourceMappingURL=TableBody.d.ts.map
@@ -1 +1 @@
1
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AAE,CAAC,KAAK,MAAM,CAAC;IACnC,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC;IACnC,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC;IACpC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,kBAAkB,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IACrC,mBAAmB,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;IAClC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;CAClD;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,EAC3B,SAAS,EACT,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,MAAM,EACN,UAAU,EACV,aAAa,EACb,YAAY,EACZ,cAAc,EACd,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,OAAO,EACP,OAAO,EACP,QAAgB,EAChB,KAAa,EACb,gBAAwB,EACxB,YAAiB,GAClB,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAiKvC"}
@@ -8,10 +8,10 @@ import { n as O, r as k } from "../../../datatable-COQcYUrk.js";
8
8
  import { useMemo as A, useState as j } from "react";
9
9
  import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
10
10
  import { formatJsonValue as F, isRecord as I, tryParseJson as L } from "@krosoft/core/helpers";
11
- import { AlertTriangleIcon as R, ArrowDownIcon as z, ArrowUpDownIcon as B, ArrowUpIcon as V, ChevronLeftIcon as ee, ChevronRightIcon as te, GripVerticalIcon as ne, Loader2Icon as re, MoreVerticalIcon as ie, SettingsIcon as ae } from "lucide-react";
12
- import { useNavigate as H } from "react-router-dom";
11
+ import { AlertTriangleIcon as R, ArrowDownIcon as z, ArrowUpDownIcon as B, ArrowUpIcon as V, ChevronLeftIcon as H, ChevronRightIcon as ee, GripVerticalIcon as te, Loader2Icon as ne, MoreVerticalIcon as re, SettingsIcon as ie } from "lucide-react";
12
+ import { useNavigate as U } from "react-router-dom";
13
13
  //#region src/components/core/table/TableActions.tsx
14
- function U({ actions: e, row: t }) {
14
+ function W({ actions: e, row: t }) {
15
15
  let { t: n } = a(), r = e.filter((e) => e.visible === void 0 || e.visible(t));
16
16
  if (r.length === 0) return null;
17
17
  let i = r.filter((e) => e.overflow !== !0), o = r.filter((e) => e.overflow === !0);
@@ -35,7 +35,7 @@ function U({ actions: e, row: t }) {
35
35
  variant: "ghost",
36
36
  size: "icon",
37
37
  className: "h-7 w-7 text-muted-foreground hover:text-foreground",
38
- children: /* @__PURE__ */ N(ie, { className: "size-3.5" })
38
+ children: /* @__PURE__ */ N(re, { className: "size-3.5" })
39
39
  })
40
40
  }), /* @__PURE__ */ N(f, {
41
41
  align: "end",
@@ -61,9 +61,9 @@ function U({ actions: e, row: t }) {
61
61
  }
62
62
  //#endregion
63
63
  //#region src/components/core/table/TableBody.tsx
64
- function W({ isLoading: o, error: s, colSpanCount: c, messages: l, paginatedData: u, rowKey: d, onRowClick: f, onRowNavigate: p, hasBulkActions: m, rowSelectable: h, selectedKeys: _, toggleRowSelection: v, visibleColumnsArray: y, columnWidths: b, hasActions: x, actions: S, columns: C, bordered: w = !1, dense: T = !1, resizableColumns: E = !1, fixedColumns: D = {} }) {
65
- let { t: O } = a(), k = O(l?.loadingKey ?? "states.loading"), A = O(l?.emptyKey ?? "states.noResult"), j = H(), M = (e, t) => {
66
- let n = C.find((e) => e.key === t);
64
+ function G({ isLoading: o, error: s, colSpanCount: c, messages: l, paginatedData: u, rowKey: d, onRowClick: f, onRowNavigate: p, rowNavigable: m, hasBulkActions: h, rowSelectable: _, selectedKeys: v, toggleRowSelection: y, visibleColumnsArray: b, columnWidths: x, hasActions: S, actions: C, columns: w, bordered: T = !1, dense: E = !1, resizableColumns: D = !1, fixedColumns: O = {} }) {
65
+ let { t: k } = a(), A = k(l?.loadingKey ?? "states.loading"), j = k(l?.emptyKey ?? "states.noResult"), M = U(), F = (e, t) => {
66
+ let n = w.find((e) => e.key === t);
67
67
  if (n?.renderCell !== void 0) return n.renderCell(e);
68
68
  let r = e[t];
69
69
  return /* @__PURE__ */ N("span", {
@@ -78,9 +78,9 @@ function W({ isLoading: o, error: s, colSpanCount: c, messages: l, paginatedData
78
78
  className: "py-8 text-center",
79
79
  children: /* @__PURE__ */ P("div", {
80
80
  className: "flex flex-col items-center justify-center gap-2 text-muted-foreground",
81
- children: [/* @__PURE__ */ N(re, { className: "h-6 w-6 animate-spin text-primary" }), /* @__PURE__ */ N("span", {
81
+ children: [/* @__PURE__ */ N(ne, { className: "h-6 w-6 animate-spin text-primary" }), /* @__PURE__ */ N("span", {
82
82
  className: "text-sm",
83
- children: k
83
+ children: A
84
84
  })]
85
85
  })
86
86
  }) })
@@ -104,36 +104,35 @@ function W({ isLoading: o, error: s, colSpanCount: c, messages: l, paginatedData
104
104
  children: /* @__PURE__ */ N("tr", { children: /* @__PURE__ */ N("td", {
105
105
  colSpan: c,
106
106
  className: "py-8 text-center text-sm text-muted-foreground",
107
- children: A
107
+ children: j
108
108
  }) })
109
109
  });
110
- let F = i(D[t], "body"), I = i(D[e], "body"), L = m && _.size > 0, z = L || p !== void 0 || f !== void 0, B = (e, t) => {
111
- if (L) {
112
- v(e);
110
+ let I = i(O[t], "body"), L = i(O[e], "body"), z = h && v.size > 0, B = (e) => {
111
+ if (!(m !== void 0 && !m(e))) return p?.(e);
112
+ }, V = (e, t, n) => {
113
+ if (z) {
114
+ y(e);
113
115
  return;
114
116
  }
115
- if (p !== void 0) {
116
- let n = p(e);
117
- t.ctrlKey || t.metaKey ? window.open(n, "_blank") : j(n);
118
- } else f?.(e, t);
117
+ t === void 0 ? f?.(e, n) : n.ctrlKey || n.metaKey ? window.open(t, "_blank") : M(t);
119
118
  };
120
119
  return /* @__PURE__ */ N("tbody", {
121
120
  className: "divide-y divide-border",
122
121
  children: u.map((e) => {
123
- let t = d(e), a = h === void 0 || h(e);
122
+ let t = d(e), a = _ === void 0 || _(e), o = B(e);
124
123
  return /* @__PURE__ */ P("tr", {
125
- className: `group hover:bg-muted/50 transition-colors ${z ? "cursor-pointer" : ""}`,
124
+ className: `group hover:bg-muted/50 transition-colors ${z || o !== void 0 || f !== void 0 ? "cursor-pointer" : ""}`,
126
125
  onClick: (t) => {
127
- B(e, t);
126
+ V(e, o, t);
128
127
  },
129
128
  children: [
130
- m ? /* @__PURE__ */ N("td", {
131
- className: `p-1 text-center align-middle ${F.className}`,
129
+ h ? /* @__PURE__ */ N("td", {
130
+ className: `p-1 text-center align-middle ${I.className}`,
132
131
  style: {
133
132
  width: "48px",
134
133
  minWidth: "48px",
135
134
  maxWidth: "48px",
136
- ...F.style
135
+ ...I.style
137
136
  },
138
137
  onClick: (e) => {
139
138
  e.stopPropagation();
@@ -141,41 +140,41 @@ function W({ isLoading: o, error: s, colSpanCount: c, messages: l, paginatedData
141
140
  children: /* @__PURE__ */ N("div", {
142
141
  className: "flex items-center justify-center",
143
142
  children: /* @__PURE__ */ N(g, {
144
- checked: _.has(t),
143
+ checked: v.has(t),
145
144
  disabled: !a,
146
145
  onCheckedChange: () => {
147
- v(e);
146
+ y(e);
148
147
  }
149
148
  })
150
149
  })
151
150
  }) : null,
152
- y.map((t, a) => {
153
- let o = a === y.length - 1, s = i(D[t.key], "body");
151
+ b.map((t, a) => {
152
+ let o = a === b.length - 1, s = i(O[t.key], "body");
154
153
  return /* @__PURE__ */ N("td", {
155
- className: `${`${a === 0 && !m ? "pl-4" : "pl-2"} ${o && !x ? "pr-4" : "pr-2"}`} ${T ? "py-2" : "py-4"} text-sm ${n(r(t))} ${s.className} ${w && !o ? "border-r border-border" : ""} ${t.className ?? ""}`,
154
+ className: `${`${a === 0 && !h ? "pl-4" : "pl-2"} ${o && !S ? "pr-4" : "pr-2"}`} ${E ? "py-2" : "py-4"} text-sm ${n(r(t))} ${s.className} ${T && !o ? "border-r border-border" : ""} ${t.className ?? ""}`,
156
155
  style: {
157
- ...E ? { width: b[t.key] } : { minWidth: b[t.key] },
156
+ ...D ? { width: x[t.key] } : { minWidth: x[t.key] },
158
157
  ...s.style
159
158
  },
160
159
  children: /* @__PURE__ */ N("div", {
161
160
  className: "w-full h-full",
162
- children: M(e, t.key)
161
+ children: F(e, t.key)
163
162
  })
164
163
  }, t.key);
165
164
  }),
166
- x ? /* @__PURE__ */ N("td", {
167
- className: `py-1 pl-1 pr-4 text-right align-middle whitespace-nowrap ${I.className}`,
165
+ S ? /* @__PURE__ */ N("td", {
166
+ className: `py-1 pl-1 pr-4 text-right align-middle whitespace-nowrap ${L.className}`,
168
167
  style: {
169
168
  minWidth: "32px",
170
- ...I.style
169
+ ...L.style
171
170
  },
172
171
  onClick: (e) => {
173
172
  e.stopPropagation();
174
173
  },
175
- children: S !== void 0 && S.length > 0 ? /* @__PURE__ */ N("div", {
174
+ children: C !== void 0 && C.length > 0 ? /* @__PURE__ */ N("div", {
176
175
  className: "flex items-center justify-end",
177
- children: /* @__PURE__ */ N(U, {
178
- actions: S,
176
+ children: /* @__PURE__ */ N(W, {
177
+ actions: C,
179
178
  row: e
180
179
  })
181
180
  }) : null
@@ -187,7 +186,7 @@ function W({ isLoading: o, error: s, colSpanCount: c, messages: l, paginatedData
187
186
  }
188
187
  //#endregion
189
188
  //#region src/components/core/table/TableBulkActions.tsx
190
- function G({ selectedRows: e, setSelectedRows: t, bulkActions: n }) {
189
+ function K({ selectedRows: e, setSelectedRows: t, bulkActions: n }) {
191
190
  let { t: r } = a();
192
191
  return /* @__PURE__ */ P("div", {
193
192
  className: "bg-muted/60 border border-border px-3 py-1.5 flex items-center justify-between rounded-surface",
@@ -229,12 +228,12 @@ function G({ selectedRows: e, setSelectedRows: t, bulkActions: n }) {
229
228
  }
230
229
  //#endregion
231
230
  //#region src/components/core/table/TableHeader.tsx
232
- var K = {
231
+ var q = {
233
232
  left: "justify-start",
234
233
  center: "justify-center",
235
234
  right: "justify-end"
236
235
  };
237
- function q({ hasBulkActions: o, allSelected: s, someSelected: c, toggleSelectAll: l, visibleColumnsArray: u, draggableColumns: d, resizableColumns: f, columnWidths: p, sortColumn: m, sortDirection: h, handleSort: _, handleDragStart: v, handleDragOver: y, handleDrop: b, handleMouseDown: x, hasActions: S, settingsNode: C, bordered: w = !1, dense: T = !1, fixedColumns: E = {}, fixedSelection: D = !1, fixedActions: O = !1 }) {
236
+ function J({ hasBulkActions: o, allSelected: s, someSelected: c, toggleSelectAll: l, visibleColumnsArray: u, draggableColumns: d, resizableColumns: f, columnWidths: p, sortColumn: m, sortDirection: h, handleSort: _, handleDragStart: v, handleDragOver: y, handleDrop: b, handleMouseDown: x, hasActions: S, settingsNode: C, bordered: w = !1, dense: T = !1, fixedColumns: E = {}, fixedSelection: D = !1, fixedActions: O = !1 }) {
238
237
  let { t: k } = a(), A = !1;
239
238
  s ? A = !0 : c && (A = "indeterminate");
240
239
  let j = (e) => e.sortable === !0 ? m === e.key ? N(h === "asc" ? V : z, { className: "size-3.5 text-foreground" }) : /* @__PURE__ */ N(B, { className: "size-3.5 text-muted-foreground/50 group-hover:text-muted-foreground transition-colors" }) : null, M = (e, t, a) => {
@@ -268,9 +267,9 @@ function q({ hasBulkActions: o, allSelected: s, someSelected: c, toggleSelectAll
268
267
  b(t, e.key);
269
268
  },
270
269
  children: [/* @__PURE__ */ P("div", {
271
- className: `flex items-center gap-1 ${K[d]} ${f ? "pr-2" : ""}`,
270
+ className: `flex items-center gap-1 ${q[d]} ${f ? "pr-2" : ""}`,
272
271
  children: [
273
- s ? /* @__PURE__ */ N(ne, { className: "size-4 text-muted-foreground cursor-grab shrink-0" }) : null,
272
+ s ? /* @__PURE__ */ N(te, { className: "size-4 text-muted-foreground cursor-grab shrink-0" }) : null,
274
273
  /* @__PURE__ */ N("span", {
275
274
  className: "truncate",
276
275
  children: k(e.headerKey)
@@ -325,31 +324,31 @@ function q({ hasBulkActions: o, allSelected: s, someSelected: c, toggleSelectAll
325
324
  }
326
325
  //#endregion
327
326
  //#region src/components/core/table/TablePagination.tsx
328
- var J = "…";
329
- function Y(e, t) {
327
+ var Y = "…";
328
+ function X(e, t) {
330
329
  return Array.from({ length: t - e + 1 }, (t, n) => e + n);
331
330
  }
332
- function oe(e, t, n = 1) {
333
- if (n * 2 + 5 >= t) return Y(1, t);
331
+ function ae(e, t, n = 1) {
332
+ if (n * 2 + 5 >= t) return X(1, t);
334
333
  let r = Math.max(e - n, 1), i = Math.min(e + n, t), a = r > 2, o = i < t - 1;
335
334
  return !a && o ? [
336
- ...Y(1, n + 2),
337
- J,
335
+ ...X(1, n + 2),
336
+ Y,
338
337
  t
339
338
  ] : a && !o ? [
340
339
  1,
341
- J,
342
- ...Y(t - (n + 2) + 1, t)
340
+ Y,
341
+ ...X(t - (n + 2) + 1, t)
343
342
  ] : [
344
343
  1,
345
- J,
346
- ...Y(r, i),
347
- J,
344
+ Y,
345
+ ...X(r, i),
346
+ Y,
348
347
  t
349
348
  ];
350
349
  }
351
- function se({ totalItems: e, startIndex: t, endIndex: n, pageSize: r, setPageSize: i, currentPage: o, setCurrentPage: s, pageSizeOptions: c, totalPages: l }) {
352
- let { t: u } = a(), d = oe(o, l);
350
+ function oe({ totalItems: e, startIndex: t, endIndex: n, pageSize: r, setPageSize: i, currentPage: o, setCurrentPage: s, pageSizeOptions: c, totalPages: l }) {
351
+ let { t: u } = a(), d = ae(o, l);
353
352
  return /* @__PURE__ */ P("div", {
354
353
  className: "px-4 py-2 border-t border-border flex flex-col sm:grid sm:grid-cols-3 items-center gap-2 bg-muted/50",
355
354
  children: [
@@ -372,11 +371,11 @@ function se({ totalItems: e, startIndex: t, endIndex: n, pageSize: r, setPageSiz
372
371
  },
373
372
  disabled: o === 1,
374
373
  "aria-label": u("table.previousPage"),
375
- children: /* @__PURE__ */ N(ee, { className: "size-4" })
374
+ children: /* @__PURE__ */ N(H, { className: "size-4" })
376
375
  }),
377
- d.map((e, t) => e === J ? /* @__PURE__ */ N("span", {
376
+ d.map((e, t) => e === Y ? /* @__PURE__ */ N("span", {
378
377
  className: "flex h-8 w-8 items-center justify-center text-sm text-muted-foreground",
379
- children: J
378
+ children: Y
380
379
  }, `dots-${String(t)}`) : /* @__PURE__ */ N(b, {
381
380
  variant: e === o ? "default" : "ghost",
382
381
  size: "icon",
@@ -396,7 +395,7 @@ function se({ totalItems: e, startIndex: t, endIndex: n, pageSize: r, setPageSiz
396
395
  },
397
396
  disabled: o === l,
398
397
  "aria-label": u("table.nextPage"),
399
- children: /* @__PURE__ */ N(te, { className: "size-4" })
398
+ children: /* @__PURE__ */ N(ee, { className: "size-4" })
400
399
  })
401
400
  ] })
402
401
  }),
@@ -421,7 +420,7 @@ function se({ totalItems: e, startIndex: t, endIndex: n, pageSize: r, setPageSiz
421
420
  }
422
421
  //#endregion
423
422
  //#region src/components/core/table/TableSettings.tsx
424
- function X({ columns: e, visibleColumns: t, toggleColumnVisibility: n }) {
423
+ function Z({ columns: e, visibleColumns: t, toggleColumnVisibility: n }) {
425
424
  let { t: r } = a();
426
425
  return /* @__PURE__ */ P(_, { children: [/* @__PURE__ */ N(u, {
427
426
  asChild: !0,
@@ -429,7 +428,7 @@ function X({ columns: e, visibleColumns: t, toggleColumnVisibility: n }) {
429
428
  variant: "outline",
430
429
  size: "sm",
431
430
  className: "size-7 p-0 bg-background hover:bg-muted shadow-sm border-border",
432
- children: /* @__PURE__ */ N(ae, { className: "size-3.5 text-muted-foreground" })
431
+ children: /* @__PURE__ */ N(ie, { className: "size-3.5 text-muted-foreground" })
433
432
  })
434
433
  }), /* @__PURE__ */ N(f, {
435
434
  align: "end",
@@ -445,99 +444,100 @@ function X({ columns: e, visibleColumns: t, toggleColumnVisibility: n }) {
445
444
  }
446
445
  //#endregion
447
446
  //#region src/components/core/table/DataTable.tsx
448
- function ce({ data: e, isLoading: t = !1, error: n = null, config: r, server: i }) {
449
- let { columns: a, rowKey: o, rowSelectable: s, onRowClick: c, onRowNavigate: l, actions: u, bulkActions: d } = r, f = r.pageSizeDefault ?? O, p = r.pageSizeOptions ?? k, m = r.dense ?? !1, h = r.bordered ?? !1, g = r.draggableColumns ?? !1, _ = r.resizableColumns ?? !1, v = r.columnVisibility ?? !1, y = r.fixedActions ?? !1, { sortColumn: b, sortDirection: x, selectedRows: S, setSelectedRows: C, visibleColumns: w, columnWidths: T, safeCurrentPage: j, totalPages: M, startIndex: F, endIndex: I, tableRef: L, hasActions: R, hasBulkActions: z, visibleColumnsArray: B, colSpanCount: V, paginatedData: ee, handleSort: te, handleMouseDown: ne, handleDragStart: re, handleDragOver: ie, handleDrop: ae, toggleColumnVisibility: H, toggleRowSelection: U, toggleSelectAll: K, pageSize: J, setPageSize: Y, setCurrentPage: oe } = E({
447
+ function se({ data: e, isLoading: t = !1, error: n = null, config: r, server: i }) {
448
+ let { columns: a, rowKey: o, rowSelectable: s, onRowClick: c, onRowNavigate: l, rowNavigable: u, actions: d, bulkActions: f } = r, p = r.pageSizeDefault ?? O, m = r.pageSizeOptions ?? k, h = r.dense ?? !1, g = r.bordered ?? !1, _ = r.draggableColumns ?? !1, v = r.resizableColumns ?? !1, y = r.columnVisibility ?? !1, b = r.fixedActions ?? !1, { sortColumn: x, sortDirection: S, selectedRows: C, setSelectedRows: w, visibleColumns: T, columnWidths: j, safeCurrentPage: M, totalPages: F, startIndex: I, endIndex: L, tableRef: R, hasActions: z, hasBulkActions: B, visibleColumnsArray: V, colSpanCount: H, paginatedData: ee, handleSort: te, handleMouseDown: ne, handleDragStart: re, handleDragOver: ie, handleDrop: U, toggleColumnVisibility: W, toggleRowSelection: q, toggleSelectAll: Y, pageSize: X, setPageSize: ae, setCurrentPage: se } = E({
450
449
  data: e,
451
450
  columns: a,
452
451
  rowKey: o,
453
452
  rowSelectable: s,
454
- pageSizeDefault: f,
455
- actions: u,
456
- bulkActions: d,
457
- columnVisibility: v,
453
+ pageSizeDefault: p,
454
+ actions: d,
455
+ bulkActions: f,
456
+ columnVisibility: y,
458
457
  server: i
459
- }), ce = z && B.some((e) => e.fixed === "left"), Z = D(L), Q = A(() => new Set(S.map(o)), [S, o]), $ = A(() => s === void 0 ? e : e.filter(s), [e, s]), le = $.length > 0 && $.every((e) => Q.has(o(e))), ue = !le && $.some((e) => Q.has(o(e)));
458
+ }), ce = B && V.some((e) => e.fixed === "left"), le = D(R), Q = A(() => new Set(C.map(o)), [C, o]), $ = A(() => s === void 0 ? e : e.filter(s), [e, s]), ue = $.length > 0 && $.every((e) => Q.has(o(e))), de = !ue && $.some((e) => Q.has(o(e)));
460
459
  return /* @__PURE__ */ P("div", {
461
460
  className: "space-y-4 [--k-radius-control:var(--k-radius-control-dense,0.5rem)] [--k-radius-surface:var(--k-radius-surface-dense,0.75rem)]",
462
- children: [S.length > 0 && d !== void 0 && d.length > 0 && /* @__PURE__ */ N(G, {
463
- selectedRows: S,
464
- setSelectedRows: C,
465
- bulkActions: d
461
+ children: [C.length > 0 && f !== void 0 && f.length > 0 && /* @__PURE__ */ N(K, {
462
+ selectedRows: C,
463
+ setSelectedRows: w,
464
+ bulkActions: f
466
465
  }), /* @__PURE__ */ P("div", {
467
466
  className: "w-full bg-card rounded-surface border border-border overflow-hidden",
468
467
  children: [/* @__PURE__ */ N("div", {
469
468
  className: "overflow-x-auto",
470
469
  children: /* @__PURE__ */ P("table", {
471
- ref: L,
470
+ ref: R,
472
471
  className: "w-full",
473
- children: [/* @__PURE__ */ N(q, {
474
- hasBulkActions: z,
475
- allSelected: le,
476
- someSelected: ue,
477
- toggleSelectAll: K,
478
- visibleColumnsArray: B,
479
- draggableColumns: g,
480
- resizableColumns: _,
481
- columnWidths: T,
482
- sortColumn: b,
483
- sortDirection: x,
472
+ children: [/* @__PURE__ */ N(J, {
473
+ hasBulkActions: B,
474
+ allSelected: ue,
475
+ someSelected: de,
476
+ toggleSelectAll: Y,
477
+ visibleColumnsArray: V,
478
+ draggableColumns: _,
479
+ resizableColumns: v,
480
+ columnWidths: j,
481
+ sortColumn: x,
482
+ sortDirection: S,
484
483
  handleSort: te,
485
484
  handleDragStart: re,
486
485
  handleDragOver: ie,
487
- handleDrop: ae,
486
+ handleDrop: U,
488
487
  handleMouseDown: ne,
489
- hasActions: R,
490
- bordered: h,
491
- dense: m,
492
- fixedColumns: Z,
488
+ hasActions: z,
489
+ bordered: g,
490
+ dense: h,
491
+ fixedColumns: le,
493
492
  fixedSelection: ce,
494
- fixedActions: y,
495
- settingsNode: v ? /* @__PURE__ */ N(X, {
493
+ fixedActions: b,
494
+ settingsNode: y ? /* @__PURE__ */ N(Z, {
496
495
  columns: a,
497
- visibleColumns: w,
498
- toggleColumnVisibility: H
496
+ visibleColumns: T,
497
+ toggleColumnVisibility: W
499
498
  }) : void 0
500
- }), /* @__PURE__ */ N(W, {
501
- bordered: h,
502
- dense: m,
499
+ }), /* @__PURE__ */ N(G, {
500
+ bordered: g,
501
+ dense: h,
503
502
  isLoading: t,
504
503
  error: n,
505
- colSpanCount: V,
504
+ colSpanCount: H,
506
505
  messages: r.messages,
507
506
  paginatedData: ee,
508
507
  rowKey: o,
509
508
  onRowClick: c,
510
509
  onRowNavigate: l,
511
- hasBulkActions: z,
510
+ rowNavigable: u,
511
+ hasBulkActions: B,
512
512
  rowSelectable: s,
513
513
  selectedKeys: Q,
514
- toggleRowSelection: U,
515
- visibleColumnsArray: B,
516
- columnWidths: T,
517
- hasActions: R || v,
518
- actions: u,
514
+ toggleRowSelection: q,
515
+ visibleColumnsArray: V,
516
+ columnWidths: j,
517
+ hasActions: z || y,
518
+ actions: d,
519
519
  columns: a,
520
- resizableColumns: _,
521
- fixedColumns: Z
520
+ resizableColumns: v,
521
+ fixedColumns: le
522
522
  })]
523
523
  })
524
- }), /* @__PURE__ */ N(se, {
524
+ }), /* @__PURE__ */ N(oe, {
525
525
  totalItems: i?.totalRows ?? e.length,
526
- startIndex: F,
527
- endIndex: I,
528
- pageSize: J,
529
- setPageSize: Y,
530
- currentPage: j,
531
- setCurrentPage: oe,
532
- pageSizeOptions: p,
533
- totalPages: M
526
+ startIndex: I,
527
+ endIndex: L,
528
+ pageSize: X,
529
+ setPageSize: ae,
530
+ currentPage: M,
531
+ setCurrentPage: se,
532
+ pageSizeOptions: m,
533
+ totalPages: F
534
534
  })]
535
535
  })]
536
536
  });
537
537
  }
538
538
  //#endregion
539
539
  //#region src/components/core/table/JsonTableOutput.tsx
540
- var Z = ({ header: e, output: t }) => {
540
+ var ce = ({ header: e, output: t }) => {
541
541
  let { t: n } = a(), [r, i] = j(!0), l = L(t), u = l !== null, d = () => /* @__PURE__ */ P("div", {
542
542
  className: "flex items-center justify-between mb-2",
543
543
  children: [/* @__PURE__ */ N("span", {
@@ -603,4 +603,4 @@ var Z = ({ header: e, output: t }) => {
603
603
  }) : null;
604
604
  };
605
605
  //#endregion
606
- export { ce as DataTable, Z as JsonTableOutput, U as TableActions, W as TableBody, G as TableBulkActions, q as TableHeader, se as TablePagination, X as TableSettings };
606
+ export { se as DataTable, ce as JsonTableOutput, W as TableActions, G as TableBody, K as TableBulkActions, J as TableHeader, oe as TablePagination, Z as TableSettings };
@@ -5,7 +5,7 @@ import { _ as a, g as o, h as s, m as c } from "../../../ui-BdLutnCT.js";
5
5
  import { d as l } from "../../../sheet-C2vx5V6Q.js";
6
6
  import { i as u, l as d, n as f, t as p, u as m } from "../../../select-KWMg2_7Z.js";
7
7
  import { t as h } from "../../../AppActions-CvT8dDnQ.js";
8
- import { t as g } from "../../../AppTitle-BShUHen9.js";
8
+ import { t as g } from "../../../AppTitle-C8t_LSuG.js";
9
9
  import { useEffect as _, useRef as v } from "react";
10
10
  import { jsx as y, jsxs as b } from "react/jsx-runtime";
11
11
  import { ConstructionIcon as x } from "lucide-react";
@@ -19,7 +19,7 @@ import { ActiveFilters as Hr, AdvancedFilters as Ur, FilterField as Wr, FilterPi
19
19
  import { n as Jr, t as Yr } from "../icons-n0m_1w7z.js";
20
20
  import { t as Xr } from "../inputs-Cxz5kfwF.js";
21
21
  import { t as Zr } from "../language-DgO7XgOg.js";
22
- import { t as Qr } from "../AppTitle-BShUHen9.js";
22
+ import { t as Qr } from "../AppTitle-C8t_LSuG.js";
23
23
  import { n as $r, t as ei } from "../states-Bs9lIWQe.js";
24
24
  import { AppPageHeader as ti, KpiCardsLayout as ni } from "./core/layouts/index.js";
25
25
  import { a as ri, i as ii, n as ai, o as oi, r as si, t as ci } from "../navbar-tmnNnH3O.js";
@@ -21,8 +21,17 @@ export interface DataTableConfig<T> {
21
21
  */
22
22
  rowSelectable?: (row: T) => boolean;
23
23
  onRowClick?: (row: T, event: React.MouseEvent<HTMLTableRowElement>) => void;
24
- /** Retourne l'URL de destination de la ligne au clic (prioritaire sur onRowClick). */
24
+ /**
25
+ * Retourne l'URL de destination de la ligne au clic (prioritaire sur onRowClick).
26
+ * Une ligne non navigable (voir `rowNavigable`) perd son curseur de lien et son clic retombe sur `onRowClick`.
27
+ */
25
28
  onRowNavigate?: (row: T) => string;
29
+ /**
30
+ * Autorise ou non la navigation au clic sur une ligne (`onRowNavigate`).
31
+ * Une ligne non navigable perd son curseur de lien et son clic retombe sur `onRowClick`.
32
+ * Par défaut toutes les lignes sont navigables.
33
+ */
34
+ rowNavigable?: (row: T) => boolean;
26
35
  /** Actions par ligne, affichées en ligne ou dans le menu kebab (`overflow`). */
27
36
  actions?: DataTableRowAction<T>[];
28
37
  /** Actions rapides sur la sélection multiple. */
@@ -1 +1 @@
1
- {"version":3,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CAAC;IAClC,iDAAiD;IACjD,WAAW,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC;IACvC,sDAAsD;IACtD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,8DAA8D;IAC9D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kFAAkF;IAClF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krosoft/react",
3
- "version": "0.0.305",
3
+ "version": "0.0.307",
4
4
  "description": "Krosoft shared React package",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,19 +0,0 @@
1
- import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
- import { t } from "./i18n-Iyf3fyzr.js";
3
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
- //#region src/components/core/layouts/AppTitle.tsx
5
- function i({ titleKey: i, descriptionKey: a, isSubTitle: o }) {
6
- let { t: s } = t();
7
- return /* @__PURE__ */ r("div", {
8
- className: "flex min-w-0 flex-col gap-1",
9
- children: [/* @__PURE__ */ n("h1", {
10
- className: o ? "text-xl md:text-2xl font-semibold" : "text-xl md:text-3xl font-bold",
11
- children: s(i) ?? ""
12
- }), a ? /* @__PURE__ */ n("p", {
13
- className: e("hidden md:block text-muted-foreground", o && "text-sm"),
14
- children: s(a)
15
- }) : null]
16
- });
17
- }
18
- //#endregion
19
- export { i as t };