@flamingo-stack/openframe-frontend-core 0.0.404-snapshot.20260711053526 → 0.0.404

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 (147) hide show
  1. package/dist/{chunk-F3YLM5PO.js → chunk-3I4IZYHM.js} +3 -3
  2. package/dist/{chunk-QYTGHN2T.js → chunk-5Z5GXXRU.js} +4 -4
  3. package/dist/{chunk-DHIYBC5Z.cjs → chunk-6MO5HF6P.cjs} +32 -32
  4. package/dist/{chunk-DHIYBC5Z.cjs.map → chunk-6MO5HF6P.cjs.map} +1 -1
  5. package/dist/{chunk-UIAQXIA6.js → chunk-A636Y7GU.js} +5 -5
  6. package/dist/{chunk-BK7QCB5J.js → chunk-AMPQKNAX.js} +6 -6
  7. package/dist/{chunk-ACJ4CM6H.cjs → chunk-CRUPO3MR.cjs} +93 -93
  8. package/dist/{chunk-ACJ4CM6H.cjs.map → chunk-CRUPO3MR.cjs.map} +1 -1
  9. package/dist/{chunk-E6YHDT3D.js → chunk-DH6HTYOV.js} +2 -6
  10. package/dist/chunk-DH6HTYOV.js.map +1 -0
  11. package/dist/{chunk-VFWEFR3Q.cjs → chunk-FFWIUNOT.cjs} +40 -40
  12. package/dist/{chunk-VFWEFR3Q.cjs.map → chunk-FFWIUNOT.cjs.map} +1 -1
  13. package/dist/{chunk-FFYEDIAG.cjs → chunk-G3QYCV63.cjs} +441 -499
  14. package/dist/chunk-G3QYCV63.cjs.map +1 -0
  15. package/dist/{chunk-ELLTTMPE.cjs → chunk-G4YLKA7O.cjs} +5 -5
  16. package/dist/{chunk-ELLTTMPE.cjs.map → chunk-G4YLKA7O.cjs.map} +1 -1
  17. package/dist/{chunk-BX3R44MR.cjs → chunk-GA5AN24T.cjs} +2 -2
  18. package/dist/chunk-GA5AN24T.cjs.map +1 -0
  19. package/dist/{chunk-GT7AJXKH.js → chunk-GYFUGMNM.js} +2 -2
  20. package/dist/{chunk-5XZEY34X.js → chunk-HBO2DMX4.js} +3 -3
  21. package/dist/{chunk-WJRPMULP.js → chunk-HGKWTKW7.js} +2 -2
  22. package/dist/chunk-HGKWTKW7.js.map +1 -0
  23. package/dist/{chunk-CCIBZ7TO.cjs → chunk-J4XR6YYZ.cjs} +6 -10
  24. package/dist/chunk-J4XR6YYZ.cjs.map +1 -0
  25. package/dist/{chunk-V4MOB3AD.cjs → chunk-KVB7SHXY.cjs} +12 -12
  26. package/dist/{chunk-V4MOB3AD.cjs.map → chunk-KVB7SHXY.cjs.map} +1 -1
  27. package/dist/{chunk-6OQ7YOX5.cjs → chunk-M7LIGEAX.cjs} +33 -33
  28. package/dist/{chunk-6OQ7YOX5.cjs.map → chunk-M7LIGEAX.cjs.map} +1 -1
  29. package/dist/{chunk-PNJ5LMVK.js → chunk-MTBFE3JF.js} +2 -16
  30. package/dist/chunk-MTBFE3JF.js.map +1 -0
  31. package/dist/{chunk-3XCNFTFV.js → chunk-NOWXUQWF.js} +3 -3
  32. package/dist/{chunk-WEZIVLCO.cjs → chunk-OJ4HFM3I.cjs} +18 -18
  33. package/dist/{chunk-WEZIVLCO.cjs.map → chunk-OJ4HFM3I.cjs.map} +1 -1
  34. package/dist/{chunk-M6BGJVDY.cjs → chunk-PFQQ5H6G.cjs} +19 -19
  35. package/dist/{chunk-M6BGJVDY.cjs.map → chunk-PFQQ5H6G.cjs.map} +1 -1
  36. package/dist/{chunk-QAFRLO5N.cjs → chunk-Q3AO2QWK.cjs} +4 -18
  37. package/dist/chunk-Q3AO2QWK.cjs.map +1 -0
  38. package/dist/{chunk-LREN3G7R.cjs → chunk-QXAHXMPD.cjs} +12 -12
  39. package/dist/{chunk-LREN3G7R.cjs.map → chunk-QXAHXMPD.cjs.map} +1 -1
  40. package/dist/{chunk-RC35ITSR.js → chunk-R6SMQ2CO.js} +6 -6
  41. package/dist/{chunk-RIGB7LP7.js → chunk-RNKXG55J.js} +4 -4
  42. package/dist/{chunk-FOJRR647.cjs → chunk-S4ZHBKGS.cjs} +73 -73
  43. package/dist/{chunk-FOJRR647.cjs.map → chunk-S4ZHBKGS.cjs.map} +1 -1
  44. package/dist/{chunk-BS6O4HLJ.cjs → chunk-TBXE5S6P.cjs} +40 -40
  45. package/dist/{chunk-BS6O4HLJ.cjs.map → chunk-TBXE5S6P.cjs.map} +1 -1
  46. package/dist/{chunk-ICJRSNBM.js → chunk-TTUQSOBL.js} +3 -61
  47. package/dist/chunk-TTUQSOBL.js.map +1 -0
  48. package/dist/{chunk-UN2BJ7XW.js → chunk-YORONSXG.js} +3 -3
  49. package/dist/{chunk-Q2KKEE6W.js → chunk-YXOWUHGQ.js} +6 -6
  50. package/dist/components/announcement-bar.d.ts +1 -27
  51. package/dist/components/announcement-bar.d.ts.map +1 -1
  52. package/dist/components/case-studies/index.cjs +10 -10
  53. package/dist/components/case-studies/index.js +4 -4
  54. package/dist/components/chat/index.cjs +4 -4
  55. package/dist/components/chat/index.js +3 -3
  56. package/dist/components/contact/index.cjs +5 -5
  57. package/dist/components/contact/index.js +4 -4
  58. package/dist/components/docs/index.cjs +7 -7
  59. package/dist/components/docs/index.js +6 -6
  60. package/dist/components/embeds/index.cjs +5 -5
  61. package/dist/components/embeds/index.js +4 -4
  62. package/dist/components/faq/index.cjs +6 -6
  63. package/dist/components/faq/index.js +5 -5
  64. package/dist/components/features/index.cjs +4 -4
  65. package/dist/components/features/index.js +3 -3
  66. package/dist/components/help-center-pages/index.cjs +23 -23
  67. package/dist/components/help-center-pages/index.js +14 -14
  68. package/dist/components/index.cjs +299 -274
  69. package/dist/components/index.cjs.map +1 -1
  70. package/dist/components/index.js +135 -110
  71. package/dist/components/index.js.map +1 -1
  72. package/dist/components/navigation/index.cjs +4 -4
  73. package/dist/components/navigation/index.js +3 -3
  74. package/dist/components/onboarding-guides/index.cjs +8 -8
  75. package/dist/components/onboarding-guides/index.js +7 -7
  76. package/dist/components/related-content/index.cjs +6 -6
  77. package/dist/components/related-content/index.js +5 -5
  78. package/dist/components/tickets/index.cjs +7 -7
  79. package/dist/components/tickets/index.js +6 -6
  80. package/dist/components/ui/file-manager/index.cjs +50 -50
  81. package/dist/components/ui/file-manager/index.js +1 -1
  82. package/dist/components/ui/index.cjs +4 -4
  83. package/dist/components/ui/index.js +3 -3
  84. package/dist/hooks/api-hooks.d.ts +4 -0
  85. package/dist/hooks/api-hooks.d.ts.map +1 -1
  86. package/dist/hooks/index.cjs +2 -2
  87. package/dist/hooks/index.js +1 -1
  88. package/dist/hooks/use-self-fetch.d.ts +0 -7
  89. package/dist/hooks/use-self-fetch.d.ts.map +1 -1
  90. package/dist/index.cjs +4 -20
  91. package/dist/index.cjs.map +1 -1
  92. package/dist/index.js +3 -19
  93. package/dist/types/announcement.cjs +0 -5
  94. package/dist/types/announcement.cjs.map +1 -1
  95. package/dist/types/announcement.d.ts +7 -37
  96. package/dist/types/announcement.d.ts.map +1 -1
  97. package/dist/types/announcement.js +1 -5
  98. package/dist/types/announcement.js.map +1 -1
  99. package/dist/types/index.cjs +0 -5
  100. package/dist/types/index.cjs.map +1 -1
  101. package/dist/types/index.js +1 -5
  102. package/dist/types/index.js.map +1 -1
  103. package/dist/utils/announcement-storage.d.ts +7 -39
  104. package/dist/utils/announcement-storage.d.ts.map +1 -1
  105. package/dist/utils/app-config.d.ts.map +1 -1
  106. package/dist/utils/color-analysis.d.ts +0 -13
  107. package/dist/utils/color-analysis.d.ts.map +1 -1
  108. package/dist/utils/index.cjs +1 -58
  109. package/dist/utils/index.cjs.map +1 -1
  110. package/dist/utils/index.d.ts +0 -1
  111. package/dist/utils/index.d.ts.map +1 -1
  112. package/dist/utils/index.js +2 -52
  113. package/dist/utils/index.js.map +1 -1
  114. package/package.json +1 -1
  115. package/src/components/.announcement-bar.md +30 -32
  116. package/src/components/announcement-bar.tsx +182 -227
  117. package/src/components/ui/button/button.tsx +1 -1
  118. package/src/hooks/.api-hooks.md +4 -1
  119. package/src/hooks/api-hooks.ts +7 -0
  120. package/src/hooks/use-self-fetch.ts +1 -29
  121. package/src/stories/AnnouncementBar.stories.tsx +152 -188
  122. package/src/types/.announcement.md +2 -2
  123. package/src/types/announcement.ts +7 -37
  124. package/src/utils/.announcement-storage.md +24 -19
  125. package/src/utils/announcement-storage.ts +28 -74
  126. package/src/utils/app-config.ts +1 -10
  127. package/src/utils/color-analysis.ts +1 -16
  128. package/src/utils/index.ts +0 -3
  129. package/dist/chunk-BX3R44MR.cjs.map +0 -1
  130. package/dist/chunk-CCIBZ7TO.cjs.map +0 -1
  131. package/dist/chunk-E6YHDT3D.js.map +0 -1
  132. package/dist/chunk-FFYEDIAG.cjs.map +0 -1
  133. package/dist/chunk-ICJRSNBM.js.map +0 -1
  134. package/dist/chunk-PNJ5LMVK.js.map +0 -1
  135. package/dist/chunk-QAFRLO5N.cjs.map +0 -1
  136. package/dist/chunk-WJRPMULP.js.map +0 -1
  137. /package/dist/{chunk-F3YLM5PO.js.map → chunk-3I4IZYHM.js.map} +0 -0
  138. /package/dist/{chunk-QYTGHN2T.js.map → chunk-5Z5GXXRU.js.map} +0 -0
  139. /package/dist/{chunk-UIAQXIA6.js.map → chunk-A636Y7GU.js.map} +0 -0
  140. /package/dist/{chunk-BK7QCB5J.js.map → chunk-AMPQKNAX.js.map} +0 -0
  141. /package/dist/{chunk-GT7AJXKH.js.map → chunk-GYFUGMNM.js.map} +0 -0
  142. /package/dist/{chunk-5XZEY34X.js.map → chunk-HBO2DMX4.js.map} +0 -0
  143. /package/dist/{chunk-3XCNFTFV.js.map → chunk-NOWXUQWF.js.map} +0 -0
  144. /package/dist/{chunk-RC35ITSR.js.map → chunk-R6SMQ2CO.js.map} +0 -0
  145. /package/dist/{chunk-RIGB7LP7.js.map → chunk-RNKXG55J.js.map} +0 -0
  146. /package/dist/{chunk-UN2BJ7XW.js.map → chunk-YORONSXG.js.map} +0 -0
  147. /package/dist/{chunk-Q2KKEE6W.js.map → chunk-YXOWUHGQ.js.map} +0 -0
