@flamingo-stack/openframe-frontend-core 0.0.408 → 0.0.409-snapshot.20260711140256

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flamingo-stack/openframe-frontend-core",
3
- "version": "0.0.408",
3
+ "version": "0.0.409-snapshot.20260711140256",
4
4
  "description": "Shared design system and components for all Flamingo platforms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -9,6 +9,7 @@ import {
9
9
  isAnnouncementDismissed,
10
10
  clearLegacyAnnouncementCache,
11
11
  } from '../utils/announcement-storage';
12
+ import { ANNOUNCEMENT_CTA_DEFAULTS } from '../types/announcement';
12
13
  import type { Announcement, AnnouncementBarProps, AnnouncementResponse } from '../types/announcement';
13
14
  import { getAppType } from '../utils/app-config';
14
15
  import { useEndpointsRuntime } from '../contexts/endpoints-runtime-context';
@@ -175,7 +176,7 @@ export function AnnouncementBar({
175
176
  aria-label="Announcement"
176
177
  aria-hidden={!expanded}
177
178
  data-announcement-bar
178
- className={`relative w-full z-50 grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none ${className ?? ''}`}
179
+ className={`relative w-full grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none ${previewMode ? '' : 'z-50'} ${className ?? ''}`}
179
180
  style={{ gridTemplateRows: expanded ? '1fr' : '0fr' }}
180
181
  >
181
182
  {/*
@@ -225,19 +226,26 @@ export function AnnouncementBar({
225
226
  )}
226
227
  </p>
227
228
 
228
- {/* CTA - the common Button in the bar's quiet treatment: ghost
229
- surface, computed-foreground text, translucent fg-tint hover
230
- (barButtonClasses) so nothing renders as a dark slab on the
231
- admin color. The admin cta_button_* colors are NOT applied:
232
- they were designed for the legacy bespoke treatment. Hidden
233
- on mobile, where the whole bar is the tap target. */}
229
+ {/* CTA - the common Button carrying the ADMIN-CONFIGURED colors
230
+ (cta_button_background_color / cta_button_text_color are an
231
+ admin FEATURE, defaults from ANNOUNCEMENT_CTA_DEFAULTS
232
+ announcement colors are data, not token surfaces). Inline
233
+ styles win over the variant's hover classes on every state,
234
+ so hover feedback is opacity (the bar's original treatment);
235
+ nothing can render dark-on-dark. Hidden on mobile, where the
236
+ whole bar is the tap target. */}
234
237
  {hasCta && displayAnnouncement.cta_text && (
235
- <div className="hidden md:flex flex-shrink-0 ml-1">
238
+ <div className="hidden md:flex flex-shrink-0 ml-2 md:ml-4">
236
239
  <Button
237
240
  onClick={handleCtaClick}
238
- variant="transparent"
241
+ variant="outline"
239
242
  size="small"
240
- className={barButtonClasses}
243
+ className="transition-opacity hover:opacity-90"
244
+ style={{
245
+ backgroundColor: displayAnnouncement.cta_button_background_color || ANNOUNCEMENT_CTA_DEFAULTS.background,
246
+ color: displayAnnouncement.cta_button_text_color || ANNOUNCEMENT_CTA_DEFAULTS.text,
247
+ borderColor: displayAnnouncement.cta_button_background_color || ANNOUNCEMENT_CTA_DEFAULTS.background,
248
+ }}
241
249
  tabIndex={expanded ? 0 : -1}
242
250
  leftIcon={
243
251
  displayAnnouncement.cta_show_icon && displayAnnouncement.cta_icon_name
@@ -261,7 +269,7 @@ export function AnnouncementBar({
261
269
  (size="icon-sm": 32px target, >= the 24px WCAG 2.5.8 AA floor,
262
270
  16px glyph) with the bar's quiet tint hover. Inert in
263
271
  previewMode. */}
264
- <div className="flex-shrink-0 mr-1 md:mr-3">
272
+ <div className="flex-shrink-0 ml-1 md:ml-2 mr-2 md:mr-4">
265
273
  <Button
266
274
  onClick={(e) => {
267
275
  e.stopPropagation(); // Prevent triggering the mobile CTA click