@flamingo-stack/openframe-frontend-core 0.0.502 → 0.0.503

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 (106) hide show
  1. package/dist/{chunk-ABVQ54WR.cjs → chunk-2OXJ6NHI.cjs} +5 -5
  2. package/dist/{chunk-ABVQ54WR.cjs.map → chunk-2OXJ6NHI.cjs.map} +1 -1
  3. package/dist/{chunk-KOZAEN36.cjs → chunk-3T4SMJM5.cjs} +73 -73
  4. package/dist/{chunk-KOZAEN36.cjs.map → chunk-3T4SMJM5.cjs.map} +1 -1
  5. package/dist/{chunk-ZGU3KBAM.js → chunk-4SR2QHMB.js} +2 -2
  6. package/dist/{chunk-I64ZGPA6.cjs → chunk-4UNQMYP7.cjs} +3 -3
  7. package/dist/{chunk-I64ZGPA6.cjs.map → chunk-4UNQMYP7.cjs.map} +1 -1
  8. package/dist/{chunk-BRXSYV4M.cjs → chunk-5RIHLXEP.cjs} +29 -29
  9. package/dist/{chunk-BRXSYV4M.cjs.map → chunk-5RIHLXEP.cjs.map} +1 -1
  10. package/dist/{chunk-INZAM757.cjs → chunk-72DF3QTA.cjs} +12 -12
  11. package/dist/{chunk-INZAM757.cjs.map → chunk-72DF3QTA.cjs.map} +1 -1
  12. package/dist/{chunk-2Z75A5MH.cjs → chunk-7L2RVINX.cjs} +32 -32
  13. package/dist/{chunk-2Z75A5MH.cjs.map → chunk-7L2RVINX.cjs.map} +1 -1
  14. package/dist/{chunk-LA4UJ2D3.cjs → chunk-AWDHRIL3.cjs} +73 -73
  15. package/dist/{chunk-LA4UJ2D3.cjs.map → chunk-AWDHRIL3.cjs.map} +1 -1
  16. package/dist/{chunk-IRR6733A.js → chunk-BZF63JXP.js} +5 -5
  17. package/dist/{chunk-JJV237MJ.js → chunk-CLQEBWV7.js} +3 -3
  18. package/dist/{chunk-LBSC62XJ.cjs → chunk-DMXB3VE2.cjs} +599 -566
  19. package/dist/chunk-DMXB3VE2.cjs.map +1 -0
  20. package/dist/{chunk-P7IOCYGD.js → chunk-F7AD5CUU.js} +2 -2
  21. package/dist/{chunk-C5R2OX7A.cjs → chunk-FFXNRJ5S.cjs} +2 -2
  22. package/dist/{chunk-C5R2OX7A.cjs.map → chunk-FFXNRJ5S.cjs.map} +1 -1
  23. package/dist/{chunk-EC3G3BIT.js → chunk-FTOVZ7O2.js} +6 -6
  24. package/dist/{chunk-2Q6X4SE3.js → chunk-G43CEISB.js} +4 -4
  25. package/dist/{chunk-5W6IMPJW.js → chunk-HR6F6IP4.js} +5 -5
  26. package/dist/{chunk-AHZCNPTI.cjs → chunk-J4T5ZBWG.cjs} +15 -15
  27. package/dist/{chunk-AHZCNPTI.cjs.map → chunk-J4T5ZBWG.cjs.map} +1 -1
  28. package/dist/{chunk-EMMJIXDF.js → chunk-JGXAVNZQ.js} +3293 -3260
  29. package/dist/chunk-JGXAVNZQ.js.map +1 -0
  30. package/dist/{chunk-GE6DRWPN.cjs → chunk-JIZJDAXI.cjs} +7 -7
  31. package/dist/{chunk-GE6DRWPN.cjs.map → chunk-JIZJDAXI.cjs.map} +1 -1
  32. package/dist/{chunk-O45BOJMS.js → chunk-OAWFYZZT.js} +2 -2
  33. package/dist/{chunk-ADM7LRDY.cjs → chunk-RR3Z52X5.cjs} +40 -40
  34. package/dist/{chunk-ADM7LRDY.cjs.map → chunk-RR3Z52X5.cjs.map} +1 -1
  35. package/dist/{chunk-VPQBQJ4S.js → chunk-SFJRMBJC.js} +2 -2
  36. package/dist/{chunk-4YDUZB5N.cjs → chunk-SGWPW2AO.cjs} +18 -18
  37. package/dist/{chunk-4YDUZB5N.cjs.map → chunk-SGWPW2AO.cjs.map} +1 -1
  38. package/dist/{chunk-IHYEMZ2B.cjs → chunk-UCV4LFUG.cjs} +40 -40
  39. package/dist/{chunk-IHYEMZ2B.cjs.map → chunk-UCV4LFUG.cjs.map} +1 -1
  40. package/dist/{chunk-QJMFF2YG.js → chunk-VCPTU4IW.js} +6 -6
  41. package/dist/{chunk-LS3DMQTE.js → chunk-VO2ZONMR.js} +3 -3
  42. package/dist/{chunk-ZEEQTDDD.js → chunk-VYEDTVIZ.js} +3 -3
  43. package/dist/{chunk-NZEQGBVS.js → chunk-XV5SXALY.js} +2 -2
  44. package/dist/components/case-studies/index.cjs +9 -9
  45. package/dist/components/case-studies/index.js +3 -3
  46. package/dist/components/chat/index.cjs +3 -3
  47. package/dist/components/chat/index.js +2 -2
  48. package/dist/components/contact/index.cjs +4 -4
  49. package/dist/components/contact/index.js +3 -3
  50. package/dist/components/content-loading-container.d.ts +1 -1
  51. package/dist/components/docs/index.cjs +6 -6
  52. package/dist/components/docs/index.js +5 -5
  53. package/dist/components/embeds/index.cjs +4 -4
  54. package/dist/components/embeds/index.js +3 -3
  55. package/dist/components/faq/index.cjs +5 -5
  56. package/dist/components/faq/index.js +4 -4
  57. package/dist/components/features/index.cjs +3 -3
  58. package/dist/components/features/index.js +2 -2
  59. package/dist/components/help-center-pages/index.cjs +22 -22
  60. package/dist/components/help-center-pages/index.js +13 -13
  61. package/dist/components/index.cjs +136 -136
  62. package/dist/components/index.js +11 -11
  63. package/dist/components/navigation/index.cjs +3 -3
  64. package/dist/components/navigation/index.js +2 -2
  65. package/dist/components/onboarding-guides/index.cjs +7 -7
  66. package/dist/components/onboarding-guides/index.js +6 -6
  67. package/dist/components/related-content/index.cjs +5 -5
  68. package/dist/components/related-content/index.js +4 -4
  69. package/dist/components/tickets/index.cjs +6 -6
  70. package/dist/components/tickets/index.js +5 -5
  71. package/dist/components/ui/autocomplete.d.ts.map +1 -1
  72. package/dist/components/ui/floating-tooltip.d.ts +9 -4
  73. package/dist/components/ui/floating-tooltip.d.ts.map +1 -1
  74. package/dist/components/ui/index.cjs +3 -3
  75. package/dist/components/ui/index.js +2 -2
  76. package/dist/components/ui/service-card.d.ts.map +1 -1
  77. package/dist/components/ui/status-badge.d.ts +1 -1
  78. package/dist/components/ui/tag.d.ts +1 -1
  79. package/dist/components/ui/tag.d.ts.map +1 -1
  80. package/dist/components/ui/truncate-text.d.ts +14 -1
  81. package/dist/components/ui/truncate-text.d.ts.map +1 -1
  82. package/dist/hooks/index.cjs +2 -2
  83. package/dist/hooks/index.js +1 -1
  84. package/dist/index.cjs +3 -3
  85. package/dist/index.js +2 -2
  86. package/package.json +1 -1
  87. package/src/components/ui/autocomplete.tsx +5 -2
  88. package/src/components/ui/floating-tooltip.tsx +11 -5
  89. package/src/components/ui/service-card.tsx +18 -3
  90. package/src/components/ui/tag.tsx +34 -1
  91. package/src/components/ui/truncate-text.tsx +20 -0
  92. package/dist/chunk-EMMJIXDF.js.map +0 -1
  93. package/dist/chunk-LBSC62XJ.cjs.map +0 -1
  94. /package/dist/{chunk-ZGU3KBAM.js.map → chunk-4SR2QHMB.js.map} +0 -0
  95. /package/dist/{chunk-IRR6733A.js.map → chunk-BZF63JXP.js.map} +0 -0
  96. /package/dist/{chunk-JJV237MJ.js.map → chunk-CLQEBWV7.js.map} +0 -0
  97. /package/dist/{chunk-P7IOCYGD.js.map → chunk-F7AD5CUU.js.map} +0 -0
  98. /package/dist/{chunk-EC3G3BIT.js.map → chunk-FTOVZ7O2.js.map} +0 -0
  99. /package/dist/{chunk-2Q6X4SE3.js.map → chunk-G43CEISB.js.map} +0 -0
  100. /package/dist/{chunk-5W6IMPJW.js.map → chunk-HR6F6IP4.js.map} +0 -0
  101. /package/dist/{chunk-O45BOJMS.js.map → chunk-OAWFYZZT.js.map} +0 -0
  102. /package/dist/{chunk-VPQBQJ4S.js.map → chunk-SFJRMBJC.js.map} +0 -0
  103. /package/dist/{chunk-QJMFF2YG.js.map → chunk-VCPTU4IW.js.map} +0 -0
  104. /package/dist/{chunk-LS3DMQTE.js.map → chunk-VO2ZONMR.js.map} +0 -0
  105. /package/dist/{chunk-ZEEQTDDD.js.map → chunk-VYEDTVIZ.js.map} +0 -0
  106. /package/dist/{chunk-NZEQGBVS.js.map → chunk-XV5SXALY.js.map} +0 -0
