@epicbagel/saas-kit 1.32.0 → 1.33.0
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/THIRD_PARTY_NOTICES.md +6 -5
- package/dist/chunk-2DCJ2SFU.js +20 -0
- package/dist/chunk-2FVFPGP5.js +489 -0
- package/dist/{chunk-HTPPNW74.js → chunk-AWCXVYPL.js} +1 -1
- package/dist/chunk-B54ZEKBG.cjs +63 -0
- package/dist/chunk-CXAFTEEP.cjs +20 -0
- package/dist/{chunk-MOJHETNO.cjs → chunk-F3D5HA2F.cjs} +10 -10
- package/dist/chunk-G3SF4RRA.cjs +489 -0
- package/dist/chunk-HTTRUJQU.cjs +60 -0
- package/dist/{chunk-JS6BLIWL.js → chunk-IZF4WCK6.js} +11 -11
- package/dist/{chunk-PH2TV7XI.cjs → chunk-KOR2QR7I.cjs} +5 -5
- package/dist/{chunk-BGCNGYPL.cjs → chunk-PTMZTP3V.cjs} +2 -2
- package/dist/{chunk-6O3DUMF7.js → chunk-REGA2L5S.js} +1 -1
- package/dist/{chunk-PNI354BY.cjs → chunk-SL6ECEN6.cjs} +2 -2
- package/dist/{chunk-ZGTPNSR7.js → chunk-TS4MC3B3.js} +4 -4
- package/dist/chunk-TUQVHPSI.js +60 -0
- package/dist/chunk-VWOWPNKT.js +73 -0
- package/dist/chunk-XH2I3YJ6.js +63 -0
- package/dist/chunk-Y6X6XDHE.cjs +73 -0
- package/dist/primitives/accent-theme.cjs +66 -0
- package/dist/primitives/accent-theme.d.cts +32 -0
- package/dist/primitives/accent-theme.d.ts +32 -0
- package/dist/primitives/accent-theme.js +66 -0
- package/dist/primitives/activity-feed.cjs +2 -2
- package/dist/primitives/activity-feed.js +2 -2
- package/dist/primitives/agent-audio-visualizer-bar.cjs +3 -3
- package/dist/primitives/agent-audio-visualizer-bar.js +2 -2
- package/dist/primitives/alert.d.cts +1 -1
- package/dist/primitives/alert.d.ts +1 -1
- package/dist/primitives/app-layout.cjs +114 -0
- package/dist/primitives/app-layout.d.cts +47 -0
- package/dist/primitives/app-layout.d.ts +47 -0
- package/dist/primitives/app-layout.js +114 -0
- package/dist/primitives/app-sidebar.cjs +52 -0
- package/dist/primitives/app-sidebar.d.cts +105 -0
- package/dist/primitives/app-sidebar.d.ts +105 -0
- package/dist/primitives/app-sidebar.js +52 -0
- package/dist/primitives/archive-confirmation-dialog.cjs +2 -2
- package/dist/primitives/archive-confirmation-dialog.js +3 -3
- package/dist/primitives/back-bar.cjs +37 -0
- package/dist/primitives/back-bar.d.cts +31 -0
- package/dist/primitives/back-bar.d.ts +31 -0
- package/dist/primitives/back-bar.js +37 -0
- package/dist/primitives/badge.d.cts +1 -1
- package/dist/primitives/badge.d.ts +1 -1
- package/dist/primitives/batch-action-bar.cjs +134 -0
- package/dist/primitives/batch-action-bar.d.cts +27 -0
- package/dist/primitives/batch-action-bar.d.ts +27 -0
- package/dist/primitives/batch-action-bar.js +134 -0
- package/dist/primitives/board-view-internals.cjs +3 -3
- package/dist/primitives/board-view-internals.js +2 -2
- package/dist/primitives/board-view.cjs +8 -8
- package/dist/primitives/board-view.js +7 -7
- package/dist/primitives/brand-mark.cjs +26 -0
- package/dist/primitives/brand-mark.d.cts +10 -0
- package/dist/primitives/brand-mark.d.ts +10 -0
- package/dist/primitives/brand-mark.js +26 -0
- package/dist/primitives/bubble.d.cts +1 -1
- package/dist/primitives/bubble.d.ts +1 -1
- package/dist/primitives/button.d.cts +2 -2
- package/dist/primitives/button.d.ts +2 -2
- package/dist/primitives/chat.cjs +27 -27
- package/dist/primitives/chat.js +21 -21
- package/dist/primitives/code-block.cjs +4 -4
- package/dist/primitives/code-block.js +3 -3
- package/dist/primitives/command.cjs +129 -0
- package/dist/primitives/command.d.cts +60 -0
- package/dist/primitives/command.d.ts +60 -0
- package/dist/primitives/command.js +129 -0
- package/dist/primitives/compact-list.cjs +24 -0
- package/dist/primitives/compact-list.d.cts +18 -0
- package/dist/primitives/compact-list.d.ts +18 -0
- package/dist/primitives/compact-list.js +24 -0
- package/dist/primitives/connection.cjs +6 -6
- package/dist/primitives/connection.js +8 -8
- package/dist/primitives/context-bar.cjs +57 -0
- package/dist/primitives/context-bar.d.cts +50 -0
- package/dist/primitives/context-bar.d.ts +50 -0
- package/dist/primitives/context-bar.js +57 -0
- package/dist/primitives/copy-button.cjs +3 -3
- package/dist/primitives/copy-button.js +2 -2
- package/dist/primitives/cycling-prompt.cjs +102 -0
- package/dist/primitives/cycling-prompt.d.cts +24 -0
- package/dist/primitives/cycling-prompt.d.ts +24 -0
- package/dist/primitives/cycling-prompt.js +102 -0
- package/dist/primitives/dialog.d.cts +9 -9
- package/dist/primitives/dialog.d.ts +9 -9
- package/dist/primitives/dotted-list.cjs +41 -0
- package/dist/primitives/dotted-list.d.cts +28 -0
- package/dist/primitives/dotted-list.d.ts +28 -0
- package/dist/primitives/dotted-list.js +41 -0
- package/dist/primitives/drawer.d.cts +6 -6
- package/dist/primitives/drawer.d.ts +6 -6
- package/dist/primitives/field.cjs +3 -3
- package/dist/primitives/field.js +2 -2
- package/dist/primitives/file-dropzone.cjs +3 -3
- package/dist/primitives/file-dropzone.js +2 -2
- package/dist/primitives/file-preview.cjs +4 -4
- package/dist/primitives/file-preview.js +3 -3
- package/dist/primitives/filter-bar.cjs +4 -4
- package/dist/primitives/filter-bar.js +3 -3
- package/dist/primitives/fixed-action-bar.cjs +46 -0
- package/dist/primitives/fixed-action-bar.d.cts +15 -0
- package/dist/primitives/fixed-action-bar.d.ts +15 -0
- package/dist/primitives/fixed-action-bar.js +46 -0
- package/dist/primitives/floating-action-button.cjs +65 -0
- package/dist/primitives/floating-action-button.d.cts +52 -0
- package/dist/primitives/floating-action-button.d.ts +52 -0
- package/dist/primitives/floating-action-button.js +65 -0
- package/dist/primitives/form-section.cjs +38 -0
- package/dist/primitives/form-section.d.cts +43 -0
- package/dist/primitives/form-section.d.ts +43 -0
- package/dist/primitives/form-section.js +38 -0
- package/dist/primitives/key-value-grid.cjs +52 -0
- package/dist/primitives/key-value-grid.d.cts +20 -0
- package/dist/primitives/key-value-grid.d.ts +20 -0
- package/dist/primitives/key-value-grid.js +52 -0
- package/dist/primitives/marketing-footer.cjs +34 -0
- package/dist/primitives/marketing-footer.d.cts +29 -0
- package/dist/primitives/marketing-footer.d.ts +29 -0
- package/dist/primitives/marketing-footer.js +34 -0
- package/dist/primitives/marketing-header.cjs +41 -0
- package/dist/primitives/marketing-header.d.cts +31 -0
- package/dist/primitives/marketing-header.d.ts +31 -0
- package/dist/primitives/marketing-header.js +41 -0
- package/dist/primitives/marketing-section.cjs +8 -0
- package/dist/primitives/marketing-section.d.cts +35 -0
- package/dist/primitives/marketing-section.d.ts +35 -0
- package/dist/primitives/marketing-section.js +8 -0
- package/dist/primitives/marketing-shell.cjs +28 -0
- package/dist/primitives/marketing-shell.d.cts +14 -0
- package/dist/primitives/marketing-shell.d.ts +14 -0
- package/dist/primitives/marketing-shell.js +28 -0
- package/dist/primitives/notes.cjs +4 -4
- package/dist/primitives/notes.js +4 -4
- package/dist/primitives/page-header.cjs +3 -67
- package/dist/primitives/page-header.js +3 -67
- package/dist/primitives/page-tabs.cjs +4 -57
- package/dist/primitives/page-tabs.js +4 -57
- package/dist/primitives/pager.cjs +85 -0
- package/dist/primitives/pager.d.cts +39 -0
- package/dist/primitives/pager.d.ts +39 -0
- package/dist/primitives/pager.js +85 -0
- package/dist/primitives/pagination.cjs +119 -0
- package/dist/primitives/pagination.d.cts +41 -0
- package/dist/primitives/pagination.d.ts +41 -0
- package/dist/primitives/pagination.js +119 -0
- package/dist/primitives/poster.cjs +11 -1
- package/dist/primitives/poster.d.cts +12 -1
- package/dist/primitives/poster.d.ts +12 -1
- package/dist/primitives/poster.js +10 -0
- package/dist/primitives/resource-list.cjs +8 -8
- package/dist/primitives/resource-list.js +7 -7
- package/dist/primitives/responsive-embed.cjs +29 -0
- package/dist/primitives/responsive-embed.d.cts +14 -0
- package/dist/primitives/responsive-embed.d.ts +14 -0
- package/dist/primitives/responsive-embed.js +29 -0
- package/dist/primitives/save-bar.cjs +91 -0
- package/dist/primitives/save-bar.d.cts +55 -0
- package/dist/primitives/save-bar.d.ts +55 -0
- package/dist/primitives/save-bar.js +91 -0
- package/dist/primitives/settings-list.cjs +10 -0
- package/dist/primitives/settings-list.d.cts +31 -0
- package/dist/primitives/settings-list.d.ts +31 -0
- package/dist/primitives/settings-list.js +10 -0
- package/dist/primitives/settings-section.cjs +34 -0
- package/dist/primitives/settings-section.d.cts +44 -0
- package/dist/primitives/settings-section.d.ts +44 -0
- package/dist/primitives/settings-section.js +34 -0
- package/dist/primitives/sheet.d.cts +9 -9
- package/dist/primitives/sheet.d.ts +9 -9
- package/dist/primitives/short-video.cjs +110 -0
- package/dist/primitives/short-video.d.cts +30 -0
- package/dist/primitives/short-video.d.ts +30 -0
- package/dist/primitives/short-video.js +110 -0
- package/dist/primitives/stats-card.cjs +46 -0
- package/dist/primitives/stats-card.d.cts +19 -0
- package/dist/primitives/stats-card.d.ts +19 -0
- package/dist/primitives/stats-card.js +46 -0
- package/dist/primitives/stats-strip.cjs +38 -0
- package/dist/primitives/stats-strip.d.cts +24 -0
- package/dist/primitives/stats-strip.d.ts +24 -0
- package/dist/primitives/stats-strip.js +38 -0
- package/dist/primitives/step-list.cjs +32 -0
- package/dist/primitives/step-list.d.cts +19 -0
- package/dist/primitives/step-list.d.ts +19 -0
- package/dist/primitives/step-list.js +32 -0
- package/dist/primitives/steps.cjs +77 -0
- package/dist/primitives/steps.d.cts +35 -0
- package/dist/primitives/steps.d.ts +35 -0
- package/dist/primitives/steps.js +77 -0
- package/dist/primitives/tabbed-page-header.cjs +53 -0
- package/dist/primitives/tabbed-page-header.d.cts +26 -0
- package/dist/primitives/tabbed-page-header.d.ts +26 -0
- package/dist/primitives/tabbed-page-header.js +53 -0
- package/dist/primitives/theme-selector.cjs +17 -17
- package/dist/primitives/theme-selector.js +5 -5
- package/dist/primitives/voice-dictation-button.cjs +5 -5
- package/dist/primitives/voice-dictation-button.js +4 -4
- package/dist/primitives/voice-session-controls.cjs +4 -4
- package/dist/primitives/voice-session-controls.js +3 -3
- package/dist/primitives/workflow-assistant.cjs +5 -5
- package/dist/primitives/workflow-assistant.js +3 -3
- package/package.json +312 -1
- package/src/styles/components/poster.css +42 -1
- package/dist/{chunk-5OF6D3GH.js → chunk-4TJBXXUE.js} +3 -3
- package/dist/{chunk-DILYV4FI.js → chunk-7ZRFXJVN.js} +3 -3
- package/dist/{chunk-YYFVG5A6.cjs → chunk-D46FNEZ5.cjs} +2 -2
- package/dist/{chunk-NKWHDI4C.cjs → chunk-FB3VY2PL.cjs} +2 -2
- package/dist/{chunk-MW67PHAQ.cjs → chunk-GUVQAWUW.cjs} +9 -9
- package/dist/{chunk-WHDHUYS6.js → chunk-HBRVOGLA.js} +3 -3
- package/dist/{chunk-FARCLWLU.cjs → chunk-HHF5DEKM.cjs} +3 -3
- package/dist/{chunk-TWCJMFST.js → chunk-O42YC6ZQ.js} +3 -3
- package/dist/{chunk-ZJFYOXSM.cjs → chunk-SRVRNHCX.cjs} +2 -2
- package/dist/{chunk-UFFHGKI7.js → chunk-SW4T3O7M.js} +9 -9
- package/dist/{chunk-62UTAG2C.js → chunk-ULZB4A2I.js} +3 -3
- package/dist/{chunk-ZLEM2SAU.cjs → chunk-Z3JJSNR5.cjs} +2 -2
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
buttonVariants
|
|
4
|
+
} from "../chunk-W326GKML.js";
|
|
5
|
+
import {
|
|
6
|
+
cn
|
|
7
|
+
} from "../chunk-G6SRSWXB.js";
|
|
8
|
+
|
|
9
|
+
// src/primitives/pagination.tsx
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import {
|
|
12
|
+
LiaChevronLeftSolid,
|
|
13
|
+
LiaChevronRightSolid,
|
|
14
|
+
LiaEllipsisHSolid
|
|
15
|
+
} from "react-icons/lia";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
var Pagination = ({ className, marginTop = "none", ...props }) => /* @__PURE__ */ jsx(
|
|
18
|
+
"nav",
|
|
19
|
+
{
|
|
20
|
+
role: "navigation",
|
|
21
|
+
"aria-label": "pagination",
|
|
22
|
+
className: cn("mx-auto flex w-full justify-center", marginTop === "md" && "mt-4", className),
|
|
23
|
+
...props
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
Pagination.displayName = "Pagination";
|
|
27
|
+
var PaginationContent = React.forwardRef(({ className, width = "auto", justify = "start", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
28
|
+
"ul",
|
|
29
|
+
{
|
|
30
|
+
ref,
|
|
31
|
+
className: cn("flex flex-row items-center gap-1", width === "full" && "w-full", justify === "between" && "justify-between", className),
|
|
32
|
+
...props
|
|
33
|
+
}
|
|
34
|
+
));
|
|
35
|
+
PaginationContent.displayName = "PaginationContent";
|
|
36
|
+
var PaginationItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props }));
|
|
37
|
+
PaginationItem.displayName = "PaginationItem";
|
|
38
|
+
var PaginationLink = ({
|
|
39
|
+
className,
|
|
40
|
+
isActive,
|
|
41
|
+
disabled = false,
|
|
42
|
+
size = "icon",
|
|
43
|
+
...props
|
|
44
|
+
}) => /* @__PURE__ */ jsx(
|
|
45
|
+
"a",
|
|
46
|
+
{
|
|
47
|
+
"aria-current": isActive ? "page" : void 0,
|
|
48
|
+
"aria-disabled": disabled || void 0,
|
|
49
|
+
className: cn(
|
|
50
|
+
buttonVariants({
|
|
51
|
+
variant: isActive ? "outline" : "ghost",
|
|
52
|
+
size
|
|
53
|
+
}),
|
|
54
|
+
disabled && "pointer-events-none opacity-50",
|
|
55
|
+
className
|
|
56
|
+
),
|
|
57
|
+
...props
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
PaginationLink.displayName = "PaginationLink";
|
|
61
|
+
var PaginationPrevious = ({
|
|
62
|
+
className,
|
|
63
|
+
...props
|
|
64
|
+
}) => /* @__PURE__ */ jsxs(
|
|
65
|
+
PaginationLink,
|
|
66
|
+
{
|
|
67
|
+
"aria-label": "Go to previous page",
|
|
68
|
+
size: "default",
|
|
69
|
+
className: cn("gap-1 pl-2.5", className),
|
|
70
|
+
...props,
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ jsx(LiaChevronLeftSolid, { className: "h-4 w-4" }),
|
|
73
|
+
/* @__PURE__ */ jsx("span", { children: "Previous" })
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
78
|
+
var PaginationNext = ({
|
|
79
|
+
className,
|
|
80
|
+
...props
|
|
81
|
+
}) => /* @__PURE__ */ jsxs(
|
|
82
|
+
PaginationLink,
|
|
83
|
+
{
|
|
84
|
+
"aria-label": "Go to next page",
|
|
85
|
+
size: "default",
|
|
86
|
+
className: cn("gap-1 pr-2.5", className),
|
|
87
|
+
...props,
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ jsx("span", { children: "Next" }),
|
|
90
|
+
/* @__PURE__ */ jsx(LiaChevronRightSolid, { className: "h-4 w-4" })
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
PaginationNext.displayName = "PaginationNext";
|
|
95
|
+
var PaginationEllipsis = ({
|
|
96
|
+
className,
|
|
97
|
+
...props
|
|
98
|
+
}) => /* @__PURE__ */ jsxs(
|
|
99
|
+
"span",
|
|
100
|
+
{
|
|
101
|
+
"aria-hidden": true,
|
|
102
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
103
|
+
...props,
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ jsx(LiaEllipsisHSolid, { className: "h-4 w-4" }),
|
|
106
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
111
|
+
export {
|
|
112
|
+
Pagination,
|
|
113
|
+
PaginationContent,
|
|
114
|
+
PaginationEllipsis,
|
|
115
|
+
PaginationItem,
|
|
116
|
+
PaginationLink,
|
|
117
|
+
PaginationNext,
|
|
118
|
+
PaginationPrevious
|
|
119
|
+
};
|
|
@@ -25,6 +25,15 @@ var PosterShell = _react.forwardRef.call(void 0, function PosterShell2({ colours
|
|
|
25
25
|
var PosterMain = _react.forwardRef.call(void 0, function PosterMain2(props, ref) {
|
|
26
26
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "main", { ref, "data-slot": "poster-main", ...props });
|
|
27
27
|
});
|
|
28
|
+
var PosterBanner = _react.forwardRef.call(void 0, function PosterBanner2({ action, children, ...props }, ref) {
|
|
29
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "a", { ref, "data-slot": "poster-banner", ...props, children: [
|
|
30
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children }),
|
|
31
|
+
action ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
32
|
+
" ",
|
|
33
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "data-slot": "poster-banner-action", children: action })
|
|
34
|
+
] }) : null
|
|
35
|
+
] });
|
|
36
|
+
});
|
|
28
37
|
var PosterHeader = _react.forwardRef.call(void 0, function PosterHeader2({ brand, nav, action, className, ...props }, ref) {
|
|
29
38
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "header", { ref, "data-slot": "poster-header", className, ...props, children: [
|
|
30
39
|
brand,
|
|
@@ -393,4 +402,5 @@ var PosterMockNote = _react.forwardRef.call(void 0, function PosterMockNote2(pro
|
|
|
393
402
|
|
|
394
403
|
|
|
395
404
|
|
|
396
|
-
|
|
405
|
+
|
|
406
|
+
exports.PosterAction = PosterAction; exports.PosterBand = PosterBand; exports.PosterBanner = PosterBanner; exports.PosterBreak = PosterBreak; exports.PosterCalculator = PosterCalculator; exports.PosterCallList = PosterCallList; exports.PosterClaims = PosterClaims; exports.PosterColumns = PosterColumns; exports.PosterCopyText = PosterCopyText; exports.PosterCost = PosterCost; exports.PosterDisclosure = PosterDisclosure; exports.PosterFacts = PosterFacts; exports.PosterFigures = PosterFigures; exports.PosterFlow = PosterFlow; exports.PosterFootnote = PosterFootnote; exports.PosterGrade = PosterGrade; exports.PosterHeader = PosterHeader; exports.PosterHeaderAction = PosterHeaderAction; exports.PosterHero = PosterHero; exports.PosterMain = PosterMain; exports.PosterMark = PosterMark; exports.PosterMockNote = PosterMockNote; exports.PosterMoreLink = PosterMoreLink; exports.PosterNav = PosterNav; exports.PosterNavLink = PosterNavLink; exports.PosterNextLink = PosterNextLink; exports.PosterNote = PosterNote; exports.PosterPeople = PosterPeople; exports.PosterQuote = PosterQuote; exports.PosterRange = PosterRange; exports.PosterRanges = PosterRanges; exports.PosterScreen = PosterScreen; exports.PosterScreenDetail = PosterScreenDetail; exports.PosterScreenLead = PosterScreenLead; exports.PosterScreenMessage = PosterScreenMessage; exports.PosterScreenPane = PosterScreenPane; exports.PosterScreenPerson = PosterScreenPerson; exports.PosterScreenQueue = PosterScreenQueue; exports.PosterScreenRows = PosterScreenRows; exports.PosterScreenSplit = PosterScreenSplit; exports.PosterScreenTabs = PosterScreenTabs; exports.PosterScreenTrace = PosterScreenTrace; exports.PosterShell = PosterShell; exports.PosterSmallPrint = PosterSmallPrint; exports.PosterStatement = PosterStatement; exports.PosterStats = PosterStats; exports.PosterSteps = PosterSteps; exports.PosterSubhead = PosterSubhead; exports.PosterSwitch = PosterSwitch; exports.PosterTextLink = PosterTextLink; exports.PosterTicks = PosterTicks;
|
|
@@ -39,6 +39,17 @@ interface PosterShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
39
39
|
declare const PosterShell: React.ForwardRefExoticComponent<PosterShellProps & React.RefAttributes<HTMLDivElement>>;
|
|
40
40
|
/** The page's main landmark, under the header. */
|
|
41
41
|
declare const PosterMain: React.ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
42
|
+
interface PosterBannerProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
43
|
+
/** A short label after the words, underlined ("Read why"). */
|
|
44
|
+
action?: ReactNode;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* An announcement strip in the primary colour: one line of words and a short
|
|
48
|
+
* action, the whole strip a single link. A page puts it inside `PosterShell`,
|
|
49
|
+
* above `PosterHeader`. The space before the action keeps the two apart
|
|
50
|
+
* wherever the strip is read as plain text.
|
|
51
|
+
*/
|
|
52
|
+
declare const PosterBanner: React.ForwardRefExoticComponent<PosterBannerProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
42
53
|
interface PosterHeaderProps extends Omit<HTMLAttributes<HTMLElement>, "children"> {
|
|
43
54
|
/** The wordmark: a `PosterMark`. */
|
|
44
55
|
brand: ReactNode;
|
|
@@ -392,4 +403,4 @@ declare function PosterScreenRows({ items }: PosterScreenRowsProps): react_jsx_r
|
|
|
392
403
|
/** A quiet line under a mock-up. */
|
|
393
404
|
declare const PosterMockNote: React.ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
394
405
|
|
|
395
|
-
export { PosterAction, type PosterActionProps, PosterBand, type PosterBandProps, PosterBreak, PosterCalculator, PosterCallList, type PosterCallListProps, PosterClaims, type PosterClaimsProps, type PosterColours, PosterColumns, type PosterColumnsProps, PosterCopyText, type PosterCopyTextProps, PosterCost, type PosterCostProps, PosterDisclosure, type PosterDisclosureProps, PosterFacts, type PosterFactsProps, PosterFigures, type PosterFiguresProps, PosterFlow, PosterFootnote, type PosterFootnoteProps, PosterGrade, PosterHeader, PosterHeaderAction, type PosterHeaderProps, PosterHero, type PosterHeroProps, PosterMain, PosterMark, PosterMockNote, PosterMoreLink, PosterNav, PosterNavLink, type PosterNavLinkProps, type PosterNavProps, PosterNextLink, type PosterNextLinkProps, PosterNote, type PosterNumberedProps, PosterPeople, type PosterPeopleProps, PosterQuote, type PosterQuoteProps, PosterRange, type PosterRangeProps, PosterRanges, PosterScreen, PosterScreenDetail, type PosterScreenDetailProps, PosterScreenLead, PosterScreenMessage, PosterScreenPane, PosterScreenPerson, type PosterScreenPersonProps, type PosterScreenProps, PosterScreenQueue, type PosterScreenQueueProps, PosterScreenRows, type PosterScreenRowsProps, PosterScreenSplit, PosterScreenTabs, PosterScreenTrace, PosterShell, type PosterShellProps, PosterSmallPrint, PosterStatement, PosterStats, type PosterStatsProps, PosterSteps, type PosterStepsProps, PosterSubhead, PosterSwitch, type PosterSwitchOption, type PosterSwitchProps, PosterTextLink, PosterTicks, type PosterTicksProps };
|
|
406
|
+
export { PosterAction, type PosterActionProps, PosterBand, type PosterBandProps, PosterBanner, type PosterBannerProps, PosterBreak, PosterCalculator, PosterCallList, type PosterCallListProps, PosterClaims, type PosterClaimsProps, type PosterColours, PosterColumns, type PosterColumnsProps, PosterCopyText, type PosterCopyTextProps, PosterCost, type PosterCostProps, PosterDisclosure, type PosterDisclosureProps, PosterFacts, type PosterFactsProps, PosterFigures, type PosterFiguresProps, PosterFlow, PosterFootnote, type PosterFootnoteProps, PosterGrade, PosterHeader, PosterHeaderAction, type PosterHeaderProps, PosterHero, type PosterHeroProps, PosterMain, PosterMark, PosterMockNote, PosterMoreLink, PosterNav, PosterNavLink, type PosterNavLinkProps, type PosterNavProps, PosterNextLink, type PosterNextLinkProps, PosterNote, type PosterNumberedProps, PosterPeople, type PosterPeopleProps, PosterQuote, type PosterQuoteProps, PosterRange, type PosterRangeProps, PosterRanges, PosterScreen, PosterScreenDetail, type PosterScreenDetailProps, PosterScreenLead, PosterScreenMessage, PosterScreenPane, PosterScreenPerson, type PosterScreenPersonProps, type PosterScreenProps, PosterScreenQueue, type PosterScreenQueueProps, PosterScreenRows, type PosterScreenRowsProps, PosterScreenSplit, PosterScreenTabs, PosterScreenTrace, PosterShell, type PosterShellProps, PosterSmallPrint, PosterStatement, PosterStats, type PosterStatsProps, PosterSteps, type PosterStepsProps, PosterSubhead, PosterSwitch, type PosterSwitchOption, type PosterSwitchProps, PosterTextLink, PosterTicks, type PosterTicksProps };
|
|
@@ -39,6 +39,17 @@ interface PosterShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
39
39
|
declare const PosterShell: React.ForwardRefExoticComponent<PosterShellProps & React.RefAttributes<HTMLDivElement>>;
|
|
40
40
|
/** The page's main landmark, under the header. */
|
|
41
41
|
declare const PosterMain: React.ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
42
|
+
interface PosterBannerProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
43
|
+
/** A short label after the words, underlined ("Read why"). */
|
|
44
|
+
action?: ReactNode;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* An announcement strip in the primary colour: one line of words and a short
|
|
48
|
+
* action, the whole strip a single link. A page puts it inside `PosterShell`,
|
|
49
|
+
* above `PosterHeader`. The space before the action keeps the two apart
|
|
50
|
+
* wherever the strip is read as plain text.
|
|
51
|
+
*/
|
|
52
|
+
declare const PosterBanner: React.ForwardRefExoticComponent<PosterBannerProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
42
53
|
interface PosterHeaderProps extends Omit<HTMLAttributes<HTMLElement>, "children"> {
|
|
43
54
|
/** The wordmark: a `PosterMark`. */
|
|
44
55
|
brand: ReactNode;
|
|
@@ -392,4 +403,4 @@ declare function PosterScreenRows({ items }: PosterScreenRowsProps): react_jsx_r
|
|
|
392
403
|
/** A quiet line under a mock-up. */
|
|
393
404
|
declare const PosterMockNote: React.ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
394
405
|
|
|
395
|
-
export { PosterAction, type PosterActionProps, PosterBand, type PosterBandProps, PosterBreak, PosterCalculator, PosterCallList, type PosterCallListProps, PosterClaims, type PosterClaimsProps, type PosterColours, PosterColumns, type PosterColumnsProps, PosterCopyText, type PosterCopyTextProps, PosterCost, type PosterCostProps, PosterDisclosure, type PosterDisclosureProps, PosterFacts, type PosterFactsProps, PosterFigures, type PosterFiguresProps, PosterFlow, PosterFootnote, type PosterFootnoteProps, PosterGrade, PosterHeader, PosterHeaderAction, type PosterHeaderProps, PosterHero, type PosterHeroProps, PosterMain, PosterMark, PosterMockNote, PosterMoreLink, PosterNav, PosterNavLink, type PosterNavLinkProps, type PosterNavProps, PosterNextLink, type PosterNextLinkProps, PosterNote, type PosterNumberedProps, PosterPeople, type PosterPeopleProps, PosterQuote, type PosterQuoteProps, PosterRange, type PosterRangeProps, PosterRanges, PosterScreen, PosterScreenDetail, type PosterScreenDetailProps, PosterScreenLead, PosterScreenMessage, PosterScreenPane, PosterScreenPerson, type PosterScreenPersonProps, type PosterScreenProps, PosterScreenQueue, type PosterScreenQueueProps, PosterScreenRows, type PosterScreenRowsProps, PosterScreenSplit, PosterScreenTabs, PosterScreenTrace, PosterShell, type PosterShellProps, PosterSmallPrint, PosterStatement, PosterStats, type PosterStatsProps, PosterSteps, type PosterStepsProps, PosterSubhead, PosterSwitch, type PosterSwitchOption, type PosterSwitchProps, PosterTextLink, PosterTicks, type PosterTicksProps };
|
|
406
|
+
export { PosterAction, type PosterActionProps, PosterBand, type PosterBandProps, PosterBanner, type PosterBannerProps, PosterBreak, PosterCalculator, PosterCallList, type PosterCallListProps, PosterClaims, type PosterClaimsProps, type PosterColours, PosterColumns, type PosterColumnsProps, PosterCopyText, type PosterCopyTextProps, PosterCost, type PosterCostProps, PosterDisclosure, type PosterDisclosureProps, PosterFacts, type PosterFactsProps, PosterFigures, type PosterFiguresProps, PosterFlow, PosterFootnote, type PosterFootnoteProps, PosterGrade, PosterHeader, PosterHeaderAction, type PosterHeaderProps, PosterHero, type PosterHeroProps, PosterMain, PosterMark, PosterMockNote, PosterMoreLink, PosterNav, PosterNavLink, type PosterNavLinkProps, type PosterNavProps, PosterNextLink, type PosterNextLinkProps, PosterNote, type PosterNumberedProps, PosterPeople, type PosterPeopleProps, PosterQuote, type PosterQuoteProps, PosterRange, type PosterRangeProps, PosterRanges, PosterScreen, PosterScreenDetail, type PosterScreenDetailProps, PosterScreenLead, PosterScreenMessage, PosterScreenPane, PosterScreenPerson, type PosterScreenPersonProps, type PosterScreenProps, PosterScreenQueue, type PosterScreenQueueProps, PosterScreenRows, type PosterScreenRowsProps, PosterScreenSplit, PosterScreenTabs, PosterScreenTrace, PosterShell, type PosterShellProps, PosterSmallPrint, PosterStatement, PosterStats, type PosterStatsProps, PosterSteps, type PosterStepsProps, PosterSubhead, PosterSwitch, type PosterSwitchOption, type PosterSwitchProps, PosterTextLink, PosterTicks, type PosterTicksProps };
|
|
@@ -25,6 +25,15 @@ var PosterShell = forwardRef(function PosterShell2({ colours, font, colorScheme,
|
|
|
25
25
|
var PosterMain = forwardRef(function PosterMain2(props, ref) {
|
|
26
26
|
return /* @__PURE__ */ jsx("main", { ref, "data-slot": "poster-main", ...props });
|
|
27
27
|
});
|
|
28
|
+
var PosterBanner = forwardRef(function PosterBanner2({ action, children, ...props }, ref) {
|
|
29
|
+
return /* @__PURE__ */ jsxs("a", { ref, "data-slot": "poster-banner", ...props, children: [
|
|
30
|
+
/* @__PURE__ */ jsx("span", { children }),
|
|
31
|
+
action ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32
|
+
" ",
|
|
33
|
+
/* @__PURE__ */ jsx("span", { "data-slot": "poster-banner-action", children: action })
|
|
34
|
+
] }) : null
|
|
35
|
+
] });
|
|
36
|
+
});
|
|
28
37
|
var PosterHeader = forwardRef(function PosterHeader2({ brand, nav, action, className, ...props }, ref) {
|
|
29
38
|
return /* @__PURE__ */ jsxs("header", { ref, "data-slot": "poster-header", className, ...props, children: [
|
|
30
39
|
brand,
|
|
@@ -345,6 +354,7 @@ var PosterMockNote = forwardRef(function PosterMockNote2(props, ref) {
|
|
|
345
354
|
export {
|
|
346
355
|
PosterAction,
|
|
347
356
|
PosterBand,
|
|
357
|
+
PosterBanner,
|
|
348
358
|
PosterBreak,
|
|
349
359
|
PosterCalculator,
|
|
350
360
|
PosterCallList,
|
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkF3D5HA2Fcjs = require('../chunk-F3D5HA2F.cjs');
|
|
6
6
|
require('../chunk-EUFV25KL.cjs');
|
|
7
7
|
require('../chunk-7YCKII7G.cjs');
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-PPX2VPGI.cjs');
|
|
8
|
+
require('../chunk-GUVQAWUW.cjs');
|
|
10
9
|
require('../chunk-WNXVGUBF.cjs');
|
|
11
10
|
require('../chunk-IQZLUT2Y.cjs');
|
|
12
11
|
require('../chunk-LELBCBDT.cjs');
|
|
13
|
-
require('../chunk-U2NES7VR.cjs');
|
|
14
12
|
require('../chunk-JH4GAGOQ.cjs');
|
|
15
|
-
require('../chunk-
|
|
13
|
+
require('../chunk-D46FNEZ5.cjs');
|
|
16
14
|
require('../chunk-XLIAY56V.cjs');
|
|
17
15
|
require('../chunk-V5SPFLKW.cjs');
|
|
18
16
|
require('../chunk-VOTCYG3F.cjs');
|
|
17
|
+
require('../chunk-PPX2VPGI.cjs');
|
|
18
|
+
require('../chunk-R35FT53G.cjs');
|
|
19
|
+
require('../chunk-U2NES7VR.cjs');
|
|
19
20
|
require('../chunk-PQUSJEXL.cjs');
|
|
21
|
+
require('../chunk-VBPPFC7X.cjs');
|
|
20
22
|
require('../chunk-VGTINL5Q.cjs');
|
|
21
23
|
require('../chunk-I6GUOEBO.cjs');
|
|
22
|
-
require('../chunk-VBPPFC7X.cjs');
|
|
23
24
|
require('../chunk-JDEXZGIY.cjs');
|
|
24
25
|
require('../chunk-KWLSBTB2.cjs');
|
|
25
|
-
require('../chunk-R35FT53G.cjs');
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
exports.ResourceList =
|
|
28
|
+
exports.ResourceList = _chunkF3D5HA2Fcjs.ResourceList;
|
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import {
|
|
4
4
|
ResourceList
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-IZF4WCK6.js";
|
|
6
6
|
import "../chunk-43UMPZWD.js";
|
|
7
7
|
import "../chunk-EEHIMPD7.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-G76JANB4.js";
|
|
8
|
+
import "../chunk-SW4T3O7M.js";
|
|
10
9
|
import "../chunk-YG7FBJRM.js";
|
|
11
10
|
import "../chunk-E2TQMDO7.js";
|
|
12
11
|
import "../chunk-H2O6NMLZ.js";
|
|
13
|
-
import "../chunk-ZRLUUZHK.js";
|
|
14
12
|
import "../chunk-OICAYRVH.js";
|
|
15
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-ULZB4A2I.js";
|
|
16
14
|
import "../chunk-LELFPLTE.js";
|
|
17
15
|
import "../chunk-J6NXDZR5.js";
|
|
18
16
|
import "../chunk-H2CCBRVG.js";
|
|
17
|
+
import "../chunk-G76JANB4.js";
|
|
18
|
+
import "../chunk-PIU5SSUV.js";
|
|
19
|
+
import "../chunk-ZRLUUZHK.js";
|
|
19
20
|
import "../chunk-QMA3WVB7.js";
|
|
21
|
+
import "../chunk-YEW65ASC.js";
|
|
20
22
|
import "../chunk-H7TETFLB.js";
|
|
21
23
|
import "../chunk-D4ZL2OEQ.js";
|
|
22
|
-
import "../chunk-YEW65ASC.js";
|
|
23
24
|
import "../chunk-W326GKML.js";
|
|
24
25
|
import "../chunk-G6SRSWXB.js";
|
|
25
|
-
import "../chunk-PIU5SSUV.js";
|
|
26
26
|
export {
|
|
27
27
|
ResourceList
|
|
28
28
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkKWLSBTB2cjs = require('../chunk-KWLSBTB2.cjs');
|
|
5
|
+
|
|
6
|
+
// src/primitives/responsive-embed.tsx
|
|
7
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
8
|
+
function ResponsiveEmbed({
|
|
9
|
+
src,
|
|
10
|
+
title,
|
|
11
|
+
allow,
|
|
12
|
+
allowFullScreen = true,
|
|
13
|
+
marginTop = "none",
|
|
14
|
+
className
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkKWLSBTB2cjs.cn.call(void 0, "aspect-video overflow-hidden rounded-lg border border-border bg-muted", marginTop === "md" && "mt-4", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
17
|
+
"iframe",
|
|
18
|
+
{
|
|
19
|
+
src,
|
|
20
|
+
title,
|
|
21
|
+
allow,
|
|
22
|
+
allowFullScreen,
|
|
23
|
+
className: "h-full w-full border-0"
|
|
24
|
+
}
|
|
25
|
+
) });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
exports.ResponsiveEmbed = ResponsiveEmbed;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface ResponsiveEmbedProps {
|
|
4
|
+
src: string;
|
|
5
|
+
title: string;
|
|
6
|
+
allow?: string;
|
|
7
|
+
allowFullScreen?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
marginTop?: "none" | "md";
|
|
10
|
+
}
|
|
11
|
+
/** Generic 16:9 iframe container for trusted external media embeds. */
|
|
12
|
+
declare function ResponsiveEmbed({ src, title, allow, allowFullScreen, marginTop, className, }: ResponsiveEmbedProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { ResponsiveEmbed, type ResponsiveEmbedProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface ResponsiveEmbedProps {
|
|
4
|
+
src: string;
|
|
5
|
+
title: string;
|
|
6
|
+
allow?: string;
|
|
7
|
+
allowFullScreen?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
marginTop?: "none" | "md";
|
|
10
|
+
}
|
|
11
|
+
/** Generic 16:9 iframe container for trusted external media embeds. */
|
|
12
|
+
declare function ResponsiveEmbed({ src, title, allow, allowFullScreen, marginTop, className, }: ResponsiveEmbedProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { ResponsiveEmbed, type ResponsiveEmbedProps };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "../chunk-G6SRSWXB.js";
|
|
5
|
+
|
|
6
|
+
// src/primitives/responsive-embed.tsx
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
function ResponsiveEmbed({
|
|
9
|
+
src,
|
|
10
|
+
title,
|
|
11
|
+
allow,
|
|
12
|
+
allowFullScreen = true,
|
|
13
|
+
marginTop = "none",
|
|
14
|
+
className
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ jsx("div", { className: cn("aspect-video overflow-hidden rounded-lg border border-border bg-muted", marginTop === "md" && "mt-4", className), children: /* @__PURE__ */ jsx(
|
|
17
|
+
"iframe",
|
|
18
|
+
{
|
|
19
|
+
src,
|
|
20
|
+
title,
|
|
21
|
+
allow,
|
|
22
|
+
allowFullScreen,
|
|
23
|
+
className: "h-full w-full border-0"
|
|
24
|
+
}
|
|
25
|
+
) });
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
ResponsiveEmbed
|
|
29
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkJDEXZGIYcjs = require('../chunk-JDEXZGIY.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkKWLSBTB2cjs = require('../chunk-KWLSBTB2.cjs');
|
|
9
|
+
|
|
10
|
+
// src/primitives/save-bar.tsx
|
|
11
|
+
var _react = require('react');
|
|
12
|
+
var _reactdom = require('react-dom');
|
|
13
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
14
|
+
function SaveBar({
|
|
15
|
+
isDirty,
|
|
16
|
+
saving = false,
|
|
17
|
+
onSave,
|
|
18
|
+
onDiscard,
|
|
19
|
+
saveLabel = "Save changes",
|
|
20
|
+
savingLabel = "Saving\u2026",
|
|
21
|
+
discardLabel = "Discard",
|
|
22
|
+
status,
|
|
23
|
+
containerClassName,
|
|
24
|
+
className,
|
|
25
|
+
width = "wide"
|
|
26
|
+
}) {
|
|
27
|
+
const [mounted, setMounted] = _react.useState.call(void 0, false);
|
|
28
|
+
_react.useEffect.call(void 0, () => setMounted(true), []);
|
|
29
|
+
if (!mounted) return null;
|
|
30
|
+
const bar = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
role: "region",
|
|
34
|
+
"aria-label": "Save changes",
|
|
35
|
+
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
36
|
+
"fixed inset-x-0 bottom-0 z-40 border-t border-border bg-background/95 backdrop-blur-sm",
|
|
37
|
+
// Lift above iOS home indicator / Safari URL bar
|
|
38
|
+
"pb-[env(safe-area-inset-bottom)]",
|
|
39
|
+
className
|
|
40
|
+
),
|
|
41
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
45
|
+
"mx-auto px-4 md:px-6 py-3 flex items-center justify-between gap-3",
|
|
46
|
+
_nullishCoalesce(containerClassName, () => ( (width === "narrow" ? "max-w-3xl" : "max-w-5xl")))
|
|
47
|
+
),
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
50
|
+
"span",
|
|
51
|
+
{
|
|
52
|
+
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
53
|
+
"text-sm truncate transition-colors",
|
|
54
|
+
isDirty ? "text-foreground" : "text-muted-foreground"
|
|
55
|
+
),
|
|
56
|
+
children: _nullishCoalesce(status, () => ( (isDirty ? "Unsaved changes" : "All changes saved")))
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
60
|
+
onDiscard && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
61
|
+
_chunkJDEXZGIYcjs.Button,
|
|
62
|
+
{
|
|
63
|
+
type: "button",
|
|
64
|
+
variant: "ghost",
|
|
65
|
+
size: "sm",
|
|
66
|
+
onClick: onDiscard,
|
|
67
|
+
disabled: saving || !isDirty,
|
|
68
|
+
children: discardLabel
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
72
|
+
_chunkJDEXZGIYcjs.Button,
|
|
73
|
+
{
|
|
74
|
+
type: "button",
|
|
75
|
+
size: "sm",
|
|
76
|
+
onClick: onSave,
|
|
77
|
+
disabled: saving || !isDirty,
|
|
78
|
+
children: saving ? savingLabel : saveLabel
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] })
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
return _reactdom.createPortal.call(void 0, bar, document.body);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
exports.SaveBar = SaveBar;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface SaveBarProps {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the form has unsaved changes. Controls the bar's active
|
|
7
|
+
* vs muted visual state and the enabled state of Save / Discard.
|
|
8
|
+
*/
|
|
9
|
+
isDirty: boolean;
|
|
10
|
+
/** Whether a save is in flight. Disables both buttons. */
|
|
11
|
+
saving?: boolean;
|
|
12
|
+
/** Primary action — wired to your save handler. */
|
|
13
|
+
onSave: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Optional discard handler. When provided, renders a ghost "Discard"
|
|
16
|
+
* button alongside the save. Typically resets controlled state back to
|
|
17
|
+
* the initial server-supplied values.
|
|
18
|
+
*/
|
|
19
|
+
onDiscard?: () => void;
|
|
20
|
+
saveLabel?: ReactNode;
|
|
21
|
+
/** Label shown while `saving` is true. Defaults to "Saving…". */
|
|
22
|
+
savingLabel?: ReactNode;
|
|
23
|
+
discardLabel?: ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Status caption shown on the left. Defaults to "Unsaved changes"
|
|
26
|
+
* (when dirty) or "All changes saved" (when clean). Override for
|
|
27
|
+
* app-specific copy.
|
|
28
|
+
*/
|
|
29
|
+
status?: ReactNode;
|
|
30
|
+
/** Outer container max-width class. Defaults to `max-w-5xl`. */
|
|
31
|
+
containerClassName?: string;
|
|
32
|
+
className?: string;
|
|
33
|
+
width?: "narrow" | "wide";
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Sticky bottom action bar for editable form pages. ALWAYS visible on
|
|
37
|
+
* settings/form pages — a muted "All changes saved" state when clean,
|
|
38
|
+
* an active "Unsaved changes" state when dirty. One bar per page —
|
|
39
|
+
* fragmenting saves between sections forces users to think about
|
|
40
|
+
* partial commits.
|
|
41
|
+
*
|
|
42
|
+
* Why always-visible: users need to know a page is editable without
|
|
43
|
+
* having to type something first to discover the save affordance.
|
|
44
|
+
*
|
|
45
|
+
* For read-only pages (e.g. an API token display + rotate button), do
|
|
46
|
+
* NOT use this — use inline action buttons next to their context.
|
|
47
|
+
*
|
|
48
|
+
* The component is positioned `fixed inset-x-0 bottom-0` with safe-area
|
|
49
|
+
* padding for iOS home indicator / browser chrome. Add `pb-28` (or
|
|
50
|
+
* similar) to the page content so the bar doesn't cover the last
|
|
51
|
+
* section.
|
|
52
|
+
*/
|
|
53
|
+
declare function SaveBar({ isDirty, saving, onSave, onDiscard, saveLabel, savingLabel, discardLabel, status, containerClassName, className, width, }: SaveBarProps): React.ReactPortal | null;
|
|
54
|
+
|
|
55
|
+
export { SaveBar, type SaveBarProps };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface SaveBarProps {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the form has unsaved changes. Controls the bar's active
|
|
7
|
+
* vs muted visual state and the enabled state of Save / Discard.
|
|
8
|
+
*/
|
|
9
|
+
isDirty: boolean;
|
|
10
|
+
/** Whether a save is in flight. Disables both buttons. */
|
|
11
|
+
saving?: boolean;
|
|
12
|
+
/** Primary action — wired to your save handler. */
|
|
13
|
+
onSave: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Optional discard handler. When provided, renders a ghost "Discard"
|
|
16
|
+
* button alongside the save. Typically resets controlled state back to
|
|
17
|
+
* the initial server-supplied values.
|
|
18
|
+
*/
|
|
19
|
+
onDiscard?: () => void;
|
|
20
|
+
saveLabel?: ReactNode;
|
|
21
|
+
/** Label shown while `saving` is true. Defaults to "Saving…". */
|
|
22
|
+
savingLabel?: ReactNode;
|
|
23
|
+
discardLabel?: ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Status caption shown on the left. Defaults to "Unsaved changes"
|
|
26
|
+
* (when dirty) or "All changes saved" (when clean). Override for
|
|
27
|
+
* app-specific copy.
|
|
28
|
+
*/
|
|
29
|
+
status?: ReactNode;
|
|
30
|
+
/** Outer container max-width class. Defaults to `max-w-5xl`. */
|
|
31
|
+
containerClassName?: string;
|
|
32
|
+
className?: string;
|
|
33
|
+
width?: "narrow" | "wide";
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Sticky bottom action bar for editable form pages. ALWAYS visible on
|
|
37
|
+
* settings/form pages — a muted "All changes saved" state when clean,
|
|
38
|
+
* an active "Unsaved changes" state when dirty. One bar per page —
|
|
39
|
+
* fragmenting saves between sections forces users to think about
|
|
40
|
+
* partial commits.
|
|
41
|
+
*
|
|
42
|
+
* Why always-visible: users need to know a page is editable without
|
|
43
|
+
* having to type something first to discover the save affordance.
|
|
44
|
+
*
|
|
45
|
+
* For read-only pages (e.g. an API token display + rotate button), do
|
|
46
|
+
* NOT use this — use inline action buttons next to their context.
|
|
47
|
+
*
|
|
48
|
+
* The component is positioned `fixed inset-x-0 bottom-0` with safe-area
|
|
49
|
+
* padding for iOS home indicator / browser chrome. Add `pb-28` (or
|
|
50
|
+
* similar) to the page content so the bar doesn't cover the last
|
|
51
|
+
* section.
|
|
52
|
+
*/
|
|
53
|
+
declare function SaveBar({ isDirty, saving, onSave, onDiscard, saveLabel, savingLabel, discardLabel, status, containerClassName, className, width, }: SaveBarProps): React.ReactPortal | null;
|
|
54
|
+
|
|
55
|
+
export { SaveBar, type SaveBarProps };
|