@govnepal/ui 0.2.1 → 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.
Files changed (134) hide show
  1. package/dist/Accordion.d.ts +17 -0
  2. package/dist/Accordion.d.ts.map +1 -0
  3. package/dist/Accordion.js +19 -0
  4. package/dist/Accordion.js.map +1 -0
  5. package/dist/AddressBlock.d.ts +28 -0
  6. package/dist/AddressBlock.d.ts.map +1 -0
  7. package/dist/AddressBlock.js +10 -0
  8. package/dist/AddressBlock.js.map +1 -0
  9. package/dist/AmountInput.d.ts +18 -0
  10. package/dist/AmountInput.d.ts.map +1 -0
  11. package/dist/AmountInput.js +7 -0
  12. package/dist/AmountInput.js.map +1 -0
  13. package/dist/BackLink.d.ts +7 -0
  14. package/dist/BackLink.d.ts.map +1 -0
  15. package/dist/BackLink.js +14 -0
  16. package/dist/BackLink.js.map +1 -0
  17. package/dist/Breadcrumb.d.ts +16 -0
  18. package/dist/Breadcrumb.d.ts.map +1 -0
  19. package/dist/Breadcrumb.js +9 -0
  20. package/dist/Breadcrumb.js.map +1 -0
  21. package/dist/Card.d.ts +16 -0
  22. package/dist/Card.d.ts.map +1 -0
  23. package/dist/Card.js +7 -0
  24. package/dist/Card.js.map +1 -0
  25. package/dist/CharacterCount.d.ts +7 -0
  26. package/dist/CharacterCount.d.ts.map +1 -0
  27. package/dist/CharacterCount.js +26 -0
  28. package/dist/CharacterCount.js.map +1 -0
  29. package/dist/ConfirmationDialog.d.ts +24 -0
  30. package/dist/ConfirmationDialog.d.ts.map +1 -0
  31. package/dist/ConfirmationDialog.js +13 -0
  32. package/dist/ConfirmationDialog.js.map +1 -0
  33. package/dist/CookieBanner.d.ts +18 -0
  34. package/dist/CookieBanner.d.ts.map +1 -0
  35. package/dist/CookieBanner.js +9 -0
  36. package/dist/CookieBanner.js.map +1 -0
  37. package/dist/EmptyState.d.ts +13 -0
  38. package/dist/EmptyState.d.ts.map +1 -0
  39. package/dist/EmptyState.js +11 -0
  40. package/dist/EmptyState.js.map +1 -0
  41. package/dist/FileUpload.d.ts +19 -0
  42. package/dist/FileUpload.d.ts.map +1 -0
  43. package/dist/FileUpload.js +18 -0
  44. package/dist/FileUpload.js.map +1 -0
  45. package/dist/Footer.d.ts +22 -0
  46. package/dist/Footer.d.ts.map +1 -0
  47. package/dist/Footer.js +7 -0
  48. package/dist/Footer.js.map +1 -0
  49. package/dist/IconButton.d.ts +15 -0
  50. package/dist/IconButton.d.ts.map +1 -0
  51. package/dist/IconButton.js +6 -0
  52. package/dist/IconButton.js.map +1 -0
  53. package/dist/LoadingState.d.ts +17 -0
  54. package/dist/LoadingState.d.ts.map +1 -0
  55. package/dist/LoadingState.js +20 -0
  56. package/dist/LoadingState.js.map +1 -0
  57. package/dist/MaskedValue.d.ts +21 -0
  58. package/dist/MaskedValue.d.ts.map +1 -0
  59. package/dist/MaskedValue.js +18 -0
  60. package/dist/MaskedValue.js.map +1 -0
  61. package/dist/Modal.d.ts +18 -0
  62. package/dist/Modal.d.ts.map +1 -0
  63. package/dist/Modal.js +68 -0
  64. package/dist/Modal.js.map +1 -0
  65. package/dist/OfflineBanner.d.ts +11 -0
  66. package/dist/OfflineBanner.d.ts.map +1 -0
  67. package/dist/OfflineBanner.js +11 -0
  68. package/dist/OfflineBanner.js.map +1 -0
  69. package/dist/OtpInput.d.ts +21 -0
  70. package/dist/OtpInput.d.ts.map +1 -0
  71. package/dist/OtpInput.js +11 -0
  72. package/dist/OtpInput.js.map +1 -0
  73. package/dist/Pagination.d.ts +11 -0
  74. package/dist/Pagination.d.ts.map +1 -0
  75. package/dist/Pagination.js +26 -0
  76. package/dist/Pagination.js.map +1 -0
  77. package/dist/PasswordInput.d.ts +18 -0
  78. package/dist/PasswordInput.d.ts.map +1 -0
  79. package/dist/PasswordInput.js +18 -0
  80. package/dist/PasswordInput.js.map +1 -0
  81. package/dist/ProgressBar.d.ts +8 -0
  82. package/dist/ProgressBar.d.ts.map +1 -0
  83. package/dist/ProgressBar.js +18 -0
  84. package/dist/ProgressBar.js.map +1 -0
  85. package/dist/QrCode.d.ts +22 -0
  86. package/dist/QrCode.d.ts.map +1 -0
  87. package/dist/QrCode.js +6 -0
  88. package/dist/QrCode.js.map +1 -0
  89. package/dist/SearchBox.d.ts +16 -0
  90. package/dist/SearchBox.d.ts.map +1 -0
  91. package/dist/SearchBox.js +16 -0
  92. package/dist/SearchBox.js.map +1 -0
  93. package/dist/SessionTimeoutWarning.d.ts +17 -0
  94. package/dist/SessionTimeoutWarning.d.ts.map +1 -0
  95. package/dist/SessionTimeoutWarning.js +17 -0
  96. package/dist/SessionTimeoutWarning.js.map +1 -0
  97. package/dist/SkipLink.d.ts +6 -0
  98. package/dist/SkipLink.d.ts.map +1 -0
  99. package/dist/SkipLink.js +14 -0
  100. package/dist/SkipLink.js.map +1 -0
  101. package/dist/SummaryList.d.ts +18 -0
  102. package/dist/SummaryList.d.ts.map +1 -0
  103. package/dist/SummaryList.js +6 -0
  104. package/dist/SummaryList.js.map +1 -0
  105. package/dist/Table.d.ts +22 -0
  106. package/dist/Table.d.ts.map +1 -0
  107. package/dist/Table.js +6 -0
  108. package/dist/Table.js.map +1 -0
  109. package/dist/Tabs.d.ts +20 -0
  110. package/dist/Tabs.d.ts.map +1 -0
  111. package/dist/Tabs.js +38 -0
  112. package/dist/Tabs.js.map +1 -0
  113. package/dist/Tag.d.ts +11 -0
  114. package/dist/Tag.d.ts.map +1 -0
  115. package/dist/Tag.js +11 -0
  116. package/dist/Tag.js.map +1 -0
  117. package/dist/Textarea.d.ts +15 -0
  118. package/dist/Textarea.d.ts.map +1 -0
  119. package/dist/Textarea.js +13 -0
  120. package/dist/Textarea.js.map +1 -0
  121. package/dist/Toast.d.ts +11 -0
  122. package/dist/Toast.d.ts.map +1 -0
  123. package/dist/Toast.js +31 -0
  124. package/dist/Toast.js.map +1 -0
  125. package/dist/Toggle.d.ts +22 -0
  126. package/dist/Toggle.d.ts.map +1 -0
  127. package/dist/Toggle.js +9 -0
  128. package/dist/Toggle.js.map +1 -0
  129. package/dist/generated/statusTaxonomy.js +1 -1
  130. package/dist/index.d.ts +32 -0
  131. package/dist/index.d.ts.map +1 -1
  132. package/dist/index.js +38 -0
  133. package/dist/index.js.map +1 -1
  134. 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,KAA4B,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,GAAG,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;IAC/E,OAAO,CACL,oBAAU,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,aACnD,iBAAQ,SAAS,EAAC,kBAAkB,EAAC,KAAK,EAAE,EAAE,cAAc,EAAE,oBAAoB,EAAE,YAAG,MAAM,GAAU,EACvG,MAAC,KAAK,IAAC,GAAG,EAAE,CAAC,aAEX,KAAC,MAAM,IAAC,KAAK,EAAC,UAAU,EAAC,WAAW,EAAC,sBAAsB,EAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,IAAI,EAAE,EACzG,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,GAAI,EACtF,KAAC,MAAM,IAAC,KAAK,EAAC,UAAU,EAAC,WAAW,EAAC,sBAAsB,EAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,IAAI,EAAE,EACzG,QAAQ,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,GAAI,EACnG,KAAC,MAAM,IAAC,KAAK,EAAC,mCAAmC,EAAC,WAAW,EAAC,yBAAyB,EAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,IAAI,EAAE,EACzI,QAAQ,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,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,7 @@
