@flamingo-stack/openframe-frontend-core 0.0.596-2034.5687.1 → 0.0.596

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 (152) hide show
  1. package/dist/{chunk-SQXNSIGS.cjs → chunk-4S5E7NOM.cjs} +5 -5
  2. package/dist/{chunk-SQXNSIGS.cjs.map → chunk-4S5E7NOM.cjs.map} +1 -1
  3. package/dist/{chunk-MRW4QU2L.js → chunk-6EBKO275.js} +3 -3
  4. package/dist/{chunk-5JMMSSMV.js → chunk-7L5ROE3Z.js} +3 -3
  5. package/dist/{chunk-PHNFKPWJ.js → chunk-AVIZUQRW.js} +2 -2
  6. package/dist/{chunk-XW4JIRYE.cjs → chunk-AYVTVUZT.cjs} +15 -15
  7. package/dist/{chunk-XW4JIRYE.cjs.map → chunk-AYVTVUZT.cjs.map} +1 -1
  8. package/dist/{chunk-KQ2X5FUP.cjs → chunk-B3NX4GZS.cjs} +3 -3
  9. package/dist/{chunk-KQ2X5FUP.cjs.map → chunk-B3NX4GZS.cjs.map} +1 -1
  10. package/dist/{chunk-Y3VGUQIW.cjs → chunk-DVSTM6QK.cjs} +33 -33
  11. package/dist/{chunk-Y3VGUQIW.cjs.map → chunk-DVSTM6QK.cjs.map} +1 -1
  12. package/dist/{chunk-WVSUQTPS.cjs → chunk-EQ3DAGD7.cjs} +43 -43
  13. package/dist/{chunk-WVSUQTPS.cjs.map → chunk-EQ3DAGD7.cjs.map} +1 -1
  14. package/dist/{chunk-H7NBAAIH.cjs → chunk-FCNICDWP.cjs} +9 -9
  15. package/dist/{chunk-H7NBAAIH.cjs.map → chunk-FCNICDWP.cjs.map} +1 -1
  16. package/dist/{chunk-6QBKSVAZ.cjs → chunk-FV5VGJE6.cjs} +3 -3
  17. package/dist/{chunk-6QBKSVAZ.cjs.map → chunk-FV5VGJE6.cjs.map} +1 -1
  18. package/dist/{chunk-XIEV46BX.js → chunk-GOD47MJM.js} +6 -4
  19. package/dist/{chunk-XIEV46BX.js.map → chunk-GOD47MJM.js.map} +1 -1
  20. package/dist/{chunk-PMIKKJMI.js → chunk-HFJSBIXL.js} +3 -3
  21. package/dist/{chunk-R6IV75YP.cjs → chunk-IMIR5V6E.cjs} +26 -24
  22. package/dist/chunk-IMIR5V6E.cjs.map +1 -0
  23. package/dist/{chunk-MEHPKLH5.js → chunk-KU3JQWYJ.js} +5 -5
  24. package/dist/{chunk-36PHDSTO.js → chunk-MF324FSD.js} +30 -30
  25. package/dist/chunk-MF324FSD.js.map +1 -0
  26. package/dist/{chunk-KJ4O6NSF.js → chunk-MGBWMZEL.js} +2 -2
  27. package/dist/{chunk-DYTFM2MX.cjs → chunk-MIC4HHVZ.cjs} +23 -21
  28. package/dist/chunk-MIC4HHVZ.cjs.map +1 -0
  29. package/dist/{chunk-PWXQBKFP.js → chunk-N7SFQMCH.js} +2 -2
  30. package/dist/{chunk-VNQ2LF6G.cjs → chunk-OEDUVTPT.cjs} +10 -10
  31. package/dist/{chunk-VNQ2LF6G.cjs.map → chunk-OEDUVTPT.cjs.map} +1 -1
  32. package/dist/{chunk-BTRH2YFY.cjs → chunk-OGTXZFFE.cjs} +71 -70
  33. package/dist/chunk-OGTXZFFE.cjs.map +1 -0
  34. package/dist/{chunk-EWBOBUCM.js → chunk-P2SECY3U.js} +5 -5
  35. package/dist/{chunk-NM5Q56PX.js → chunk-PTXOWFRB.js} +8 -7
  36. package/dist/chunk-PTXOWFRB.js.map +1 -0
  37. package/dist/{chunk-VZMCNCW5.js → chunk-PYWF5JJW.js} +5 -5
  38. package/dist/{chunk-JF56KVHW.cjs → chunk-R5IWJONE.cjs} +187 -187
  39. package/dist/chunk-R5IWJONE.cjs.map +1 -0
  40. package/dist/{chunk-2VGIM6WY.js → chunk-SSSZ64YG.js} +5 -3
  41. package/dist/chunk-SSSZ64YG.js.map +1 -0
  42. package/dist/{chunk-E2ALHISW.cjs → chunk-SXVGFJ24.cjs} +22 -22
  43. package/dist/{chunk-E2ALHISW.cjs.map → chunk-SXVGFJ24.cjs.map} +1 -1
  44. package/dist/{chunk-AOANH6ZJ.js → chunk-TRJJMZSQ.js} +2 -2
  45. package/dist/{chunk-47IZN43H.js → chunk-VD3ZAA2O.js} +3 -3
  46. package/dist/{chunk-E7MTTLKC.js → chunk-VNSRNVPD.js} +2 -2
  47. package/dist/{chunk-E7MTTLKC.js.map → chunk-VNSRNVPD.js.map} +1 -1
  48. package/dist/{chunk-SSUJ4Z62.cjs → chunk-WRWXND3X.cjs} +10 -10
  49. package/dist/{chunk-SSUJ4Z62.cjs.map → chunk-WRWXND3X.cjs.map} +1 -1
  50. package/dist/{chunk-L7GNBUXF.cjs → chunk-YBPFIXV4.cjs} +2 -2
  51. package/dist/{chunk-L7GNBUXF.cjs.map → chunk-YBPFIXV4.cjs.map} +1 -1
  52. package/dist/{chunk-26GIURMP.cjs → chunk-YNO4DEXK.cjs} +4 -4
  53. package/dist/{chunk-26GIURMP.cjs.map → chunk-YNO4DEXK.cjs.map} +1 -1
  54. package/dist/components/case-studies/index.cjs +9 -9
  55. package/dist/components/case-studies/index.js +3 -3
  56. package/dist/components/chat/index.cjs +2 -2
  57. package/dist/components/chat/index.js +1 -1
  58. package/dist/components/contact/contact-form.d.ts.map +1 -1
  59. package/dist/components/contact/index.cjs +4 -4
  60. package/dist/components/contact/index.js +3 -3
  61. package/dist/components/docs/index.cjs +7 -7
  62. package/dist/components/docs/index.js +6 -6
  63. package/dist/components/embeds/index.cjs +4 -4
  64. package/dist/components/embeds/index.js +3 -3
  65. package/dist/components/faq/index.cjs +4 -4
  66. package/dist/components/faq/index.js +3 -3
  67. package/dist/components/features/auth/terms-agreement-label.d.ts.map +1 -1
  68. package/dist/components/features/index.cjs +3 -3
  69. package/dist/components/features/index.js +2 -2
  70. package/dist/components/help-center-pages/index.cjs +23 -23
  71. package/dist/components/help-center-pages/index.js +14 -14
  72. package/dist/components/index.cjs +38 -38
  73. package/dist/components/index.js +13 -13
  74. package/dist/components/meeting-scheduler/booking-form.d.ts +8 -4
  75. package/dist/components/meeting-scheduler/booking-form.d.ts.map +1 -1
  76. package/dist/components/meeting-scheduler/index.cjs +53 -38
  77. package/dist/components/meeting-scheduler/index.cjs.map +1 -1
  78. package/dist/components/meeting-scheduler/index.d.ts +12 -1
  79. package/dist/components/meeting-scheduler/index.d.ts.map +1 -1
  80. package/dist/components/meeting-scheduler/index.js +31 -16
  81. package/dist/components/meeting-scheduler/index.js.map +1 -1
  82. package/dist/components/navigation/header-global-search.d.ts.map +1 -1
  83. package/dist/components/navigation/index.cjs +6 -6
  84. package/dist/components/navigation/index.js +5 -5
  85. package/dist/components/onboarding-guides/index.cjs +6 -6
  86. package/dist/components/onboarding-guides/index.js +5 -5
  87. package/dist/components/tickets/index.cjs +7 -7
  88. package/dist/components/tickets/index.js +6 -6
  89. package/dist/components/tickets/ticket-open-form.d.ts.map +1 -1
  90. package/dist/components/ui/admin-form-modal.d.ts.map +1 -1
  91. package/dist/components/ui/benefit-card.d.ts +1 -1
  92. package/dist/components/ui/benefit-card.d.ts.map +1 -1
  93. package/dist/components/ui/checkbox-block.d.ts +2 -1
  94. package/dist/components/ui/checkbox-block.d.ts.map +1 -1
  95. package/dist/components/ui/icon-tile.d.ts +3 -2
  96. package/dist/components/ui/icon-tile.d.ts.map +1 -1
  97. package/dist/components/ui/index.cjs +3 -3
  98. package/dist/components/ui/index.js +2 -2
  99. package/dist/components/ui/policy-link.d.ts +9 -1
  100. package/dist/components/ui/policy-link.d.ts.map +1 -1
  101. package/dist/index.cjs +9 -7
  102. package/dist/index.cjs.map +1 -1
  103. package/dist/index.js +8 -6
  104. package/dist/index.js.map +1 -1
  105. package/dist/utils/hubspot-collected-forms.d.ts +22 -0
  106. package/dist/utils/hubspot-collected-forms.d.ts.map +1 -0
  107. package/dist/utils/hubspot-meetings-convention.d.ts +3 -1
  108. package/dist/utils/hubspot-meetings-convention.d.ts.map +1 -1
  109. package/dist/utils/index.cjs +5 -1
  110. package/dist/utils/index.cjs.map +1 -1
  111. package/dist/utils/index.d.ts +1 -0
  112. package/dist/utils/index.d.ts.map +1 -1
  113. package/dist/utils/index.js +5 -2
  114. package/dist/utils/index.js.map +1 -1
  115. package/package.json +1 -1
  116. package/src/__tests__/meeting-scheduler-details-first.test.tsx +25 -4
  117. package/src/components/contact/contact-form.tsx +2 -0
  118. package/src/components/features/auth/terms-agreement-label.tsx +6 -16
  119. package/src/components/features/video-center-badge.tsx +2 -2
  120. package/src/components/meeting-scheduler/booking-form.tsx +22 -7
  121. package/src/components/meeting-scheduler/index.tsx +39 -17
  122. package/src/components/navigation/header-global-search.tsx +2 -0
  123. package/src/components/tickets/ticket-open-form.tsx +2 -1
  124. package/src/components/ui/admin-form-modal.tsx +2 -0
  125. package/src/components/ui/benefit-card.tsx +5 -1
  126. package/src/components/ui/checkbox-block.tsx +4 -1
  127. package/src/components/ui/icon-tile.tsx +3 -2
  128. package/src/components/ui/policy-link.tsx +18 -2
  129. package/src/styles/app-globals.css +1 -1
  130. package/src/styles/index.css +1 -0
  131. package/src/styles/ods-effects.css +53 -0
  132. package/src/utils/hubspot-collected-forms.ts +19 -0
  133. package/src/utils/hubspot-meetings-convention.ts +4 -2
  134. package/src/utils/index.ts +1 -0
  135. package/dist/chunk-2VGIM6WY.js.map +0 -1
  136. package/dist/chunk-36PHDSTO.js.map +0 -1
  137. package/dist/chunk-BTRH2YFY.cjs.map +0 -1
  138. package/dist/chunk-DYTFM2MX.cjs.map +0 -1
  139. package/dist/chunk-JF56KVHW.cjs.map +0 -1
  140. package/dist/chunk-NM5Q56PX.js.map +0 -1
  141. package/dist/chunk-R6IV75YP.cjs.map +0 -1
  142. /package/dist/{chunk-MRW4QU2L.js.map → chunk-6EBKO275.js.map} +0 -0
  143. /package/dist/{chunk-5JMMSSMV.js.map → chunk-7L5ROE3Z.js.map} +0 -0
  144. /package/dist/{chunk-PHNFKPWJ.js.map → chunk-AVIZUQRW.js.map} +0 -0
  145. /package/dist/{chunk-PMIKKJMI.js.map → chunk-HFJSBIXL.js.map} +0 -0
  146. /package/dist/{chunk-MEHPKLH5.js.map → chunk-KU3JQWYJ.js.map} +0 -0
  147. /package/dist/{chunk-KJ4O6NSF.js.map → chunk-MGBWMZEL.js.map} +0 -0
  148. /package/dist/{chunk-PWXQBKFP.js.map → chunk-N7SFQMCH.js.map} +0 -0
  149. /package/dist/{chunk-EWBOBUCM.js.map → chunk-P2SECY3U.js.map} +0 -0
  150. /package/dist/{chunk-VZMCNCW5.js.map → chunk-PYWF5JJW.js.map} +0 -0
  151. /package/dist/{chunk-AOANH6ZJ.js.map → chunk-TRJJMZSQ.js.map} +0 -0
  152. /package/dist/{chunk-47IZN43H.js.map → chunk-VD3ZAA2O.js.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flamingo-stack/openframe-frontend-core",
3
- "version": "0.0.596-2034.5687.1",
3
+ "version": "0.0.596",
4
4
  "description": "Shared design system and components for all Flamingo platforms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -14,9 +14,12 @@ const availability: MeetingAvailability = {
14
14
  const book = vi.fn<(payload: Record<string, unknown>) => Promise<unknown>>();
15
15
  const refetchAvailability = vi.fn(() => Promise.resolve());
16
16
  const toast = vi.fn();
17
+ /** Mutable so a test can flip the hook's in-flight flag between renders. */
18
+ const hookState = { isSubmitting: false };
17
19
 
18
- vi.mock('../hooks/use-meeting-booking', () => ({
19
- BOOKING_IN_FLIGHT_MESSAGE: 'Already submitting',
20
+ vi.mock('../hooks/use-meeting-booking', async importOriginal => ({
21
+ // The sentinel keeps its ONE owner: only the hook itself is replaced.
22
+ ...(await importOriginal()),
20
23
  useMeetingBooking: () => ({
21
24
  availability,
22
25
  isLoadingAvailability: false,
@@ -26,19 +29,25 @@ vi.mock('../hooks/use-meeting-booking', () => ({
26
29
  setMonthOffset: vi.fn(),
27
30
  refetchAvailability,
28
31
  book,
29
- isSubmitting: false,
32
+ isSubmitting: hookState.isSubmitting,
30
33
  }),
31
34
  }));
32
35
  vi.mock('../hooks/use-toast', () => ({ useToast: () => ({ toast }) }));
33
36
 
37
+ // A factory, not a shared element: React bails out of re-rendering the SAME element object.
38
+ const scheduler = () => (
39
+ <HubSpotMeetingScheduler meetingId="1" flow="details-first" initialAvailability={availability} />
40
+ );
41
+
34
42
  async function continueFromDetails() {
35
- render(<HubSpotMeetingScheduler meetingId="1" flow="details-first" initialAvailability={availability} />);
43
+ const view = render(scheduler());
36
44
  await screen.findByLabelText(/^Email/);
37
45
  fillIdentity();
38
46
  fireEvent.click(screen.getByRole('button', { name: 'Continue' }));
39
47
  // The calendar step: Back exists here (it never does on the form step).
40
48
  await screen.findByRole('button', { name: 'Back' });
41
49
  expect(screen.queryByLabelText(/^Email/)).not.toBeInTheDocument();
50
+ return view;
42
51
  }
43
52
 
44
53
  const timeChip = async () => {
@@ -51,6 +60,7 @@ const timeChip = async () => {
51
60
  };
52
61
 
53
62
  beforeEach(() => {
63
+ hookState.isSubmitting = false;
54
64
  book.mockReset();
55
65
  refetchAvailability.mockClear();
56
66
  toast.mockClear();
@@ -85,4 +95,15 @@ describe('HubSpotMeetingScheduler — details-first flow', () => {
85
95
  expect(await screen.findByLabelText(/^Email/)).toHaveValue('a@b.co');
86
96
  expect(toast).toHaveBeenCalledWith(expect.objectContaining({ title: 'Booking failed' }));
87
97
  });
98
+
99
+ it('while a POST is in flight the chips are disabled and the calendar cannot be paged', async () => {
100
+ const { rerender } = await continueFromDetails();
101
+ const chipsBefore = await timeChip();
102
+ expect(chipsBefore).not.toBeDisabled();
103
+ hookState.isSubmitting = true;
104
+ rerender(scheduler());
105
+ const chips = screen.getAllByRole('button').filter(b => /\d{1,2}:\d{2}/.test(b.textContent ?? ''));
106
+ expect(chips.length).toBeGreaterThan(0);
107
+ expect(chips.every(b => (b as HTMLButtonElement).disabled)).toBe(true);
108
+ });
88
109
  });
@@ -33,6 +33,7 @@ import {
33
33
  referralSourceOptions,
34
34
  defaultHelpCategoryOptions,
35
35
  } from '../../schemas/contact-schema';
36
+ import { HUBSPOT_DO_NOT_COLLECT_FORM_PROPS } from '../../utils/hubspot-collected-forms';
36
37
  import { ChatAttachmentAddButton, ChatAttachmentChipStrip } from '../chat/chat-attachment-bar';
37
38
  import { useChatAttachments } from '../chat/hooks/use-chat-attachments';
38
39
  import type { ChatAttachment } from '../chat/utils/chat-attachment-markdown';
@@ -262,6 +263,7 @@ export function ContactForm({
262
263
  );
263
264
  })}
264
265
  className="flex flex-grow flex-col space-y-4 md:space-y-6"
266
+ {...HUBSPOT_DO_NOT_COLLECT_FORM_PROPS}
265
267
  >
266
268
  {/* Hidden inputs for fields that are required by `ContactSchema`
267
269
  but suppressed from the visible UI via `hideFields`. Without
@@ -1,5 +1,7 @@
1
1
  'use client';
2
2
 
3
+ import { PolicyLink } from '../../ui/policy-link';
4
+
3
5
  export interface TermsAgreementLabelProps {
4
6
  termsUrl?: string;
5
7
  privacyPolicyUrl?: string;
@@ -10,25 +12,13 @@ export function TermsAgreementLabel({ termsUrl = '#', privacyPolicyUrl = '#' }:
10
12
  return (
11
13
  <span className="text-ods-text-primary text-h4">
12
14
  {'Agree to '}
13
- <a
14
- href={termsUrl}
15
- target="_blank"
16
- rel="noopener noreferrer"
17
- className="text-ods-text-secondary underline"
18
- onClick={event => event.stopPropagation()}
19
- >
15
+ <PolicyLink href={termsUrl} tone="secondary">
20
16
  Terms
21
- </a>
17
+ </PolicyLink>
22
18
  {' & '}
23
- <a
24
- href={privacyPolicyUrl}
25
- target="_blank"
26
- rel="noopener noreferrer"
27
- className="text-ods-text-secondary underline"
28
- onClick={event => event.stopPropagation()}
29
- >
19
+ <PolicyLink href={privacyPolicyUrl} tone="secondary">
30
20
  Privacy Policy
31
- </a>
21
+ </PolicyLink>
32
22
  {' by signing up.'}
33
23
  </span>
34
24
  );
@@ -36,8 +36,8 @@ const SIZES: Record<VideoCenterBadgeSize, number> = {
36
36
  lg: 64, // hero facades
37
37
  };
38
38
 
39
- /** Soft legibility shadow — NOT a background (per design: bare glyphs). */
40
- const GLYPH_SHADOW = 'drop-shadow(0 1px 4px rgba(0,0,0,0.5))';
39
+ /** Soft legibility shadow — NOT a background (per design: bare glyphs). ODS effects own the value. */
40
+ const GLYPH_SHADOW = 'var(--ods-shadow-glyph)';
41
41
 
42
42
  export interface VideoPlayBadgeProps {
43
43
  size?: VideoCenterBadgeSize;
@@ -15,10 +15,12 @@ import {
15
15
  type BuiltInBookingField,
16
16
  type MeetingAvailability,
17
17
  type SupportedFormFieldType,
18
+ type MeetingFormField,
18
19
  type SupportedMeetingFormField,
19
20
  type BookingFormValues,
20
21
  } from '../../schemas/meeting-booking-schema';
21
22
  import { cn } from '../../utils/cn';
23
+ import { HUBSPOT_DO_NOT_COLLECT_FORM_PROPS } from '../../utils/hubspot-collected-forms';
22
24
  import {
23
25
  Button,
24
26
  FieldWrapper,
@@ -133,7 +135,8 @@ const slotColumnClass = (row: BookingFieldRow, slot: BookingFieldSlot, index: nu
133
135
  /** What one control needs: the field, its DOM id, where it registers in the
134
136
  * form, and the form's own register/control. */
135
137
  interface ControlArgs {
136
- field: SupportedMeetingFormField & Partial<Pick<BuiltInBookingField, 'inputType' | 'autoComplete' | 'placeholder'>>;
138
+ /** A declared question, or a built-in carrying its control hints (everything on the declaration that is not wire data). */
139
+ field: SupportedMeetingFormField & Partial<Omit<BuiltInBookingField, keyof MeetingFormField | 'requiredMessage'>>;
137
140
  id: string;
138
141
  /** Top-level for the built-ins (`email`), `formFields.<name>` for declared questions. */
139
142
  registerName: string;
@@ -514,8 +517,9 @@ export function BookingForm({
514
517
  </Button>
515
518
  );
516
519
 
520
+ // Opted out of HubSpot's collected-forms script — see HUBSPOT_DO_NOT_COLLECT_FORM_PROPS.
517
521
  return (
518
- <form onSubmit={submit} className={FORM_STACK} noValidate>
522
+ <form onSubmit={submit} className={FORM_STACK} noValidate {...HUBSPOT_DO_NOT_COLLECT_FORM_PROPS}>
519
523
  <HoneypotField {...honeypotInputProps} />
520
524
 
521
525
  {/* Email first, name pair below — the order the desktop and mobile mocks
@@ -655,11 +659,22 @@ export function BookingForm({
655
659
  * The slot-first skeleton (`SlotPickerSkeleton`) would put a grey calendar
656
660
  * where the form belongs — above the fold on a page whose entire content is
657
661
  * this card. Same footprint discipline as its sibling: fixed heights, and no
658
- * shift when the real form swaps in for single-line fields. A textarea row is
659
- * taller than its placeholder — the rows carry no type, so the skeleton cannot
660
- * know which slot is one.
662
+ * shift when the real form swaps in for single-line fields. Two footprints it
663
+ * cannot know: a textarea row is taller than its placeholder (the rows carry no
664
+ * type), and a HubSpot `legalConsent` block only exists once availability lands.
661
665
  */
662
- export function BookingFormSkeleton({ fieldRows, footerNote }: { fieldRows?: BookingFieldRow[]; footerNote?: string }) {
666
+ export function BookingFormSkeleton({
667
+ fieldRows,
668
+ consent,
669
+ footerNote,
670
+ }: {
671
+ fieldRows?: BookingFieldRow[];
672
+ /** Whether the host adds its consent row (drawn only then). A HubSpot
673
+ * `legalConsent` block is unknown until availability lands — the one
674
+ * footprint this skeleton cannot budget for. */
675
+ consent?: boolean;
676
+ footerNote?: string;
677
+ }) {
663
678
  return (
664
679
  <div className={cn('flex-1', FORM_STACK)}>
665
680
  {/* The host's rows (or the built-in layout) through the SAME grid, column
@@ -673,7 +688,7 @@ export function BookingFormSkeleton({ fieldRows, footerNote }: { fieldRows?: Boo
673
688
  ))}
674
689
  {/* Without rows there is no telling how many questions the link declares: one long answer stands for them. */}
675
690
  {!fieldRows && <Skeleton className="h-[7.75rem] w-full" />}
676
- <Skeleton className="h-[4.25rem] w-full" />
691
+ {consent && <Skeleton className="h-[4.25rem] w-full" />}
677
692
  {footerNote ? (
678
693
  <div className={FOOTER_ROW_CLASS}>
679
694
  <Skeleton className="h-5 min-w-40 flex-1" />
@@ -251,9 +251,20 @@ export const MEETING_SCHEDULER_H = 'md:h-[34.375rem] lg:h-[23.75rem]';
251
251
  * tablet and desktop, and the calendar stage fits the same box at both — the
252
252
  * times column scrolls inside it as it always has.
253
253
  *
254
+ * PHONES get a stated height too — the one place this flow departs from
255
+ * slot-first's "the page is the scroller". Slot-first's two stages are the
256
+ * same shape on a phone (calendar + a capped times list either way), so it
257
+ * needs none. Details-first's are not: the form stage, the calendar stage and
258
+ * the two-line confirmation each have their own natural height, and a paid
259
+ * landing page that grows and shrinks by tens of pixels on every step reads as
260
+ * broken. 812px is the calendar stage's natural height at 375px (header strip
261
+ * + six fixed weeks + the 9.75rem chip cap), so that stage fits exactly and the
262
+ * form stage — shorter on the shipped links — sits in it; a link declaring more
263
+ * questions scrolls the form inside the card, as it already does from `md`.
264
+ *
254
265
  * Hosts read it through `SCHEDULER_FLOW_PRESETS[flow].height`, never directly.
255
266
  */
256
- export const MEETING_SCHEDULER_DETAILS_FIRST_H = 'md:h-[39.875rem]';
267
+ export const MEETING_SCHEDULER_DETAILS_FIRST_H = 'h-[50.75rem] md:h-[39.875rem]';
257
268
 
258
269
  export type SchedulerFlow = 'slot-first' | 'details-first';
259
270
 
@@ -562,14 +573,14 @@ export function HubSpotMeetingScheduler({
562
573
  const backToDetails = useCallback(() => {
563
574
  // Not while a slot's POST is in flight — the step must stay on the
564
575
  // calendar the spinner lives on until the result routes it.
565
- if (inFlightRef.current) return;
576
+ if (postInFlight()) return;
566
577
  // No slot rides back to the form: in this flow the form never legitimately
567
578
  // holds one (the slot IS the submit), and a chip the server rejected with a
568
579
  // slot-step toast would otherwise print in the form's summary line.
569
580
  setSelectedSlot(null);
570
581
  setStep('details');
571
582
  setBookingError(null);
572
- }, []);
583
+ }, [postInFlight]);
573
584
 
574
585
  /**
575
586
  * details-first: Continue does not POST. It validates, freezes the answers
@@ -631,12 +642,14 @@ export function HubSpotMeetingScheduler({
631
642
  if (!detailsFirst) resetSignals();
632
643
  void refetchAvailability();
633
644
  } else {
645
+ // details-first: the chip that submitted is un-picked on EVERY failure —
646
+ // selection means submit in this flow, so a rejected chip must not sit
647
+ // in the selected variant (and the form's summary must never show a
648
+ // slot the server did not accept).
649
+ if (detailsFirst) setSelectedSlot(null);
634
650
  if (detailsFirst && (code === 'VALIDATION' || code === 'INVALID_EMAIL')) {
635
- // DETAILS errors in details-first: the form is unmounted by now, so
636
- // send the visitor back to it (the stash repopulates every answer).
637
- // The chip that submitted is un-picked too — the form's summary
638
- // must not show a slot the server never accepted.
639
- setSelectedSlot(null);
651
+ // DETAILS errors: the form is unmounted by now, so send the visitor
652
+ // back to it (the stash repopulates every answer).
640
653
  setStep('details');
641
654
  }
642
655
  // The error surface is the TOAST, full stop (host-mounted Toaster —
@@ -675,7 +688,12 @@ export function HubSpotMeetingScheduler({
675
688
  * last-wins, so appending it after would make a host's own `h-*` unreachable,
676
689
  * which is the override the height-inside-CARD_CLASS arrangement allows today.
677
690
  */
678
- const cardClass = cn(CARD_CLASS, preset.height, formOnly && 'bg-ods-bg', className);
691
+ const cardClass = cn(CARD_CLASS, preset.height, detailsFirst && 'flex flex-col', formOnly && 'bg-ods-bg', className);
692
+ /** details-first states a height on phones too (see MEETING_SCHEDULER_DETAILS_FIRST_H), so
693
+ * the wrappers that let content shrink into a stated height run at every width here. */
694
+ const innerClass = cn(CARD_INNER_CLASS, detailsFirst && 'min-h-0 flex-1');
695
+ const actionPanelClass = cn(ACTION_PANEL_CLASS, detailsFirst && 'min-h-0 overflow-y-auto');
696
+ const stepPanelClass = cn(STEP_PANEL_CLASS, detailsFirst && 'min-h-0 overflow-y-auto');
679
697
 
680
698
  /** One card SHAPE for every degraded return below. */
681
699
  const degraded = (message: string) => (
@@ -690,9 +708,9 @@ export function HubSpotMeetingScheduler({
690
708
  // shifts when it swaps.
691
709
  return (
692
710
  <div className={cardClass}>
693
- <div className={CARD_INNER_CLASS}>
711
+ <div className={innerClass}>
694
712
  {!formOnly && <ContextPanelSkeleton onBack={backEdge} className={CONTEXT_PANEL_CLASS} />}
695
- <div className={ACTION_PANEL_CLASS}>
713
+ <div className={actionPanelClass}>
696
714
  {/* Both terms matter. Without `flow` this stays a calendar where
697
715
  the form belongs; without the step term, paging a month AFTER
698
716
  Continue (which happens at `step === 'slot'`) would swap the
@@ -700,8 +718,12 @@ export function HubSpotMeetingScheduler({
700
718
  {formOnly ? (
701
719
  // The SAME wrapper the loaded form gets, so the skeleton never
702
720
  // states its own inset.
703
- <div className={STEP_PANEL_CLASS}>
704
- <BookingFormSkeleton fieldRows={detailsFormProps?.fieldRows} footerNote={preset.footerNote} />
721
+ <div className={stepPanelClass}>
722
+ <BookingFormSkeleton
723
+ fieldRows={detailsFormProps?.fieldRows}
724
+ consent={Boolean(detailsFormProps?.consent)}
725
+ footerNote={preset.footerNote}
726
+ />
705
727
  </div>
706
728
  ) : (
707
729
  <SlotPickerSkeleton monthOffset={monthOffset} />
@@ -724,7 +746,7 @@ export function HubSpotMeetingScheduler({
724
746
 
725
747
  return (
726
748
  <div className={cardClass}>
727
- <div className={CARD_INNER_CLASS}>
749
+ <div className={innerClass}>
728
750
  {!formOnly && (
729
751
  <SchedulerContextPanel
730
752
  hosts={shownHosts}
@@ -771,9 +793,9 @@ export function HubSpotMeetingScheduler({
771
793
  {/* Scrolls INSIDE the fixed card rather than growing it — see
772
794
  MEETING_SCHEDULER_H. `min-h-0` is what lets it: a flex item's
773
795
  default `min-height:auto` refuses to shrink below its content. */}
774
- <div className={ACTION_PANEL_CLASS}>
796
+ <div className={actionPanelClass}>
775
797
  {step === 'confirmed' && confirmation && timezone ? (
776
- <div className={STEP_PANEL_CLASS}>
798
+ <div className={stepPanelClass}>
777
799
  <Confirmation confirmation={confirmation} timezone={timezone} />
778
800
  </div>
779
801
  ) : step === 'details' &&
@@ -785,7 +807,7 @@ export function HubSpotMeetingScheduler({
785
807
  // not — never a calendar skeleton in the form-only layout.
786
808
  durations.length > 0
787
809
  : durationMs != null && selectedSlot != null && timezone) ? (
788
- <div className={cn(STEP_PANEL_CLASS, 'gap-[var(--spacing-system-m)]')}>
810
+ <div className={cn(stepPanelClass, 'gap-[var(--spacing-system-m)]')}>
789
811
  {/* Top-aligned, and no back edge of its own: the ONE back edge
790
812
  lives in the context panel at every step (the `onBack` wired on `SchedulerContextPanel`),
791
813
  which is where the design puts it and the only spot that
@@ -2,6 +2,7 @@
2
2
 
3
3
  import React from 'react';
4
4
  import { cn } from '../../utils/cn';
5
+ import { HUBSPOT_DO_NOT_COLLECT_FORM_PROPS } from '../../utils/hubspot-collected-forms';
5
6
  import { SearchIcon } from '../icons-v2-generated';
6
7
 
7
8
  export interface HeaderGlobalSearchProps {
@@ -51,6 +52,7 @@ export function HeaderGlobalSearch({
51
52
  return (
52
53
  <form
53
54
  onSubmit={handleSubmit}
55
+ {...HUBSPOT_DO_NOT_COLLECT_FORM_PROPS}
54
56
  className={cn(
55
57
  'flex h-full flex-1 items-center gap-2 px-3',
56
58
  // Transparent so the cell inherits the bar's background
@@ -18,6 +18,7 @@
18
18
 
19
19
  import { useState } from 'react';
20
20
  import type { FormEvent } from 'react';
21
+ import { HUBSPOT_DO_NOT_COLLECT_FORM_PROPS } from '../../utils/hubspot-collected-forms';
21
22
  import { ChatAttachmentAddButton, ChatAttachmentChipStrip } from '../chat/chat-attachment-bar';
22
23
  import { useChatAttachments } from '../chat/hooks/use-chat-attachments';
23
24
  import type { ChatAttachment } from '../chat/utils/chat-attachment-markdown';
@@ -76,7 +77,7 @@ export function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }: Ti
76
77
 
77
78
  return (
78
79
  <Card className="p-6">
79
- <form onSubmit={handleSubmit} className="flex flex-col gap-6 md:flex-row">
80
+ <form onSubmit={handleSubmit} className="flex flex-col gap-6 md:flex-row" {...HUBSPOT_DO_NOT_COLLECT_FORM_PROPS}>
80
81
  <div className="min-w-0 flex-1 md:max-w-md">
81
82
  <h2 className="mb-2 text-ods-text-primary text-h2">Need Support?</h2>
82
83
  <p className="text-ods-text-secondary text-h6">
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { useId, type ReactNode } from 'react';
4
+ import { HUBSPOT_DO_NOT_COLLECT_FORM_PROPS } from '../../utils/hubspot-collected-forms';
4
5
  import { Button } from './button';
5
6
  import { UnsavedChangesChip, useGuardedClose } from './modal-guarded-close';
6
7
  import {
@@ -146,6 +147,7 @@ export function AdminFormModal({
146
147
  admin modal routed through this shell. */}
147
148
  <form
148
149
  id={formId}
150
+ {...HUBSPOT_DO_NOT_COLLECT_FORM_PROPS}
149
151
  // Inherit the ModalV2 flex chain — an unstyled form between the shell
150
152
  // and ModalV2Content made flex-1/min-h-0 inert, so tall modals pushed
151
153
  // the Cancel/Save footer past 90vh.
@@ -67,7 +67,11 @@ interface BenefitCardGridProps {
67
67
  * card's row differs per breakpoint) is what needs testing, and the grid itself
68
68
  * is a `cloneElement` over children.
69
69
  */
70
- export function benefitCardBorderClass(index: number, totalItems: number, columns: number): string {
70
+ export function benefitCardBorderClass(
71
+ index: number,
72
+ totalItems: number,
73
+ columns: NonNullable<BenefitCardGridProps['columns']>,
74
+ ): string {
71
75
  const isLastItem = index === totalItems - 1;
72
76
  if (columns === 4) {
73
77
  // 4-column grid borders
@@ -4,6 +4,7 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
4
4
  import { type ComponentRef, type ReactNode, forwardRef } from 'react';
5
5
  import { cn } from '../../utils/cn';
6
6
  import { CheckboxCheckmarkIcon } from '../icons-v2-generated/signs-and-symbols/checkbox-checkmark-icon';
7
+ import { RequiredMark } from './required-mark';
7
8
 
8
9
  interface CheckboxBlockProps {
9
10
  id?: string;
@@ -23,7 +24,8 @@ interface CheckboxBlockProps {
23
24
  */
24
25
  trailing?: ReactNode;
25
26
  disabled?: boolean;
26
- /** Marks the box `aria-required` — a required consent is invisible to assistive tech without it. */
27
+ /** Marks the box `aria-required` AND draws the `RequiredMark` after the label — the
28
+ * same pairing every required field carries, so neither signal stands alone. */
27
29
  required?: boolean;
28
30
  /** Error message displayed below the block (also triggers red border) */
29
31
  error?: string;
@@ -121,6 +123,7 @@ const CheckboxBlock = forwardRef<ComponentRef<typeof CheckboxPrimitive.Root>, Ch
121
123
  )}
122
124
  >
123
125
  {label}
126
+ {required && <RequiredMark />}
124
127
  </span>
125
128
  {description && (
126
129
  <span className={cn('!leading-4 text-h6', 'select-none break-words text-ods-text-secondary')}>
@@ -3,8 +3,9 @@ import { cn } from '../../utils/cn';
3
3
 
4
4
  /**
5
5
  * The inset icon tile — the bordered `ods-bg` square (or panel) an icon sits
6
- * in. The chrome is written once here; the size is the caller's (`size-16` in a
7
- * card row, `h-40 w-full` as a step panel).
6
+ * in. The one home for the chrome going forward (older inline tiles migrate as
7
+ * they are touched); the size is the caller's (`size-16` in a card row,
8
+ * `h-40 w-full` as a step panel).
8
9
  */
9
10
  export function IconTile({ className, children }: { className?: string; children: ReactNode }) {
10
11
  return (
@@ -1,16 +1,32 @@
1
1
  'use client';
2
2
 
3
3
  import type { ReactNode } from 'react';
4
+ import { cn } from '../../utils/cn';
5
+
6
+ const TONE_CLASS = {
7
+ /** Consent rows: the accent, as every form's policy links draw it. */
8
+ accent: 'text-ods-accent underline underline-offset-2 hover:text-ods-accent/80',
9
+ /** Quiet copy (the sign-up agreement line): secondary text, plain underline. */
10
+ secondary: 'text-ods-text-secondary underline',
11
+ } as const;
4
12
 
5
13
  /**
6
14
  * A link to a policy page inside consent copy (Terms, Privacy) — opens in a
7
15
  * new tab and does NOT toggle the checkbox whose label it sits in.
8
16
  */
9
- export function PolicyLink({ href, children }: { href: string; children: ReactNode }) {
17
+ export function PolicyLink({
18
+ href,
19
+ tone = 'accent',
20
+ children,
21
+ }: {
22
+ href: string;
23
+ tone?: keyof typeof TONE_CLASS;
24
+ children: ReactNode;
25
+ }) {
10
26
  return (
11
27
  <a
12
28
  href={href}
13
- className="text-ods-accent underline underline-offset-2 hover:text-ods-accent/80"
29
+ className={cn(TONE_CLASS[tone])}
14
30
  target="_blank"
15
31
  rel="noopener noreferrer"
16
32
  onClick={e => e.stopPropagation()}
@@ -196,7 +196,7 @@ mux-player::part(button):hover {
196
196
  }
197
197
  mux-player::part(center play button) {
198
198
  background: transparent;
199
- filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
199
+ filter: var(--ods-shadow-glyph);
200
200
  }
201
201
  mux-player::part(center play button):hover {
202
202
  background: transparent;
@@ -2,6 +2,7 @@
2
2
  @import './ods-colors.css';
3
3
  @import './ods-design-tokens.css';
4
4
  @import './ods-interaction-states.css';
5
+ @import './ods-effects.css';
5
6
  @import './ods-responsive-tokens.css';
6
7
  @import './app-globals.css';
7
8
  @import './chat-animations.css';
@@ -0,0 +1,53 @@
1
+ /* Open Design System – Effects (glows and glyph shadows)
2
+
3
+ THE ONE HOME for every glow in the system. A glow is spelled here as a CSS
4
+ variable and exposed as a utility class; consumers use the class (or the
5
+ variable inside an inline `filter`/`background`), never a `drop-shadow(...)`
6
+ or `radial-gradient(...)` literal of their own. Colour rides ODS tokens or
7
+ `currentColor`, so theming and renames land in one file.
8
+
9
+ Measured values come from the design file, not from taste:
10
+ - `--ods-glow-icon`: Figma etEsOUsmdzjqnIbSH4kULB · 4904:40461 ("How It
11
+ Works" icon panels). The icon effect exports as ONE drop shadow — offset
12
+ 0, Gaussian stdDeviation 24 (Figma "blur 48"), 100% of the glyph's own
13
+ colour. CSS `drop-shadow()` takes the blur RADIUS (= 2 × stdDeviation),
14
+ so 48px reproduces the export exactly.
15
+ ------------------------------------------------------------------------- */
16
+
17
+ :root {
18
+ /* A brand-accented glyph glowing in its own colour (set the colour on the element). */
19
+ --ods-glow-icon: drop-shadow(0 0 48px currentColor);
20
+
21
+ /* The ambient glow behind a hero brand mark: the OpenFrame yellow at 30%, 50px. */
22
+ --ods-glow-brand: drop-shadow(0 0 50px color-mix(in srgb, var(--ods-open-yellow-base) 30%, transparent));
23
+
24
+ /* The same brand glow as a wide backdrop (800px disc behind the hero mark): three opacities of the yellow. */
25
+ --ods-glow-brand-backdrop: radial-gradient(
26
+ circle,
27
+ color-mix(in srgb, var(--ods-open-yellow-base) 12%, transparent) 0%,
28
+ color-mix(in srgb, var(--ods-open-yellow-base) 4%, transparent) 30%,
29
+ color-mix(in srgb, var(--ods-open-yellow-base) 0%, transparent) 70%
30
+ );
31
+
32
+ /* A cyan tag lifted off its card: a soft downward cyan shadow at 8%. */
33
+ --ods-glow-tag-cyan: drop-shadow(0 16px 16px color-mix(in srgb, var(--ods-flamingo-cyan-base) 8%, transparent));
34
+
35
+ /* Legibility shadow under a bare glyph drawn over media (no backdrop disc). */
36
+ --ods-shadow-glyph: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
37
+ }
38
+
39
+ .ods-glow-icon {
40
+ filter: var(--ods-glow-icon);
41
+ }
42
+ .ods-glow-brand {
43
+ filter: var(--ods-glow-brand);
44
+ }
45
+ .ods-glow-brand-backdrop {
46
+ background: var(--ods-glow-brand-backdrop);
47
+ }
48
+ .ods-glow-tag-cyan {
49
+ filter: var(--ods-glow-tag-cyan);
50
+ }
51
+ .ods-shadow-glyph {
52
+ filter: var(--ods-shadow-glyph);
53
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * HubSpot's collected-forms opt-out — ONE owner for every `<form>` in the system.
3
+ *
4
+ * Hosts that run the HubSpot tracking tag (the hub's root layout does; so does
5
+ * the OpenFrame dashboard, via GTM) also load HubSpot's "collected forms"
6
+ * script, which binds to EVERY `<form>` on the page and re-posts its fields to
7
+ * HubSpot as a "non-HubSpot form" submission. For a form that already reaches
8
+ * HubSpot server-side (booking, contact) that double-counts the contact's
9
+ * conversions and, with no id/name on the element, names the phantom form after
10
+ * its class list ("Dashboard | OpenFrame: .flex, .flex-col, …"). For every
11
+ * other form (search boxes, admin modals, sign-up) it ships fields HubSpot has
12
+ * no business seeing.
13
+ *
14
+ * `data-hs-do-not-collect` is the script's own opt-out, checked at bind time,
15
+ * so an opted-out form is never observed. Spread these props onto EVERY
16
+ * `<form>` that is not itself a HubSpot form — the attribute must never be
17
+ * spelled by hand at a call site.
18
+ */
19
+ export const HUBSPOT_DO_NOT_COLLECT_FORM_PROPS = { 'data-hs-do-not-collect': 'true' } as const;
@@ -71,9 +71,11 @@ export function parseSchedulingLinkName(name: string): ParsedSchedulingLinkName
71
71
  };
72
72
  }
73
73
 
74
- /** Whether a link name opts into the directory (has an Audience segment). */
74
+ /** Whether a link name opts into the directory: its Audience segment slugifies
75
+ * to a non-empty key — the SAME rule the directory groups by, so "listed" and
76
+ * "has a group" can never disagree. */
75
77
  export function isListedSchedulingName(name: string): boolean {
76
- return parseSchedulingLinkName(name).audienceLabel !== null;
78
+ return schedulingAudienceKey(parseSchedulingLinkName(name).audienceLabel ?? '') !== null;
77
79
  }
78
80
 
79
81
  /**
@@ -371,6 +371,7 @@ export * from './embed-url-converters';
371
371
  // HubSpot meeting-link naming convention — the executable SSOT (parser,
372
372
  // validator, label + name-split helpers, MAX_MONTH_OFFSET). Pure + server-safe.
373
373
  export * from './hubspot-meetings-convention';
374
+ export * from './hubspot-collected-forms';
374
375
  export * from './page-header-constants';
375
376
  export * from './first-touch-attribution';
376
377