@4sh/ui-kit 0.5.0 → 0.6.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.
package/README.fr.md CHANGED
@@ -87,13 +87,20 @@ voie n'a pas de hook à l'installation — ajoutez-le vous-même, une fois, dans
87
87
  {
88
88
  "mcpServers": {
89
89
  "ui-kit": {
90
- "command": "node",
91
- "args": ["node_modules/@4sh/ui-kit/mcp/index.js"]
90
+ "command": "npx",
91
+ "args": ["--no-install", "ui-kit-mcp"]
92
92
  }
93
93
  }
94
94
  }
95
95
  ```
96
96
 
97
+ `npm install` pose `ui-kit-mcp` dans le `node_modules/.bin/` du projet : cette forme
98
+ se résout donc quel que soit le dossier depuis lequel votre client MCP lance le
99
+ serveur — un `node node_modules/@4sh/ui-kit/mcp/index.js` en dur est relatif au
100
+ répertoire courant et casse dès que ce n'est pas la racine du projet. Gardez
101
+ `--no-install` : npx échoue franchement si le binaire manque, au lieu d'aller
102
+ chercher sur le registre un paquet homonyme sans rapport.
103
+
97
104
  Rien à installer au-delà de `@4sh/ui-kit` lui-même, et rien à aller chercher sur le
98
105
  registre npm à l'usage — le fichier est déjà sur le disque une fois `npm install`
99
106
  passé. Tools : `list_components`, `get_component_doc`, `search_docs`,
package/README.md CHANGED
@@ -86,13 +86,20 @@ install-time hook — add it yourself, once, to your `.mcp.json`:
86
86
  {
87
87
  "mcpServers": {
88
88
  "ui-kit": {
89
- "command": "node",
90
- "args": ["node_modules/@4sh/ui-kit/mcp/index.js"]
89
+ "command": "npx",
90
+ "args": ["--no-install", "ui-kit-mcp"]
91
91
  }
92
92
  }
93
93
  }
94
94
  ```
95
95
 
96
+ `npm install` links `ui-kit-mcp` into your project's `node_modules/.bin/`, so this
97
+ form resolves no matter which directory your MCP client starts the server from — a
98
+ hardcoded `node node_modules/@4sh/ui-kit/mcp/index.js` is relative to the working
99
+ directory and breaks as soon as that isn't the project root. Keep `--no-install`: it
100
+ makes npx fail loudly when the bin is missing, rather than fetching an unrelated
101
+ package of that name from the registry.
102
+
96
103
  Nothing to install beyond `@4sh/ui-kit` itself, and nothing to reach on the npm
97
104
  registry at run time — the file is already on disk once `npm install` has run. Tools:
98
105
  `list_components`, `get_component_doc`, `search_docs`, `get_shared_config` — same
@@ -60,6 +60,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
60
60
  * dropping content into the card — needs no imports (default `<ng-content>`); title and
61
61
  * subtitle also accept the `header`/`subheader` string inputs. Richer slots use the
62
62
  * exported marker directives (`UiCardMedia`, `UiCardTitle`, `UiCardSubtitle`, `UiCardFooter`).
63
+ *
64
+ * Sizing: no intrinsic width (a block parent gives 100%, `fluid` fills a flex/grid one) and
65
+ * the visible box fills the host's height, so a row of cards lines up on its own.
63
66
  */
