@tomny-dev/uzi 0.14.0 → 0.15.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 (130) hide show
  1. package/dist/components/filter-workspace/FilterWorkspace.d.ts +40 -0
  2. package/dist/components/filter-workspace/FilterWorkspace.d.ts.map +1 -0
  3. package/dist/components/filter-workspace/FilterWorkspace.test.d.ts +2 -0
  4. package/dist/components/filter-workspace/FilterWorkspace.test.d.ts.map +1 -0
  5. package/dist/index.cjs +18 -14
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +16 -15
  9. package/dist/index57.js +21 -10
  10. package/dist/index57.js.map +1 -1
  11. package/dist/index58.cjs +30 -11
  12. package/dist/index58.cjs.map +1 -1
  13. package/dist/index58.js +101 -14
  14. package/dist/index58.js.map +1 -1
  15. package/dist/index59.cjs +104 -13
  16. package/dist/index59.cjs.map +1 -1
  17. package/dist/index59.js +10 -11
  18. package/dist/index59.js.map +1 -1
  19. package/dist/index60.cjs +11 -13
  20. package/dist/index60.cjs.map +1 -1
  21. package/dist/index60.js +13 -16
  22. package/dist/index60.js.map +1 -1
  23. package/dist/index61.cjs +13 -16
  24. package/dist/index61.cjs.map +1 -1
  25. package/dist/index61.js +10 -8
  26. package/dist/index61.js.map +1 -1
  27. package/dist/index62.cjs +11 -10
  28. package/dist/index62.cjs.map +1 -1
  29. package/dist/index62.js +15 -87
  30. package/dist/index62.js.map +1 -1
  31. package/dist/index63.cjs +15 -89
  32. package/dist/index63.cjs.map +1 -1
  33. package/dist/index63.js +9 -23
  34. package/dist/index63.js.map +1 -1
  35. package/dist/index64.cjs +12 -33
  36. package/dist/index64.cjs.map +1 -1
  37. package/dist/index64.js +89 -43
  38. package/dist/index64.js.map +1 -1
  39. package/dist/index65.cjs +88 -42
  40. package/dist/index65.cjs.map +1 -1
  41. package/dist/index65.js +23 -15
  42. package/dist/index65.js.map +1 -1
  43. package/dist/index66.cjs +33 -21
  44. package/dist/index66.cjs.map +1 -1
  45. package/dist/index66.js +44 -51
  46. package/dist/index66.js.map +1 -1
  47. package/dist/index67.cjs +43 -52
  48. package/dist/index67.cjs.map +1 -1
  49. package/dist/index67.js +14 -14
  50. package/dist/index67.js.map +1 -1
  51. package/dist/index68.cjs +19 -19
  52. package/dist/index68.cjs.map +1 -1
  53. package/dist/index68.js +49 -290
  54. package/dist/index68.js.map +1 -1
  55. package/dist/index69.cjs +51 -290
  56. package/dist/index69.cjs.map +1 -1
  57. package/dist/index69.js +15 -57
  58. package/dist/index69.js.map +1 -1
  59. package/dist/index70.cjs +20 -83
  60. package/dist/index70.cjs.map +1 -1
  61. package/dist/index70.js +276 -418
  62. package/dist/index70.js.map +1 -1
  63. package/dist/index71.cjs +275 -419
  64. package/dist/index71.cjs.map +1 -1
  65. package/dist/index71.js +56 -58
  66. package/dist/index71.js.map +1 -1
  67. package/dist/index72.cjs +82 -85
  68. package/dist/index72.cjs.map +1 -1
  69. package/dist/index72.js +420 -226
  70. package/dist/index72.js.map +1 -1
  71. package/dist/index73.cjs +421 -225
  72. package/dist/index73.cjs.map +1 -1
  73. package/dist/index73.js +58 -42
  74. package/dist/index73.js.map +1 -1
  75. package/dist/index74.cjs +85 -61
  76. package/dist/index74.cjs.map +1 -1
  77. package/dist/index74.js +236 -76
  78. package/dist/index74.js.map +1 -1
  79. package/dist/index75.cjs +235 -75
  80. package/dist/index75.cjs.map +1 -1
  81. package/dist/index75.js +42 -20
  82. package/dist/index75.js.map +1 -1
  83. package/dist/index76.cjs +60 -27
  84. package/dist/index76.cjs.map +1 -1
  85. package/dist/index76.js +73 -88
  86. package/dist/index76.js.map +1 -1
  87. package/dist/index77.cjs +73 -90
  88. package/dist/index77.cjs.map +1 -1
  89. package/dist/index77.js +17 -15
  90. package/dist/index77.js.map +1 -1
  91. package/dist/index78.cjs +22 -19
  92. package/dist/index78.cjs.map +1 -1
  93. package/dist/index78.js +85 -143
  94. package/dist/index78.js.map +1 -1
  95. package/dist/index79.cjs +87 -143
  96. package/dist/index79.cjs.map +1 -1
  97. package/dist/index79.js +19 -91
  98. package/dist/index79.js.map +1 -1
  99. package/dist/index80.cjs +27 -135
  100. package/dist/index80.cjs.map +1 -1
  101. package/dist/index80.js +140 -673
  102. package/dist/index80.js.map +1 -1
  103. package/dist/index81.cjs +140 -673
  104. package/dist/index81.cjs.map +1 -1
  105. package/dist/index81.js +91 -31
  106. package/dist/index81.js.map +1 -1
  107. package/dist/index82.cjs +135 -45
  108. package/dist/index82.cjs.map +1 -1
  109. package/dist/index82.js +667 -206
  110. package/dist/index82.js.map +1 -1
  111. package/dist/index83.cjs +667 -204
  112. package/dist/index83.cjs.map +1 -1
  113. package/dist/index83.js +31 -15
  114. package/dist/index83.js.map +1 -1
  115. package/dist/index84.cjs +45 -21
  116. package/dist/index84.cjs.map +1 -1
  117. package/dist/index84.js +224 -29
  118. package/dist/index84.js.map +1 -1
  119. package/dist/index85.cjs +224 -30
  120. package/dist/index85.cjs.map +1 -1
  121. package/dist/index85.js +19 -0
  122. package/dist/index85.js.map +1 -0
  123. package/dist/index86.cjs +25 -0
  124. package/dist/index86.cjs.map +1 -0
  125. package/dist/index86.js +36 -0
  126. package/dist/index86.js.map +1 -0
  127. package/dist/index87.cjs +37 -0
  128. package/dist/index87.cjs.map +1 -0
  129. package/dist/style.css +53 -0
  130. package/package.json +1 -1
