@flamingo-stack/openframe-frontend-core 0.0.486-snapshot.20260727163255 → 0.0.486

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 (98) hide show
  1. package/dist/{chunk-WLRBZXFB.js → chunk-2BMYCH3D.js} +2 -2
  2. package/dist/{chunk-AUGM74CO.js → chunk-5WZGZ6B2.js} +4 -4
  3. package/dist/{chunk-QBDHNUQX.js → chunk-6QJ2QRQE.js} +4 -4
  4. package/dist/{chunk-UU4DW7JX.cjs → chunk-BVHMDHQY.cjs} +31 -31
  5. package/dist/{chunk-UU4DW7JX.cjs.map → chunk-BVHMDHQY.cjs.map} +1 -1
  6. package/dist/{chunk-KTD2MGYF.cjs → chunk-C4QKMOQK.cjs} +7 -7
  7. package/dist/{chunk-KTD2MGYF.cjs.map → chunk-C4QKMOQK.cjs.map} +1 -1
  8. package/dist/{chunk-HWK5CH5N.cjs → chunk-F3BH5B7M.cjs} +11 -11
  9. package/dist/{chunk-HWK5CH5N.cjs.map → chunk-F3BH5B7M.cjs.map} +1 -1
  10. package/dist/{chunk-EO7MUGY4.cjs → chunk-HQITFULS.cjs} +9 -9
  11. package/dist/{chunk-EO7MUGY4.cjs.map → chunk-HQITFULS.cjs.map} +1 -1
  12. package/dist/{chunk-GXOUXAXU.js → chunk-J5KX5K5T.js} +2 -2
  13. package/dist/{chunk-SDNMOAT4.js → chunk-KA4ILVCX.js} +2 -2
  14. package/dist/{chunk-ITEPRN6L.js → chunk-KRKNTK5Y.js} +2 -2
  15. package/dist/{chunk-UBK5HIMH.js → chunk-MD5E5BKO.js} +4 -4
  16. package/dist/{chunk-RAYDQGJV.cjs → chunk-NTHTORJ3.cjs} +59 -59
  17. package/dist/{chunk-RAYDQGJV.cjs.map → chunk-NTHTORJ3.cjs.map} +1 -1
  18. package/dist/{chunk-TJSJPOPL.cjs → chunk-NZYUSFMI.cjs} +350 -573
  19. package/dist/chunk-NZYUSFMI.cjs.map +1 -0
  20. package/dist/{chunk-NETEA5E4.js → chunk-OW33LYO2.js} +4 -4
  21. package/dist/{chunk-4TFUB2CR.cjs → chunk-PHYEC3EG.cjs} +26 -26
  22. package/dist/{chunk-4TFUB2CR.cjs.map → chunk-PHYEC3EG.cjs.map} +1 -1
  23. package/dist/{chunk-QL7S3CH4.cjs → chunk-RB6HX4KC.cjs} +26 -26
  24. package/dist/{chunk-QL7S3CH4.cjs.map → chunk-RB6HX4KC.cjs.map} +1 -1
  25. package/dist/{chunk-BC74IKAX.js → chunk-REURWDBC.js} +4482 -4705
  26. package/dist/chunk-REURWDBC.js.map +1 -0
  27. package/dist/{chunk-K6MITU6M.cjs → chunk-RILRBUDL.cjs} +62 -62
  28. package/dist/{chunk-K6MITU6M.cjs.map → chunk-RILRBUDL.cjs.map} +1 -1
  29. package/dist/{chunk-W6GDTB4R.cjs → chunk-RR6XPEEG.cjs} +15 -15
  30. package/dist/{chunk-W6GDTB4R.cjs.map → chunk-RR6XPEEG.cjs.map} +1 -1
  31. package/dist/{chunk-QW6SPNPT.cjs → chunk-XJ6VL3AP.cjs} +37 -37
  32. package/dist/{chunk-QW6SPNPT.cjs.map → chunk-XJ6VL3AP.cjs.map} +1 -1
  33. package/dist/{chunk-SMD67GJP.js → chunk-XOIKQW2H.js} +2 -2
  34. package/dist/{chunk-BTMYUK4P.js → chunk-Z3V42W7P.js} +2 -2
  35. package/dist/{chunk-G4XU7BYU.js → chunk-ZTRRB2Y2.js} +2 -2
  36. package/dist/{chunk-6SBAF5VG.cjs → chunk-ZVFH4LTD.cjs} +5 -5
  37. package/dist/{chunk-6SBAF5VG.cjs.map → chunk-ZVFH4LTD.cjs.map} +1 -1
  38. package/dist/components/case-studies/index.cjs +8 -8
  39. package/dist/components/case-studies/index.js +2 -2
  40. package/dist/components/chat/index.cjs +2 -2
  41. package/dist/components/chat/index.js +1 -1
  42. package/dist/components/contact/index.cjs +3 -3
  43. package/dist/components/contact/index.js +2 -2
  44. package/dist/components/docs/index.cjs +5 -5
  45. package/dist/components/docs/index.js +4 -4
  46. package/dist/components/embeds/index.cjs +3 -3
  47. package/dist/components/embeds/index.js +2 -2
  48. package/dist/components/faq/index.cjs +3 -3
  49. package/dist/components/faq/index.js +2 -2
  50. package/dist/components/features/index.cjs +2 -2
  51. package/dist/components/features/index.js +1 -1
  52. package/dist/components/help-center-pages/index.cjs +20 -20
  53. package/dist/components/help-center-pages/index.js +11 -11
  54. package/dist/components/index.cjs +130 -144
  55. package/dist/components/index.cjs.map +1 -1
  56. package/dist/components/index.js +9 -23
  57. package/dist/components/index.js.map +1 -1
  58. package/dist/components/navigation/index.cjs +2 -2
  59. package/dist/components/navigation/index.js +1 -1
  60. package/dist/components/onboarding-guides/index.cjs +5 -5
  61. package/dist/components/onboarding-guides/index.js +4 -4
  62. package/dist/components/related-content/index.cjs +3 -3
  63. package/dist/components/related-content/index.js +2 -2
  64. package/dist/components/tickets/index.cjs +5 -5
  65. package/dist/components/tickets/index.js +4 -4
  66. package/dist/components/ui/assignee-dropdown.d.ts.map +1 -1
  67. package/dist/components/ui/index.cjs +2 -16
  68. package/dist/components/ui/index.cjs.map +1 -1
  69. package/dist/components/ui/index.d.ts +0 -2
  70. package/dist/components/ui/index.d.ts.map +1 -1
  71. package/dist/components/ui/index.js +1 -15
  72. package/dist/index.cjs +2 -16
  73. package/dist/index.cjs.map +1 -1
  74. package/dist/index.js +1 -15
  75. package/package.json +1 -1
  76. package/src/components/ui/assignee-dropdown.tsx +91 -36
  77. package/src/components/ui/index.ts +0 -2
  78. package/dist/chunk-BC74IKAX.js.map +0 -1
  79. package/dist/chunk-TJSJPOPL.cjs.map +0 -1
  80. package/dist/components/ui/searchable-select.d.ts +0 -43
  81. package/dist/components/ui/searchable-select.d.ts.map +0 -1
  82. package/dist/components/ui/test-run.d.ts +0 -74
  83. package/dist/components/ui/test-run.d.ts.map +0 -1
  84. package/src/components/ui/searchable-select.tsx +0 -186
  85. package/src/components/ui/test-run.tsx +0 -282
  86. package/src/stories/SearchableSelect.stories.tsx +0 -139
  87. package/src/stories/TestRun.stories.tsx +0 -118
  88. /package/dist/{chunk-WLRBZXFB.js.map → chunk-2BMYCH3D.js.map} +0 -0
  89. /package/dist/{chunk-AUGM74CO.js.map → chunk-5WZGZ6B2.js.map} +0 -0
  90. /package/dist/{chunk-QBDHNUQX.js.map → chunk-6QJ2QRQE.js.map} +0 -0
  91. /package/dist/{chunk-GXOUXAXU.js.map → chunk-J5KX5K5T.js.map} +0 -0
  92. /package/dist/{chunk-SDNMOAT4.js.map → chunk-KA4ILVCX.js.map} +0 -0
  93. /package/dist/{chunk-ITEPRN6L.js.map → chunk-KRKNTK5Y.js.map} +0 -0
  94. /package/dist/{chunk-UBK5HIMH.js.map → chunk-MD5E5BKO.js.map} +0 -0
  95. /package/dist/{chunk-NETEA5E4.js.map → chunk-OW33LYO2.js.map} +0 -0
  96. /package/dist/{chunk-SMD67GJP.js.map → chunk-XOIKQW2H.js.map} +0 -0
  97. /package/dist/{chunk-BTMYUK4P.js.map → chunk-Z3V42W7P.js.map} +0 -0
  98. /package/dist/{chunk-G4XU7BYU.js.map → chunk-ZTRRB2Y2.js.map} +0 -0
