@hgdc/ui 0.22.0 → 0.22.1

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.
@@ -15,7 +15,7 @@ export declare function ResourceItem({ icon, title, meta, badge, actions, href,
15
15
  /** Icône, favicon ou marque, dans une tuile de 40 px. */
16
16
  icon?: ReactNode;
17
17
  title: ReactNode;
18
- /** Une ligne de contexte : adresse, date, auteur. Deux lignes au plus sur un écran étroit, puis tronquée. */
18
+ /** Contexte : adresse, date, auteur. Deux lignes au plus, puis tronquée. */
19
19
  meta?: ReactNode;
20
20
  badge?: ReactNode;
21
21
  /** Boutons-icônes ou menu « … ». */
@@ -17,7 +17,7 @@ export function ResourceList({ className, surface = true, ...props }) {
17
17
  */
18
18
  export function ResourceItem({ icon, title, meta, badge, actions, href, render, className, }) {
19
19
  const linked = href !== undefined || render !== undefined;
20
- return (_jsxs("li", { "data-slot": "resource-item", className: cn("relative flex min-h-16 items-center gap-3 px-4 py-3 transition-colors duration-(--duration-fast) ease-out not-first:border-t not-first:border-foreground/5 sm:gap-4 sm:px-5", linked && "hover:bg-foreground/[0.03] has-focus-visible:bg-foreground/[0.03]", className), children: [icon ? (_jsx("span", { "aria-hidden": true, className: "grid size-10 shrink-0 place-items-center overflow-hidden rounded-xl bg-background text-muted-foreground dark:bg-muted [&_svg:not([class*='size-'])]:size-5", children: icon })) : null, _jsxs("div", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-2 sm:gap-x-4", children: [_jsxs("div", { className: "min-w-0 flex-[1_1_12rem]", children: [_jsx("p", { className: "truncate text-sm font-medium", children: linked ? (_jsx(ResourceLink, { href: href, render: render, children: title })) : (title) }), meta ? _jsx("p", { className: "mt-0.5 line-clamp-2 text-xs break-words text-muted-foreground", children: meta }) : null] }), badge || actions ? (_jsxs("div", { "data-slot": "resource-item-trailing", className: "flex max-w-full shrink-0 flex-wrap items-center gap-x-3 gap-y-2 sm:gap-x-4", children: [badge ? _jsx("div", { className: "shrink-0", children: badge }) : null, actions ? _jsx("div", { className: "relative z-1 flex shrink-0 items-center gap-1", children: actions }) : null] })) : null] })] }));
20
+ return (_jsxs("li", { "data-slot": "resource-item", className: cn("relative flex min-h-16 items-center gap-3 px-4 py-3 transition-colors duration-(--duration-fast) ease-out not-first:border-t not-first:border-foreground/5 sm:gap-4 sm:px-5", linked && "hover:bg-foreground/[0.03] has-focus-visible:bg-foreground/[0.03]", className), children: [icon ? (_jsx("span", { "aria-hidden": true, className: "grid size-10 shrink-0 place-items-center overflow-hidden rounded-xl bg-background text-muted-foreground dark:bg-muted [&_svg:not([class*='size-'])]:size-5", children: icon })) : null, _jsxs("div", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-2 sm:gap-x-4", children: [_jsxs("div", { className: "min-w-0 flex-[1_1_12rem]", children: [_jsx("p", { className: "text-sm font-medium break-words", children: linked ? (_jsx(ResourceLink, { href: href, render: render, children: title })) : (title) }), meta ? _jsx("p", { className: "mt-0.5 line-clamp-2 text-xs break-words text-muted-foreground", children: meta }) : null] }), badge || actions ? (_jsxs("div", { "data-slot": "resource-item-trailing", className: "flex min-w-0 max-w-full flex-wrap items-center gap-x-3 gap-y-2 sm:gap-x-4", children: [badge ? _jsx("div", { className: "max-w-full min-w-0", children: badge }) : null, actions ? (_jsx("div", { className: "relative z-1 flex max-w-full min-w-0 flex-wrap items-center gap-1 [&>:not([class*=size-])]:h-auto [&>:not([class*=size-])]:min-h-9 [&>:not([class*=size-])]:py-1.5 [&>:not([class*=size-])]:text-center [&>:not([class*=size-])]:whitespace-normal [&>*]:max-w-full", children: actions })) : null] })) : null] })] }));
21
21
  }
22
22
  function ResourceLink({ href, render, children, }) {
23
23
  return useRender({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hgdc/ui",
3
- "version": "0.22.0",
3
+ "version": "0.22.1",
4
4
  "description": "Interface de la H Collection : jetons de la DA, thèmes, polices et composants.",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://github.com/hugogebel-boop/hgdc-kit/tree/main/packages/ui#readme",