@flamingo-stack/openframe-frontend-core 0.0.642 → 0.0.643

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 (101) hide show
  1. package/dist/{chunk-OYI3K5R6.cjs → chunk-26D6FM6L.cjs} +3 -3
  2. package/dist/{chunk-OYI3K5R6.cjs.map → chunk-26D6FM6L.cjs.map} +1 -1
  3. package/dist/{chunk-VHB3I6F3.cjs → chunk-2DJH6KHA.cjs} +19 -6
  4. package/dist/chunk-2DJH6KHA.cjs.map +1 -0
  5. package/dist/{chunk-3I6XHQUD.js → chunk-2NODQ7FO.js} +19 -6
  6. package/dist/{chunk-3I6XHQUD.js.map → chunk-2NODQ7FO.js.map} +1 -1
  7. package/dist/{chunk-FRCUUK5X.cjs → chunk-42NXGOTG.cjs} +3 -3
  8. package/dist/{chunk-FRCUUK5X.cjs.map → chunk-42NXGOTG.cjs.map} +1 -1
  9. package/dist/{chunk-HW7BLVQH.js → chunk-4TE53O6U.js} +3 -3
  10. package/dist/{chunk-OOOOC5O5.cjs → chunk-5E6Y6766.cjs} +25 -25
  11. package/dist/{chunk-OOOOC5O5.cjs.map → chunk-5E6Y6766.cjs.map} +1 -1
  12. package/dist/{chunk-6NHLZORM.js → chunk-64KDKDYC.js} +5 -5
  13. package/dist/{chunk-M7QROULE.js → chunk-6MQBLFUM.js} +4 -4
  14. package/dist/{chunk-YE3TFNW6.cjs → chunk-77EO26XV.cjs} +5 -5
  15. package/dist/{chunk-YE3TFNW6.cjs.map → chunk-77EO26XV.cjs.map} +1 -1
  16. package/dist/{chunk-J4RZVLLQ.js → chunk-7HL2PNQ3.js} +5 -5
  17. package/dist/{chunk-N5C5P2LM.cjs → chunk-7T673MHJ.cjs} +22 -22
  18. package/dist/{chunk-N5C5P2LM.cjs.map → chunk-7T673MHJ.cjs.map} +1 -1
  19. package/dist/{chunk-O4LL7RQV.cjs → chunk-B42INNRA.cjs} +161 -161
  20. package/dist/{chunk-O4LL7RQV.cjs.map → chunk-B42INNRA.cjs.map} +1 -1
  21. package/dist/{chunk-GEIHTN6J.cjs → chunk-CWHLVXUW.cjs} +10 -10
  22. package/dist/{chunk-GEIHTN6J.cjs.map → chunk-CWHLVXUW.cjs.map} +1 -1
  23. package/dist/{chunk-YRSRP4U3.cjs → chunk-D6TWJEFW.cjs} +10 -10
  24. package/dist/{chunk-YRSRP4U3.cjs.map → chunk-D6TWJEFW.cjs.map} +1 -1
  25. package/dist/{chunk-2Z5FPHOL.cjs → chunk-EWQI5MV6.cjs} +15 -15
  26. package/dist/{chunk-2Z5FPHOL.cjs.map → chunk-EWQI5MV6.cjs.map} +1 -1
  27. package/dist/{chunk-VKPTN5MT.cjs → chunk-FO7SD2IQ.cjs} +4 -4
  28. package/dist/{chunk-VKPTN5MT.cjs.map → chunk-FO7SD2IQ.cjs.map} +1 -1
  29. package/dist/{chunk-S254VEDE.js → chunk-FVIT23I5.js} +2 -2
  30. package/dist/{chunk-ZGPJ3NVF.js → chunk-HA2U7WHU.js} +3 -3
  31. package/dist/{chunk-MJ424FEC.js → chunk-IIZX3K2R.js} +2 -2
  32. package/dist/{chunk-UFBWNVZZ.js → chunk-IU3IYXMM.js} +6 -6
  33. package/dist/{chunk-QY25ZP2V.cjs → chunk-KX2FT7AS.cjs} +22 -22
  34. package/dist/{chunk-QY25ZP2V.cjs.map → chunk-KX2FT7AS.cjs.map} +1 -1
  35. package/dist/{chunk-M4PJVFBF.cjs → chunk-M3W5Y5DK.cjs} +9 -9
  36. package/dist/{chunk-M4PJVFBF.cjs.map → chunk-M3W5Y5DK.cjs.map} +1 -1
  37. package/dist/{chunk-ZAIYD3MZ.js → chunk-N7UYD57Q.js} +3 -3
  38. package/dist/{chunk-YM6L3WM5.js → chunk-NCHLLTAR.js} +3 -3
  39. package/dist/{chunk-ORFJVMAL.js → chunk-O7JMF5OT.js} +2 -2
  40. package/dist/{chunk-EW3MSJOE.cjs → chunk-R2IU2Y2O.cjs} +33 -33
  41. package/dist/{chunk-EW3MSJOE.cjs.map → chunk-R2IU2Y2O.cjs.map} +1 -1
  42. package/dist/{chunk-6GY6DFIH.js → chunk-TIOHTWDA.js} +5 -5
  43. package/dist/{chunk-SDGMLXIP.js → chunk-TQ7KTANJ.js} +2 -2
  44. package/dist/{chunk-WL3PNUNY.cjs → chunk-XJLWGYL4.cjs} +71 -71
  45. package/dist/{chunk-WL3PNUNY.cjs.map → chunk-XJLWGYL4.cjs.map} +1 -1
  46. package/dist/{chunk-XWGHLSAL.js → chunk-YG7KLZE7.js} +3 -3
  47. package/dist/{chunk-POPL3W2S.js → chunk-YT6RGA3X.js} +2 -2
  48. package/dist/{chunk-XFLJC2WR.cjs → chunk-ZU2JBBOE.cjs} +45 -45
  49. package/dist/{chunk-XFLJC2WR.cjs.map → chunk-ZU2JBBOE.cjs.map} +1 -1
  50. package/dist/components/case-studies/index.cjs +14 -14
  51. package/dist/components/case-studies/index.js +3 -3
  52. package/dist/components/chat/index.cjs +2 -2
  53. package/dist/components/chat/index.js +1 -1
  54. package/dist/components/contact/index.cjs +4 -4
  55. package/dist/components/contact/index.js +3 -3
  56. package/dist/components/docs/index.cjs +7 -7
  57. package/dist/components/docs/index.js +6 -6
  58. package/dist/components/embeds/index.cjs +4 -4
  59. package/dist/components/embeds/index.js +3 -3
  60. package/dist/components/faq/index.cjs +4 -4
  61. package/dist/components/faq/index.js +3 -3
  62. package/dist/components/features/index.cjs +3 -3
  63. package/dist/components/features/index.js +2 -2
  64. package/dist/components/help-center-pages/index.cjs +23 -23
  65. package/dist/components/help-center-pages/index.js +14 -14
  66. package/dist/components/index.cjs +38 -38
  67. package/dist/components/index.js +13 -13
  68. package/dist/components/meeting-scheduler/index.cjs +24 -24
  69. package/dist/components/meeting-scheduler/index.js +2 -2
  70. package/dist/components/navigation/index.cjs +6 -6
  71. package/dist/components/navigation/index.js +5 -5
  72. package/dist/components/onboarding-guides/index.cjs +6 -6
  73. package/dist/components/onboarding-guides/index.js +5 -5
  74. package/dist/components/tickets/index.cjs +7 -7
  75. package/dist/components/tickets/index.js +6 -6
  76. package/dist/components/ui/drawer.d.ts +19 -5
  77. package/dist/components/ui/drawer.d.ts.map +1 -1
  78. package/dist/components/ui/index.cjs +3 -3
  79. package/dist/components/ui/index.js +2 -2
  80. package/dist/index.cjs +7 -7
  81. package/dist/index.js +6 -6
  82. package/package.json +1 -1
  83. package/src/components/ui/.drawer.md +1 -0
  84. package/src/components/ui/__tests__/drawer-size.test.tsx +38 -0
  85. package/src/components/ui/drawer.tsx +44 -9
  86. package/dist/chunk-VHB3I6F3.cjs.map +0 -1
  87. /package/dist/{chunk-HW7BLVQH.js.map → chunk-4TE53O6U.js.map} +0 -0
  88. /package/dist/{chunk-6NHLZORM.js.map → chunk-64KDKDYC.js.map} +0 -0
  89. /package/dist/{chunk-M7QROULE.js.map → chunk-6MQBLFUM.js.map} +0 -0
  90. /package/dist/{chunk-J4RZVLLQ.js.map → chunk-7HL2PNQ3.js.map} +0 -0
  91. /package/dist/{chunk-S254VEDE.js.map → chunk-FVIT23I5.js.map} +0 -0
  92. /package/dist/{chunk-ZGPJ3NVF.js.map → chunk-HA2U7WHU.js.map} +0 -0
  93. /package/dist/{chunk-MJ424FEC.js.map → chunk-IIZX3K2R.js.map} +0 -0
  94. /package/dist/{chunk-UFBWNVZZ.js.map → chunk-IU3IYXMM.js.map} +0 -0
  95. /package/dist/{chunk-ZAIYD3MZ.js.map → chunk-N7UYD57Q.js.map} +0 -0
  96. /package/dist/{chunk-YM6L3WM5.js.map → chunk-NCHLLTAR.js.map} +0 -0
  97. /package/dist/{chunk-ORFJVMAL.js.map → chunk-O7JMF5OT.js.map} +0 -0
  98. /package/dist/{chunk-6GY6DFIH.js.map → chunk-TIOHTWDA.js.map} +0 -0
  99. /package/dist/{chunk-SDGMLXIP.js.map → chunk-TQ7KTANJ.js.map} +0 -0
  100. /package/dist/{chunk-XWGHLSAL.js.map → chunk-YG7KLZE7.js.map} +0 -0
  101. /package/dist/{chunk-POPL3W2S.js.map → chunk-YT6RGA3X.js.map} +0 -0