@@ -4,6 +4,8 @@ import React from "react"
4
4
  import { cva, type VariantProps } from "class-variance-authority"
5
5
  import { XmarkCircleIcon } from "../icons-v2-generated/signs-and-symbols/xmark-circle-icon"
6
6
  import { cn } from "../../utils/cn"
7
+ import { useIsTruncated } from "../../hooks/ui/use-is-truncated"
8
+ import { FloatingTooltip } from "./floating-tooltip"
7
9
 
8
10
  const tagVariants = cva(
9
11
  [
@@ -107,6 +109,37 @@ export interface TagProps
107
109
  as?: 'div' | 'span'
108
110
  }
109
111
 
112
+ /**
113
+ * The tag's label slot. String labels get a `FloatingTooltip` with the full
114
+ * value when (and only when) the text is actually clipped — replacing the old
115
+ * native `title`, which showed with the OS delay, unstyled, and even when
116
+ * nothing was truncated. Node labels render exactly as before: the caller owns
117
+ * their content (and any tooltip), so none is added here.
118
+ * The trigger is a `span` so the tag stays valid phrasing content (`as="span"`
119
+ * exists precisely for tags inside a `<p>`).
120
+ */
121
+ function TagLabel({ label, labelClassName }: { label: React.ReactNode; labelClassName?: string }) {
122
+ const isString = typeof label === 'string'
123
+ const { ref, isTruncated } = useIsTruncated<HTMLSpanElement>(isString ? label : null)
124
+
125
+ if (!isString) {
126
+ return <span className={cn("truncate", labelClassName)}>{label}</span>
127
+ }
128
+
129
+ return (
130
+ <FloatingTooltip
131
+ content={label}
132
+ side="top"
133
+ disabled={!isTruncated}
134
+ as="span"
135
+ triggerClassName="min-w-0 max-w-full"
136
+ className="max-w-xs whitespace-pre-line [overflow-wrap:anywhere]"
137
+ >
138
+ <span ref={ref} className={cn("truncate block", labelClassName)}>{label}</span>
139
+ </FloatingTooltip>
140
+ )
141
+ }
142
+
110
143
  function Tag({
111
144
  label,
112
145
  variant,
@@ -134,7 +167,7 @@ function Tag({
134
167
  {icon}
135
168
  </span>
136
169
  )}
137
- <span className={cn("truncate", labelClassName)} title={typeof label === 'string' ? label : undefined}>{label}</span>
170
+ <TagLabel label={label} labelClassName={labelClassName} />
138
171
  {onClose && (
139
172
  <button
140
173
  type="button"
@@ -26,6 +26,19 @@ export interface TruncateTextProps {
26
26
  tone?: TruncateTextTone
27
27
  /** Force the monospace (heading) font family — preserves the variant's size while swapping family. */
28
28
  mono?: boolean
29
+ /**
30
+ * Extra classes for the tooltip trigger wrapper — the element that becomes the
31
+ * flex/grid item in the caller's layout (e.g. `flex-1`). Merged after the
32
+ * built-in `min-w-0 max-w-full`, which is what lets the trigger shrink inside
33
+ * flex rows so the text ellipsizes instead of clipping.
34
+ */
35
+ triggerClassName?: string
36
+ /**
37
+ * Trigger wrapper element. Default `'div'`. Use `'span'` where a block element
38
+ * is invalid HTML — inside a `<p>`, a heading, or another `<span>`; the span
39
+ * trigger is `inline-block` so the inner truncation still measures.
40
+ */
41
+ as?: 'div' | 'span'
29
42
  }
30
43
 
31
44
  const VARIANT_CLASS: Record<TruncateTextVariant, string> = {
@@ -69,6 +82,8 @@ export function TruncateText({
69
82
  variant = 'h4',
70
83
  tone = 'primary',
71
84
  mono = false,
85
+ triggerClassName,
86
+ as = 'div',
72
87
  }: TruncateTextProps) {
73
88
  const isMultiLine = lines > 1
74
89
  const { ref, isTruncated } = useIsTruncated<HTMLSpanElement>(children, { multiline: isMultiLine })
@@ -83,6 +98,11 @@ export function TruncateText({
83
98
  side={side}
84
99
  disabled={!isTruncated}
85
100
  className="max-w-xs whitespace-pre-line [overflow-wrap:anywhere]"
101
+ as={as}
102
+ // min-w-0: a flex/grid item's automatic minimum size is content-based when
103
+ // overflow is visible, so without this the trigger refuses to shrink and the
104
+ // text clips with no ellipsis and no tooltip.
105
+ triggerClassName={cn('min-w-0 max-w-full', as === 'span' && 'inline-block align-bottom', triggerClassName)}
86
106
  >
87
107
  <span
88
108
  ref={ref}