64
67
  class UiCard {
65
68
  constructor() {
@@ -72,6 +75,8 @@ class UiCard {
72
75
  /** Visual treatment of the surface. */
73
76
  this.variant = input('outlined', /* @ts-ignore */
74
77
  ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
78
+ /** Span the full width of the parent (a flex/grid parent otherwise sizes the card to its content). */
79
+ this.fluid = input(false, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
75
80
  /**
76
81
  * Removes the horizontal gutter of the default content region so it bleeds to
77
82
  * the card edges — lets the consumer own the inner layout (e.g. a full-bleed
@@ -79,6 +84,12 @@ class UiCard {
79
84
  * with `padding-inline: var(--ui-card-gutter)`.
80
85
  */
81
86
  this.contentFlush = input(false, { ...(ngDevMode ? { debugName: "contentFlush" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
87
+ /**
88
+ * Classes applied to the default content region, gutter kept: lets the consumer lay
89
+ * the content out (Gridaflex, utilities) without an intermediate wrapper.
90
+ */
91
+ this.contentClass = input('', /* @ts-ignore */
92
+ ...(ngDevMode ? [{ debugName: "contentClass" }] : /* istanbul ignore next */ []));
82
93
  /** Accessible name for the card region (use when the card conveys a landmark). */
83
94
  this.ariaLabel = input(/* @ts-ignore */
84
95
  ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
@@ -128,6 +139,19 @@ class UiCard {
128
139
  this.showSubheaderString = computed(() => !!this.subheader() && !this.subtitleSlot(), /* @ts-ignore */
129
140
  ...(ngDevMode ? [{ debugName: "showSubheaderString" }] : /* istanbul ignore next */ []));
130
141
  /** @ignore */
142
+ this.contentClasses = computed(() => {
143
+ const c = ['ui-card-content'];
144
+ if (!this.hasContent())
145
+ c.push('_empty');
146
+ if (this.contentFlush())
147
+ c.push('_flush');
148
+ const extra = this.contentClass().trim();
149
+ if (extra)
150
+ c.push(extra);
151
+ return c.join(' ');
152
+ }, /* @ts-ignore */
153
+ ...(ngDevMode ? [{ debugName: "contentClasses" }] : /* istanbul ignore next */ []));
154
+ /** @ignore */
131
155
  this.classes = computed(() => {
132
156
  const c = ['ui-card', `_${this.variant()}`];
133
157
  if (this.hasMedia())
@@ -145,12 +169,14 @@ class UiCard {
145
169
  });
146
170
  }
147
171
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiCard, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
148
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: UiCard, isStandalone: true, selector: "ui-card", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, subheader: { classPropertyName: "subheader", publicName: "subheader", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, contentFlush: { classPropertyName: "contentFlush", publicName: "contentFlush", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "titleSlot", first: true, predicate: UiCardTitle, descendants: true, isSignal: true }, { propertyName: "subtitleSlot", first: true, predicate: UiCardSubtitle, descendants: true, isSignal: true }, { propertyName: "mediaSlot", first: true, predicate: UiCardMedia, descendants: true, isSignal: true }, { propertyName: "footerSlot", first: true, predicate: UiCardFooter, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "contentWrap", first: true, predicate: ["contentWrap"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n [class]=\"classes()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.role]=\"ariaLabel() || ariaLabelledBy() ? 'region' : null\"\n>\n @if (hasMedia()) {\n <div class=\"ui-card-media\">\n <ng-content select=\"[uiCardMedia], ui-card-media\" />\n </div>\n }\n\n <div class=\"ui-card-body\">\n @if (hasHeader()) {\n <div class=\"ui-card-header\">\n @if (hasTitle()) {\n <div class=\"ui-card-title\">\n @if (showHeaderString()) {\n {{ header() }}\n }\n <ng-content select=\"[uiCardTitle], ui-card-title\" />\n </div>\n }\n @if (hasSubtitle()) {\n <div class=\"ui-card-subtitle\">\n @if (showSubheaderString()) {\n {{ subheader() }}\n }\n <ng-content select=\"[uiCardSubtitle], ui-card-subtitle\" />\n </div>\n }\n </div>\n }\n\n <div\n class=\"ui-card-content\"\n #contentWrap\n [class._empty]=\"!hasContent()\"\n [class._flush]=\"contentFlush()\"\n >\n <ng-content />\n </div>\n\n @if (hasFooter()) {\n <div class=\"ui-card-footer\">\n <ng-content select=\"[uiCardFooter], ui-card-footer\" />\n </div>\n }\n </div>\n</div>\n", styles: [":host{display:block}.ui-card{--ui-card-gutter: var(--ui-card-padding, var(--units-lg));display:flex;flex-direction:column;overflow:hidden;background-color:var(--global-background-default);border:var(--ui-card-stroke-width, var(--stroke-sm)) solid transparent;border-radius:var(--ui-card-radius, var(--radius-md));color:var(--global-text-default);font-family:var(--fontfamily-base)}.ui-card-media{display:flex;overflow:hidden}.ui-card-media ::ng-deep img,.ui-card-media ::ng-deep svg,.ui-card-media ::ng-deep ui-image,.ui-card-media ::ng-deep picture{display:block;width:100%;height:100%;object-fit:cover}.ui-card-body{display:flex;flex-direction:column;gap:var(--ui-card-gap, var(--units-md));padding-block:var(--ui-card-padding, var(--units-lg))}.ui-card-header{display:flex;flex-direction:column;gap:var(--ui-card-header-gap, var(--units-2xs));padding-inline:var(--ui-card-padding, var(--units-lg))}.ui-card-title{display:flex;align-items:center;flex-wrap:wrap;gap:var(--units-sm);font-family:var(--fontfamily-title);font-size:var(--size-typography-title-default);font-weight:var(--weight-bold);line-height:1.2;color:var(--global-text-default)}.ui-card-subtitle{font-size:var(--size-typography-text-md);line-height:1.4;color:var(--global-text-muted)}.ui-card-content{padding-inline:var(--ui-card-padding, var(--units-lg));font-size:var(--size-typography-text-md);line-height:1.5;color:var(--global-text-default)}.ui-card-content._flush{padding-inline:0}.ui-card-content._empty{display:none}.ui-card-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--ui-card-footer-gap, var(--units-sm));padding-inline:var(--ui-card-padding, var(--units-lg))}.ui-card._outlined{border-color:var(--global-border-subtle)}.ui-card._elevated{box-shadow:var(--shadow-default-md)}\n"] }); }
172
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: UiCard, isStandalone: true, selector: "ui-card", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, subheader: { classPropertyName: "subheader", publicName: "subheader", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, contentFlush: { classPropertyName: "contentFlush", publicName: "contentFlush", isSignal: true, isRequired: false, transformFunction: null }, contentClass: { classPropertyName: "contentClass", publicName: "contentClass", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class._fluid": "fluid()" } }, queries: [{ propertyName: "titleSlot", first: true, predicate: UiCardTitle, descendants: true, isSignal: true }, { propertyName: "subtitleSlot", first: true, predicate: UiCardSubtitle, descendants: true, isSignal: true }, { propertyName: "mediaSlot", first: true, predicate: UiCardMedia, descendants: true, isSignal: true }, { propertyName: "footerSlot", first: true, predicate: UiCardFooter, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "contentWrap", first: true, predicate: ["contentWrap"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n [class]=\"classes()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.role]=\"ariaLabel() || ariaLabelledBy() ? 'region' : null\"\n>\n @if (hasMedia()) {\n <div class=\"ui-card-media\">\n <ng-content select=\"[uiCardMedia], ui-card-media\" />\n </div>\n }\n\n <div class=\"ui-card-body\">\n @if (hasHeader()) {\n <div class=\"ui-card-header\">\n @if (hasTitle()) {\n <div class=\"ui-card-title\">\n @if (showHeaderString()) {\n {{ header() }}\n }\n <ng-content select=\"[uiCardTitle], ui-card-title\" />\n </div>\n }\n @if (hasSubtitle()) {\n <div class=\"ui-card-subtitle\">\n @if (showSubheaderString()) {\n {{ subheader() }}\n }\n <ng-content select=\"[uiCardSubtitle], ui-card-subtitle\" />\n </div>\n }\n </div>\n }\n\n <div #contentWrap [class]=\"contentClasses()\">\n <ng-content />\n </div>\n\n @if (hasFooter()) {\n <div class=\"ui-card-footer\">\n <ng-content select=\"[uiCardFooter], ui-card-footer\" />\n </div>\n }\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host._fluid{width:100%}.ui-card{--ui-card-gutter: var(--ui-card-padding, var(--units-lg));display:flex;flex-direction:column;flex:1 1 auto;overflow:hidden;background-color:var(--global-background-default);border:var(--ui-card-stroke-width, var(--stroke-sm)) solid transparent;border-radius:var(--ui-card-radius, var(--radius-md));color:var(--global-text-default);font-family:var(--fontfamily-base)}.ui-card-media{display:flex;overflow:hidden}.ui-card-media ::ng-deep img,.ui-card-media ::ng-deep svg,.ui-card-media ::ng-deep ui-image,.ui-card-media ::ng-deep picture{display:block;width:100%;height:100%;object-fit:cover}.ui-card-body{display:flex;flex-direction:column;gap:var(--ui-card-gap, var(--units-md));padding-block:var(--ui-card-padding, var(--units-lg))}.ui-card-header{display:flex;flex-direction:column;gap:var(--ui-card-header-gap, var(--units-2xs));padding-inline:var(--ui-card-padding, var(--units-lg))}.ui-card-title{display:flex;align-items:center;flex-wrap:wrap;gap:var(--units-sm);font-family:var(--fontfamily-title);font-size:var(--size-typography-title-default);font-weight:var(--weight-bold);line-height:1.2;color:var(--global-text-default)}.ui-card-subtitle{font-size:var(--size-typography-text-md);line-height:1.4;color:var(--global-text-muted)}.ui-card-content{padding-inline:var(--ui-card-padding, var(--units-lg));font-size:var(--size-typography-text-md);line-height:1.5;color:var(--global-text-default)}.ui-card-content._flush{padding-inline:0}.ui-card-content._empty{display:none}.ui-card-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--ui-card-footer-gap, var(--units-sm));padding-inline:var(--ui-card-padding, var(--units-lg))}.ui-card._outlined{border-color:var(--global-border-subtle)}.ui-card._elevated{box-shadow:var(--shadow-default-md)}\n"] }); }
149
173
  }
150
174
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiCard, decorators: [{
151
175
  type: Component,
152
- args: [{ selector: 'ui-card', imports: [], template: "<div\n [class]=\"classes()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.role]=\"ariaLabel() || ariaLabelledBy() ? 'region' : null\"\n>\n @if (hasMedia()) {\n <div class=\"ui-card-media\">\n <ng-content select=\"[uiCardMedia], ui-card-media\" />\n </div>\n }\n\n <div class=\"ui-card-body\">\n @if (hasHeader()) {\n <div class=\"ui-card-header\">\n @if (hasTitle()) {\n <div class=\"ui-card-title\">\n @if (showHeaderString()) {\n {{ header() }}\n }\n <ng-content select=\"[uiCardTitle], ui-card-title\" />\n </div>\n }\n @if (hasSubtitle()) {\n <div class=\"ui-card-subtitle\">\n @if (showSubheaderString()) {\n {{ subheader() }}\n }\n <ng-content select=\"[uiCardSubtitle], ui-card-subtitle\" />\n </div>\n }\n </div>\n }\n\n <div\n class=\"ui-card-content\"\n #contentWrap\n [class._empty]=\"!hasContent()\"\n [class._flush]=\"contentFlush()\"\n >\n <ng-content />\n </div>\n\n @if (hasFooter()) {\n <div class=\"ui-card-footer\">\n <ng-content select=\"[uiCardFooter], ui-card-footer\" />\n </div>\n }\n </div>\n</div>\n", styles: [":host{display:block}.ui-card{--ui-card-gutter: var(--ui-card-padding, var(--units-lg));display:flex;flex-direction:column;overflow:hidden;background-color:var(--global-background-default);border:var(--ui-card-stroke-width, var(--stroke-sm)) solid transparent;border-radius:var(--ui-card-radius, var(--radius-md));color:var(--global-text-default);font-family:var(--fontfamily-base)}.ui-card-media{display:flex;overflow:hidden}.ui-card-media ::ng-deep img,.ui-card-media ::ng-deep svg,.ui-card-media ::ng-deep ui-image,.ui-card-media ::ng-deep picture{display:block;width:100%;height:100%;object-fit:cover}.ui-card-body{display:flex;flex-direction:column;gap:var(--ui-card-gap, var(--units-md));padding-block:var(--ui-card-padding, var(--units-lg))}.ui-card-header{display:flex;flex-direction:column;gap:var(--ui-card-header-gap, var(--units-2xs));padding-inline:var(--ui-card-padding, var(--units-lg))}.ui-card-title{display:flex;align-items:center;flex-wrap:wrap;gap:var(--units-sm);font-family:var(--fontfamily-title);font-size:var(--size-typography-title-default);font-weight:var(--weight-bold);line-height:1.2;color:var(--global-text-default)}.ui-card-subtitle{font-size:var(--size-typography-text-md);line-height:1.4;color:var(--global-text-muted)}.ui-card-content{padding-inline:var(--ui-card-padding, var(--units-lg));font-size:var(--size-typography-text-md);line-height:1.5;color:var(--global-text-default)}.ui-card-content._flush{padding-inline:0}.ui-card-content._empty{display:none}.ui-card-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--ui-card-footer-gap, var(--units-sm));padding-inline:var(--ui-card-padding, var(--units-lg))}.ui-card._outlined{border-color:var(--global-border-subtle)}.ui-card._elevated{box-shadow:var(--shadow-default-md)}\n"] }]
153
- }], ctorParameters: () => [], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], subheader: [{ type: i0.Input, args: [{ isSignal: true, alias: "subheader", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], contentFlush: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentFlush", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], titleSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UiCardTitle), { isSignal: true }] }], subtitleSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UiCardSubtitle), { isSignal: true }] }], mediaSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UiCardMedia), { isSignal: true }] }], footerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UiCardFooter), { isSignal: true }] }], contentWrap: [{ type: i0.ViewChild, args: ['contentWrap', { isSignal: true }] }] } });
176
+ args: [{ selector: 'ui-card', imports: [], host: {
177
+ '[class._fluid]': 'fluid()',
178
+ }, template: "<div\n [class]=\"classes()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.role]=\"ariaLabel() || ariaLabelledBy() ? 'region' : null\"\n>\n @if (hasMedia()) {\n <div class=\"ui-card-media\">\n <ng-content select=\"[uiCardMedia], ui-card-media\" />\n </div>\n }\n\n <div class=\"ui-card-body\">\n @if (hasHeader()) {\n <div class=\"ui-card-header\">\n @if (hasTitle()) {\n <div class=\"ui-card-title\">\n @if (showHeaderString()) {\n {{ header() }}\n }\n <ng-content select=\"[uiCardTitle], ui-card-title\" />\n </div>\n }\n @if (hasSubtitle()) {\n <div class=\"ui-card-subtitle\">\n @if (showSubheaderString()) {\n {{ subheader() }}\n }\n <ng-content select=\"[uiCardSubtitle], ui-card-subtitle\" />\n </div>\n }\n </div>\n }\n\n <div #contentWrap [class]=\"contentClasses()\">\n <ng-content />\n </div>\n\n @if (hasFooter()) {\n <div class=\"ui-card-footer\">\n <ng-content select=\"[uiCardFooter], ui-card-footer\" />\n </div>\n }\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host._fluid{width:100%}.ui-card{--ui-card-gutter: var(--ui-card-padding, var(--units-lg));display:flex;flex-direction:column;flex:1 1 auto;overflow:hidden;background-color:var(--global-background-default);border:var(--ui-card-stroke-width, var(--stroke-sm)) solid transparent;border-radius:var(--ui-card-radius, var(--radius-md));color:var(--global-text-default);font-family:var(--fontfamily-base)}.ui-card-media{display:flex;overflow:hidden}.ui-card-media ::ng-deep img,.ui-card-media ::ng-deep svg,.ui-card-media ::ng-deep ui-image,.ui-card-media ::ng-deep picture{display:block;width:100%;height:100%;object-fit:cover}.ui-card-body{display:flex;flex-direction:column;gap:var(--ui-card-gap, var(--units-md));padding-block:var(--ui-card-padding, var(--units-lg))}.ui-card-header{display:flex;flex-direction:column;gap:var(--ui-card-header-gap, var(--units-2xs));padding-inline:var(--ui-card-padding, var(--units-lg))}.ui-card-title{display:flex;align-items:center;flex-wrap:wrap;gap:var(--units-sm);font-family:var(--fontfamily-title);font-size:var(--size-typography-title-default);font-weight:var(--weight-bold);line-height:1.2;color:var(--global-text-default)}.ui-card-subtitle{font-size:var(--size-typography-text-md);line-height:1.4;color:var(--global-text-muted)}.ui-card-content{padding-inline:var(--ui-card-padding, var(--units-lg));font-size:var(--size-typography-text-md);line-height:1.5;color:var(--global-text-default)}.ui-card-content._flush{padding-inline:0}.ui-card-content._empty{display:none}.ui-card-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--ui-card-footer-gap, var(--units-sm));padding-inline:var(--ui-card-padding, var(--units-lg))}.ui-card._outlined{border-color:var(--global-border-subtle)}.ui-card._elevated{box-shadow:var(--shadow-default-md)}\n"] }]
179
+ }], ctorParameters: () => [], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], subheader: [{ type: i0.Input, args: [{ isSignal: true, alias: "subheader", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], contentFlush: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentFlush", required: false }] }], contentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentClass", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], titleSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UiCardTitle), { isSignal: true }] }], subtitleSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UiCardSubtitle), { isSignal: true }] }], mediaSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UiCardMedia), { isSignal: true }] }], footerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UiCardFooter), { isSignal: true }] }], contentWrap: [{ type: i0.ViewChild, args: ['contentWrap', { isSignal: true }] }] } });
154
180
 