1
+ import type { AnchorHTMLAttributes, ReactNode } from "react";
2
+ interface BackLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
3
+ children?: ReactNode;
4
+ }
5
+ export declare function BackLink({ children, className, ...rest }: BackLinkProps): import("react").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=BackLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackLink.d.ts","sourceRoot":"","sources":["../src/BackLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAW7D,UAAU,aAAc,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACrE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa,+BAUvE"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from "./cx.js";
3
+ import { useTheme } from "./ThemeProvider.js";
4
+ /**
5
+ * Back link (components/back-link.md) — return to the previous step of a task flow without losing
6
+ * data (§7.1). Renders above the page heading. It is an <a> when it maps to a URL; the browser Back
7
+ * button must also keep working (§7.2) — this is the in-page mirror of it.
8
+ */
9
+ const LABEL = { ne: "पछाडि", en: "Back" };
10
+ export function BackLink({ children, className, ...rest }) {
11
+ const { language } = useTheme();
12
+ return (_jsxs("a", { className: cx("gov-link", "gov-link--back", className), ...rest, children: [_jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", "aria-hidden": "true", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("path", { d: "M15 6l-6 6 6 6" }) }), children ?? LABEL[language]] }));
13
+ }
14
+ //# sourceMappingURL=BackLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackLink.js","sourceRoot":"","sources":["../src/BackLink.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;;;GAIG;AACH,MAAM,KAAK,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAW,CAAC;AAMnD,MAAM,UAAU,QAAQ,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAiB;IACtE,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;IAChC,OAAO,CACL,aAAG,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,SAAS,CAAC,KAAM,IAAI,aACjE,cAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,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,YAC/J,eAAM,CAAC,EAAC,gBAAgB,GAAG,GACvB,EACL,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,IAC1B,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { ReactNode } from "react";
2
+ /**
3
+ * Breadcrumb (components/breadcrumb.md) — where a page sits in the site hierarchy, with links to
4
+ * ancestors. Web/desktop only (a linear task flow uses the stepper + back link, §7.2). The current
5
+ * page is the last crumb, marked aria-current and not a link; separators are decorative.
6
+ */
7
+ export interface Crumb {
8
+ label: ReactNode;
9
+ href?: string;
10
+ }
11
+ export declare function Breadcrumb({ items, label, className }: {
12
+ items: Crumb[];
13
+ label?: string;
14
+ className?: string;
15
+ }): import("react").JSX.Element;
16
+ //# sourceMappingURL=Breadcrumb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../src/Breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;GAIG;AACH,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,KAAoB,EAAE,SAAS,EAAE,EAAE;IAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BA0B5H"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from "./cx.js";
3
+ export function Breadcrumb({ items, label = "Breadcrumb", className }) {
4
+ return (_jsx("nav", { "aria-label": label, className: className, children: _jsx("ol", { className: "gov-breadcrumb", children: items.map((item, i) => {
5
+ const isLast = i === items.length - 1;
6
+ return (_jsxs("li", { style: { display: "inline-flex", alignItems: "center", gap: "var(--gov-space-2)" }, children: [i > 0 && (_jsx("span", { className: "gov-breadcrumb__sep", "aria-hidden": "true", children: "\u203A" })), isLast || !item.href ? (_jsx("span", { "aria-current": isLast ? "page" : undefined, children: item.label })) : (_jsx("a", { className: "gov-link", href: item.href, children: item.label }))] }, i));
7
+ }) }) }));
8
+ }
9
+ //# sourceMappingURL=Breadcrumb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.js","sourceRoot":"","sources":["../src/Breadcrumb.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAY7B,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,GAAG,YAAY,EAAE,SAAS,EAA0D;IAC3H,OAAO,CACL,4BAAiB,KAAK,EAAE,SAAS,EAAE,SAAS,YAC1C,aAAI,SAAS,EAAC,gBAAgB,YAC3B,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;gBACrB,MAAM,MAAM,GAAG,CAAC,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;gBACtC,OAAO,CACL,cAAY,KAAK,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,oBAAoB,EAAE,aAC3F,CAAC,GAAG,CAAC,IAAI,CACR,eAAM,SAAS,EAAC,qBAAqB,iBAAa,MAAM,uBAEjD,CACR,EACA,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CACtB,+BAAoB,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,YAAG,IAAI,CAAC,KAAK,GAAQ,CACrE,CAAC,CAAC,CAAC,CACF,YAAG,SAAS,EAAC,UAAU,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,YACpC,IAAI,CAAC,KAAK,GACT,CACL,KAZM,CAAC,CAaL,CACN,CAAC;YACJ,CAAC,CAAC,GACC,GACD,CACP,CAAC;AACJ,CAAC"}
package/dist/Card.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import type { ElementType, HTMLAttributes, ReactNode } from "react";
2
+ /**
3
+ * Card (components/card.md) — group everything about one subject into one opaque surface. The
4
+ * `interactive` variant makes the WHOLE card a single link; never nest independent links inside a
5
+ * clickable card (a nested-interactive failure), so interactive cards render an <a> and expect
6
+ * their content to be non-interactive.
7
+ */
8
+ interface CardProps extends HTMLAttributes<HTMLElement> {
9
+ interactive?: boolean;
10
+ href?: string;
11
+ as?: ElementType;
12
+ children: ReactNode;
13
+ }
14
+ export declare function Card({ interactive, href, as, className, children, ...rest }: CardProps): import("react").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=Card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../src/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGpE;;;;;GAKG;AACH,UAAU,SAAU,SAAQ,cAAc,CAAC,WAAW,CAAC;IACrD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,IAAI,CAAC,EAAE,WAAmB,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,+BAW9F"}
package/dist/Card.js ADDED
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cx } from "./cx.js";
3
+ export function Card({ interactive = false, href, as, className, children, ...rest }) {
4
+ const Tag = interactive ? "a" : (as ?? "div");
5
+ return (_jsx(Tag, { className: cx("gov-card", interactive && "gov-card--interactive", className), ...(interactive ? { href } : {}), ...rest, children: children }));
6
+ }
7
+ //# sourceMappingURL=Card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.js","sourceRoot":"","sources":["../src/Card.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAe7B,MAAM,UAAU,IAAI,CAAC,EAAE,WAAW,GAAG,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAa;IAC7F,MAAM,GAAG,GAAgB,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,CAAC,CAAC;IAC3D,OAAO,CACL,KAAC,GAAG,IACF,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,WAAW,IAAI,uBAAuB,EAAE,SAAS,CAAC,KACxE,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAC7B,IAAI,YAEP,QAAQ,GACL,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from "react";
2
+ export declare function CharacterCount({ current, max, id }: {
3
+ current: number;
4
+ max: number;
5
+ id?: string;
6
+ }): ReactNode;
7
+ //# sourceMappingURL=CharacterCount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CharacterCount.d.ts","sourceRoot":"","sources":["../src/CharacterCount.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAmB7G"}
@@ -0,0 +1,26 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { cx } from "./cx.js";
4
+ import { useTheme } from "./ThemeProvider.js";
5
+ /**
6
+ * Character count (components/character-count.md) — the remaining-characters message below a
7
+ * length-limited field, announced politely (aria-live="polite") so a screen reader hears it without
8
+ * interruption. Over the limit it uses the error style but never truncates the value.
9
+ */
10
+ const NE_DIGITS = ["०", "१", "२", "३", "४", "५", "६", "७", "८", "९"];
11
+ const toNe = (n) => String(Math.abs(n)).split("").map((d) => NE_DIGITS[Number(d)] ?? d).join("");
12
+ export function CharacterCount({ current, max, id }) {
13
+ const { language } = useTheme();
14
+ const remaining = max - current;
15
+ const over = remaining < 0;
16
+ const num = (n) => (language === "ne" ? toNe(n) : String(Math.abs(n)));
17
+ const message = over
18
+ ? language === "ne"
19
+ ? `${num(remaining)} अक्षर बढी छ`
20
+ : `${num(remaining)} characters too many`
21
+ : language === "ne"
22
+ ? `${num(remaining)} अक्षर बाँकी`
23
+ : `You have ${num(remaining)} characters remaining`;
24
+ return (_jsx("span", { id: id, className: cx("gov-character-count", over && "gov-character-count--over"), "aria-live": "polite", children: message }));
25
+ }
26
+ //# sourceMappingURL=CharacterCount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CharacterCount.js","sourceRoot":"","sources":["../src/CharacterCount.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;;;GAIG;AACH,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACrE,MAAM,IAAI,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEzG,MAAM,UAAU,cAAc,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAiD;IAChG,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;IAChC,MAAM,SAAS,GAAG,GAAG,GAAG,OAAO,CAAC;IAChC,MAAM,IAAI,GAAG,SAAS,GAAG,CAAC,CAAC;IAC3B,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/E,MAAM,OAAO,GAAG,IAAI;QAClB,CAAC,CAAC,QAAQ,KAAK,IAAI;YACjB,CAAC,CAAC,GAAG,GAAG,CAAC,SAAS,CAAC,cAAc;YACjC,CAAC,CAAC,GAAG,GAAG,CAAC,SAAS,CAAC,sBAAsB;QAC3C,CAAC,CAAC,QAAQ,KAAK,IAAI;YACjB,CAAC,CAAC,GAAG,GAAG,CAAC,SAAS,CAAC,cAAc;YACjC,CAAC,CAAC,YAAY,GAAG,CAAC,SAAS,CAAC,uBAAuB,CAAC;IAExD,OAAO,CACL,eAAM,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,IAAI,IAAI,2BAA2B,CAAC,eAAY,QAAQ,YACxG,OAAO,GACH,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { ReactNode } from "react";
2
+ /**
3
+ * Confirmation dialog (components/confirmation-dialog.md) — an explicit, informed confirmation before
4
+ * a high-risk or irreversible action (approve, reject, delete, submit, print, export — §9.1). Warning
5
+ * text alone is not a sufficient safeguard.
6
+ *
7
+ * Layers on Modal: role="alertdialog", focus starts on the SAFER (cancel) control, a destructive
8
+ * confirmation does not dismiss on scrim click, and the confirm button repeats the specific verb and
9
+ * object ("Reject application"). Nothing inside animates (§5.5).
10
+ */
11
+ interface ConfirmationDialogProps {
12
+ open: boolean;
13
+ onConfirm: () => void;
14
+ onCancel: () => void;
15
+ title: ReactNode;
16
+ children: ReactNode;
17
+ /** The confirm button label — the specific verb and object, e.g. "Reject application". */
18
+ confirmLabel: ReactNode;
19
+ cancelLabel?: ReactNode;
20
+ destructive?: boolean;
21
+ }
22
+ export declare function ConfirmationDialog({ open, onConfirm, onCancel, title, children, confirmLabel, cancelLabel, destructive, }: ConfirmationDialogProps): import("react").JSX.Element;
23
+ export {};
24
+ //# sourceMappingURL=ConfirmationDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../src/ConfirmationDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC;;;;;;;;GAQG;AACH,UAAU,uBAAuB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;IACpB,0FAA0F;IAC1F,YAAY,EAAE,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,WAAmB,GACpB,EAAE,uBAAuB,+BA2BzB"}
@@ -0,0 +1,13 @@
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 ConfirmationDialog({ open, onConfirm, onCancel, title, children, confirmLabel, cancelLabel, destructive = false, }) {
7
+ const { language } = useTheme();
8
+ const cancel = cancelLabel ?? (language === "ne" ? "रद्द गर्नुहोस्" : "Cancel");
9
+ return (_jsx(Modal, { open: open, onClose: onCancel, role: "alertdialog", title: title,
10
+ // A destructive decision must be read: no silent scrim dismissal.
11
+ dismissOnScrim: !destructive, actions: _jsxs(_Fragment, { children: [_jsx(Button, { variant: "secondary", type: "button", onClick: onCancel, children: cancel }), _jsx(Button, { variant: destructive ? "destructive" : "primary", type: "button", onClick: onConfirm, children: confirmLabel })] }), children: children }));
12
+ }
13
+ //# sourceMappingURL=ConfirmationDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmationDialog.js","sourceRoot":"","sources":["../src/ConfirmationDialog.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;AAuB9C,MAAM,UAAU,kBAAkB,CAAC,EACjC,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,WAAW,GAAG,KAAK,GACK;IACxB,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;IAChC,MAAM,MAAM,GAAG,WAAW,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAEhF,OAAO,CACL,KAAC,KAAK,IACJ,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAC,aAAa,EAClB,KAAK,EAAE,KAAK;QACZ,kEAAkE;QAClE,cAAc,EAAE,CAAC,WAAW,EAC5B,OAAO,EACL,8BAEE,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,QAAQ,YACxD,MAAM,GACA,EACT,KAAC,MAAM,IAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,EAAE,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,SAAS,YACvF,YAAY,GACN,IACR,YAGJ,QAAQ,GACH,CACT,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,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAkB9C,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAmB;IACnH,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;IAChC,MAAM,WAAW,GAAG,KAAK,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,EAAE,IAAI,WAAW,CAAC;IAClC,MAAM,MAAM,GAAG,GAAG,OAAO,OAAO,CAAC;IACjC,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IACvD,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5D,MAAM,IAAI,GACR,QAAQ,KAAK,IAAI;QACf,CAAC,CAAC,GAAG,KAAK,kBAAkB,KAAK,uBAAuB;QACxD,CAAC,CAAC,YAAY,KAAK,iBAAiB,KAAK,KAAK,CAAC;IAEnD,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,eAAM,SAAS,EAAC,iBAAiB,EAAC,EAAE,EAAE,MAAM,YAAG,IAAI,GAAQ,EAC3D,gBACE,EAAE,EAAE,OAAO,EACX,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,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,22 @@
1
+ import type { ReactNode } from "react";
2
+ /**
3
+ * Government footer (components/footer.md, identity/footer) — the standing trust cues on every page:
4
+ * owning office (Nepali-first), a REAL verifiable phone and address, and the required accessibility
5
+ * and report-a-problem links. Its absence is itself a phishing tell (§9.2). Two columns, collapsing
6
+ * to one on mobile. No language switcher — that lives once, in the header.
7
+ */
8
+ interface FooterProps {
9
+ officeNe: string;
10
+ officeEn: string;
11
+ phone: string;
12
+ address: string;
13
+ links?: {
14
+ label: ReactNode;
15
+ href: string;
16
+ }[];
17
+ copyright?: ReactNode;
18
+ className?: string;
19
+ }
20
+ export declare function Footer({ officeNe, officeEn, phone, address, links, copyright, className }: FooterProps): import("react").JSX.Element;
21
+ export {};
22
+ //# sourceMappingURL=Footer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../src/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;GAKG;AACH,UAAU,WAAW;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE,SAAS,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC7C,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAU,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,WAAW,+BA+B3G"}
package/dist/Footer.js ADDED
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from "./cx.js";
3
+ import { Container } from "./layout.js";
4
+ export function Footer({ officeNe, officeEn, phone, address, links = [], copyright, className }) {
5
+ return (_jsx("footer", { className: cx("gov-footer", className), role: "contentinfo", children: _jsx(Container, { children: _jsxs("div", { className: "gov-footer__grid", children: [_jsxs("div", { children: [_jsx("p", { style: { fontWeight: "var(--gov-font-weight-semibold)" }, lang: "ne", children: officeNe }), _jsx("p", { className: "gov-footer__office-en", lang: "en", children: officeEn }), _jsx("p", { children: phone }), _jsx("p", { children: address }), copyright && _jsx("p", { className: "gov-text-secondary gov-text-small", children: copyright })] }), links.length > 0 && (_jsx("ul", { className: "gov-footer__links", children: links.map((l, i) => (_jsx("li", { children: _jsx("a", { className: "gov-link", href: l.href, children: l.label }) }, i))) }))] }) }) }));
6
+ }
7
+ //# sourceMappingURL=Footer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.js","sourceRoot":"","sources":["../src/Footer.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAkBxC,MAAM,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,GAAG,EAAE,EAAE,SAAS,EAAE,SAAS,EAAe;IAC1G,OAAO,CACL,iBAAQ,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,EAAE,IAAI,EAAC,aAAa,YAChE,KAAC,SAAS,cACR,eAAK,SAAS,EAAC,kBAAkB,aAC/B,0BACE,YAAG,KAAK,EAAE,EAAE,UAAU,EAAE,iCAAiC,EAAE,EAAE,IAAI,EAAC,IAAI,YACnE,QAAQ,GACP,EACJ,YAAG,SAAS,EAAC,uBAAuB,EAAC,IAAI,EAAC,IAAI,YAC3C,QAAQ,GACP,EACJ,sBAAI,KAAK,GAAK,EACd,sBAAI,OAAO,GAAK,EACf,SAAS,IAAI,YAAG,SAAS,EAAC,mCAAmC,YAAE,SAAS,GAAK,IAC1E,EACL,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CACnB,aAAI,SAAS,EAAC,mBAAmB,YAC9B,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACnB,uBACE,YAAG,SAAS,EAAC,UAAU,EAAC,IAAI,EAAE,CAAC,CAAC,IAAI,YACjC,CAAC,CAAC,KAAK,GACN,IAHG,CAAC,CAIL,CACN,CAAC,GACC,CACN,IACG,GACI,GACL,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { ButtonHTMLAttributes, ReactNode } from "react";
2
+ /**
3
+ * Icon button (components/icon-button.md) — an icon-only action. The `label` is REQUIRED and becomes
4
+ * the accessible name: an icon button with no accessible name is unusable by a screen reader. Never
5
+ * a primary action (§5.4). The 44x44 hit area holds even though the icon is smaller.
6
+ */
7
+ interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> {
8
+ /** The action, e.g. "Close" — becomes the accessible name and (via title) the tooltip. */
9
+ label: string;
10
+ icon: ReactNode;
11
+ variant?: "default" | "ghost";
12
+ }
13
+ export declare function IconButton({ label, icon, variant, className, type, ...rest }: IconButtonProps): import("react").JSX.Element;
14
+ export {};
15
+ //# sourceMappingURL=IconButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../src/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG7D;;;;GAIG;AACH,UAAU,eAAgB,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC;IAC3F,0FAA0F;IAC1F,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAC/B;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,OAAmB,EAAE,SAAS,EAAE,IAAe,EAAE,GAAG,IAAI,EAAE,EAAE,eAAe,+BAcpH"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cx } from "./cx.js";
3
+ export function IconButton({ label, icon, variant = "default", className, type = "button", ...rest }) {
4
+ return (_jsx("button", { type: type, className: cx("gov-icon-button", variant !== "default" && `gov-icon-button--${variant}`, className), "aria-label": label, title: label, ...rest, children: _jsx("span", { className: "gov-icon-button__icon", "aria-hidden": "true", children: icon }) }));
5
+ }
6
+ //# sourceMappingURL=IconButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../src/IconButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAc7B,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,GAAG,SAAS,EAAE,SAAS,EAAE,IAAI,GAAG,QAAQ,EAAE,GAAG,IAAI,EAAmB;IACnH,OAAO,CACL,iBACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,OAAO,KAAK,SAAS,IAAI,oBAAoB,OAAO,EAAE,EAAE,SAAS,CAAC,gBACvF,KAAK,EACjB,KAAK,EAAE,KAAK,KACR,IAAI,YAER,eAAM,SAAS,EAAC,uBAAuB,iBAAa,MAAM,YACvD,IAAI,GACA,GACA,CACV,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"}