@4sh/ui-kit 0.5.0 → 0.6.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.
- package/README.fr.md +9 -2
- package/README.md +9 -2
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +29 -3
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
- package/mcp/data/text-search-docs.json +89 -19
- package/mcp/package.json +4 -5
- package/package.json +10 -4
- package/types/4sh-ui-kit-layout-ui-card.d.ts +13 -1
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": "
|
|
91
|
-
"args": ["
|
|
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": "
|
|
90
|
-
"args": ["
|
|
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
|
|
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: [],
|
|
153
|
-
|
|
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;;;;;;;;;;;;AAYG;AACH;MAEa,WAAW,CAAA;8GAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAX,WAA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A,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,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBADvB,SAAS;mBAAC,EAAE,QAAQ,EAAE,8BAA8B,EAAE;;AAGvD;MAEa,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EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,WAAW,8FAER,cAAc,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAEjB,WAAW,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,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;;AEvGjF;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"title": "Spécifications/Responsive Design",
|
|
600
600
|
"name": "Responsive Design",
|
|
601
601
|
"section": null,
|
|
602
|
-
"text": "Responsive Design
|
|
602
|
+
"text": "Responsive Design Gridaflex (v1.0.0) est le système de mise en page responsive proposé en option par ce starter, celui autour duquel le kit est pensé. Il n'est pas imposé : ng add @4sh/ui-kit-schematics demande si le projet le veut ( --gridaflex / --no-gridaflex répond à votre place). Sans la grille, aucune des classes de cette page n'existe dans le projet, et les stories qui s'appuient dessus ( ui-card , ui-read-only ) s'affichent à plat. Techniquement, c'est un système flexbox à axes X / Y sur un moteur gap moderne , reprenant l'API XY de Foundation, modernisée. Préfixe des classes : flex- : ce n'est pas CSS Grid.",
|
|
603
603
|
"source": "storybook/docs/specifications/responsive.mdx"
|
|
604
604
|
},
|
|
605
605
|
{
|
|
@@ -619,7 +619,7 @@
|
|
|
619
619
|
"title": "Spécifications/Responsive Design",
|
|
620
620
|
"name": "Responsive Design",
|
|
621
621
|
"section": "2. Modèle mental Gridaflex",
|
|
622
|
-
"text": "Un conteneur optionnel .flex-container centre et limite la largeur. Un groupe définit l'axe : .flex-x (horizontal) ou .flex-y (vertical). Les cellules .cell se placent dans le groupe et reçoivent une taille responsive [breakpoint]-[n] (n de 1 à 24 dans ce projet, cf. $flex-columns: 24 ). Les gouttières sont posées sur le groupe : .flex-gap-x (horizontal), .flex-gap-y (vertical), .flex-gap-xy (les deux). Règle d'or : la taille ( desktop-8 ) va sur la cellule ; la gouttière ( flex-gap-x ) va sur le groupe . Ne pas inverser.",
|
|
622
|
+
"text": "Un conteneur optionnel .flex-container centre et limite la largeur. Un groupe définit l'axe : .flex-x (horizontal) ou .flex-y (vertical). Les cellules .cell se placent dans le groupe et reçoivent une taille responsive [breakpoint]-[n] (n de 1 à 24 dans ce projet, cf. $flex-columns: 24 ). Les gouttières sont posées sur le groupe : .flex-gap-x (horizontal), .flex-gap-y (vertical), .flex-gap-xy (les deux). La contiguïté fait partie du contrat : les .cell sont les enfants directs du groupe. Aucun élément intermédiaire, et surtout aucun composant Angular (voir la section 3). Règle d'or : la taille ( desktop-8 ) va sur la cellule ; la gouttière ( flex-gap-x ) va sur le groupe . Ne pas inverser.",
|
|
623
623
|
"source": "storybook/docs/specifications/responsive.mdx"
|
|
624
624
|
},
|
|
625
625
|
{
|
|
@@ -633,12 +633,52 @@
|
|
|
633
633
|
"source": "storybook/docs/specifications/responsive.mdx"
|
|
634
634
|
},
|
|
635
635
|
{
|
|
636
|
-
"id": "spécifications-responsive-design--docs#3-
|
|
636
|
+
"id": "spécifications-responsive-design--docs#3-grille-et-composants-angular-le-nœud-hôte",
|
|
637
637
|
"docId": "spécifications-responsive-design--docs",
|
|
638
|
-
"anchor": "3-
|
|
638
|
+
"anchor": "3-grille-et-composants-angular-le-nœud-hôte",
|
|
639
639
|
"title": "Spécifications/Responsive Design",
|
|
640
640
|
"name": "Responsive Design",
|
|
641
|
-
"section": "3.
|
|
641
|
+
"section": "3. Grille et composants Angular : le nœud hôte",
|
|
642
|
+
"text": "Piège numéro un dans un template Angular : un composant ne peut pas s'intercaler entre le groupe ( flex-x / flex-y ) et ses cellules ( .cell ) . Angular rend l'élément hôte du composant ( <ui-step-panel> , <sp-mon-bloc> ) comme un vrai nœud du DOM. C'est lui qui devient l'enfant direct du groupe, les .cell ne sont plus que des petits-enfants, et la grille ne s'applique plus.",
|
|
643
|
+
"source": "storybook/docs/specifications/responsive.mdx"
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"id": "spécifications-responsive-design--docs#ce-qui-casse-un-composant-entre-le-groupe-et-les-cellules",
|
|
647
|
+
"docId": "spécifications-responsive-design--docs",
|
|
648
|
+
"anchor": "ce-qui-casse-un-composant-entre-le-groupe-et-les-cellules",
|
|
649
|
+
"title": "Spécifications/Responsive Design",
|
|
650
|
+
"name": "Responsive Design",
|
|
651
|
+
"section": "❌ Ce qui casse : un composant entre le groupe et les cellules",
|
|
652
|
+
"text": "<div class=\"flex-x flex-gap-x\"> <ui-step-panel [value]=\"1\"> <div class=\"cell phone-24 desktop-12\">A</div> <div class=\"cell phone-24 desktop-12\">B</div> </ui-step-panel> </div> Ce que le navigateur voit réellement : <div class=\"flex-x flex-gap-x\"> <!-- display: flex --> <ui-step-panel> <!-- nœud hôte Angular : le seul item flex --> <div class=\"ui-step-panel-...\"> <!-- et son template ajoute encore des niveaux --> <div class=\"cell desktop-12\"> <!-- plus un item flex, plus une cellule de grille --> <div class=\"cell desktop-12\"> </div> </ui-step-panel> </div> Trois choses lâchent en même temps : display: flex ne transforme que les enfants directs en items flex. L'unique item est l'hôte ; les cellules redeviennent des blocs et s'empilent verticalement. Les règles Gridaflex écrites en enfant direct ne matchent plus, car un sélecteur > suit l'arbre DOM : flex-padding-x/y/xy , le block grid [bp]-up-[n] , [bp]-padding-collapse et les tailles verticales ( .flex-y > .[bp]-[n] ) ciblent tous > .cell . Les classes de largeur ( desktop-12 ) s'appliquent encore, mais leur pourcentage se résout sur la boîte de l'hôte et non sur celle du groupe : la largeur obtenue n'est plus celle de la grille, gouttière comprise. display: contents sur l'hôte n'est pas le correctif : il rend les cellules items flex mais ne répare pas les sélecteurs > .cell (un sélecteur matche l'arbre DOM, pas l'arbre de boîtes), et il supprime la boîte de l'hôte donc tout style porté par le composant.",
|
|
653
|
+
"source": "storybook/docs/specifications/responsive.mdx"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"id": "spécifications-responsive-design--docs#ce-qui-fonctionne-groupe-et-cellules-dans-le-même-template",
|
|
657
|
+
"docId": "spécifications-responsive-design--docs",
|
|
658
|
+
"anchor": "ce-qui-fonctionne-groupe-et-cellules-dans-le-même-template",
|
|
659
|
+
"title": "Spécifications/Responsive Design",
|
|
660
|
+
"name": "Responsive Design",
|
|
661
|
+
"section": "✅ Ce qui fonctionne : groupe et cellules dans le même template",
|
|
662
|
+
"text": "Le groupe et ses cellules sont des éléments natifs voisins, sans composant entre les deux : <ui-step-panel [value]=\"1\"> <div class=\"flex-x flex-gap-x\"> <div class=\"cell phone-24 desktop-12\">A</div> <div class=\"cell phone-24 desktop-12\">B</div> </div> </ui-step-panel> Pour disposer des composants dans la grille, chaque composant va dans une cellule, jamais à la place d'une cellule : <div class=\"flex-x flex-gap-x\"> <div class=\"cell phone-24 desktop-12\"><ui-card header=\"A\" /></div> <div class=\"cell phone-24 desktop-12\"><ui-card header=\"B\" /></div> </div>",
|
|
663
|
+
"source": "storybook/docs/specifications/responsive.mdx"
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
"id": "spécifications-responsive-design--docs#quand-la-grille-doit-vivre-dans-un-composant",
|
|
667
|
+
"docId": "spécifications-responsive-design--docs",
|
|
668
|
+
"anchor": "quand-la-grille-doit-vivre-dans-un-composant",
|
|
669
|
+
"title": "Spécifications/Responsive Design",
|
|
670
|
+
"name": "Responsive Design",
|
|
671
|
+
"section": "Quand la grille doit vivre dans un composant",
|
|
672
|
+
"text": "Deux voies, selon que vous consommez le composant ou que vous l'écrivez. Vous consommez un composant du kit : passez les classes par les entrées prévues pour ça. Elles atterrissent sur les éléments du template du composant, donc groupe et cellules redeviennent voisins. ui-card expose contentClass , ui-read-only expose rowClass / labelClass / valueClass : <ui-card header=\"Coordonnées\" contentClass=\"flex-x flex-gap-x\"> <div class=\"cell phone-24 desktop-12\">A</div> <div class=\"cell phone-24 desktop-12\">B</div> </ui-card> <ui-read-only layout=\"grid\" rowClass=\"flex-x flex-gap-x\" labelClass=\"cell phone-24 desktop-6\" valueClass=\"cell phone-24 desktop-18\" label=\"Client\" value=\"Société Générale\" /> Vous écrivez le composant : posez le groupe sur l'élément qui contient directement le <ng-content /> . Les nœuds projetés deviennent ses enfants directs dans le DOM, la grille matche. <!-- template du composant --> <div class=\"flex-x flex-gap-x\"> <ng-content /> </div> Vérification en deux secondes : dans l'inspecteur, le .cell doit être l'enfant immédiat du flex-x . S'il y a un tag <ui-…> ou <sp-…> entre les deux, la grille est déjà cassée.",
|
|
673
|
+
"source": "storybook/docs/specifications/responsive.mdx"
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
"id": "spécifications-responsive-design--docs#4-utilisation-dans-sassscss",
|
|
677
|
+
"docId": "spécifications-responsive-design--docs",
|
|
678
|
+
"anchor": "4-utilisation-dans-sassscss",
|
|
679
|
+
"title": "Spécifications/Responsive Design",
|
|
680
|
+
"name": "Responsive Design",
|
|
681
|
+
"section": "4. Utilisation dans SASS/SCSS",
|
|
642
682
|
"text": "Pour appliquer des styles conditionnels, utilisez le mixin breakpoint() exposé par l'API Sass de Gridaflex.",
|
|
643
683
|
"source": "storybook/docs/specifications/responsive.mdx"
|
|
644
684
|
},
|
|
@@ -673,43 +713,43 @@
|
|
|
673
713
|
"source": "storybook/docs/specifications/responsive.mdx"
|
|
674
714
|
},
|
|
675
715
|
{
|
|
676
|
-
"id": "spécifications-responsive-design--docs#
|
|
716
|
+
"id": "spécifications-responsive-design--docs#5-cheatsheet-des-classes-utilitaires",
|
|
677
717
|
"docId": "spécifications-responsive-design--docs",
|
|
678
|
-
"anchor": "
|
|
718
|
+
"anchor": "5-cheatsheet-des-classes-utilitaires",
|
|
679
719
|
"title": "Spécifications/Responsive Design",
|
|
680
720
|
"name": "Responsive Design",
|
|
681
|
-
"section": "
|
|
721
|
+
"section": "5. Cheatsheet des classes utilitaires",
|
|
682
722
|
"text": "Besoin Classe(s) Posée sur Conteneur centré flex-container (+ .fluid , .full ) wrapper Groupe horizontal / vertical flex-x / flex-y groupe Gouttière (gap) flex-gap-x / flex-gap-y / flex-gap-xy groupe Padding interne flex-padding-x / -y / -xy groupe Cellule cell cellule Taille responsive [bp]-[1..24] (ex. desktop-8 ) cellule Largeur auto / au contenu auto / shrink (ou [bp]-auto / [bp]-shrink ) cellule Décalage [bp]-offset-[n] cellule Block grid (N par ligne) [bp]-up-[n] groupe Supprimer la gouttière [bp]-gap-collapse / [bp]-padding-collapse groupe Réordonner [bp]-order-[n] cellule Alignement parent align-left/right/center/justify/spaced , align-top/middle/bottom/stretch , align-center-middle groupe Alignement cellule align-self-top/middle/bottom/stretch cellule Visibilité responsive show-for-[bp] , hide-for-[bp] , *-only , hide , invisible , visible élément",
|
|
683
723
|
"source": "storybook/docs/specifications/responsive.mdx"
|
|
684
724
|
},
|
|
685
725
|
{
|
|
686
|
-
"id": "spécifications-responsive-design--docs#
|
|
726
|
+
"id": "spécifications-responsive-design--docs#6-surcharge-ponctuelle-via-variables-css",
|
|
687
727
|
"docId": "spécifications-responsive-design--docs",
|
|
688
|
-
"anchor": "
|
|
728
|
+
"anchor": "6-surcharge-ponctuelle-via-variables-css",
|
|
689
729
|
"title": "Spécifications/Responsive Design",
|
|
690
730
|
"name": "Responsive Design",
|
|
691
|
-
"section": "
|
|
731
|
+
"section": "6. Surcharge ponctuelle via variables CSS",
|
|
692
732
|
"text": "Pour ajuster une gouttière sur une seule instance, sans toucher à la config : <div class=\"flex-x flex-gap-x\" style=\"--flex-gap-x: 8px\">…</div> <div class=\"flex-x flex-gap-xy\" style=\"--flex-gap-x: 8px; --flex-gap-y: 16px\">…</div>",
|
|
693
733
|
"source": "storybook/docs/specifications/responsive.mdx"
|
|
694
734
|
},
|
|
695
735
|
{
|
|
696
|
-
"id": "spécifications-responsive-design--docs#
|
|
736
|
+
"id": "spécifications-responsive-design--docs#7-configuration-projet",
|
|
697
737
|
"docId": "spécifications-responsive-design--docs",
|
|
698
|
-
"anchor": "
|
|
738
|
+
"anchor": "7-configuration-projet",
|
|
699
739
|
"title": "Spécifications/Responsive Design",
|
|
700
740
|
"name": "Responsive Design",
|
|
701
|
-
"section": "
|
|
741
|
+
"section": "7. Configuration projet",
|
|
702
742
|
"text": "La configuration Gridaflex est centralisée dans src/styles/src/vendors/gridaflex-settings.scss et alimentée par les design tokens responsive : $flex-columns: 24 : la grille est sur 24 colonnes (et non 12 par défaut). $breakpoints : synchronisés avec les tokens ( phone , tablet-portrait , tablet-landscape , desktop , medium-desktop , big-desktop ). $flex-margin-gutters : gouttières par breakpoint (16px sur phone, 24px à partir de tablet-portrait). $gutters / $padding-gutters : clé default: 16px (utilisée par flex-gap-x/y/xy ). Toute modification de ces réglages doit passer par les design tokens, jamais en dur dans un composant.",
|
|
703
743
|
"source": "storybook/docs/specifications/responsive.mdx"
|
|
704
744
|
},
|
|
705
745
|
{
|
|
706
|
-
"id": "spécifications-responsive-design--docs#
|
|
746
|
+
"id": "spécifications-responsive-design--docs#8-erreurs-à-ne-pas-commettre",
|
|
707
747
|
"docId": "spécifications-responsive-design--docs",
|
|
708
|
-
"anchor": "
|
|
748
|
+
"anchor": "8-erreurs-à-ne-pas-commettre",
|
|
709
749
|
"title": "Spécifications/Responsive Design",
|
|
710
750
|
"name": "Responsive Design",
|
|
711
|
-
"section": "
|
|
712
|
-
"text": "❌ Mettre la taille ( desktop-8 ) sur le groupe, ou la gouttière ( flex-gap-x ) sur la cellule. ❌ Utiliser des marges négatives ou overflow-x: hidden pour « corriger » des débordements : inutile, le moteur gap n'en crée pas. ❌ Confondre avec CSS Grid ( grid-template-* ) : c'est du flexbox . ❌ Inventer un breakpoint ou une taille hors de la config (n va de 1 à 24 dans ce projet). ❌ Utiliser les alias dépréciés grid-* / flex-margin-* / xy-grid-* (compat Foundation) en code neuf : préférer flex-* / flex-gap-* / xy-flex-* . ❌ Placer @use 'gridaflex/src/settings' with (…) après @use 'gridaflex/src/classes' : la config serait ignorée.",
|
|
751
|
+
"section": "8. Erreurs à ne pas commettre",
|
|
752
|
+
"text": "❌ Mettre la taille ( desktop-8 ) sur le groupe, ou la gouttière ( flex-gap-x ) sur la cellule. ❌ Intercaler un composant ( ui-* , sp-* ) entre le groupe flex-x / flex-y et ses .cell : voir la section « Grille et composants Angular ». ❌ Utiliser des marges négatives ou overflow-x: hidden pour « corriger » des débordements : inutile, le moteur gap n'en crée pas. ❌ Confondre avec CSS Grid ( grid-template-* ) : c'est du flexbox . ❌ Inventer un breakpoint ou une taille hors de la config (n va de 1 à 24 dans ce projet). ❌ Utiliser les alias dépréciés grid-* / flex-margin-* / xy-grid-* (compat Foundation) en code neuf : préférer flex-* / flex-gap-* / xy-flex-* . ❌ Placer @use 'gridaflex/src/settings' with (…) après @use 'gridaflex/src/classes' : la config serait ignorée.",
|
|
713
753
|
"source": "storybook/docs/specifications/responsive.mdx"
|
|
714
754
|
},
|
|
715
755
|
{
|
|
@@ -5149,7 +5189,7 @@
|
|
|
5149
5189
|
"title": "Components/ui/layout/ui-card",
|
|
5150
5190
|
"name": "ui-card",
|
|
5151
5191
|
"section": "API",
|
|
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\" 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",
|
|
5192
|
+
"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
5193
|
"source": "projects/ui-kit/layout/ui-card/ui-card.mdx"
|
|
5154
5194
|
},
|
|
5155
5195
|
{
|
|
@@ -5162,6 +5202,26 @@
|
|
|
5162
5202
|
"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
5203
|
"source": "projects/ui-kit/layout/ui-card/ui-card.mdx"
|
|
5164
5204
|
},
|
|
5205
|
+
{
|
|
5206
|
+
"id": "components-ui-layout-ui-card--docs#dimensions-et-conteneur",
|
|
5207
|
+
"docId": "components-ui-layout-ui-card--docs",
|
|
5208
|
+
"anchor": "dimensions-et-conteneur",
|
|
5209
|
+
"title": "Components/ui/layout/ui-card",
|
|
5210
|
+
"name": "ui-card",
|
|
5211
|
+
"section": "Dimensions et conteneur",
|
|
5212
|
+
"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.",
|
|
5213
|
+
"source": "projects/ui-kit/layout/ui-card/ui-card.mdx"
|
|
5214
|
+
},
|
|
5215
|
+
{
|
|
5216
|
+
"id": "components-ui-layout-ui-card--docs#mise-en-page-du-contenu-contentclass",
|
|
5217
|
+
"docId": "components-ui-layout-ui-card--docs",
|
|
5218
|
+
"anchor": "mise-en-page-du-contenu-contentclass",
|
|
5219
|
+
"title": "Components/ui/layout/ui-card",
|
|
5220
|
+
"name": "ui-card",
|
|
5221
|
+
"section": "Mise en page du contenu (contentClass)",
|
|
5222
|
+
"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>",
|
|
5223
|
+
"source": "projects/ui-kit/layout/ui-card/ui-card.mdx"
|
|
5224
|
+
},
|
|
5165
5225
|
{
|
|
5166
5226
|
"id": "components-ui-layout-ui-card--docs#contenu-full-bleed-contentflush",
|
|
5167
5227
|
"docId": "components-ui-layout-ui-card--docs",
|
|
@@ -5172,6 +5232,16 @@
|
|
|
5172
5232
|
"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
5233
|
"source": "projects/ui-kit/layout/ui-card/ui-card.mdx"
|
|
5174
5234
|
},
|
|
5235
|
+
{
|
|
5236
|
+
"id": "components-ui-layout-ui-card--docs#quel-levier-choisir",
|
|
5237
|
+
"docId": "components-ui-layout-ui-card--docs",
|
|
5238
|
+
"anchor": "quel-levier-choisir",
|
|
5239
|
+
"title": "Components/ui/layout/ui-card",
|
|
5240
|
+
"name": "ui-card",
|
|
5241
|
+
"section": "Quel levier choisir",
|
|
5242
|
+
"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",
|
|
5243
|
+
"source": "projects/ui-kit/layout/ui-card/ui-card.mdx"
|
|
5244
|
+
},
|
|
5175
5245
|
{
|
|
5176
5246
|
"id": "components-ui-layout-ui-card--docs#footer",
|
|
5177
5247
|
"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
|
|
3
|
+
"version": "0.6.1",
|
|
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": "
|
|
15
|
-
"minisearch": "
|
|
16
|
-
"zod": "
|
|
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.
|
|
4
|
-
"description": "Headless Angular components from the 4SH Design System: signals + Angular CDK, styled exclusively through design tokens.",
|
|
3
|
+
"version": "0.6.1",
|
|
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": "
|
|
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 };
|