@@ -4,7 +4,7 @@ import "../chunk-GZ4C3XW6.js";
4
4
  import {
5
5
  GROUP_PAGE_SIZE,
6
6
  RelatedContentSection
7
- } from "../chunk-3XCNFTFV.js";
7
+ } from "../chunk-NOWXUQWF.js";
8
8
  import {
9
9
  DeliveryLists,
10
10
  DeliveryTable,
@@ -21,7 +21,7 @@ import {
21
21
  useLegalDocs,
22
22
  usePaginationLoading,
23
23
  useRoadmapVoting
24
- } from "../chunk-Q2KKEE6W.js";
24
+ } from "../chunk-YXOWUHGQ.js";
25
25
  import {
26
26
  AnnouncementBarSkeleton,
27
27
  ArticleLayoutSkeleton,
@@ -54,17 +54,17 @@ import {
54
54
  useDocNavigation,
55
55
  useDocumentTree,
56
56
  useScrollSpy
57
- } from "../chunk-UIAQXIA6.js";
57
+ } from "../chunk-A636Y7GU.js";
58
58
  import {
59
59
  FileDownloadCard,
60
60
  GoogleSheetsViewer,
61
61
  PdfViewer
62
- } from "../chunk-UN2BJ7XW.js";
62
+ } from "../chunk-YORONSXG.js";
63
63
  import {
64
64
  FaqAccordion,
65
65
  FaqDocumentPage,
66
66
  FaqSection
67
- } from "../chunk-QYTGHN2T.js";
67
+ } from "../chunk-5Z5GXXRU.js";
68
68
  import {
69
69
  DeliveryRow,
70
70
  DevCardRowContent,
@@ -75,11 +75,11 @@ import {
75
75
  EmptyState,
76
76
  UnifiedPagination,
77
77
  init_unified_pagination
78
- } from "../chunk-F3YLM5PO.js";
78
+ } from "../chunk-3I4IZYHM.js";
79
79
  import {
80
80
  ArticleAuthorByline,
81
81
  DetailPageSkeleton
82
- } from "../chunk-GT7AJXKH.js";
82
+ } from "../chunk-GYFUGMNM.js";
83
83
  import {
84
84
  DocSearchBar,
85
85
  DocSearchResultRow,
@@ -87,10 +87,8 @@ import {
87
87
  mapDocSearchResults,
88
88
  resolveSearchResultAction,
89
89
  useDocSearch
90
- } from "../chunk-5XZEY34X.js";
91
- import {
92
- useSelfFetch
93
- } from "../chunk-PNJ5LMVK.js";
90
+ } from "../chunk-HBO2DMX4.js";
91
+ import "../chunk-MTBFE3JF.js";
94
92
  import "../chunk-4XLJWX2N.js";
