@magmonium/one 0.4.63 → 0.4.65

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magmonium/one",
3
- "version": "0.4.63",
3
+ "version": "0.4.65",
4
4
  "description": "Magmonium One — Angular design-system primitives for mm Apps",
5
5
  "author": "magmonium",
6
6
  "license": "MIT",
@@ -5605,6 +5605,7 @@ interface RowConfig extends Config {
5605
5605
  paddingY?: boolean;
5606
5606
  maxWidth?: string;
5607
5607
  center?: boolean;
5608
+ fullHeight?: boolean;
5608
5609
  }
5609
5610
  export declare class RowComponent extends ConfigComponent<RowConfig> {
5610
5611
  subFolder: "rows";
@@ -5613,11 +5614,13 @@ export declare class RowComponent extends ConfigComponent<RowConfig> {
5613
5614
  readonly paddingY: import("@angular/core").InputSignal<boolean | undefined>;
5614
5615
  readonly maxWidth: import("@angular/core").InputSignal<string | undefined>;
5615
5616
  readonly center: import("@angular/core").InputSignal<boolean | undefined>;
5617
+ readonly fullHeight: import("@angular/core").InputSignal<boolean | undefined>;
5616
5618
  protected readonly resolvedPadding: import("@angular/core").Signal<boolean>;
5617
5619
  protected readonly resolvedPaddingX: import("@angular/core").Signal<boolean>;
5618
5620
  protected readonly resolvedPaddingY: import("@angular/core").Signal<boolean>;
5619
5621
  protected readonly resolvedMaxWidth: import("@angular/core").Signal<string | undefined>;
5620
5622
  protected readonly resolvedCenter: import("@angular/core").Signal<boolean>;
5623
+ protected readonly resolvedFullHeight: import("@angular/core").Signal<boolean>;
5621
5624
  protected readonly classes: import("@angular/core").Signal<string>;
5622
5625
  private readonly sectionContext;
5623
5626
  protected readonly noBorder: import("@angular/core").Signal<boolean>;
@@ -5648,6 +5651,11 @@ export declare class RowComponent extends ConfigComponent<RowConfig> {
5648
5651
  "required": false;
5649
5652
  "isSignal": true;
5650
5653
  };
5654
+ "fullHeight": {
5655
+ "alias": "fullHeight";
5656
+ "required": false;
5657
+ "isSignal": true;
5658
+ };
5651
5659
  }, {}, never, ["*"], true, never>;
5652
5660
  }
5653
5661
  type HeaderLevel = 1 | 2 | 3 | 4 | 5 | 6;
