@epicbagel/saas-kit 1.32.0 → 1.34.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.
Files changed (228) hide show
  1. package/README.md +67 -0
  2. package/THIRD_PARTY_NOTICES.md +6 -5
  3. package/dist/chunk-2BNEE3U6.cjs +36 -0
  4. package/dist/chunk-2DCJ2SFU.js +20 -0
  5. package/dist/chunk-5GFMSK27.js +489 -0
  6. package/dist/chunk-5PHOKJCT.cjs +42 -0
  7. package/dist/chunk-B54ZEKBG.cjs +63 -0
  8. package/dist/chunk-BB7PO2BW.js +67 -0
  9. package/dist/chunk-BOMVE7QO.cjs +47 -0
  10. package/dist/{chunk-FPOJ2NGG.js → chunk-C3VZMTVB.js} +1 -1
  11. package/dist/chunk-CXAFTEEP.cjs +20 -0
  12. package/dist/chunk-EXHF3QUY.js +36 -0
  13. package/dist/chunk-FYNHRHVY.cjs +47 -0
  14. package/dist/chunk-HTTRUJQU.cjs +60 -0
  15. package/dist/chunk-I3GBXIFL.cjs +67 -0
  16. package/dist/chunk-O3G3TVPU.js +27 -0
  17. package/dist/{chunk-JS6BLIWL.js → chunk-ROUWBWEQ.js} +7 -7
  18. package/dist/chunk-TDCVZKMX.cjs +27 -0
  19. package/dist/{chunk-E2UVQXBO.cjs → chunk-TP74SBRH.cjs} +6 -6
  20. package/dist/chunk-TUQVHPSI.js +60 -0
  21. package/dist/chunk-UKYUWSF2.cjs +489 -0
  22. package/dist/{chunk-MOJHETNO.cjs → chunk-VUMLLKWY.cjs} +5 -5
  23. package/dist/chunk-VWOWPNKT.js +73 -0
  24. package/dist/chunk-W5L6LQI3.js +42 -0
  25. package/dist/chunk-WMTCL463.js +47 -0
  26. package/dist/chunk-WTVL2FK7.js +47 -0
  27. package/dist/chunk-XH2I3YJ6.js +63 -0
  28. package/dist/chunk-Y6X6XDHE.cjs +73 -0
  29. package/dist/primitives/accent-theme.cjs +7 -0
  30. package/dist/primitives/accent-theme.d.cts +32 -0
  31. package/dist/primitives/accent-theme.d.ts +32 -0
  32. package/dist/primitives/accent-theme.js +7 -0
  33. package/dist/primitives/activity-feed.cjs +3 -3
  34. package/dist/primitives/activity-feed.js +4 -4
  35. package/dist/primitives/anchor.cjs +3 -30
  36. package/dist/primitives/anchor.js +3 -30
  37. package/dist/primitives/app-layout.cjs +114 -0
  38. package/dist/primitives/app-layout.d.cts +47 -0
  39. package/dist/primitives/app-layout.d.ts +47 -0
  40. package/dist/primitives/app-layout.js +114 -0
  41. package/dist/primitives/app-sidebar.cjs +52 -0
  42. package/dist/primitives/app-sidebar.d.cts +105 -0
  43. package/dist/primitives/app-sidebar.d.ts +105 -0
  44. package/dist/primitives/app-sidebar.js +52 -0
  45. package/dist/primitives/back-bar.cjs +37 -0
  46. package/dist/primitives/back-bar.d.cts +31 -0
  47. package/dist/primitives/back-bar.d.ts +31 -0
  48. package/dist/primitives/back-bar.js +37 -0
  49. package/dist/primitives/batch-action-bar.cjs +134 -0
  50. package/dist/primitives/batch-action-bar.d.cts +27 -0
  51. package/dist/primitives/batch-action-bar.d.ts +27 -0
  52. package/dist/primitives/batch-action-bar.js +134 -0
  53. package/dist/primitives/board-view.cjs +7 -7
  54. package/dist/primitives/board-view.js +6 -6
  55. package/dist/primitives/brand-mark.cjs +8 -0
  56. package/dist/primitives/brand-mark.d.cts +10 -0
  57. package/dist/primitives/brand-mark.d.ts +10 -0
  58. package/dist/primitives/brand-mark.js +8 -0
  59. package/dist/primitives/branded-page.cjs +201 -0
  60. package/dist/primitives/branded-page.d.cts +118 -0
  61. package/dist/primitives/branded-page.d.ts +118 -0
  62. package/dist/primitives/branded-page.js +201 -0
  63. package/dist/primitives/call-card.cjs +2 -2
  64. package/dist/primitives/call-card.js +3 -3
  65. package/dist/primitives/chat.cjs +21 -21
  66. package/dist/primitives/chat.js +17 -17
  67. package/dist/primitives/command.cjs +129 -0
  68. package/dist/primitives/command.d.cts +60 -0
  69. package/dist/primitives/command.d.ts +60 -0
  70. package/dist/primitives/command.js +129 -0
  71. package/dist/primitives/compact-list.cjs +24 -0
  72. package/dist/primitives/compact-list.d.cts +18 -0
  73. package/dist/primitives/compact-list.d.ts +18 -0
  74. package/dist/primitives/compact-list.js +24 -0
  75. package/dist/primitives/connection.cjs +2 -2
  76. package/dist/primitives/connection.js +2 -2
  77. package/dist/primitives/context-bar.cjs +57 -0
  78. package/dist/primitives/context-bar.d.cts +50 -0
  79. package/dist/primitives/context-bar.d.ts +50 -0
  80. package/dist/primitives/context-bar.js +57 -0
  81. package/dist/primitives/cycling-prompt.cjs +102 -0
  82. package/dist/primitives/cycling-prompt.d.cts +24 -0
  83. package/dist/primitives/cycling-prompt.d.ts +24 -0
  84. package/dist/primitives/cycling-prompt.js +102 -0
  85. package/dist/primitives/dialog.d.cts +9 -9
  86. package/dist/primitives/dialog.d.ts +9 -9
  87. package/dist/primitives/document-preview.cjs +5 -5
  88. package/dist/primitives/document-preview.js +3 -3
  89. package/dist/primitives/dotted-list.cjs +41 -0
  90. package/dist/primitives/dotted-list.d.cts +28 -0
  91. package/dist/primitives/dotted-list.d.ts +28 -0
  92. package/dist/primitives/dotted-list.js +41 -0
  93. package/dist/primitives/drawer.d.cts +6 -6
  94. package/dist/primitives/drawer.d.ts +6 -6
  95. package/dist/primitives/field.cjs +3 -3
  96. package/dist/primitives/field.js +2 -2
  97. package/dist/primitives/file-dropzone.cjs +3 -3
  98. package/dist/primitives/file-dropzone.js +2 -2
  99. package/dist/primitives/file-preview-internals.cjs +4 -4
  100. package/dist/primitives/file-preview-internals.js +3 -3
  101. package/dist/primitives/file-preview.cjs +12 -12
  102. package/dist/primitives/file-preview.js +3 -3
  103. package/dist/primitives/filter-bar.cjs +4 -4
  104. package/dist/primitives/filter-bar.js +3 -3
  105. package/dist/primitives/fixed-action-bar.cjs +9 -0
  106. package/dist/primitives/fixed-action-bar.d.cts +15 -0
  107. package/dist/primitives/fixed-action-bar.d.ts +15 -0
  108. package/dist/primitives/fixed-action-bar.js +9 -0
  109. package/dist/primitives/floating-action-button.cjs +65 -0
  110. package/dist/primitives/floating-action-button.d.cts +52 -0
  111. package/dist/primitives/floating-action-button.d.ts +52 -0
  112. package/dist/primitives/floating-action-button.js +65 -0
  113. package/dist/primitives/form-section.cjs +38 -0
  114. package/dist/primitives/form-section.d.cts +43 -0
  115. package/dist/primitives/form-section.d.ts +43 -0
  116. package/dist/primitives/form-section.js +38 -0
  117. package/dist/primitives/key-value-grid.cjs +52 -0
  118. package/dist/primitives/key-value-grid.d.cts +20 -0
  119. package/dist/primitives/key-value-grid.d.ts +20 -0
  120. package/dist/primitives/key-value-grid.js +52 -0
  121. package/dist/primitives/marketing-footer.cjs +34 -0
  122. package/dist/primitives/marketing-footer.d.cts +29 -0
  123. package/dist/primitives/marketing-footer.d.ts +29 -0
  124. package/dist/primitives/marketing-footer.js +34 -0
  125. package/dist/primitives/marketing-header.cjs +8 -0
  126. package/dist/primitives/marketing-header.d.cts +31 -0
  127. package/dist/primitives/marketing-header.d.ts +31 -0
  128. package/dist/primitives/marketing-header.js +8 -0
  129. package/dist/primitives/marketing-section.cjs +8 -0
  130. package/dist/primitives/marketing-section.d.cts +35 -0
  131. package/dist/primitives/marketing-section.d.ts +35 -0
  132. package/dist/primitives/marketing-section.js +8 -0
  133. package/dist/primitives/marketing-shell.cjs +28 -0
  134. package/dist/primitives/marketing-shell.d.cts +14 -0
  135. package/dist/primitives/marketing-shell.d.ts +14 -0
  136. package/dist/primitives/marketing-shell.js +28 -0
  137. package/dist/primitives/notes.cjs +3 -3
  138. package/dist/primitives/notes.js +3 -3
  139. package/dist/primitives/page-header.cjs +3 -67
  140. package/dist/primitives/page-header.js +3 -67
  141. package/dist/primitives/page-shell.cjs +3 -41
  142. package/dist/primitives/page-shell.js +3 -41
  143. package/dist/primitives/page-tabs.cjs +4 -57
  144. package/dist/primitives/page-tabs.js +4 -57
  145. package/dist/primitives/pager.cjs +85 -0
  146. package/dist/primitives/pager.d.cts +39 -0
  147. package/dist/primitives/pager.d.ts +39 -0
  148. package/dist/primitives/pager.js +85 -0
  149. package/dist/primitives/pagination.cjs +119 -0
  150. package/dist/primitives/pagination.d.cts +41 -0
  151. package/dist/primitives/pagination.d.ts +41 -0
  152. package/dist/primitives/pagination.js +119 -0
  153. package/dist/primitives/poster.cjs +11 -1
  154. package/dist/primitives/poster.d.cts +12 -1
  155. package/dist/primitives/poster.d.ts +12 -1
  156. package/dist/primitives/poster.js +10 -0
  157. package/dist/primitives/resource-list.cjs +7 -7
  158. package/dist/primitives/resource-list.js +6 -6
  159. package/dist/primitives/responsive-dialog.cjs +3 -3
  160. package/dist/primitives/responsive-dialog.js +2 -2
  161. package/dist/primitives/responsive-embed.cjs +29 -0
  162. package/dist/primitives/responsive-embed.d.cts +14 -0
  163. package/dist/primitives/responsive-embed.d.ts +14 -0
  164. package/dist/primitives/responsive-embed.js +29 -0
  165. package/dist/primitives/save-bar.cjs +91 -0
  166. package/dist/primitives/save-bar.d.cts +55 -0
  167. package/dist/primitives/save-bar.d.ts +55 -0
  168. package/dist/primitives/save-bar.js +91 -0
  169. package/dist/primitives/section.cjs +2 -2
  170. package/dist/primitives/section.js +3 -3
  171. package/dist/primitives/settings-list.cjs +10 -0
  172. package/dist/primitives/settings-list.d.cts +31 -0
  173. package/dist/primitives/settings-list.d.ts +31 -0
  174. package/dist/primitives/settings-list.js +10 -0
  175. package/dist/primitives/settings-section.cjs +34 -0
  176. package/dist/primitives/settings-section.d.cts +44 -0
  177. package/dist/primitives/settings-section.d.ts +44 -0
  178. package/dist/primitives/settings-section.js +34 -0
  179. package/dist/primitives/sheet.d.cts +9 -9
  180. package/dist/primitives/sheet.d.ts +9 -9
  181. package/dist/primitives/short-video.cjs +110 -0
  182. package/dist/primitives/short-video.d.cts +30 -0
  183. package/dist/primitives/short-video.d.ts +30 -0
  184. package/dist/primitives/short-video.js +110 -0
  185. package/dist/primitives/stats-card.cjs +46 -0
  186. package/dist/primitives/stats-card.d.cts +19 -0
  187. package/dist/primitives/stats-card.d.ts +19 -0
  188. package/dist/primitives/stats-card.js +46 -0
  189. package/dist/primitives/stats-strip.cjs +38 -0
  190. package/dist/primitives/stats-strip.d.cts +24 -0
  191. package/dist/primitives/stats-strip.d.ts +24 -0
  192. package/dist/primitives/stats-strip.js +38 -0
  193. package/dist/primitives/step-list.cjs +32 -0
  194. package/dist/primitives/step-list.d.cts +19 -0
  195. package/dist/primitives/step-list.d.ts +19 -0
  196. package/dist/primitives/step-list.js +32 -0
  197. package/dist/primitives/steps.cjs +77 -0
  198. package/dist/primitives/steps.d.cts +35 -0
  199. package/dist/primitives/steps.d.ts +35 -0
  200. package/dist/primitives/steps.js +77 -0
  201. package/dist/primitives/switch-field.cjs +3 -3
  202. package/dist/primitives/switch-field.js +3 -3
  203. package/dist/primitives/tabbed-page-header.cjs +53 -0
  204. package/dist/primitives/tabbed-page-header.d.cts +26 -0
  205. package/dist/primitives/tabbed-page-header.d.ts +26 -0
  206. package/dist/primitives/tabbed-page-header.js +53 -0
  207. package/dist/primitives/theme-selector.cjs +15 -15
  208. package/dist/primitives/theme-selector.js +2 -2
  209. package/dist/primitives/voice-dictation-button.cjs +3 -3
  210. package/dist/primitives/voice-dictation-button.js +2 -2
  211. package/dist/primitives/voice-session-controls.cjs +3 -3
  212. package/dist/primitives/voice-session-controls.js +2 -2
  213. package/dist/primitives/workflow-assistant.cjs +4 -4
  214. package/dist/primitives/workflow-assistant.js +2 -2
  215. package/package.json +322 -1
  216. package/src/styles/components/poster.css +42 -1
  217. package/dist/{chunk-PH2TV7XI.cjs → chunk-2YW5VA2V.cjs} +2 -2
  218. package/dist/{chunk-UFFHGKI7.js → chunk-6LB37JWO.js} +8 -8
  219. package/dist/{chunk-AO56ET4F.cjs → chunk-BTHYGHOH.cjs} +2 -2
  220. package/dist/{chunk-WHDHUYS6.js → chunk-HBRVOGLA.js} +3 -3
  221. package/dist/{chunk-6O3DUMF7.js → chunk-HTUYUMAH.js} +3 -3
  222. package/dist/{chunk-PNI354BY.cjs → chunk-JMNDFISN.cjs} +2 -2
  223. package/dist/{chunk-CRZ4INEJ.js → chunk-JTI4244T.js} +10 -10
  224. package/dist/{chunk-ZGTPNSR7.js → chunk-NNEV5RHQ.js} +3 -3
  225. package/dist/{chunk-TWCJMFST.js → chunk-O42YC6ZQ.js} +3 -3
  226. package/dist/{chunk-MW67PHAQ.cjs → chunk-S2IMM37Q.cjs} +6 -6
  227. package/dist/{chunk-ZJFYOXSM.cjs → chunk-SRVRNHCX.cjs} +2 -2
  228. package/dist/{chunk-ZLEM2SAU.cjs → chunk-Z3JJSNR5.cjs} +2 -2