package/dist/index78.js CHANGED
@@ -1,159 +1,101 @@
1
1
  import { cx } from "./index3.js";
2
- import empty_state_page_module_default from "./index77.js";
2
+ import error_page_module_default from "./index77.js";
3
3
  import "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/components/empty-state-page/EmptyStatePage.tsx
6
- /** Inline SVG icon for the "no data" variant */
7
- function NoDataIcon() {
8
- return /* @__PURE__ */ jsxs("svg", {
9
- viewBox: "0 0 48 48",
10
- fill: "none",
11
- className: empty_state_page_module_default.iconSvg,
12
- "aria-hidden": "true",
13
- children: [
14
- /* @__PURE__ */ jsx("rect", {
15
- x: "8",
16
- y: "10",
17
- width: "32",
18
- height: "28",
19
- rx: "4",
20
- stroke: "currentColor",
21
- strokeWidth: "2"
22
- }),
23
- /* @__PURE__ */ jsx("line", {
24
- x1: "8",
25
- y1: "18",
26
- x2: "40",
27
- y2: "18",
28
- stroke: "currentColor",
29
- strokeWidth: "2"
30
- }),
31
- /* @__PURE__ */ jsx("line", {
32
- x1: "16",
33
- y1: "24",
34
- x2: "28",
35
- y2: "24",
36
- stroke: "currentColor",
37
- strokeWidth: "2",
38
- strokeLinecap: "round"
39
- }),
40
- /* @__PURE__ */ jsx("line", {
41
- x1: "16",
42
- y1: "30",
43
- x2: "32",
44
- y2: "30",
45
- stroke: "currentColor",
46
- strokeWidth: "2",
47
- strokeLinecap: "round"
48
- })
49
- ]
50
- });
51
- }
52
- /** Inline SVG icon for the "no connection" variant */
53
- function NoConnectionIcon() {
54
- return /* @__PURE__ */ jsxs("svg", {
55
- viewBox: "0 0 48 48",
56
- fill: "none",
57
- className: empty_state_page_module_default.iconSvg,
58
- "aria-hidden": "true",
59
- children: [/* @__PURE__ */ jsx("circle", {
60
- cx: "24",
61
- cy: "24",
62
- r: "14",
63
- stroke: "currentColor",
64
- strokeWidth: "2"
65
- }), /* @__PURE__ */ jsx("path", {
66
- d: "M18 18l12 12M30 18L18 30",
67
- stroke: "currentColor",
68
- strokeWidth: "2",
69
- strokeLinecap: "round"
70
- })]
71
- });
72
- }
73
- /** Inline SVG icon for the "no permissions" variant */
74
- function NoPermissionsIcon() {
75
- return /* @__PURE__ */ jsxs("svg", {
76
- viewBox: "0 0 48 48",
77
- fill: "none",
78
- className: empty_state_page_module_default.iconSvg,
79
- "aria-hidden": "true",
80
- children: [
81
- /* @__PURE__ */ jsx("rect", {
82
- x: "12",
83
- y: "20",
84
- width: "24",
85
- height: "18",
86
- rx: "3",
87
- stroke: "currentColor",
88
- strokeWidth: "2"
89
- }),
90
- /* @__PURE__ */ jsx("path", {
91
- d: "M20 20v-6a4 4 0 018 0v6",
92
- stroke: "currentColor",
93
- strokeWidth: "2"
94
- }),
95
- /* @__PURE__ */ jsx("circle", {
96
- cx: "24",
97
- cy: "30",
98
- r: "2",
99
- fill: "currentColor"
100
- })
101
- ]
102
- });
103
- }
104
- var variantMap = {
105
- noData: {
106
- icon: NoDataIcon,
107
- title: "No data yet",
108
- description: "When you add data, it will appear here."
109
- },
110
- noConnection: {
111
- icon: NoConnectionIcon,
112
- title: "No connection",
113
- description: "Check your network settings and try again."
114
- },
115
- noPermissions: {
116
- icon: NoPermissionsIcon,
117
- title: "Access denied",
118
- description: "You don't have permission to view this content."
119
- }
120
- };
5
+ //#region src/components/error-page/ErrorPage.tsx
121
6
  /**
122
- * EmptyStatePage — a Card-based page template with variant icons, title, description, and actions.
7
+ * ErrorPage — a generic error page with configurable status code, message, and action.
123
8
  *
124
9
  * Layout:
125
- * Card → Icon → Title → Description → Actions
10
+ * Full-viewport centered card with
11
+ * Icon (optional) -> status code -> message -> subtitle -> action
126
12
  */