@@ -104,8 +104,19 @@ const drawerPanelVariants = cva(
104
104
  false: 'gap-4 rounded-md border border-ods-border p-4',
105
105
  true: '',
106
106
  },
107
+ /** Panel size along the axis the drawer slides on. `default` leaves it to
108
+ * the content (or `resizable`); `wide` is the admin detail panel, 90% of
109
+ * the viewport. Set the size here, never with a width class. */
110
+ size: {
111
+ default: '',
112
+ wide: '',
113
+ },
107
114
  },
108
115
  compoundVariants: [
116
+ { side: 'right', size: 'wide', class: 'w-[90vw]' },
117
+ { side: 'left', size: 'wide', class: 'w-[90vw]' },
118
+ { side: 'top', size: 'wide', class: 'h-[90vh]' },
119
+ { side: 'bottom', size: 'wide', class: 'h-[90vh]' },
109
120
  // flush=true → drops inner padding/gap so the consumer fully owns
110
121
  // internal layout, BUT preserves the card chrome (rounded + border)
111
122
  // on desktop so the panel still reads as an elevated card.
@@ -118,6 +129,7 @@ const drawerPanelVariants = cva(
118
129
  defaultVariants: {
119
130
  side: 'right',
120
131
  flush: false,
132
+ size: 'default',
121
133
  },
122
134
  },
123
135
  );