package/README.md CHANGED
@@ -514,6 +514,73 @@ export function Appearance() {
514
514
  `paletteDescription`. Each palette's card is named by its `label` and
515
515
  described by its `description`.
516
516
 
517
+ ## Branded page (1.34.0)
518
+
519
+ `primitives/branded-page` is the whole of a public page one company shows to
520
+ another company's people: a shared profile, a list sent for review, an
521
+ invitation, a client's portal. It puts the kit's page chrome together
522
+ (`MarketingHeader`, `BrandMark`, `AccentTheme`, `PageShell`,
523
+ `FixedActionBar` and `EmptyState`), so a host passes a brand and its content.
524
+
525
+ ```tsx
526
+ import { BrandedPage } from "@epicbagel/saas-kit/primitives/branded-page";
527
+
528
+ <BrandedPage
529
+ brand={{ name: "Example Agency", logoUrl: brand.logoUrl, href: brand.website }}
530
+ accent={{ light: "#0f766e", dark: "#5eead4" }}
531
+ headerTrailing={<ThemeSwitch />} // your own control
532
+ credit="Shared by Example Agency"
533
+ actionBar={{
534
+ title: "Three people ready",
535
+ description: "Book a call to meet them.",
536
+ actions: <Button size="lg">Book a call</Button>,
537
+ }}
538
+ loading={loading}
539
+ unavailable={gone ? { reason: "expired" } : false}
540
+ >
541
+ <Profile />
542
+ </BrandedPage>
543
+ ```
544
+
545
+ - **Brand.** The logo (`logoUrl`), else the `name` as text, and a link when
546
+ it has an `href`; nothing for a brand with neither. Or pass an element of
547
+ your own: your wordmark, or your router's link around one. The name is
548
+ text, not a heading, so the page's headings start in its content. A logo's
549
+ text alternative is `logoAlt`, else the brand's `name`, else "Logo".
550
+ - **Accent and palette.** `accent` is the brand's light and dark colours as
551
+ six-digit hex, which `AccentTheme` applies inside the page only. `palette`
552
+ pins the page to one palette (its `data-theme` value) and paints the
553
+ canvas in it, so the page looks the same to every visitor whatever palette
554
+ their own browser has stored. Left out, the page follows the document.
555
+ - **Header.** `headerTrailing` holds your own controls, such as a theme
556
+ switch or Sign in. The header is the page's banner; with neither a brand
557
+ nor controls there is none.
558
+ - **Content.** `children`, in the page's one `main`: `width` (`narrow` by
559
+ default, `wide` or `full`), `padding` (`base` by default, which lines up
560
+ with the header) and `surface` (`muted` by default, or `default`).
561
+ - **Credit.** `credit` is a closing line under the content. It prints;
562
+ `creditPrintVisibility="hidden"` keeps it off paper.
563
+ - **Action bar.** `actionBar` is a `FixedActionBar` as wide as the content:
564
+ `title`, `description`, `actions` and `actionsWidth`. The content keeps
565
+ clear of it.
566
+ - **States.** `loading` and `unavailable` stand in for the content, the
567
+ credit and the action bar, under the same header and both starting at the
568
+ same height: pass `true`, or the state's props. `loading` wins while both
569
+ are set. `unavailable` takes a `reason` (`not-found` by default, worded
570
+ for a link whose fate you can't tell; `expired`, `archived` or `revoked`),
571
+ each with its own icon and words, and your `icon`, `title`, `description`
572
+ and `action` in their place. Its title is a heading, and it is announced
573
+ when it appears (`role="alert"`). Loading is a polite `role="status"`
574
+ under a `label` ("Loading…").
575
+ - **Alone.** `BrandedPageUnavailable` and `BrandedPageLoading` are the same
576
+ two states as blocks, for a frame you draw yourself. With no brand to
577
+ show, `<BrandedPage unavailable />` is the whole page, without a header.
578
+ - **Paper.** Printed, the canvas is plain and the spacing compact, and the
579
+ header's controls and the action bar are left off.
580
+ - **Presentation only.** No router, fetch or storage: the host decides which
581
+ state shows, and every word can be replaced. The action bar's accessible
582
+ name ("Page action") is `FixedActionBar`'s own.
583
+
517
584
  ## License
518
585
 
519
586
  MIT. Some components and styles are adapted from shadcn/ui, and the file
@@ -15,11 +15,12 @@ output under `dist/` includes code derived from them. The more recent lifts
15
15
  name their registry item, style and sync date in a header comment.
16
16
 
17
17
  - `primitives/`: alert, alert-dialog, aspect-ratio, attachment, avatar, badge,
18
- bubble, button, calendar, card, checkbox, collapsible, dialog, drawer,
19
- dropdown-menu, field, input, input-group, item, label, marker, message,
20
- message-scroller, popover, progress, radio-group, scroll-area, select,
21
- separator, sheet, skeleton, spinner, switch, tabs, textarea, toggle,
22
- toggle-group, tooltip, trace
18
+ bubble, button, calendar, card, checkbox, collapsible, command, dialog,
19
+ drawer, dropdown-menu, field, input, input-group, item, label, marker,
20
+ message, message-scroller, pagination, popover, progress, radio-group,
21
+ scroll-area, select, separator, sheet, skeleton, spinner, switch, tabs,
22
+ textarea, toggle, toggle-group, tooltip, trace
23
+ - `primitives/app-sidebar`, adapted from the shadcn/ui "Sidebar" component
23
24
  - `primitives/suggestion`, adapted from the shadcn/ui AI Elements "Suggestion"
24
25
  pattern (https://ui.shadcn.com/docs/ai-elements)
25
26
  - `primitives/chat`, composed after the shadcn/ui AI Elements "Chat",
@@ -0,0 +1,36 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+ var _chunkKWLSBTB2cjs = require('./chunk-KWLSBTB2.cjs');
5
+
6
+ // src/primitives/anchor.tsx
7
+ var _reactslot = require('@radix-ui/react-slot');
8
+ var _react = require('react');
9
+ var _jsxruntime = require('react/jsx-runtime');
10
+ var Anchor = _react.forwardRef.call(void 0, function Anchor2({ variant = "unstyled", size = "inherit", display = "inline", underline = false, asChild = false, border = "none", weight = "normal", className, ...props }, ref) {
11
+ const Component = asChild ? _reactslot.Slot : "a";
12
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13
+ Component,
14
+ {
15
+ ref,
16
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
17
+ variant === "text" && "font-medium text-primary underline-offset-4 hover:underline",
18
+ variant === "muted" && "text-muted-foreground underline underline-offset-2 hover:text-foreground",
19
+ variant === "foreground" && "text-foreground underline-offset-2 hover:underline",
20
+ size === "xs" && "text-xs",
21
+ size === "sm" && "text-sm",
22
+ display === "inline-flex" && "inline-flex items-center gap-1",
23
+ display === "block" && "block",
24
+ border === "bottom" && "border-b last:border-b-0",
25
+ weight === "medium" && "font-medium",
26
+ underline && "underline",
27
+ className
28
+ ),
29
+ ...props
30
+ }
31
+ );
32
+ });
33
+
34
+
35
+
36
+ exports.Anchor = Anchor;
@@ -0,0 +1,20 @@
1
+ "use client";
2
+
3
+ // src/primitives/settings-list.tsx
4
+ import { Children, createContext } from "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var SettingsListContext = createContext({ single: false });
7
+ function SettingsList({ children, className }) {
8
+ const items = Children.toArray(children).filter(Boolean);
9
+ if (items.length === 0) return null;
10
+ const single = items.length === 1;
11
+ if (single) {
12
+ return /* @__PURE__ */ jsx(SettingsListContext.Provider, { value: { single: true }, children: /* @__PURE__ */ jsx("div", { className, children: items[0] }) });
13
+ }
14
+ return /* @__PURE__ */ jsx(SettingsListContext.Provider, { value: { single: false }, children: /* @__PURE__ */ jsx("div", { className, children: items.map((child, i) => /* @__PURE__ */ jsx("div", { className: "border-t border-border py-8", children: child }, i)) }) });
15
+ }
16
+
17
+ export {
18
+ SettingsListContext,
19
+ SettingsList
20
+ };
@@ -0,0 +1,489 @@
1
+ "use client";
2
+ import {
3
+ Separator
4
+ } from "./chunk-HYTILYE5.js";
5
+ import {
6
+ Sheet,
7
+ SheetContent,
8
+ SheetDescription,
9
+ SheetTitle
10
+ } from "./chunk-G76JANB4.js";
11
+ import {
12
+ Tooltip,
13
+ TooltipContent,
14
+ TooltipProvider,
15
+ TooltipTrigger
16
+ } from "./chunk-ZRLUUZHK.js";
17
+ import {
18
+ CountBadge
19
+ } from "./chunk-H7TETFLB.js";
20
+ import {
21
+ Button
22
+ } from "./chunk-W326GKML.js";
23
+ import {
24
+ cn
25
+ } from "./chunk-G6SRSWXB.js";
26
+ import {
27
+ useIsMobile
28
+ } from "./chunk-PIU5SSUV.js";
29
+
30
+ // src/primitives/app-sidebar.tsx
31
+ import { Slot } from "@radix-ui/react-slot";
32
+ import { PanelLeft } from "lucide-react";
33
+ import * as React from "react";
34
+ import { jsx, jsxs } from "react/jsx-runtime";
35
+ var SIDEBAR_WIDTHS = {
36
+ default: "16rem",
37
+ wide: "20rem"
38
+ };
39
+ var SIDEBAR_WIDTH_ICON = "4.5rem";
40
+ var SidebarContext = React.createContext(null);
41
+ function useSidebar() {
42
+ const context = React.useContext(SidebarContext);
43
+ if (!context) {
44
+ throw new Error("useSidebar must be used within a SidebarProvider.");
45
+ }
46
+ return context;
47
+ }
48
+ var SidebarProvider = React.forwardRef(function SidebarProvider2({
49
+ defaultOpen = true,
50
+ open: openProp,
51
+ onOpenChange,
52
+ storageKey,
53
+ width = "default",
54
+ surface = "background",
55
+ className,
56
+ style,
57
+ children,
58
+ ...props
59
+ }, ref) {
60
+ const isMobile = useIsMobile();
61
+ const [openMobile, setOpenMobile] = React.useState(false);
62
+ const [internalOpen, setInternalOpen] = React.useState(defaultOpen);
63
+ const open = openProp ?? internalOpen;
64
+ React.useEffect(() => {
65
+ if (!storageKey || openProp !== void 0) return;
66
+ try {
67
+ const saved = window.localStorage.getItem(storageKey);
68
+ if (saved === "true" || saved === "false") {
69
+ setInternalOpen(saved === "true");
70
+ }
71
+ } catch {
72
+ }
73
+ }, [openProp, storageKey]);
74
+ const setOpen = React.useCallback(
75
+ (nextOpen) => {
76
+ if (openProp === void 0) setInternalOpen(nextOpen);
77
+ onOpenChange?.(nextOpen);
78
+ if (storageKey) {
79
+ try {
80
+ window.localStorage.setItem(storageKey, String(nextOpen));
81
+ } catch {
82
+ }
83
+ }
84
+ },
85
+ [onOpenChange, openProp, storageKey]
86
+ );
87
+ const toggleSidebar = React.useCallback(() => {
88
+ if (isMobile) setOpenMobile((current) => !current);
89
+ else setOpen(!open);
90
+ }, [isMobile, open, setOpen]);
91
+ React.useEffect(() => {
92
+ const handleKeyDown = (event) => {
93
+ if (event.key.toLowerCase() === "b" && (event.metaKey || event.ctrlKey)) {
94
+ event.preventDefault();
95
+ toggleSidebar();
96
+ }
97
+ };
98
+ window.addEventListener("keydown", handleKeyDown);
99
+ return () => window.removeEventListener("keydown", handleKeyDown);
100
+ }, [toggleSidebar]);
101
+ const value = React.useMemo(
102
+ () => ({
103
+ state: open ? "expanded" : "collapsed",
104
+ open,
105
+ setOpen,
106
+ openMobile,
107
+ setOpenMobile,
108
+ isMobile,
109
+ surface,
110
+ toggleSidebar
111
+ }),
112
+ [isMobile, open, openMobile, setOpen, surface, toggleSidebar]
113
+ );
114
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, { value, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 150, children: /* @__PURE__ */ jsx(
115
+ "div",
116
+ {
117
+ ref,
118
+ "data-slot": "sidebar-wrapper",
119
+ style: {
120
+ "--sidebar-width": SIDEBAR_WIDTHS[width],
121
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
122
+ ...style
123
+ },
124
+ className: cn(
125
+ "group/sidebar-wrapper flex min-h-svh w-full bg-background",
126
+ className
127
+ ),
128
+ ...props,
129
+ children
130
+ }
131
+ ) }) });
132
+ });
133
+ var Sidebar = React.forwardRef(
134
+ function Sidebar2({
135
+ side = "left",
136
+ collapsible = "icon",
137
+ mobileLabel = "Navigation",
138
+ onEscapeKeyDown,
139
+ className,
140
+ children,
141
+ ...props
142
+ }, ref) {
143
+ const { isMobile, open, openMobile, setOpenMobile, surface } = useSidebar();
144
+ if (isMobile) {
145
+ return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, children: /* @__PURE__ */ jsxs(
146
+ SheetContent,
147
+ {
148
+ side,
149
+ width: "full",
150
+ padding: "none",
151
+ onEscapeKeyDown,
152
+ className: cn(
153
+ "gap-0 text-sidebar-foreground",
154
+ surface === "card" ? "bg-card" : "bg-background"
155
+ ),
156
+ children: [
157
+ /* @__PURE__ */ jsx(SheetTitle, { className: "sr-only", children: mobileLabel }),
158
+ /* @__PURE__ */ jsx(SheetDescription, { className: "sr-only", children: "Primary application navigation." }),
159
+ /* @__PURE__ */ jsx(
160
+ "div",
161
+ {
162
+ "data-slot": "sidebar",
163
+ "data-mobile": "true",
164
+ "data-surface": surface,
165
+ className: cn(
166
+ "flex h-full min-h-0 w-full flex-col",
167
+ surface === "card" ? "bg-card" : "bg-background",
168
+ className
169
+ ),
170
+ children
171
+ }
172
+ )
173
+ ]
174
+ }
175
+ ) });
176
+ }
177
+ const visible = collapsible !== "offcanvas" || open;
178
+ const width = collapsible === "none" ? "var(--sidebar-width)" : open ? "var(--sidebar-width)" : collapsible === "icon" ? "var(--sidebar-width-icon)" : "0px";
179
+ return /* @__PURE__ */ jsx(
180
+ "aside",
181
+ {
182
+ ref,
183
+ "data-slot": "sidebar",
184
+ "data-state": open ? "expanded" : "collapsed",
185
+ "data-collapsible": open ? "" : collapsible,
186
+ "data-side": side,
187
+ "data-surface": surface,
188
+ "aria-hidden": !visible,
189
+ style: { width },
190
+ className: cn(
191
+ "group/sidebar sticky top-0 hidden h-svh shrink-0 flex-col border-sidebar-border text-sidebar-foreground transition-[width] duration-200 ease-linear md:flex",
192
+ surface === "card" ? "bg-card" : "bg-background",
193
+ side === "left" ? "border-r" : "border-l",
194
+ !visible && "overflow-hidden border-transparent",
195
+ className
196
+ ),
197
+ ...props,
198
+ children: /* @__PURE__ */ jsx("div", { className: "flex h-full min-h-0 w-full flex-col overflow-hidden", children })
199
+ }
200
+ );
201
+ }
202
+ );
203
+ var SidebarInset = React.forwardRef(
204
+ function SidebarInset2({ className, ...props }, ref) {
205
+ return /* @__PURE__ */ jsx(
206
+ "main",
207
+ {
208
+ ref,
209
+ "data-slot": "sidebar-inset",
210
+ className: cn(
211
+ "relative flex min-h-svh min-w-0 flex-1 flex-col bg-background",
212
+ className
213
+ ),
214
+ ...props
215
+ }
216
+ );
217
+ }
218
+ );
219
+ var SidebarTrigger = React.forwardRef(function SidebarTrigger2({ className, onClick, visibility = "always", ...props }, ref) {
220
+ const { toggleSidebar } = useSidebar();
221
+ return /* @__PURE__ */ jsxs(
222
+ Button,
223
+ {
224
+ ref,
225
+ type: "button",
226
+ variant: "ghost",
227
+ size: "icon",
228
+ className: cn(
229
+ "shrink-0",
230
+ visibility === "mobile" && "md:hidden",
231
+ visibility === "desktop" && "hidden md:inline-flex",
232
+ className
233
+ ),
234
+ onClick: (event) => {
235
+ onClick?.(event);
236
+ if (!event.defaultPrevented) toggleSidebar();
237
+ },
238
+ "aria-label": "Toggle navigation",
239
+ ...props,
240
+ children: [
241
+ /* @__PURE__ */ jsx(PanelLeft, { className: "h-5 w-5" }),
242
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle navigation" })
243
+ ]
244
+ }
245
+ );
246
+ });
247
+ var SidebarRail = React.forwardRef(
248
+ function SidebarRail2({ className, ...props }, ref) {
249
+ const { toggleSidebar } = useSidebar();
250
+ return /* @__PURE__ */ jsx(
251
+ "button",
252
+ {
253
+ ref,
254
+ type: "button",
255
+ "aria-label": "Toggle navigation",
256
+ title: "Toggle navigation",
257
+ tabIndex: -1,
258
+ onClick: toggleSidebar,
259
+ className: cn(
260
+ "absolute inset-y-0 right-0 z-20 hidden w-3 translate-x-1/2 transition-colors after:absolute after:inset-y-0 after:left-1/2 after:w-px hover:after:bg-sidebar-border md:block",
261
+ className
262
+ ),
263
+ ...props
264
+ }
265
+ );
266
+ }
267
+ );
268
+ function SidebarHeader({
269
+ border = "none",
270
+ minHeight = "none",
271
+ padding = "default",
272
+ justify = "start",
273
+ className,
274
+ ...props
275
+ }) {
276
+ return /* @__PURE__ */ jsx(
277
+ "div",
278
+ {
279
+ "data-slot": "sidebar-header",
280
+ className: cn(
281
+ "flex shrink-0 flex-col gap-2",
282
+ padding === "default" ? minHeight === "header" ? "px-3 py-2" : "p-3" : minHeight === "header" ? "px-4 py-2" : "px-4 py-3",
283
+ border === "bottom" && "border-b border-sidebar-border",
284
+ minHeight === "header" && "h-16 min-h-16",
285
+ justify === "center" && "justify-center",
286
+ className
287
+ ),
288
+ ...props
289
+ }
290
+ );
291
+ }
292
+ function SidebarBrand({
293
+ expanded,
294
+ collapsed,
295
+ className,
296
+ ...props
297
+ }) {
298
+ return /* @__PURE__ */ jsxs(
299
+ "div",
300
+ {
301
+ "data-slot": "sidebar-brand",
302
+ className: cn("min-w-0", className),
303
+ ...props,
304
+ children: [
305
+ /* @__PURE__ */ jsx("div", { className: "group-data-[state=collapsed]/sidebar:hidden", children: expanded }),
306
+ /* @__PURE__ */ jsx("div", { className: "hidden justify-center group-data-[state=collapsed]/sidebar:flex", children: collapsed })
307
+ ]
308
+ }
309
+ );
310
+ }
311
+ function SidebarFooter({ className, ...props }) {
312
+ return /* @__PURE__ */ jsx(
313
+ "div",
314
+ {
315
+ "data-slot": "sidebar-footer",
316
+ className: cn("flex shrink-0 flex-col gap-2 p-3", className),
317
+ ...props
318
+ }
319
+ );
320
+ }
321
+ function SidebarFooterActions({ className, ...props }) {
322
+ return /* @__PURE__ */ jsx(
323
+ "div",
324
+ {
325
+ "data-slot": "sidebar-footer-actions",
326
+ className: cn(
327
+ "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-1 group-data-[state=collapsed]/sidebar:grid-cols-1",
328
+ className
329
+ ),
330
+ ...props
331
+ }
332
+ );
333
+ }
334
+ function SidebarContent({ className, ...props }) {
335
+ return /* @__PURE__ */ jsx(
336
+ "div",
337
+ {
338
+ "data-slot": "sidebar-content",
339
+ className: cn(
340
+ "flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto",
341
+ className
342
+ ),
343
+ ...props
344
+ }
345
+ );
346
+ }
347
+ function SidebarGroup({
348
+ separated = false,
349
+ padding = "default",
350
+ className,
351
+ ...props
352
+ }) {
353
+ return /* @__PURE__ */ jsx(
354
+ "div",
355
+ {
356
+ "data-slot": "sidebar-group",
357
+ "data-separated": separated ? "true" : void 0,
358
+ "data-padding": padding,
359
+ className: cn(
360
+ "relative flex w-full min-w-0 flex-col",
361
+ padding === "compact" ? "p-[12px]" : "p-3",
362
+ separated && "border-t border-sidebar-border",
363
+ className
364
+ ),
365
+ ...props
366
+ }
367
+ );
368
+ }
369
+ function SidebarGroupLabel({ className, ...props }) {
370
+ return /* @__PURE__ */ jsx(
371
+ "div",
372
+ {
373
+ "data-slot": "sidebar-group-label",
374
+ className: cn(
375
+ "mb-1 flex h-8 items-center px-2 text-xs font-medium text-sidebar-foreground/60 transition-[height,margin,opacity] group-data-[state=collapsed]/sidebar:mb-0 group-data-[state=collapsed]/sidebar:h-0 group-data-[state=collapsed]/sidebar:overflow-hidden group-data-[state=collapsed]/sidebar:opacity-0",
376
+ className
377
+ ),
378
+ ...props
379
+ }
380
+ );
381
+ }
382
+ function SidebarGroupContent({ className, ...props }) {
383
+ return /* @__PURE__ */ jsx(
384
+ "div",
385
+ {
386
+ "data-slot": "sidebar-group-content",
387
+ className: cn("w-full text-sm", className),
388
+ ...props
389
+ }
390
+ );
391
+ }
392
+ function SidebarSeparator({ className, ...props }) {
393
+ return /* @__PURE__ */ jsx(
394
+ Separator,
395
+ {
396
+ "data-slot": "sidebar-separator",
397
+ className: cn("mx-3 w-auto bg-sidebar-border", className),
398
+ ...props
399
+ }
400
+ );
401
+ }
402
+ function SidebarMenu({ className, ...props }) {
403
+ return /* @__PURE__ */ jsx(
404
+ "ul",
405
+ {
406
+ "data-slot": "sidebar-menu",
407
+ className: cn("flex w-full min-w-0 flex-col gap-1", className),
408
+ ...props
409
+ }
410
+ );
411
+ }
412
+ function SidebarMenuItem({ className, ...props }) {
413
+ return /* @__PURE__ */ jsx(
414
+ "li",
415
+ {
416
+ "data-slot": "sidebar-menu-item",
417
+ className: cn("group/menu-item relative", className),
418
+ ...props
419
+ }
420
+ );
421
+ }
422
+ var SidebarMenuButton = React.forwardRef(function SidebarMenuButton2({ asChild = false, isActive = false, tooltip, className, onClick, ...props }, ref) {
423
+ const { isMobile, open, setOpenMobile } = useSidebar();
424
+ const Comp = asChild ? Slot : "button";
425
+ const control = /* @__PURE__ */ jsx(
426
+ Comp,
427
+ {
428
+ ref,
429
+ "data-slot": "sidebar-menu-button",
430
+ "data-active": isActive,
431
+ className: cn(
432
+ "peer/menu-button flex min-h-11 w-full min-w-0 items-center gap-3 overflow-hidden rounded-md px-3 py-2 text-left text-sm font-medium outline-hidden transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 focus-visible:ring-sidebar-ring disabled:pointer-events-none disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground [&>svg]:size-5 [&>svg]:shrink-0 group-data-[state=collapsed]/sidebar:justify-center group-data-[state=collapsed]/sidebar:px-2 group-data-[state=collapsed]/sidebar:[&>span]:hidden",
433
+ className
434
+ ),
435
+ onClick: (event) => {
436
+ onClick?.(event);
437
+ if (!event.defaultPrevented && isMobile) setOpenMobile(false);
438
+ },
439
+ ...props
440
+ }
441
+ );
442
+ if (!tooltip || open || isMobile) return control;
443
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
444
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: control }),
445
+ /* @__PURE__ */ jsx(TooltipContent, { side: "right", align: "center", children: tooltip })
446
+ ] });
447
+ });
448
+ function SidebarMenuBadge({
449
+ children,
450
+ className,
451
+ placement = "overlay",
452
+ ...props
453
+ }) {
454
+ return /* @__PURE__ */ jsx(
455
+ CountBadge,
456
+ {
457
+ "data-slot": "sidebar-menu-badge",
458
+ value: children,
459
+ className: cn(
460
+ "pointer-events-none group-data-[state=collapsed]/sidebar:hidden",
461
+ placement === "overlay" && "absolute right-2 top-1/2 -translate-y-1/2",
462
+ className
463
+ ),
464
+ ...props
465
+ }
466
+ );
467
+ }
468
+
469
+ export {
470
+ useSidebar,
471
+ SidebarProvider,
472
+ Sidebar,
473
+ SidebarInset,
474
+ SidebarTrigger,
475
+ SidebarRail,
476
+ SidebarHeader,
477
+ SidebarBrand,
478
+ SidebarFooter,
479
+ SidebarFooterActions,
480
+ SidebarContent,
481
+ SidebarGroup,
482
+ SidebarGroupLabel,
483
+ SidebarGroupContent,
484
+ SidebarSeparator,
485
+ SidebarMenu,
486
+ SidebarMenuItem,
487
+ SidebarMenuButton,
488
+ SidebarMenuBadge
489
+ };
@@ -0,0 +1,42 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+ var _chunkKWLSBTB2cjs = require('./chunk-KWLSBTB2.cjs');
5
+
6
+ // src/primitives/marketing-header.tsx
7
+ var _jsxruntime = require('react/jsx-runtime');
8
+ function MarketingHeader({
9
+ brand,
10
+ links = [],
11
+ trailing,
12
+ renderLink,
13
+ variant = "default",
14
+ className
15
+ }) {
16
+ const link = (l) => {
17
+ const cls = variant === "mono" ? "font-mono text-xs uppercase tracking-[0.18em] text-muted-foreground transition-colors hover:text-foreground" : "text-sm text-muted-foreground transition-colors hover:text-foreground";
18
+ if (renderLink)
19
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: renderLink({ href: l.href, children: l.label, className: cls }) }, l.href);
20
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href: l.href, className: cls, children: l.label }, l.href);
21
+ };
22
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
23
+ "header",
24
+ {
25
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
26
+ "sticky top-0 z-50 border-b border-border bg-background/80 backdrop-blur-sm supports-[backdrop-filter]:bg-background/70",
27
+ className
28
+ ),
29
+ children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mx-auto flex w-full max-w-5xl items-center justify-between px-4 py-4 md:px-6", children: [
30
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center", children: brand }),
31
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "nav", { className: "flex items-center gap-3 md:gap-5", children: [
32
+ links.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "hidden items-center gap-5 sm:flex", children: links.map(link) }),
33
+ trailing && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center gap-2 md:gap-3", children: trailing })
34
+ ] })
35
+ ] })
36
+ }
37
+ );
38
+ }
39
+
40
+
41
+
42
+ exports.MarketingHeader = MarketingHeader;