127
- function EmptyStatePage({ variant = "noData", title, description, primaryAction, secondaryAction, icon, className }) {
128
- const { icon: VariantIcon, title: defaultTitle, description: defaultDescription } = variantMap[variant];
13
+ function ErrorPage({ statusCode = 500, message = "Something went wrong", subtitle, action, showIcon = true, className }) {
129
14
  return /* @__PURE__ */ jsx("div", {
130
- className: cx(empty_state_page_module_default.wrapper, className),
15
+ className: cx(error_page_module_default.layout, className),
131
16
  children: /* @__PURE__ */ jsxs("div", {
132
- className: empty_state_page_module_default.card,
133
- children: [
134
- /* @__PURE__ */ jsx("div", {
135
- className: empty_state_page_module_default.iconArea,
136
- children: icon ?? /* @__PURE__ */ jsx(VariantIcon, {})
137
- }),
138
- /* @__PURE__ */ jsxs("div", {
139
- className: empty_state_page_module_default.content,
140
- children: [/* @__PURE__ */ jsx("h2", {
141
- className: empty_state_page_module_default.title,
142
- children: title ?? defaultTitle
143
- }), /* @__PURE__ */ jsx("p", {
144
- className: empty_state_page_module_default.description,
145
- children: description ?? defaultDescription
146
- })]
147
- }),
148
- (primaryAction || secondaryAction) && /* @__PURE__ */ jsxs("div", {
149
- className: empty_state_page_module_default.actions,
150
- children: [primaryAction, secondaryAction]
17
+ className: error_page_module_default.card,
18
+ children: [showIcon && /* @__PURE__ */ jsx("div", {
19
+ className: error_page_module_default.icon,
20
+ "aria-hidden": "true",
21
+ children: /* @__PURE__ */ jsxs("svg", {
22
+ viewBox: "0 0 24 24",
23
+ fill: "none",
24
+ className: error_page_module_default.iconSvg,
25
+ children: [
26
+ /* @__PURE__ */ jsx("circle", {
27
+ cx: "12",
28
+ cy: "12",
29
+ r: "10",
30
+ stroke: "currentColor",
31
+ strokeWidth: "2"
32
+ }),
33
+ /* @__PURE__ */ jsx("line", {
34
+ x1: "12",
35
+ y1: "8",
36
+ x2: "12",
37
+ y2: "12",
38
+ stroke: "currentColor",
39
+ strokeWidth: "2",
40
+ strokeLinecap: "round"
41
+ }),
42
+ /* @__PURE__ */ jsx("circle", {
43
+ cx: "12",
44
+ cy: "16",
45
+ r: "0.5",
46
+ fill: "currentColor"
47
+ })
48
+ ]
151
49
  })
152
- ]
50
+ }), /* @__PURE__ */ jsxs("div", {
51
+ className: error_page_module_default.content,
52
+ children: [
53
+ /* @__PURE__ */ jsx("span", {
54
+ className: error_page_module_default.statusCode,
55
+ children: statusCode
56
+ }),
57
+ /* @__PURE__ */ jsx("h1", {
58
+ className: error_page_module_default.title,
59
+ children: message
60
+ }),
61
+ subtitle && /* @__PURE__ */ jsx("p", {
62
+ className: error_page_module_default.subtitle,
63
+ children: subtitle
64
+ }),
65
+ action && /* @__PURE__ */ jsx("div", {
66
+ className: error_page_module_default.action,
67
+ children: action
68
+ })
69
+ ]
70
+ })]
153
71
  })
154
72
  });
155
73
  }
74
+ /**
75
+ * NotFoundPage — a 404 variant of ErrorPage.
76
+ */
77
+ function NotFoundPage({ action, className }) {
78
+ return /* @__PURE__ */ jsx(ErrorPage, {
79
+ statusCode: 404,
80
+ message: "Page not found",
81
+ subtitle: "The page you're looking for doesn't exist or has been moved.",
82
+ action,
83
+ className
84
+ });
85
+ }
86
+ /**
87
+ * MaintenancePage — a 503 variant of ErrorPage for under-maintenance sites.
88
+ */
89
+ function MaintenancePage({ action, className }) {
90
+ return /* @__PURE__ */ jsx(ErrorPage, {
91
+ statusCode: 503,
92
+ message: "Site under maintenance",
93
+ subtitle: "We're currently performing scheduled maintenance. We'll be back shortly.",
94
+ action,
95
+ className
96
+ });
97
+ }
156
98
  //#endregion
157
- export { EmptyStatePage };
99
+ export { ErrorPage, MaintenancePage, NotFoundPage };
158
100
 
159
101
  //# sourceMappingURL=index78.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index78.js","names":[],"sources":["../src/components/empty-state-page/EmptyStatePage.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cx } from \"../../utils/cx\";\nimport styles from \"./empty-state-page.module.css\";\n\nexport type EmptyStatePageVariant = \"noData\" | \"noConnection\" | \"noPermissions\";\n\nexport interface EmptyStatePageProps {\n /** Page variant driving icon, title, description defaults */\n variant?: EmptyStatePageVariant;\n /** Optional title override */\n title?: string;\n /** Optional description override */\n description?: string;\n /** Primary action button */\n primaryAction?: React.ReactNode;\n /** Secondary action button */\n secondaryAction?: React.ReactNode;\n /** Optional custom SVG icon (overrides variant icon) */\n icon?: React.ReactNode;\n /** Additional class name */\n className?: string;\n}\n\n/** Inline SVG icon for the \"no data\" variant */\nfunction NoDataIcon() {\n return (\n <svg viewBox=\"0 0 48 48\" fill=\"none\" className={styles.iconSvg} aria-hidden=\"true\">\n <rect x=\"8\" y=\"10\" width=\"32\" height=\"28\" rx=\"4\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <line x1=\"8\" y1=\"18\" x2=\"40\" y2=\"18\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <line x1=\"16\" y1=\"24\" x2=\"28\" y2=\"24\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n <line x1=\"16\" y1=\"30\" x2=\"32\" y2=\"30\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n </svg>\n );\n}\n\n/** Inline SVG icon for the \"no connection\" variant */\nfunction NoConnectionIcon() {\n return (\n <svg viewBox=\"0 0 48 48\" fill=\"none\" className={styles.iconSvg} aria-hidden=\"true\">\n <circle cx=\"24\" cy=\"24\" r=\"14\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <path d=\"M18 18l12 12M30 18L18 30\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n </svg>\n );\n}\n\n/** Inline SVG icon for the \"no permissions\" variant */\nfunction NoPermissionsIcon() {\n return (\n <svg viewBox=\"0 0 48 48\" fill=\"none\" className={styles.iconSvg} aria-hidden=\"true\">\n <rect x=\"12\" y=\"20\" width=\"24\" height=\"18\" rx=\"3\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <path d=\"M20 20v-6a4 4 0 018 0v6\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <circle cx=\"24\" cy=\"30\" r=\"2\" fill=\"currentColor\" />\n </svg>\n );\n}\n\nconst variantMap: Record<\n EmptyStatePageVariant,\n { icon: React.FC; title: string; description: string }\n> = {\n noData: {\n icon: NoDataIcon,\n title: \"No data yet\",\n description: \"When you add data, it will appear here.\",\n },\n noConnection: {\n icon: NoConnectionIcon,\n title: \"No connection\",\n description: \"Check your network settings and try again.\",\n },\n noPermissions: {\n icon: NoPermissionsIcon,\n title: \"Access denied\",\n description: \"You don't have permission to view this content.\",\n },\n};\n\n/**\n * EmptyStatePage — a Card-based page template with variant icons, title, description, and actions.\n *\n * Layout:\n * Card → Icon → Title → Description → Actions\n */\nexport function EmptyStatePage({\n variant = \"noData\",\n title,\n description,\n primaryAction,\n secondaryAction,\n icon,\n className,\n}: EmptyStatePageProps) {\n const { icon: VariantIcon, title: defaultTitle, description: defaultDescription } = variantMap[variant];\n\n return (\n <div className={cx(styles.wrapper, className)}>\n <div className={styles.card}>\n <div className={styles.iconArea}>\n {icon ?? <VariantIcon />}\n </div>\n <div className={styles.content}>\n <h2 className={styles.title}>{title ?? defaultTitle}</h2>\n <p className={styles.description}>{description ?? defaultDescription}</p>\n </div>\n {(primaryAction || secondaryAction) && (\n <div className={styles.actions}>\n {primaryAction}\n {secondaryAction}\n </div>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;AAwBA,SAAS,aAAa;CACpB,OACE,qBAAC,OAAD;EAAK,SAAQ;EAAY,MAAK;EAAO,WAAW,gCAAO;EAAS,eAAY;YAA5E;GACE,oBAAC,QAAD;IAAM,GAAE;IAAI,GAAE;IAAK,OAAM;IAAK,QAAO;IAAK,IAAG;IAAI,QAAO;IAAe,aAAY;GAAK,CAAA;GACxF,oBAAC,QAAD;IAAM,IAAG;IAAI,IAAG;IAAK,IAAG;IAAK,IAAG;IAAK,QAAO;IAAe,aAAY;GAAK,CAAA;GAC5E,oBAAC,QAAD;IAAM,IAAG;IAAK,IAAG;IAAK,IAAG;IAAK,IAAG;IAAK,QAAO;IAAe,aAAY;IAAI,eAAc;GAAS,CAAA;GACnG,oBAAC,QAAD;IAAM,IAAG;IAAK,IAAG;IAAK,IAAG;IAAK,IAAG;IAAK,QAAO;IAAe,aAAY;IAAI,eAAc;GAAS,CAAA;EAChG;;AAET;;AAGA,SAAS,mBAAmB;CAC1B,OACE,qBAAC,OAAD;EAAK,SAAQ;EAAY,MAAK;EAAO,WAAW,gCAAO;EAAS,eAAY;YAA5E,CACE,oBAAC,UAAD;GAAQ,IAAG;GAAK,IAAG;GAAK,GAAE;GAAK,QAAO;GAAe,aAAY;EAAK,CAAA,GACtE,oBAAC,QAAD;GAAM,GAAE;GAA2B,QAAO;GAAe,aAAY;GAAI,eAAc;EAAS,CAAA,CAC7F;;AAET;;AAGA,SAAS,oBAAoB;CAC3B,OACE,qBAAC,OAAD;EAAK,SAAQ;EAAY,MAAK;EAAO,WAAW,gCAAO;EAAS,eAAY;YAA5E;GACE,oBAAC,QAAD;IAAM,GAAE;IAAK,GAAE;IAAK,OAAM;IAAK,QAAO;IAAK,IAAG;IAAI,QAAO;IAAe,aAAY;GAAK,CAAA;GACzF,oBAAC,QAAD;IAAM,GAAE;IAA0B,QAAO;IAAe,aAAY;GAAK,CAAA;GACzE,oBAAC,UAAD;IAAQ,IAAG;IAAK,IAAG;IAAK,GAAE;IAAI,MAAK;GAAgB,CAAA;EAChD;;AAET;AAEA,IAAM,aAGF;CACF,QAAQ;EACN,MAAM;EACN,OAAO;EACP,aAAa;CACf;CACA,cAAc;EACZ,MAAM;EACN,OAAO;EACP,aAAa;CACf;CACA,eAAe;EACb,MAAM;EACN,OAAO;EACP,aAAa;CACf;AACF;;;;;;;AAQA,SAAgB,eAAe,EAC7B,UAAU,UACV,OACA,aACA,eACA,iBACA,MACA,aACsB;CACtB,MAAM,EAAE,MAAM,aAAa,OAAO,cAAc,aAAa,uBAAuB,WAAW;CAE/F,OACE,oBAAC,OAAD;EAAK,WAAW,GAAG,gCAAO,SAAS,SAAS;YAC1C,qBAAC,OAAD;GAAK,WAAW,gCAAO;aAAvB;IACE,oBAAC,OAAD;KAAK,WAAW,gCAAO;eACpB,QAAQ,oBAAC,aAAD,CAAc,CAAA;IACpB,CAAA;IACL,qBAAC,OAAD;KAAK,WAAW,gCAAO;eAAvB,CACE,oBAAC,MAAD;MAAI,WAAW,gCAAO;gBAAQ,SAAS;KAAiB,CAAA,GACxD,oBAAC,KAAD;MAAG,WAAW,gCAAO;gBAAc,eAAe;KAAsB,CAAA,CACrE;;KACH,iBAAiB,oBACjB,qBAAC,OAAD;KAAK,WAAW,gCAAO;eAAvB,CACG,eACA,eACE;;GAEJ;;CACF,CAAA;AAET"}
1
+ {"version":3,"file":"index78.js","names":[],"sources":["../src/components/error-page/ErrorPage.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cx } from \"../../utils/cx\";\nimport styles from \"./error-page.module.css\";\n\nexport interface ErrorPageProps {\n /** HTTP status code (e.g., 404, 500, 503) */\n statusCode?: number;\n /** Descriptive message for the error */\n message?: React.ReactNode;\n /** Subtitle providing additional context */\n subtitle?: React.ReactNode;\n /** Action button rendered below the message */\n action?: React.ReactNode;\n /** Whether to render a large decorative icon */\n showIcon?: boolean;\n /** Additional class name for the outer wrapper */\n className?: string;\n}\n\n/**\n * ErrorPage — a generic error page with configurable status code, message, and action.\n *\n * Layout:\n * Full-viewport centered card with\n * Icon (optional) -> status code -> message -> subtitle -> action\n */\nexport function ErrorPage({\n statusCode = 500,\n message = \"Something went wrong\",\n subtitle,\n action,\n showIcon = true,\n className,\n}: ErrorPageProps) {\n return (\n <div className={cx(styles.layout, className)}>\n <div className={styles.card}>\n {showIcon && (\n <div className={styles.icon} aria-hidden=\"true\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" className={styles.iconSvg}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"12\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n <circle cx=\"12\" cy=\"16\" r=\"0.5\" fill=\"currentColor\" />\n </svg>\n </div>\n )}\n <div className={styles.content}>\n <span className={styles.statusCode}>{statusCode}</span>\n <h1 className={styles.title}>{message}</h1>\n {subtitle && <p className={styles.subtitle}>{subtitle}</p>}\n {action && <div className={styles.action}>{action}</div>}\n </div>\n </div>\n </div>\n );\n}\n\n/**\n * NotFoundPage — a 404 variant of ErrorPage.\n */\nexport function NotFoundPage({\n action,\n className,\n}: Omit<ErrorPageProps, \"statusCode\" | \"message\" | \"subtitle\" | \"showIcon\">) {\n return (\n <ErrorPage\n statusCode={404}\n message=\"Page not found\"\n subtitle=\"The page you're looking for doesn't exist or has been moved.\"\n action={action}\n className={className}\n />\n );\n}\n\n/**\n * MaintenancePage — a 503 variant of ErrorPage for under-maintenance sites.\n */\nexport function MaintenancePage({\n action,\n className,\n}: Omit<ErrorPageProps, \"statusCode\" | \"message\" | \"subtitle\" | \"showIcon\">) {\n return (\n <ErrorPage\n statusCode={503}\n message=\"Site under maintenance\"\n subtitle=\"We're currently performing scheduled maintenance. We'll be back shortly.\"\n action={action}\n className={className}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;AA0BA,SAAgB,UAAU,EACxB,aAAa,KACb,UAAU,wBACV,UACA,QACA,WAAW,MACX,aACiB;CACjB,OACE,oBAAC,OAAD;EAAK,WAAW,GAAG,0BAAO,QAAQ,SAAS;YACzC,qBAAC,OAAD;GAAK,WAAW,0BAAO;aAAvB,CACG,YACC,oBAAC,OAAD;IAAK,WAAW,0BAAO;IAAM,eAAY;cACvC,qBAAC,OAAD;KAAK,SAAQ;KAAY,MAAK;KAAO,WAAW,0BAAO;eAAvD;MACE,oBAAC,UAAD;OAAQ,IAAG;OAAK,IAAG;OAAK,GAAE;OAAK,QAAO;OAAe,aAAY;MAAK,CAAA;MACtE,oBAAC,QAAD;OAAM,IAAG;OAAK,IAAG;OAAI,IAAG;OAAK,IAAG;OAAK,QAAO;OAAe,aAAY;OAAI,eAAc;MAAS,CAAA;MAClG,oBAAC,UAAD;OAAQ,IAAG;OAAK,IAAG;OAAK,GAAE;OAAM,MAAK;MAAgB,CAAA;KAClD;;GACF,CAAA,GAEP,qBAAC,OAAD;IAAK,WAAW,0BAAO;cAAvB;KACE,oBAAC,QAAD;MAAM,WAAW,0BAAO;gBAAa;KAAiB,CAAA;KACtD,oBAAC,MAAD;MAAI,WAAW,0BAAO;gBAAQ;KAAY,CAAA;KACzC,YAAY,oBAAC,KAAD;MAAG,WAAW,0BAAO;gBAAW;KAAY,CAAA;KACxD,UAAU,oBAAC,OAAD;MAAK,WAAW,0BAAO;gBAAS;KAAY,CAAA;IACpD;KACF;;CACF,CAAA;AAET;;;;AAKA,SAAgB,aAAa,EAC3B,QACA,aAC2E;CAC3E,OACE,oBAAC,WAAD;EACE,YAAY;EACZ,SAAQ;EACR,UAAS;EACD;EACG;CACZ,CAAA;AAEL;;;;AAKA,SAAgB,gBAAgB,EAC9B,QACA,aAC2E;CAC3E,OACE,oBAAC,WAAD;EACE,YAAY;EACZ,SAAQ;EACR,UAAS;EACD;EACG;CACZ,CAAA;AAEL"}
package/dist/index79.cjs CHANGED
@@ -1,161 +1,105 @@
1
1
  const require_runtime = require("./index2.cjs");
2
2
  const require_cx = require("./index4.cjs");
3
- const require_empty_state_page_module = require("./index78.cjs");
3
+ const require_error_page_module = require("./index78.cjs");
4
4
  let react = require("react");
5
5
  react = require_runtime.__toESM(react, 1);
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
- //#region src/components/empty-state-page/EmptyStatePage.tsx
8
- /** Inline SVG icon for the "no data" variant */
9
- function NoDataIcon() {
10
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
11
- viewBox: "0 0 48 48",
12
- fill: "none",
13
- className: require_empty_state_page_module.default.iconSvg,
14
- "aria-hidden": "true",
15
- children: [
16
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
17
- x: "8",
18
- y: "10",
19
- width: "32",
20
- height: "28",
21
- rx: "4",
22
- stroke: "currentColor",
23
- strokeWidth: "2"
24
- }),
25
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
26
- x1: "8",
27
- y1: "18",
28
- x2: "40",
29
- y2: "18",
30
- stroke: "currentColor",
31
- strokeWidth: "2"
32
- }),
33
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
34
- x1: "16",
35
- y1: "24",
36
- x2: "28",
37
- y2: "24",
38
- stroke: "currentColor",
39
- strokeWidth: "2",
40
- strokeLinecap: "round"
41
- }),
42
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
43
- x1: "16",
44
- y1: "30",
45
- x2: "32",
46
- y2: "30",
47
- stroke: "currentColor",
48
- strokeWidth: "2",
49
- strokeLinecap: "round"
50
- })
51
- ]
52
- });
53
- }
54
- /** Inline SVG icon for the "no connection" variant */
55
- function NoConnectionIcon() {
56
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
57
- viewBox: "0 0 48 48",
58
- fill: "none",
59
- className: require_empty_state_page_module.default.iconSvg,
60
- "aria-hidden": "true",
61
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
62
- cx: "24",
63
- cy: "24",
64
- r: "14",
65
- stroke: "currentColor",
66
- strokeWidth: "2"
67
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
68
- d: "M18 18l12 12M30 18L18 30",
69
- stroke: "currentColor",
70
- strokeWidth: "2",
71
- strokeLinecap: "round"
72
- })]
73
- });
74
- }
75
- /** Inline SVG icon for the "no permissions" variant */
76
- function NoPermissionsIcon() {
77
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
78
- viewBox: "0 0 48 48",
79
- fill: "none",
80
- className: require_empty_state_page_module.default.iconSvg,
81
- "aria-hidden": "true",
82
- children: [
83
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
84
- x: "12",
85
- y: "20",
86
- width: "24",
87
- height: "18",
88
- rx: "3",
89
- stroke: "currentColor",
90
- strokeWidth: "2"
91
- }),
92
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
93
- d: "M20 20v-6a4 4 0 018 0v6",
94
- stroke: "currentColor",
95
- strokeWidth: "2"
96
- }),
97
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
98
- cx: "24",
99
- cy: "30",
100
- r: "2",
101
- fill: "currentColor"
102
- })
103
- ]
104
- });
105
- }
106
- var variantMap = {
107
- noData: {
108
- icon: NoDataIcon,
109
- title: "No data yet",
110
- description: "When you add data, it will appear here."
111
- },
112
- noConnection: {
113
- icon: NoConnectionIcon,
114
- title: "No connection",
115
- description: "Check your network settings and try again."
116
- },
117
- noPermissions: {
118
- icon: NoPermissionsIcon,
119
- title: "Access denied",
120
- description: "You don't have permission to view this content."
121
- }
122
- };
7
+ //#region src/components/error-page/ErrorPage.tsx
123
8
  /**
124
- * EmptyStatePage — a Card-based page template with variant icons, title, description, and actions.
9
+ * ErrorPage — a generic error page with configurable status code, message, and action.
125
10
  *
126
11
  * Layout:
127
- * Card → Icon → Title → Description → Actions
12
+ * Full-viewport centered card with
13
+ * Icon (optional) -> status code -> message -> subtitle -> action
128
14
  */