155
181
  /*
156
182
  * Public API Surface of ui-kit/ui-card
@@ -1 +1 @@
1
- {"version":3,"file":"4sh-ui-kit-layout-ui-card.mjs","sources":["../../../projects/ui-kit/layout/ui-card/src/lib/ui-card.ts","../../../projects/ui-kit/layout/ui-card/src/lib/ui-card.html","../../../projects/ui-kit/layout/ui-card/src/public-api.ts","../../../projects/ui-kit/layout/ui-card/src/4sh-ui-kit-layout-ui-card.ts"],"sourcesContent":["import {\n afterNextRender,\n booleanAttribute,\n Component,\n computed,\n contentChild,\n Directive,\n ElementRef,\n input,\n signal,\n viewChild,\n} from '@angular/core';\n\nexport type CardVariant = 'outlined' | 'elevated' | 'flat';\n\n/**\n * Slot markers — apply them (attribute or element form) on the content you project\n * into a `<ui-card>` to route it to the matching region. They carry no behaviour;\n * the card queries their presence to render the surrounding structure.\n *\n * <ui-card>\n * <img uiCardMedia … />\n * <span uiCardTitle>Title</span>\n * <span uiCardSubtitle>Subtitle</span>\n * Body content (default slot)\n * <div uiCardFooter><ui-button … /></div>\n * </ui-card>\n */\n/** Full-bleed media region, rendered above the body (image, illustration…). */\n@Directive({ selector: '[uiCardMedia], ui-card-media' })\nexport class UiCardMedia {}\n\n/** Title region (also settable via the `header` string input). */\n@Directive({ selector: '[uiCardTitle], ui-card-title' })\nexport class UiCardTitle {}\n\n/** Subtitle region (also settable via the `subheader` string input). */\n@Directive({ selector: '[uiCardSubtitle], ui-card-subtitle' })\nexport class UiCardSubtitle {}\n\n/** Footer region (actions, tags…), rendered below the body content. */\n@Directive({ selector: '[uiCardFooter], ui-card-footer' })\nexport class UiCardFooter {}\n\n/**\n * ui-card — flexible container that composes optional regions: media, header\n * (title + subtitle), body content and footer.\n *\n * Headless: renders a neutral `surface` box (border + radius, optional elevation) whose\n * regions are driven by content projection. Each region is rendered only when it holds\n * content, so no empty wrapper (and no phantom gap) is emitted. The most common case —\n * dropping content into the card — needs no imports (default `<ng-content>`); title and\n * subtitle also accept the `header`/`subheader` string inputs. Richer slots use the\n * exported marker directives (`UiCardMedia`, `UiCardTitle`, `UiCardSubtitle`, `UiCardFooter`).\n */\n@Component({\n selector: 'ui-card',\n imports: [],\n templateUrl: './ui-card.html',\n styleUrl: './ui-card.scss',\n})\nexport class UiCard {\n /** Title text (convenience shorthand for the `uiCardTitle` slot). */\n header = input<string>();\n /** Subtitle text (convenience shorthand for the `uiCardSubtitle` slot). */\n subheader = input<string>();\n /** Visual treatment of the surface. */\n variant = input<CardVariant>('outlined');\n /**\n * Removes the horizontal gutter of the default content region so it bleeds to\n * the card edges — lets the consumer own the inner layout (e.g. a full-bleed\n * media/color band + a padded paragraph). Re-apply the gutter on inner blocks\n * with `padding-inline: var(--ui-card-gutter)`.\n */\n contentFlush = input(false, { transform: booleanAttribute });\n /** Accessible name for the card region (use when the card conveys a landmark). */\n ariaLabel = input<string>();\n /** Id of the element labelling the card region. */\n ariaLabelledBy = input<string>();\n\n /** @ignore */\n protected readonly titleSlot = contentChild(UiCardTitle);\n /** @ignore */\n protected readonly subtitleSlot = contentChild(UiCardSubtitle);\n /** @ignore */\n protected readonly mediaSlot = contentChild(UiCardMedia);\n /** @ignore */\n protected readonly footerSlot = contentChild(UiCardFooter);\n\n /** @ignore */\n private readonly contentWrap = viewChild<ElementRef<HTMLElement>>('contentWrap');\n /** @ignore Default content actually projected (detected after rendering). */\n private readonly hasProjectedContent = signal(false);\n\n constructor() {\n // Detect projected default content (<ng-content>) — SSR-safe (browser only).\n afterNextRender(() => {\n const el = this.contentWrap()?.nativeElement;\n const has =\n !!el &&\n Array.from(el.childNodes).some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()),\n );\n this.hasProjectedContent.set(has);\n });\n }\n\n /** @ignore A title is provided (string input or projected slot). */\n protected readonly hasTitle = computed(() => !!this.header() || !!this.titleSlot());\n /** @ignore A subtitle is provided (string input or projected slot). */\n protected readonly hasSubtitle = computed(() => !!this.subheader() || !!this.subtitleSlot());\n /** @ignore The header region (title and/or subtitle) has content. */\n protected readonly hasHeader = computed(() => this.hasTitle() || this.hasSubtitle());\n /** @ignore A media slot is provided. */\n protected readonly hasMedia = computed(() => !!this.mediaSlot());\n /** @ignore A footer slot is provided. */\n protected readonly hasFooter = computed(() => !!this.footerSlot());\n /** @ignore The body has default content. */\n protected readonly hasContent = computed(() => this.hasProjectedContent());\n\n /** @ignore Render the string title only when no title slot overrides it. */\n protected readonly showHeaderString = computed(() => !!this.header() && !this.titleSlot());\n /** @ignore Render the string subtitle only when no subtitle slot overrides it. */\n protected readonly showSubheaderString = computed(\n () => !!this.subheader() && !this.subtitleSlot(),\n );\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-card', `_${this.variant()}`];\n if (this.hasMedia()) c.push('_has-media');\n return c.join(' ');\n });\n}\n","<div\n [class]=\"classes()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.role]=\"ariaLabel() || ariaLabelledBy() ? 'region' : null\"\n>\n @if (hasMedia()) {\n <div class=\"ui-card-media\">\n <ng-content select=\"[uiCardMedia], ui-card-media\" />\n </div>\n }\n\n <div class=\"ui-card-body\">\n @if (hasHeader()) {\n <div class=\"ui-card-header\">\n @if (hasTitle()) {\n <div class=\"ui-card-title\">\n @if (showHeaderString()) {\n {{ header() }}\n }\n <ng-content select=\"[uiCardTitle], ui-card-title\" />\n </div>\n }\n @if (hasSubtitle()) {\n <div class=\"ui-card-subtitle\">\n @if (showSubheaderString()) {\n {{ subheader() }}\n }\n <ng-content select=\"[uiCardSubtitle], ui-card-subtitle\" />\n </div>\n }\n </div>\n }\n\n <div\n class=\"ui-card-content\"\n #contentWrap\n [class._empty]=\"!hasContent()\"\n [class._flush]=\"contentFlush()\"\n >\n <ng-content />\n </div>\n\n @if (hasFooter()) {\n <div class=\"ui-card-footer\">\n <ng-content select=\"[uiCardFooter], ui-card-footer\" />\n </div>\n }\n </div>\n</div>\n","/*\n * Public API Surface of ui-kit/ui-card\n */\n\nexport * from './lib/ui-card';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAeA;;;;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AA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAEV,YAAY,sEAGS,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE1FjF;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"4sh-ui-kit-layout-ui-card.mjs","sources":["../../../projects/ui-kit/layout/ui-card/src/lib/ui-card.ts","../../../projects/ui-kit/layout/ui-card/src/lib/ui-card.html","../../../projects/ui-kit/layout/ui-card/src/public-api.ts","../../../projects/ui-kit/layout/ui-card/src/4sh-ui-kit-layout-ui-card.ts"],"sourcesContent":["import {\n afterNextRender,\n booleanAttribute,\n Component,\n computed,\n contentChild,\n Directive,\n ElementRef,\n input,\n signal,\n viewChild,\n} from '@angular/core';\n\nexport type CardVariant = 'outlined' | 'elevated' | 'flat';\n\n/**\n * Slot markers — apply them (attribute or element form) on the content you project\n * into a `<ui-card>` to route it to the matching region. They carry no behaviour;\n * the card queries their presence to render the surrounding structure.\n *\n * <ui-card>\n * <img uiCardMedia … />\n * <span uiCardTitle>Title</span>\n * <span uiCardSubtitle>Subtitle</span>\n * Body content (default slot)\n * <div uiCardFooter><ui-button … /></div>\n * </ui-card>\n */\n/** Full-bleed media region, rendered above the body (image, illustration…). */\n@Directive({ selector: '[uiCardMedia], ui-card-media' })\nexport class UiCardMedia {}\n\n/** Title region (also settable via the `header` string input). */\n@Directive({ selector: '[uiCardTitle], ui-card-title' })\nexport class UiCardTitle {}\n\n/** Subtitle region (also settable via the `subheader` string input). */\n@Directive({ selector: '[uiCardSubtitle], ui-card-subtitle' })\nexport class UiCardSubtitle {}\n\n/** Footer region (actions, tags…), rendered below the body content. */\n@Directive({ selector: '[uiCardFooter], ui-card-footer' })\nexport class UiCardFooter {}\n\n/**\n * ui-card — flexible container that composes optional regions: media, header\n * (title + subtitle), body content and footer.\n *\n * Headless: renders a neutral `surface` box (border + radius, optional elevation) whose\n * regions are driven by content projection. Each region is rendered only when it holds\n * content, so no empty wrapper (and no phantom gap) is emitted. The most common case —\n * dropping content into the card — needs no imports (default `<ng-content>`); title and\n * subtitle also accept the `header`/`subheader` string inputs. Richer slots use the\n * exported marker directives (`UiCardMedia`, `UiCardTitle`, `UiCardSubtitle`, `UiCardFooter`).\n *\n * Sizing: no intrinsic width (a block parent gives 100%, `fluid` fills a flex/grid one) and\n * the visible box fills the host's height, so a row of cards lines up on its own.\n */\n@Component({\n selector: 'ui-card',\n imports: [],\n templateUrl: './ui-card.html',\n styleUrl: './ui-card.scss',\n host: {\n '[class._fluid]': 'fluid()',\n },\n})\nexport class UiCard {\n /** Title text (convenience shorthand for the `uiCardTitle` slot). */\n header = input<string>();\n /** Subtitle text (convenience shorthand for the `uiCardSubtitle` slot). */\n subheader = input<string>();\n /** Visual treatment of the surface. */\n variant = input<CardVariant>('outlined');\n /** Span the full width of the parent (a flex/grid parent otherwise sizes the card to its content). */\n fluid = input(false, { transform: booleanAttribute });\n /**\n * Removes the horizontal gutter of the default content region so it bleeds to\n * the card edges — lets the consumer own the inner layout (e.g. a full-bleed\n * media/color band + a padded paragraph). Re-apply the gutter on inner blocks\n * with `padding-inline: var(--ui-card-gutter)`.\n */\n contentFlush = input(false, { transform: booleanAttribute });\n /**\n * Classes applied to the default content region, gutter kept: lets the consumer lay\n * the content out (Gridaflex, utilities) without an intermediate wrapper.\n */\n contentClass = input<string>('');\n /** Accessible name for the card region (use when the card conveys a landmark). */\n ariaLabel = input<string>();\n /** Id of the element labelling the card region. */\n ariaLabelledBy = input<string>();\n\n /** @ignore */\n protected readonly titleSlot = contentChild(UiCardTitle);\n /** @ignore */\n protected readonly subtitleSlot = contentChild(UiCardSubtitle);\n /** @ignore */\n protected readonly mediaSlot = contentChild(UiCardMedia);\n /** @ignore */\n protected readonly footerSlot = contentChild(UiCardFooter);\n\n /** @ignore */\n private readonly contentWrap = viewChild<ElementRef<HTMLElement>>('contentWrap');\n /** @ignore Default content actually projected (detected after rendering). */\n private readonly hasProjectedContent = signal(false);\n\n constructor() {\n // Detect projected default content (<ng-content>) — SSR-safe (browser only).\n afterNextRender(() => {\n const el = this.contentWrap()?.nativeElement;\n const has =\n !!el &&\n Array.from(el.childNodes).some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()),\n );\n this.hasProjectedContent.set(has);\n });\n }\n\n /** @ignore A title is provided (string input or projected slot). */\n protected readonly hasTitle = computed(() => !!this.header() || !!this.titleSlot());\n /** @ignore A subtitle is provided (string input or projected slot). */\n protected readonly hasSubtitle = computed(() => !!this.subheader() || !!this.subtitleSlot());\n /** @ignore The header region (title and/or subtitle) has content. */\n protected readonly hasHeader = computed(() => this.hasTitle() || this.hasSubtitle());\n /** @ignore A media slot is provided. */\n protected readonly hasMedia = computed(() => !!this.mediaSlot());\n /** @ignore A footer slot is provided. */\n protected readonly hasFooter = computed(() => !!this.footerSlot());\n /** @ignore The body has default content. */\n protected readonly hasContent = computed(() => this.hasProjectedContent());\n\n /** @ignore Render the string title only when no title slot overrides it. */\n protected readonly showHeaderString = computed(() => !!this.header() && !this.titleSlot());\n /** @ignore Render the string subtitle only when no subtitle slot overrides it. */\n protected readonly showSubheaderString = computed(\n () => !!this.subheader() && !this.subtitleSlot(),\n );\n\n /** @ignore */\n protected readonly contentClasses = computed(() => {\n const c = ['ui-card-content'];\n if (!this.hasContent()) c.push('_empty');\n if (this.contentFlush()) c.push('_flush');\n const extra = this.contentClass().trim();\n if (extra) c.push(extra);\n return c.join(' ');\n });\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-card', `_${this.variant()}`];\n if (this.hasMedia()) c.push('_has-media');\n return c.join(' ');\n });\n}\n","<div\n [class]=\"classes()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.role]=\"ariaLabel() || ariaLabelledBy() ? 'region' : null\"\n>\n @if (hasMedia()) {\n <div class=\"ui-card-media\">\n <ng-content select=\"[uiCardMedia], ui-card-media\" />\n </div>\n }\n\n <div class=\"ui-card-body\">\n @if (hasHeader()) {\n <div class=\"ui-card-header\">\n @if (hasTitle()) {\n <div class=\"ui-card-title\">\n @if (showHeaderString()) {\n {{ header() }}\n }\n <ng-content select=\"[uiCardTitle], ui-card-title\" />\n </div>\n }\n @if (hasSubtitle()) {\n <div class=\"ui-card-subtitle\">\n @if (showSubheaderString()) {\n {{ subheader() }}\n }\n <ng-content select=\"[uiCardSubtitle], ui-card-subtitle\" />\n </div>\n }\n </div>\n }\n\n <div #contentWrap [class]=\"contentClasses()\">\n <ng-content />\n </div>\n\n @if (hasFooter()) {\n <div class=\"ui-card-footer\">\n <ng-content select=\"[uiCardFooter], ui-card-footer\" />\n </div>\n }\n </div>\n</div>\n","/*\n * Public API Surface of ui-kit/ui-card\n */\n\nexport * from './lib/ui-card';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAeA;;;;;;;;;;;;AAYG;AACH;MAEa,WAAW,CAAA;8GAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBADvB,SAAS;mBAAC,EAAE,QAAQ,EAAE,8BAA8B,EAAE;;AAGvD;MAEa,WAAW,CAAA;8GAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAA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- "text": "header text Titre (raccourci du slot `uiCardTitle`). string undefined subheader text Sous-titre (raccourci du slot `uiCardSubtitle`). string undefined variant inline-radio outlined elevated flat Traitement de la surface : bordure, ombre, ou aucun. CardVariant \"outlined\" contentFlush boolean Retire la gouttière horizontale du contenu (pleine largeur) : le consommateur gère la mise en page interne. Regouttiérer avec `padding-inline: var(--ui-card-gutter)`. boolean false ariaLabel text Nom accessible (transforme la carte en région `role=\"region\"`). string undefined ariaLabelledBy text Id de l’élément qui nomme la carte (région). string undefined",
5152
+ "text": "header text Titre (raccourci du slot `uiCardTitle`). string undefined subheader text Sous-titre (raccourci du slot `uiCardSubtitle`). string undefined variant inline-radio outlined elevated flat Traitement de la surface : bordure, ombre, ou aucun. CardVariant \"outlined\" fluid boolean Occupe toute la largeur du parent. Sans lui, un parent flex ou grid dimensionne la carte sur son contenu. boolean false contentFlush boolean Retire la gouttière horizontale du contenu (pleine largeur) : le consommateur gère la mise en page interne. Regouttiérer avec `padding-inline: var(--ui-card-gutter)`. boolean false contentClass text Classes posées sur le conteneur du contenu, gouttière conservée : met en page le contenu (grille Gridaflex, utilitaires) sans wrapper intermédiaire. string \"\" ariaLabel text Nom accessible (transforme la carte en région `role=\"region\"`). string undefined ariaLabelledBy text Id de l’élément qui nomme la carte (région). string undefined",
5153
5153
  "source": "projects/ui-kit/layout/ui-card/ui-card.mdx"
5154
5154
  },
5155
5155
  {
@@ -5162,6 +5162,26 @@
5162
5162
  "text": "Le cas courant ne demande aucun import : le contenu par défaut passe par <ng-content> , et le titre / sous-titre acceptent les inputs header / subheader . Les slots riches utilisent des directives marqueurs (attribut ou élément) à importer dans le composant hôte. <ui-card header=\"Titre\" subheader=\"Sous-titre\"> Contenu de la carte (slot par défaut) </ui-card> <ui-card> <img uiCardMedia src=\"…\" alt=\"…\" /> <span uiCardTitle>Titre <ui-tag label=\"New\" /></span> <span uiCardSubtitle>Sous-titre</span> Contenu riche… <div uiCardFooter> <ui-button label=\"Annuler\" level=\"low\" /> <ui-button label=\"Valider\" /> </div> </ui-card> Slot Marqueur Raccourci Rôle Média [uiCardMedia] · ui-card-media — Visuel pleine largeur en tête (clippé aux coins arrondis). Titre [uiCardTitle] · ui-card-title header Titre (typo title ). Sous-titre [uiCardSubtitle] · ui-card-subtitle subheader Sous-titre atténué ( --global-text-muted ). Contenu slot par défaut ( <ng-content> ) — Corps de la carte. Pied [uiCardFooter] · ui-card-footer — Footer de la card",
5163
5163
  "source": "projects/ui-kit/layout/ui-card/ui-card.mdx"
5164
5164
  },
5165
+ {
5166
+ "id": "components-ui-layout-ui-card--docs#dimensions-et-conteneur",
5167
+ "docId": "components-ui-layout-ui-card--docs",
5168
+ "anchor": "dimensions-et-conteneur",
5169
+ "title": "Components/ui/layout/ui-card",
5170
+ "name": "ui-card",
5171
+ "section": "Dimensions et conteneur",
5172
+ "text": "La carte n'a aucune dimension intrinsèque : c'est son conteneur qui la dimensionne, et les dimensions se posent sur l'élément <ui-card> lui-même, jamais sur un élément interne. Parent Largeur par défaut Avec fluid Bloc ( div , colonne de grille…) 100 % du parent Identique display: flex Largeur du contenu Toute la largeur disponible display: grid Largeur de la piste Identique En hauteur , la boîte visible (fond, bordure, ombre) remplit toujours son hôte : une rangée de cartes de contenus inégaux s'aligne sans CSS supplémentaire, et height posé sur <ui-card> s'applique bien à la boîte.",
5173
+ "source": "projects/ui-kit/layout/ui-card/ui-card.mdx"
5174
+ },
5175
+ {
5176
+ "id": "components-ui-layout-ui-card--docs#mise-en-page-du-contenu-contentclass",
5177
+ "docId": "components-ui-layout-ui-card--docs",
5178
+ "anchor": "mise-en-page-du-contenu-contentclass",
5179
+ "title": "Components/ui/layout/ui-card",
5180
+ "name": "ui-card",
5181
+ "section": "Mise en page du contenu (contentClass)",
5182
+ "text": "Plutôt que d'envelopper votre contenu dans des balises supplémentaires pour gérer sa mise en page, contentClass vous donne accès au conteneur structurel existant. En y passant vos classes utilitaires (grille, flex, alignements), vous organisez directement l'intérieur de la carte sans alourdir le DOM. <ui-card header=\"Trafic\" contentClass=\"flex-x flex-gap-x align-justify\"> <div>1 284</div> <div>99,8 %</div> </ui-card>",
5183
+ "source": "projects/ui-kit/layout/ui-card/ui-card.mdx"
5184
+ },
5165
5185
  {
5166
5186
  "id": "components-ui-layout-ui-card--docs#contenu-full-bleed-contentflush",
5167
5187
  "docId": "components-ui-layout-ui-card--docs",
@@ -5172,6 +5192,16 @@
5172
5192
  "text": "Par défaut le contenu porte la gouttière de la carte. contentFlush la retire pour laisser le consommateur maîtriser sa mise en page : bande média / couleur edge-to-edge, tableau pleine largeur… La gouttière reste disponible via la variable CSS --ui-card-gutter (à ré-appliquer sur les blocs qui doivent rester en retrait). <ui-card header=\"Titre\" [contentFlush]=\"true\"> <div class=\"flex-y\" style=\"--flex-gap-y: var(--units-md)\"> <div class=\"banniere\"></div> <!-- pleine largeur --> <p style=\"padding-inline: var(--ui-card-gutter)\">Paragraphe regouttiéré…</p> </div> </ui-card>",
5173
5193
  "source": "projects/ui-kit/layout/ui-card/ui-card.mdx"
5174
5194
  },
5195
+ {
5196
+ "id": "components-ui-layout-ui-card--docs#quel-levier-choisir",
5197
+ "docId": "components-ui-layout-ui-card--docs",
5198
+ "anchor": "quel-levier-choisir",
5199
+ "title": "Components/ui/layout/ui-card",
5200
+ "name": "ui-card",
5201
+ "section": "Quel levier choisir",
5202
+ "text": "Besoin Levier Gouttière Disposer le contenu (ligne, colonne, grille) contentClass Conservée Contenu edge-to-edge (bande média, tableau pleine largeur) contentFlush Retirée, à ré-appliquer via --ui-card-gutter Les deux : mise en page et edge-to-edge contentClass + contentFlush Retirée",
5203
+ "source": "projects/ui-kit/layout/ui-card/ui-card.mdx"
5204
+ },
5175
5205
  {
5176
5206
  "id": "components-ui-layout-ui-card--docs#footer",
5177
5207
  "docId": "components-ui-layout-ui-card--docs",
package/mcp/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@4sh/ui-kit-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.6.0",
4
4
  "description": "MCP server exposing the @4sh/ui-kit design system (components, props, tokens, doc) to AI coding agents. Not published on its own: bundled at build time into @4sh/ui-kit (library mode) and @4sh/ui-kit-schematics (starter mode) — see scripts/mcp-bundle.build.mjs.",
5
- "private": true,
6
5
  "type": "module",
7
6
  "engines": {
8
7
  "node": ">=18"
@@ -11,9 +10,9 @@
11
10
  "test": "vitest run"
12
11
  },
13
12
  "dependencies": {
14
- "@modelcontextprotocol/sdk": "^1.30.0",
15
- "minisearch": "^7.2.0",
16
- "zod": "^4.0.0"
13
+ "@modelcontextprotocol/sdk": "1.30.0",
14
+ "minisearch": "7.2.0",
15
+ "zod": "4.4.3"
17
16
  },
18
17
  "sideEffects": false
19
18
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@4sh/ui-kit",
3
- "version": "0.5.0",
4
- "description": "Headless Angular components from the 4SH Design System: signals + Angular CDK, styled exclusively through design tokens.",
3
+ "version": "0.6.0",
4
+ "description": "Headless Angular components from the 4SH Design System: signals + Angular CDK, styled exclusively through design tokens. Ships a companion MCP server exposing the kit catalog and doc to AI coding agents.",
5
5
  "homepage": "https://4sh.github.io/starter-angular/?path=/docs/introduction--docs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,13 +21,19 @@
21
21
  "design-tokens",
22
22
  "ui-kit",
23
23
  "accessibility",
24
- "a11y"
24
+ "a11y",
25
+ "mcp",
26
+ "mcp-server",
27
+ "ai-agent"
25
28
  ],
26
29
  "publishConfig": {
27
30
  "access": "public",
28
31
  "registry": "https://registry.npmjs.org/"
29
32
  },
30
33
  "schematics": "./collection.json",
34
+ "bin": {
35
+ "ui-kit-mcp": "./mcp/index.js"
36
+ },
31
37
  "peerDependencies": {
32
38
  "@angular/cdk": "^22.0.0",
33
39
  "@angular/common": "^22.0.0",
@@ -38,7 +44,7 @@
38
44
  "rxjs": "^7.8.0"
39
45
  },
40
46
  "dependencies": {
41
- "tslib": "^2.3.0"
47
+ "tslib": "2.8.1"
42
48
  },
43
49
  "sideEffects": false,
44
50
  "module": "fesm2022/4sh-ui-kit.mjs",
@@ -44,6 +44,9 @@ declare class UiCardFooter {
44
44
  * dropping content into the card — needs no imports (default `<ng-content>`); title and
45
45
  * subtitle also accept the `header`/`subheader` string inputs. Richer slots use the
46
46
  * exported marker directives (`UiCardMedia`, `UiCardTitle`, `UiCardSubtitle`, `UiCardFooter`).
47
+ *
48
+ * Sizing: no intrinsic width (a block parent gives 100%, `fluid` fills a flex/grid one) and
49
+ * the visible box fills the host's height, so a row of cards lines up on its own.
47
50
  */
48
51
  declare class UiCard {
49
52
  /** Title text (convenience shorthand for the `uiCardTitle` slot). */
@@ -52,6 +55,8 @@ declare class UiCard {
52
55
  subheader: _angular_core.InputSignal<string | undefined>;
53
56
  /** Visual treatment of the surface. */
54
57
  variant: _angular_core.InputSignal<CardVariant>;
58
+ /** Span the full width of the parent (a flex/grid parent otherwise sizes the card to its content). */
59
+ fluid: _angular_core.InputSignalWithTransform<boolean, unknown>;
55
60
  /**
56
61
  * Removes the horizontal gutter of the default content region so it bleeds to
57
62
  * the card edges — lets the consumer own the inner layout (e.g. a full-bleed
@@ -59,6 +64,11 @@ declare class UiCard {
59
64
  * with `padding-inline: var(--ui-card-gutter)`.
60
65
  */
61
66
  contentFlush: _angular_core.InputSignalWithTransform<boolean, unknown>;
67
+ /**
68
+ * Classes applied to the default content region, gutter kept: lets the consumer lay
69
+ * the content out (Gridaflex, utilities) without an intermediate wrapper.
70
+ */
71
+ contentClass: _angular_core.InputSignal<string>;
62
72
  /** Accessible name for the card region (use when the card conveys a landmark). */
63
73
  ariaLabel: _angular_core.InputSignal<string | undefined>;
64
74
  /** Id of the element labelling the card region. */
@@ -93,9 +103,11 @@ declare class UiCard {
93
103
  /** @ignore Render the string subtitle only when no subtitle slot overrides it. */
94
104
  protected readonly showSubheaderString: _angular_core.Signal<boolean>;
95
105
  /** @ignore */
106
+ protected readonly contentClasses: _angular_core.Signal<string>;
107
+ /** @ignore */
96
108
  protected readonly classes: _angular_core.Signal<string>;
97
109
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiCard, never>;
98
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiCard, "ui-card", never, { "header": { "alias": "header"; "required": false; "isSignal": true; }; "subheader": { "alias": "subheader"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "contentFlush": { "alias": "contentFlush"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; }, {}, ["titleSlot", "subtitleSlot", "mediaSlot", "footerSlot"], ["[uiCardMedia], ui-card-media", "[uiCardTitle], ui-card-title", "[uiCardSubtitle], ui-card-subtitle", "*", "[uiCardFooter], ui-card-footer"], true, never>;
110
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiCard, "ui-card", never, { "header": { "alias": "header"; "required": false; "isSignal": true; }; "subheader": { "alias": "subheader"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; "contentFlush": { "alias": "contentFlush"; "required": false; "isSignal": true; }; "contentClass": { "alias": "contentClass"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; }, {}, ["titleSlot", "subtitleSlot", "mediaSlot", "footerSlot"], ["[uiCardMedia], ui-card-media", "[uiCardTitle], ui-card-title", "[uiCardSubtitle], ui-card-subtitle", "*", "[uiCardFooter], ui-card-footer"], true, never>;
99
111
  }
100
112
 
101
113
  export { UiCard, UiCardFooter, UiCardMedia, UiCardSubtitle, UiCardTitle };