@flamingo-stack/openframe-frontend-core 0.0.736 → 0.0.738
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/build/export-map.json +1 -1
- package/dist/{chunk-AZL332TK.cjs → chunk-2QMBXGMQ.cjs} +15 -2
- package/dist/{chunk-7V2KP2TB.cjs → chunk-2SBHPHLS.cjs} +4 -4
- package/dist/{chunk-LIH5OQLY.cjs → chunk-2UZS3ZH7.cjs} +8 -8
- package/dist/{chunk-MGW5DO6P.cjs → chunk-3BBOAMWJ.cjs} +7 -7
- package/dist/{chunk-HZJRERJW.cjs → chunk-3RFQPQ7Z.cjs} +3 -3
- package/dist/{chunk-T27CVQBO.cjs → chunk-4T6ETBL4.cjs} +151 -83
- package/dist/{chunk-JM54CNZZ.cjs → chunk-4YQNJJWM.cjs} +95 -95
- package/dist/{chunk-UBQSOB3X.cjs → chunk-5BKAUXLR.cjs} +4 -4
- package/dist/{chunk-YADG5Q7C.cjs → chunk-63N4FN5V.cjs} +3 -3
- package/dist/{chunk-URX2YTCL.cjs → chunk-66R4NGGU.cjs} +77 -71
- package/dist/{chunk-EJOXXJJB.cjs → chunk-7F3V45AH.cjs} +29 -29
- package/dist/{chunk-BDF3FNOC.cjs → chunk-7GETNFZ5.cjs} +49 -49
- package/dist/{chunk-L4ZNR5V7.cjs → chunk-7LTG6CJ3.cjs} +67 -67
- package/dist/{chunk-MJGX357L.cjs → chunk-B27QEHYR.cjs} +2 -2
- package/dist/{chunk-OV6BGMEL.cjs → chunk-BRKTN6UR.cjs} +340 -328
- package/dist/{chunk-VRNNIV5Y.cjs → chunk-EG545WGV.cjs} +4 -4
- package/dist/{chunk-ZJNYWNCB.cjs → chunk-FG7HTGT3.cjs} +24 -24
- package/dist/{chunk-77SD7RXY.cjs → chunk-GAF4L3JW.cjs} +7 -7
- package/dist/{chunk-FTGVG6FW.cjs → chunk-GQZOUVXC.cjs} +34 -34
- package/dist/{chunk-ZEX5WU35.cjs → chunk-HNYLTEIS.cjs} +48 -69
- package/dist/{chunk-FCGLSWKR.cjs → chunk-IFS4AH77.cjs} +19 -1
- package/dist/{chunk-L535OD7V.cjs → chunk-JZNESLJX.cjs} +2 -2
- package/dist/{chunk-SZFA2LQR.cjs → chunk-KQ4IKALJ.cjs} +35 -35
- package/dist/{chunk-EX2GYIGW.cjs → chunk-LY5VOKV7.cjs} +6 -6
- package/dist/{chunk-XLSVQJBA.cjs → chunk-MLKL2YVE.cjs} +44 -44
- package/dist/{chunk-BL5GOCHP.cjs → chunk-MTNNYSP3.cjs} +26 -18
- package/dist/{chunk-ZRYKDN2J.cjs → chunk-N2CISBJJ.cjs} +15 -15
- package/dist/chunk-N5NDPULP.cjs +57 -0
- package/dist/{chunk-P6Z3EBPJ.cjs → chunk-R36NZTUJ.cjs} +26 -26
- package/dist/{chunk-OJUMVOMP.cjs → chunk-U5BRSRXA.cjs} +923 -759
- package/dist/{chunk-DUXLZPMJ.cjs → chunk-UMO55S55.cjs} +2 -2
- package/dist/{chunk-JGGSRCRD.cjs → chunk-XGHZIYQN.cjs} +24 -24
- package/dist/{chunk-NONQUGRP.cjs → chunk-XMNLPQ75.cjs} +12 -12
- package/dist/{cloud-tenants-M55HMW6F.cjs → cloud-tenants-FTQGWXHS.cjs} +16 -16
- package/dist/components/agent-identity.d.ts +8 -1
- package/dist/components/agent-identity.d.ts.map +1 -1
- package/dist/components/agent-identity.js +6 -1
- package/dist/components/calendar.cjs +4 -4
- package/dist/components/case-studies/index.cjs +28 -28
- package/dist/components/chat/chat-turn.d.ts +23 -0
- package/dist/components/chat/chat-turn.d.ts.map +1 -0
- package/dist/components/chat/chat-turn.js +30 -0
- package/dist/components/chat/entity-cards/index.d.ts +1 -0
- package/dist/components/chat/entity-cards/index.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/index.js +2 -0
- package/dist/components/chat/hooks/use-ask-prompts.d.ts +1 -1
- package/dist/components/chat/hooks/use-ask-prompts.js +1 -1
- package/dist/components/chat/index.cjs +16 -12
- package/dist/components/chat/index.d.ts +1 -0
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +1 -0
- package/dist/components/chat/mingo-info-card.d.ts +17 -1
- package/dist/components/chat/mingo-info-card.d.ts.map +1 -1
- package/dist/components/chat/mingo-info-card.js +15 -3
- package/dist/components/contact/index.cjs +17 -17
- package/dist/components/docs/index.cjs +20 -20
- package/dist/components/embeds/index.cjs +17 -17
- package/dist/components/faq/faq-ask-card.d.ts +5 -4
- package/dist/components/faq/faq-ask-card.d.ts.map +1 -1
- package/dist/components/faq/faq-document-page.d.ts +3 -1
- package/dist/components/faq/faq-document-page.d.ts.map +1 -1
- package/dist/components/faq/faq-document-page.js +2 -0
- package/dist/components/faq/faq-section.d.ts +37 -5
- package/dist/components/faq/faq-section.d.ts.map +1 -1
- package/dist/components/faq/faq-section.js +36 -9
- package/dist/components/faq/index.cjs +23 -17
- package/dist/components/faq/index.d.ts +1 -1
- package/dist/components/faq/index.d.ts.map +1 -1
- package/dist/components/faq/index.js +4 -2
- package/dist/components/features/auth/auth-benefits-panel.d.ts +3 -5
- package/dist/components/features/auth/auth-benefits-panel.d.ts.map +1 -1
- package/dist/components/features/auth/auth-benefits-panel.js +3 -19
- package/dist/components/features/conversation-card.d.ts +12 -4
- package/dist/components/features/conversation-card.d.ts.map +1 -1
- package/dist/components/features/conversation-card.js +30 -38
- package/dist/components/features/index.cjs +16 -16
- package/dist/components/help-center-pages/delivery-page.d.ts +8 -1
- package/dist/components/help-center-pages/delivery-page.d.ts.map +1 -1
- package/dist/components/help-center-pages/delivery-page.js +16 -4
- package/dist/components/help-center-pages/download-apps-page.d.ts +8 -1
- package/dist/components/help-center-pages/download-apps-page.d.ts.map +1 -1
- package/dist/components/help-center-pages/download-apps-page.js +11 -6
- package/dist/components/help-center-pages/index.cjs +216 -161
- package/dist/components/help-center-pages/onboarding-guides-catalog-page.d.ts +8 -1
- package/dist/components/help-center-pages/onboarding-guides-catalog-page.d.ts.map +1 -1
- package/dist/components/help-center-pages/onboarding-guides-catalog-page.js +26 -14
- package/dist/components/help-center-pages/product-releases-list-page.d.ts +8 -1
- package/dist/components/help-center-pages/product-releases-list-page.d.ts.map +1 -1
- package/dist/components/help-center-pages/product-releases-list-page.js +24 -12
- package/dist/components/help-center-pages/roadmap-page.d.ts +8 -1
- package/dist/components/help-center-pages/roadmap-page.d.ts.map +1 -1
- package/dist/components/help-center-pages/roadmap-page.js +25 -13
- package/dist/components/index.cjs +103 -79
- package/dist/components/meeting-scheduler/index.cjs +49 -49
- package/dist/components/navigation/index.cjs +19 -19
- package/dist/components/onboarding-guides/index.cjs +19 -19
- package/dist/components/platform/ToolBadge.d.ts.map +1 -1
- package/dist/components/platform/ToolBadge.js +4 -3
- package/dist/components/product-demo/index.cjs +8 -8
- package/dist/components/related-content/index.cjs +8 -8
- package/dist/components/shared/dev-section/dev-section-page.d.ts +8 -1
- package/dist/components/shared/dev-section/dev-section-page.d.ts.map +1 -1
- package/dist/components/shared/dev-section/dev-section-page.js +8 -3
- package/dist/components/shared/legal-document/legal-document-page.d.ts +8 -1
- package/dist/components/shared/legal-document/legal-document-page.d.ts.map +1 -1
- package/dist/components/shared/legal-document/legal-document-page.js +4 -1
- package/dist/components/tickets/index.cjs +22 -21
- package/dist/components/ui/app-window-frame.d.ts +7 -1
- package/dist/components/ui/app-window-frame.d.ts.map +1 -1
- package/dist/components/ui/app-window-frame.js +10 -2
- package/dist/components/ui/benefit-list.d.ts +42 -0
- package/dist/components/ui/benefit-list.d.ts.map +1 -0
- package/dist/components/ui/benefit-list.js +62 -0
- package/dist/components/ui/button/button.d.ts +1 -0
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/button/button.js +15 -2
- package/dist/components/ui/dropdown-button.d.ts +20 -2
- package/dist/components/ui/dropdown-button.d.ts.map +1 -1
- package/dist/components/ui/dropdown-button.js +57 -1
- package/dist/components/ui/file-manager/index.cjs +11 -11
- package/dist/components/ui/index.cjs +32 -16
- package/dist/components/ui/index.d.ts +3 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +3 -0
- package/dist/components/ui/leader-row.d.ts +17 -0
- package/dist/components/ui/leader-row.d.ts.map +1 -0
- package/dist/components/ui/leader-row.js +14 -0
- package/dist/components/ui/strip-card.d.ts +23 -0
- package/dist/components/ui/strip-card.d.ts.map +1 -0
- package/dist/components/ui/strip-card.js +56 -0
- package/dist/contexts/assistant-runtime-context.d.ts +5 -5
- package/dist/{devices-WWJZFG6E.cjs → devices-MPI5HUQS.cjs} +17 -17
- package/dist/{embeddable-chat-76IJ6TQZ.cjs → embeddable-chat-7WLUDBGK.cjs} +84 -84
- package/dist/index.cjs +46 -20
- package/dist/{knowledge-F4YFQT3G.cjs → knowledge-BS663XXL.cjs} +17 -17
- package/dist/{logs-GAYEGEZM.cjs → logs-KS2A2VN5.cjs} +25 -25
- package/dist/{policies-ZOVJCJWX.cjs → policies-H3OK6H4Q.cjs} +20 -20
- package/dist/{remote-session-Z4YZFG5E.cjs → remote-session-EHKXU4HI.cjs} +7 -7
- package/dist/{software-update-H4YE5GMJ.cjs → software-update-HMMMWIL3.cjs} +20 -20
- package/dist/{tickets-board-JOSYLOS7.cjs → tickets-board-3YJKOOZE.cjs} +10 -10
- package/dist/types/faq.d.ts +17 -0
- package/dist/types/faq.d.ts.map +1 -1
- package/dist/types/faq.js +4 -0
- package/dist/types/index.cjs +4 -0
- package/dist/utils/demo-clock.d.ts +22 -0
- package/dist/utils/demo-clock.d.ts.map +1 -0
- package/dist/utils/demo-clock.js +40 -0
- package/dist/utils/identity-tint.d.ts +13 -0
- package/dist/utils/identity-tint.d.ts.map +1 -0
- package/dist/utils/identity-tint.js +14 -0
- package/dist/utils/index.cjs +54 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -0
- package/dist/{video-file-player-6NWGXZ3W.cjs → video-file-player-ZH2ILAPO.cjs} +12 -12
- package/package.json +1 -1
- package/src/components/agent-identity.tsx +12 -1
- package/src/components/chat/chat-turn.tsx +52 -0
- package/src/components/chat/entity-cards/index.ts +1 -0
- package/src/components/chat/hooks/use-ask-prompts.ts +2 -2
- package/src/components/chat/index.ts +1 -0
- package/src/components/chat/mingo-info-card.tsx +39 -4
- package/src/components/faq/faq-ask-card.tsx +5 -4
- package/src/components/faq/faq-document-page.tsx +4 -0
- package/src/components/faq/faq-section.tsx +86 -14
- package/src/components/faq/index.ts +1 -1
- package/src/components/features/auth/auth-benefits-panel.tsx +5 -32
- package/src/components/features/conversation-card.tsx +48 -46
- package/src/components/help-center-pages/delivery-page.tsx +16 -1
- package/src/components/help-center-pages/download-apps-page.tsx +9 -0
- package/src/components/help-center-pages/onboarding-guides-catalog-page.tsx +16 -1
- package/src/components/help-center-pages/product-releases-list-page.tsx +16 -1
- package/src/components/help-center-pages/roadmap-page.tsx +16 -1
- package/src/components/platform/ToolBadge.tsx +4 -3
- package/src/components/shared/dev-section/dev-section-page.tsx +9 -0
- package/src/components/shared/legal-document/legal-document-page.tsx +9 -0
- package/src/components/ui/app-window-frame.tsx +18 -2
- package/src/components/ui/benefit-list.tsx +97 -0
- package/src/components/ui/button/button.tsx +14 -1
- package/src/components/ui/dropdown-button.tsx +73 -1
- package/src/components/ui/index.ts +3 -0
- package/src/components/ui/leader-row.tsx +28 -0
- package/src/components/ui/strip-card.tsx +68 -0
- package/src/contexts/assistant-runtime-context.tsx +5 -5
- package/src/types/faq.ts +18 -0
- package/src/utils/demo-clock.ts +62 -0
- package/src/utils/identity-tint.ts +23 -0
- package/src/utils/index.ts +2 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useRouter } from "../../../embed-shims/next-navigation.js";
|
|
4
4
|
import {
|
|
5
5
|
OPENFRAME_DEV_SECTIONS
|
|
6
6
|
} from "../../../utils/dev-sections/openframe-dev-sections.js";
|
|
7
|
+
import { FaqSection, pageFaqProps } from "../../faq/faq-section.js";
|
|
7
8
|
import { PageShell, PageLayout } from "../../ui/index.js";
|
|
8
9
|
import { DevSectionView } from "./dev-section-view.js";
|
|
9
10
|
function DevSectionPage({
|
|
@@ -13,6 +14,7 @@ function DevSectionPage({
|
|
|
13
14
|
backButton,
|
|
14
15
|
title,
|
|
15
16
|
subtitle,
|
|
17
|
+
faq,
|
|
16
18
|
shell = true
|
|
17
19
|
}) {
|
|
18
20
|
const router = useRouter();
|
|
@@ -28,7 +30,7 @@ function DevSectionPage({
|
|
|
28
30
|
// renders ONLY its search + filter controls (`showHeading={false}`), no
|
|
29
31
|
// duplicate title. (The hero icon is intentionally dropped: TitleBlock is
|
|
30
32
|
// frozen and renders title-only.)
|
|
31
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ jsxs(
|
|
32
34
|
PageLayout,
|
|
33
35
|
{
|
|
34
36
|
title: title ?? section.hero.title,
|
|
@@ -36,7 +38,10 @@ function DevSectionPage({
|
|
|
36
38
|
titleSize: "h1",
|
|
37
39
|
titleWrap: true,
|
|
38
40
|
backButton: backCfg,
|
|
39
|
-
children:
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ jsx(DevSectionView, { sectionKey, showHeading: false, preControls, children }),
|
|
43
|
+
faq && /* @__PURE__ */ jsx(FaqSection, { ...pageFaqProps(faq) })
|
|
44
|
+
]
|
|
40
45
|
}
|
|
41
46
|
)
|
|
42
47
|
);
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* Endpoint configuration: forwarded to `useLegalDocs(docType, { apiEndpoint })`.
|
|
16
16
|
*/
|
|
17
17
|
import type { ComponentType } from 'react';
|
|
18
|
+
import { type PageFaqSlot } from '../../faq/faq-section';
|
|
18
19
|
import { type LegalDocument } from './use-legal-docs';
|
|
19
20
|
export interface LegalDocumentMarkdownRendererProps {
|
|
20
21
|
content: string;
|
|
@@ -61,10 +62,16 @@ export interface LegalDocumentPageProps {
|
|
|
61
62
|
label?: string;
|
|
62
63
|
href?: string;
|
|
63
64
|
} | false;
|
|
65
|
+
/**
|
|
66
|
+
* The page's own FAQ block: the topic the page is about (stated by the host,
|
|
67
|
+
* never read from its address) and where the host serves the FAQs. Rendered
|
|
68
|
+
* after the page's content, inside its container. Absent: no FAQ block.
|
|
69
|
+
*/
|
|
70
|
+
faq?: PageFaqSlot;
|
|
64
71
|
/** Render the standalone `<PageShell>`. Default true. Pass false when the host
|
|
65
72
|
* layout already provides the page container — only the padding box renders,
|
|
66
73
|
* avoiding a nested `<main>`. */
|
|
67
74
|
shell?: boolean;
|
|
68
75
|
}
|
|
69
|
-
export declare function LegalDocumentPage({ docType, title, fallbackDescription, contactEmail, errorContactPrompt, errorTitle, emptyStateMessage, initialData, initialLastUpdatedLabel, apiEndpoint, MarkdownRenderer, backButton, shell, }: LegalDocumentPageProps): import("react").JSX.Element;
|
|
76
|
+
export declare function LegalDocumentPage({ docType, title, fallbackDescription, contactEmail, errorContactPrompt, errorTitle, emptyStateMessage, initialData, initialLastUpdatedLabel, apiEndpoint, MarkdownRenderer, backButton, faq, shell, }: LegalDocumentPageProps): import("react").JSX.Element;
|
|
70
77
|
//# sourceMappingURL=legal-document-page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legal-document-page.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/legal-document/legal-document-page.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"legal-document-page.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/legal-document/legal-document-page.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,EAA4B,KAAK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AAK,EACL,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,WAAkB,EAClB,uBAA8B,EAC9B,WAAW,EACX,gBAAuC,EACvC,UAAU,EACV,GAAG,EACH,KAAY,GACb,EAAE,sBAAsB,+BAkFxB"}
|
|
@@ -3,6 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import Link from "../../../embed-shims/next-link.js";
|
|
4
4
|
import { useRouter } from "../../../embed-shims/next-navigation.js";
|
|
5
5
|
import { formatLegalDate } from "../../../utils/format.js";
|
|
6
|
+
import { FaqSection, pageFaqProps } from "../../faq/faq-section.js";
|
|
6
7
|
import { PageShell, PageLayout } from "../../ui/index.js";
|
|
7
8
|
import { RichMarkdownRenderer } from "../../ui/markdown/index.js";
|
|
8
9
|
import { useLegalDocs } from "./use-legal-docs.js";
|
|
@@ -19,6 +20,7 @@ function LegalDocumentPage({
|
|
|
19
20
|
apiEndpoint,
|
|
20
21
|
MarkdownRenderer = RichMarkdownRenderer,
|
|
21
22
|
backButton,
|
|
23
|
+
faq,
|
|
22
24
|
shell = true
|
|
23
25
|
}) {
|
|
24
26
|
const router = useRouter();
|
|
@@ -68,7 +70,8 @@ function LegalDocumentPage({
|
|
|
68
70
|
" ",
|
|
69
71
|
"for more information."
|
|
70
72
|
] })
|
|
71
|
-
] }) }) }) }) })
|
|
73
|
+
] }) }) }) }) }),
|
|
74
|
+
faq && /* @__PURE__ */ jsx(FaqSection, { ...pageFaqProps(faq) })
|
|
72
75
|
] });
|
|
73
76
|
return shell ? /* @__PURE__ */ jsx(PageShell, { children: inner }) : /* @__PURE__ */ jsx("div", { className: "page-shell-content", children: inner });
|
|
74
77
|
}
|
|
@@ -14,10 +14,11 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
18
|
-
require('../../chunk-
|
|
19
|
-
require('../../chunk-
|
|
20
|
-
require('../../chunk-
|
|
17
|
+
var _chunk4YQNJJWMcjs = require('../../chunk-4YQNJJWM.cjs');
|
|
18
|
+
require('../../chunk-R36NZTUJ.cjs');
|
|
19
|
+
require('../../chunk-MTNNYSP3.cjs');
|
|
20
|
+
require('../../chunk-GAF4L3JW.cjs');
|
|
21
|
+
require('../../chunk-HNYLTEIS.cjs');
|
|
21
22
|
require('../../chunk-HEVW75L3.cjs');
|
|
22
23
|
|
|
23
24
|
|
|
@@ -25,11 +26,11 @@ require('../../chunk-HEVW75L3.cjs');
|
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
|
|
28
|
-
var
|
|
29
|
-
require('../../chunk-
|
|
30
|
-
require('../../chunk-
|
|
29
|
+
var _chunk5BKAUXLRcjs = require('../../chunk-5BKAUXLR.cjs');
|
|
30
|
+
require('../../chunk-U5BRSRXA.cjs');
|
|
31
|
+
require('../../chunk-FG7HTGT3.cjs');
|
|
31
32
|
require('../../chunk-3HPB4H4C.cjs');
|
|
32
|
-
require('../../chunk-
|
|
33
|
+
require('../../chunk-7LTG6CJ3.cjs');
|
|
33
34
|
require('../../chunk-HQQE74RO.cjs');
|
|
34
35
|
require('../../chunk-DEY6XXGO.cjs');
|
|
35
36
|
require('../../chunk-VA7OMDZO.cjs');
|
|
@@ -37,17 +38,17 @@ require('../../chunk-AAFW4STC.cjs');
|
|
|
37
38
|
require('../../chunk-24I6RFVU.cjs');
|
|
38
39
|
require('../../chunk-A6P6DHEZ.cjs');
|
|
39
40
|
require('../../chunk-MZ4KBSH7.cjs');
|
|
40
|
-
require('../../chunk-
|
|
41
|
+
require('../../chunk-3BBOAMWJ.cjs');
|
|
41
42
|
require('../../chunk-YUMFVQIN.cjs');
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
|
|
45
|
-
var
|
|
46
|
-
require('../../chunk-
|
|
47
|
-
require('../../chunk-
|
|
48
|
-
require('../../chunk-
|
|
49
|
-
require('../../chunk-
|
|
50
|
-
require('../../chunk-
|
|
46
|
+
var _chunk4T6ETBL4cjs = require('../../chunk-4T6ETBL4.cjs');
|
|
47
|
+
require('../../chunk-BRKTN6UR.cjs');
|
|
48
|
+
require('../../chunk-N2CISBJJ.cjs');
|
|
49
|
+
require('../../chunk-3RFQPQ7Z.cjs');
|
|
50
|
+
require('../../chunk-UMO55S55.cjs');
|
|
51
|
+
require('../../chunk-B27QEHYR.cjs');
|
|
51
52
|
require('../../chunk-ZOZR3QI2.cjs');
|
|
52
53
|
require('../../chunk-OMV5S5PI.cjs');
|
|
53
54
|
require('../../chunk-KHPX3KU4.cjs');
|
|
@@ -1844,10 +1845,10 @@ require('../../chunk-7DNL734S.cjs');
|
|
|
1844
1845
|
require('../../chunk-WWUSFOJ7.cjs');
|
|
1845
1846
|
require('../../chunk-SKI6NKOE.cjs');
|
|
1846
1847
|
require('../../chunk-EWPR7662.cjs');
|
|
1847
|
-
require('../../chunk-
|
|
1848
|
-
require('../../chunk-
|
|
1849
|
-
require('../../chunk-
|
|
1850
|
-
require('../../chunk-
|
|
1848
|
+
require('../../chunk-LY5VOKV7.cjs');
|
|
1849
|
+
require('../../chunk-7F3V45AH.cjs');
|
|
1850
|
+
require('../../chunk-IFS4AH77.cjs');
|
|
1851
|
+
require('../../chunk-63N4FN5V.cjs');
|
|
1851
1852
|
require('../../chunk-MYBTNOS6.cjs');
|
|
1852
1853
|
require('../../chunk-FTTLBMHU.cjs');
|
|
1853
1854
|
require('../../chunk-S5C3OZCO.cjs');
|
|
@@ -1871,7 +1872,7 @@ require('../../chunk-K6VWTUCH.cjs');
|
|
|
1871
1872
|
require('../../chunk-L2RMTGOK.cjs');
|
|
1872
1873
|
require('../../chunk-Z74QE57T.cjs');
|
|
1873
1874
|
require('../../chunk-XZJCBIYR.cjs');
|
|
1874
|
-
require('../../chunk-
|
|
1875
|
+
require('../../chunk-2QMBXGMQ.cjs');
|
|
1875
1876
|
require('../../chunk-V45KLJQP.cjs');
|
|
1876
1877
|
require('../../chunk-G7SBHMRR.cjs');
|
|
1877
1878
|
require('../../chunk-AKTPO2DN.cjs');
|
|
@@ -1901,4 +1902,4 @@ require('../../chunk-3ATAYP36.cjs');
|
|
|
1901
1902
|
|
|
1902
1903
|
|
|
1903
1904
|
|
|
1904
|
-
exports.HelpCenterCard =
|
|
1905
|
+
exports.HelpCenterCard = _chunk4YQNJJWMcjs.HelpCenterCard; exports.HelpCenterCreateForm = _chunk4YQNJJWMcjs.HelpCenterCreateForm; exports.HelpCenterCreateFormSkeleton = _chunk4YQNJJWMcjs.HelpCenterCreateFormSkeleton; exports.HelpCenterList = _chunk4YQNJJWMcjs.HelpCenterList; exports.TICKET_OPEN_PARAM = _chunk4T6ETBL4cjs.TICKET_OPEN_PARAM; exports.TICKET_TOAST_COPY = _chunk5BKAUXLRcjs.TOAST_COPY; exports.TicketCenter = _chunk4YQNJJWMcjs.TicketCenter; exports.TicketDetailDrawer = _chunk4YQNJJWMcjs.TicketDetailDrawer; exports.TicketLinkedDeliveryCard = _chunk4YQNJJWMcjs.TicketLinkedDeliveryCard; exports.TicketLiveProvider = _chunk5BKAUXLRcjs.TicketLiveProvider; exports.TicketOpenForm = _chunk4YQNJJWMcjs.TicketOpenForm; exports.TicketReplyComposer = _chunk4YQNJJWMcjs.TicketReplyComposer; exports.TicketRow = _chunk4YQNJJWMcjs.TicketRow; exports.buildTicketOpenHref = _chunk4T6ETBL4cjs.buildTicketOpenHref; exports.isOptimistic = _chunk5BKAUXLRcjs.isOptimistic; exports.mapTicketActionError = _chunk4YQNJJWMcjs.mapTicketActionError; exports.useOptionalTicketLive = _chunk5BKAUXLRcjs.useOptionalTicketLive; exports.useTicketActions = _chunk4YQNJJWMcjs.useTicketActions; exports.useTicketEngagements = _chunk4YQNJJWMcjs.useTicketEngagements; exports.useTicketLive = _chunk5BKAUXLRcjs.useTicketLive; exports.useTicketsList = _chunk4YQNJJWMcjs.useTicketsList;
|
|
@@ -5,6 +5,12 @@ export interface AppWindowFrameProps {
|
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
/** A bar pinned under the body (a status line, an action). */
|
|
7
7
|
footer?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* The slug of the agent whose window this is. The window takes that agent's
|
|
10
|
+
* tint from its identity, like every card of the agent's. A window names its
|
|
11
|
+
* agent, never a colour.
|
|
12
|
+
*/
|
|
13
|
+
agent?: string | null;
|
|
8
14
|
className?: string;
|
|
9
15
|
/** The scrolling body between the title bar and the footer. */
|
|
10
16
|
bodyClassName?: string;
|
|
@@ -16,5 +22,5 @@ export interface AppWindowFrameProps {
|
|
|
16
22
|
*
|
|
17
23
|
* The frame is a column, so give it a height and the body fills what is left.
|
|
18
24
|
*/
|
|
19
|
-
export declare function AppWindowFrame({ title, children, footer, className, bodyClassName }: AppWindowFrameProps): import("react").JSX.Element;
|
|
25
|
+
export declare function AppWindowFrame({ title, children, footer, agent, className, bodyClassName }: AppWindowFrameProps): import("react").JSX.Element;
|
|
20
26
|
//# sourceMappingURL=app-window-frame.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-window-frame.d.ts","sourceRoot":"","sources":["../../../src/components/ui/app-window-frame.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app-window-frame.d.ts","sourceRoot":"","sources":["../../../src/components/ui/app-window-frame.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,mBAAmB;IAClC,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;IACpB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,EAAE,mBAAmB,+BA0B/G"}
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "../../utils/cn.js";
|
|
4
|
-
|
|
4
|
+
import { useAgentTint } from "../agent-identity.js";
|
|
5
|
+
function AppWindowFrame({ title, children, footer, agent, className, bodyClassName }) {
|
|
6
|
+
const tint = useAgentTint(agent);
|
|
5
7
|
return /* @__PURE__ */ jsxs(
|
|
6
8
|
"div",
|
|
7
9
|
{
|
|
8
|
-
className: cn(
|
|
10
|
+
className: cn(
|
|
11
|
+
"flex min-w-0 flex-col overflow-hidden rounded-xl border border-ods-border",
|
|
12
|
+
// An agent's window sits on the page surface under that agent's tint.
|
|
13
|
+
tint ? "bg-ods-bg" : "bg-ods-card",
|
|
14
|
+
className
|
|
15
|
+
),
|
|
16
|
+
style: tint,
|
|
9
17
|
children: [
|
|
10
18
|
/* @__PURE__ */ jsxs("div", { className: "relative flex h-10 shrink-0 items-center gap-2 border-b border-ods-border px-4", "aria-hidden": true, children: [
|
|
11
19
|
/* @__PURE__ */ jsx("span", { className: "h-2.5 w-2.5 rounded-full bg-ods-border" }),
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface BenefitItem {
|
|
3
|
+
/** Drawn at 16px in the quiet colour. */
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
/** The mark of each of the trial's terms, wherever a term is listed. */
|
|
8
|
+
export declare const TRIAL_TERM_ICONS: {
|
|
9
|
+
readonly noCard: import("react").JSX.Element;
|
|
10
|
+
readonly cancel: import("react").JSX.Element;
|
|
11
|
+
readonly length: import("react").JSX.Element;
|
|
12
|
+
readonly noContract: import("react").JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
export type TrialTerm = keyof typeof TRIAL_TERM_ICONS;
|
|
15
|
+
/** The trial's terms a list shows when its host names none: cancel anytime, the trial's length, no contract. */
|
|
16
|
+
export declare const DEFAULT_TRIAL_TERMS: readonly TrialTerm[];
|
|
17
|
+
/** The named terms of the trial as benefits, in the order given. The length is left out when the host does not know it. */
|
|
18
|
+
export declare function trialBenefits(trialDays: number | string | null | undefined, terms?: readonly TrialTerm[]): BenefitItem[];
|
|
19
|
+
export interface BenefitListProps {
|
|
20
|
+
/**
|
|
21
|
+
* Which of the trial's terms to list, in order ("cancel", "length",
|
|
22
|
+
* "noContract", "noCard"). Omitted: none, the list is `items` alone.
|
|
23
|
+
*/
|
|
24
|
+
terms?: readonly TrialTerm[];
|
|
25
|
+
/** The free trial's length in days, for the `length` term. Without it that term is left out. */
|
|
26
|
+
trialDays?: number | string | null;
|
|
27
|
+
/** The host's own benefits. With `terms`, `itemsFirst` says which come first. */
|
|
28
|
+
items?: BenefitItem[];
|
|
29
|
+
/** Draw `items` before the trial's terms. Default: after them. */
|
|
30
|
+
itemsFirst?: boolean;
|
|
31
|
+
/** `center` centres the row (under a centred hero). Default `start`. */
|
|
32
|
+
align?: 'start' | 'center';
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* THE row of short benefits beside a call to action ("Cancel Anytime", "No
|
|
37
|
+
* Contract"): a small mark and a few words each, wrapping as a row. The one
|
|
38
|
+
* such row everywhere: the sign-up panel, every hero, every closing call to
|
|
39
|
+
* action. A host chooses WHICH benefits (`terms`, `items`), never how they look.
|
|
40
|
+
*/
|
|
41
|
+
export declare function BenefitList({ terms, trialDays, items, itemsFirst, align, className, }: BenefitListProps): import("react").JSX.Element | null;
|
|
42
|
+
//# sourceMappingURL=benefit-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"benefit-list.d.ts","sourceRoot":"","sources":["../../../src/components/ui/benefit-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQvC,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IACzC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wEAAwE;AACxE,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAEtD,gHAAgH;AAChH,eAAO,MAAM,mBAAmB,EAAE,SAAS,SAAS,EAAuC,CAAC;AAE5F,2HAA2H;AAC3H,wBAAgB,aAAa,CAC3B,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7C,KAAK,GAAE,SAAS,SAAS,EAAwB,GAChD,WAAW,EAAE,CAMf;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IAC7B,gGAAgG;IAChG,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACnC,iFAAiF;IACjF,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;IACtB,kEAAkE;IAClE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wEAAwE;IACxE,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,SAAS,EACT,KAAU,EACV,UAAkB,EAClB,KAAe,EACf,SAAS,GACV,EAAE,gBAAgB,sCA4BlB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../../utils/cn.js";
|
|
4
|
+
import { trialLabels } from "../../utils/trial.js";
|
|
5
|
+
import { FileOffIcon } from "../icons-v2-generated/documents/file-off-icon.js";
|
|
6
|
+
import { CreditCardXmarkIcon } from "../icons-v2-generated/finance/credit-card-xmark-icon.js";
|
|
7
|
+
import { FlaskVialIcon } from "../icons-v2-generated/school/flask-vial-icon.js";
|
|
8
|
+
import { XmarkAltIcon } from "../icons-v2-generated/signs-and-symbols/xmark-alt-icon.js";
|
|
9
|
+
const TRIAL_TERM_ICONS = {
|
|
10
|
+
noCard: /* @__PURE__ */ jsx(CreditCardXmarkIcon, {}),
|
|
11
|
+
cancel: /* @__PURE__ */ jsx(XmarkAltIcon, {}),
|
|
12
|
+
length: /* @__PURE__ */ jsx(FlaskVialIcon, {}),
|
|
13
|
+
noContract: /* @__PURE__ */ jsx(FileOffIcon, {})
|
|
14
|
+
};
|
|
15
|
+
const DEFAULT_TRIAL_TERMS = ["cancel", "length", "noContract"];
|
|
16
|
+
function trialBenefits(trialDays, terms = DEFAULT_TRIAL_TERMS) {
|
|
17
|
+
const labels = trialLabels(trialDays);
|
|
18
|
+
return terms.flatMap((term) => {
|
|
19
|
+
const label = labels[term];
|
|
20
|
+
return label ? [{ icon: TRIAL_TERM_ICONS[term], label }] : [];
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function BenefitList({
|
|
24
|
+
terms,
|
|
25
|
+
trialDays,
|
|
26
|
+
items = [],
|
|
27
|
+
itemsFirst = false,
|
|
28
|
+
align = "start",
|
|
29
|
+
className
|
|
30
|
+
}) {
|
|
31
|
+
const termItems = terms ? trialBenefits(trialDays, terms) : [];
|
|
32
|
+
const all = itemsFirst ? [...items, ...termItems] : [...termItems, ...items];
|
|
33
|
+
if (all.length === 0) return null;
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
"ul",
|
|
36
|
+
{
|
|
37
|
+
className: cn(
|
|
38
|
+
// A full step between benefits, a tighter one between wrapped rows: each reads as its own point.
|
|
39
|
+
"m-0 flex list-none flex-wrap content-center items-center gap-x-[var(--spacing-system-l)] gap-y-[var(--spacing-system-m)] p-0",
|
|
40
|
+
align === "center" && "justify-center",
|
|
41
|
+
className
|
|
42
|
+
),
|
|
43
|
+
children: all.map((item) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-[var(--spacing-system-xs)]", children: [
|
|
44
|
+
item.icon && /* @__PURE__ */ jsx(
|
|
45
|
+
"span",
|
|
46
|
+
{
|
|
47
|
+
className: "flex size-4 shrink-0 items-center justify-center text-ods-text-secondary [&_svg]:size-4",
|
|
48
|
+
"aria-hidden": true,
|
|
49
|
+
children: item.icon
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ jsx("span", { className: "whitespace-nowrap text-ods-text-primary text-h4", children: item.label })
|
|
53
|
+
] }, item.label))
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
BenefitList,
|
|
59
|
+
DEFAULT_TRIAL_TERMS,
|
|
60
|
+
TRIAL_TERM_ICONS,
|
|
61
|
+
trialBenefits
|
|
62
|
+
};
|
|
@@ -6,6 +6,7 @@ declare const buttonVariants: (props?: ({
|
|
|
6
6
|
font?: "bold" | "regular" | null | undefined;
|
|
7
7
|
fullWidth?: boolean | null | undefined;
|
|
8
8
|
noPaddingX?: boolean | null | undefined;
|
|
9
|
+
attach?: "end" | "start" | "none" | null | undefined;
|
|
9
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
11
|
/** @deprecated Use `size="small"` instead. Temporary alias kept for backward compatibility; will be removed in the future. */
|
|
11
12
|
type DeprecatedButtonSize = 'small-legacy';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/button.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,QAAA,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/button.tsx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,uFAmNV,CAAC;AAGH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,CAAC"}
|
|
@@ -88,9 +88,20 @@ const buttonVariants = cva(
|
|
|
88
88
|
noPaddingX: {
|
|
89
89
|
true: "px-0",
|
|
90
90
|
false: ""
|
|
91
|
+
},
|
|
92
|
+
// Two buttons drawn as ONE surface with a seam between them (a main action
|
|
93
|
+
// and a chevron that opens its alternatives: `DropdownButton` with an
|
|
94
|
+
// `action`). `start` is the leading half, `end` the trailing one: each
|
|
95
|
+
// gives up the corners and the border on its inner edge.
|
|
96
|
+
attach: {
|
|
97
|
+
none: "",
|
|
98
|
+
start: "rounded-r-none",
|
|
99
|
+
end: "rounded-l-none border-l-0"
|
|
91
100
|
}
|
|
92
101
|
},
|
|
93
102
|
compoundVariants: [
|
|
103
|
+
// The trailing half as an icon button is the design's 40px chevron cell, at every breakpoint.
|
|
104
|
+
{ attach: "end", size: "icon", class: "w-10 px-0 md:w-10" },
|
|
94
105
|
{ size: "small", class: "[&_svg]:h-4 [&_svg]:w-4" },
|
|
95
106
|
// Comes after the size classes, so cn()'s tailwind-merge resolves the
|
|
96
107
|
// ods-typography group in favour of text-h4.
|
|
@@ -101,7 +112,8 @@ const buttonVariants = cva(
|
|
|
101
112
|
size: "default",
|
|
102
113
|
font: "bold",
|
|
103
114
|
fullWidth: false,
|
|
104
|
-
noPaddingX: false
|
|
115
|
+
noPaddingX: false,
|
|
116
|
+
attach: "none"
|
|
105
117
|
}
|
|
106
118
|
}
|
|
107
119
|
);
|
|
@@ -213,6 +225,7 @@ const Button = React.forwardRef(function ButtonImpl({
|
|
|
213
225
|
font,
|
|
214
226
|
fullWidth,
|
|
215
227
|
noPaddingX,
|
|
228
|
+
attach,
|
|
216
229
|
asChild,
|
|
217
230
|
href,
|
|
218
231
|
openInNewTab,
|
|
@@ -300,7 +313,7 @@ const Button = React.forwardRef(function ButtonImpl({
|
|
|
300
313
|
}
|
|
301
314
|
return /* @__PURE__ */ jsx("button", { ref, className: shellClasses, disabled: isDisabled, onClick, ...props, children: splitContent });
|
|
302
315
|
}
|
|
303
|
-
const classes = cn(buttonVariants({ variant, size, font, fullWidth, noPaddingX }), className);
|
|
316
|
+
const classes = cn(buttonVariants({ variant, size, font, fullWidth, noPaddingX, attach }), className);
|
|
304
317
|
if (asChild) {
|
|
305
318
|
return /* @__PURE__ */ jsx(Slot, { ref, className: classes, ...props, children });
|
|
306
319
|
}
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ActionsMenuGroup, type ActionsMenuItem } from './actions-menu';
|
|
3
3
|
import { type ButtonProps } from './button';
|
|
4
|
+
/** The button's own action, when its label does something itself and the chevron holds the alternatives. */
|
|
5
|
+
export interface DropdownButtonAction {
|
|
6
|
+
href?: string;
|
|
7
|
+
/** Fetch `href` as a file (an installer) instead of navigating to it. */
|
|
8
|
+
download?: boolean | string;
|
|
9
|
+
openInNewTab?: boolean;
|
|
10
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;
|
|
11
|
+
}
|
|
4
12
|
export interface DropdownButtonProps {
|
|
5
13
|
/** Button label rendered next to the chevron. */
|
|
6
14
|
label: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Makes the label a button of its own (Figma `button-action`): it runs this
|
|
17
|
+
* action, and the chevron beside it opens the menu of alternatives. Two click
|
|
18
|
+
* targets on one surface. Without it the whole button opens the menu.
|
|
19
|
+
*/
|
|
20
|
+
action?: DropdownButtonAction;
|
|
21
|
+
/** The chevron's accessible name when `action` is set (it has no text of its own). Default: "More options". */
|
|
22
|
+
menuAriaLabel?: string;
|
|
7
23
|
/** Optional leading icon rendered before the label. */
|
|
8
24
|
icon?: React.ReactNode;
|
|
9
25
|
/**
|
|
@@ -49,7 +65,9 @@ export interface DropdownButtonProps {
|
|
|
49
65
|
* `ActionsMenu`. One component, so the trigger styling, chevron, and menu
|
|
50
66
|
* chrome cannot drift between surfaces.
|
|
51
67
|
*
|
|
52
|
-
*
|
|
68
|
+
* With `action`, the label is a button of its own and the chevron alone opens
|
|
69
|
+
* the menu (two targets, one surface). Otherwise, two trigger looks — BOTH
|
|
70
|
+
* render through the unified `Button`:
|
|
53
71
|
* - default (no `variant`): the card-colored seam trigger — `Button
|
|
54
72
|
* variant="outline"` with the chevron in its `splitIcon` slot, so the label
|
|
55
73
|
* and chevron are separated by a divider, the whole surface is one click
|
|
@@ -62,5 +80,5 @@ export interface DropdownButtonProps {
|
|
|
62
80
|
* Item clicks close the menu (ActionsMenuDropdown's default; opt out per item
|
|
63
81
|
* with `closeOnSelect: false`).
|
|
64
82
|
*/
|
|
65
|
-
export declare function DropdownButton({ label, icon, items, groups, variant, size, loading, disabled, fullWidth, className, ariaLabel, align, side, onCloseAutoFocus, }: DropdownButtonProps): React.JSX.Element;
|
|
83
|
+
export declare function DropdownButton({ label, action, menuAriaLabel, icon, items, groups, variant, size, loading, disabled, fullWidth, className, ariaLabel, align, side, onCloseAutoFocus, }: DropdownButtonProps): React.JSX.Element;
|
|
66
84
|
//# sourceMappingURL=dropdown-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/dropdown-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAuB,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD,MAAM,WAAW,mBAAmB;IAClC,iDAAiD;IACjD,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,uDAAuD;IACvD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;IAC1B,+EAA+E;IAC/E,MAAM,CAAC,EAAE,g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sxs } from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { cn } from "../../utils/cn.js";
|
|
5
5
|
import { Chevron02DownIcon } from "../icons-v2-generated/index.js";
|
|
@@ -7,6 +7,8 @@ import { ActionsMenuDropdown } from "./actions-menu.js";
|
|
|
7
7
|
import { Button } from "./button/index.js";
|
|
8
8
|
function DropdownButton({
|
|
9
9
|
label,
|
|
10
|
+
action,
|
|
11
|
+
menuAriaLabel = "More options",
|
|
10
12
|
icon,
|
|
11
13
|
items,
|
|
12
14
|
groups,
|
|
@@ -31,6 +33,60 @@ function DropdownButton({
|
|
|
31
33
|
[disabled, loading]
|
|
32
34
|
);
|
|
33
35
|
const resolvedAriaLabel = ariaLabel || (typeof label === "string" ? label : void 0);
|
|
36
|
+
if (action) {
|
|
37
|
+
const skin = variant ?? "outline";
|
|
38
|
+
return /* @__PURE__ */ jsxs(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
role: "group",
|
|
42
|
+
"aria-label": resolvedAriaLabel,
|
|
43
|
+
className: cn("inline-flex items-stretch", fullWidth && "w-full", className),
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
Button,
|
|
47
|
+
{
|
|
48
|
+
variant: skin,
|
|
49
|
+
attach: "start",
|
|
50
|
+
href: action.href,
|
|
51
|
+
download: action.download,
|
|
52
|
+
openInNewTab: action.openInNewTab,
|
|
53
|
+
onClick: action.onClick,
|
|
54
|
+
disabled,
|
|
55
|
+
loading,
|
|
56
|
+
leftIcon: icon,
|
|
57
|
+
className: fullWidth ? "flex-1" : void 0,
|
|
58
|
+
children: label
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
/* @__PURE__ */ jsx(
|
|
62
|
+
ActionsMenuDropdown,
|
|
63
|
+
{
|
|
64
|
+
groups: groups ?? [{ items: items ?? [] }],
|
|
65
|
+
open,
|
|
66
|
+
onOpenChange: handleOpenChange,
|
|
67
|
+
align,
|
|
68
|
+
side,
|
|
69
|
+
onCloseAutoFocus,
|
|
70
|
+
triggerAriaLabel: menuAriaLabel,
|
|
71
|
+
customTrigger: /* @__PURE__ */ jsx(
|
|
72
|
+
Button,
|
|
73
|
+
{
|
|
74
|
+
type: "button",
|
|
75
|
+
variant: skin,
|
|
76
|
+
size: "icon",
|
|
77
|
+
attach: "end",
|
|
78
|
+
disabled: disabled || loading,
|
|
79
|
+
"aria-label": menuAriaLabel,
|
|
80
|
+
className: cn(open && "bg-ods-bg-hover"),
|
|
81
|
+
leftIcon: /* @__PURE__ */ jsx(Chevron02DownIcon, { className: cn("transition-transform duration-fast", open && "rotate-180") })
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
34
90
|
const trigger = variant ? /* @__PURE__ */ jsx(
|
|
35
91
|
Button,
|
|
36
92
|
{
|
|
@@ -19,7 +19,7 @@ var _chunkZ74QE57Tcjs = require('../../../chunk-Z74QE57T.cjs');
|
|
|
19
19
|
require('../../../chunk-XZJCBIYR.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunk2QMBXGMQcjs = require('../../../chunk-2QMBXGMQ.cjs');
|
|
23
23
|
require('../../../chunk-V45KLJQP.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
@@ -46,9 +46,9 @@ function FileManagerActionBar({
|
|
|
46
46
|
className
|
|
47
47
|
}) {
|
|
48
48
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunk3ATAYP36cjs.cn.call(void 0, "flex flex-wrap items-center gap-4 content-md:justify-end", className), children: [
|
|
49
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
49
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2QMBXGMQcjs.Button, { variant: "outline", size: "small-legacy", onClick: onNewFolder, leftIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.FolderPlus, { className: "h-4 w-4" }), children: "New Folder" }),
|
|
50
50
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
51
|
-
|
|
51
|
+
_chunk2QMBXGMQcjs.Button,
|
|
52
52
|
{
|
|
53
53
|
variant: "outline",
|
|
54
54
|
size: "small-legacy",
|
|
@@ -59,7 +59,7 @@ function FileManagerActionBar({
|
|
|
59
59
|
}
|
|
60
60
|
),
|
|
61
61
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
62
|
-
|
|
62
|
+
_chunk2QMBXGMQcjs.Button,
|
|
63
63
|
{
|
|
64
64
|
variant: "outline",
|
|
65
65
|
size: "small-legacy",
|
|
@@ -70,7 +70,7 @@ function FileManagerActionBar({
|
|
|
70
70
|
}
|
|
71
71
|
),
|
|
72
72
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
73
|
-
|
|
73
|
+
_chunk2QMBXGMQcjs.Button,
|
|
74
74
|
{
|
|
75
75
|
variant: "outline",
|
|
76
76
|
size: "small-legacy",
|
|
@@ -80,9 +80,9 @@ function FileManagerActionBar({
|
|
|
80
80
|
children: "Paste"
|
|
81
81
|
}
|
|
82
82
|
),
|
|
83
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
83
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2QMBXGMQcjs.Button, { variant: "outline", size: "small-legacy", onClick: onUpload, leftIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Upload, { className: "h-4 w-4" }), children: "Upload" }),
|
|
84
84
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
85
|
-
|
|
85
|
+
_chunk2QMBXGMQcjs.Button,
|
|
86
86
|
{
|
|
87
87
|
variant: "outline",
|
|
88
88
|
size: "small-legacy",
|
|
@@ -132,7 +132,7 @@ function FileManagerEmpty({
|
|
|
132
132
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-6 rounded-full bg-ods-bg-surface p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.FolderOpen, { className: "h-12 w-12 text-ods-text-tertiary" }) }),
|
|
133
133
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-2 text-ods-text-primary text-h4", children: message }),
|
|
134
134
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-6 max-w-md text-center text-ods-text-secondary text-h6", children: description }),
|
|
135
|
-
action && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
135
|
+
action && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2QMBXGMQcjs.Button, { variant: "accent", size: "small-legacy", onClick: action.onClick, children: action.label })
|
|
136
136
|
] });
|
|
137
137
|
}
|
|
138
138
|
|
|
@@ -213,7 +213,7 @@ function FileManagerContextMenu({
|
|
|
213
213
|
];
|
|
214
214
|
const visibleItems = menuItems.filter((item) => item.show);
|
|
215
215
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkL2RMTGOKcjs.DropdownMenu, { open, onOpenChange, children: [
|
|
216
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkL2RMTGOKcjs.DropdownMenuTrigger, { asChild: true, children: trigger || /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
216
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkL2RMTGOKcjs.DropdownMenuTrigger, { asChild: true, children: trigger || /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2QMBXGMQcjs.Button, { variant: "transparent", size: "small-legacy", className: "h-8 w-8 p-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.MoreHorizontal, { className: "h-4 w-4" }) }) }),
|
|
217
217
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkL2RMTGOKcjs.DropdownMenuContent, { align: "end", className: _chunk3ATAYP36cjs.cn.call(void 0, "w-56", className), onClick: (e) => e.stopPropagation(), children: visibleItems.map((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react2.default.Fragment, { children: [
|
|
218
218
|
item.separator && index > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkL2RMTGOKcjs.DropdownMenuSeparator, {}),
|
|
219
219
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -298,7 +298,7 @@ function FileManagerTableRow({
|
|
|
298
298
|
onAction: handleContextAction,
|
|
299
299
|
fileType: file.type,
|
|
300
300
|
trigger: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
301
|
-
|
|
301
|
+
_chunk2QMBXGMQcjs.Button,
|
|
302
302
|
{
|
|
303
303
|
variant: "transparent",
|
|
304
304
|
size: "small-legacy",
|
|
@@ -312,7 +312,7 @@ function FileManagerTableRow({
|
|
|
312
312
|
}
|
|
313
313
|
),
|
|
314
314
|
file.type === "folder" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
315
|
-
|
|
315
|
+
_chunk2QMBXGMQcjs.Button,
|
|
316
316
|
{
|
|
317
317
|
variant: "transparent",
|
|
318
318
|
size: "small-legacy",
|