@replicated/portal-components 0.0.2 → 0.0.4

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 (216) hide show
  1. package/components/metadata/registry.json +83 -2
  2. package/components/metadata/registry.md +27 -2
  3. package/dist/actions/index.d.mts +566 -3
  4. package/dist/actions/index.d.ts +566 -3
  5. package/dist/actions/index.js +1853 -12
  6. package/dist/actions/index.js.map +1 -1
  7. package/dist/airgap-instances.d.mts +26 -0
  8. package/dist/airgap-instances.d.ts +26 -0
  9. package/dist/airgap-instances.js +354 -0
  10. package/dist/airgap-instances.js.map +1 -0
  11. package/dist/error-page.d.mts +14 -0
  12. package/dist/error-page.d.ts +14 -0
  13. package/dist/error-page.js +153 -0
  14. package/dist/error-page.js.map +1 -0
  15. package/dist/error.d.mts +15 -0
  16. package/dist/error.d.ts +15 -0
  17. package/dist/error.js +144 -0
  18. package/dist/error.js.map +1 -0
  19. package/dist/esm/actions/index.js +1816 -13
  20. package/dist/esm/actions/index.js.map +1 -1
  21. package/dist/esm/airgap-instances.js +352 -0
  22. package/dist/esm/airgap-instances.js.map +1 -0
  23. package/dist/esm/error-page.js +151 -0
  24. package/dist/esm/error-page.js.map +1 -0
  25. package/dist/esm/error.js +142 -0
  26. package/dist/esm/error.js.map +1 -0
  27. package/dist/esm/helm-install-wizard.js +1007 -0
  28. package/dist/esm/helm-install-wizard.js.map +1 -0
  29. package/dist/esm/index.js +2232 -155
  30. package/dist/esm/index.js.map +1 -1
  31. package/dist/esm/install-actions.js +746 -0
  32. package/dist/esm/install-actions.js.map +1 -0
  33. package/dist/esm/install-card.js +115 -0
  34. package/dist/esm/install-card.js.map +1 -0
  35. package/dist/esm/install-targets.js +48 -0
  36. package/dist/esm/install-targets.js.map +1 -0
  37. package/dist/esm/instance-card.js +197 -0
  38. package/dist/esm/instance-card.js.map +1 -0
  39. package/dist/esm/join-team.js +218 -0
  40. package/dist/esm/join-team.js.map +1 -0
  41. package/dist/esm/license-card.js +131 -0
  42. package/dist/esm/license-card.js.map +1 -0
  43. package/dist/esm/license-details.js +667 -0
  44. package/dist/esm/license-details.js.map +1 -0
  45. package/dist/esm/linux-install-wizard.js +1083 -0
  46. package/dist/esm/linux-install-wizard.js.map +1 -0
  47. package/dist/esm/login.js +261 -0
  48. package/dist/esm/login.js.map +1 -0
  49. package/dist/esm/online-instance-list.js +287 -0
  50. package/dist/esm/online-instance-list.js.map +1 -0
  51. package/dist/esm/pending-installations.js +235 -0
  52. package/dist/esm/pending-installations.js.map +1 -0
  53. package/dist/esm/release-history-panel.js +100 -0
  54. package/dist/esm/release-history-panel.js.map +1 -0
  55. package/dist/esm/release-notes-card.js +23 -0
  56. package/dist/esm/release-notes-card.js.map +1 -0
  57. package/dist/esm/security-card.js +700 -0
  58. package/dist/esm/security-card.js.map +1 -0
  59. package/dist/esm/support-bundle-collection-card.js +170 -0
  60. package/dist/esm/support-bundle-collection-card.js.map +1 -0
  61. package/dist/esm/support-bundles-card.js +306 -0
  62. package/dist/esm/support-bundles-card.js.map +1 -0
  63. package/dist/esm/support-card.js +305 -0
  64. package/dist/esm/support-card.js.map +1 -0
  65. package/dist/esm/team-selection.js +117 -0
  66. package/dist/esm/team-selection.js.map +1 -0
  67. package/dist/esm/team-settings-card.js +78 -0
  68. package/dist/esm/team-settings-card.js.map +1 -0
  69. package/dist/esm/team-settings.js +136 -0
  70. package/dist/esm/team-settings.js.map +1 -0
  71. package/dist/esm/top-nav-user-menu.js +173 -0
  72. package/dist/esm/top-nav-user-menu.js.map +1 -0
  73. package/dist/esm/top-nav.js +398 -0
  74. package/dist/esm/top-nav.js.map +1 -0
  75. package/dist/esm/update-layout.js +405 -0
  76. package/dist/esm/update-layout.js.map +1 -0
  77. package/dist/esm/updates-card.js +85 -0
  78. package/dist/esm/updates-card.js.map +1 -0
  79. package/dist/esm/upload-support-bundle-modal.js +143 -0
  80. package/dist/esm/upload-support-bundle-modal.js.map +1 -0
  81. package/dist/esm/user-settings-card.js +21 -0
  82. package/dist/esm/user-settings-card.js.map +1 -0
  83. package/dist/esm/user-settings.js +368 -0
  84. package/dist/esm/user-settings.js.map +1 -0
  85. package/dist/esm/utils/index.js +170 -0
  86. package/dist/esm/utils/index.js.map +1 -0
  87. package/dist/helm-install-wizard.d.mts +38 -0
  88. package/dist/helm-install-wizard.d.ts +38 -0
  89. package/dist/helm-install-wizard.js +1011 -0
  90. package/dist/helm-install-wizard.js.map +1 -0
  91. package/dist/index.d.mts +11 -27
  92. package/dist/index.d.ts +11 -27
  93. package/dist/index.js +2258 -154
  94. package/dist/index.js.map +1 -1
  95. package/dist/install-B19AaKF_.d.mts +233 -0
  96. package/dist/install-Bi1qJ8Bu.d.ts +233 -0
  97. package/dist/install-actions.d.mts +141 -0
  98. package/dist/install-actions.d.ts +141 -0
  99. package/dist/install-actions.js +765 -0
  100. package/dist/install-actions.js.map +1 -0
  101. package/dist/install-card.d.mts +15 -0
  102. package/dist/install-card.d.ts +15 -0
  103. package/dist/install-card.js +117 -0
  104. package/dist/install-card.js.map +1 -0
  105. package/dist/install-targets.d.mts +19 -0
  106. package/dist/install-targets.d.ts +19 -0
  107. package/dist/install-targets.js +50 -0
  108. package/dist/install-targets.js.map +1 -0
  109. package/dist/instance-card.d.mts +22 -0
  110. package/dist/instance-card.d.ts +22 -0
  111. package/dist/instance-card.js +199 -0
  112. package/dist/instance-card.js.map +1 -0
  113. package/dist/join-team.d.mts +30 -0
  114. package/dist/join-team.d.ts +30 -0
  115. package/dist/join-team.js +220 -0
  116. package/dist/join-team.js.map +1 -0
  117. package/dist/license-card.d.mts +15 -0
  118. package/dist/license-card.d.ts +15 -0
  119. package/dist/license-card.js +133 -0
  120. package/dist/license-card.js.map +1 -0
  121. package/dist/license-details.d.mts +10 -0
  122. package/dist/license-details.d.ts +10 -0
  123. package/dist/license-details.js +669 -0
  124. package/dist/license-details.js.map +1 -0
  125. package/dist/linux-install-wizard.d.mts +66 -0
  126. package/dist/linux-install-wizard.d.ts +66 -0
  127. package/dist/linux-install-wizard.js +1093 -0
  128. package/dist/linux-install-wizard.js.map +1 -0
  129. package/dist/login.d.mts +37 -0
  130. package/dist/login.d.ts +37 -0
  131. package/dist/login.js +263 -0
  132. package/dist/login.js.map +1 -0
  133. package/dist/online-instance-list.d.mts +22 -0
  134. package/dist/online-instance-list.d.ts +22 -0
  135. package/dist/online-instance-list.js +289 -0
  136. package/dist/online-instance-list.js.map +1 -0
  137. package/dist/pending-installations.d.mts +15 -0
  138. package/dist/pending-installations.d.ts +15 -0
  139. package/dist/pending-installations.js +237 -0
  140. package/dist/pending-installations.js.map +1 -0
  141. package/dist/release-history-panel.d.mts +22 -0
  142. package/dist/release-history-panel.d.ts +22 -0
  143. package/dist/release-history-panel.js +102 -0
  144. package/dist/release-history-panel.js.map +1 -0
  145. package/dist/release-notes-card.d.mts +13 -0
  146. package/dist/release-notes-card.d.ts +13 -0
  147. package/dist/release-notes-card.js +25 -0
  148. package/dist/release-notes-card.js.map +1 -0
  149. package/dist/security-card.d.mts +73 -0
  150. package/dist/security-card.d.ts +73 -0
  151. package/dist/security-card.js +702 -0
  152. package/dist/security-card.js.map +1 -0
  153. package/dist/styles.css +1877 -194
  154. package/dist/support-bundle-collection-card.d.mts +20 -0
  155. package/dist/support-bundle-collection-card.d.ts +20 -0
  156. package/dist/support-bundle-collection-card.js +172 -0
  157. package/dist/support-bundle-collection-card.js.map +1 -0
  158. package/dist/support-bundles-card.d.mts +19 -0
  159. package/dist/support-bundles-card.d.ts +19 -0
  160. package/dist/support-bundles-card.js +308 -0
  161. package/dist/support-bundles-card.js.map +1 -0
  162. package/dist/support-card.d.mts +8 -0
  163. package/dist/support-card.d.ts +8 -0
  164. package/dist/support-card.js +307 -0
  165. package/dist/support-card.js.map +1 -0
  166. package/dist/team-selection.d.mts +23 -0
  167. package/dist/team-selection.d.ts +23 -0
  168. package/dist/team-selection.js +119 -0
  169. package/dist/team-selection.js.map +1 -0
  170. package/dist/team-settings-card-Dq1d9b5c.d.mts +14 -0
  171. package/dist/team-settings-card-Dq1d9b5c.d.ts +14 -0
  172. package/dist/team-settings-card.d.mts +2 -0
  173. package/dist/team-settings-card.d.ts +2 -0
  174. package/dist/team-settings-card.js +80 -0
  175. package/dist/team-settings-card.js.map +1 -0
  176. package/dist/team-settings.d.mts +25 -0
  177. package/dist/team-settings.d.ts +25 -0
  178. package/dist/team-settings.js +138 -0
  179. package/dist/team-settings.js.map +1 -0
  180. package/dist/top-nav-0mb1K_H0.d.mts +32 -0
  181. package/dist/top-nav-0mb1K_H0.d.ts +32 -0
  182. package/dist/top-nav-user-menu.d.mts +18 -0
  183. package/dist/top-nav-user-menu.d.ts +18 -0
  184. package/dist/top-nav-user-menu.js +175 -0
  185. package/dist/top-nav-user-menu.js.map +1 -0
  186. package/dist/top-nav.d.mts +3 -0
  187. package/dist/top-nav.d.ts +3 -0
  188. package/dist/top-nav.js +400 -0
  189. package/dist/top-nav.js.map +1 -0
  190. package/dist/update-layout.d.mts +12 -0
  191. package/dist/update-layout.d.ts +12 -0
  192. package/dist/update-layout.js +407 -0
  193. package/dist/update-layout.js.map +1 -0
  194. package/dist/updates-card-BbubBrVR.d.mts +18 -0
  195. package/dist/updates-card-BbubBrVR.d.ts +18 -0
  196. package/dist/updates-card.d.mts +2 -0
  197. package/dist/updates-card.d.ts +2 -0
  198. package/dist/updates-card.js +87 -0
  199. package/dist/updates-card.js.map +1 -0
  200. package/dist/upload-support-bundle-modal.d.mts +19 -0
  201. package/dist/upload-support-bundle-modal.d.ts +19 -0
  202. package/dist/upload-support-bundle-modal.js +145 -0
  203. package/dist/upload-support-bundle-modal.js.map +1 -0
  204. package/dist/user-settings-card.d.mts +8 -0
  205. package/dist/user-settings-card.d.ts +8 -0
  206. package/dist/user-settings-card.js +23 -0
  207. package/dist/user-settings-card.js.map +1 -0
  208. package/dist/user-settings.d.mts +47 -0
  209. package/dist/user-settings.d.ts +47 -0
  210. package/dist/user-settings.js +370 -0
  211. package/dist/user-settings.js.map +1 -0
  212. package/dist/utils/index.d.mts +70 -0
  213. package/dist/utils/index.d.ts +70 -0
  214. package/dist/utils/index.js +177 -0
  215. package/dist/utils/index.js.map +1 -0
  216. package/package.json +163 -3
