@lifecorner/angular-ui-kit 3.10.1 → 3.11.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/fesm2022/lifecorner-angular-ui-kit-badge.mjs +19 -2
- package/fesm2022/lifecorner-angular-ui-kit-badge.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-bottom-nav.mjs +2 -1
- package/fesm2022/lifecorner-angular-ui-kit-bottom-nav.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-button.mjs +4 -4
- package/fesm2022/lifecorner-angular-ui-kit-button.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-footer.mjs +2 -2
- package/fesm2022/lifecorner-angular-ui-kit-footer.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-icon.mjs +14 -5
- package/fesm2022/lifecorner-angular-ui-kit-icon.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-next-step-card.mjs +2 -2
- package/fesm2022/lifecorner-angular-ui-kit-next-step-card.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-page-header.mjs +2 -2
- package/fesm2022/lifecorner-angular-ui-kit-page-header.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-sidenav.mjs +2 -1
- package/fesm2022/lifecorner-angular-ui-kit-sidenav.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-tabs.mjs +2 -1
- package/fesm2022/lifecorner-angular-ui-kit-tabs.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-timeline.mjs +2 -1
- package/fesm2022/lifecorner-angular-ui-kit-timeline.mjs.map +1 -1
- package/package.json +1 -1
- package/types/lifecorner-angular-ui-kit-badge.d.ts +16 -0
- package/types/lifecorner-angular-ui-kit-button.d.ts +9 -0
- package/types/lifecorner-angular-ui-kit-icon.d.ts +19 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecorner-angular-ui-kit-timeline.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/timeline/timeline-templates.directive.ts","../../../../libs/angular-ui-kit/src/lib/timeline/timeline.component.ts","../../../../libs/angular-ui-kit/src/lib/timeline/timeline.component.html"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport type { TimelineItem } from './timeline.component';\n\n/** Template context for the per-item timeline templates. */\nexport interface TimelineTemplateContext {\n $implicit: TimelineItem;\n}\n\n/**\n * Free content slot rendered below an entry's header line — arbitrary markup\n * per item (code block, prose, collapsible text, diff), not just a\n * description string. The template receives the item as `$implicit`.\n *\n * @example\n * ```html\n * <lc-timeline [items]=\"steps\">\n * <ng-template lcTimelineContent let-item>\n * @if (item.state === 'failed') {\n * <lc-code-block [code]=\"item.command\" language=\"bash\" />\n * }\n * </ng-template>\n * </lc-timeline>\n * ```\n */\n@Directive({\n selector: '[lcTimelineContent]',\n standalone: true,\n})\nexport class TimelineContentDirective {\n public readonly template = inject(TemplateRef<TimelineTemplateContext>);\n}\n\n/**\n * Live meta slot rendered right-aligned in an entry's header line — for\n * values the app keeps ticking itself (\"läuft seit 42 s\"). Takes precedence\n * over the item's static `meta` string.\n *\n * @example\n * ```html\n * <lc-timeline [items]=\"steps\">\n * <ng-template lcTimelineMeta let-item>\n * @if (item.state === 'running') { {{ elapsed() }} }\n * @else { {{ item.meta }} }\n * </ng-template>\n * </lc-timeline>\n * ```\n */\n@Directive({\n selector: '[lcTimelineMeta]',\n standalone: true,\n})\nexport class TimelineMetaDirective {\n public readonly template = inject(TemplateRef<TimelineTemplateContext>);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n contentChild,\n input,\n computed,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { IconComponent } from '@lifecorner/angular-ui-kit/icon';\nimport { BadgeComponent, BadgeVariant } from '@lifecorner/angular-ui-kit/badge';\nimport {\n TimelineContentDirective,\n TimelineMetaDirective,\n} from './timeline-templates.directive';\n\n/**\n * Semantic state of a timeline entry (e.g. one step of a run transcript).\n * Drives the marker color via the semantic tokens; `running` additionally\n * pulses (respecting `prefers-reduced-motion`).\n */\nexport type TimelineItemState = 'success' | 'running' | 'failed' | 'pending';\n\n/** Heading level of the item titles (3.3, G-11). */\nexport type TimelineHeadingLevel = 2 | 3 | 4 | 5 | 6;\n\nexport interface TimelineItem {\n /** Optional stable identity for rendering (falls back to the list index). */\n id?: string;\n /** Title of the event */\n title: string;\n /** Optional monospace suffix after the title (e.g. a tool id like `gate_test`). */\n titleMono?: string;\n /** Optional badge label in the header line (e.g. \"Fehlgeschlagen\"). */\n badge?: string;\n /** Variant of the header badge. @default 'default' */\n badgeVariant?: BadgeVariant;\n /** Optional right-aligned header meta (duration / time). */\n meta?: string;\n /** Optional description */\n description?: string;\n /** Optional timestamp string */\n timestamp?: string;\n /**\n * Machine-readable moment of the timestamp (ISO 8601, e.g.\n * `2026-10-12T18:05:00+02:00`), set as the `<time datetime>` attribute so\n * „heute 18:05“ carries its exact date (3.3, G-11).\n */\n datetime?: string;\n /** Optional icon name (heroicon) */\n icon?: string;\n /** Optional color for the dot/icon */\n color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';\n /**\n * Semantic entry state — colors the marker from the semantic tokens and\n * takes precedence over `color`. `running` pulses the marker.\n */\n state?: TimelineItemState;\n}\n\nexport type TimelineOrientation = 'vertical' | 'horizontal';\n\n/** Marker color class per entry state. */\nconst STATE_COLORS: Record<TimelineItemState, string> = {\n success: 'success',\n running: 'primary',\n failed: 'error',\n pending: 'neutral',\n};\n\n/**\n * Timeline component for chronological event display.\n *\n * Features:\n * - Vertical timeline with connecting line\n * - Semantic status colors per event (info, success, warning, error)\n * - Entry states (`success | running | failed | pending`); `running` pulses\n * - Composable header line: title + monospace suffix (`titleMono`) + badge\n * (`badge`/`badgeVariant`) + right-aligned meta (`meta` or the\n * `lcTimelineMeta` template for live values)\n * - Free content per entry below the header via the `lcTimelineContent`\n * template (code blocks, prose, diffs, …)\n * - Date and description display per item\n * - Icon support for timeline markers\n * - Dark mode support\n *\n * @example\n * ```html\n * <lc-timeline [items]=\"events\"></lc-timeline>\n * ```\n */\n@Component({\n selector: 'lc-timeline',\n standalone: true,\n imports: [IconComponent, BadgeComponent, NgTemplateOutlet],\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TimelineComponent {\n /**\n * List of timeline events.\n */\n items = input.required<TimelineItem[]>();\n\n /**\n * Layout orientation.\n * @default 'vertical'\n */\n orientation = input<TimelineOrientation>('vertical');\n\n /**\n * Compact mode reduces spacing.\n * @default false\n */\n compact = input<boolean>(false);\n\n /**\n * Heading level of the item titles (`h2`–`h6`), so each event is reachable\n * by heading navigation. Unset: a plain paragraph (3.2). Semantics only,\n * the look stays the same.\n */\n headingLevel = input<TimelineHeadingLevel | undefined>(undefined);\n\n /** Optional per-item content template (below the header line). */\n protected contentTemplate = contentChild(TimelineContentDirective);\n\n /** Optional per-item live meta template (right-aligned in the header). */\n protected metaTemplate = contentChild(TimelineMetaDirective);\n\n protected timelineClasses = computed(() => {\n return [\n 'timeline',\n `timeline--${this.orientation()}`,\n this.compact() ? 'timeline--compact' : '',\n ]\n .filter(Boolean)\n .join(' ');\n });\n\n protected markerClasses(item: TimelineItem): string {\n const color = item.state ? STATE_COLORS[item.state] : item.color || 'primary';\n return [\n 'timeline__marker',\n `timeline__marker--${color}`,\n item.state === 'running' ? 'timeline__marker--running' : '',\n ]\n .filter(Boolean)\n .join(' ');\n }\n}\n","<!-- An ordered list (3.3, G-11): the events have an order and a count. -->\n<ol [class]=\"timelineClasses()\">\n @for (item of items(); track item.id ?? $index; let last = $last) {\n <li class=\"timeline__item\" [class.timeline__item--last]=\"last\">\n <div [class]=\"markerClasses(item)\">\n @if (item.icon) {\n <lc-icon [name]=\"item.icon\" class=\"timeline__icon\" [decorative]=\"true\"></lc-icon>\n } @else {\n <span class=\"timeline__dot\"></span>\n }\n </div>\n @if (!last) {\n <div class=\"timeline__connector\"></div>\n }\n <div class=\"timeline__content\">\n <div class=\"timeline__header\">\n <ng-template #titleContent>\n {{ item.title }}\n @if (item.titleMono) {\n <code class=\"timeline__title-mono\">{{ item.titleMono }}</code>\n }\n </ng-template>\n @switch (headingLevel()) {\n @case (2) {\n <h2 class=\"timeline__title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></h2>\n }\n @case (3) {\n <h3 class=\"timeline__title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></h3>\n }\n @case (4) {\n <h4 class=\"timeline__title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></h4>\n }\n @case (5) {\n <h5 class=\"timeline__title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></h5>\n }\n @case (6) {\n <h6 class=\"timeline__title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></h6>\n }\n @default {\n <p class=\"timeline__title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></p>\n }\n }\n @if (item.badge) {\n <lc-badge size=\"xs\" [variant]=\"item.badgeVariant ?? 'default'\">{{\n item.badge\n }}</lc-badge>\n }\n @if (metaTemplate(); as metaTpl) {\n <span class=\"timeline__meta\">\n <ng-container\n [ngTemplateOutlet]=\"metaTpl.template\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </span>\n } @else if (item.meta) {\n <span class=\"timeline__meta\">{{ item.meta }}</span>\n }\n </div>\n @if (item.description) {\n <p class=\"timeline__description\">{{ item.description }}</p>\n }\n @if (item.timestamp) {\n <time class=\"timeline__timestamp\" [attr.datetime]=\"item.datetime ?? null\">{{ item.timestamp }}</time>\n }\n @if (contentTemplate(); as contentTpl) {\n <div class=\"timeline__body\">\n <ng-container\n [ngTemplateOutlet]=\"contentTpl.template\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </div>\n }\n </div>\n </li>\n }\n</ol>\n"],"mappings":";;;;;AA4BA,IAAa,2BAAb,MAAa,yBAAwB;CACnB,WA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AA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,wBAAwB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAG3B,qBAAqB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"lifecorner-angular-ui-kit-timeline.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/timeline/timeline-templates.directive.ts","../../../../libs/angular-ui-kit/src/lib/timeline/timeline.component.ts","../../../../libs/angular-ui-kit/src/lib/timeline/timeline.component.html"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport type { TimelineItem } from './timeline.component';\n\n/** Template context for the per-item timeline templates. */\nexport interface TimelineTemplateContext {\n $implicit: TimelineItem;\n}\n\n/**\n * Free content slot rendered below an entry's header line — arbitrary markup\n * per item (code block, prose, collapsible text, diff), not just a\n * description string. The template receives the item as `$implicit`.\n *\n * @example\n * ```html\n * <lc-timeline [items]=\"steps\">\n * <ng-template lcTimelineContent let-item>\n * @if (item.state === 'failed') {\n * <lc-code-block [code]=\"item.command\" language=\"bash\" />\n * }\n * </ng-template>\n * </lc-timeline>\n * ```\n */\n@Directive({\n selector: '[lcTimelineContent]',\n standalone: true,\n})\nexport class TimelineContentDirective {\n public readonly template = inject(TemplateRef<TimelineTemplateContext>);\n}\n\n/**\n * Live meta slot rendered right-aligned in an entry's header line — for\n * values the app keeps ticking itself (\"läuft seit 42 s\"). Takes precedence\n * over the item's static `meta` string.\n *\n * @example\n * ```html\n * <lc-timeline [items]=\"steps\">\n * <ng-template lcTimelineMeta let-item>\n * @if (item.state === 'running') { {{ elapsed() }} }\n * @else { {{ item.meta }} }\n * </ng-template>\n * </lc-timeline>\n * ```\n */\n@Directive({\n selector: '[lcTimelineMeta]',\n standalone: true,\n})\nexport class TimelineMetaDirective {\n public readonly template = inject(TemplateRef<TimelineTemplateContext>);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n contentChild,\n input,\n computed,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { IconComponent } from '@lifecorner/angular-ui-kit/icon';\nimport { BadgeComponent, BadgeVariant } from '@lifecorner/angular-ui-kit/badge';\nimport {\n TimelineContentDirective,\n TimelineMetaDirective,\n} from './timeline-templates.directive';\n\n/**\n * Semantic state of a timeline entry (e.g. one step of a run transcript).\n * Drives the marker color via the semantic tokens; `running` additionally\n * pulses (respecting `prefers-reduced-motion`).\n */\nexport type TimelineItemState = 'success' | 'running' | 'failed' | 'pending';\n\n/** Heading level of the item titles (3.3, G-11). */\nexport type TimelineHeadingLevel = 2 | 3 | 4 | 5 | 6;\n\nexport interface TimelineItem {\n /** Optional stable identity for rendering (falls back to the list index). */\n id?: string;\n /** Title of the event */\n title: string;\n /** Optional monospace suffix after the title (e.g. a tool id like `gate_test`). */\n titleMono?: string;\n /** Optional badge label in the header line (e.g. \"Fehlgeschlagen\"). */\n badge?: string;\n /** Variant of the header badge. @default 'default' */\n badgeVariant?: BadgeVariant;\n /** Optional right-aligned header meta (duration / time). */\n meta?: string;\n /** Optional description */\n description?: string;\n /** Optional timestamp string */\n timestamp?: string;\n /**\n * Machine-readable moment of the timestamp (ISO 8601, e.g.\n * `2026-10-12T18:05:00+02:00`), set as the `<time datetime>` attribute so\n * „heute 18:05“ carries its exact date (3.3, G-11).\n */\n datetime?: string;\n /** Optional icon name (heroicon) */\n icon?: string;\n /** Optional color for the dot/icon */\n color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';\n /**\n * Semantic entry state — colors the marker from the semantic tokens and\n * takes precedence over `color`. `running` pulses the marker.\n */\n state?: TimelineItemState;\n}\n\nexport type TimelineOrientation = 'vertical' | 'horizontal';\n\n/** Marker color class per entry state. */\nconst STATE_COLORS: Record<TimelineItemState, string> = {\n success: 'success',\n running: 'primary',\n failed: 'error',\n pending: 'neutral',\n};\n\n/**\n * Timeline component for chronological event display.\n *\n * Features:\n * - Vertical timeline with connecting line\n * - Semantic status colors per event (info, success, warning, error)\n * - Entry states (`success | running | failed | pending`); `running` pulses\n * - Composable header line: title + monospace suffix (`titleMono`) + badge\n * (`badge`/`badgeVariant`) + right-aligned meta (`meta` or the\n * `lcTimelineMeta` template for live values)\n * - Free content per entry below the header via the `lcTimelineContent`\n * template (code blocks, prose, diffs, …)\n * - Date and description display per item\n * - Icon support for timeline markers\n * - Dark mode support\n *\n * @example\n * ```html\n * <lc-timeline [items]=\"events\"></lc-timeline>\n * ```\n */\n@Component({\n selector: 'lc-timeline',\n standalone: true,\n imports: [IconComponent, BadgeComponent, NgTemplateOutlet],\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TimelineComponent {\n /**\n * List of timeline events.\n */\n items = input.required<TimelineItem[]>();\n\n /**\n * Layout orientation.\n * @default 'vertical'\n */\n orientation = input<TimelineOrientation>('vertical');\n\n /**\n * Compact mode reduces spacing.\n * @default false\n */\n compact = input<boolean>(false);\n\n /**\n * Heading level of the item titles (`h2`–`h6`), so each event is reachable\n * by heading navigation. Unset: a plain paragraph (3.2). Semantics only,\n * the look stays the same.\n */\n headingLevel = input<TimelineHeadingLevel | undefined>(undefined);\n\n /** Optional per-item content template (below the header line). */\n protected contentTemplate = contentChild(TimelineContentDirective);\n\n /** Optional per-item live meta template (right-aligned in the header). */\n protected metaTemplate = contentChild(TimelineMetaDirective);\n\n protected timelineClasses = computed(() => {\n return [\n 'timeline',\n `timeline--${this.orientation()}`,\n this.compact() ? 'timeline--compact' : '',\n ]\n .filter(Boolean)\n .join(' ');\n });\n\n protected markerClasses(item: TimelineItem): string {\n const color = item.state ? STATE_COLORS[item.state] : item.color || 'primary';\n return [\n 'timeline__marker',\n `timeline__marker--${color}`,\n item.state === 'running' ? 'timeline__marker--running' : '',\n ]\n .filter(Boolean)\n .join(' ');\n }\n}\n","<!-- An ordered list (3.3, G-11): the events have an order and a count. -->\n<ol [class]=\"timelineClasses()\">\n @for (item of items(); track item.id ?? $index; let last = $last) {\n <li class=\"timeline__item\" [class.timeline__item--last]=\"last\">\n <div [class]=\"markerClasses(item)\">\n @if (item.icon) {\n <lc-icon [name]=\"item.icon\" class=\"timeline__icon\" [decorative]=\"true\"></lc-icon>\n } @else {\n <span class=\"timeline__dot\"></span>\n }\n </div>\n @if (!last) {\n <div class=\"timeline__connector\"></div>\n }\n <div class=\"timeline__content\">\n <div class=\"timeline__header\">\n <ng-template #titleContent>\n {{ item.title }}\n @if (item.titleMono) {\n <code class=\"timeline__title-mono\">{{ item.titleMono }}</code>\n }\n </ng-template>\n @switch (headingLevel()) {\n @case (2) {\n <h2 class=\"timeline__title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></h2>\n }\n @case (3) {\n <h3 class=\"timeline__title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></h3>\n }\n @case (4) {\n <h4 class=\"timeline__title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></h4>\n }\n @case (5) {\n <h5 class=\"timeline__title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></h5>\n }\n @case (6) {\n <h6 class=\"timeline__title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></h6>\n }\n @default {\n <p class=\"timeline__title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></p>\n }\n }\n @if (item.badge) {\n <lc-badge size=\"xs\" [variant]=\"item.badgeVariant ?? 'default'\">{{\n item.badge\n }}</lc-badge>\n }\n @if (metaTemplate(); as metaTpl) {\n <span class=\"timeline__meta\">\n <ng-container\n [ngTemplateOutlet]=\"metaTpl.template\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </span>\n } @else if (item.meta) {\n <span class=\"timeline__meta\">{{ item.meta }}</span>\n }\n </div>\n @if (item.description) {\n <p class=\"timeline__description\">{{ item.description }}</p>\n }\n @if (item.timestamp) {\n <time class=\"timeline__timestamp\" [attr.datetime]=\"item.datetime ?? null\">{{ item.timestamp }}</time>\n }\n @if (contentTemplate(); as contentTpl) {\n <div class=\"timeline__body\">\n <ng-container\n [ngTemplateOutlet]=\"contentTpl.template\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </div>\n }\n </div>\n </li>\n }\n</ol>\n"],"mappings":";;;;;AA4BA,IAAa,2BAAb,MAAa,yBAAwB;CACnB,WAAW,OAAO,WAAoC;CAD3D,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAwB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAxB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAwB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAAxB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAwB,YAAA,CAAA;EAJpC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,YAAY;EACb,CAAA;;;AAwBD,IAAa,wBAAb,MAAa,sBAAqB;CAChB,WAAW,OAAO,WAAoC;CAD3D,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAqB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAArB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAqB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAArB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,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AAM,UAAA;GAAA,QAAA,CAAA,ozJAAA;EAAA,CAAA;CA4BN,CAAA;CAAA,gBAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,wBAAwB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAG3B,qBAAqB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@ export type BadgeSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
|
8
8
|
* - Semantic color variants (primary, secondary, success, warning, error, info, neutral)
|
|
9
9
|
* - Multiple size options (xs, sm, md, lg)
|
|
10
10
|
* - Pill-shaped rounded mode
|
|
11
|
+
* - Optional wrapping for long, sentence-like labels (`wrap`)
|
|
11
12
|
* - Content projection for labels or count values
|
|
12
13
|
*
|
|
13
14
|
* @example
|
|
@@ -29,6 +30,16 @@ export declare class BadgeComponent {
|
|
|
29
30
|
* @default false
|
|
30
31
|
*/
|
|
31
32
|
dot: import("@angular/core").InputSignal<boolean>;
|
|
33
|
+
/**
|
|
34
|
+
* Let a long label wrap onto centred lines instead of staying on one line:
|
|
35
|
+
* the fixed height becomes a minimum height, lines are 1.25 high, and the
|
|
36
|
+
* badge is never wider than its container (a word wider than the container
|
|
37
|
+
* breaks). With `rounded`, the corners keep the one-line pill radius, so a
|
|
38
|
+
* two-line badge isn't clipped by half-circle ends. A label that fits looks
|
|
39
|
+
* as before. Use it for sentence-like status labels (SI-15), not for counts.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
wrap: import("@angular/core").InputSignal<boolean>;
|
|
32
43
|
/**
|
|
33
44
|
* Computed CSS classes for the badge
|
|
34
45
|
*/
|
|
@@ -55,5 +66,10 @@ export declare class BadgeComponent {
|
|
|
55
66
|
"required": false;
|
|
56
67
|
"isSignal": true;
|
|
57
68
|
};
|
|
69
|
+
"wrap": {
|
|
70
|
+
"alias": "wrap";
|
|
71
|
+
"required": false;
|
|
72
|
+
"isSignal": true;
|
|
73
|
+
};
|
|
58
74
|
}, {}, never, ["*"], true, never>;
|
|
59
75
|
}
|
|
@@ -139,6 +139,15 @@ export declare class ButtonComponent {
|
|
|
139
139
|
* cannot be disabled or busy — render plain text or an `lc-button` for those
|
|
140
140
|
* states. An `iconOnly` link needs an `aria-label`.
|
|
141
141
|
*
|
|
142
|
+
* CSS hook `--lc-btn-overflow-wrap` (`break-word | anywhere`, default
|
|
143
|
+
* `break-word`): `anywhere` lets a single word wider than the button's line
|
|
144
|
+
* break inside the word, so the button stays inside its container (WCAG 1.4.10
|
|
145
|
+
* at 320 px or 200 % text). Set it on the button, the `lc-button` host or an
|
|
146
|
+
* ancestor that is a wrapping row or a column. In a non-wrapping row it lets a
|
|
147
|
+
* one-word button shrink with its neighbours, which is why the default stays
|
|
148
|
+
* `break-word`. The kit sets it in `lc-footer`'s link row, the page-header
|
|
149
|
+
* actions and the next-step-card's narrow actions.
|
|
150
|
+
*
|
|
142
151
|
* @example
|
|
143
152
|
* ```html
|
|
144
153
|
* <a lcButton variant="primary" size="lg" href="/de/neuigkeiten">Schau uns beim Bauen zu</a>
|
|
@@ -123,15 +123,25 @@ export declare class IconComponent {
|
|
|
123
123
|
* - md: 24px (default)
|
|
124
124
|
* - lg: 32px
|
|
125
125
|
* - xl: 40px
|
|
126
|
+
*
|
|
127
|
+
* Set by the `icon-<size>` class in the component stylesheet; `lc-icon`
|
|
128
|
+
* writes no inline size (3.11.1).
|
|
126
129
|
* @default "md"
|
|
127
130
|
*/
|
|
128
131
|
readonly size: import("@angular/core").InputSignal<IconSize>;
|
|
129
132
|
/**
|
|
130
|
-
* Icon
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
133
|
+
* Icon colour. By default the icon takes the text colour of its parent
|
|
134
|
+
* (`currentColor`, through the stylesheet) and `lc-icon` renders **no
|
|
135
|
+
* `style` attribute**, so it works under a `style-src 'self'` CSP (3.11.1).
|
|
136
|
+
*
|
|
137
|
+
* Any other value, a CSS colour (`#FF5733`, `rgb(…)`) or a variable
|
|
138
|
+
* (`var(--color-primary-500)`), becomes the `<svg>`'s inline `color`, set
|
|
139
|
+
* through CSSOM, which such a CSP allows in the browser. In prerendered HTML
|
|
140
|
+
* it is a `style` attribute, which that CSP blocks until the app hydrates,
|
|
141
|
+
* so the icon shows the parent's colour until then. Under a strict CSP,
|
|
142
|
+
* colour the icon from your stylesheet instead: set `color` on `lc-icon` or
|
|
143
|
+
* on its parent. `currentColor` in any letter case, and an empty string,
|
|
144
|
+
* mean the default.
|
|
135
145
|
* @default "currentColor"
|
|
136
146
|
*/
|
|
137
147
|
readonly color: import("@angular/core").InputSignal<string>;
|
|
@@ -172,7 +182,8 @@ export declare class IconComponent {
|
|
|
172
182
|
*/
|
|
173
183
|
readonly iconPath: import("@angular/core").Signal<string>;
|
|
174
184
|
/**
|
|
175
|
-
* Computed size in pixels
|
|
185
|
+
* Computed size in pixels, for the svg's `width`/`height` attributes; the
|
|
186
|
+
* same values as the `icon-<size>` rules in icon.component.scss
|
|
176
187
|
* @internal
|
|
177
188
|
*/
|
|
178
189
|
readonly sizeInPixels: import("@angular/core").Signal<string>;
|
|
@@ -182,7 +193,8 @@ export declare class IconComponent {
|
|
|
182
193
|
*/
|
|
183
194
|
readonly computedClasses: import("@angular/core").Signal<string>;
|
|
184
195
|
/**
|
|
185
|
-
*
|
|
196
|
+
* The `color` input as handed to the svg: a custom value becomes its inline
|
|
197
|
+
* colour (CSSOM), the default writes nothing (see `decorateSvg`)
|
|
186
198
|
* @internal
|
|
187
199
|
*/
|
|
188
200
|
readonly colorStyle: import("@angular/core").Signal<string>;
|