@@ -1,10 +1,11 @@
1
1
  'use client'
2
2
 
3
+ import * as PopoverPrimitive from '@radix-ui/react-popover'
3
4
  import * as React from 'react'
4
- import { PenEditIcon, UserIcon, UserPlusIcon } from '../icons-v2-generated'
5
+ import { CheckIcon, PenEditIcon, SearchIcon, UserIcon, UserPlusIcon } from '../icons-v2-generated'
5
6
  import { cn } from '../../utils/cn'
6
7
  import { Autocomplete, type AutocompleteOption } from './autocomplete'
7
- import { SearchableSelect, type SearchableSelectOption } from './searchable-select'
8
+ import { Input } from './input'
8
9
  import { SquareAvatar } from './square-avatar'
9
10
 
10
11
  export interface TicketAssigneeOption {
@@ -41,33 +42,31 @@ function CompactAssigneeDropdown({
41
42
  onAssign,
42
43
  className,
43
44
  }: AssigneeDropdownProps) {
45
+ const [isOpen, setIsOpen] = React.useState(false)
46
+ const [search, setSearch] = React.useState('')
44
47
  const hasAssignee = !!currentAssignee
45
48
 
46
- // Current assignee first; SearchableSelect filters but never reorders.
47
- const orderedOptions = React.useMemo<SearchableSelectOption[]>(() => {
48
- const withAvatars = options.map(o => ({
49
- value: o.value,
50
- label: o.label,
51
- icon: (
52
- <SquareAvatar
53
- src={o.imageUrl}
54
- alt={o.label}
55
- fallback={o.label}
56
- size="sm"
57
- variant="round"
58
- className="h-6 w-6 shrink-0"
59
- />
60
- ),
61
- }))
62
- if (!currentAssignee) return withAvatars
63
- const current = withAvatars.find(o => o.value === currentAssignee.id)
64
- if (!current) return withAvatars
65
- return [current, ...withAvatars.filter(o => o.value !== currentAssignee.id)]
66
- }, [options, currentAssignee])
49
+ React.useEffect(() => {
50
+ if (!isOpen) setSearch('')
51
+ }, [isOpen])
52
+
53
+ const filtered = React.useMemo(() => {
54
+ const q = search.trim().toLowerCase()
55
+ if (!q) return options
56
+ return options.filter(o => o.label.toLowerCase().includes(q))
57
+ }, [options, search])
58
+
59
+ const orderedOptions = React.useMemo(() => {
60
+ if (!currentAssignee) return filtered
61
+ const current = filtered.find(o => o.value === currentAssignee.id)
62
+ if (!current) return filtered
63
+ return [current, ...filtered.filter(o => o.value !== currentAssignee.id)]
64
+ }, [filtered, currentAssignee])
67
65
 
68
66
  const handleSelect = (userId: string) => {
69
- // Selecting the current assignee again unassigns.
70
- onAssign(currentAssignee?.id === userId ? null : userId)
67
+ const next = currentAssignee?.id === userId ? null : userId
68
+ onAssign(next)
69
+ setIsOpen(false)
71
70
  }
72
71
 
73
72
  const trigger = hasAssignee ? (
@@ -103,17 +102,73 @@ function CompactAssigneeDropdown({
103
102
  )
104
103
 
105
104
  return (
106
- <SearchableSelect
107
- options={orderedOptions}
108
- value={currentAssignee?.id ?? null}
109
- onValueChange={handleSelect}
110
- searchPlaceholder="Search users..."
111
- emptyText="No users found"
112
- isLoading={isLoading}
113
- trigger={trigger}
114
- align="end"
115
- contentClassName="w-72"
116
- />
105
+ <PopoverPrimitive.Root open={isOpen} onOpenChange={setIsOpen} modal={false}>
106
+ <PopoverPrimitive.Trigger asChild>{trigger}</PopoverPrimitive.Trigger>
107
+ <PopoverPrimitive.Portal>
108
+ <PopoverPrimitive.Content
109
+ align="end"
110
+ sideOffset={6}
111
+ className={cn(
112
+ 'z-50 w-72 bg-ods-card border border-ods-border rounded-[6px] shadow-lg overflow-hidden',
113
+ 'data-[state=open]:animate-in data-[state=closed]:animate-out',
114
+ 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
115
+ 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',
116
+ 'data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2',
117
+ )}
118
+ >
119
+ <div className="border-b border-ods-border">
120
+ <Input
121
+ autoFocus
122
+ value={search}
123
+ onChange={e => setSearch(e.target.value)}
124
+ placeholder="Search users..."
125
+ startAdornment={<SearchIcon className="size-4 text-ods-text-secondary" />}
126
+ className="rounded-none border-0"
127
+ />
128
+ </div>
129
+ <div className="max-h-80 overflow-y-auto py-[var(--spacing-system-xs)]" role="listbox">
130
+ {isLoading ? (
131
+ <div className="px-[var(--spacing-system-sf)] py-[var(--spacing-system-s)] text-h5 text-ods-text-secondary">
132
+ Loading…
133
+ </div>
134
+ ) : orderedOptions.length === 0 ? (
135
+ <div className="px-[var(--spacing-system-sf)] py-[var(--spacing-system-s)] text-h5 text-ods-text-secondary">
136
+ No users found
137
+ </div>
138
+ ) : (
139
+ orderedOptions.map(opt => {
140
+ const isCurrent = currentAssignee?.id === opt.value
141
+ return (
142
+ <button
143
+ key={opt.value}
144
+ type="button"
145
+ role="option"
146
+ aria-selected={isCurrent}
147
+ onClick={() => handleSelect(opt.value)}
148
+ className={cn(
149
+ 'flex items-center gap-[var(--spacing-system-xs)] w-full px-[var(--spacing-system-sf)] py-[var(--spacing-system-xs)] text-left',
150
+ 'hover:bg-ods-bg-hover transition-colors',
151
+ isCurrent && 'bg-ods-bg-hover',
152
+ )}
153
+ >
154
+ <SquareAvatar
155
+ src={opt.imageUrl}
156
+ alt={opt.label}
157
+ fallback={opt.label}
158
+ size="sm"
159
+ variant="round"
160
+ className="h-6 w-6 shrink-0"
161
+ />
162
+ <span className="flex-1 truncate text-h4 text-ods-text-primary" title={opt.label}>{opt.label}</span>
163
+ {isCurrent && <CheckIcon className="size-4 shrink-0 text-ods-accent" />}
164
+ </button>
165
+ )
166
+ })
167
+ )}
168
+ </div>
169
+ </PopoverPrimitive.Content>
170
+ </PopoverPrimitive.Portal>
171
+ </PopoverPrimitive.Root>
117
172
  )
118
173
  }
119
174
 
@@ -167,8 +167,6 @@ export * from './ticket-status-tag'
167
167
  export * from './ticket-status-config-row'
168
168
  export * from './color-swatch'
169
169
  export * from './color-preset-select'
170
- export * from './searchable-select'
171
- export * from './test-run'
172
170
  export * from './assignee-dropdown'
173
171
  export * from './ticket-info-section'
174
172
  export * from './ticket-detail-section'