95
93
  import {
96
94
  ADMIN_APPROVAL_REQUEST_CONTEXT_TYPE,
@@ -724,7 +722,6 @@ import {
724
722
  buildNatsWsUrl,
725
723
  buildProductReleaseCardProps,
726
724
  chatChipClass,
727
- clearLegacyAnnouncementCache,
728
725
  clickupTaskUrl,
729
726
  columnFromTicketStatus,
730
727
  computeHistoryPrepend,
@@ -736,7 +733,6 @@ import {
736
733
  defaultTableIdForDocumentType,
737
734
  deriveColumns,
738
735
  detectAspectRatio,
739
- dismissAnnouncement,
740
736
  escapeMarkdownInline,
741
737
  executeNavigation,
742
738
  executeNavigationImperative,
@@ -788,7 +784,6 @@ import {
788
784
  handleChatNavClick,
789
785
  hideOnError,
790
786
  init_pagination,
791
- isAnnouncementDismissed,
792
787
  isApprovalNotification,
793
788
  isControlChunk,
794
789
  isCrossOriginUrl,
@@ -809,7 +804,6 @@ import {
809
804
  parseChunkToAction,
810
805
  parseScrollAnchor,
811
806
  parseWireCommandOverride,
812
- pickReadableTextColor,
813
807
  processHistoricalMessages,
814
808
  processHistoricalMessagesWithErrors,
815
809
  programItemToStripProfile,
@@ -879,7 +873,7 @@ import {
879
873
  useVideoOriginPreconnect,
880
874
  useVideoWarmup,
881
875
  usesCanonicalStatusStyle
882
- } from "../chunk-ICJRSNBM.js";
876
+ } from "../chunk-TTUQSOBL.js";
883
877
  import {
884
878
  CommandApprovalToast,
885
879
  ToastCard,
@@ -898,7 +892,7 @@ import {
898
892
  showToast,
899
893
  useOnboardingState,
900
894
  useToast
901
- } from "../chunk-E6YHDT3D.js";
895
+ } from "../chunk-DH6HTYOV.js";
902
896
  import "../chunk-OYGFWWLQ.js";
903
897
  import {
904
898
  useChatRuntime,
@@ -944,7 +938,7 @@ import {
944
938
  SplitButton,
945
939
  buttonVariants,
946
940
  init_button2 as init_button
947
- } from "../chunk-WJRPMULP.js";
941
+ } from "../chunk-HGKWTKW7.js";
948
942
  import "../chunk-6U3IUD57.js";
949
943
  import {
950
944
  init_next_link,
@@ -1115,145 +1109,176 @@ import "../chunk-GGWZFCYS.js";
1115
1109
 
1116
1110
  // src/components/announcement-bar.tsx
1117
1111
  init_button();
1118
- import { useEffect, useMemo, useState } from "react";
1112
+ import { useState, useEffect } from "react";
1119
1113
  import { X } from "lucide-react";
1114
+
1115
+ // src/utils/announcement-storage.ts
1116
+ function getStoredAnnouncement(key) {
1117
+ if (typeof window !== "undefined") {
1118
+ try {
1119
+ return JSON.parse(localStorage.getItem(key) || "null");
1120
+ } catch {
1121
+ return null;
1122
+ }
1123
+ }
1124
+ return null;
1125
+ }
1126
+ function setStoredAnnouncement(key, value) {
1127
+ if (typeof window !== "undefined") {
1128
+ try {
1129
+ localStorage.setItem(key, JSON.stringify(value));
1130
+ } catch {
1131
+ }
1132
+ }
1133
+ }
1134
+ function clearStoredAnnouncement(key = "announcement") {
1135
+ if (typeof window !== "undefined") {
1136
+ try {
1137
+ localStorage.removeItem(key);
1138
+ } catch {
1139
+ }
1140
+ }
1141
+ }
1142
+
1143
+ // src/components/announcement-bar.tsx
1120
1144
  import { jsx, jsxs } from "react/jsx-runtime";
1121
- function AnnouncementBar({
1122
- initialAnnouncement,
1123
- previewMode = false,
1124
- className
1125
- } = {}) {
1145
+ function AnnouncementBar() {
1146
+ const [announcement, setAnnouncement] = useState(null);
1147
+ const [isVisible, setIsVisible] = useState(false);
1126
1148
  const platform = getAppType();
1127
1149
  const endpoints = useEndpointsRuntime();
1128
- const url = previewMode ? null : endpoints?.announcementsUrl ?? null;
1129
- const initialData = useMemo(
1130
- () => initialAnnouncement === void 0 ? void 0 : { announcement: initialAnnouncement },
1131
- [initialAnnouncement]
1132
- );
1133
- const { data } = useSelfFetch(url, {
1134
- initialData,
1135
- revalidateOnVisibleAfterMs: 6e4
1136
- });
1137
- const announcement = data?.announcement ?? null;
1138
- const [expandedState, setExpandedState] = useState(() => initialAnnouncement != null);
1139
- const expanded = previewMode ? announcement != null : expandedState;
1140
- useEffect(() => {
1141
- if (previewMode) return;
1142
- clearLegacyAnnouncementCache(platform);
1143
- }, []);
1144
- useEffect(() => {
1145
- if (previewMode) return;
1146
- if (!announcement) {
1147
- setExpandedState(false);
1148
- return;
1150
+ const announcementsUrl = endpoints?.announcementsUrl;
1151
+ const getDismissKey = (id) => `${platform}-announcement-${id}-dismissed`;
1152
+ const getCacheKey = () => `${platform}-announcement-cache`;
1153
+ const fetchActiveAnnouncement = async () => {
1154
+ if (!announcementsUrl) return;
1155
+ try {
1156
+ const response = await fetch(announcementsUrl);
1157
+ if (response.ok) {
1158
+ const data = await response.json();
1159
+ if (data.announcement) {
1160
+ setAnnouncement(data.announcement);
1161
+ setStoredAnnouncement(getCacheKey(), data.announcement);
1162
+ const isDismissed = localStorage.getItem(getDismissKey(data.announcement.id));
1163
+ setIsVisible(!isDismissed);
1164
+ } else {
1165
+ setAnnouncement(null);
1166
+ setIsVisible(false);
1167
+ clearStoredAnnouncement(getCacheKey());
1168
+ }
1169
+ } else {
1170
+ console.error(`\u274C [${platform.toUpperCase()}] Error fetching announcement: ${response.status}`);
1171
+ setAnnouncement(null);
1172
+ setIsVisible(false);
1173
+ clearStoredAnnouncement(getCacheKey());
1174
+ }
1175
+ } catch (error) {
1176
+ console.error("Error fetching active announcement:", error);
1177
+ setAnnouncement(null);
1178
+ setIsVisible(false);
1179
+ clearStoredAnnouncement(getCacheKey());
1149
1180
  }
1150
- if (isAnnouncementDismissed(platform, announcement.id)) {
1151
- dismissAnnouncement(platform, announcement.id);
1152
- setExpandedState(false);
1153
- } else {
1154
- setExpandedState(true);
1181
+ };
1182
+ useEffect(() => {
1183
+ const cached = getStoredAnnouncement(getCacheKey());
1184
+ if (cached) {
1185
+ const isDismissed = localStorage.getItem(getDismissKey(cached.id));
1186
+ setAnnouncement(cached);
1187
+ setIsVisible(!isDismissed);
1155
1188
  }
1156
- }, [data]);
1189
+ if (!announcementsUrl) return;
1190
+ fetchActiveAnnouncement();
1191
+ const interval = setInterval(fetchActiveAnnouncement, 3e5);
1192
+ return () => clearInterval(interval);
1193
+ }, [announcementsUrl]);
1157
1194
  const handleDismiss = () => {
1158
- if (previewMode || !announcement) return;
1159
- dismissAnnouncement(platform, announcement.id);
1160
- setExpandedState(false);
1195
+ if (!announcement) return;
1196
+ localStorage.setItem(getDismissKey(announcement.id), "true");
1197
+ setIsVisible(false);
1161
1198
  };
1162
1199
  const handleCtaClick = () => {
1163
- if (previewMode || !announcement?.cta_url) return;
1164
- let safeUrl;
1165
- try {
1166
- const parsed = new URL(announcement.cta_url, window.location.origin);
1167
- if (parsed.protocol !== "http:" && parsed.protocol !== "https:") return;
1168
- safeUrl = parsed.href;
1169
- } catch {
1170
- return;
1171
- }
1172
- announcement.cta_target === "_blank" ? window.open(safeUrl, "_blank", "noopener,noreferrer") : window.location.href = safeUrl;
1200
+ if (!announcement?.cta_url) return;
1201
+ announcement.cta_target === "_blank" ? window.open(announcement.cta_url, "_blank", "noopener,noreferrer") : window.location.href = announcement.cta_url;
1173
1202
  };
1174
- if (!announcement) return null;
1175
- const themeScope = pickReadableTextColor(announcement.background_color) === "dark" ? "theme-light" : "theme-dark";
1176
- const barButtonClasses = "text-[color:var(--ods-system-greys-white)] hover:bg-[var(--ods-system-greys-black-hover)] active:bg-[var(--ods-system-greys-black-action)]";
1177
- const hasCta = Boolean(announcement.cta_enabled && announcement.cta_url);
1203
+ const renderIcon = () => {
1204
+ if (!announcement) return null;
1205
+ return /* @__PURE__ */ jsx(
1206
+ EntityIcon,
1207
+ {
1208
+ icon: {
1209
+ name: announcement.icon_name || "openframe-logo",
1210
+ url: announcement.icon_url,
1211
+ props: announcement.icon_props
1212
+ },
1213
+ size: 32,
1214
+ className: "relative shrink-0 w-6 h-6 md:w-8 md:h-8"
1215
+ }
1216
+ );
1217
+ };
1218
+ if (!announcement || !isVisible) return null;
1178
1219
  return /* @__PURE__ */ jsx(
1179
1220
  "div",
1180
1221
  {
1181
- role: "region",
1182
- "aria-label": "Announcement",
1183
- "aria-hidden": !expanded,
1222
+ className: "relative w-full z-50",
1223
+ style: { backgroundColor: announcement.background_color },
1184
1224
  "data-announcement-bar": true,
1185
- className: `relative w-full z-50 grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none ${className ?? ""}`,
1186
- style: { gridTemplateRows: expanded ? "1fr" : "0fr" },
1187
- children: /* @__PURE__ */ jsx("div", { className: `min-h-0 overflow-hidden ${themeScope}`, style: { backgroundColor: announcement.background_color }, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center w-full max-w-full min-h-11 text-[color:var(--ods-system-greys-white)]", children: [
1225
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-center w-full max-w-full", children: [
1188
1226
  /* @__PURE__ */ jsxs(
1189
1227
  "div",
1190
1228
  {
1191
- className: `flex flex-row gap-2 md:gap-3 items-center pl-4 md:pl-6 py-1.5 flex-1 min-w-0 ${hasCta ? "md:cursor-default cursor-pointer" : ""}`,
1229
+ className: `flex flex-row gap-2 md:gap-4 items-center pl-4 md:pl-6 py-1.5 md:py-2 flex-1 min-w-0 ${announcement.cta_enabled && announcement.cta_url ? "md:cursor-default cursor-pointer" : ""}`,
1192
1230
  onClick: (e) => {
1193
- if (window.innerWidth < 768 && hasCta) {
1231
+ if (window.innerWidth < 768 && announcement.cta_enabled && announcement.cta_url) {
1194
1232
  e.preventDefault();
1195
1233
  handleCtaClick();
1196
1234
  }
1197
1235
  },
1198
1236
  children: [
1199
- /* @__PURE__ */ jsx(
1200
- EntityIcon,
1201
- {
1202
- icon: {
1203
- name: announcement.icon_name || "openframe-logo",
1204
- url: announcement.icon_url,
1205
- props: announcement.icon_props
1206
- },
1207
- size: 24,
1208
- className: "relative shrink-0 w-5 h-5 md:w-6 md:h-6"
1209
- }
1210
- ),
1211
- /* @__PURE__ */ jsxs("p", { className: "font-body flex-1 min-w-0 max-w-full text-[13px] md:text-sm leading-snug truncate mb-0", children: [
1212
- /* @__PURE__ */ jsx("span", { className: "font-semibold", children: announcement.title }),
1213
- announcement.description && /* @__PURE__ */ jsxs("span", { className: "hidden sm:inline opacity-80", children: [
1214
- " \xB7 ",
1215
- announcement.description
1216
- ] })
1237
+ renderIcon(),
1238
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0 max-w-full", children: [
1239
+ /* @__PURE__ */ jsx("p", { className: "font-body font-bold text-[14px] md:text-[18px] leading-tight tracking-tight mb-0 text-[#1A1A1A] truncate", children: announcement.title }),
1240
+ /* @__PURE__ */ jsx("p", { className: "font-body text-[12px] md:text-[18px] leading-tight hidden md:block text-[#1A1A1A] truncate", children: announcement.description })
1217
1241
  ] }),
1218
- hasCta && announcement.cta_text && /* @__PURE__ */ jsx("div", { className: "hidden md:flex flex-shrink-0 ml-1", children: /* @__PURE__ */ jsx(
1242
+ announcement.cta_enabled && announcement.cta_text && announcement.cta_url && /* @__PURE__ */ jsx("div", { className: "hidden md:flex flex-shrink-0 ml-1 md:ml-2", children: /* @__PURE__ */ jsx(
1219
1243
  Button,
1220
1244
  {
1221
1245
  onClick: handleCtaClick,
1222
- variant: "transparent",
1223
- size: "small",
1224
- className: barButtonClasses,
1225
- tabIndex: expanded ? 0 : -1,
1246
+ variant: "outline",
1247
+ size: "small-legacy",
1226
1248
  leftIcon: announcement.cta_show_icon && announcement.cta_icon_name ? /* @__PURE__ */ jsx(
1227
1249
  EntityIcon,
1228
1250
  {
1229
1251
  icon: { name: announcement.cta_icon_name, props: announcement.cta_icon_props },
1230
- size: 14,
1231
- className: "w-3.5 h-3.5"
1252
+ size: 16,
1253
+ className: "w-3 h-3 md:w-4 md:h-4"
1232
1254
  }
1233
1255
  ) : void 0,
1256
+ className: "transition-opacity hover:opacity-90 text-xs md:text-sm whitespace-nowrap",
1257
+ style: {
1258
+ backgroundColor: announcement.cta_button_background_color || void 0,
1259
+ color: announcement.cta_button_text_color || void 0,
1260
+ borderColor: announcement.cta_button_background_color || void 0
1261
+ },
1234
1262
  children: announcement.cta_text
1235
1263
  }
1236
1264
  ) })
1237
1265
  ]
1238
1266
  }
1239
1267
  ),
1240
- /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 mr-1 md:mr-3", children: /* @__PURE__ */ jsx(
1241
- Button,
1268
+ /* @__PURE__ */ jsx(
1269
+ "button",
1242
1270
  {
1243
1271
  onClick: (e) => {
1244
1272
  e.stopPropagation();
1245
1273
  handleDismiss();
1246
1274
  },
1247
- variant: "transparent",
1248
- size: "icon-sm",
1249
- className: barButtonClasses,
1275
+ className: "flex-shrink-0 w-8 h-8 md:w-10 md:h-10 flex items-center justify-center hover:bg-[#1A1A1A]/10 focus:outline-none focus:ring-2 focus:ring-[#1A1A1A] mr-2 md:mr-4",
1250
1276
  "aria-label": "Dismiss announcement",
1251
1277
  type: "button",
1252
- tabIndex: expanded ? 0 : -1,
1253
- children: /* @__PURE__ */ jsx(X, { strokeWidth: 2 })
1278
+ children: /* @__PURE__ */ jsx(X, { className: "w-4 h-4 text-[#1A1A1A]", strokeWidth: 2 })
1254
1279
  }
1255
- ) })
1256
- ] }) })
1280
+ )
1281
+ ] })
1257
1282
  }
1258
1283
  );
1259
1284
  }