@krosoft/react 0.0.306 → 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", {
@@ -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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krosoft/react",
3
- "version": "0.0.306",
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 };