129
- function EmptyStatePage({ variant = "noData", title, description, primaryAction, secondaryAction, icon, className }) {
130
- const { icon: VariantIcon, title: defaultTitle, description: defaultDescription } = variantMap[variant];
15
+ function ErrorPage({ statusCode = 500, message = "Something went wrong", subtitle, action, showIcon = true, className }) {
131
16
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
132
- className: require_cx.cx(require_empty_state_page_module.default.wrapper, className),
17
+ className: require_cx.cx(require_error_page_module.default.layout, className),
133
18
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
134
- className: require_empty_state_page_module.default.card,
135
- children: [
136
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
137
- className: require_empty_state_page_module.default.iconArea,
138
- children: icon ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VariantIcon, {})
139
- }),
140
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
141
- className: require_empty_state_page_module.default.content,
142
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
143
- className: require_empty_state_page_module.default.title,
144
- children: title ?? defaultTitle
145
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
146
- className: require_empty_state_page_module.default.description,
147
- children: description ?? defaultDescription
148
- })]
149
- }),
150
- (primaryAction || secondaryAction) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
151
- className: require_empty_state_page_module.default.actions,
152
- children: [primaryAction, secondaryAction]
19
+ className: require_error_page_module.default.card,
20
+ children: [showIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
21
+ className: require_error_page_module.default.icon,
22
+ "aria-hidden": "true",
23
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
24
+ viewBox: "0 0 24 24",
25
+ fill: "none",
26
+ className: require_error_page_module.default.iconSvg,
27
+ children: [
28
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
29
+ cx: "12",
30
+ cy: "12",
31
+ r: "10",
32
+ stroke: "currentColor",
33
+ strokeWidth: "2"
34
+ }),
35
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
36
+ x1: "12",
37
+ y1: "8",
38
+ x2: "12",
39
+ y2: "12",
40
+ stroke: "currentColor",
41
+ strokeWidth: "2",
42
+ strokeLinecap: "round"
43
+ }),
44
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
45
+ cx: "12",
46
+ cy: "16",
47
+ r: "0.5",
48
+ fill: "currentColor"
49
+ })
50
+ ]
153
51
  })