@@ -0,0 +1,407 @@
1
+ 'use strict';
2
+
3
+ var buffer = require('buffer');
4
+ var react = require('react');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ /**
8
+ * Enterprise Portal Components
9
+ * This file is generated by tsup. Do not edit manually.
10
+ */
11
+
12
+
13
+ // src/actions/index.ts
14
+ var getApiOrigin = () => {
15
+ return (process.env.REPLICATED_APP_ORIGIN || "https://replicated.app").replace(/\/+$/, "");
16
+ };
17
+ var fetchCustomBrandingImpl = async () => {
18
+ const appSlug = process.env.PORTAL_APP_SLUG;
19
+ if (!appSlug) {
20
+ throw new Error("PORTAL_APP_SLUG is not configured");
21
+ }
22
+ const url = `${getApiOrigin()}/v3/custom-branding?app_slug=${encodeURIComponent(
23
+ appSlug
24
+ )}`;
25
+ if (process.env.NODE_ENV !== "production") {
26
+ console.debug(
27
+ "[portal-components] fetching custom branding via %s",
28
+ url
29
+ );
30
+ }
31
+ const response = await fetch(url, {
32
+ headers: {
33
+ accept: "application/json"
34
+ }
35
+ });
36
+ if (!response.ok) {
37
+ throw new Error(
38
+ `Custom branding request failed (${response.status} ${response.statusText})`
39
+ );
40
+ }
41
+ const payload = await response.json();
42
+ const brandingData = payload?.branding_data;
43
+ if (typeof brandingData !== "string") {
44
+ throw new Error("Custom branding response missing branding_data string");
45
+ }
46
+ return {
47
+ brandingData,
48
+ documentation: payload?.documentation ?? null
49
+ };
50
+ };
51
+ var fetchCustomBranding = react.cache(fetchCustomBrandingImpl);
52
+ var defaultHiddenLabels = ["Download"];
53
+ var defaultTopNavLinks = [
54
+ {
55
+ label: "Dashboard",
56
+ href: "/",
57
+ icon: /* @__PURE__ */ jsxRuntime.jsxs(
58
+ "svg",
59
+ {
60
+ xmlns: "http://www.w3.org/2000/svg",
61
+ viewBox: "0 0 24 24",
62
+ className: "h-4 w-4",
63
+ fill: "none",
64
+ stroke: "currentColor",
65
+ strokeWidth: "1.5",
66
+ children: [
67
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 13h6V3H4z" }),
68
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14 21h6V3h-6z" })
69
+ ]
70
+ }
71
+ )
72
+ },
73
+ {
74
+ label: "Download",
75
+ icon: /* @__PURE__ */ jsxRuntime.jsxs(
76
+ "svg",
77
+ {
78
+ xmlns: "http://www.w3.org/2000/svg",
79
+ viewBox: "0 0 24 24",
80
+ className: "h-4 w-4",
81
+ fill: "none",
82
+ stroke: "currentColor",
83
+ strokeWidth: "1.5",
84
+ children: [
85
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 3v12" }),
86
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m7 11 5 5 5-5" }),
87
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 21h14" })
88
+ ]
89
+ }
90
+ )
91
+ },
92
+ {
93
+ label: "Install",
94
+ href: "/install",
95
+ icon: /* @__PURE__ */ jsxRuntime.jsxs(
96
+ "svg",
97
+ {
98
+ xmlns: "http://www.w3.org/2000/svg",
99
+ viewBox: "0 0 24 24",
100
+ className: "h-4 w-4",
101
+ fill: "none",
102
+ stroke: "currentColor",
103
+ strokeWidth: "1.5",
104
+ children: [
105
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 5v14" }),
106
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14" })
107
+ ]
108
+ }
109
+ )
110
+ },
111
+ {
112
+ label: "Update",
113
+ href: "/update",
114
+ icon: /* @__PURE__ */ jsxRuntime.jsxs(
115
+ "svg",
116
+ {
117
+ xmlns: "http://www.w3.org/2000/svg",
118
+ viewBox: "0 0 24 24",
119
+ className: "h-4 w-4",
120
+ fill: "none",
121
+ stroke: "currentColor",
122
+ strokeWidth: "1.5",
123
+ children: [
124
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 4v6h6" }),
125
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 20v-6h-6" }),
126
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 10c1.5-4 6-6 10-4m6 4c-1.5 4-6 6-10 4" })
127
+ ]
128
+ }
129
+ )
130
+ },
131
+ {
132
+ label: "Release History",
133
+ href: "/release-history",
134
+ icon: /* @__PURE__ */ jsxRuntime.jsxs(
135
+ "svg",
136
+ {
137
+ xmlns: "http://www.w3.org/2000/svg",
138
+ viewBox: "0 0 24 24",
139
+ className: "h-4 w-4",
140
+ fill: "none",
141
+ stroke: "currentColor",
142
+ strokeWidth: "1.5",
143
+ children: [
144
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 8v4l3 2" }),
145
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "9" })
146
+ ]
147
+ }
148
+ )
149
+ },
150
+ {
151
+ label: "License",
152
+ href: "/license",
153
+ icon: /* @__PURE__ */ jsxRuntime.jsxs(
154
+ "svg",
155
+ {
156
+ xmlns: "http://www.w3.org/2000/svg",
157
+ viewBox: "0 0 24 24",
158
+ className: "h-4 w-4",
159
+ fill: "none",
160
+ stroke: "currentColor",
161
+ strokeWidth: "1.5",
162
+ children: [
163
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "14", height: "18", x: "5", y: "3", rx: "2" }),
164
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 7h6" }),
165
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 11h6" }),
166
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 15h6" })
167
+ ]
168
+ }
169
+ )
170
+ },
171
+ {
172
+ label: "Support",
173
+ href: "/support",
174
+ icon: /* @__PURE__ */ jsxRuntime.jsxs(
175
+ "svg",
176
+ {
177
+ xmlns: "http://www.w3.org/2000/svg",
178
+ viewBox: "0 0 24 24",
179
+ className: "h-4 w-4",
180
+ fill: "none",
181
+ stroke: "currentColor",
182
+ strokeWidth: "1.5",
183
+ children: [
184
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 16a6 6 0 1 0-12 0v2h12Z" }),
185
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "7", r: "4" })
186
+ ]
187
+ }
188
+ )
189
+ }
190
+ ];
191
+ var orderLinks = (links, order) => {
192
+ if (!order || order.length === 0) {
193
+ return links;
194
+ }
195
+ const orderMap = new Map(order.map((label, index) => [label, index]));
196
+ return links.map((link, index) => ({
197
+ link,
198
+ originalIndex: index,
199
+ orderIndex: orderMap.has(link.label) ? orderMap.get(link.label) : order.length + index
200
+ })).sort((a, b) => {
201
+ if (a.orderIndex === b.orderIndex) {
202
+ return a.originalIndex - b.originalIndex;
203
+ }
204
+ return a.orderIndex - b.orderIndex;
205
+ }).map((item) => item.link);
206
+ };
207
+ var TopNav = async ({
208
+ links,
209
+ hiddenLabels,
210
+ additionalLinks,
211
+ order,
212
+ userMenuLabel,
213
+ activeLabel,
214
+ customerName,
215
+ customers,
216
+ currentCustomerId,
217
+ onChangeTeam,
218
+ userMenuChildren
219
+ }) => {
220
+ const displayLabel = userMenuLabel || (customerName ? `Team: ${customerName}` : "Team: Example");
221
+ let logo;
222
+ let brandTitle;
223
+ let customColor1;
224
+ let customColor2;
225
+ const normalizeColor = (color) => {
226
+ if (!color || typeof color !== "string") {
227
+ return void 0;
228
+ }
229
+ const trimmed = color.trim();
230
+ if (/^#?[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/.test(trimmed)) {
231
+ return trimmed.startsWith("#") ? trimmed : `#${trimmed}`;
232
+ }
233
+ return trimmed;
234
+ };
235
+ try {
236
+ const branding = await fetchCustomBranding();
237
+ if (branding.brandingData) {
238
+ const decoded = buffer.Buffer.from(branding.brandingData, "base64").toString(
239
+ "utf-8"
240
+ );
241
+ try {
242
+ const parsed = JSON.parse(decoded);
243
+ if (parsed?.logo && typeof parsed.logo === "string") {
244
+ logo = parsed.logo;
245
+ }
246
+ if (parsed?.title && typeof parsed.title === "string") {
247
+ const normalizedTitle = parsed.title.trim();
248
+ if (normalizedTitle) {
249
+ brandTitle = normalizedTitle;
250
+ }
251
+ }
252
+ if (parsed?.customColor1 && typeof parsed.customColor1 === "string") {
253
+ customColor1 = normalizeColor(parsed.customColor1);
254
+ }
255
+ if (parsed?.customColor2 && typeof parsed.customColor2 === "string") {
256
+ customColor2 = normalizeColor(parsed.customColor2);
257
+ }
258
+ } catch (error) {
259
+ console.debug(
260
+ "[portal-components] unable to parse branding JSON",
261
+ error
262
+ );
263
+ }
264
+ } else {
265
+ console.debug("[portal-components] branding", branding);
266
+ }
267
+ } catch (error) {
268
+ console.debug("[portal-components] branding fetch failed", error);
269
+ }
270
+ const baseLinks = links ?? defaultTopNavLinks;
271
+ const computedHiddenLabels = hiddenLabels ? hiddenLabels : links ? void 0 : defaultHiddenLabels;
272
+ const hiddenSet = computedHiddenLabels ? new Set(computedHiddenLabels) : null;
273
+ let resolvedLinks = baseLinks.filter(
274
+ (link) => !hiddenSet?.has(link.label)
275
+ );
276
+ if (additionalLinks?.length) {
277
+ resolvedLinks = [...resolvedLinks, ...additionalLinks];
278
+ }
279
+ resolvedLinks = orderLinks(resolvedLinks, order);
280
+ const gradientStart = customColor1 ?? "rgb(235, 102, 88)";
281
+ const gradientEnd = customColor2 ?? customColor1 ?? "rgb(184, 83, 71)";
282
+ return /* @__PURE__ */ jsxRuntime.jsx(
283
+ "div",
284
+ {
285
+ className: "relative flex h-[165px] w-full items-start justify-center",
286
+ style: {
287
+ backgroundImage: `linear-gradient(to top, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0) 33%), linear-gradient(${gradientStart}, ${gradientEnd})`,
288
+ backgroundRepeat: "no-repeat",
289
+ backgroundSize: "100% 100%"
290
+ },
291
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mt-[30px] w-full max-w-[1248px] px-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[135px] flex-col justify-between space-y-4 rounded bg-[#ffffffe6] px-6 pt-6 pb-4 shadow-[0_10px_60px_rgba(16,16,16,0.35)]", children: [
292
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
293
+ logo || brandTitle ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
294
+ logo ? (
295
+ // eslint-disable-next-line @next/next/no-img-element
296
+ /* @__PURE__ */ jsxRuntime.jsx(
297
+ "img",
298
+ {
299
+ src: logo,
300
+ alt: "Portal logo",
301
+ className: "object-contain",
302
+ style: {
303
+ maxWidth: "240px",
304
+ maxHeight: "48px"
305
+ }
306
+ }
307
+ )
308
+ ) : null,
309
+ brandTitle ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold text-gray-900", children: brandTitle }) : null
310
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", {}),
311
+ /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "group relative", children: [
312
+ /* @__PURE__ */ jsxRuntime.jsxs("summary", { className: "flex cursor-pointer items-center gap-2 rounded-lg bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 list-none", children: [
313
+ /* @__PURE__ */ jsxRuntime.jsxs(
314
+ "svg",
315
+ {
316
+ xmlns: "http://www.w3.org/2000/svg",
317
+ width: "16",
318
+ height: "16",
319
+ viewBox: "0 0 24 24",
320
+ fill: "none",
321
+ stroke: "currentColor",
322
+ strokeWidth: "2",
323
+ strokeLinecap: "round",
324
+ strokeLinejoin: "round",
325
+ className: "text-gray-500",
326
+ children: [
327
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }),
328
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "7", r: "4" })
329
+ ]
330
+ }
331
+ ),
332
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: displayLabel }),
333
+ /* @__PURE__ */ jsxRuntime.jsx(
334
+ "svg",
335
+ {
336
+ xmlns: "http://www.w3.org/2000/svg",
337
+ width: "16",
338
+ height: "16",
339
+ viewBox: "0 0 24 24",
340
+ fill: "none",
341
+ stroke: "currentColor",
342
+ strokeWidth: "2",
343
+ strokeLinecap: "round",
344
+ strokeLinejoin: "round",
345
+ className: "text-gray-500",
346
+ children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "6 9 12 15 18 9" })
347
+ }
348
+ )
349
+ ] }),
350
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute right-0 mt-2 w-48 rounded-md border border-gray-200 bg-white py-2 text-sm text-gray-700 shadow-lg z-50", children: [
351
+ /* @__PURE__ */ jsxRuntime.jsx(
352
+ "a",
353
+ {
354
+ href: "/user-settings",
355
+ className: "block w-full px-4 py-2 text-left hover:bg-gray-100",
356
+ children: "User settings"
357
+ }
358
+ ),
359
+ /* @__PURE__ */ jsxRuntime.jsx(
360
+ "a",
361
+ {
362
+ href: "/team-settings",
363
+ className: "block w-full px-4 py-2 text-left hover:bg-gray-100",
364
+ children: "Team settings"
365
+ }
366
+ ),
367
+ userMenuChildren,
368
+ /* @__PURE__ */ jsxRuntime.jsx(
369
+ "a",
370
+ {
371
+ href: "/?expired=1",
372
+ className: "block w-full px-4 py-2 text-left hover:bg-gray-100",
373
+ children: "Logout"
374
+ }
375
+ )
376
+ ] })
377
+ ] })
378
+ ] }),
379
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 flex flex-wrap gap-3 border-b border-gray-200 pb-2 text-sm font-medium text-gray-500", children: resolvedLinks.map(({ label, icon, href }) => {
380
+ const isActive = activeLabel === label;
381
+ const className = `flex items-center gap-2 px-4 py-1 transition text-gray-500 ${isActive ? "underline underline-offset-8 decoration-2" : ""}`;
382
+ if (href) {
383
+ return /* @__PURE__ */ jsxRuntime.jsxs("a", { href, className, children: [
384
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: isActive ? "text-rose-600" : "text-gray-500", children: icon }),
385
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
386
+ ] }, label);
387
+ }
388
+ return /* @__PURE__ */ jsxRuntime.jsxs("button", { className, type: "button", children: [
389
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: isActive ? "text-rose-600" : "text-gray-500", children: icon }),
390
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
391
+ ] }, label);
392
+ }) })
393
+ ] }) })
394
+ }
395
+ );
396
+ };
397
+ var UpdateLayout = ({ children }) => {
398
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-screen bg-white", children: [
399
+ /* @__PURE__ */ jsxRuntime.jsx(TopNav, { activeLabel: "Updates" }),
400
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 py-8", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto w-full max-w-[1248px]", children }) })
401
+ ] });
402
+ };
403
+ UpdateLayout.displayName = "UpdateLayout";
404
+
405
+ exports.UpdateLayout = UpdateLayout;
406
+ //# sourceMappingURL=update-layout.js.map
407
+ //# sourceMappingURL=update-layout.js.map