@muonroi/ui-engine-rule-components 0.1.27 → 0.1.29

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.
@@ -0,0 +1,35 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * mu-ba-status-badge — plain-language status pill for BA workspace documents.
4
+ *
5
+ * Renders a host-supplied label with a semantic tone keyed to the variant.
6
+ * Zero Vietnamese/Cát Lái strings are baked into this component (D-17/D-18).
7
+ * The host passes the display label as the `label` attribute.
8
+ *
9
+ * Variant → tone mapping (per UI-SPEC §Color):
10
+ * active → success (--mu-color-success-bg / --mu-color-success-text)
11
+ * pending → warning (--mu-color-warning-bg / --mu-color-warning-text)
12
+ * draft → info (--mu-color-info-bg / --mu-color-info-text)
13
+ * approved → info (quiet blue)
14
+ * rejected → error (--mu-color-error-bg / --mu-color-error-text)
15
+ * superseded → neutral (--mu-surface-raised + --mu-text-muted)
16
+ * rolledback → error
17
+ * unknown → neutral
18
+ *
19
+ * An unmapped variant still renders the supplied label (never blank — D-07).
20
+ *
21
+ * Threat T-19-01: label text bound via Lit html`` interpolation (auto-escaped); no unsafeHTML.
22
+ */
23
+ export declare class MuBaStatusBadge extends LitElement {
24
+ variant: string;
25
+ label: string;
26
+ render(): import("lit").TemplateResult<1>;
27
+ private _variantClass;
28
+ static styles: import("lit").CSSResult;
29
+ }
30
+ declare global {
31
+ interface HTMLElementTagNameMap {
32
+ "mu-ba-status-badge": MuBaStatusBadge;
33
+ }
34
+ }
35
+ //# sourceMappingURL=mu-ba-status-badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mu-ba-status-badge.d.ts","sourceRoot":"","sources":["../../../src/components/ba-status-badge/mu-ba-status-badge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBACa,eAAgB,SAAQ,UAAU;IACT,OAAO,SAAa;IACtB,KAAK,SAAM;IAE7C,MAAM;IAKN,OAAO,CAAC,aAAa;IAcrB,MAAM,CAAC,MAAM,0BAuCX;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,eAAe,CAAC;KACvC;CACF"}
@@ -0,0 +1,29 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * mu-coverage-badge — binary coverage pill + honest tooltip for BA workspace documents.
4
+ *
5
+ * Renders a host-supplied label with tone keyed to the `covered` boolean attribute.
6
+ * Zero Vietnamese/Cát Lái strings are baked into this component (D-17/D-18).
7
+ *
8
+ * covered=true → success family (--mu-color-success-bg / --mu-color-success-text)
9
+ * covered=false → muted neutral (--mu-surface-raised + --mu-text-muted + --mu-border-default)
10
+ * NEVER green for the untested state (D-08 honesty constraint).
11
+ *
12
+ * The `tooltip` attribute is bound to the native `title` attribute so the honest
13
+ * distinction between dry-run examples and real unit-test coverage is always accessible.
14
+ *
15
+ * Threat T-19-01: label/tooltip text bound via Lit html`` interpolation (auto-escaped); no unsafeHTML.
16
+ */
17
+ export declare class MuCoverageBadge extends LitElement {
18
+ covered: boolean;
19
+ label: string;
20
+ tooltip: string;
21
+ render(): import("lit").TemplateResult<1>;
22
+ static styles: import("lit").CSSResult;
23
+ }
24
+ declare global {
25
+ interface HTMLElementTagNameMap {
26
+ "mu-coverage-badge": MuCoverageBadge;
27
+ }
28
+ }
29
+ //# sourceMappingURL=mu-coverage-badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mu-coverage-badge.d.ts","sourceRoot":"","sources":["../../../src/components/coverage-badge/mu-coverage-badge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;;;;;;;;;;;;;GAcG;AACH,qBACa,eAAgB,SAAQ,UAAU;IACM,OAAO,UAAS;IACjC,KAAK,SAAM;IACT,OAAO,SAAM;IAEjD,MAAM;IAKN,MAAM,CAAC,MAAM,0BAyBX;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,mBAAmB,EAAE,eAAe,CAAC;KACtC;CACF"}
@@ -0,0 +1,65 @@
1
+ import { LitElement } from "lit";
2
+ import "../ba-status-badge/mu-ba-status-badge.js";
3
+ import "../source-badge/mu-source-badge.js";
4
+ import "../coverage-badge/mu-coverage-badge.js";
5
+ /**
6
+ * mu-document-list — BA workspace document list.
7
+ *
8
+ * Renders one row per supplied workflow, a search slot, a pending-count chip
9
+ * (null → "N/A", never "0" when null — D-06/honesty), and a single create CTA.
10
+ *
11
+ * Zero Vietnamese/Cát Lái strings are baked into this component (D-17/D-18).
12
+ * All copy arrives as attributes. Row data arrives as a JSON string in the `rows` attribute.
13
+ *
14
+ * Attributes:
15
+ * rows — JSON array of DocumentRow objects (string, parsed internally)
16
+ * pending-count — Number | null; null renders "N/A" in the count chip
17
+ * pending-label — label for the pending count chip (string)
18
+ * create-label — label for the create CTA button (string)
19
+ * search-placeholder — placeholder passed into the search slot (string; informational)
20
+ * heading — page heading text (string)
21
+ * empty — Boolean; when true, rows are suppressed (host shows empty-state instead)
22
+ *
23
+ * Events:
24
+ * document-create — CTA clicked; no detail (bubbles:true, composed:true)
25
+ * document-open — row clicked; detail: { path: string } (encodeURIComponent-safe)
26
+ *
27
+ * Composes mu-ba-status-badge, mu-source-badge, mu-coverage-badge per row.
28
+ *
29
+ * Threat T-20-01: all text bound via Lit html`` interpolation (auto-escaped); pendingLabel.replace()
30
+ * operates on a plain string then is interpolated — still escaped; no unsafeHTML (carried T-19-01).
31
+ * Threat T-20-02: producer (DocumentsPage.tsx:59) name-only encodes the workflow segment; component
32
+ * dispatches openPath verbatim — no whole-path re-encoding (ASVS V5 trust boundary at producer).
33
+ * Threat T-19-03: pending-count null → "N/A" (honesty; no sensitive data).
34
+ */
35
+ export interface DocumentRow {
36
+ workflowName: string;
37
+ statusLabel: string;
38
+ statusVariant: string;
39
+ sourceLabel: string;
40
+ covered: boolean;
41
+ coverageLabel: string;
42
+ coverageTooltip: string;
43
+ openPath: string;
44
+ }
45
+ export declare class MuDocumentList extends LitElement {
46
+ rows: string;
47
+ pendingCount: number | null;
48
+ pendingLabel: string;
49
+ createLabel: string;
50
+ searchPlaceholder: string;
51
+ heading: string;
52
+ empty: boolean;
53
+ private get _parsedRows();
54
+ private _dispatchCreate;
55
+ private _dispatchOpen;
56
+ private _renderRow;
57
+ render(): import("lit").TemplateResult<1>;
58
+ static styles: import("lit").CSSResult;
59
+ }
60
+ declare global {
61
+ interface HTMLElementTagNameMap {
62
+ "mu-document-list": MuDocumentList;
63
+ }
64
+ }
65
+ //# sourceMappingURL=mu-document-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mu-document-list.d.ts","sourceRoot":"","sources":["../../../src/components/document-list/mu-document-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAErD,OAAO,0CAA0C,CAAC;AAClD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,wCAAwC,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,qBACa,cAAe,SAAQ,UAAU;IACX,IAAI,SAAM;IACa,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IACjD,YAAY,SAAM;IACnB,WAAW,SAAM;IACX,iBAAiB,SAAM;IAClC,OAAO,SAAM;IACA,KAAK,UAAS;IAE/D,OAAO,KAAK,WAAW,GAQtB;IAED,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,UAAU;IAyBlB,MAAM;IAgCN,MAAM,CAAC,MAAM,0BA4GX;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
@@ -0,0 +1,33 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * mu-empty-state — short empty-state block for BA workspace documents.
4
+ *
5
+ * Renders one host-supplied line + a single CTA button + an optional tooltip.
6
+ * Zero Vietnamese/Cát Lái strings are baked into this component (D-17/D-18).
7
+ * All copy arrives as attributes from the host (D-12/D-13).
8
+ *
9
+ * Attributes:
10
+ * message — the primary empty-state line (string)
11
+ * cta-label — label for the single action button (string)
12
+ * tooltip — optional tooltip bound to title on the container (string)
13
+ *
14
+ * Events:
15
+ * empty-cta — dispatched (bubbles:true, composed:true) when the CTA is clicked.
16
+ * Pitfall 5: composed MANDATORY to cross the shadow boundary.
17
+ *
18
+ * Threat T-19-01: message/cta-label bound via Lit html`` (auto-escaped); no unsafeHTML.
19
+ */
20
+ export declare class MuEmptyState extends LitElement {
21
+ message: string;
22
+ ctaLabel: string;
23
+ tooltip: string;
24
+ private _handleCta;
25
+ render(): import("lit").TemplateResult<1>;
26
+ static styles: import("lit").CSSResult;
27
+ }
28
+ declare global {
29
+ interface HTMLElementTagNameMap {
30
+ "mu-empty-state": MuEmptyState;
31
+ }
32
+ }
33
+ //# sourceMappingURL=mu-empty-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mu-empty-state.d.ts","sourceRoot":"","sources":["../../../src/components/empty-state/mu-empty-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;;;;;;;;;;;;;;;;GAiBG;AACH,qBACa,YAAa,SAAQ,UAAU;IACN,OAAO,SAAM;IACX,QAAQ,SAAM;IAChB,OAAO,SAAM;IAEjD,OAAO,CAAC,UAAU;IASlB,MAAM;IAWN,MAAM,CAAC,MAAM,0BA4CX;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,YAAY,CAAC;KAChC;CACF"}
@@ -0,0 +1,25 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * mu-source-badge — source/provenance chip for BA workspace documents.
4
+ *
5
+ * Renders a host-supplied label as a neutral info chip.
6
+ * Zero Vietnamese/Cát Lái strings are baked into this component (D-17/D-18).
7
+ * The host passes the display label as the `label` attribute.
8
+ *
9
+ * Style: neutral info family (--mu-color-info-bg / --mu-color-info-text) per UI-SPEC §Color.
10
+ * Future provenance values (Phase 20) reuse the same neutral chip styling.
11
+ *
12
+ * Threat T-19-01: label text bound via Lit html`` interpolation (auto-escaped); no unsafeHTML.
13
+ */
14
+ export declare class MuSourceBadge extends LitElement {
15
+ label: string;
16
+ variant: string;
17
+ render(): import("lit").TemplateResult<1>;
18
+ static styles: import("lit").CSSResult;
19
+ }
20
+ declare global {
21
+ interface HTMLElementTagNameMap {
22
+ "mu-source-badge": MuSourceBadge;
23
+ }
24
+ }
25
+ //# sourceMappingURL=mu-source-badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mu-source-badge.d.ts","sourceRoot":"","sources":["../../../src/components/source-badge/mu-source-badge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;;;;;;;;;;GAWG;AACH,qBACa,aAAc,SAAQ,UAAU;IACT,KAAK,SAAM;IACT,OAAO,SAAa;IAExD,MAAM;IAIN,MAAM,CAAC,MAAM,0BAkBX;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}