@flamingo-stack/openframe-frontend-core 0.0.314 → 0.0.315
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/dist/{chunk-EC4DGRN6.cjs → chunk-2JPSWDSM.cjs} +13 -6
- package/dist/chunk-2JPSWDSM.cjs.map +1 -0
- package/dist/{chunk-ZW3NHMG7.js → chunk-2MLMZAK4.js} +2 -2
- package/dist/{chunk-OD3BEWDQ.js → chunk-47JZOP7Y.js} +2 -2
- package/dist/{chunk-BJ6JXN5Z.js → chunk-4D37W55K.js} +4 -4
- package/dist/{chunk-L7BROXZ7.js → chunk-6W54MBU2.js} +2 -2
- package/dist/{chunk-NH2RY6VM.js → chunk-7U4YFQX2.js} +13 -6
- package/dist/{chunk-NH2RY6VM.js.map → chunk-7U4YFQX2.js.map} +1 -1
- package/dist/{chunk-46UZAYUT.cjs → chunk-A2H6TFS4.cjs} +26 -26
- package/dist/{chunk-46UZAYUT.cjs.map → chunk-A2H6TFS4.cjs.map} +1 -1
- package/dist/{chunk-2LFQJYLQ.cjs → chunk-BSAFGQVW.cjs} +7 -7
- package/dist/{chunk-2LFQJYLQ.cjs.map → chunk-BSAFGQVW.cjs.map} +1 -1
- package/dist/{chunk-VCJOLKED.cjs → chunk-HATCNFQL.cjs} +9 -9
- package/dist/{chunk-VCJOLKED.cjs.map → chunk-HATCNFQL.cjs.map} +1 -1
- package/dist/{chunk-UO27TVAO.js → chunk-MOOV4ORG.js} +2 -2
- package/dist/{chunk-UNKIRZVY.cjs → chunk-OSEKWT6X.cjs} +12 -12
- package/dist/{chunk-UNKIRZVY.cjs.map → chunk-OSEKWT6X.cjs.map} +1 -1
- package/dist/{chunk-AD7TII2A.cjs → chunk-QW6OL4NY.cjs} +5 -5
- package/dist/{chunk-AD7TII2A.cjs.map → chunk-QW6OL4NY.cjs.map} +1 -1
- package/dist/{chunk-XKVSR3IV.js → chunk-TK6OABYF.js} +2 -2
- package/dist/{chunk-WJCOWYAP.cjs → chunk-TQ7CMFSY.cjs} +14 -14
- package/dist/{chunk-WJCOWYAP.cjs.map → chunk-TQ7CMFSY.cjs.map} +1 -1
- package/dist/{chunk-DD35H7HA.cjs → chunk-TVNILN2F.cjs} +37 -37
- package/dist/{chunk-DD35H7HA.cjs.map → chunk-TVNILN2F.cjs.map} +1 -1
- package/dist/{chunk-JWX6NIQ4.js → chunk-VFIWQGJZ.js} +2 -2
- package/dist/{chunk-E2LC43T3.js → chunk-VY5YF4B7.js} +2 -2
- package/dist/{chunk-BHOGI57O.cjs → chunk-WFHNXCI3.cjs} +30 -30
- package/dist/{chunk-BHOGI57O.cjs.map → chunk-WFHNXCI3.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/features/push-button-selector.d.ts +1 -0
- package/dist/components/features/push-button-selector.d.ts.map +1 -1
- package/dist/components/index.cjs +172 -172
- package/dist/components/index.js +8 -8
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +23 -23
- package/dist/components/onboarding-guides/index.js +3 -3
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +61 -61
- package/dist/components/tickets/index.js +3 -3
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/features/push-button-selector.tsx +21 -3
- package/dist/chunk-EC4DGRN6.cjs.map +0 -1
- /package/dist/{chunk-ZW3NHMG7.js.map → chunk-2MLMZAK4.js.map} +0 -0
- /package/dist/{chunk-OD3BEWDQ.js.map → chunk-47JZOP7Y.js.map} +0 -0
- /package/dist/{chunk-BJ6JXN5Z.js.map → chunk-4D37W55K.js.map} +0 -0
- /package/dist/{chunk-L7BROXZ7.js.map → chunk-6W54MBU2.js.map} +0 -0
- /package/dist/{chunk-UO27TVAO.js.map → chunk-MOOV4ORG.js.map} +0 -0
- /package/dist/{chunk-XKVSR3IV.js.map → chunk-TK6OABYF.js.map} +0 -0
- /package/dist/{chunk-JWX6NIQ4.js.map → chunk-VFIWQGJZ.js.map} +0 -0
- /package/dist/{chunk-E2LC43T3.js.map → chunk-VY5YF4B7.js.map} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { Button, Badge } from "../ui";
|
|
4
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../ui/tooltip";
|
|
4
5
|
import { Check } from 'lucide-react';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
|
|
@@ -15,6 +16,7 @@ export interface SelectableOption {
|
|
|
15
16
|
icon?: React.ReactNode;
|
|
16
17
|
color?: string;
|
|
17
18
|
disabled?: boolean; // If true, option is shown grayed out and not selectable
|
|
19
|
+
disabledReason?: string; // Tooltip shown on hover when disabled — explains WHY it's unavailable
|
|
18
20
|
section?: string; // Optional section ID to group options
|
|
19
21
|
}
|
|
20
22
|
|
|
@@ -151,19 +153,21 @@ export function PushButtonSelector({
|
|
|
151
153
|
const renderOption = (option: SelectableOption) => {
|
|
152
154
|
const isSelected = validSelectedIds.includes(option.id);
|
|
153
155
|
|
|
154
|
-
|
|
156
|
+
const optionEl = (
|
|
155
157
|
<div
|
|
156
158
|
key={option.id}
|
|
157
159
|
className={`
|
|
158
160
|
p-4 rounded-lg border transition-all duration-200 group
|
|
159
161
|
${option.disabled
|
|
160
|
-
? 'cursor-not-allowed opacity-40 bg-ods-card border-ods-border
|
|
162
|
+
? `${isSelected ? 'cursor-pointer' : 'cursor-not-allowed'} opacity-40 bg-ods-card border-ods-border`
|
|
161
163
|
: isSelected
|
|
162
164
|
? 'cursor-pointer bg-ods-bg-secondary border-ods-accent shadow-sm'
|
|
163
165
|
: 'cursor-pointer bg-ods-bg-primary border-ods-border hover:border-ods-border-hover hover:bg-ods-bg-hover'
|
|
164
166
|
}
|
|
165
167
|
`}
|
|
166
|
-
|
|
168
|
+
// Disabled options can't be newly SELECTED, but an already-selected one
|
|
169
|
+
// (e.g. it later became unavailable) must still be removable.
|
|
170
|
+
onClick={() => (!option.disabled || isSelected) && toggleSelection(option.id)}
|
|
167
171
|
>
|
|
168
172
|
<div className="flex items-center justify-between gap-4">
|
|
169
173
|
<div className="flex items-center gap-3 flex-1 min-w-0">
|
|
@@ -199,6 +203,18 @@ export function PushButtonSelector({
|
|
|
199
203
|
</div>
|
|
200
204
|
</div>
|
|
201
205
|
);
|
|
206
|
+
|
|
207
|
+
// Disabled options explain WHY on hover via the unified Tooltip.
|
|
208
|
+
if (option.disabled && option.disabledReason) {
|
|
209
|
+
return (
|
|
210
|
+
<Tooltip key={option.id}>
|
|
211
|
+
<TooltipTrigger asChild>{optionEl}</TooltipTrigger>
|
|
212
|
+
<TooltipContent className="max-w-xs">{option.disabledReason}</TooltipContent>
|
|
213
|
+
</Tooltip>
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
return optionEl;
|
|
202
218
|
};
|
|
203
219
|
|
|
204
220
|
// Group options by section if sections are provided
|
|
@@ -271,6 +287,7 @@ export function PushButtonSelector({
|
|
|
271
287
|
};
|
|
272
288
|
|
|
273
289
|
return (
|
|
290
|
+
<TooltipProvider delayDuration={150}>
|
|
274
291
|
<div className={`space-y-4 ${className}`}>
|
|
275
292
|
{title && (
|
|
276
293
|
<h3 className="text-h5 text-ods-text-primary">
|
|
@@ -319,5 +336,6 @@ export function PushButtonSelector({
|
|
|
319
336
|
</div>
|
|
320
337
|
)}
|
|
321
338
|
</div>
|
|
339
|
+
</TooltipProvider>
|
|
322
340
|
);
|
|
323
341
|
}
|