@@ -304,16 +316,12 @@ function DrawerResizeHandle({ side, size, minSize, maxSize, onSize, ariaLabel }:
304
316
  );
305
317
  }
306
318
 
307
- interface DrawerContentProps
319
+ interface DrawerContentBaseProps
308
320
  extends Omit<ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, 'style'>, VariantProps<typeof drawerVariants> {
309
321
  /** Remove outer wrapper padding and panel rounded/border/padding so the
310
322
  * panel attaches flush to the viewport edge. Use for full-height side
311
323
  * panels (e.g. the embedded chat). */
312
324
  flush?: boolean;
313
- /** Enable the drag-to-resize handle on the inside-facing edge. Only
314
- * active for `side="left"` / `side="right"` (or `top`/`bottom`) on
315
- * non-mobile viewports. */
316
- resizable?: boolean;
317
325
  /** Minimum allowed size (px) when resizable. */
318
326
  minSize?: number;
319
327
  /** Maximum allowed size (px) when resizable. Also clamped by viewport. */
@@ -344,11 +352,34 @@ interface DrawerContentProps
344
352
  offsetHeader?: boolean;
345
353
  }
346
354
 
355
+ /**
356
+ * The panel's size has ONE owner: a `size` preset OR the drag-to-resize handle.
357
+ * A resizable panel sizes itself inline, which would silently override `wide`,
358
+ * so the two cannot be combined (a type error, not a runtime surprise).
359
+ */
360
+ type DrawerContentSizing =
361
+ | {
362
+ /** Panel size preset (`wide` = 90% of the viewport). Use it instead of a
363
+ * width/height class. */
364
+ size?: 'default' | 'wide';
365
+ resizable?: false;
366
+ }
367
+ | {
368
+ size?: 'default';
369
+ /** Enable the drag-to-resize handle on the inside-facing edge. Only
370
+ * active for `side="left"` / `side="right"` (or `top`/`bottom`) on
371
+ * non-mobile viewports. The handle owns the size, so no `size` preset. */
372
+ resizable: true;
373
+ };
374
+
375
+ type DrawerContentProps = DrawerContentBaseProps & DrawerContentSizing;
376
+
347
377
  const DrawerContent = forwardRef<ComponentRef<typeof DialogPrimitive.Content>, DrawerContentProps>(
348
378
  (
349
379
  {
350
380
  side = 'right',
351
381
  flush = false,
382
+ size = 'default',
352
383
  resizable = false,
353
384
  minSize = 320,
354
385
  maxSize = 1280,
@@ -383,7 +414,7 @@ const DrawerContent = forwardRef<ComponentRef<typeof DialogPrimitive.Content>, D
383
414
  return () => mq.removeEventListener('change', update);
384
415
  }, [mobileBreakpoint]);
385
416
 
386
- const { size, setSize } = useResizableSize({
417
+ const { size: resizedSize, setSize } = useResizableSize({
387
418
  enabled: resizable,
388
419
  isHorizontal,
389
420
  minSize,
@@ -393,7 +424,11 @@ const DrawerContent = forwardRef<ComponentRef<typeof DialogPrimitive.Content>, D
393
424
  });
394
425
 
395
426
  const applyInlineSize = resizable && !isMobile;
396
- const sizeStyle: CSSProperties = applyInlineSize ? (isHorizontal ? { width: size } : { height: size }) : {};
427
+ const sizeStyle: CSSProperties = applyInlineSize
428
+ ? isHorizontal
429
+ ? { width: resizedSize }
430
+ : { height: resizedSize }
431
+ : {};
397
432
 
398
433
  return (
399
434
  <DrawerPortal>
@@ -410,7 +445,7 @@ const DrawerContent = forwardRef<ComponentRef<typeof DialogPrimitive.Content>, D
410
445
  {applyInlineSize ? (
411
446
  <DrawerResizeHandle
412
447
  side={resolvedSide}
413
- size={size}
448
+ size={resizedSize}
414
449
  minSize={minSize}
415
450
  maxSize={maxSize}
416
451
  onSize={setSize}
@@ -418,7 +453,7 @@ const DrawerContent = forwardRef<ComponentRef<typeof DialogPrimitive.Content>, D
418
453
  />
419
454
  ) : null}
420
455
  <div
421
- className={cn(drawerPanelVariants({ side, flush }), className, panelClassName)}
456
+ className={cn(drawerPanelVariants({ side, flush, size }), className, panelClassName)}
422
457
  style={{ ...sizeStyle, ...panelStyle }}
423
458
  >
424
459
  {children}