154
- ]
52
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
53
+ className: require_error_page_module.default.content,
54
+ children: [
55
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
56
+ className: require_error_page_module.default.statusCode,
57
+ children: statusCode
58
+ }),
59
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h1", {
60
+ className: require_error_page_module.default.title,
61
+ children: message
62
+ }),
63
+ subtitle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
64
+ className: require_error_page_module.default.subtitle,
65
+ children: subtitle
66
+ }),
67
+ action && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
68
+ className: require_error_page_module.default.action,
69
+ children: action
70
+ })
71
+ ]
72
+ })]
155
73
  })
156
74
  });
157
75
  }
76
+ /**
77
+ * NotFoundPage — a 404 variant of ErrorPage.
78
+ */
79
+ function NotFoundPage({ action, className }) {
80
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ErrorPage, {
81
+ statusCode: 404,
82
+ message: "Page not found",
83
+ subtitle: "The page you're looking for doesn't exist or has been moved.",
84
+ action,
85
+ className
86
+ });
87
+ }
88
+ /**
89
+ * MaintenancePage — a 503 variant of ErrorPage for under-maintenance sites.
90
+ */
91
+ function MaintenancePage({ action, className }) {
92
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ErrorPage, {
93
+ statusCode: 503,
94
+ message: "Site under maintenance",
95
+ subtitle: "We're currently performing scheduled maintenance. We'll be back shortly.",
96
+ action,
97
+ className
98
+ });
99
+ }
158
100
  //#endregion
