@firestitch/card 0.0.0-stage → 18.0.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/app/components/card/card.component.d.ts +46 -0
- package/app/components/card-bleed/card-bleed.component.d.ts +15 -0
- package/app/components/cards/cards.component.d.ts +13 -0
- package/app/interfaces/card-span.d.ts +6 -0
- package/app/interfaces/index.d.ts +1 -0
- package/esm2022/app/components/card/card.component.mjs +58 -0
- package/esm2022/app/components/card-bleed/card-bleed.component.mjs +21 -0
- package/esm2022/app/components/cards/cards.component.mjs +19 -0
- package/esm2022/app/interfaces/card-span.mjs +2 -0
- package/esm2022/app/interfaces/index.mjs +2 -0
- package/esm2022/firestitch-card.mjs +5 -0
- package/esm2022/public_api.mjs +14 -0
- package/fesm2022/firestitch-card.mjs +111 -0
- package/fesm2022/firestitch-card.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/package.json +38 -3
- package/public_api.d.ts +4 -0
- package/README.md +0 -3
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FsCardSpan } from '../../interfaces';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* One titled panel of a page: an icon on a tile of the accent, its heading,
|
|
5
|
+
* an optional line under it, and its content.
|
|
6
|
+
*
|
|
7
|
+
* - `meta` sits beside the heading in a word or two: the window or source its
|
|
8
|
+
* figures are from ("30 days").
|
|
9
|
+
* - What can be done to the card is an `fs-menu` given as its content; its
|
|
10
|
+
* kebab sits at the right of the heading line. A button that takes the
|
|
11
|
+
* reader elsewhere ("Open preview") is given with an `fsCardActions`
|
|
12
|
+
* attribute and sits before the kebab.
|
|
13
|
+
* - Lines under the heading that one string cannot carry (several, or some
|
|
14
|
+
* shown only at times) are an element given with an `fsCardSubheading`
|
|
15
|
+
* attribute, its lines plain `div`s.
|
|
16
|
+
* - In an `fs-cards` it takes the share of the line its `span` says.
|
|
17
|
+
*
|
|
18
|
+
* The card pads its content evenly on every side; `flushBottom` drops the
|
|
19
|
+
* padding under it, for content that should run to the card's bottom edge.
|
|
20
|
+
* Its look reads the `--fs-card-*` tokens, so an app restyles every card from
|
|
21
|
+
* one place and dark mode follows the style package's surface tokens. Its
|
|
22
|
+
* heading, meta and subheading set their own type rather than borrowing h3 or
|
|
23
|
+
* the subheading classes, so an app's rules for those never spill into a card;
|
|
24
|
+
* the heading takes only the shared heading face, weight and tracking.
|
|
25
|
+
*/
|
|
26
|
+
export declare class FsCardComponent {
|
|
27
|
+
heading: import("@angular/core").InputSignal<string>;
|
|
28
|
+
/** A Material icon name; with none the heading starts the line */
|
|
29
|
+
icon: import("@angular/core").InputSignal<string>;
|
|
30
|
+
/** A short line under the heading: what the card counts, or how to read it */
|
|
31
|
+
subheading: import("@angular/core").InputSignal<string>;
|
|
32
|
+
/** A word or two on the heading's line, in subheading type */
|
|
33
|
+
meta: import("@angular/core").InputSignal<string>;
|
|
34
|
+
span: import("@angular/core").InputSignal<FsCardSpan>;
|
|
35
|
+
/** No padding under the content, so it runs to the card's bottom edge */
|
|
36
|
+
flushBottom: import("@angular/core").InputSignal<boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* Where the heading sits in the page's outline, for screen readers: 2 for a
|
|
39
|
+
* card on a page under its title, 3 for one under a section's own heading
|
|
40
|
+
*/
|
|
41
|
+
headingLevel: import("@angular/core").InputSignal<number>;
|
|
42
|
+
/** Names the card's section by its heading, for screen readers */
|
|
43
|
+
readonly headingId: string;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FsCardComponent, never>;
|
|
45
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FsCardComponent, "fs-card", never, { "heading": { "alias": "heading"; "required": true; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "subheading": { "alias": "subheading"; "required": false; "isSignal": true; }; "meta": { "alias": "meta"; "required": false; "isSignal": true; }; "span": { "alias": "span"; "required": false; "isSignal": true; }; "flushBottom": { "alias": "flushBottom"; "required": false; "isSignal": true; }; "headingLevel": { "alias": "headingLevel"; "required": false; "isSignal": true; }; }, {}, never, ["[fsCardActions]", "fs-menu", "[fsCardSubheading]", "*"], true, never>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Content of an `fs-card` that runs to the card's left and right edges: a
|
|
4
|
+
* table, a list or a band of colour whose rows should meet the card's sides
|
|
5
|
+
* rather than stop short at its padding. It reaches out past the padding by
|
|
6
|
+
* exactly as much (`--fs-card-padding`), so nothing hard-codes the card's
|
|
7
|
+
* inset, and hands that inset on to what it holds as `--fs-card-bleed-inset`:
|
|
8
|
+
* pad a row's first and last cells by it and their text lines up with the
|
|
9
|
+
* card's heading again. Only the sides: the card's own padding stays above
|
|
10
|
+
* and under it.
|
|
11
|
+
*/
|
|
12
|
+
export declare class FsCardBleedComponent {
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FsCardBleedComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FsCardBleedComponent, "fs-card-bleed", never, {}, {}, never, ["*"], true, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* A page laid out in cards (`fs-card`), each taking the share of a line its
|
|
4
|
+
* `span` says: a third, a half, two thirds or the whole line. Cards on one
|
|
5
|
+
* line are as tall as the tallest of them. A card with no room beside it at
|
|
6
|
+
* its share leaves the rest of the line empty, so they read in the order
|
|
7
|
+
* written. The shares answer the grid's own width, not the window's, so the
|
|
8
|
+
* same cards lay out the same way in a page, a dialog or a side panel.
|
|
9
|
+
*/
|
|
10
|
+
export declare class FsCardsComponent {
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FsCardsComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FsCardsComponent, "fs-cards", never, {}, {}, never, ["*"], true, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How much of an `fs-cards` line a card takes. Each share holds on a wide
|
|
3
|
+
* line; on a mid one a third takes half the line and two thirds the whole of
|
|
4
|
+
* it; on a narrow one every card takes the whole line.
|
|
5
|
+
*/
|
|
6
|
+
export type FsCardSpan = 'third' | 'half' | 'two-thirds' | 'full';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './card-span';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
2
|
+
import { MatIcon } from '@angular/material/icon';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
// Each card's heading id, unique on the page
|
|
5
|
+
let nextId = 0;
|
|
6
|
+
/**
|
|
7
|
+
* One titled panel of a page: an icon on a tile of the accent, its heading,
|
|
8
|
+
* an optional line under it, and its content.
|
|
9
|
+
*
|
|
10
|
+
* - `meta` sits beside the heading in a word or two: the window or source its
|
|
11
|
+
* figures are from ("30 days").
|
|
12
|
+
* - What can be done to the card is an `fs-menu` given as its content; its
|
|
13
|
+
* kebab sits at the right of the heading line. A button that takes the
|
|
14
|
+
* reader elsewhere ("Open preview") is given with an `fsCardActions`
|
|
15
|
+
* attribute and sits before the kebab.
|
|
16
|
+
* - Lines under the heading that one string cannot carry (several, or some
|
|
17
|
+
* shown only at times) are an element given with an `fsCardSubheading`
|
|
18
|
+
* attribute, its lines plain `div`s.
|
|
19
|
+
* - In an `fs-cards` it takes the share of the line its `span` says.
|
|
20
|
+
*
|
|
21
|
+
* The card pads its content evenly on every side; `flushBottom` drops the
|
|
22
|
+
* padding under it, for content that should run to the card's bottom edge.
|
|
23
|
+
* Its look reads the `--fs-card-*` tokens, so an app restyles every card from
|
|
24
|
+
* one place and dark mode follows the style package's surface tokens. Its
|
|
25
|
+
* heading, meta and subheading set their own type rather than borrowing h3 or
|
|
26
|
+
* the subheading classes, so an app's rules for those never spill into a card;
|
|
27
|
+
* the heading takes only the shared heading face, weight and tracking.
|
|
28
|
+
*/
|
|
29
|
+
export class FsCardComponent {
|
|
30
|
+
heading = input.required();
|
|
31
|
+
/** A Material icon name; with none the heading starts the line */
|
|
32
|
+
icon = input('');
|
|
33
|
+
/** A short line under the heading: what the card counts, or how to read it */
|
|
34
|
+
subheading = input('');
|
|
35
|
+
/** A word or two on the heading's line, in subheading type */
|
|
36
|
+
meta = input('');
|
|
37
|
+
span = input('third');
|
|
38
|
+
/** No padding under the content, so it runs to the card's bottom edge */
|
|
39
|
+
flushBottom = input(false);
|
|
40
|
+
/**
|
|
41
|
+
* Where the heading sits in the page's outline, for screen readers: 2 for a
|
|
42
|
+
* card on a page under its title, 3 for one under a section's own heading
|
|
43
|
+
*/
|
|
44
|
+
headingLevel = input(2);
|
|
45
|
+
/** Names the card's section by its heading, for screen readers */
|
|
46
|
+
headingId = `fs-card-heading-${nextId++}`;
|
|
47
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FsCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: FsCardComponent, isStandalone: true, selector: "fs-card", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, subheading: { classPropertyName: "subheading", publicName: "subheading", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null }, span: { classPropertyName: "span", publicName: "span", isSignal: true, isRequired: false, transformFunction: null }, flushBottom: { classPropertyName: "flushBottom", publicName: "flushBottom", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "'fs-card-span-' + span()" } }, ngImport: i0, template: "<section\n class=\"fs-card\"\n [class.fs-card-flush-bottom]=\"flushBottom()\"\n [attr.aria-labelledby]=\"headingId\">\n <div class=\"fs-card-header\">\n <!-- The actions and kebab drop under the heading where the card is too narrow for both -->\n <div class=\"fs-row.gap-sm.wrap\">\n <div class=\"fs-row.gap-sm fs-card-title\">\n @if (icon()) {\n <span class=\"fs-card-icon\">\n <mat-icon>{{ icon() }}</mat-icon>\n </span>\n }\n <div class=\"fs-flex\">\n <!-- A div in a heading's role, not an h3, so an app's own h3 rules never reach it -->\n <div\n class=\"fs-card-heading\"\n role=\"heading\"\n [attr.aria-level]=\"headingLevel()\"\n [id]=\"headingId\">\n {{ heading() }}\n </div>\n @if (meta()) {\n <span class=\"fs-card-meta\">{{ meta() }}</span>\n }\n </div>\n </div>\n <div class=\"fs-card-actions\">\n <ng-content select=\"[fsCardActions]\"></ng-content>\n </div>\n <div class=\"fs-card-menu\">\n <ng-content select=\"fs-menu\"></ng-content>\n </div>\n </div>\n @if (subheading()) {\n <div class=\"fs-card-subheading\">{{ subheading() }}</div>\n }\n <!-- Lines under the heading a string cannot carry: several of them, or ones shown only at times -->\n <div class=\"fs-card-subheading fs-card-subheading-lines\">\n <ng-content select=\"[fsCardSubheading]\"></ng-content>\n </div>\n </div>\n <ng-content></ng-content>\n</section>\n", styles: ["@keyframes fs-card-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}:host{display:block;min-width:0;animation:fs-card-rise .45s cubic-bezier(.2,.7,.3,1) .18s both}@media (prefers-reduced-motion: reduce){:host{animation:none}}:host(.fs-card-span-full){grid-column:1/-1}@container fs-cards (min-width: 0){:host{grid-column:1/-1}}@container fs-cards (min-width: 640px){:host(.fs-card-span-third),:host(.fs-card-span-half){grid-column:span 3}}@container fs-cards (min-width: 900px){:host(.fs-card-span-third){grid-column:span 2}:host(.fs-card-span-two-thirds){grid-column:span 4}}.fs-card{height:100%;box-sizing:border-box;padding:var(--fs-card-padding, 20px);border:1px solid var(--fs-card-border-color, var(--fs-hairline, #e5e7eb));border-radius:var(--fs-card-radius, var(--fs-radius-card, 14px));background:var(--fs-card-background, var(--fs-surface-background, #ffffff));box-shadow:var(--fs-card-shadow, 0 1px 2px rgba(15, 23, 42, .05), 0 6px 16px -10px rgba(15, 23, 42, .18))}.fs-card-flush-bottom{padding-bottom:0}.fs-card-header{margin-bottom:20px}.fs-card-heading{display:inline;font-family:var(--fs-card-heading-font, var(--fs-heading-font, inherit));font-size:var(--fs-card-heading-size, 16px);font-weight:var(--fs-card-heading-weight, var(--fs-heading-weight, normal));letter-spacing:var(--fs-heading-tracking, normal);line-height:1.3;color:var(--fs-card-heading-color, var(--fs-color-text, rgba(0, 0, 0, .87)))}.fs-card-meta,.fs-card-subheading{font-size:var(--fs-card-subheading-size, .85em);color:var(--fs-color-text-muted, rgba(0, 0, 0, .54))}.fs-card-meta{margin-left:4px}.fs-card-subheading{margin:10px 0 0;line-height:1.4}.fs-card-subheading-lines{display:block}.fs-card-subheading-lines:empty{display:none}.fs-card-title{flex:1 1 200px;min-width:0}.fs-card-actions,.fs-card-menu{display:flex;flex:none;align-items:center;height:32px}.fs-card-menu{margin-right:-12px}.fs-card-actions:empty,.fs-card-menu:empty{display:none}.fs-card-icon{--fs-card-icon-accent: var(--fs-card-icon-color, var(--fs-color-secondary, var(--fs-color-primary, #2563eb)));display:inline-flex;flex:none;align-items:center;justify-content:center;width:32px;height:32px;border-radius:var(--fs-card-icon-radius, 10px);background:color-mix(in srgb,var(--fs-card-icon-accent) 10%,transparent);color:var(--fs-card-icon-accent)}.fs-card-icon mat-icon{width:20px;height:20px;font-size:20px}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
49
|
+
}
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FsCardComponent, decorators: [{
|
|
51
|
+
type: Component,
|
|
52
|
+
args: [{ selector: 'fs-card', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
53
|
+
MatIcon,
|
|
54
|
+
], host: {
|
|
55
|
+
'[class]': '\'fs-card-span-\' + span()',
|
|
56
|
+
}, template: "<section\n class=\"fs-card\"\n [class.fs-card-flush-bottom]=\"flushBottom()\"\n [attr.aria-labelledby]=\"headingId\">\n <div class=\"fs-card-header\">\n <!-- The actions and kebab drop under the heading where the card is too narrow for both -->\n <div class=\"fs-row.gap-sm.wrap\">\n <div class=\"fs-row.gap-sm fs-card-title\">\n @if (icon()) {\n <span class=\"fs-card-icon\">\n <mat-icon>{{ icon() }}</mat-icon>\n </span>\n }\n <div class=\"fs-flex\">\n <!-- A div in a heading's role, not an h3, so an app's own h3 rules never reach it -->\n <div\n class=\"fs-card-heading\"\n role=\"heading\"\n [attr.aria-level]=\"headingLevel()\"\n [id]=\"headingId\">\n {{ heading() }}\n </div>\n @if (meta()) {\n <span class=\"fs-card-meta\">{{ meta() }}</span>\n }\n </div>\n </div>\n <div class=\"fs-card-actions\">\n <ng-content select=\"[fsCardActions]\"></ng-content>\n </div>\n <div class=\"fs-card-menu\">\n <ng-content select=\"fs-menu\"></ng-content>\n </div>\n </div>\n @if (subheading()) {\n <div class=\"fs-card-subheading\">{{ subheading() }}</div>\n }\n <!-- Lines under the heading a string cannot carry: several of them, or ones shown only at times -->\n <div class=\"fs-card-subheading fs-card-subheading-lines\">\n <ng-content select=\"[fsCardSubheading]\"></ng-content>\n </div>\n </div>\n <ng-content></ng-content>\n</section>\n", styles: ["@keyframes fs-card-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}:host{display:block;min-width:0;animation:fs-card-rise .45s cubic-bezier(.2,.7,.3,1) .18s both}@media (prefers-reduced-motion: reduce){:host{animation:none}}:host(.fs-card-span-full){grid-column:1/-1}@container fs-cards (min-width: 0){:host{grid-column:1/-1}}@container fs-cards (min-width: 640px){:host(.fs-card-span-third),:host(.fs-card-span-half){grid-column:span 3}}@container fs-cards (min-width: 900px){:host(.fs-card-span-third){grid-column:span 2}:host(.fs-card-span-two-thirds){grid-column:span 4}}.fs-card{height:100%;box-sizing:border-box;padding:var(--fs-card-padding, 20px);border:1px solid var(--fs-card-border-color, var(--fs-hairline, #e5e7eb));border-radius:var(--fs-card-radius, var(--fs-radius-card, 14px));background:var(--fs-card-background, var(--fs-surface-background, #ffffff));box-shadow:var(--fs-card-shadow, 0 1px 2px rgba(15, 23, 42, .05), 0 6px 16px -10px rgba(15, 23, 42, .18))}.fs-card-flush-bottom{padding-bottom:0}.fs-card-header{margin-bottom:20px}.fs-card-heading{display:inline;font-family:var(--fs-card-heading-font, var(--fs-heading-font, inherit));font-size:var(--fs-card-heading-size, 16px);font-weight:var(--fs-card-heading-weight, var(--fs-heading-weight, normal));letter-spacing:var(--fs-heading-tracking, normal);line-height:1.3;color:var(--fs-card-heading-color, var(--fs-color-text, rgba(0, 0, 0, .87)))}.fs-card-meta,.fs-card-subheading{font-size:var(--fs-card-subheading-size, .85em);color:var(--fs-color-text-muted, rgba(0, 0, 0, .54))}.fs-card-meta{margin-left:4px}.fs-card-subheading{margin:10px 0 0;line-height:1.4}.fs-card-subheading-lines{display:block}.fs-card-subheading-lines:empty{display:none}.fs-card-title{flex:1 1 200px;min-width:0}.fs-card-actions,.fs-card-menu{display:flex;flex:none;align-items:center;height:32px}.fs-card-menu{margin-right:-12px}.fs-card-actions:empty,.fs-card-menu:empty{display:none}.fs-card-icon{--fs-card-icon-accent: var(--fs-card-icon-color, var(--fs-color-secondary, var(--fs-color-primary, #2563eb)));display:inline-flex;flex:none;align-items:center;justify-content:center;width:32px;height:32px;border-radius:var(--fs-card-icon-radius, 10px);background:color-mix(in srgb,var(--fs-card-icon-accent) 10%,transparent);color:var(--fs-card-icon-accent)}.fs-card-icon mat-icon{width:20px;height:20px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XJkLW1ldGFcIj57eyBtZXRhKCkgfX08L3NwYW4+XG4gICAgICAgICAgfVxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvZGl2PlxuICAgICAgPGRpdiBjbGFzcz1cImZzLWNhcmQtYWN0aW9uc1wiPlxuICAgICAgICA8bmctY29udGVudCBzZWxlY3Q9XCJbZnNDYXJkQWN0aW9uc11cIj48L25nLWNvbnRlbnQ+XG4gICAgICA8L2Rpdj5cbiAgICAgIDxkaXYgY2xhc3M9XCJmcy1jYXJkLW1lbnVcIj5cbiAgICAgICAgPG5nLWNvbnRlbnQgc2VsZWN0PVwiZnMtbWVudVwiPjwvbmctY29udGVudD5cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuICAgIEBpZiAoc3ViaGVhZGluZygpKSB7XG4gICAgICA8ZGl2IGNsYXNzPVwiZnMtY2FyZC1zdWJoZWFkaW5nXCI+e3sgc3ViaGVhZGluZygpIH19PC9kaXY+XG4gICAgfVxuICAgIDwhLS0gTGluZXMgdW5kZXIgdGhlIGhlYWRpbmcgYSBzdHJpbmcgY2Fubm90IGNhcnJ5OiBzZXZlcmFsIG9mIHRoZW0sIG9yIG9uZXMgc2hvd24gb25seSBhdCB0aW1lcyAtLT5cbiAgICA8ZGl2IGNsYXNzPVwiZnMtY2FyZC1zdWJoZWFkaW5nIGZzLWNhcmQtc3ViaGVhZGluZy1saW5lc1wiPlxuICAgICAgPG5nLWNvbnRlbnQgc2VsZWN0PVwiW2ZzQ2FyZFN1YmhlYWRpbmddXCI+PC9uZy1jb250ZW50PlxuICAgIDwvZGl2PlxuICA8L2Rpdj5cbiAgPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PlxuPC9zZWN0aW9uPlxuIl19
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Content of an `fs-card` that runs to the card's left and right edges: a
|
|
5
|
+
* table, a list or a band of colour whose rows should meet the card's sides
|
|
6
|
+
* rather than stop short at its padding. It reaches out past the padding by
|
|
7
|
+
* exactly as much (`--fs-card-padding`), so nothing hard-codes the card's
|
|
8
|
+
* inset, and hands that inset on to what it holds as `--fs-card-bleed-inset`:
|
|
9
|
+
* pad a row's first and last cells by it and their text lines up with the
|
|
10
|
+
* card's heading again. Only the sides: the card's own padding stays above
|
|
11
|
+
* and under it.
|
|
12
|
+
*/
|
|
13
|
+
export class FsCardBleedComponent {
|
|
14
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FsCardBleedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FsCardBleedComponent, isStandalone: true, selector: "fs-card-bleed", ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{--fs-card-bleed-inset: var(--fs-card-padding, 20px);display:block;margin-inline:calc(-1 * var(--fs-card-padding, 20px))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16
|
+
}
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FsCardBleedComponent, decorators: [{
|
|
18
|
+
type: Component,
|
|
19
|
+
args: [{ selector: 'fs-card-bleed', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, styles: [":host{--fs-card-bleed-inset: var(--fs-card-padding, 20px);display:block;margin-inline:calc(-1 * var(--fs-card-padding, 20px))}\n"] }]
|
|
20
|
+
}] });
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FyZC1ibGVlZC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmV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FzdCBjZWxscyBieSBpdCBhbmQgdGhlaXIgdGV4dCBsaW5lcyB1cCB3aXRoIHRoZVxuICogY2FyZCdzIGhlYWRpbmcgYWdhaW4uIE9ubHkgdGhlIHNpZGVzOiB0aGUgY2FyZCdzIG93biBwYWRkaW5nIHN0YXlzIGFib3ZlXG4gKiBhbmQgdW5kZXIgaXQuXG4gKi9cbkBDb21wb25lbnQoe1xuICBzZWxlY3RvcjogJ2ZzLWNhcmQtYmxlZWQnLFxuICB0ZW1wbGF0ZTogJzxuZy1jb250ZW50PjwvbmctY29udGVudD4nLFxuICBzdHlsZVVybHM6IFsnLi9jYXJkLWJsZWVkLmNvbXBvbmVudC5zY3NzJ10sXG4gIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLFxuICBzdGFuZGFsb25lOiB0cnVlLFxufSlcbmV4cG9ydCBjbGFzcyBGc0NhcmRCbGVlZENvbXBvbmVudCB7fVxuIl19
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* A page laid out in cards (`fs-card`), each taking the share of a line its
|
|
5
|
+
* `span` says: a third, a half, two thirds or the whole line. Cards on one
|
|
6
|
+
* line are as tall as the tallest of them. A card with no room beside it at
|
|
7
|
+
* its share leaves the rest of the line empty, so they read in the order
|
|
8
|
+
* written. The shares answer the grid's own width, not the window's, so the
|
|
9
|
+
* same cards lay out the same way in a page, a dialog or a side panel.
|
|
10
|
+
*/
|
|
11
|
+
export class FsCardsComponent {
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FsCardsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FsCardsComponent, isStandalone: true, selector: "fs-cards", ngImport: i0, template: '<div class="fs-cards"><ng-content></ng-content></div>', isInline: true, styles: [":host{display:block;container:fs-cards/inline-size}.fs-cards{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:var(--fs-cards-gap, 20px)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14
|
+
}
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FsCardsComponent, decorators: [{
|
|
16
|
+
type: Component,
|
|
17
|
+
args: [{ selector: 'fs-cards', template: '<div class="fs-cards"><ng-content></ng-content></div>', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, styles: [":host{display:block;container:fs-cards/inline-size}.fs-cards{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:var(--fs-cards-gap, 20px)}\n"] }]
|
|
18
|
+
}] });
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FyZHMuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2FwcC9jb21wb25lbnRzL2NhcmRzL2NhcmRzLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUduRTs7Ozs7OztHQU9HO0FBUUgsTUFBTSxPQUFPLGdCQUFnQjt3R0FBaEIsZ0JBQWdCOzRGQUFoQixnQkFBZ0Isb0VBTGpCLHVEQUF1RDs7NEZBS3RELGdCQUFnQjtrQkFQNUIsU0FBUzsrQkFDRSxVQUFVLFlBQ1YsdURBQXVELG1CQUVoRCx1QkFBdUIsQ0FBQyxNQUFNLGNBQ25DLElBQUkiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDaGFuZ2VEZXRlY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biJdfQ==
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FyZC1zcGFuLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2FwcC9pbnRlcmZhY2VzL2NhcmQtc3Bhbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBIb3cgbXVjaCBvZiBhbiBgZnMtY2FyZHNgIGxpbmUgYSBjYXJkIHRha2VzLiBFYWNoIHNoYXJlIGhvbGRzIG9uIGEgd2lkZVxuICogbGluZTsgb24gYSBtaWQgb25lIGEgdGhpcmQgdGFrZXMgaGFsZiB0aGUgbGluZSBhbmQgdHdvIHRoaXJkcyB0aGUgd2hvbGUgb2ZcbiAqIGl0OyBvbiBhIG5hcnJvdyBvbmUgZXZlcnkgY2FyZCB0YWtlcyB0aGUgd2hvbGUgbGluZS5cbiAqL1xuZXhwb3J0IHR5cGUgRnNDYXJkU3BhbiA9ICd0aGlyZCcgfCAnaGFsZicgfCAndHdvLXRoaXJkcycgfCAnZnVsbCc7XG4iXX0=
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from './card-span';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYXBwL2ludGVyZmFjZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxhQUFhLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2NhcmQtc3Bhbic7XG4iXX0=
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public_api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlyZXN0aXRjaC1jYXJkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2ZpcmVzdGl0Y2gtY2FyZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpY19hcGknO1xuIl19
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of @firestitch/card
|
|
3
|
+
*
|
|
4
|
+
* A page laid out in cards: FsCardComponent (`fs-card`), one titled panel
|
|
5
|
+
* (icon, heading, subheading, actions, content); FsCardBleedComponent
|
|
6
|
+
* (`fs-card-bleed`), content of a card that runs to its left and right edges;
|
|
7
|
+
* and FsCardsComponent (`fs-cards`), the responsive grid that gives each card
|
|
8
|
+
* a third, a half, two thirds or the whole line by its `span`.
|
|
9
|
+
*/
|
|
10
|
+
export { FsCardComponent } from './app/components/card/card.component';
|
|
11
|
+
export { FsCardBleedComponent } from './app/components/card-bleed/card-bleed.component';
|
|
12
|
+
export { FsCardsComponent } from './app/components/cards/cards.component';
|
|
13
|
+
export * from './app/interfaces';
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7OztHQVFHO0F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gJy4vYXBwL2NvbXBvbmVudHMvY2FyZHMvY2FyZHMuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vYXBwL2ludGVyZmFjZXMnO1xuIl19
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, Component, ChangeDetectionStrategy } from '@angular/core';
|
|
3
|
+
import { MatIcon } from '@angular/material/icon';
|
|
4
|
+
|
|
5
|
+
// Each card's heading id, unique on the page
|
|
6
|
+
let nextId = 0;
|
|
7
|
+
/**
|
|
8
|
+
* One titled panel of a page: an icon on a tile of the accent, its heading,
|
|
9
|
+
* an optional line under it, and its content.
|
|
10
|
+
*
|
|
11
|
+
* - `meta` sits beside the heading in a word or two: the window or source its
|
|
12
|
+
* figures are from ("30 days").
|
|
13
|
+
* - What can be done to the card is an `fs-menu` given as its content; its
|
|
14
|
+
* kebab sits at the right of the heading line. A button that takes the
|
|
15
|
+
* reader elsewhere ("Open preview") is given with an `fsCardActions`
|
|
16
|
+
* attribute and sits before the kebab.
|
|
17
|
+
* - Lines under the heading that one string cannot carry (several, or some
|
|
18
|
+
* shown only at times) are an element given with an `fsCardSubheading`
|
|
19
|
+
* attribute, its lines plain `div`s.
|
|
20
|
+
* - In an `fs-cards` it takes the share of the line its `span` says.
|
|
21
|
+
*
|
|
22
|
+
* The card pads its content evenly on every side; `flushBottom` drops the
|
|
23
|
+
* padding under it, for content that should run to the card's bottom edge.
|
|
24
|
+
* Its look reads the `--fs-card-*` tokens, so an app restyles every card from
|
|
25
|
+
* one place and dark mode follows the style package's surface tokens. Its
|
|
26
|
+
* heading, meta and subheading set their own type rather than borrowing h3 or
|
|
27
|
+
* the subheading classes, so an app's rules for those never spill into a card;
|
|
28
|
+
* the heading takes only the shared heading face, weight and tracking.
|
|
29
|
+
*/
|
|
30
|
+
class FsCardComponent {
|
|
31
|
+
heading = input.required();
|
|
32
|
+
/** A Material icon name; with none the heading starts the line */
|
|
33
|
+
icon = input('');
|
|
34
|
+
/** A short line under the heading: what the card counts, or how to read it */
|
|
35
|
+
subheading = input('');
|
|
36
|
+
/** A word or two on the heading's line, in subheading type */
|
|
37
|
+
meta = input('');
|
|
38
|
+
span = input('third');
|
|
39
|
+
/** No padding under the content, so it runs to the card's bottom edge */
|
|
40
|
+
flushBottom = input(false);
|
|
41
|
+
/**
|
|
42
|
+
* Where the heading sits in the page's outline, for screen readers: 2 for a
|
|
43
|
+
* card on a page under its title, 3 for one under a section's own heading
|
|
44
|
+
*/
|
|
45
|
+
headingLevel = input(2);
|
|
46
|
+
/** Names the card's section by its heading, for screen readers */
|
|
47
|
+
headingId = `fs-card-heading-${nextId++}`;
|
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FsCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: FsCardComponent, isStandalone: true, selector: "fs-card", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, subheading: { classPropertyName: "subheading", publicName: "subheading", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null }, span: { classPropertyName: "span", publicName: "span", isSignal: true, isRequired: false, transformFunction: null }, flushBottom: { classPropertyName: "flushBottom", publicName: "flushBottom", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "'fs-card-span-' + span()" } }, ngImport: i0, template: "<section\n class=\"fs-card\"\n [class.fs-card-flush-bottom]=\"flushBottom()\"\n [attr.aria-labelledby]=\"headingId\">\n <div class=\"fs-card-header\">\n <!-- The actions and kebab drop under the heading where the card is too narrow for both -->\n <div class=\"fs-row.gap-sm.wrap\">\n <div class=\"fs-row.gap-sm fs-card-title\">\n @if (icon()) {\n <span class=\"fs-card-icon\">\n <mat-icon>{{ icon() }}</mat-icon>\n </span>\n }\n <div class=\"fs-flex\">\n <!-- A div in a heading's role, not an h3, so an app's own h3 rules never reach it -->\n <div\n class=\"fs-card-heading\"\n role=\"heading\"\n [attr.aria-level]=\"headingLevel()\"\n [id]=\"headingId\">\n {{ heading() }}\n </div>\n @if (meta()) {\n <span class=\"fs-card-meta\">{{ meta() }}</span>\n }\n </div>\n </div>\n <div class=\"fs-card-actions\">\n <ng-content select=\"[fsCardActions]\"></ng-content>\n </div>\n <div class=\"fs-card-menu\">\n <ng-content select=\"fs-menu\"></ng-content>\n </div>\n </div>\n @if (subheading()) {\n <div class=\"fs-card-subheading\">{{ subheading() }}</div>\n }\n <!-- Lines under the heading a string cannot carry: several of them, or ones shown only at times -->\n <div class=\"fs-card-subheading fs-card-subheading-lines\">\n <ng-content select=\"[fsCardSubheading]\"></ng-content>\n </div>\n </div>\n <ng-content></ng-content>\n</section>\n", styles: ["@keyframes fs-card-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}:host{display:block;min-width:0;animation:fs-card-rise .45s cubic-bezier(.2,.7,.3,1) .18s both}@media (prefers-reduced-motion: reduce){:host{animation:none}}:host(.fs-card-span-full){grid-column:1/-1}@container fs-cards (min-width: 0){:host{grid-column:1/-1}}@container fs-cards (min-width: 640px){:host(.fs-card-span-third),:host(.fs-card-span-half){grid-column:span 3}}@container fs-cards (min-width: 900px){:host(.fs-card-span-third){grid-column:span 2}:host(.fs-card-span-two-thirds){grid-column:span 4}}.fs-card{height:100%;box-sizing:border-box;padding:var(--fs-card-padding, 20px);border:1px solid var(--fs-card-border-color, var(--fs-hairline, #e5e7eb));border-radius:var(--fs-card-radius, var(--fs-radius-card, 14px));background:var(--fs-card-background, var(--fs-surface-background, #ffffff));box-shadow:var(--fs-card-shadow, 0 1px 2px rgba(15, 23, 42, .05), 0 6px 16px -10px rgba(15, 23, 42, .18))}.fs-card-flush-bottom{padding-bottom:0}.fs-card-header{margin-bottom:20px}.fs-card-heading{display:inline;font-family:var(--fs-card-heading-font, var(--fs-heading-font, inherit));font-size:var(--fs-card-heading-size, 16px);font-weight:var(--fs-card-heading-weight, var(--fs-heading-weight, normal));letter-spacing:var(--fs-heading-tracking, normal);line-height:1.3;color:var(--fs-card-heading-color, var(--fs-color-text, rgba(0, 0, 0, .87)))}.fs-card-meta,.fs-card-subheading{font-size:var(--fs-card-subheading-size, .85em);color:var(--fs-color-text-muted, rgba(0, 0, 0, .54))}.fs-card-meta{margin-left:4px}.fs-card-subheading{margin:10px 0 0;line-height:1.4}.fs-card-subheading-lines{display:block}.fs-card-subheading-lines:empty{display:none}.fs-card-title{flex:1 1 200px;min-width:0}.fs-card-actions,.fs-card-menu{display:flex;flex:none;align-items:center;height:32px}.fs-card-menu{margin-right:-12px}.fs-card-actions:empty,.fs-card-menu:empty{display:none}.fs-card-icon{--fs-card-icon-accent: var(--fs-card-icon-color, var(--fs-color-secondary, var(--fs-color-primary, #2563eb)));display:inline-flex;flex:none;align-items:center;justify-content:center;width:32px;height:32px;border-radius:var(--fs-card-icon-radius, 10px);background:color-mix(in srgb,var(--fs-card-icon-accent) 10%,transparent);color:var(--fs-card-icon-accent)}.fs-card-icon mat-icon{width:20px;height:20px;font-size:20px}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
50
|
+
}
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FsCardComponent, decorators: [{
|
|
52
|
+
type: Component,
|
|
53
|
+
args: [{ selector: 'fs-card', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
54
|
+
MatIcon,
|
|
55
|
+
], host: {
|
|
56
|
+
'[class]': '\'fs-card-span-\' + span()',
|
|
57
|
+
}, template: "<section\n class=\"fs-card\"\n [class.fs-card-flush-bottom]=\"flushBottom()\"\n [attr.aria-labelledby]=\"headingId\">\n <div class=\"fs-card-header\">\n <!-- The actions and kebab drop under the heading where the card is too narrow for both -->\n <div class=\"fs-row.gap-sm.wrap\">\n <div class=\"fs-row.gap-sm fs-card-title\">\n @if (icon()) {\n <span class=\"fs-card-icon\">\n <mat-icon>{{ icon() }}</mat-icon>\n </span>\n }\n <div class=\"fs-flex\">\n <!-- A div in a heading's role, not an h3, so an app's own h3 rules never reach it -->\n <div\n class=\"fs-card-heading\"\n role=\"heading\"\n [attr.aria-level]=\"headingLevel()\"\n [id]=\"headingId\">\n {{ heading() }}\n </div>\n @if (meta()) {\n <span class=\"fs-card-meta\">{{ meta() }}</span>\n }\n </div>\n </div>\n <div class=\"fs-card-actions\">\n <ng-content select=\"[fsCardActions]\"></ng-content>\n </div>\n <div class=\"fs-card-menu\">\n <ng-content select=\"fs-menu\"></ng-content>\n </div>\n </div>\n @if (subheading()) {\n <div class=\"fs-card-subheading\">{{ subheading() }}</div>\n }\n <!-- Lines under the heading a string cannot carry: several of them, or ones shown only at times -->\n <div class=\"fs-card-subheading fs-card-subheading-lines\">\n <ng-content select=\"[fsCardSubheading]\"></ng-content>\n </div>\n </div>\n <ng-content></ng-content>\n</section>\n", styles: ["@keyframes fs-card-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}:host{display:block;min-width:0;animation:fs-card-rise .45s cubic-bezier(.2,.7,.3,1) .18s both}@media (prefers-reduced-motion: reduce){:host{animation:none}}:host(.fs-card-span-full){grid-column:1/-1}@container fs-cards (min-width: 0){:host{grid-column:1/-1}}@container fs-cards (min-width: 640px){:host(.fs-card-span-third),:host(.fs-card-span-half){grid-column:span 3}}@container fs-cards (min-width: 900px){:host(.fs-card-span-third){grid-column:span 2}:host(.fs-card-span-two-thirds){grid-column:span 4}}.fs-card{height:100%;box-sizing:border-box;padding:var(--fs-card-padding, 20px);border:1px solid var(--fs-card-border-color, var(--fs-hairline, #e5e7eb));border-radius:var(--fs-card-radius, var(--fs-radius-card, 14px));background:var(--fs-card-background, var(--fs-surface-background, #ffffff));box-shadow:var(--fs-card-shadow, 0 1px 2px rgba(15, 23, 42, .05), 0 6px 16px -10px rgba(15, 23, 42, .18))}.fs-card-flush-bottom{padding-bottom:0}.fs-card-header{margin-bottom:20px}.fs-card-heading{display:inline;font-family:var(--fs-card-heading-font, var(--fs-heading-font, inherit));font-size:var(--fs-card-heading-size, 16px);font-weight:var(--fs-card-heading-weight, var(--fs-heading-weight, normal));letter-spacing:var(--fs-heading-tracking, normal);line-height:1.3;color:var(--fs-card-heading-color, var(--fs-color-text, rgba(0, 0, 0, .87)))}.fs-card-meta,.fs-card-subheading{font-size:var(--fs-card-subheading-size, .85em);color:var(--fs-color-text-muted, rgba(0, 0, 0, .54))}.fs-card-meta{margin-left:4px}.fs-card-subheading{margin:10px 0 0;line-height:1.4}.fs-card-subheading-lines{display:block}.fs-card-subheading-lines:empty{display:none}.fs-card-title{flex:1 1 200px;min-width:0}.fs-card-actions,.fs-card-menu{display:flex;flex:none;align-items:center;height:32px}.fs-card-menu{margin-right:-12px}.fs-card-actions:empty,.fs-card-menu:empty{display:none}.fs-card-icon{--fs-card-icon-accent: var(--fs-card-icon-color, var(--fs-color-secondary, var(--fs-color-primary, #2563eb)));display:inline-flex;flex:none;align-items:center;justify-content:center;width:32px;height:32px;border-radius:var(--fs-card-icon-radius, 10px);background:color-mix(in srgb,var(--fs-card-icon-accent) 10%,transparent);color:var(--fs-card-icon-accent)}.fs-card-icon mat-icon{width:20px;height:20px;font-size:20px}\n"] }]
|
|
58
|
+
}] });
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Content of an `fs-card` that runs to the card's left and right edges: a
|
|
62
|
+
* table, a list or a band of colour whose rows should meet the card's sides
|
|
63
|
+
* rather than stop short at its padding. It reaches out past the padding by
|
|
64
|
+
* exactly as much (`--fs-card-padding`), so nothing hard-codes the card's
|
|
65
|
+
* inset, and hands that inset on to what it holds as `--fs-card-bleed-inset`:
|
|
66
|
+
* pad a row's first and last cells by it and their text lines up with the
|
|
67
|
+
* card's heading again. Only the sides: the card's own padding stays above
|
|
68
|
+
* and under it.
|
|
69
|
+
*/
|
|
70
|
+
class FsCardBleedComponent {
|
|
71
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FsCardBleedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
72
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FsCardBleedComponent, isStandalone: true, selector: "fs-card-bleed", ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{--fs-card-bleed-inset: var(--fs-card-padding, 20px);display:block;margin-inline:calc(-1 * var(--fs-card-padding, 20px))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
73
|
+
}
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FsCardBleedComponent, decorators: [{
|
|
75
|
+
type: Component,
|
|
76
|
+
args: [{ selector: 'fs-card-bleed', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, styles: [":host{--fs-card-bleed-inset: var(--fs-card-padding, 20px);display:block;margin-inline:calc(-1 * var(--fs-card-padding, 20px))}\n"] }]
|
|
77
|
+
}] });
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* A page laid out in cards (`fs-card`), each taking the share of a line its
|
|
81
|
+
* `span` says: a third, a half, two thirds or the whole line. Cards on one
|
|
82
|
+
* line are as tall as the tallest of them. A card with no room beside it at
|
|
83
|
+
* its share leaves the rest of the line empty, so they read in the order
|
|
84
|
+
* written. The shares answer the grid's own width, not the window's, so the
|
|
85
|
+
* same cards lay out the same way in a page, a dialog or a side panel.
|
|
86
|
+
*/
|
|
87
|
+
class FsCardsComponent {
|
|
88
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FsCardsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
89
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FsCardsComponent, isStandalone: true, selector: "fs-cards", ngImport: i0, template: '<div class="fs-cards"><ng-content></ng-content></div>', isInline: true, styles: [":host{display:block;container:fs-cards/inline-size}.fs-cards{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:var(--fs-cards-gap, 20px)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
90
|
+
}
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FsCardsComponent, decorators: [{
|
|
92
|
+
type: Component,
|
|
93
|
+
args: [{ selector: 'fs-cards', template: '<div class="fs-cards"><ng-content></ng-content></div>', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, styles: [":host{display:block;container:fs-cards/inline-size}.fs-cards{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:var(--fs-cards-gap, 20px)}\n"] }]
|
|
94
|
+
}] });
|
|
95
|
+
|
|
96
|
+
/*
|
|
97
|
+
* Public API Surface of @firestitch/card
|
|
98
|
+
*
|
|
99
|
+
* A page laid out in cards: FsCardComponent (`fs-card`), one titled panel
|
|
100
|
+
* (icon, heading, subheading, actions, content); FsCardBleedComponent
|
|
101
|
+
* (`fs-card-bleed`), content of a card that runs to its left and right edges;
|
|
102
|
+
* and FsCardsComponent (`fs-cards`), the responsive grid that gives each card
|
|
103
|
+
* a third, a half, two thirds or the whole line by its `span`.
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Generated bundle index. Do not edit.
|
|
108
|
+
*/
|
|
109
|
+
|
|
110
|
+
export { FsCardBleedComponent, FsCardComponent, FsCardsComponent };
|
|
111
|
+
//# sourceMappingURL=firestitch-card.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firestitch-card.mjs","sources":["../../src/app/components/card/card.component.ts","../../src/app/components/card/card.component.html","../../src/app/components/card-bleed/card-bleed.component.ts","../../src/app/components/cards/cards.component.ts","../../src/public_api.ts","../../src/firestitch-card.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nimport { MatIcon } from '@angular/material/icon';\n\nimport { FsCardSpan } from '../../interfaces';\n\n\n// Each card's heading id, unique on the page\nlet nextId = 0;\n\n/**\n * One titled panel of a page: an icon on a tile of the accent, its heading,\n * an optional line under it, and its content.\n *\n * - `meta` sits beside the heading in a word or two: the window or source its\n * figures are from (\"30 days\").\n * - What can be done to the card is an `fs-menu` given as its content; its\n * kebab sits at the right of the heading line. A button that takes the\n * reader elsewhere (\"Open preview\") is given with an `fsCardActions`\n * attribute and sits before the kebab.\n * - Lines under the heading that one string cannot carry (several, or some\n * shown only at times) are an element given with an `fsCardSubheading`\n * attribute, its lines plain `div`s.\n * - In an `fs-cards` it takes the share of the line its `span` says.\n *\n * The card pads its content evenly on every side; `flushBottom` drops the\n * padding under it, for content that should run to the card's bottom edge.\n * Its look reads the `--fs-card-*` tokens, so an app restyles every card from\n * one place and dark mode follows the style package's surface tokens. Its\n * heading, meta and subheading set their own type rather than borrowing h3 or\n * the subheading classes, so an app's rules for those never spill into a card;\n * the heading takes only the shared heading face, weight and tracking.\n */\n@Component({\n selector: 'fs-card',\n templateUrl: './card.component.html',\n styleUrls: ['./card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n MatIcon,\n ],\n host: {\n '[class]': '\\'fs-card-span-\\' + span()',\n },\n})\nexport class FsCardComponent {\n\n public heading = input.required<string>();\n /** A Material icon name; with none the heading starts the line */\n public icon = input<string>('');\n /** A short line under the heading: what the card counts, or how to read it */\n public subheading = input<string>('');\n /** A word or two on the heading's line, in subheading type */\n public meta = input<string>('');\n public span = input<FsCardSpan>('third');\n /** No padding under the content, so it runs to the card's bottom edge */\n public flushBottom = input<boolean>(false);\n /**\n * Where the heading sits in the page's outline, for screen readers: 2 for a\n * card on a page under its title, 3 for one under a section's own heading\n */\n public headingLevel = input<number>(2);\n\n /** Names the card's section by its heading, for screen readers */\n public readonly headingId = `fs-card-heading-${nextId++}`;\n\n}\n","<section\n class=\"fs-card\"\n [class.fs-card-flush-bottom]=\"flushBottom()\"\n [attr.aria-labelledby]=\"headingId\">\n <div class=\"fs-card-header\">\n <!-- The actions and kebab drop under the heading where the card is too narrow for both -->\n <div class=\"fs-row.gap-sm.wrap\">\n <div class=\"fs-row.gap-sm fs-card-title\">\n @if (icon()) {\n <span class=\"fs-card-icon\">\n <mat-icon>{{ icon() }}</mat-icon>\n </span>\n }\n <div class=\"fs-flex\">\n <!-- A div in a heading's role, not an h3, so an app's own h3 rules never reach it -->\n <div\n class=\"fs-card-heading\"\n role=\"heading\"\n [attr.aria-level]=\"headingLevel()\"\n [id]=\"headingId\">\n {{ heading() }}\n </div>\n @if (meta()) {\n <span class=\"fs-card-meta\">{{ meta() }}</span>\n }\n </div>\n </div>\n <div class=\"fs-card-actions\">\n <ng-content select=\"[fsCardActions]\"></ng-content>\n </div>\n <div class=\"fs-card-menu\">\n <ng-content select=\"fs-menu\"></ng-content>\n </div>\n </div>\n @if (subheading()) {\n <div class=\"fs-card-subheading\">{{ subheading() }}</div>\n }\n <!-- Lines under the heading a string cannot carry: several of them, or ones shown only at times -->\n <div class=\"fs-card-subheading fs-card-subheading-lines\">\n <ng-content select=\"[fsCardSubheading]\"></ng-content>\n </div>\n </div>\n <ng-content></ng-content>\n</section>\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n\n/**\n * Content of an `fs-card` that runs to the card's left and right edges: a\n * table, a list or a band of colour whose rows should meet the card's sides\n * rather than stop short at its padding. It reaches out past the padding by\n * exactly as much (`--fs-card-padding`), so nothing hard-codes the card's\n * inset, and hands that inset on to what it holds as `--fs-card-bleed-inset`:\n * pad a row's first and last cells by it and their text lines up with the\n * card's heading again. Only the sides: the card's own padding stays above\n * and under it.\n */\n@Component({\n selector: 'fs-card-bleed',\n template: '<ng-content></ng-content>',\n styleUrls: ['./card-bleed.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class FsCardBleedComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n\n/**\n * A page laid out in cards (`fs-card`), each taking the share of a line its\n * `span` says: a third, a half, two thirds or the whole line. Cards on one\n * line are as tall as the tallest of them. A card with no room beside it at\n * its share leaves the rest of the line empty, so they read in the order\n * written. The shares answer the grid's own width, not the window's, so the\n * same cards lay out the same way in a page, a dialog or a side panel.\n */\n@Component({\n selector: 'fs-cards',\n template: '<div class=\"fs-cards\"><ng-content></ng-content></div>',\n styleUrls: ['./cards.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class FsCardsComponent {}\n","/*\n * Public API Surface of @firestitch/card\n *\n * A page laid out in cards: FsCardComponent (`fs-card`), one titled panel\n * (icon, heading, subheading, actions, content); FsCardBleedComponent\n * (`fs-card-bleed`), content of a card that runs to its left and right edges;\n * and FsCardsComponent (`fs-cards`), the responsive grid that gives each card\n * a third, a half, two thirds or the whole line by its `span`.\n */\nexport { FsCardComponent } from './app/components/card/card.component';\nexport { FsCardBleedComponent } from './app/components/card-bleed/card-bleed.component';\nexport { FsCardsComponent } from './app/components/cards/cards.component';\nexport * from './app/interfaces';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAOA;AACA,IAAI,MAAM,GAAG,CAAC,CAAC;AAEf;;;;;;;;;;;;;;;;;;;;;;AAsBG;MAcU,eAAe,CAAA;AAEnB,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;;AAEnC,I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CAAA,EAAA,CAAA;;;AChBlB;;;;;;;;AAQG;;ACRH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firestitch/card",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
|
|
3
|
+
"version": "18.0.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/Firestitch/ngx-card"
|
|
7
|
+
},
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Firestitch",
|
|
10
|
+
"email": "admin@firestitch.com"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"angular",
|
|
14
|
+
"card",
|
|
15
|
+
"cards",
|
|
16
|
+
"layout",
|
|
17
|
+
"grid"
|
|
18
|
+
],
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"@angular/core": ">=18.0.0",
|
|
22
|
+
"@angular/material": ">=18.0.0"
|
|
23
|
+
},
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"module": "fesm2022/firestitch-card.mjs",
|
|
26
|
+
"typings": "index.d.ts",
|
|
27
|
+
"exports": {
|
|
28
|
+
"./package.json": {
|
|
29
|
+
"default": "./package.json"
|
|
30
|
+
},
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./index.d.ts",
|
|
33
|
+
"esm2022": "./esm2022/firestitch-card.mjs",
|
|
34
|
+
"esm": "./esm2022/firestitch-card.mjs",
|
|
35
|
+
"default": "./fesm2022/firestitch-card.mjs"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"tslib": "^2.3.0"
|
|
40
|
+
}
|
|
6
41
|
}
|
package/public_api.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { FsCardComponent } from './app/components/card/card.component';
|
|
2
|
+
export { FsCardBleedComponent } from './app/components/card-bleed/card-bleed.component';
|
|
3
|
+
export { FsCardsComponent } from './app/components/cards/cards.component';
|
|
4
|
+
export * from './app/interfaces';
|
package/README.md
DELETED