@@ -5900,11 +5908,14 @@ export declare class SectionButtonGroupComponent extends ConfigComponent<Section
5900
5908
  export declare class SectionFooterComponent {
5901
5909
  readonly sticky: import("@angular/core").InputSignal<boolean>;
5902
5910
  readonly align: import("@angular/core").InputSignal<"center" | "left" | "right">;
5911
+ readonly maxWidth: import("@angular/core").InputSignal<string | undefined>;
5903
5912
  private readonly scrollSticky;
5904
5913
  protected readonly isSticky: import("@angular/core").Signal<boolean>;
5905
5914
  private readonly sectionContext;
5906
5915
  protected readonly sidepanel: import("@angular/core").Signal<boolean>;
5907
5916
  protected readonly noBorder: import("@angular/core").Signal<boolean>;
5917
+ protected readonly resolvedMaxWidth: import("@angular/core").Signal<string | undefined>;
5918
+ protected readonly boxAlign: import("@angular/core").Signal<"center" | "left" | "right">;
5908
5919
  static ɵfac: i0.ɵɵFactoryDeclaration<SectionFooterComponent, never>;
5909
5920
  static ɵcmp: i0.ɵɵComponentDeclaration<SectionFooterComponent, "m-section-footer", never, {
5910
5921
  "sticky": {
@@ -5917,6 +5928,11 @@ export declare class SectionFooterComponent {
5917
5928
  "required": false;
5918
5929
  "isSignal": true;
5919
5930
  };
5931
+ "maxWidth": {
5932
+ "alias": "maxWidth";
5933
+ "required": false;
5934
+ "isSignal": true;
5935
+ };
5920
5936
  }, {}, never, ["*"], true, never>;
5921
5937
  }
5922
5938
  /**
@@ -7935,6 +7951,7 @@ export declare class TextOutputComponent extends ConfigComponent<TextOutputConfi
7935
7951
  readonly label: import("@angular/core").InputSignal<string | undefined>;
7936
7952
  readonly noTranslate: import("@angular/core").InputSignal<string | boolean | undefined>;
7937
7953
  readonly params: import("@angular/core").InputSignal<Record<string, string> | undefined>;
7954
+ readonly truncate: import("@angular/core").InputSignal<boolean | undefined>;
7938
7955
  readonly resolvedAlign: import("@angular/core").Signal<TextOutputAlign>;
7939
7956
  protected readonly resolvedVariant: import("@angular/core").Signal<TextOutputVariant | undefined>;
7940
7957
  protected readonly resolvedFontWeight: import("@angular/core").Signal<TextOutputFontWeight | undefined>;
@@ -7996,6 +8013,11 @@ export declare class TextOutputComponent extends ConfigComponent<TextOutputConfi
7996
8013
  "required": false;
7997
8014
  "isSignal": true;
7998
8015
  };
8016
+ "truncate": {
8017
+ "alias": "truncate";
8018
+ "required": false;
8019
+ "isSignal": true;
8020
+ };
7999
8021
  }, {
8000
8022
  "config": "configChange";
8001
8023
  "clicked": "clicked";
@@ -1 +0,0 @@
1
- {"version":3,"file":"magmonium-one-text-output-nJBGhbwG.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/ui/text-output/ui/text-output.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n model,\n output,\n} from '@angular/core';\nimport { TranslateService } from '../../../services/translate';\nimport { ConfigComponent } from '../../../lib/components/config-component';\nimport { Config } from '../../../type/config/config-type';\nimport { LAYOUT_ASSET_FOLDER } from '../../../enum';\nimport { toAttrBool } from '../../../functions/config/attribute-value';\nimport { resolvePallet } from '../../../lib/theme/lib/color-utl';\n\nexport type TextOutputAlign = 'left' | 'right' | 'center';\n\n// Variants are roles, not styles: each one says what the text is doing on the\n// page, and the Section it sits in decides how big that role renders. Every\n// size below is therefore an `em` multiple of the inherited Section font-size\n// — a `lead` in a compact Section stays proportionally a lead — which is the\n// one rule the plain (undefined) variant keeps by inheriting outright.\n//\n// - `lead` opening paragraph that introduces the block under it\n// - `big` one-line statement — a number, a verdict, a headline that is\n// not a SectionHeader\n// - `bold` emphasis at body size, for the line that must be read first\n// - `footer` annotation under the thing it describes — a field's validation\n// message, a caption, a disclaimer; 0.75 of body, body colour\n// - `footnote` aside the reader may skip — source, legal line, small print;\n// 0.6 of body, body colour\n// - `link` text that goes somewhere on click — an affordance rather than\n// a size, so it is the one role that stays inline, takes focus,\n// and emits `clicked`\n// - `link-small` the same affordance for a link that trails the content it\n// belongs to rather than carrying a line of its own — a \"see\n// all\", an \"edit\" beside a field; body size like `link`\nexport type TextOutputVariant =\n | 'lead'\n | 'big'\n | 'bold'\n | 'footer'\n | 'footnote'\n | 'link'\n | 'link-small';\n\n// Weight tokens of the type scale. Applied after the variant, so it overrides\n// the weight a role implies (`lead` light, `big` semibold, `bold` bold).\nexport type TextOutputFontWeight =\n | 'light'\n | 'normal'\n | 'medium'\n | 'semibold'\n | 'bold';\n\nexport interface TextOutputConfig extends Config {\n label?: string;\n noTranslate?: boolean;\n align?: TextOutputAlign;\n variant?: TextOutputVariant;\n color?: string;\n fontWeight?: TextOutputFontWeight;\n}\n\n@Component({\n selector: 'm-text-output',\n imports: [],\n template: `\n <div\n class=\"m-text-output\"\n [style.color]=\"resolvedColorPallet().color\"\n [innerHTML]=\"html()\"\n ></div>\n `,\n styleUrl: './text-output.sass',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'm-text-output-host',\n '[class.is-design-mode]': 'isDesignMode',\n '[class.align-left]': 'resolvedAlign() === \"left\"',\n '[class.align-right]': 'resolvedAlign() === \"right\"',\n '[class.align-center]': 'resolvedAlign() === \"center\"',\n '[class.variant-lead]': 'resolvedVariant() === \"lead\"',\n '[class.variant-big]': 'resolvedVariant() === \"big\"',\n '[class.variant-bold]': 'resolvedVariant() === \"bold\"',\n '[class.variant-footer]': 'resolvedVariant() === \"footer\"',\n '[class.variant-footnote]': 'resolvedVariant() === \"footnote\"',\n '[class.variant-link]': 'resolvedVariant() === \"link\"',\n '[class.variant-link-small]': 'resolvedVariant() === \"link-small\"',\n '[class.weight-light]': 'resolvedFontWeight() === \"light\"',\n '[class.weight-normal]': 'resolvedFontWeight() === \"normal\"',\n '[class.weight-medium]': 'resolvedFontWeight() === \"medium\"',\n '[class.weight-semibold]': 'resolvedFontWeight() === \"semibold\"',\n '[class.weight-bold]': 'resolvedFontWeight() === \"bold\"',\n '[class.has-color]': '!!(color() ?? config()?.color)',\n // Only a link is reachable and announced as one. Every other variant is a\n // size, and a focus stop on plain text is a tab stop that does nothing.\n '[attr.role]': 'isLink() ? \"link\" : null',\n '[attr.tabindex]': 'isLink() ? 0 : null',\n '(click)': 'onClick()',\n '(keydown.enter)': 'onClick()',\n '[style.--m-text-output-color]': 'resolvedColorPallet().color',\n '[style.--m-text-output-color-contrast]': 'resolvedColorPallet().contrastColor',\n '[style.--m-text-output-color-opposite]': 'resolvedColorPallet().oppositeColor',\n },\n})\nexport class TextOutputComponent extends ConfigComponent<TextOutputConfig> {\n override subFolder = LAYOUT_ASSET_FOLDER.text_output;\n override config = model<Partial<TextOutputConfig>>();\n private readonly translateService = inject(TranslateService);\n\n readonly align = input<TextOutputAlign | undefined>(undefined);\n readonly variant = input<TextOutputVariant | undefined>(undefined);\n // A theme colour key (`error`, `warning`, `success`, …) or a raw CSS colour,\n // resolved the same way an Icon's or a Logo's is so a token follows the\n // active theme instead of freezing one theme's hex into a template.\n readonly color = input<string | undefined>(undefined);\n readonly fontWeight = input<TextOutputFontWeight | undefined>(undefined);\n // `label` is the text itself, so a one-off TextOutput needs no asset behind\n // it (ADR 0010). MiniMark is a single string whatever it renders to, which\n // is what lets it ride on the tag at all.\n readonly label = input<string | undefined>(undefined);\n readonly noTranslate = input<boolean | string | undefined>(undefined);\n // Values for the message's `<name>` / `<$name>` placeholders. An input and\n // deliberately not a TextOutputConfig key: an asset is resolved by name and\n // shared across every Control that names it, and these differ per render\n // (ADR 0020). The query-string form (`min_length?len=6`) still works and\n // still loses to this on a shared placeholder, that being the precedence\n // TranslateService already had. Bind a named member — an object literal in a\n // template is refused by `no-inline-config` (ADR 0010).\n readonly params = input<Record<string, string> | undefined>(undefined);\n\n readonly resolvedAlign = computed<TextOutputAlign>(\n () => this.align() ?? this.config()?.align ?? 'left'\n );\n\n protected readonly resolvedVariant = computed<TextOutputVariant | undefined>(\n () => this.variant() ?? this.config()?.variant\n );\n\n protected readonly resolvedFontWeight = computed<\n TextOutputFontWeight | undefined\n >(() => this.fontWeight() ?? this.config()?.fontWeight);\n\n // Both link roles are the same affordance, so both take the focus stop, the\n // `role=\"link\"` and the `clicked` output; only their size differs.\n protected readonly isLink = computed(() => {\n const variant = this.resolvedVariant();\n return variant === 'link' || variant === 'link-small';\n });\n\n /**\n * Fired by a `link` variant and by nothing else. A text that is not a link\n * draws no affordance and takes no focus, so a click on it is a click on\n * prose — emitting there would be a control only a mouse could find.\n *\n * Where the link goes to a route instead, the caller attaches `routerLink`\n * and binds nothing here: one click means one thing.\n */\n readonly clicked = output<void>();\n\n protected onClick(): void {\n if (this.isLink()) this.clicked.emit();\n }\n\n protected readonly resolvedColorPallet = computed(() =>\n resolvePallet(\n this.color() ?? this.config()?.color ?? this.defaultColor,\n this.themeStore.color()\n )\n );\n\n protected override resolveComponentOverrides(): Partial<TextOutputConfig> {\n const overrides: Partial<TextOutputConfig> = {};\n const align = this.align();\n if (align !== undefined) overrides.align = align;\n const label = this.label();\n if (label !== undefined) overrides.label = label;\n const noTranslate = toAttrBool(this.noTranslate());\n if (noTranslate !== undefined) overrides.noTranslate = noTranslate;\n const variant = this.variant();\n if (variant !== undefined) overrides.variant = variant;\n const color = this.color();\n if (color !== undefined) overrides.color = color;\n const fontWeight = this.fontWeight();\n if (fontWeight !== undefined) overrides.fontWeight = fontWeight;\n return overrides;\n }\n\n protected readonly resolvedLabel = computed(() => this.config()?.label);\n protected readonly shouldTranslate = computed(\n () => !this.config()?.noTranslate\n );\n protected readonly html = computed(() => {\n const label = this.resolvedLabel();\n return this.shouldTranslate()\n ? this.translateService.translateToHtml(label, this.params())\n : this.translateService.toSafeHtml(label);\n });\n}\n"],"mappings":";;;;;AA2GA,IAAa,sBAAb,MAAa,4BAA4B,gBAAiC;CAC/D,YAAY,oBAAoB;CAChC,SAAS,MAAkC,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACnC,mBAAmB,OAAO,gBAAgB;CAElD,Q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