159
- exports.EmptyStatePage = EmptyStatePage;
101
+ exports.ErrorPage = ErrorPage;
102
+ exports.MaintenancePage = MaintenancePage;
103
+ exports.NotFoundPage = NotFoundPage;
160
104
 
161
105
  //# sourceMappingURL=index79.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index79.cjs","names":[],"sources":["../src/components/empty-state-page/EmptyStatePage.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cx } from \"../../utils/cx\";\nimport styles from \"./empty-state-page.module.css\";\n\nexport type EmptyStatePageVariant = \"noData\" | \"noConnection\" | \"noPermissions\";\n\nexport interface EmptyStatePageProps {\n /** Page variant driving icon, title, description defaults */\n variant?: EmptyStatePageVariant;\n /** Optional title override */\n title?: string;\n /** Optional description override */\n description?: string;\n /** Primary action button */\n primaryAction?: React.ReactNode;\n /** Secondary action button */\n secondaryAction?: React.ReactNode;\n /** Optional custom SVG icon (overrides variant icon) */\n icon?: React.ReactNode;\n /** Additional class name */\n className?: string;\n}\n\n/** Inline SVG icon for the \"no data\" variant */\nfunction NoDataIcon() {\n return (\n <svg viewBox=\"0 0 48 48\" fill=\"none\" className={styles.iconSvg} aria-hidden=\"true\">\n <rect x=\"8\" y=\"10\" width=\"32\" height=\"28\" rx=\"4\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <line x1=\"8\" y1=\"18\" x2=\"40\" y2=\"18\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <line x1=\"16\" y1=\"24\" x2=\"28\" y2=\"24\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n <line x1=\"16\" y1=\"30\" x2=\"32\" y2=\"30\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n </svg>\n );\n}\n\n/** Inline SVG icon for the \"no connection\" variant */\nfunction NoConnectionIcon() {\n return (\n <svg viewBox=\"0 0 48 48\" fill=\"none\" className={styles.iconSvg} aria-hidden=\"true\">\n <circle cx=\"24\" cy=\"24\" r=\"14\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <path d=\"M18 18l12 12M30 18L18 30\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n </svg>\n );\n}\n\n/** Inline SVG icon for the \"no permissions\" variant */\nfunction NoPermissionsIcon() {\n return (\n <svg viewBox=\"0 0 48 48\" fill=\"none\" className={styles.iconSvg} aria-hidden=\"true\">\n <rect x=\"12\" y=\"20\" width=\"24\" height=\"18\" rx=\"3\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <path d=\"M20 20v-6a4 4 0 018 0v6\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <circle cx=\"24\" cy=\"30\" r=\"2\" fill=\"currentColor\" />\n </svg>\n );\n}\n\nconst variantMap: Record<\n EmptyStatePageVariant,\n { icon: React.FC; title: string; description: string }\n> = {\n noData: {\n icon: NoDataIcon,\n title: \"No data yet\",\n description: \"When you add data, it will appear here.\",\n },\n noConnection: {\n icon: NoConnectionIcon,\n title: \"No connection\",\n description: \"Check your network settings and try again.\",\n },\n noPermissions: {\n icon: NoPermissionsIcon,\n title: \"Access denied\",\n description: \"You don't have permission to view this content.\",\n },\n};\n\n/**\n * EmptyStatePage — a Card-based page template with variant icons, title, description, and actions.\n *\n * Layout:\n * Card → Icon → Title → Description → Actions\n */\nexport function EmptyStatePage({\n variant = \"noData\",\n title,\n description,\n primaryAction,\n secondaryAction,\n icon,\n className,\n}: EmptyStatePageProps) {\n const { icon: VariantIcon, title: defaultTitle, description: defaultDescription } = variantMap[variant];\n\n return (\n <div className={cx(styles.wrapper, className)}>\n <div className={styles.card}>\n <div className={styles.iconArea}>\n {icon ?? <VariantIcon />}\n </div>\n <div className={styles.content}>\n <h2 className={styles.title}>{title ?? defaultTitle}</h2>\n <p className={styles.description}>{description ?? defaultDescription}</p>\n </div>\n {(primaryAction || secondaryAction) && (\n <div className={styles.actions}>\n {primaryAction}\n {secondaryAction}\n </div>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAwBA,SAAS,aAAa;CACpB,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,SAAQ;EAAY,MAAK;EAAO,WAAW,gCAAA,QAAO;EAAS,eAAY;YAA5E;GACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,GAAE;IAAI,GAAE;IAAK,OAAM;IAAK,QAAO;IAAK,IAAG;IAAI,QAAO;IAAe,aAAY;GAAK,CAAA;GACxF,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,IAAG;IAAI,IAAG;IAAK,IAAG;IAAK,IAAG;IAAK,QAAO;IAAe,aAAY;GAAK,CAAA;GAC5E,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,IAAG;IAAK,IAAG;IAAK,IAAG;IAAK,IAAG;IAAK,QAAO;IAAe,aAAY;IAAI,eAAc;GAAS,CAAA;GACnG,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,IAAG;IAAK,IAAG;IAAK,IAAG;IAAK,IAAG;IAAK,QAAO;IAAe,aAAY;IAAI,eAAc;GAAS,CAAA;EAChG;;AAET;;AAGA,SAAS,mBAAmB;CAC1B,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,SAAQ;EAAY,MAAK;EAAO,WAAW,gCAAA,QAAO;EAAS,eAAY;YAA5E,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;GAAQ,IAAG;GAAK,IAAG;GAAK,GAAE;GAAK,QAAO;GAAe,aAAY;EAAK,CAAA,GACtE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GAAM,GAAE;GAA2B,QAAO;GAAe,aAAY;GAAI,eAAc;EAAS,CAAA,CAC7F;;AAET;;AAGA,SAAS,oBAAoB;CAC3B,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,SAAQ;EAAY,MAAK;EAAO,WAAW,gCAAA,QAAO;EAAS,eAAY;YAA5E;GACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,GAAE;IAAK,GAAE;IAAK,OAAM;IAAK,QAAO;IAAK,IAAG;IAAI,QAAO;IAAe,aAAY;GAAK,CAAA;GACzF,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,GAAE;IAA0B,QAAO;IAAe,aAAY;GAAK,CAAA;GACzE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;IAAQ,IAAG;IAAK,IAAG;IAAK,GAAE;IAAI,MAAK;GAAgB,CAAA;EAChD;;AAET;AAEA,IAAM,aAGF;CACF,QAAQ;EACN,MAAM;EACN,OAAO;EACP,aAAa;CACf;CACA,cAAc;EACZ,MAAM;EACN,OAAO;EACP,aAAa;CACf;CACA,eAAe;EACb,MAAM;EACN,OAAO;EACP,aAAa;CACf;AACF;;;;;;;AAQA,SAAgB,eAAe,EAC7B,UAAU,UACV,OACA,aACA,eACA,iBACA,MACA,aACsB;CACtB,MAAM,EAAE,MAAM,aAAa,OAAO,cAAc,aAAa,uBAAuB,WAAW;CAE/F,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,WAAW,WAAA,GAAG,gCAAA,QAAO,SAAS,SAAS;YAC1C,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GAAK,WAAW,gCAAA,QAAO;aAAvB;IACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAK,WAAW,gCAAA,QAAO;eACpB,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD,CAAc,CAAA;IACpB,CAAA;IACL,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;KAAK,WAAW,gCAAA,QAAO;eAAvB,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;MAAI,WAAW,gCAAA,QAAO;gBAAQ,SAAS;KAAiB,CAAA,GACxD,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;MAAG,WAAW,gCAAA,QAAO;gBAAc,eAAe;KAAsB,CAAA,CACrE;;KACH,iBAAiB,oBACjB,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;KAAK,WAAW,gCAAA,QAAO;eAAvB,CACG,eACA,eACE;;GAEJ;;CACF,CAAA;AAET"}
