@govnepal/ui 0.3.0 → 0.4.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/dist/Accordion.d.ts +17 -0
- package/dist/Accordion.d.ts.map +1 -0
- package/dist/Accordion.js +19 -0
- package/dist/Accordion.js.map +1 -0
- package/dist/AddressBlock.d.ts +28 -0
- package/dist/AddressBlock.d.ts.map +1 -0
- package/dist/AddressBlock.js +10 -0
- package/dist/AddressBlock.js.map +1 -0
- package/dist/AmountInput.d.ts +18 -0
- package/dist/AmountInput.d.ts.map +1 -0
- package/dist/AmountInput.js +7 -0
- package/dist/AmountInput.js.map +1 -0
- package/dist/CookieBanner.d.ts +18 -0
- package/dist/CookieBanner.d.ts.map +1 -0
- package/dist/CookieBanner.js +9 -0
- package/dist/CookieBanner.js.map +1 -0
- package/dist/EmptyState.d.ts +13 -0
- package/dist/EmptyState.d.ts.map +1 -0
- package/dist/EmptyState.js +11 -0
- package/dist/EmptyState.js.map +1 -0
- package/dist/FileUpload.d.ts +19 -0
- package/dist/FileUpload.d.ts.map +1 -0
- package/dist/FileUpload.js +18 -0
- package/dist/FileUpload.js.map +1 -0
- package/dist/LoadingState.d.ts +17 -0
- package/dist/LoadingState.d.ts.map +1 -0
- package/dist/LoadingState.js +20 -0
- package/dist/LoadingState.js.map +1 -0
- package/dist/MaskedValue.d.ts +21 -0
- package/dist/MaskedValue.d.ts.map +1 -0
- package/dist/MaskedValue.js +18 -0
- package/dist/MaskedValue.js.map +1 -0
- package/dist/OfflineBanner.d.ts +11 -0
- package/dist/OfflineBanner.d.ts.map +1 -0
- package/dist/OfflineBanner.js +11 -0
- package/dist/OfflineBanner.js.map +1 -0
- package/dist/OtpInput.d.ts +21 -0
- package/dist/OtpInput.d.ts.map +1 -0
- package/dist/OtpInput.js +11 -0
- package/dist/OtpInput.js.map +1 -0
- package/dist/PasswordInput.d.ts +18 -0
- package/dist/PasswordInput.d.ts.map +1 -0
- package/dist/PasswordInput.js +18 -0
- package/dist/PasswordInput.js.map +1 -0
- package/dist/ProgressBar.d.ts +8 -0
- package/dist/ProgressBar.d.ts.map +1 -0
- package/dist/ProgressBar.js +18 -0
- package/dist/ProgressBar.js.map +1 -0
- package/dist/QrCode.d.ts +22 -0
- package/dist/QrCode.d.ts.map +1 -0
- package/dist/QrCode.js +6 -0
- package/dist/QrCode.js.map +1 -0
- package/dist/SearchBox.d.ts +16 -0
- package/dist/SearchBox.d.ts.map +1 -0
- package/dist/SearchBox.js +16 -0
- package/dist/SearchBox.js.map +1 -0
- package/dist/SessionTimeoutWarning.d.ts +17 -0
- package/dist/SessionTimeoutWarning.d.ts.map +1 -0
- package/dist/SessionTimeoutWarning.js +17 -0
- package/dist/SessionTimeoutWarning.js.map +1 -0
- package/dist/Table.d.ts +22 -0
- package/dist/Table.d.ts.map +1 -0
- package/dist/Table.js +6 -0
- package/dist/Table.js.map +1 -0
- package/dist/generated/statusTaxonomy.js +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Accordion (components/accordion.md) — several independent expandable sections of long content.
|
|
4
|
+
* Each header is a <button> with aria-expanded/aria-controls; focus stays on the header after
|
|
5
|
+
* toggling (never jumps into the revealed content). Multiple sections may be open. For a single
|
|
6
|
+
* inline aside, use Details instead.
|
|
7
|
+
*/
|
|
8
|
+
export interface AccordionSection {
|
|
9
|
+
id: string;
|
|
10
|
+
title: ReactNode;
|
|
11
|
+
content: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare function Accordion({ sections, className }: {
|
|
14
|
+
sections: AccordionSection[];
|
|
15
|
+
className?: string;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=Accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../src/Accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAqCtG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId, useState } from "react";
|
|
4
|
+
import { cx } from "./cx.js";
|
|
5
|
+
export function Accordion({ sections, className }) {
|
|
6
|
+
const baseId = useId();
|
|
7
|
+
const [open, setOpen] = useState(new Set());
|
|
8
|
+
const toggle = (id) => setOpen((prev) => {
|
|
9
|
+
const next = new Set(prev);
|
|
10
|
+
next.has(id) ? next.delete(id) : next.add(id);
|
|
11
|
+
return next;
|
|
12
|
+
});
|
|
13
|
+
return (_jsx("div", { className: cx("gov-accordion", className), children: sections.map((section) => {
|
|
14
|
+
const expanded = open.has(section.id);
|
|
15
|
+
const panelId = `${baseId}-${section.id}`;
|
|
16
|
+
return (_jsxs("div", { className: "gov-accordion__section", children: [_jsxs("button", { type: "button", className: "gov-accordion__header", "aria-expanded": expanded, "aria-controls": panelId, onClick: () => toggle(section.id), children: [section.title, _jsx("svg", { className: "gov-accordion__chevron", viewBox: "0 0 24 24", "aria-hidden": "true", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("path", { d: "M6 9l6 6 6-6" }) })] }), _jsx("div", { id: panelId, className: "gov-accordion__panel", hidden: !expanded, children: section.content })] }, section.id));
|
|
17
|
+
}) }));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=Accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../src/Accordion.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAc7B,MAAM,UAAU,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAwD;IACrG,MAAM,MAAM,GAAG,KAAK,EAAE,CAAC;IACvB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAc,IAAI,GAAG,EAAE,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,CAAC,EAAU,EAAE,EAAE,CAC5B,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACf,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IAEL,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC,YAC3C,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;YACxB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACtC,MAAM,OAAO,GAAG,GAAG,MAAM,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC;YAC1C,OAAO,CACL,eAAK,SAAS,EAAC,wBAAwB,aACrC,kBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,uBAAuB,mBAClB,QAAQ,mBACR,OAAO,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,aAEhC,OAAO,CAAC,KAAK,EACd,cAAK,SAAS,EAAC,wBAAwB,EAAC,OAAO,EAAC,WAAW,iBAAa,MAAM,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAE,CAAC,EAAE,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,YAC3K,eAAM,CAAC,EAAC,cAAc,GAAG,GACrB,IACC,EACT,cAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAC,sBAAsB,EAAC,MAAM,EAAE,CAAC,QAAQ,YACjE,OAAO,CAAC,OAAO,GACZ,KAfqC,OAAO,CAAC,EAAE,CAgBjD,CACP,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type SelectOption } from "./Select.js";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Address block (components/address-block.md) — a Nepal address as a cascading Province → District →
|
|
5
|
+
* Local level → Ward → Tole group. Each select is filtered by its parent (official lists,
|
|
6
|
+
* data/nepal-fields.yaml); changing a parent resets its children. Values are official codes, not
|
|
7
|
+
* free text. The app supplies the option lists and handles the cascade filtering.
|
|
8
|
+
*/
|
|
9
|
+
export interface AddressValue {
|
|
10
|
+
province?: string;
|
|
11
|
+
district?: string;
|
|
12
|
+
localLevel?: string;
|
|
13
|
+
ward?: string;
|
|
14
|
+
tole?: string;
|
|
15
|
+
}
|
|
16
|
+
interface AddressBlockProps {
|
|
17
|
+
legend: ReactNode;
|
|
18
|
+
value: AddressValue;
|
|
19
|
+
onChange: (next: AddressValue) => void;
|
|
20
|
+
provinces: SelectOption[];
|
|
21
|
+
/** Districts for the chosen province (app-filtered). */
|
|
22
|
+
districts: SelectOption[];
|
|
23
|
+
/** Local levels for the chosen district (app-filtered). */
|
|
24
|
+
localLevels: SelectOption[];
|
|
25
|
+
}
|
|
26
|
+
export declare function AddressBlock({ legend, value, onChange, provinces, districts, localLevels }: AddressBlockProps): import("react").JSX.Element;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=AddressBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddressBlock.d.ts","sourceRoot":"","sources":["../src/AddressBlock.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAGxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,iBAAiB;IACzB,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,wDAAwD;IACxD,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,2DAA2D;IAC3D,WAAW,EAAE,YAAY,EAAE,CAAC;CAC7B;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,iBAAiB,+BAkB7G"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Select } from "./Select.js";
|
|
4
|
+
import { TextInput } from "./TextInput.js";
|
|
5
|
+
import { Stack } from "./layout.js";
|
|
6
|
+
export function AddressBlock({ legend, value, onChange, provinces, districts, localLevels }) {
|
|
7
|
+
const set = (patch) => onChange({ ...value, ...patch });
|
|
8
|
+
return (_jsxs("fieldset", { style: { border: 0, padding: 0, margin: 0 }, children: [_jsx("legend", { className: "gov-field__label", style: { marginBlockEnd: "var(--gov-space-3)" }, children: legend }), _jsxs(Stack, { gap: 4, children: [_jsx(Select, { label: "Province", placeholder: "Select your province", options: provinces, value: value.province ?? "", onChange: (e) => set({ province: e.target.value, district: "", localLevel: "" }) }), _jsx(Select, { label: "District", placeholder: "Select your district", options: districts, value: value.district ?? "", disabled: !value.province, onChange: (e) => set({ district: e.target.value, localLevel: "" }) }), _jsx(Select, { label: "Municipality / Rural Municipality", placeholder: "Select your local level", options: localLevels, value: value.localLevel ?? "", disabled: !value.district, onChange: (e) => set({ localLevel: e.target.value }) }), _jsx(TextInput, { label: "Ward", widthChars: 2, inputMode: "numeric", value: value.ward ?? "", onChange: (e) => set({ ward: e.target.value }) }), _jsx(TextInput, { label: "Tole / street", value: value.tole ?? "", onChange: (e) => set({ tole: e.target.value }) })] })] }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=AddressBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddressBlock.js","sourceRoot":"","sources":["../src/AddressBlock.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AA4BpC,MAAM,UAAU,YAAY,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAqB;IAC5G,MAAM,GAAG,GAAG,CAAC,KA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AE,EAAE,CAAC,GAAG,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,GAAI,EACrF,KAAC,SAAS,IAAC,KAAK,EAAC,MAAM,EAAC,UAAU,EAAE,CAAC,EAAE,SAAS,EAAC,SAAS,EAAC,KAAK,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,GAAI,EACtI,KAAC,SAAS,IAAC,KAAK,EAAC,eAAe,EAAC,KAAK,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,GAAI,IACtG,IACC,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Amount input (components/amount-input.md) — a currency field with the रु prefix. Built on
|
|
4
|
+
* TextInput's prefixed variant. Grouping (१,५०,०००, lakh/crore) is presentation applied by the app
|
|
5
|
+
* on the displayed value; the submitted machine value stays Arabic digits ungrouped (§3.1). The रु
|
|
6
|
+
* prefix is context, never a value the citizen types or deletes.
|
|
7
|
+
*/
|
|
8
|
+
interface AmountInputProps {
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
id?: string;
|
|
11
|
+
hint?: ReactNode;
|
|
12
|
+
error?: ReactNode;
|
|
13
|
+
value?: string;
|
|
14
|
+
onChange?: (raw: string) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function AmountInput({ label, id, hint, error, value, onChange }: AmountInputProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=AmountInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AmountInput.d.ts","sourceRoot":"","sources":["../src/AmountInput.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;GAKG;AACH,UAAU,gBAAgB;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,gBAAgB,+BAcxF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { TextInput } from "./TextInput.js";
|
|
4
|
+
export function AmountInput({ label, id, hint, error, value, onChange }) {
|
|
5
|
+
return (_jsx(TextInput, { id: id, label: label, hint: hint, error: error, prefix: "\u0930\u0941", inputMode: "numeric", widthChars: 10, value: value, onChange: (e) => onChange?.(e.target.value.replace(/[^\d]/g, "")) }));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=AmountInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AmountInput.js","sourceRoot":"","sources":["../src/AmountInput.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAkB3C,MAAM,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAoB;IACvF,OAAO,CACL,KAAC,SAAS,IACR,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,MAAM,EAAC,cAAI,EACX,SAAS,EAAC,SAAS,EACnB,UAAU,EAAE,EAAE,EACd,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,GACjE,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Cookie consent banner (components/cookie-banner.md) — opt-in consent for NON-essential cookies
|
|
4
|
+
* only (§9.1.2). Reject is exactly as prominent as Accept — no dark patterns. Non-blocking: it does
|
|
5
|
+
* not wall off public information, and the choice is revisitable from the footer (the app persists
|
|
6
|
+
* it). Strictly necessary cookies never trigger this.
|
|
7
|
+
*/
|
|
8
|
+
interface CookieBannerProps {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
onAccept: () => void;
|
|
11
|
+
onReject: () => void;
|
|
12
|
+
acceptLabel?: ReactNode;
|
|
13
|
+
rejectLabel?: ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function CookieBanner({ children, onAccept, onReject, acceptLabel, rejectLabel, className }: CookieBannerProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=CookieBanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CookieBanner.d.ts","sourceRoot":"","sources":["../src/CookieBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC;;;;;GAKG;AACH,UAAU,iBAAiB;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAwC,EAAE,WAAsB,EAAE,SAAS,EAAE,EAAE,iBAAiB,+BAe5J"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cx } from "./cx.js";
|
|
4
|
+
import { Container } from "./layout.js";
|
|
5
|
+
import { Button } from "./Button.js";
|
|
6
|
+
export function CookieBanner({ children, onAccept, onReject, acceptLabel = "Accept analytics cookies", rejectLabel = "Reject", className }) {
|
|
7
|
+
return (_jsx("div", { className: cx("gov-cookie-banner", className), role: "region", "aria-label": "Cookie consent", children: _jsx(Container, { children: _jsxs("div", { className: "gov-cookie-banner__inner", children: [_jsx("div", { children: children }), _jsxs("div", { className: "gov-cookie-banner__actions", children: [_jsx(Button, { variant: "secondary", type: "button", onClick: onReject, children: rejectLabel }), _jsx(Button, { variant: "secondary", type: "button", onClick: onAccept, children: acceptLabel })] })] }) }) }));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=CookieBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CookieBanner.js","sourceRoot":"","sources":["../src/CookieBanner.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAiBrC,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,GAAG,0BAA0B,EAAE,WAAW,GAAG,QAAQ,EAAE,SAAS,EAAqB;IAC3J,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,mBAAmB,EAAE,SAAS,CAAC,EAAE,IAAI,EAAC,QAAQ,gBAAY,gBAAgB,YAC3F,KAAC,SAAS,cACR,eAAK,SAAS,EAAC,0BAA0B,aACvC,wBAAM,QAAQ,GAAO,EAErB,eAAK,SAAS,EAAC,4BAA4B,aACzC,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,QAAQ,YAAG,WAAW,GAAU,EACnF,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,QAAQ,YAAG,WAAW,GAAU,IAC/E,IACF,GACI,GACR,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Empty state (components/empty-state.md) — explain why a list/results area is empty and what to do
|
|
4
|
+
* next. Never shown during loading (that is LoadingState); never a bare "No data". Distinguish
|
|
5
|
+
* no-data (nothing exists yet) from no-results (a filter excluded everything) via the message/action.
|
|
6
|
+
*/
|
|
7
|
+
export declare function EmptyState({ title, children, action, className }: {
|
|
8
|
+
title: ReactNode;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
action?: ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../src/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAQpJ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cx } from "./cx.js";
|
|
3
|
+
/**
|
|
4
|
+
* Empty state (components/empty-state.md) — explain why a list/results area is empty and what to do
|
|
5
|
+
* next. Never shown during loading (that is LoadingState); never a bare "No data". Distinguish
|
|
6
|
+
* no-data (nothing exists yet) from no-results (a filter excluded everything) via the message/action.
|
|
7
|
+
*/
|
|
8
|
+
export function EmptyState({ title, children, action, className }) {
|
|
9
|
+
return (_jsxs("div", { className: cx("gov-empty-state", className), children: [_jsx("p", { className: "gov-empty-state__title", children: title }), children && _jsx("p", { children: children }), action && _jsx("div", { className: "gov-empty-state__action", children: action })] }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../src/EmptyState.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAsF;IACnJ,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,aAC9C,YAAG,SAAS,EAAC,wBAAwB,YAAE,KAAK,GAAK,EAChD,QAAQ,IAAI,sBAAI,QAAQ,GAAK,EAC7B,MAAM,IAAI,cAAK,SAAS,EAAC,yBAAyB,YAAE,MAAM,GAAO,IAC9D,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* File upload (components/file-upload.md) — upload a document with the accepted types and size limit
|
|
4
|
+
* stated UP FRONT (before selection), via a real <input type="file"> with a bound label. Never a
|
|
5
|
+
* drag-only drop zone (§4.1 — no drag-only interactions). Errors say what to do, never "Error 413"
|
|
6
|
+
* (§3.1); the rest of the form is never lost on a failed upload (§7.1) — the app owns that.
|
|
7
|
+
*/
|
|
8
|
+
interface FileUploadProps {
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
id?: string;
|
|
11
|
+
/** e.g. ["jpg","png","pdf"] — stated before selection. */
|
|
12
|
+
accept?: string[];
|
|
13
|
+
maxMb?: number;
|
|
14
|
+
error?: ReactNode;
|
|
15
|
+
onSelect?: (file: File | null) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function FileUpload({ label, id, accept, maxMb, error, onSelect }: FileUploadProps): import("react").JSX.Element;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=FileUpload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../src/FileUpload.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9C;;;;;GAKG;AACH,UAAU,eAAe;IACvB,KAAK,EAAE,SAAS,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACxC;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAA8B,EAAE,KAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,eAAe,+BA2BpH"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from "react";
|
|
4
|
+
import { cx } from "./cx.js";
|
|
5
|
+
import { useTheme } from "./ThemeProvider.js";
|
|
6
|
+
export function FileUpload({ label, id, accept = ["jpg", "png", "pdf"], maxMb = 5, error, onSelect }) {
|
|
7
|
+
const { language } = useTheme();
|
|
8
|
+
const generatedId = useId();
|
|
9
|
+
const fieldId = id ?? generatedId;
|
|
10
|
+
const hintId = `${fieldId}-hint`;
|
|
11
|
+
const errorId = error ? `${fieldId}-error` : undefined;
|
|
12
|
+
const types = accept.map((t) => t.toUpperCase()).join(", ");
|
|
13
|
+
const hint = language === "ne"
|
|
14
|
+
? `${maxMb} MB भन्दा सानो ${types} फाइल अपलोड गर्नुहोस्`
|
|
15
|
+
: `Upload a ${types} smaller than ${maxMb} MB`;
|
|
16
|
+
return (_jsxs("div", { className: cx("gov-field", error ? "gov-field--error" : undefined), children: [_jsx("label", { className: "gov-field__label", htmlFor: fieldId, children: label }), _jsx("span", { className: "gov-field__hint", id: hintId, children: hint }), _jsx("input", { id: fieldId, type: "file", accept: accept.map((t) => `.${t}`).join(","), "aria-describedby": [hintId, errorId].filter(Boolean).join(" "), "aria-invalid": error ? true : undefined, onChange: (e) => onSelect?.(e.target.files?.[0] ?? null) }), error && _jsx("span", { className: "gov-field__error", id: errorId, children: error })] }));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=FileUpload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUpload.js","sourceRoot":"","sources":["../src/FileUpload.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,KAAK,EAAkB,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,C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EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,sBAC1B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,kBAC/C,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EACtC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GACxD,EACD,KAAK,IAAI,eAAM,SAAS,EAAC,kBAAkB,EAAC,EAAE,EAAE,OAAO,YAAG,KAAK,GAAQ,IACpE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loading state (components/loading-state.md) — content is on its way. Announced via role="status"
|
|
3
|
+
* with an accessible name; the animation is the one sanctioned continuous loop (§5.5) and collapses
|
|
4
|
+
* under reduced-motion (the status is still announced, so no information is lost). For a known-length
|
|
5
|
+
* operation with a percentage, use ProgressBar instead.
|
|
6
|
+
*/
|
|
7
|
+
export declare function LoadingState({ label, className }: {
|
|
8
|
+
label?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
/** A skeleton placeholder shaped like the incoming content (pulses no faster than slow, §5.5). */
|
|
12
|
+
export declare function Skeleton({ width, height, className }: {
|
|
13
|
+
width?: string;
|
|
14
|
+
height?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=LoadingState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingState.d.ts","sourceRoot":"","sources":["../src/LoadingState.tsx"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BASxF;AAED,kGAAkG;AAClG,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAc,EAAE,SAAS,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAErH"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cx } from "./cx.js";
|
|
4
|
+
import { useTheme } from "./ThemeProvider.js";
|
|
5
|
+
/**
|
|
6
|
+
* Loading state (components/loading-state.md) — content is on its way. Announced via role="status"
|
|
7
|
+
* with an accessible name; the animation is the one sanctioned continuous loop (§5.5) and collapses
|
|
8
|
+
* under reduced-motion (the status is still announced, so no information is lost). For a known-length
|
|
9
|
+
* operation with a percentage, use ProgressBar instead.
|
|
10
|
+
*/
|
|
11
|
+
export function LoadingState({ label, className }) {
|
|
12
|
+
const { language } = useTheme();
|
|
13
|
+
const text = label ?? (language === "ne" ? "लोड हुँदै…" : "Loading…");
|
|
14
|
+
return (_jsxs("div", { className: cx("gov-loading", className), role: "status", children: [_jsx("span", { className: "gov-spinner", "aria-hidden": "true" }), _jsx("span", { className: "gov-visually-hidden", children: text })] }));
|
|
15
|
+
}
|
|
16
|
+
/** A skeleton placeholder shaped like the incoming content (pulses no faster than slow, §5.5). */
|
|
17
|
+
export function Skeleton({ width, height = "1em", className }) {
|
|
18
|
+
return _jsx("span", { className: cx("gov-skeleton", className), "aria-hidden": "true", style: { display: "block", inlineSize: width, blockSize: height } });
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=LoadingState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingState.js","sourceRoot":"","sources":["../src/LoadingState.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,EAAE,KAAK,EAAE,SAAS,EAA0C;IACvF,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;IAChC,MAAM,IAAI,GAAG,KAAK,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IACtE,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,SAAS,CAAC,EAAE,IAAI,EAAC,QAAQ,aACzD,eAAM,SAAS,EAAC,aAAa,iBAAa,MAAM,GAAG,EACnD,eAAM,SAAS,EAAC,qBAAqB,YAAE,IAAI,GAAQ,IAC/C,CACP,CAAC;AACJ,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,EAAE,SAAS,EAA2D;IACpH,OAAO,eAAM,SAAS,EAAE,EAAE,CAAC,cAAc,EAAE,SAAS,CAAC,iBAAc,MAAM,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,GAAI,CAAC;AAClJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Masked value (components/masked-value.md) — a sensitive identifier masked by default, revealed
|
|
3
|
+
* only by an explicit, permission-gated, audited action (§9.1). The reveal control is present only
|
|
4
|
+
* when `canReveal` is true (the role check happens in the app), and `onReveal` records the audit
|
|
5
|
+
* event. The masked state is announced as masked, not read digit by digit.
|
|
6
|
+
*/
|
|
7
|
+
interface MaskedValueProps {
|
|
8
|
+
value: string;
|
|
9
|
+
/** How many trailing characters to show, e.g. 4 → ••••2345. */
|
|
10
|
+
visibleChars?: number;
|
|
11
|
+
/** Whether the current user's role permits revealing (§9.1). */
|
|
12
|
+
canReveal?: boolean;
|
|
13
|
+
/** Called when revealed — record the audit event (who/when). */
|
|
14
|
+
onReveal?: () => void;
|
|
15
|
+
/** What is revealed, for the control's accessible name, e.g. "citizenship number". */
|
|
16
|
+
name: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function MaskedValue({ value, visibleChars, canReveal, onReveal, name, className }: MaskedValueProps): import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=MaskedValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaskedValue.d.ts","sourceRoot":"","sources":["../src/MaskedValue.tsx"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,YAAgB,EAAE,SAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,gBAAgB,+BA0BtH"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { cx } from "./cx.js";
|
|
5
|
+
import { useTheme } from "./ThemeProvider.js";
|
|
6
|
+
export function MaskedValue({ value, visibleChars = 4, canReveal = false, onReveal, name, className }) {
|
|
7
|
+
const { language } = useTheme();
|
|
8
|
+
const [revealed, setRevealed] = useState(false);
|
|
9
|
+
const masked = "••••" + value.slice(-visibleChars);
|
|
10
|
+
const show = language === "ne" ? `${name} देखाउनुहोस्` : `Show ${name}`;
|
|
11
|
+
const hide = language === "ne" ? `${name} लुकाउनुहोस्` : `Hide ${name}`;
|
|
12
|
+
return (_jsxs("span", { className: cx("gov-masked", className), children: [_jsx("span", { "aria-label": revealed ? undefined : `${name}, masked`, children: revealed ? value : masked }), canReveal && (_jsx("button", { type: "button", className: "gov-icon-button", "aria-label": revealed ? hide : show, "aria-pressed": revealed, onClick: () => {
|
|
13
|
+
if (!revealed)
|
|
14
|
+
onReveal?.();
|
|
15
|
+
setRevealed((r) => !r);
|
|
16
|
+
}, children: _jsx("span", { "aria-hidden": "true", children: revealed ? "🙈" : "👁" }) }))] }));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=MaskedValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaskedValue.js","sourceRoot":"","sources":["../src/MaskedValue.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAqB9C,MAAM,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,YAAY,GAAG,CAAC,EAAE,SAAS,GAAG,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAoB;IACrH,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;IAChC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC;IACnD,MAAM,IAAI,GAAG,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,cAAc,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC;IACxE,MAAM,IAAI,GAAG,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,cAAc,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC;IAExE,OAAO,CACL,gBAAM,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,aAC1C,6BAAkB,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,UAAU,YAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,GAAQ,EAC7F,SAAS,IAAI,CACZ,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,iBAAiB,gBACf,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,kBACpB,QAAQ,EACtB,OAAO,EAAE,GAAG,EAAE;oBACZ,IAAI,CAAC,QAAQ;wBAAE,QAAQ,EAAE,EAAE,CAAC;oBAC5B,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;gBACzB,CAAC,YAED,8BAAkB,MAAM,YAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAQ,GACjD,CACV,IACI,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Offline banner (components/offline-banner.md) — the connection is lost; state what still works and
|
|
4
|
+
* how retry behaves (§8.1.2). Announced politely on appear; never colour alone — the sentence
|
|
5
|
+
* carries the meaning (§4.1). Driven by real connectivity detection in the app; never a dead end.
|
|
6
|
+
*/
|
|
7
|
+
export declare function OfflineBanner({ children, className }: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=OfflineBanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OfflineBanner.d.ts","sourceRoot":"","sources":["../src/OfflineBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BASjG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cx } from "./cx.js";
|
|
3
|
+
/**
|
|
4
|
+
* Offline banner (components/offline-banner.md) — the connection is lost; state what still works and
|
|
5
|
+
* how retry behaves (§8.1.2). Announced politely on appear; never colour alone — the sentence
|
|
6
|
+
* carries the meaning (§4.1). Driven by real connectivity detection in the app; never a dead end.
|
|
7
|
+
*/
|
|
8
|
+
export function OfflineBanner({ children, className }) {
|
|
9
|
+
return (_jsxs("div", { className: cx("gov-offline-banner", className), role: "status", "aria-live": "polite", children: [_jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", "aria-hidden": "true", fill: "currentColor", children: _jsx("path", { d: "M12 2a10 10 0 100 20 10 10 0 000-20zm-1 5h2v6h-2V7zm0 8h2v2h-2v-2z" }) }), _jsx("span", { children: children })] }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=OfflineBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OfflineBanner.js","sourceRoot":"","sources":["../src/OfflineBanner.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,EAAE,QAAQ,EAAE,SAAS,EAA+C;IAChG,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE,SAAS,CAAC,EAAE,IAAI,EAAC,QAAQ,eAAW,QAAQ,aACnF,cAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,iBAAa,MAAM,EAAC,IAAI,EAAC,cAAc,YACpF,eAAM,CAAC,EAAC,oEAAoE,GAAG,GAC3E,EACN,yBAAO,QAAQ,GAAQ,IACnB,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* One-time-code input (components/otp-input.md) — enter a short SMS code. A single accessible field
|
|
4
|
+
* with autocomplete="one-time-code" and inputmode="numeric" so the OS offers autofill and pasting
|
|
5
|
+
* the whole code fills it. The resend control is disabled with a countdown; never allow instant
|
|
6
|
+
* infinite resend. A non-SMS fallback path is the app's responsibility (§8.1.6, citizens abroad).
|
|
7
|
+
*/
|
|
8
|
+
interface OtpInputProps {
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
id?: string;
|
|
11
|
+
length?: number;
|
|
12
|
+
error?: ReactNode;
|
|
13
|
+
value?: string;
|
|
14
|
+
onChange?: (code: string) => void;
|
|
15
|
+
/** Seconds until resend is allowed; the control is disabled until 0. */
|
|
16
|
+
resendIn?: number;
|
|
17
|
+
onResend?: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function OtpInput({ label, id, length, error, value, onChange, resendIn, onResend }: OtpInputProps): import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=OtpInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OtpInput.d.ts","sourceRoot":"","sources":["../src/OtpInput.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG9C;;;;;GAKG;AACH,UAAU,aAAa;IACrB,KAAK,EAAE,SAAS,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAY,EAAE,QAAQ,EAAE,EAAE,aAAa,+BA0BhH"}
|
package/dist/OtpInput.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from "react";
|
|
4
|
+
import { cx } from "./cx.js";
|
|
5
|
+
export function OtpInput({ label, id, length = 6, error, value, onChange, resendIn = 0, onResend }) {
|
|
6
|
+
const generatedId = useId();
|
|
7
|
+
const fieldId = id ?? generatedId;
|
|
8
|
+
const errorId = error ? `${fieldId}-error` : undefined;
|
|
9
|
+
return (_jsxs("div", { className: cx("gov-field", error ? "gov-field--error" : undefined), children: [_jsx("label", { className: "gov-field__label", htmlFor: fieldId, children: label }), _jsx("input", { id: fieldId, className: "gov-input gov-input--masked", style: { inlineSize: `${length + 4}ch` }, inputMode: "numeric", autoComplete: "one-time-code", maxLength: length, value: value, "aria-invalid": error ? true : undefined, "aria-describedby": errorId, onChange: (e) => onChange?.(e.target.value.replace(/[^\d]/g, "").slice(0, length)) }), _jsxs("button", { type: "button", className: "gov-link", disabled: resendIn > 0, onClick: onResend, style: { background: "none", border: 0, padding: 0, cursor: resendIn > 0 ? "not-allowed" : "pointer" }, children: ["Resend code", resendIn > 0 ? ` (available in ${resendIn}s)` : ""] }), error && _jsx("span", { className: "gov-field__error", id: errorId, children: error })] }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=OtpInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OtpInput.js","sourceRoot":"","sources":["../src/OtpInput.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,KAAK,EAAkB,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAoB7B,MAAM,UAAU,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAG,CAAC,EAAE,QAAQ,EAAiB;IAC/G,MAAM,WAAW,GAAG,KAAK,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,EAAE,IAAI,WAAW,CAAC;IAClC,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAEvD,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC,aACrE,gBAAO,SAAS,EAAC,kBAAkB,EAAC,OAAO,EAAE,OAAO,YAAG,KAAK,GAAS,EACrE,gBACE,EAAE,EAAE,OAAO,EACX,SAAS,EAAC,6BAA6B,EACvC,KAAK,EAAE,EAAE,UAAU,EAAE,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,EACxC,SAAS,EAAC,SAAS,EACnB,YAAY,EAAC,eAAe,EAC5B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,KAAK,kBACE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,sBACpB,OAAO,EACzB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAClF,EACF,kBAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,UAAU,EAAC,QAAQ,EAAE,QAAQ,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,EAAE,4BAC9K,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,kBAAkB,QAAQ,IAAI,CAAC,CAAC,CAAC,EAAE,IACvD,EACR,KAAK,IAAI,eAAM,SAAS,EAAC,kBAAkB,EAAC,EAAE,EAAE,OAAO,YAAG,KAAK,GAAQ,IACpE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type InputHTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Password input (components/password-input.md) — a password field with a show/hide toggle and NO
|
|
4
|
+
* paste-blocking (blocking paste breaks password managers and harms security, §4.1). The toggle is a
|
|
5
|
+
* real button whose accessible name reflects state (aria-pressed). Requirements are described up
|
|
6
|
+
* front via aria-describedby, never sprung as a post-submit gotcha.
|
|
7
|
+
*/
|
|
8
|
+
interface PasswordInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "id" | "type"> {
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
id?: string;
|
|
11
|
+
hint?: ReactNode;
|
|
12
|
+
error?: ReactNode;
|
|
13
|
+
/** current-password (sign-in) or new-password (create account) for manager integration. */
|
|
14
|
+
autoComplete?: "current-password" | "new-password";
|
|
15
|
+
}
|
|
16
|
+
export declare function PasswordInput({ label, id, hint, error, autoComplete, className, ...rest }: PasswordInputProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=PasswordInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordInput.d.ts","sourceRoot":"","sources":["../src/PasswordInput.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlF;;;;;GAKG;AACH,UAAU,kBAAmB,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC7F,KAAK,EAAE,SAAS,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,kBAAkB,GAAG,cAAc,CAAC;CACpD;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,YAAiC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,+BAqClI"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId, useState } from "react";
|
|
4
|
+
import { cx } from "./cx.js";
|
|
5
|
+
import { useTheme } from "./ThemeProvider.js";
|
|
6
|
+
export function PasswordInput({ label, id, hint, error, autoComplete = "current-password", className, ...rest }) {
|
|
7
|
+
const { language } = useTheme();
|
|
8
|
+
const generatedId = useId();
|
|
9
|
+
const fieldId = id ?? generatedId;
|
|
10
|
+
const hintId = hint ? `${fieldId}-hint` : undefined;
|
|
11
|
+
const errorId = error ? `${fieldId}-error` : undefined;
|
|
12
|
+
const describedBy = [hintId, errorId].filter(Boolean).join(" ") || undefined;
|
|
13
|
+
const [shown, setShown] = useState(false);
|
|
14
|
+
const show = language === "ne" ? "पासवर्ड देखाउनुहोस्" : "Show password";
|
|
15
|
+
const hide = language === "ne" ? "पासवर्ड लुकाउनुहोस्" : "Hide password";
|
|
16
|
+
return (_jsxs("div", { className: cx("gov-field", error ? "gov-field--error" : undefined), children: [_jsx("label", { className: "gov-field__label", htmlFor: fieldId, children: label }), hint && _jsx("span", { className: "gov-field__hint", id: hintId, children: hint }), _jsxs("span", { className: "gov-password", children: [_jsx("input", { id: fieldId, type: shown ? "text" : "password", className: cx("gov-input", className), autoComplete: autoComplete, "aria-describedby": describedBy, "aria-invalid": error ? true : undefined, ...rest }), _jsx("button", { type: "button", className: "gov-password__toggle", "aria-pressed": shown, "aria-label": shown ? hide : show, onClick: () => setShown((s) => !s), children: shown ? (language === "ne" ? "लुकाउनुहोस्" : "Hide") : (language === "ne" ? "देखाउनुहोस्" : "Show") })] }), error && (_jsxs("span", { className: "gov-field__error", id: errorId, children: [_jsx("svg", { className: "gov-field__error-icon", viewBox: "0 0 24 24", "aria-hidden": "true", fill: "currentColor", children: _jsx("path", { d: "M12 2a10 10 0 100 20 10 10 0 000-20zm-1 5h2v6h-2V7zm0 8h2v2h-2v-2z" }) }), error] }))] }));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=PasswordInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordInput.js","sourceRoot":"","sources":["../src/PasswordInput.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,KAAK,EAAE,QAAQ,EAA4C,MAAM,OAAO,CAAC;AAClF,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAiB9C,MAAM,UAAU,aAAa,CAAC,EAAE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AC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAqBpJ"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cx } from "./cx.js";
|
|
4
|
+
import { useTheme } from "./ThemeProvider.js";
|
|
5
|
+
/**
|
|
6
|
+
* Progress bar (components/progress-bar.md) — determinate progress with a text percentage for a
|
|
7
|
+
* known-length operation (an upload). role="progressbar" with the aria-value attributes; the number
|
|
8
|
+
* is shown as text as well as the bar (never conveyed by the bar alone, §4.1). Forward-only fill.
|
|
9
|
+
*/
|
|
10
|
+
const NE_DIGITS = ["०", "१", "२", "३", "४", "५", "६", "७", "८", "९"];
|
|
11
|
+
const toNe = (n) => String(n).split("").map((d) => NE_DIGITS[Number(d)] ?? d).join("");
|
|
12
|
+
export function ProgressBar({ value, max = 100, label, className }) {
|
|
13
|
+
const { language } = useTheme();
|
|
14
|
+
const pct = Math.round((value / max) * 100);
|
|
15
|
+
const pctText = language === "ne" ? `${toNe(pct)}%` : `${pct}%`;
|
|
16
|
+
return (_jsxs("div", { className: cx("gov-progress", className), children: [_jsx("div", { className: "gov-progress__track", role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max, "aria-label": typeof label === "string" ? label : undefined, children: _jsx("div", { className: "gov-progress__fill", style: { inlineSize: `${pct}%` } }) }), _jsxs("span", { className: "gov-progress__label", children: [label, " \u2014 ", pctText] })] }));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../src/ProgressBar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AA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AM,SAAS,EAAC,qBAAqB,aAClC,KAAK,cAAK,OAAO,IACb,IACH,CACP,CAAC;AACJ,CAAC"}
|
package/dist/QrCode.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QR code (components/qr-code.md) — a verification QR paired with the human-readable reference number
|
|
3
|
+
* beneath it, so a document is verifiable without a scanner (§9.1). The QR encodes a verification URL
|
|
4
|
+
* or reference only — never sensitive data (§5.6). The image is generated by the app/build (this
|
|
5
|
+
* component takes the produced image src) and its alt text says what scanning does, never "QR code".
|
|
6
|
+
*
|
|
7
|
+
* A build-time generator produces the QR image from the verification URL; this component renders it
|
|
8
|
+
* with the reference below. No client-side QR library is bundled.
|
|
9
|
+
*/
|
|
10
|
+
interface QrCodeProps {
|
|
11
|
+
/** The generated QR image (data URI or URL). Encodes the verification URL/reference only. */
|
|
12
|
+
src: string;
|
|
13
|
+
/** The same reference in human-readable form, shown beneath and used in the alt text. */
|
|
14
|
+
reference: string;
|
|
15
|
+
/** What scanning does, e.g. "Scan to verify this certificate". */
|
|
16
|
+
alt: string;
|
|
17
|
+
size?: number;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function QrCode({ src, reference, alt, size, className }: QrCodeProps): import("react").JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=QrCode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QrCode.d.ts","sourceRoot":"","sources":["../src/QrCode.tsx"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,UAAU,WAAW;IACnB,6FAA6F;IAC7F,GAAG,EAAE,MAAM,CAAC;IACZ,yFAAyF;IACzF,SAAS,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,MAAM,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,IAAU,EAAE,SAAS,EAAE,EAAE,WAAW,+BAOjF"}
|
package/dist/QrCode.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cx } from "./cx.js";
|
|
3
|
+
export function QrCode({ src, reference, alt, size = 120, className }) {
|
|
4
|
+
return (_jsxs("span", { className: cx("gov-qr", className), style: { display: "inline-flex", flexDirection: "column", alignItems: "center", gap: "var(--gov-space-2)" }, children: [_jsx("img", { src: src, alt: alt, width: size, height: size, style: { background: "#FFFFFF", padding: "var(--gov-space-2)" } }), _jsx("code", { className: "gov-reference gov-text-small", children: reference })] }));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=QrCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QrCode.js","sourceRoot":"","sources":["../src/QrCode.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAsB7B,MAAM,UAAU,MAAM,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,GAAG,GAAG,EAAE,SAAS,EAAe;IAChF,OAAO,CACL,gBAAM,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,oBAAoB,EAAE,aACnJ,cAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,oBAAoB,EAAE,GAAI,EACvH,eAAM,SAAS,EAAC,8BAA8B,YAAE,SAAS,GAAQ,IAC5D,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type FormHTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Search box (components/search-box.md) — a labelled query field in a role="search" landmark. The
|
|
4
|
+
* label is real (a placeholder is not a label, §7.1); submitting is a real form submit so Enter
|
|
5
|
+
* works. The clear control (when present) is a labelled icon button.
|
|
6
|
+
*/
|
|
7
|
+
interface SearchBoxProps extends Omit<FormHTMLAttributes<HTMLFormElement>, "onSubmit"> {
|
|
8
|
+
label: ReactNode;
|
|
9
|
+
name?: string;
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
onSubmit?: (query: string) => void;
|
|
12
|
+
buttonLabel?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare function SearchBox({ label, name, defaultValue, onSubmit, buttonLabel, className, ...rest }: SearchBoxProps): import("react").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=SearchBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchBox.d.ts","sourceRoot":"","sources":["../src/SearchBox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,kBAAkB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvE;;;;GAIG;AACH,UAAU,cAAe,SAAQ,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC;IACpF,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,IAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,+BAuBvH"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from "react";
|
|
4
|
+
import { cx } from "./cx.js";
|
|
5
|
+
import { useTheme } from "./ThemeProvider.js";
|
|
6
|
+
export function SearchBox({ label, name = "q", defaultValue, onSubmit, buttonLabel, className, ...rest }) {
|
|
7
|
+
const { language } = useTheme();
|
|
8
|
+
const fieldId = useId();
|
|
9
|
+
const submit = buttonLabel ?? (language === "ne" ? "खोज्नुहोस्" : "Search");
|
|
10
|
+
return (_jsxs("form", { role: "search", className: cx("gov-search-field", className), onSubmit: (e) => {
|
|
11
|
+
e.preventDefault();
|
|
12
|
+
const value = new FormData(e.currentTarget).get(name);
|
|
13
|
+
onSubmit?.(typeof value === "string" ? value : "");
|
|
14
|
+
}, ...rest, children: [_jsx("label", { className: "gov-field__label", htmlFor: fieldId, children: label }), _jsxs("span", { className: "gov-search", children: [_jsx("input", { id: fieldId, name: name, type: "search", className: "gov-input", defaultValue: defaultValue }), _jsx("button", { type: "submit", className: "gov-button gov-button--primary", children: submit })] })] }));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=SearchBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchBox.js","sourceRoot":"","sources":["../src/SearchBox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,KAAK,EAA2C,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAe9C,MAAM,UAAU,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,GAAG,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,EAAkB;IACtH,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;IAChC,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IACxB,MAAM,MAAM,GAAG,WAAW,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAE5E,OAAO,CACL,gBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,EAAE,CAAC,kBAAkB,EAAE,SAAS,CAAC,EAC5C,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;YACd,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACtD,QAAQ,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACrD,CAAC,KACG,IAAI,aAER,gBAAO,SAAS,EAAC,kBAAkB,EAAC,OAAO,EAAE,OAAO,YAAG,KAAK,GAAS,EACrE,gBAAM,SAAS,EAAC,YAAY,aAC1B,gBAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,WAAW,EAAC,YAAY,EAAE,YAAY,GAAI,EAClG,iBAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,gCAAgC,YAAE,MAAM,GAAU,IAC7E,IACF,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session timeout warning (components/session-timeout-warning.md) — warn before an idle session ends,
|
|
3
|
+
* letting the user stay signed in without losing entered data (§9.1). Built on Modal as an
|
|
4
|
+
* alertdialog so it is announced; focus lands on "Stay signed in". The countdown is passed in and
|
|
5
|
+
* should be announced on a coarse interval by the app, not every second (which floods a screen
|
|
6
|
+
* reader). Entered data survives re-authentication (the app owns persistence).
|
|
7
|
+
*/
|
|
8
|
+
interface SessionTimeoutWarningProps {
|
|
9
|
+
open: boolean;
|
|
10
|
+
/** Seconds remaining, shown in the message. */
|
|
11
|
+
secondsLeft: number;
|
|
12
|
+
onStay: () => void;
|
|
13
|
+
onSignOut: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function SessionTimeoutWarning({ open, secondsLeft, onStay, onSignOut }: SessionTimeoutWarningProps): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=SessionTimeoutWarning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionTimeoutWarning.d.ts","sourceRoot":"","sources":["../src/SessionTimeoutWarning.tsx"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,UAAU,0BAA0B;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,+CAA+C;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,0BAA0B,+BA6BzG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Modal } from "./Modal.js";
|
|
4
|
+
import { Button } from "./Button.js";
|
|
5
|
+
import { useTheme } from "./ThemeProvider.js";
|
|
6
|
+
export function SessionTimeoutWarning({ open, secondsLeft, onStay, onSignOut }) {
|
|
7
|
+
const { language } = useTheme();
|
|
8
|
+
const minutes = Math.ceil(secondsLeft / 60);
|
|
9
|
+
const message = language === "ne"
|
|
10
|
+
? `तपाईंको सत्र लगभग ${minutes} मिनेटमा सकिन्छ। साइन इन रहनुहुन्छ?`
|
|
11
|
+
: `Your session will end in about ${minutes} minute${minutes === 1 ? "" : "s"}. Stay signed in?`;
|
|
12
|
+
const stay = language === "ne" ? "साइन इन रहनुहोस्" : "Stay signed in";
|
|
13
|
+
const out = language === "ne" ? "अहिले साइन आउट गर्नुहोस्" : "Sign out now";
|
|
14
|
+
const title = language === "ne" ? "सत्र सकिन लाग्यो" : "Your session is about to end";
|
|
15
|
+
return (_jsx(Modal, { open: open, onClose: onStay, role: "alertdialog", title: title, dismissOnScrim: false, actions: _jsxs(_Fragment, { children: [_jsx(Button, { type: "button", onClick: onStay, children: stay }), _jsx(Button, { variant: "secondary", type: "button", onClick: onSignOut, children: out })] }), children: message }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=SessionTimeoutWarning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionTimeoutWarning.js","sourceRoot":"","sources":["../src/SessionTimeoutWarning.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAiB9C,MAAM,UAAU,qBAAqB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAA8B;IACxG,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;IAChC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC;IAC5C,MAAM,OAAO,GACX,QAAQ,KAAK,IAAI;QACf,CAAC,CAAC,qBAAqB,OAAO,qCAAqC;QACnE,CAAC,CAAC,kCAAkC,OAAO,UAAU,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC;IACrG,MAAM,IAAI,GAAG,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,gBAAgB,CAAC;IACvE,MAAM,GAAG,GAAG,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,cAAc,CAAC;IAC5E,MAAM,KAAK,GAAG,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,8BAA8B,CAAC;IAEtF,OAAO,CACL,KAAC,KAAK,IACJ,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,EACf,IAAI,EAAC,aAAa,EAClB,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,KAAK,EACrB,OAAO,EACL,8BAEE,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,MAAM,YAAG,IAAI,GAAU,EACtD,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,SAAS,YAAG,GAAG,GAAU,IAC3E,YAGJ,OAAO,GACF,CACT,CAAC;AACJ,CAAC"}
|
package/dist/Table.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Table (components/table.md) — semantic rows/columns for comparison. A real <table> with
|
|
4
|
+
* <th scope> so each cell's row/column is announced; never a grid of divs. Numeric columns are
|
|
5
|
+
* right-aligned. On mobile, prefer cards when a table becomes unreadable (§7.3) — that is the
|
|
6
|
+
* consumer's layout choice, not something this component forces.
|
|
7
|
+
*/
|
|
8
|
+
export interface Column<T> {
|
|
9
|
+
key: string;
|
|
10
|
+
header: ReactNode;
|
|
11
|
+
render: (row: T) => ReactNode;
|
|
12
|
+
numeric?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function Table<T>({ caption, columns, rows, sticky, getRowKey, className }: {
|
|
15
|
+
caption?: ReactNode;
|
|
16
|
+
columns: Column<T>[];
|
|
17
|
+
rows: T[];
|
|
18
|
+
sticky?: boolean;
|
|
19
|
+
getRowKey: (row: T, index: number) => string | number;
|
|
20
|
+
className?: string;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../src/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;;GAKG;AACH,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE;IACjF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BA0BA"}
|
package/dist/Table.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cx } from "./cx.js";
|
|
3
|
+
export function Table({ caption, columns, rows, sticky, getRowKey, className }) {
|
|
4
|
+
return (_jsxs("table", { className: cx("gov-table", sticky && "gov-table--sticky", className), children: [caption && _jsx("caption", { children: caption }), _jsx("thead", { children: _jsx("tr", { children: columns.map((col) => (_jsx("th", { scope: "col", className: col.numeric ? "gov-table__num" : undefined, children: col.header }, col.key))) }) }), _jsx("tbody", { children: rows.map((row, i) => (_jsx("tr", { children: columns.map((col) => (_jsx("td", { className: col.numeric ? "gov-table__num" : undefined, children: col.render(row) }, col.key))) }, getRowKey(row, i)))) })] }));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=Table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../src/Table.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAe7B,MAAM,UAAU,KAAK,CAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAO9E;IACC,OAAO,CACL,iBAAO,SAAS,EAAE,EAAE,CAAC,WAAW,EAAE,MAAM,IAAI,mBAAmB,EAAE,SAAS,CAAC,aACxE,OAAO,IAAI,4BAAU,OAAO,GAAW,EACxC,0BACE,uBACG,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACpB,aAAkB,KAAK,EAAC,KAAK,EAAC,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,YAChF,GAAG,CAAC,MAAM,IADJ,GAAG,CAAC,GAAG,CAEX,CACN,CAAC,GACC,GACC,EACR,0BACG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CACpB,uBACG,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACpB,aAAkB,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,YACpE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,IADT,GAAG,CAAC,GAAG,CAEX,CACN,CAAC,IALK,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAMrB,CACN,CAAC,GACI,IACF,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// GENERATED from design-guidelines 0.2.0-dev (
|
|
1
|
+
// GENERATED from design-guidelines 0.2.0-dev (43560eec) — do not edit.
|
|
2
2
|
// Source: data/status-taxonomy.yaml (§7.3.2). Regenerate with build/generate.mjs.
|
|
3
3
|
export const STATUS_TAXONOMY = {
|
|
4
4
|
"draft": { label: "Draft", label_ne: "मस्यौदा", badge: "neutral", requiresAction: false },
|
package/dist/index.d.ts
CHANGED
|
@@ -43,5 +43,21 @@ export { Textarea } from "./Textarea.js";
|
|
|
43
43
|
export { CharacterCount } from "./CharacterCount.js";
|
|
44
44
|
export { SummaryList, type SummaryRow } from "./SummaryList.js";
|
|
45
45
|
export { Tag } from "./Tag.js";
|
|
46
|
+
export { Table, type Column } from "./Table.js";
|
|
47
|
+
export { EmptyState } from "./EmptyState.js";
|
|
48
|
+
export { LoadingState, Skeleton } from "./LoadingState.js";
|
|
49
|
+
export { ProgressBar } from "./ProgressBar.js";
|
|
50
|
+
export { Accordion, type AccordionSection } from "./Accordion.js";
|
|
51
|
+
export { PasswordInput } from "./PasswordInput.js";
|
|
52
|
+
export { OtpInput } from "./OtpInput.js";
|
|
53
|
+
export { AmountInput } from "./AmountInput.js";
|
|
54
|
+
export { SearchBox } from "./SearchBox.js";
|
|
55
|
+
export { FileUpload } from "./FileUpload.js";
|
|
56
|
+
export { AddressBlock, type AddressValue } from "./AddressBlock.js";
|
|
57
|
+
export { MaskedValue } from "./MaskedValue.js";
|
|
58
|
+
export { QrCode } from "./QrCode.js";
|
|
59
|
+
export { CookieBanner } from "./CookieBanner.js";
|
|
60
|
+
export { OfflineBanner } from "./OfflineBanner.js";
|
|
61
|
+
export { SessionTimeoutWarning } from "./SessionTimeoutWarning.js";
|
|
46
62
|
export { STATUS_TAXONOMY, type StatusId, type StatusEntry, type BadgeVariant } from "./generated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OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGpE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,+BAA+B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -47,5 +47,24 @@ export { Textarea } from "./Textarea.js";
|
|
|
47
47
|
export { CharacterCount } from "./CharacterCount.js";
|
|
48
48
|
export { SummaryList } from "./SummaryList.js";
|
|
49
49
|
export { Tag } from "./Tag.js";
|
|
50
|
+
// Data display
|
|
51
|
+
export { Table } from "./Table.js";
|
|
52
|
+
export { EmptyState } from "./EmptyState.js";
|
|
53
|
+
export { LoadingState, Skeleton } from "./LoadingState.js";
|
|
54
|
+
export { ProgressBar } from "./ProgressBar.js";
|
|
55
|
+
export { Accordion } from "./Accordion.js";
|
|
56
|
+
// Forms (batch B)
|
|
57
|
+
export { PasswordInput } from "./PasswordInput.js";
|
|
58
|
+
export { OtpInput } from "./OtpInput.js";
|
|
59
|
+
export { AmountInput } from "./AmountInput.js";
|
|
60
|
+
export { SearchBox } from "./SearchBox.js";
|
|
61
|
+
export { FileUpload } from "./FileUpload.js";
|
|
62
|
+
export { AddressBlock } from "./AddressBlock.js";
|
|
63
|
+
// Government / trust
|
|
64
|
+
export { MaskedValue } from "./MaskedValue.js";
|
|
65
|
+
export { QrCode } from "./QrCode.js";
|
|
66
|
+
export { CookieBanner } from "./CookieBanner.js";
|
|
67
|
+
export { OfflineBanner } from "./OfflineBanner.js";
|
|
68
|
+
export { SessionTimeoutWarning } from "./SessionTimeoutWarning.js";
|
|
50
69
|
export { STATUS_TAXONOMY } from "./generated/statusTaxonomy.js";
|
|
51
70
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,gGAAgG;AAChG,kGAAkG;AAClG,0FAA0F;AAC1F,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG7D,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAoB,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,YAAY,EAAmB,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM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AAqB,MAAM,mBAAmB,CAAC;AAEpE,qBAAqB;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAsD,MAAM,+BAA+B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@govnepal/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Civic Calm React components — the behavior layer (ARIA, keyboard, focus) over @govnepal/css.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"react-dom": ">=18"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@govnepal/css": "^0.
|
|
40
|
+
"@govnepal/css": "^0.4.0",
|
|
41
41
|
"@govnepal/tokens": "^0.2.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|