1
+ {"version":3,"file":"index79.cjs","names":[],"sources":["../src/components/error-page/ErrorPage.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cx } from \"../../utils/cx\";\nimport styles from \"./error-page.module.css\";\n\nexport interface ErrorPageProps {\n /** HTTP status code (e.g., 404, 500, 503) */\n statusCode?: number;\n /** Descriptive message for the error */\n message?: React.ReactNode;\n /** Subtitle providing additional context */\n subtitle?: React.ReactNode;\n /** Action button rendered below the message */\n action?: React.ReactNode;\n /** Whether to render a large decorative icon */\n showIcon?: boolean;\n /** Additional class name for the outer wrapper */\n className?: string;\n}\n\n/**\n * ErrorPage — a generic error page with configurable status code, message, and action.\n *\n * Layout:\n * Full-viewport centered card with\n * Icon (optional) -> status code -> message -> subtitle -> action\n */\nexport function ErrorPage({\n statusCode = 500,\n message = \"Something went wrong\",\n subtitle,\n action,\n showIcon = true,\n className,\n}: ErrorPageProps) {\n return (\n <div className={cx(styles.layout, className)}>\n <div className={styles.card}>\n {showIcon && (\n <div className={styles.icon} aria-hidden=\"true\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" className={styles.iconSvg}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"12\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n <circle cx=\"12\" cy=\"16\" r=\"0.5\" fill=\"currentColor\" />\n </svg>\n </div>\n )}\n <div className={styles.content}>\n <span className={styles.statusCode}>{statusCode}</span>\n <h1 className={styles.title}>{message}</h1>\n {subtitle && <p className={styles.subtitle}>{subtitle}</p>}\n {action && <div className={styles.action}>{action}</div>}\n </div>\n </div>\n </div>\n );\n}\n\n/**\n * NotFoundPage — a 404 variant of ErrorPage.\n */\nexport function NotFoundPage({\n action,\n className,\n}: Omit<ErrorPageProps, \"statusCode\" | \"message\" | \"subtitle\" | \"showIcon\">) {\n return (\n <ErrorPage\n statusCode={404}\n message=\"Page not found\"\n subtitle=\"The page you're looking for doesn't exist or has been moved.\"\n action={action}\n className={className}\n />\n );\n}\n\n/**\n * MaintenancePage — a 503 variant of ErrorPage for under-maintenance sites.\n */\nexport function MaintenancePage({\n action,\n className,\n}: Omit<ErrorPageProps, \"statusCode\" | \"message\" | \"subtitle\" | \"showIcon\">) {\n return (\n <ErrorPage\n statusCode={503}\n message=\"Site under maintenance\"\n subtitle=\"We're currently performing scheduled maintenance. We'll be back shortly.\"\n action={action}\n className={className}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA0BA,SAAgB,UAAU,EACxB,aAAa,KACb,UAAU,wBACV,UACA,QACA,WAAW,MACX,aACiB;CACjB,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,WAAW,WAAA,GAAG,0BAAA,QAAO,QAAQ,SAAS;YACzC,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GAAK,WAAW,0BAAA,QAAO;aAAvB,CACG,YACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;IAAK,WAAW,0BAAA,QAAO;IAAM,eAAY;cACvC,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;KAAK,SAAQ;KAAY,MAAK;KAAO,WAAW,0BAAA,QAAO;eAAvD;MACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;OAAQ,IAAG;OAAK,IAAG;OAAK,GAAE;OAAK,QAAO;OAAe,aAAY;MAAK,CAAA;MACtE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;OAAM,IAAG;OAAK,IAAG;OAAI,IAAG;OAAK,IAAG;OAAK,QAAO;OAAe,aAAY;OAAI,eAAc;MAAS,CAAA;MAClG,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;OAAQ,IAAG;OAAK,IAAG;OAAK,GAAE;OAAM,MAAK;MAAgB,CAAA;KAClD;;GACF,CAAA,GAEP,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;IAAK,WAAW,0BAAA,QAAO;cAAvB;KACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAW,0BAAA,QAAO;gBAAa;KAAiB,CAAA;KACtD,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;MAAI,WAAW,0BAAA,QAAO;gBAAQ;KAAY,CAAA;KACzC,YAAY,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;MAAG,WAAW,0BAAA,QAAO;gBAAW;KAAY,CAAA;KACxD,UAAU,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;MAAK,WAAW,0BAAA,QAAO;gBAAS;KAAY,CAAA;IACpD;KACF;;CACF,CAAA;AAET;;;;AAKA,SAAgB,aAAa,EAC3B,QACA,aAC2E;CAC3E,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;EACE,YAAY;EACZ,SAAQ;EACR,UAAS;EACD;EACG;CACZ,CAAA;AAEL;;;;AAKA,SAAgB,gBAAgB,EAC9B,QACA,aAC2E;CAC3E,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;EACE,YAAY;EACZ,SAAQ;EACR,UAAS;EACD;EACG;CACZ,CAAA;AAEL"}