@plexui/vue 0.3.0 → 0.4.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.
@@ -0,0 +1,89 @@
1
+ import { computed, defineComponent, h, inject, mergeProps, provide, ref, } from "vue";
2
+ import s from "@plexui/styles/components/Page/Page.module.css";
3
+ // A trackpad's small settle at the top must not flash the line.
4
+ const SCROLLED_AFTER = 4;
5
+ const PAGE_CONTEXT = Symbol("Page");
6
+ function usePageContext(part) {
7
+ const scrolled = inject(PAGE_CONTEXT, null);
8
+ if (!scrolled) {
9
+ throw new Error(`${part} must be used within Page`);
10
+ }
11
+ return scrolled;
12
+ }
13
+ const PageComponent = defineComponent({
14
+ name: "Page",
15
+ props: {
16
+ /**
17
+ * Width of the column that header and content share: `"full"` (edge to
18
+ * edge, for tables), `"wide"` (1280px, centred, for overviews) or `"column"`
19
+ * (768px, centred, for settings and forms). Set `--page-width` on the page
20
+ * for any other width.
21
+ * @default "full"
22
+ */
23
+ width: { type: String, default: "full" },
24
+ },
25
+ setup(props, { slots }) {
26
+ provide(PAGE_CONTEXT, ref(false));
27
+ return () => h("div", { "class": s.Page, "data-width": props.width }, slots.default?.());
28
+ },
29
+ });
30
+ export const Page = PageComponent;
31
+ /** The band above the content, one column with it (React `Page.Header`). */
32
+ export const PageHeader = defineComponent({
33
+ name: "PageHeader",
34
+ props: {
35
+ /**
36
+ * Shows the line, and the glass on a phone, once the content has scrolled
37
+ * under the header. Turn it off when the content already draws a line of
38
+ * its own at that place.
39
+ * @default true
40
+ */
41
+ divider: { type: Boolean, default: true },
42
+ },
43
+ setup(props, { slots }) {
44
+ const scrolled = usePageContext("PageHeader");
45
+ const line = computed(() => props.divider && scrolled.value);
46
+ return () => h("div", { "class": s.Header, "data-scrolled": line.value ? "" : undefined }, [
47
+ h("div", { class: s.Head }, slots.default?.()),
48
+ ]);
49
+ },
50
+ });
51
+ function part(name, tag, className) {
52
+ return defineComponent({
53
+ name,
54
+ setup(_, { slots }) {
55
+ return () => h(tag, { class: className }, slots.default?.());
56
+ },
57
+ });
58
+ }
59
+ /** The row of the title and the actions (React `Page.Bar`). */
60
+ export const PageBar = part("PageBar", "div", s.Bar);
61
+ /** Title with what stands beside it, a subtitle under it on a phone (React `Page.Heading`). */
62
+ export const PageHeading = part("PageHeading", "div", s.Heading);
63
+ /** Page heading, an `<h1>` (React `Page.Title`). */
64
+ export const PageTitle = part("PageTitle", "h1", s.Title);
65
+ /** Status of the page, a `<p>` (React `Page.Subtitle`). */
66
+ export const PageSubtitle = part("PageSubtitle", "p", s.Subtitle);
67
+ /** Buttons on the trailing side of the bar (React `Page.Actions`). */
68
+ export const PageActions = part("PageActions", "div", s.Actions);
69
+ /** The part of the page that scrolls (React `Page.Content`). */
70
+ export const PageContent = defineComponent({
71
+ name: "PageContent",
72
+ inheritAttrs: false,
73
+ props: {
74
+ /**
75
+ * The content fills the page and scrolls inside itself, as a table does:
76
+ * the page stops scrolling from 768px up.
77
+ * @default false
78
+ */
79
+ fill: { type: Boolean, default: false },
80
+ },
81
+ setup(props, { attrs, slots }) {
82
+ const scrolled = usePageContext("PageContent");
83
+ const onScroll = (event) => {
84
+ scrolled.value = event.currentTarget.scrollTop > SCROLLED_AFTER;
85
+ };
86
+ return () => h("div", mergeProps({ "class": s.Content, "data-fill": props.fill ? "" : undefined, onScroll }, attrs), [h("div", { class: s.Column }, slots.default?.())]);
87
+ },
88
+ });
89
+ //# sourceMappingURL=Page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../../src/components/Page/Page.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,UAAU,EACV,OAAO,EACP,GAAG,GAKJ,MAAM,KAAK,CAAA;AACZ,OAAO,CAAC,MAAM,gDAAgD,CAAA;AAQ9D,gEAAgE;AAChE,MAAM,cAAc,GAAG,CAAC,CAAA;AAExB,MAAM,YAAY,G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CAAC,CAAC,OAAO,CAAC,CAAA;AAEhE,gEAAgE;AAChE,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;IACzC,IAAI,EAAE,aAAa;IACnB,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE;QACL;;;;WAIG;QACH,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;KACxC;IACD,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;QAC3B,MAAM,QAAQ,GAAG,cAAc,CAAC,aAAa,CAAC,CAAA;QAE9C,MAAM,QAAQ,GAAG,CAAC,KAAY,EAAE,EAAE;YAChC,QAAQ,CAAC,KAAK,GAAI,KAAK,CAAC,aAA6B,CAAC,SAAS,GAAG,cAAc,CAAA;QAClF,CAAC,CAAA;QAED,OAAO,GAAG,EAAE,CACV,CAAC,CACC,KAAK,EACL,UAAU,CACR,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,EAC1E,KAAK,CACN,EACD,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CACnD,CAAA;IACL,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n inject,\n mergeProps,\n provide,\n ref,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport s from \"@plexui/styles/components/Page/Page.module.css\"\n\n// Vue port of packages/ui/src/components/Page/Page.tsx. Exports are flat\n// (`PageHeader` for `Page.Header`, ...). As in React, caller attributes are\n// applied after the page's own (`class` is merged), so they win.\n\nexport type PageWidth = \"full\" | \"wide\" | \"column\"\n\n// A trackpad's small settle at the top must not flash the line.\nconst SCROLLED_AFTER = 4\n\nconst PAGE_CONTEXT: InjectionKey<Ref<boolean>> = Symbol(\"Page\")\n\nfunction usePageContext(part: string): Ref<boolean> {\n const scrolled = inject(PAGE_CONTEXT, null)\n if (!scrolled) {\n throw new Error(`${part} must be used within Page`)\n }\n return scrolled\n}\n\nconst PageComponent = defineComponent({\n name: \"Page\",\n props: {\n /**\n * Width of the column that header and content share: `\"full\"` (edge to\n * edge, for tables), `\"wide\"` (1280px, centred, for overviews) or `\"column\"`\n * (768px, centred, for settings and forms). Set `--page-width` on the page\n * for any other width.\n * @default \"full\"\n */\n width: { type: String as PropType<PageWidth>, default: \"full\" },\n },\n setup(props, { slots }) {\n provide(PAGE_CONTEXT, ref(false))\n\n return () => h(\"div\", { \"class\": s.Page, \"data-width\": props.width }, slots.default?.())\n },\n})\n\n/** Props of `Page`. */\nexport type PageProps = { width?: PageWidth } & HTMLAttributes\n\nexport const Page = PageComponent as typeof PageComponent & { new (): { $props: PageProps } }\n\n/** The band above the content, one column with it (React `Page.Header`). */\nexport const PageHeader = defineComponent({\n name: \"PageHeader\",\n props: {\n /**\n * Shows the line, and the glass on a phone, once the content has scrolled\n * under the header. Turn it off when the content already draws a line of\n * its own at that place.\n * @default true\n */\n divider: { type: Boolean, default: true },\n },\n setup(props, { slots }) {\n const scrolled = usePageContext(\"PageHeader\")\n const line = computed(() => props.divider && scrolled.value)\n\n return () =>\n h(\"div\", { \"class\": s.Header, \"data-scrolled\": line.value ? \"\" : undefined }, [\n h(\"div\", { class: s.Head }, slots.default?.()),\n ])\n },\n})\n\nfunction part(name: string, tag: string, className: string) {\n return defineComponent({\n name,\n setup(_, { slots }) {\n return () => h(tag, { class: className }, slots.default?.())\n },\n })\n}\n\n/** The row of the title and the actions (React `Page.Bar`). */\nexport const PageBar = part(\"PageBar\", \"div\", s.Bar)\n/** Title with what stands beside it, a subtitle under it on a phone (React `Page.Heading`). */\nexport const PageHeading = part(\"PageHeading\", \"div\", s.Heading)\n/** Page heading, an `<h1>` (React `Page.Title`). */\nexport const PageTitle = part(\"PageTitle\", \"h1\", s.Title)\n/** Status of the page, a `<p>` (React `Page.Subtitle`). */\nexport const PageSubtitle = part(\"PageSubtitle\", \"p\", s.Subtitle)\n/** Buttons on the trailing side of the bar (React `Page.Actions`). */\nexport const PageActions = part(\"PageActions\", \"div\", s.Actions)\n\n/** The part of the page that scrolls (React `Page.Content`). */\nexport const PageContent = defineComponent({\n name: \"PageContent\",\n inheritAttrs: false,\n props: {\n /**\n * The content fills the page and scrolls inside itself, as a table does:\n * the page stops scrolling from 768px up.\n * @default false\n */\n fill: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n const scrolled = usePageContext(\"PageContent\")\n\n const onScroll = (event: Event) => {\n scrolled.value = (event.currentTarget as HTMLElement).scrollTop > SCROLLED_AFTER\n }\n\n return () =>\n h(\n \"div\",\n mergeProps(\n { \"class\": s.Content, \"data-fill\": props.fill ? \"\" : undefined, onScroll },\n attrs,\n ),\n [h(\"div\", { class: s.Column }, slots.default?.())],\n )\n },\n})\n\n/** Props of the Page parts: native attributes of their element. */\nexport type PageSlotProps = HTMLAttributes\n"]}
@@ -0,0 +1,2 @@
1
+ export { Page, PageActions, PageBar, PageContent, PageHeader, PageHeading, PageSubtitle, PageTitle, } from "./Page.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,WAAW,EACX,OAAO,EACP,WAAW,EACX,UAAU,EACV,WAAW,EACX,YAAY,EACZ,SAAS,GAIV,MAAM,WAAW,CAAA","sourcesContent":["export {\n Page,\n PageActions,\n PageBar,\n PageContent,\n PageHeader,\n PageHeading,\n PageSubtitle,\n PageTitle,\n type PageProps,\n type PageSlotProps,\n type PageWidth,\n} from \"./Page.js\"\n"]}
@@ -214,6 +214,8 @@ export const SidebarMenuItem = SidebarMenuItemComponent;
214
214
  // =============================================
215
215
  // Menu Button
216
216
  // =============================================
217
+ // Shared by every row of the rail: moving to the next one shows its label at once.
218
+ let railLeftAt = 0;
217
219
  const SidebarMenuButtonComponent = defineComponent({
218
220
  name: "SidebarMenuButton",
219
221
  inheritAttrs: false,
@@ -230,14 +232,24 @@ const SidebarMenuButtonComponent = defineComponent({
230
232
  },
231
233
  setup(props, { attrs, slots }) {
232
234
  const sidebar = useSidebar();
235
+ const openDelay = ref();
233
236
  return () => {
234
237
  const { className, rest } = cleanAttrs(attrs);
238
+ const hasTooltip = !!(props.tooltip || slots.tooltip);
235
239
  const ownProps = {
236
240
  "data-active": props.isActive ? "true" : "false",
237
241
  "aria-current": props.isActive ? "page" : undefined,
238
242
  "class": [s.MenuButton, className],
239
243
  ...rest,
240
244
  };
245
+ if (hasTooltip) {
246
+ ownProps.onPointerenter = composeEventHandlers(rest.onPointerenter, () => {
247
+ openDelay.value = Date.now() - railLeftAt < 300 ? 0 : undefined;
248
+ });
249
+ ownProps.onPointerleave = composeEventHandlers(rest.onPointerleave, () => {
250
+ railLeftAt = Date.now();
251
+ });
252
+ }
241
253
  const content = slots.default?.();
242
254
  const wrap = (children) => h("span", { class: s.MenuButtonInner }, children);
243
255
  let button;
@@ -253,9 +265,11 @@ const SidebarMenuButtonComponent = defineComponent({
253
265
  else {
254
266
  button = h("button", ownProps, [wrap(content)]);
255
267
  }
256
- // Show tooltip when collapsed (icon mode) and not mobile
257
- if ((props.tooltip || slots.tooltip) && sidebar.state === "collapsed" && !sidebar.isMobile) {
258
- return h(Tooltip, { content: props.tooltip, side: "right" }, { default: () => button, ...(slots.tooltip ? { content: slots.tooltip } : {}) });
268
+ // The tooltip shows when collapsed (icon mode) and not on mobile. It wraps
269
+ // the row in every state, so the row stays mounted and its label can fade.
270
+ if (hasTooltip) {
271
+ const shown = sidebar.state === "collapsed" && !sidebar.isMobile;
272
+ return h(Tooltip, { content: shown ? props.tooltip : null, openDelay: openDelay.value, side: "right" }, { default: () => button, ...(slots.tooltip && shown ? { content: slots.tooltip } : {}) });
259
273
  }
260
274
  return button;
261
275
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../../../../src/components/Sidebar/Sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,eAAe,EACf,SAAS,EACT,GAAG,EACH,IAAI,GAUL,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,IAAI,UAAU,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAA;AACvF,OAAO,EAAE,KAAK,EAAmB,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACzG,OAAO,CAAC,MAAM,sDAAsD,CAAA;AACpE,OAAO,EACL,eAAe,EACf,UAAU,GAIX,MAAM,wBAAwB,CAAA;AAE/B,0EAA0E;AAC1E,2EAA2E;AAC3E,6EAA6E;AAC7E,0EAA0E;AAC1E,+EAA+E;AAC/E,0EAA0E;AAC1E,6EAA6E;AAC7E,QAAQ;AACR,2EAA2E;AAC3E,2EAA2E;AAC3E,yEAAyE;AACzE,yEAAyE;AACzE,6DAA6D;AAC7D,oEAAoE;AACpE,2EAA2E;AAC3E,qDAAqD;AACrD,8DAA8D;AAC9D,2EAA2E;AAE3E,oCAAoC;AACpC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,CAAA;AAKtC,4EAA4E;AAC5E,MAAM,UAAU,GAAG,CAAC,KAAY,EAAE,EAAE;IAClC,MAAM,EAAE,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAA;IAC7D,OA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c;IACpB,YAAY,EAAE,KAAK;IACnB,KAAK,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE;QACpC,sBAAsB;QACtB,MAAM,cAAc,GAAG,GAAG,CAA+D,IAAI,CAAC,CAAA;QAE9F,MAAM,CAAC;YACL,KAAK,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE;YAC1C,KAAK,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,IAAI,IAAI,CAAC;SAC3D,CAAC,CAAA;QAEF,OAAO,GAAG,EAAE;YACV,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,CAAA;YAC7C,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE;gBAClC,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,cAAc,EAAE,EAClD,EAAE,GAAG,KAAK,EAAE,cAAc,EAAE,KAAK,CAAC,cAAc,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,CAC5E;aACF,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAA4B,CAAA;AAQ7B,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAA0B,oBAAoB,EAAE,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n onBeforeUnmount,\n onMounted,\n ref,\n Text,\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type DefineComponent,\n type HTMLAttributes,\n type LiHTMLAttributes,\n type PropType,\n type Slots,\n type VNode,\n type VNodeArrayChildren,\n} from \"vue\"\nimport { Button } from \"../Button/index.js\"\nimport { ChevronRightMd, Search as SearchIcon, SidebarLeft, X } from \"../Icon/index.js\"\nimport { Input, type InputProps } from \"../Input/index.js\"\nimport { Tooltip } from \"../Tooltip/index.js\"\nimport { composeEventHandlers, firstElementChild, flattenSlot, mergeSlotProps } from \"../Tooltip/slot.js\"\nimport s from \"@plexui/styles/components/Sidebar/Sidebar.module.css\"\nimport {\n SidebarProvider,\n useSidebar,\n type SidebarCollapsible,\n type SidebarSide,\n type SidebarVariant,\n} from \"./useSidebarContext.js\"\n\n// Vue port of packages/ui/src/components/Sidebar/Sidebar.tsx. Exports are\n// flat, as in React's index. Every part renders its React element with the\n// caller's attributes applied after its own (React spreads `...props` last),\n// so a caller's attribute or listener replaces the part's own. `class` is\n// merged. An `@click` on SidebarTrigger or SidebarMobileMenuButton runs before\n// the toggle and cancels it with `preventDefault()`, as `onClick` does in\n// React. `data-toggle` (injected by MDX) is dropped, as React's `cleanProps`\n// does.\n// - `asChild` (SidebarGroupLabel, SidebarMenuButton, SidebarMenuSubButton)\n// merges into the first element of the default slot the way Radix's Slot\n// does. SidebarMenuButton puts its inner `<span>` inside that element,\n// around the element's own content, as React clones it; with no single\n// element child it merges into the inner `<span>` instead.\n// - ReactNode props are slots: SidebarMenuButton `tooltip` (prop or\n// `#tooltip` slot), SidebarTrigger's icon (default slot), SidebarInput's\n// `startAdornment` (slot, Search icon by default).\n// - Parts whose React children are fixed (SidebarMenuChevron,\n// SidebarMenuSkeleton, SidebarMobileMenuButton) ignore the default slot.\n\n// Re-export provider and composable\nexport { SidebarProvider, useSidebar }\nexport type { SidebarCollapsible, SidebarSide, SidebarVariant }\n\ntype Attrs = Record<string, unknown>\n\n// Filter out attributes that shouldn't reach the DOM (e.g. injected by MDX)\nconst cleanAttrs = (attrs: Attrs) => {\n const { \"data-toggle\": _, class: className, ...rest } = attrs\n return { className, rest }\n}\n\n// An explicit type keeps the published declaration on Vue's `DefineComponent`\n// alias; an inferred one is expanded there and fails consumers' type checks\n// (`GlobalComponents` against `Record<string, Component>`, TS2344).\ntype Part<A> = DefineComponent & { new (): { $props: A } }\n\n/** A part that renders one element with its class and the caller's attributes. */\nconst part = <A>(name: string, tag: string, className: string | undefined): Part<A> => {\n const component = defineComponent({\n name,\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { className: userClass, rest } = cleanAttrs(attrs)\n return h(tag, { ...rest, class: [className, userClass] }, slots.default?.())\n }\n },\n })\n return component as unknown as Part<A>\n}\n\n// =============================================\n// Sidebar Root\n// =============================================\n\nconst SidebarComponent = defineComponent({\n name: \"Sidebar\",\n inheritAttrs: false,\n props: {\n /** The side the sidebar is on. @default \"left\" */\n side: { type: String as PropType<SidebarSide>, default: \"left\" },\n /** The visual variant of the sidebar. @default \"sidebar\" */\n variant: { type: String as PropType<SidebarVariant>, default: \"sidebar\" },\n },\n setup(props, { attrs, slots }) {\n const sidebar = useSidebar()\n\n return () => {\n // Skip rendering sidebar on mobile for offcanvas mode\n if (sidebar.isMobile && sidebar.collapsible === \"offcanvas\") {\n return null\n }\n\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"aside\",\n { \"data-side\": props.side, \"data-variant\": props.variant, \"class\": [s.Sidebar, className], ...rest },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarProps = InstanceType<typeof SidebarComponent>[\"$props\"] & HTMLAttributes\n\n/** The sidebar container, an `<aside>`. Renders nothing on mobile in offcanvas mode. */\nexport const Sidebar = SidebarComponent as typeof SidebarComponent & { new (): { $props: SidebarProps } }\n\n// =============================================\n// Sidebar Sections\n// =============================================\n\nexport type SidebarHeaderProps = HTMLAttributes\n\n/** Sticky top area of the sidebar. */\nexport const SidebarHeader = part<SidebarHeaderProps>(\"SidebarHeader\", \"div\", s.Header)\n\nexport type SidebarContentProps = HTMLAttributes\n\n/**\n * Scrollable content area. Sets `data-content-scrollable` on the sidebar\n * while its content overflows.\n */\nexport const SidebarContent = defineComponent({\n name: \"SidebarContent\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n const contentEl = ref<HTMLDivElement | null>(null)\n let observer: ResizeObserver | undefined\n\n onMounted(() => {\n const el = contentEl.value\n if (!el) return\n const sidebar = el.parentElement\n if (!sidebar) return\n\n const update = () => {\n const hasOverflow = el.scrollHeight > el.clientHeight\n sidebar.setAttribute(\"data-content-scrollable\", hasOverflow ? \"true\" : \"false\")\n }\n update()\n observer = new ResizeObserver(update)\n observer.observe(el)\n })\n onBeforeUnmount(() => observer?.disconnect())\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { ref: contentEl, class: [s.Content, className], ...rest }, slots.default?.())\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarContentProps>>\n\nexport type SidebarFooterProps = HTMLAttributes\n\n/** Sticky bottom area of the sidebar, with a separator line on top. */\nexport const SidebarFooter = defineComponent({\n name: \"SidebarFooter\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { class: [s.Footer, className], ...rest }, [\n h(\"div\", { class: s.FooterSeparator }),\n slots.default?.(),\n ])\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarFooterProps>>\n\nexport type SidebarRailProps = HTMLAttributes\n\nexport const SidebarRail = part<SidebarRailProps>(\"SidebarRail\", \"div\", s.Rail)\n\n// =============================================\n// Groups\n// =============================================\n\nconst SidebarGroupComponent = defineComponent({\n name: \"SidebarGroup\",\n inheritAttrs: false,\n props: {\n /** Whether the group is open initially. A closed group hides its `SidebarGroupContent`. @default true */\n defaultOpen: { type: Boolean, default: true },\n /** Controlled open state. The group has no toggle of its own: change `open` from your own control. */\n open: { type: Boolean, default: undefined },\n },\n setup(props, { attrs, slots }) {\n // The initial value only, like an uncontrolled input's defaultValue\n const internalOpen = ref(props.defaultOpen)\n\n return () => {\n const open = props.open ?? internalOpen.value\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"div\",\n { \"data-state\": open ? \"open\" : \"closed\", \"class\": [s.Group, className], ...rest },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarGroupProps = InstanceType<typeof SidebarGroupComponent>[\"$props\"] & HTMLAttributes\n\n/** Section within the content. `data-state` follows `open` / `defaultOpen`. */\nexport const SidebarGroup = SidebarGroupComponent as typeof SidebarGroupComponent & {\n new (): { $props: SidebarGroupProps }\n}\n\n/** Radix Slot: the first element of the slot, with `slotProps` merged in. */\nconst renderAsChild = (children: VNodeArrayChildren | undefined, slotProps: Attrs) => {\n const child = firstElementChild(children)\n return child ? mergeSlotProps(child, slotProps) : null\n}\n\n/**\n * React's `cloneElement(child, undefined, wrap(child.props.children))`: the\n * same element (key and ref kept) with its content, or its default slot for a\n * component such as RouterLink, passed through `wrap`.\n */\nconst wrapChildContent = (child: VNode, wrap: (content: VNodeArrayChildren | undefined) => VNode): VNode => {\n const content = child.children\n let children: VNodeArrayChildren | Slots\n if (content && typeof content === \"object\" && !Array.isArray(content)) {\n // Drop the compiled-slots flag so the new default slot is always used\n const { _: _compiled, ...slotFns } = content as Slots & { _?: unknown }\n children = { ...slotFns, default: () => [wrap(slotFns.default?.())] }\n } else {\n children = [wrap(typeof content === \"string\" ? [content] : (content ?? undefined))]\n }\n return h(child.type as string, { ...child.props, key: child.key ?? undefined, ref: child.ref as never }, children as never)\n}\n\nconst SidebarGroupLabelComponent = defineComponent({\n name: \"SidebarGroupLabel\",\n inheritAttrs: false,\n props: {\n /** Merges into the slot's first element instead of rendering a `<span>`. @default false */\n asChild: { type: Boolean, default: false },\n /**\n * Size variant for the label.\n * - \"sm\": Compact style for dashboard/settings sidebars\n * - \"lg\": Documentation style with larger text and more spacing\n * @default \"lg\"\n */\n size: { type: String as PropType<\"sm\" | \"lg\">, default: \"lg\" },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const ownProps = { \"data-size\": props.size, \"class\": [s.GroupLabel, className], ...rest }\n return props.asChild ? renderAsChild(slots.default?.(), ownProps) : h(\"span\", ownProps, slots.default?.())\n }\n },\n})\n\nexport type SidebarGroupLabelProps = InstanceType<typeof SidebarGroupLabelComponent>[\"$props\"] & HTMLAttributes\n\n/** Section label within a SidebarGroup. */\nexport const SidebarGroupLabel = SidebarGroupLabelComponent as typeof SidebarGroupLabelComponent & {\n new (): { $props: SidebarGroupLabelProps }\n}\n\nexport type SidebarGroupActionProps = HTMLAttributes\n\nexport const SidebarGroupAction = part<SidebarGroupActionProps>(\"SidebarGroupAction\", \"div\", s.GroupAction)\n\nexport type SidebarGroupContentProps = HTMLAttributes\n\nexport const SidebarGroupContent = part<SidebarGroupContentProps>(\"SidebarGroupContent\", \"div\", s.GroupContent)\n\n// =============================================\n// Menu\n// =============================================\n\nexport type SidebarMenuProps = HTMLAttributes\n\n/** Navigation menu, a `<ul>`. */\nexport const SidebarMenu = part<SidebarMenuProps>(\"SidebarMenu\", \"ul\", s.Menu)\n\nconst SidebarMenuItemComponent = defineComponent({\n name: \"SidebarMenuItem\",\n inheritAttrs: false,\n props: {\n /** Marks the item as expanded (`data-expanded`), for chevrons and sub menus. */\n expanded: { type: Boolean, default: undefined },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"li\",\n { \"data-expanded\": props.expanded ? \"true\" : undefined, \"class\": [s.MenuItem, className], ...rest },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarMenuItemProps = InstanceType<typeof SidebarMenuItemComponent>[\"$props\"] & LiHTMLAttributes\n\n/** Menu item, an `<li>`. */\nexport const SidebarMenuItem = SidebarMenuItemComponent as typeof SidebarMenuItemComponent & {\n new (): { $props: SidebarMenuItemProps }\n}\n\n// =============================================\n// Menu Button\n// =============================================\n\nconst SidebarMenuButtonComponent = defineComponent({\n name: \"SidebarMenuButton\",\n inheritAttrs: false,\n props: {\n /** Whether the button is in an active/highlighted state. @default false */\n isActive: { type: Boolean, default: false },\n /**\n * Optional tooltip to show when the sidebar is collapsed (or the\n * `#tooltip` slot). Hidden on mobile.\n */\n tooltip: String,\n /** Whether to render the button as a custom element via Slot. @default false */\n asChild: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n const sidebar = useSidebar()\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const ownProps = {\n \"data-active\": props.isActive ? \"true\" : \"false\",\n \"aria-current\": props.isActive ? \"page\" : undefined,\n \"class\": [s.MenuButton, className],\n ...rest,\n }\n const content = slots.default?.()\n const wrap = (children: VNodeArrayChildren | undefined) => h(\"span\", { class: s.MenuButtonInner }, children)\n let button: VNode\n if (props.asChild) {\n // With asChild the child element is the button, so the inner wrapper\n // goes inside it. Wrapping the child instead would merge the button\n // attributes onto the wrapper span.\n // A lone text child is wrapped below rather than slotted\n const nodes = flattenSlot(content)\n const child = nodes.length === 1 && nodes[0].type !== Text ? nodes[0] : undefined\n button = mergeSlotProps(child ? wrapChildContent(child, wrap) : wrap(content), ownProps)\n } else {\n button = h(\"button\", ownProps, [wrap(content)])\n }\n\n // Show tooltip when collapsed (icon mode) and not mobile\n if ((props.tooltip || slots.tooltip) && sidebar.state === \"collapsed\" && !sidebar.isMobile) {\n return h(\n Tooltip,\n { content: props.tooltip, side: \"right\" },\n { default: () => button, ...(slots.tooltip ? { content: slots.tooltip } : {}) },\n )\n }\n\n return button\n }\n },\n})\n\nexport type SidebarMenuButtonProps = InstanceType<typeof SidebarMenuButtonComponent>[\"$props\"] & ButtonHTMLAttributes\n\n/** Menu item button. Shows its `tooltip` when the sidebar is collapsed to icons. */\nexport const SidebarMenuButton = SidebarMenuButtonComponent as typeof SidebarMenuButtonComponent & {\n new (): { $props: SidebarMenuButtonProps }\n}\n\n// =============================================\n// Menu Button Parts\n// =============================================\n\nexport type SidebarMenuButtonIconProps = HTMLAttributes\n\nexport const SidebarMenuButtonIcon = part<SidebarMenuButtonIconProps>(\n \"SidebarMenuButtonIcon\",\n \"span\",\n s.MenuButtonIcon,\n)\n\nconst SidebarMenuButtonLabelComponent = defineComponent({\n name: \"SidebarMenuButtonLabel\",\n inheritAttrs: false,\n props: {\n /** Shorter label rendered next to the full one (`data-short-label`). */\n shortLabel: String,\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return [\n h(\n \"span\",\n { \"data-long-label\": \"true\", \"class\": [s.MenuButtonLabel, className], ...rest },\n slots.default?.(),\n ),\n props.shortLabel\n ? h(\"span\", { \"data-short-label\": \"true\", \"class\": [s.MenuButtonLabel, className] }, props.shortLabel)\n : null,\n ]\n }\n },\n})\n\nexport type SidebarMenuButtonLabelProps = InstanceType<typeof SidebarMenuButtonLabelComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMenuButtonLabel = SidebarMenuButtonLabelComponent as typeof SidebarMenuButtonLabelComponent & {\n new (): { $props: SidebarMenuButtonLabelProps }\n}\n\n// =============================================\n// Menu Chevron (Expand/Collapse Toggle)\n// =============================================\n\nexport type SidebarMenuChevronProps = HTMLAttributes\n\nexport const SidebarMenuChevron = defineComponent({\n name: \"SidebarMenuChevron\",\n inheritAttrs: false,\n setup(_props, { attrs }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"span\", { class: [s.MenuChevron, className], ...rest }, [h(ChevronRightMd)])\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarMenuChevronProps>>\n\n// =============================================\n// Menu Badge & Action\n// =============================================\n\nexport type SidebarMenuBadgeProps = HTMLAttributes\n\nexport const SidebarMenuBadge = part<SidebarMenuBadgeProps>(\"SidebarMenuBadge\", \"span\", s.MenuBadge)\n\nexport type SidebarMenuActionProps = HTMLAttributes\n\nexport const SidebarMenuAction = part<SidebarMenuActionProps>(\"SidebarMenuAction\", \"div\", s.MenuAction)\n\n// =============================================\n// Menu Skeleton\n// =============================================\n\nconst SidebarMenuSkeletonComponent = defineComponent({\n name: \"SidebarMenuSkeleton\",\n inheritAttrs: false,\n props: {\n /** Renders the icon placeholder. @default true */\n showIcon: { type: Boolean, default: true },\n /** Width of the label skeleton (e.g., \"60%\", \"80%\", \"100px\"). @default \"60%\" */\n labelWidth: { type: String, default: \"60%\" },\n },\n setup(props, { attrs }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { \"data-skeleton\": \"true\", \"class\": [s.MenuSkeleton, className], ...rest }, [\n props.showIcon ? h(\"div\", { class: s.MenuSkeletonIcon }) : null,\n h(\"div\", { class: s.MenuSkeletonLabel, style: { width: props.labelWidth } }),\n ])\n }\n },\n})\n\nexport type SidebarMenuSkeletonProps = InstanceType<typeof SidebarMenuSkeletonComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMenuSkeleton = SidebarMenuSkeletonComponent as typeof SidebarMenuSkeletonComponent & {\n new (): { $props: SidebarMenuSkeletonProps }\n}\n\n// =============================================\n// Submenu\n// =============================================\n\nconst SidebarMenuSubComponent = defineComponent({\n name: \"SidebarMenuSub\",\n inheritAttrs: false,\n props: {\n /** Whether the submenu is expanded. @default true */\n open: { type: Boolean, default: true },\n /**\n * When true, child items align with parent text that has icons.\n * This adjusts the padding so level 2 text aligns with level 1 text.\n * @default false\n */\n hasIcons: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"ul\",\n {\n \"data-state\": props.open ? \"open\" : \"closed\",\n \"data-has-icons\": props.hasIcons ? \"true\" : undefined,\n // Collapsed items are only hidden visually: keep them out of the tab\n // order. \"\" renders `inert=\"\"` (a DOM property in browsers)\n \"inert\": props.open ? undefined : \"\",\n \"class\": [s.MenuSub, className],\n ...rest,\n },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarMenuSubProps = InstanceType<typeof SidebarMenuSubComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMenuSub = SidebarMenuSubComponent as typeof SidebarMenuSubComponent & {\n new (): { $props: SidebarMenuSubProps }\n}\n\nexport type SidebarMenuSubItemProps = LiHTMLAttributes\n\nexport const SidebarMenuSubItem = part<SidebarMenuSubItemProps>(\"SidebarMenuSubItem\", \"li\", s.MenuSubItem)\n\nconst SidebarMenuSubButtonComponent = defineComponent({\n name: \"SidebarMenuSubButton\",\n inheritAttrs: false,\n props: {\n /** Whether the button is in an active/highlighted state. @default false */\n isActive: { type: Boolean, default: false },\n /** Merges into the slot's first element instead of rendering a `<button>`. @default false */\n asChild: { type: Boolean, default: false },\n /**\n * Indent level for nested items (0-3).\n * Each level adds 12px of left margin.\n * @default 0\n */\n indent: { type: Number as PropType<0 | 1 | 2 | 3>, default: 0 },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const ownProps = {\n \"data-active\": props.isActive ? \"true\" : \"false\",\n \"aria-current\": props.isActive ? \"page\" : undefined,\n \"class\": [s.MenuSubButton, s[`indent${props.indent}`], className],\n ...rest,\n }\n return props.asChild ? renderAsChild(slots.default?.(), ownProps) : h(\"button\", ownProps, slots.default?.())\n }\n },\n})\n\nexport type SidebarMenuSubButtonProps = InstanceType<typeof SidebarMenuSubButtonComponent>[\"$props\"] & ButtonHTMLAttributes\n\nexport const SidebarMenuSubButton = SidebarMenuSubButtonComponent as typeof SidebarMenuSubButtonComponent & {\n new (): { $props: SidebarMenuSubButtonProps }\n}\n\n// =============================================\n// Separator\n// =============================================\n\nexport type SidebarSeparatorProps = HTMLAttributes\n\nexport const SidebarSeparator = defineComponent({\n name: \"SidebarSeparator\",\n inheritAttrs: false,\n setup(_props, { attrs }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"hr\", { class: [s.Separator, className], ...rest })\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarSeparatorProps>>\n\n// =============================================\n// Card\n// =============================================\n\nconst SidebarCardComponent = defineComponent({\n name: \"SidebarCard\",\n inheritAttrs: false,\n props: {\n /** Visual variant. @default \"default\" */\n variant: { type: String as PropType<\"default\" | \"elevated\">, default: \"default\" },\n /** Shows a dismiss button. @default false */\n dismissible: { type: Boolean, default: false },\n },\n emits: {\n /** The dismiss button was clicked */\n dismiss: (_event: MouseEvent) => true,\n },\n setup(props, { attrs, slots, emit }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { \"data-variant\": props.variant, \"class\": [s.Card, className], ...rest }, [\n props.dismissible\n ? h(\n Button,\n {\n \"uniform\": true,\n \"size\": \"3xs\",\n \"variant\": \"ghost\",\n \"color\": \"secondary\",\n \"class\": s.CardDismiss,\n \"onClick\": (event: MouseEvent) => emit(\"dismiss\", event),\n \"aria-label\": \"Dismiss\",\n },\n { default: () => h(X) },\n )\n : null,\n slots.default?.(),\n ])\n }\n },\n})\n\nexport type SidebarCardProps = InstanceType<typeof SidebarCardComponent>[\"$props\"] & HTMLAttributes\n\n/** Promotional card for CTAs, upgrades or announcements. */\nexport const SidebarCard = SidebarCardComponent as typeof SidebarCardComponent & {\n new (): { $props: SidebarCardProps }\n}\n\nexport type SidebarCardHeaderProps = HTMLAttributes\n\nexport const SidebarCardHeader = part<SidebarCardHeaderProps>(\"SidebarCardHeader\", \"div\", s.CardHeader)\n\nexport type SidebarCardTitleProps = HTMLAttributes\n\nexport const SidebarCardTitle = part<SidebarCardTitleProps>(\"SidebarCardTitle\", \"div\", s.CardTitle)\n\nexport type SidebarCardTitleLinkProps = AnchorHTMLAttributes\n\nexport const SidebarCardTitleLink = defineComponent({\n name: \"SidebarCardTitleLink\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"a\", { class: [s.CardTitleLink, className], ...rest }, [\n slots.default?.(),\n h(ChevronRightMd, { class: s.CardTitleChevron }),\n ])\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarCardTitleLinkProps>>\n\nexport type SidebarCardContentProps = HTMLAttributes\n\nexport const SidebarCardContent = part<SidebarCardContentProps>(\"SidebarCardContent\", \"div\", s.CardContent)\n\nexport type SidebarCardFooterProps = HTMLAttributes\n\nexport const SidebarCardFooter = part<SidebarCardFooterProps>(\"SidebarCardFooter\", \"div\", s.CardFooter)\n\n// =============================================\n// Inset (Main Content Area)\n// =============================================\n\nexport type SidebarInsetProps = HTMLAttributes\n\n/** Main content area next to the sidebar, a `<main>`. */\nexport const SidebarInset = part<SidebarInsetProps>(\"SidebarInset\", \"main\", s.Inset)\n\n// =============================================\n// Layout Container\n// =============================================\n\nexport type SidebarLayoutProps = HTMLAttributes\n\n/** Wrapper for the sidebar and the main content. */\nexport const SidebarLayout = part<SidebarLayoutProps>(\"SidebarLayout\", \"div\", s.SidebarLayout)\n\n// =============================================\n// Trigger (Collapse Button)\n// =============================================\n\nexport type SidebarTriggerProps = ButtonHTMLAttributes\n\n/**\n * Collapse button. The default slot replaces the icon. Renders nothing when\n * `collapsible=\"none\"`.\n */\nexport const SidebarTrigger = defineComponent({\n name: \"SidebarTrigger\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n const sidebar = useSidebar()\n\n return () => {\n // Don't render if collapsible=\"none\" (text-only sidebars)\n if (sidebar.collapsible === \"none\") {\n return null\n }\n\n const { className, rest } = cleanAttrs(attrs)\n const { onClick, ...others } = rest\n return h(\n \"button\",\n {\n \"type\": \"button\",\n \"class\": [s.Trigger, className],\n // The caller's listener runs first and can cancel the toggle\n \"onClick\": composeEventHandlers(onClick, () => sidebar.toggleSidebar()),\n \"aria-label\": sidebar.isMobile\n ? \"Open menu\"\n : sidebar.state === \"expanded\"\n ? \"Collapse sidebar\"\n : \"Expand sidebar\",\n ...others,\n },\n [\n h(\"span\", { class: s.TriggerInner }, [\n // Default icon (same for both states, as per reference)\n h(\"span\", { class: s.TriggerIcon }, slots.default ? slots.default() : [h(SidebarLeft)]),\n ]),\n ],\n )\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarTriggerProps>>\n\n// =============================================\n// Mobile Menu Button (Hamburger → X)\n// =============================================\n\nexport type SidebarMobileMenuButtonProps = ButtonHTMLAttributes\n\nexport const SidebarMobileMenuButton = defineComponent({\n name: \"SidebarMobileMenuButton\",\n inheritAttrs: false,\n setup(_props, { attrs }) {\n const sidebar = useSidebar()\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const { onClick, ...others } = rest\n return h(\n \"button\",\n {\n \"type\": \"button\",\n \"data-expanded\": sidebar.openMobile ? \"\" : undefined,\n \"class\": [s.MobileMenuButton, className],\n // The caller's listener runs first and can cancel the toggle\n \"onClick\": composeEventHandlers(onClick, () => sidebar.setOpenMobile(!sidebar.openMobile)),\n \"aria-label\": sidebar.openMobile ? \"Close menu\" : \"Open menu\",\n ...others,\n },\n [\n h(\"span\", { class: s.MobileMenuIcon }, [\n h(\"span\", { \"class\": s.MobileMenuLine, \"data-top\": \"true\" }),\n h(\"span\", { class: s.MobileMenuMiddle }, [h(\"span\", { \"class\": s.MobileMenuLine, \"data-bottom\": \"true\" })]),\n ]),\n ],\n )\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarMobileMenuButtonProps>>\n\n// =============================================\n// Mobile Sidebar\n// =============================================\n\nconst SidebarMobileComponent = defineComponent({\n name: \"SidebarMobile\",\n inheritAttrs: false,\n props: {\n /** When true, drawer is positioned absolute instead of fixed (for contained demos) */\n contained: { type: Boolean, default: undefined },\n },\n setup(props, { attrs, slots }) {\n const sidebar = useSidebar()\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const contained = props.contained && s.contained\n return [\n // Backdrop\n h(\"div\", {\n \"class\": [s.MobileBackdrop, contained],\n \"onClick\": () => sidebar.setOpenMobile(false),\n \"aria-hidden\": \"true\",\n }),\n // Drawer\n h(\"div\", { class: [s.MobileSidebar, contained, className], ...rest }, slots.default?.()),\n ]\n }\n },\n})\n\nexport type SidebarMobileProps = InstanceType<typeof SidebarMobileComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMobile = SidebarMobileComponent as typeof SidebarMobileComponent & {\n new (): { $props: SidebarMobileProps }\n}\n\nexport type SidebarMobileHeaderProps = HTMLAttributes\n\nexport const SidebarMobileHeader = part<SidebarMobileHeaderProps>(\"SidebarMobileHeader\", \"div\", s.MobileHeader)\n\nexport type SidebarMobileFooterProps = HTMLAttributes\n\nexport const SidebarMobileFooter = part<SidebarMobileFooterProps>(\"SidebarMobileFooter\", \"div\", s.MobileFooter)\n\n// =============================================\n// Input (Search)\n// =============================================\n\nexport type SidebarInputProps = InputProps\n\n/**\n * Search input: an Input with a Search icon in its `startAdornment` slot.\n * Every attribute, listener and slot goes to the Input (`v-model:value`,\n * `@clear`, ...). A template ref gets the Input's `focus()` and `input`\n * (React forwards its ref to the <input>).\n */\nexport const SidebarInput = defineComponent({\n name: \"SidebarInput\",\n inheritAttrs: false,\n setup(_props, { attrs, slots, expose }) {\n // Input's exposed API\n const inputComponent = ref<{ input: HTMLInputElement | null; focus: () => void } | null>(null)\n\n expose({\n focus: () => inputComponent.value?.focus(),\n input: computed(() => inputComponent.value?.input ?? null),\n })\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { class: s.Input }, [\n h(\n Input,\n { class: className, ...rest, ref: inputComponent },\n { ...slots, startAdornment: slots.startAdornment ?? (() => h(SearchIcon)) },\n ),\n ])\n }\n },\n}) as unknown as typeof Input\n\n// =============================================\n// Footer Links\n// =============================================\n\nexport type SidebarFooterLinksProps = HTMLAttributes\n\nexport const SidebarFooterLinks = part<SidebarFooterLinksProps>(\"SidebarFooterLinks\", \"div\", s.FooterLinks)\n"]}
1
+ {"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../../../../src/components/Sidebar/Sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,eAAe,EACf,SAAS,EACT,GAAG,EACH,IAAI,GAUL,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,IAAI,UAAU,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAA;AACvF,OAAO,EAAE,KAAK,EAAmB,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,q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\n ref,\n Text,\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type DefineComponent,\n type HTMLAttributes,\n type LiHTMLAttributes,\n type PropType,\n type Slots,\n type VNode,\n type VNodeArrayChildren,\n} from \"vue\"\nimport { Button } from \"../Button/index.js\"\nimport { ChevronRightMd, Search as SearchIcon, SidebarLeft, X } from \"../Icon/index.js\"\nimport { Input, type InputProps } from \"../Input/index.js\"\nimport { Tooltip } from \"../Tooltip/index.js\"\nimport { composeEventHandlers, firstElementChild, flattenSlot, mergeSlotProps } from \"../Tooltip/slot.js\"\nimport s from \"@plexui/styles/components/Sidebar/Sidebar.module.css\"\nimport {\n SidebarProvider,\n useSidebar,\n type SidebarCollapsible,\n type SidebarSide,\n type SidebarProviderVariant,\n type SidebarVariant,\n} from \"./useSidebarContext.js\"\n\n// Vue port of packages/ui/src/components/Sidebar/Sidebar.tsx. Exports are\n// flat, as in React's index. Every part renders its React element with the\n// caller's attributes applied after its own (React spreads `...props` last),\n// so a caller's attribute or listener replaces the part's own. `class` is\n// merged. An `@click` on SidebarTrigger or SidebarMobileMenuButton runs before\n// the toggle and cancels it with `preventDefault()`, as `onClick` does in\n// React. `data-toggle` (injected by MDX) is dropped, as React's `cleanProps`\n// does.\n// - `asChild` (SidebarGroupLabel, SidebarMenuButton, SidebarMenuSubButton)\n// merges into the first element of the default slot the way Radix's Slot\n// does. SidebarMenuButton puts its inner `<span>` inside that element,\n// around the element's own content, as React clones it; with no single\n// element child it merges into the inner `<span>` instead.\n// - ReactNode props are slots: SidebarMenuButton `tooltip` (prop or\n// `#tooltip` slot), SidebarTrigger's icon (default slot), SidebarInput's\n// `startAdornment` (slot, Search icon by default).\n// - Parts whose React children are fixed (SidebarMenuChevron,\n// SidebarMenuSkeleton, SidebarMobileMenuButton) ignore the default slot.\n\n// Re-export provider and composable\nexport { SidebarProvider, useSidebar }\nexport type { SidebarCollapsible, SidebarProviderVariant, SidebarSide, SidebarVariant }\n\ntype Attrs = Record<string, unknown>\n\n// Filter out attributes that shouldn't reach the DOM (e.g. injected by MDX)\nconst cleanAttrs = (attrs: Attrs) => {\n const { \"data-toggle\": _, class: className, ...rest } = attrs\n return { className, rest }\n}\n\n// An explicit type keeps the published declaration on Vue's `DefineComponent`\n// alias; an inferred one is expanded there and fails consumers' type checks\n// (`GlobalComponents` against `Record<string, Component>`, TS2344).\ntype Part<A> = DefineComponent & { new (): { $props: A } }\n\n/** A part that renders one element with its class and the caller's attributes. */\nconst part = <A>(name: string, tag: string, className: string | undefined): Part<A> => {\n const component = defineComponent({\n name,\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { className: userClass, rest } = cleanAttrs(attrs)\n return h(tag, { ...rest, class: [className, userClass] }, slots.default?.())\n }\n },\n })\n return component as unknown as Part<A>\n}\n\n// =============================================\n// Sidebar Root\n// =============================================\n\nconst SidebarComponent = defineComponent({\n name: \"Sidebar\",\n inheritAttrs: false,\n props: {\n /** The side the sidebar is on. @default \"left\" */\n side: { type: String as PropType<SidebarSide>, default: \"left\" },\n /** The visual variant of the sidebar. @default \"sidebar\" */\n variant: { type: String as PropType<SidebarVariant>, default: \"sidebar\" },\n },\n setup(props, { attrs, slots }) {\n const sidebar = useSidebar()\n\n return () => {\n // Skip rendering sidebar on mobile for offcanvas mode\n if (sidebar.isMobile && sidebar.collapsible === \"offcanvas\") {\n return null\n }\n\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"aside\",\n { \"data-side\": props.side, \"data-variant\": props.variant, \"class\": [s.Sidebar, className], ...rest },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarProps = InstanceType<typeof SidebarComponent>[\"$props\"] & HTMLAttributes\n\n/** The sidebar container, an `<aside>`. Renders nothing on mobile in offcanvas mode. */\nexport const Sidebar = SidebarComponent as typeof SidebarComponent & { new (): { $props: SidebarProps } }\n\n// =============================================\n// Sidebar Sections\n// =============================================\n\nexport type SidebarHeaderProps = HTMLAttributes\n\n/** Sticky top area of the sidebar. */\nexport const SidebarHeader = part<SidebarHeaderProps>(\"SidebarHeader\", \"div\", s.Header)\n\nexport type SidebarContentProps = HTMLAttributes\n\n/**\n * Scrollable content area. Sets `data-content-scrollable` on the sidebar\n * while its content overflows.\n */\nexport const SidebarContent = defineComponent({\n name: \"SidebarContent\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n const contentEl = ref<HTMLDivElement | null>(null)\n let observer: ResizeObserver | undefined\n\n onMounted(() => {\n const el = contentEl.value\n if (!el) return\n const sidebar = el.parentElement\n if (!sidebar) return\n\n const update = () => {\n const hasOverflow = el.scrollHeight > el.clientHeight\n sidebar.setAttribute(\"data-content-scrollable\", hasOverflow ? \"true\" : \"false\")\n }\n update()\n observer = new ResizeObserver(update)\n observer.observe(el)\n })\n onBeforeUnmount(() => observer?.disconnect())\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { ref: contentEl, class: [s.Content, className], ...rest }, slots.default?.())\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarContentProps>>\n\nexport type SidebarFooterProps = HTMLAttributes\n\n/** Sticky bottom area of the sidebar, with a separator line on top. */\nexport const SidebarFooter = defineComponent({\n name: \"SidebarFooter\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { class: [s.Footer, className], ...rest }, [\n h(\"div\", { class: s.FooterSeparator }),\n slots.default?.(),\n ])\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarFooterProps>>\n\nexport type SidebarRailProps = HTMLAttributes\n\nexport const SidebarRail = part<SidebarRailProps>(\"SidebarRail\", \"div\", s.Rail)\n\n// =============================================\n// Groups\n// =============================================\n\nconst SidebarGroupComponent = defineComponent({\n name: \"SidebarGroup\",\n inheritAttrs: false,\n props: {\n /** Whether the group is open initially. A closed group hides its `SidebarGroupContent`. @default true */\n defaultOpen: { type: Boolean, default: true },\n /** Controlled open state. The group has no toggle of its own: change `open` from your own control. */\n open: { type: Boolean, default: undefined },\n },\n setup(props, { attrs, slots }) {\n // The initial value only, like an uncontrolled input's defaultValue\n const internalOpen = ref(props.defaultOpen)\n\n return () => {\n const open = props.open ?? internalOpen.value\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"div\",\n { \"data-state\": open ? \"open\" : \"closed\", \"class\": [s.Group, className], ...rest },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarGroupProps = InstanceType<typeof SidebarGroupComponent>[\"$props\"] & HTMLAttributes\n\n/** Section within the content. `data-state` follows `open` / `defaultOpen`. */\nexport const SidebarGroup = SidebarGroupComponent as typeof SidebarGroupComponent & {\n new (): { $props: SidebarGroupProps }\n}\n\n/** Radix Slot: the first element of the slot, with `slotProps` merged in. */\nconst renderAsChild = (children: VNodeArrayChildren | undefined, slotProps: Attrs) => {\n const child = firstElementChild(children)\n return child ? mergeSlotProps(child, slotProps) : null\n}\n\n/**\n * React's `cloneElement(child, undefined, wrap(child.props.children))`: the\n * same element (key and ref kept) with its content, or its default slot for a\n * component such as RouterLink, passed through `wrap`.\n */\nconst wrapChildContent = (child: VNode, wrap: (content: VNodeArrayChildren | undefined) => VNode): VNode => {\n const content = child.children\n let children: VNodeArrayChildren | Slots\n if (content && typeof content === \"object\" && !Array.isArray(content)) {\n // Drop the compiled-slots flag so the new default slot is always used\n const { _: _compiled, ...slotFns } = content as Slots & { _?: unknown }\n children = { ...slotFns, default: () => [wrap(slotFns.default?.())] }\n } else {\n children = [wrap(typeof content === \"string\" ? [content] : (content ?? undefined))]\n }\n return h(child.type as string, { ...child.props, key: child.key ?? undefined, ref: child.ref as never }, children as never)\n}\n\nconst SidebarGroupLabelComponent = defineComponent({\n name: \"SidebarGroupLabel\",\n inheritAttrs: false,\n props: {\n /** Merges into the slot's first element instead of rendering a `<span>`. @default false */\n asChild: { type: Boolean, default: false },\n /**\n * Size variant for the label.\n * - \"sm\": Compact style for dashboard/settings sidebars\n * - \"lg\": Documentation style with larger text and more spacing\n * @default \"lg\"\n */\n size: { type: String as PropType<\"sm\" | \"lg\">, default: \"lg\" },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const ownProps = { \"data-size\": props.size, \"class\": [s.GroupLabel, className], ...rest }\n return props.asChild ? renderAsChild(slots.default?.(), ownProps) : h(\"span\", ownProps, slots.default?.())\n }\n },\n})\n\nexport type SidebarGroupLabelProps = InstanceType<typeof SidebarGroupLabelComponent>[\"$props\"] & HTMLAttributes\n\n/** Section label within a SidebarGroup. */\nexport const SidebarGroupLabel = SidebarGroupLabelComponent as typeof SidebarGroupLabelComponent & {\n new (): { $props: SidebarGroupLabelProps }\n}\n\nexport type SidebarGroupActionProps = HTMLAttributes\n\nexport const SidebarGroupAction = part<SidebarGroupActionProps>(\"SidebarGroupAction\", \"div\", s.GroupAction)\n\nexport type SidebarGroupContentProps = HTMLAttributes\n\nexport const SidebarGroupContent = part<SidebarGroupContentProps>(\"SidebarGroupContent\", \"div\", s.GroupContent)\n\n// =============================================\n// Menu\n// =============================================\n\nexport type SidebarMenuProps = HTMLAttributes\n\n/** Navigation menu, a `<ul>`. */\nexport const SidebarMenu = part<SidebarMenuProps>(\"SidebarMenu\", \"ul\", s.Menu)\n\nconst SidebarMenuItemComponent = defineComponent({\n name: \"SidebarMenuItem\",\n inheritAttrs: false,\n props: {\n /** Marks the item as expanded (`data-expanded`), for chevrons and sub menus. */\n expanded: { type: Boolean, default: undefined },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"li\",\n { \"data-expanded\": props.expanded ? \"true\" : undefined, \"class\": [s.MenuItem, className], ...rest },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarMenuItemProps = InstanceType<typeof SidebarMenuItemComponent>[\"$props\"] & LiHTMLAttributes\n\n/** Menu item, an `<li>`. */\nexport const SidebarMenuItem = SidebarMenuItemComponent as typeof SidebarMenuItemComponent & {\n new (): { $props: SidebarMenuItemProps }\n}\n\n// =============================================\n// Menu Button\n// =============================================\n\n// Shared by every row of the rail: moving to the next one shows its label at once.\nlet railLeftAt = 0\n\nconst SidebarMenuButtonComponent = defineComponent({\n name: \"SidebarMenuButton\",\n inheritAttrs: false,\n props: {\n /** Whether the button is in an active/highlighted state. @default false */\n isActive: { type: Boolean, default: false },\n /**\n * Optional tooltip to show when the sidebar is collapsed (or the\n * `#tooltip` slot). Hidden on mobile.\n */\n tooltip: String,\n /** Whether to render the button as a custom element via Slot. @default false */\n asChild: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n const sidebar = useSidebar()\n const openDelay = ref<number>()\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const hasTooltip = !!(props.tooltip || slots.tooltip)\n const ownProps: Record<string, unknown> = {\n \"data-active\": props.isActive ? \"true\" : \"false\",\n \"aria-current\": props.isActive ? \"page\" : undefined,\n \"class\": [s.MenuButton, className],\n ...rest,\n }\n if (hasTooltip) {\n ownProps.onPointerenter = composeEventHandlers(rest.onPointerenter, () => {\n openDelay.value = Date.now() - railLeftAt < 300 ? 0 : undefined\n })\n ownProps.onPointerleave = composeEventHandlers(rest.onPointerleave, () => {\n railLeftAt = Date.now()\n })\n }\n const content = slots.default?.()\n const wrap = (children: VNodeArrayChildren | undefined) => h(\"span\", { class: s.MenuButtonInner }, children)\n let button: VNode\n if (props.asChild) {\n // With asChild the child element is the button, so the inner wrapper\n // goes inside it. Wrapping the child instead would merge the button\n // attributes onto the wrapper span.\n // A lone text child is wrapped below rather than slotted\n const nodes = flattenSlot(content)\n const child = nodes.length === 1 && nodes[0].type !== Text ? nodes[0] : undefined\n button = mergeSlotProps(child ? wrapChildContent(child, wrap) : wrap(content), ownProps)\n } else {\n button = h(\"button\", ownProps, [wrap(content)])\n }\n\n // The tooltip shows when collapsed (icon mode) and not on mobile. It wraps\n // the row in every state, so the row stays mounted and its label can fade.\n if (hasTooltip) {\n const shown = sidebar.state === \"collapsed\" && !sidebar.isMobile\n return h(\n Tooltip,\n { content: shown ? props.tooltip : null, openDelay: openDelay.value, side: \"right\" },\n { default: () => button, ...(slots.tooltip && shown ? { content: slots.tooltip } : {}) },\n )\n }\n\n return button\n }\n },\n})\n\nexport type SidebarMenuButtonProps = InstanceType<typeof SidebarMenuButtonComponent>[\"$props\"] & ButtonHTMLAttributes\n\n/** Menu item button. Shows its `tooltip` when the sidebar is collapsed to icons. */\nexport const SidebarMenuButton = SidebarMenuButtonComponent as typeof SidebarMenuButtonComponent & {\n new (): { $props: SidebarMenuButtonProps }\n}\n\n// =============================================\n// Menu Button Parts\n// =============================================\n\nexport type SidebarMenuButtonIconProps = HTMLAttributes\n\nexport const SidebarMenuButtonIcon = part<SidebarMenuButtonIconProps>(\n \"SidebarMenuButtonIcon\",\n \"span\",\n s.MenuButtonIcon,\n)\n\nconst SidebarMenuButtonLabelComponent = defineComponent({\n name: \"SidebarMenuButtonLabel\",\n inheritAttrs: false,\n props: {\n /** Shorter label rendered next to the full one (`data-short-label`). */\n shortLabel: String,\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return [\n h(\n \"span\",\n { \"data-long-label\": \"true\", \"class\": [s.MenuButtonLabel, className], ...rest },\n slots.default?.(),\n ),\n props.shortLabel\n ? h(\"span\", { \"data-short-label\": \"true\", \"class\": [s.MenuButtonLabel, className] }, props.shortLabel)\n : null,\n ]\n }\n },\n})\n\nexport type SidebarMenuButtonLabelProps = InstanceType<typeof SidebarMenuButtonLabelComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMenuButtonLabel = SidebarMenuButtonLabelComponent as typeof SidebarMenuButtonLabelComponent & {\n new (): { $props: SidebarMenuButtonLabelProps }\n}\n\n// =============================================\n// Menu Chevron (Expand/Collapse Toggle)\n// =============================================\n\nexport type SidebarMenuChevronProps = HTMLAttributes\n\nexport const SidebarMenuChevron = defineComponent({\n name: \"SidebarMenuChevron\",\n inheritAttrs: false,\n setup(_props, { attrs }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"span\", { class: [s.MenuChevron, className], ...rest }, [h(ChevronRightMd)])\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarMenuChevronProps>>\n\n// =============================================\n// Menu Badge & Action\n// =============================================\n\nexport type SidebarMenuBadgeProps = HTMLAttributes\n\nexport const SidebarMenuBadge = part<SidebarMenuBadgeProps>(\"SidebarMenuBadge\", \"span\", s.MenuBadge)\n\nexport type SidebarMenuActionProps = HTMLAttributes\n\nexport const SidebarMenuAction = part<SidebarMenuActionProps>(\"SidebarMenuAction\", \"div\", s.MenuAction)\n\n// =============================================\n// Menu Skeleton\n// =============================================\n\nconst SidebarMenuSkeletonComponent = defineComponent({\n name: \"SidebarMenuSkeleton\",\n inheritAttrs: false,\n props: {\n /** Renders the icon placeholder. @default true */\n showIcon: { type: Boolean, default: true },\n /** Width of the label skeleton (e.g., \"60%\", \"80%\", \"100px\"). @default \"60%\" */\n labelWidth: { type: String, default: \"60%\" },\n },\n setup(props, { attrs }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { \"data-skeleton\": \"true\", \"class\": [s.MenuSkeleton, className], ...rest }, [\n props.showIcon ? h(\"div\", { class: s.MenuSkeletonIcon }) : null,\n h(\"div\", { class: s.MenuSkeletonLabel, style: { width: props.labelWidth } }),\n ])\n }\n },\n})\n\nexport type SidebarMenuSkeletonProps = InstanceType<typeof SidebarMenuSkeletonComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMenuSkeleton = SidebarMenuSkeletonComponent as typeof SidebarMenuSkeletonComponent & {\n new (): { $props: SidebarMenuSkeletonProps }\n}\n\n// =============================================\n// Submenu\n// =============================================\n\nconst SidebarMenuSubComponent = defineComponent({\n name: \"SidebarMenuSub\",\n inheritAttrs: false,\n props: {\n /** Whether the submenu is expanded. @default true */\n open: { type: Boolean, default: true },\n /**\n * When true, child items align with parent text that has icons.\n * This adjusts the padding so level 2 text aligns with level 1 text.\n * @default false\n */\n hasIcons: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"ul\",\n {\n \"data-state\": props.open ? \"open\" : \"closed\",\n \"data-has-icons\": props.hasIcons ? \"true\" : undefined,\n // Collapsed items are only hidden visually: keep them out of the tab\n // order. \"\" renders `inert=\"\"` (a DOM property in browsers)\n \"inert\": props.open ? undefined : \"\",\n \"class\": [s.MenuSub, className],\n ...rest,\n },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarMenuSubProps = InstanceType<typeof SidebarMenuSubComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMenuSub = SidebarMenuSubComponent as typeof SidebarMenuSubComponent & {\n new (): { $props: SidebarMenuSubProps }\n}\n\nexport type SidebarMenuSubItemProps = LiHTMLAttributes\n\nexport const SidebarMenuSubItem = part<SidebarMenuSubItemProps>(\"SidebarMenuSubItem\", \"li\", s.MenuSubItem)\n\nconst SidebarMenuSubButtonComponent = defineComponent({\n name: \"SidebarMenuSubButton\",\n inheritAttrs: false,\n props: {\n /** Whether the button is in an active/highlighted state. @default false */\n isActive: { type: Boolean, default: false },\n /** Merges into the slot's first element instead of rendering a `<button>`. @default false */\n asChild: { type: Boolean, default: false },\n /**\n * Indent level for nested items (0-3).\n * Each level adds 12px of left margin.\n * @default 0\n */\n indent: { type: Number as PropType<0 | 1 | 2 | 3>, default: 0 },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const ownProps = {\n \"data-active\": props.isActive ? \"true\" : \"false\",\n \"aria-current\": props.isActive ? \"page\" : undefined,\n \"class\": [s.MenuSubButton, s[`indent${props.indent}`], className],\n ...rest,\n }\n return props.asChild ? renderAsChild(slots.default?.(), ownProps) : h(\"button\", ownProps, slots.default?.())\n }\n },\n})\n\nexport type SidebarMenuSubButtonProps = InstanceType<typeof SidebarMenuSubButtonComponent>[\"$props\"] & ButtonHTMLAttributes\n\nexport const SidebarMenuSubButton = SidebarMenuSubButtonComponent as typeof SidebarMenuSubButtonComponent & {\n new (): { $props: SidebarMenuSubButtonProps }\n}\n\n// =============================================\n// Separator\n// =============================================\n\nexport type SidebarSeparatorProps = HTMLAttributes\n\nexport const SidebarSeparator = defineComponent({\n name: \"SidebarSeparator\",\n inheritAttrs: false,\n setup(_props, { attrs }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"hr\", { class: [s.Separator, className], ...rest })\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarSeparatorProps>>\n\n// =============================================\n// Card\n// =============================================\n\nconst SidebarCardComponent = defineComponent({\n name: \"SidebarCard\",\n inheritAttrs: false,\n props: {\n /** Visual variant. @default \"default\" */\n variant: { type: String as PropType<\"default\" | \"elevated\">, default: \"default\" },\n /** Shows a dismiss button. @default false */\n dismissible: { type: Boolean, default: false },\n },\n emits: {\n /** The dismiss button was clicked */\n dismiss: (_event: MouseEvent) => true,\n },\n setup(props, { attrs, slots, emit }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { \"data-variant\": props.variant, \"class\": [s.Card, className], ...rest }, [\n props.dismissible\n ? h(\n Button,\n {\n \"uniform\": true,\n \"size\": \"3xs\",\n \"variant\": \"ghost\",\n \"color\": \"secondary\",\n \"class\": s.CardDismiss,\n \"onClick\": (event: MouseEvent) => emit(\"dismiss\", event),\n \"aria-label\": \"Dismiss\",\n },\n { default: () => h(X) },\n )\n : null,\n slots.default?.(),\n ])\n }\n },\n})\n\nexport type SidebarCardProps = InstanceType<typeof SidebarCardComponent>[\"$props\"] & HTMLAttributes\n\n/** Promotional card for CTAs, upgrades or announcements. */\nexport const SidebarCard = SidebarCardComponent as typeof SidebarCardComponent & {\n new (): { $props: SidebarCardProps }\n}\n\nexport type SidebarCardHeaderProps = HTMLAttributes\n\nexport const SidebarCardHeader = part<SidebarCardHeaderProps>(\"SidebarCardHeader\", \"div\", s.CardHeader)\n\nexport type SidebarCardTitleProps = HTMLAttributes\n\nexport const SidebarCardTitle = part<SidebarCardTitleProps>(\"SidebarCardTitle\", \"div\", s.CardTitle)\n\nexport type SidebarCardTitleLinkProps = AnchorHTMLAttributes\n\nexport const SidebarCardTitleLink = defineComponent({\n name: \"SidebarCardTitleLink\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"a\", { class: [s.CardTitleLink, className], ...rest }, [\n slots.default?.(),\n h(ChevronRightMd, { class: s.CardTitleChevron }),\n ])\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarCardTitleLinkProps>>\n\nexport type SidebarCardContentProps = HTMLAttributes\n\nexport const SidebarCardContent = part<SidebarCardContentProps>(\"SidebarCardContent\", \"div\", s.CardContent)\n\nexport type SidebarCardFooterProps = HTMLAttributes\n\nexport const SidebarCardFooter = part<SidebarCardFooterProps>(\"SidebarCardFooter\", \"div\", s.CardFooter)\n\n// =============================================\n// Inset (Main Content Area)\n// =============================================\n\nexport type SidebarInsetProps = HTMLAttributes\n\n/** Main content area next to the sidebar, a `<main>`. */\nexport const SidebarInset = part<SidebarInsetProps>(\"SidebarInset\", \"main\", s.Inset)\n\n// =============================================\n// Layout Container\n// =============================================\n\nexport type SidebarLayoutProps = HTMLAttributes\n\n/** Wrapper for the sidebar and the main content. */\nexport const SidebarLayout = part<SidebarLayoutProps>(\"SidebarLayout\", \"div\", s.SidebarLayout)\n\n// =============================================\n// Trigger (Collapse Button)\n// =============================================\n\nexport type SidebarTriggerProps = ButtonHTMLAttributes\n\n/**\n * Collapse button. The default slot replaces the icon. Renders nothing when\n * `collapsible=\"none\"`.\n */\nexport const SidebarTrigger = defineComponent({\n name: \"SidebarTrigger\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n const sidebar = useSidebar()\n\n return () => {\n // Don't render if collapsible=\"none\" (text-only sidebars)\n if (sidebar.collapsible === \"none\") {\n return null\n }\n\n const { className, rest } = cleanAttrs(attrs)\n const { onClick, ...others } = rest\n return h(\n \"button\",\n {\n \"type\": \"button\",\n \"class\": [s.Trigger, className],\n // The caller's listener runs first and can cancel the toggle\n \"onClick\": composeEventHandlers(onClick, () => sidebar.toggleSidebar()),\n \"aria-label\": sidebar.isMobile\n ? \"Open menu\"\n : sidebar.state === \"expanded\"\n ? \"Collapse sidebar\"\n : \"Expand sidebar\",\n ...others,\n },\n [\n h(\"span\", { class: s.TriggerInner }, [\n // Default icon (same for both states, as per reference)\n h(\"span\", { class: s.TriggerIcon }, slots.default ? slots.default() : [h(SidebarLeft)]),\n ]),\n ],\n )\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarTriggerProps>>\n\n// =============================================\n// Mobile Menu Button (Hamburger → X)\n// =============================================\n\nexport type SidebarMobileMenuButtonProps = ButtonHTMLAttributes\n\nexport const SidebarMobileMenuButton = defineComponent({\n name: \"SidebarMobileMenuButton\",\n inheritAttrs: false,\n setup(_props, { attrs }) {\n const sidebar = useSidebar()\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const { onClick, ...others } = rest\n return h(\n \"button\",\n {\n \"type\": \"button\",\n \"data-expanded\": sidebar.openMobile ? \"\" : undefined,\n \"class\": [s.MobileMenuButton, className],\n // The caller's listener runs first and can cancel the toggle\n \"onClick\": composeEventHandlers(onClick, () => sidebar.setOpenMobile(!sidebar.openMobile)),\n \"aria-label\": sidebar.openMobile ? \"Close menu\" : \"Open menu\",\n ...others,\n },\n [\n h(\"span\", { class: s.MobileMenuIcon }, [\n h(\"span\", { \"class\": s.MobileMenuLine, \"data-top\": \"true\" }),\n h(\"span\", { class: s.MobileMenuMiddle }, [h(\"span\", { \"class\": s.MobileMenuLine, \"data-bottom\": \"true\" })]),\n ]),\n ],\n )\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarMobileMenuButtonProps>>\n\n// =============================================\n// Mobile Sidebar\n// =============================================\n\nconst SidebarMobileComponent = defineComponent({\n name: \"SidebarMobile\",\n inheritAttrs: false,\n props: {\n /** When true, drawer is positioned absolute instead of fixed (for contained demos) */\n contained: { type: Boolean, default: undefined },\n },\n setup(props, { attrs, slots }) {\n const sidebar = useSidebar()\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const contained = props.contained && s.contained\n return [\n // Backdrop\n h(\"div\", {\n \"class\": [s.MobileBackdrop, contained],\n \"onClick\": () => sidebar.setOpenMobile(false),\n \"aria-hidden\": \"true\",\n }),\n // Drawer\n h(\"div\", { class: [s.MobileSidebar, contained, className], ...rest }, slots.default?.()),\n ]\n }\n },\n})\n\nexport type SidebarMobileProps = InstanceType<typeof SidebarMobileComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMobile = SidebarMobileComponent as typeof SidebarMobileComponent & {\n new (): { $props: SidebarMobileProps }\n}\n\nexport type SidebarMobileHeaderProps = HTMLAttributes\n\nexport const SidebarMobileHeader = part<SidebarMobileHeaderProps>(\"SidebarMobileHeader\", \"div\", s.MobileHeader)\n\nexport type SidebarMobileFooterProps = HTMLAttributes\n\nexport const SidebarMobileFooter = part<SidebarMobileFooterProps>(\"SidebarMobileFooter\", \"div\", s.MobileFooter)\n\n// =============================================\n// Input (Search)\n// =============================================\n\nexport type SidebarInputProps = InputProps\n\n/**\n * Search input: an Input with a Search icon in its `startAdornment` slot.\n * Every attribute, listener and slot goes to the Input (`v-model:value`,\n * `@clear`, ...). A template ref gets the Input's `focus()` and `input`\n * (React forwards its ref to the <input>).\n */\nexport const SidebarInput = defineComponent({\n name: \"SidebarInput\",\n inheritAttrs: false,\n setup(_props, { attrs, slots, expose }) {\n // Input's exposed API\n const inputComponent = ref<{ input: HTMLInputElement | null; focus: () => void } | null>(null)\n\n expose({\n focus: () => inputComponent.value?.focus(),\n input: computed(() => inputComponent.value?.input ?? null),\n })\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { class: s.Input }, [\n h(\n Input,\n { class: className, ...rest, ref: inputComponent },\n { ...slots, startAdornment: slots.startAdornment ?? (() => h(SearchIcon)) },\n ),\n ])\n }\n },\n}) as unknown as typeof Input\n\n// =============================================\n// Footer Links\n// =============================================\n\nexport type SidebarFooterLinksProps = HTMLAttributes\n\nexport const SidebarFooterLinks = part<SidebarFooterLinksProps>(\"SidebarFooterLinks\", \"div\", s.FooterLinks)\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Sidebar/index.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,oEAAoE;AAEpE,OAAO;AACL,OAAO;AACP,OAAO;AACP,OAAO;AACP,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,aAAa;AACb,eAAe;AACf,kBAAkB;AAClB,SAAS;AACT,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB;AACjB,WAAW;AACX,aAAa;AACb,QAAQ;AACR,YAAY,EACZ,YAAY,EACZ,aAAa;AACb,OAAO;AACP,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,eAAe,EACf,mBAAmB;AACnB,UAAU;AACV,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,mBAAmB;AACnB,SAAS;AACT,uBAAuB;AACvB,0BAA0B;AAC1B,eAAe,EACf,WAAW;AACX,YAAY;AACZ,gBAAgB;AAChB,UAAU;AACV,cAAc,EACd,UAAU,GACX,MAAM,cAAc,CAAA;AAmDrB,mBAAmB;AACnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA","sourcesContent":["// Sidebar Component - Composable navigation sidebar\n// Re-export all components from Sidebar.ts and useSidebarContext.ts\n\nexport {\n // Core\n Sidebar,\n // Card\n SidebarCard,\n SidebarCardContent,\n SidebarCardFooter,\n SidebarCardHeader,\n SidebarCardTitle,\n SidebarCardTitleLink,\n SidebarContent,\n SidebarFooter,\n // Footer Links\n SidebarFooterLinks,\n // Groups\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n // Sections\n SidebarHeader,\n // Input\n SidebarInput,\n SidebarInset,\n SidebarLayout,\n // Menu\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuButtonIcon,\n SidebarMenuButtonLabel,\n SidebarMenuChevron,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n // Submenu\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarMobile,\n SidebarMobileFooter,\n SidebarMobileHeader,\n // Mobile\n SidebarMobileMenuButton,\n // Provider and composable\n SidebarProvider,\n SidebarRail,\n // Separator\n SidebarSeparator,\n // Trigger\n SidebarTrigger,\n useSidebar,\n} from \"./Sidebar.js\"\n\n// Export types\nexport type {\n SidebarCardContentProps,\n SidebarCardFooterProps,\n SidebarCardHeaderProps,\n SidebarCardProps,\n SidebarCardTitleLinkProps,\n SidebarCardTitleProps,\n // Context types\n SidebarCollapsible,\n SidebarContentProps,\n SidebarFooterLinksProps,\n SidebarFooterProps,\n SidebarGroupActionProps,\n SidebarGroupContentProps,\n SidebarGroupLabelProps,\n SidebarGroupProps,\n SidebarHeaderProps,\n SidebarInputProps,\n SidebarInsetProps,\n SidebarLayoutProps,\n SidebarMenuActionProps,\n SidebarMenuBadgeProps,\n SidebarMenuButtonIconProps,\n SidebarMenuButtonLabelProps,\n SidebarMenuButtonProps,\n SidebarMenuChevronProps,\n SidebarMenuItemProps,\n SidebarMenuProps,\n SidebarMenuSkeletonProps,\n SidebarMenuSubButtonProps,\n SidebarMenuSubItemProps,\n SidebarMenuSubProps,\n SidebarMobileFooterProps,\n SidebarMobileHeaderProps,\n SidebarMobileMenuButtonProps,\n SidebarMobileProps,\n // Component props\n SidebarProps,\n SidebarRailProps,\n SidebarSeparatorProps,\n SidebarSide,\n SidebarTriggerProps,\n SidebarVariant,\n} from \"./Sidebar.js\"\n\n// Export provider props and context types\nexport type { SidebarContextValue, SidebarProviderProps, SidebarState } from \"./useSidebarContext.js\"\n\n// Export constants\nexport { SIDEBAR_CONSTANTS } from \"./useSidebarContext.js\"\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Sidebar/index.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,oEAAoE;AAEpE,OAAO;AACL,OAAO;AACP,OAAO;AACP,OAAO;AACP,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,aAAa;AACb,eAAe;AACf,kBAAkB;AAClB,SAAS;AACT,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB;AACjB,WAAW;AACX,aAAa;AACb,QAAQ;AACR,YAAY,EACZ,YAAY,EACZ,aAAa;AACb,OAAO;AACP,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,eAAe,EACf,mBAAmB;AACnB,UAAU;AACV,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,mBAAmB;AACnB,SAAS;AACT,uBAAuB;AACvB,0BAA0B;AAC1B,eAAe,EACf,WAAW;AACX,YAAY;AACZ,gBAAgB;AAChB,UAAU;AACV,cAAc,EACd,UAAU,GACX,MAAM,cAAc,CAAA;AAoDrB,mBAAmB;AACnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA","sourcesContent":["// Sidebar Component - Composable navigation sidebar\n// Re-export all components from Sidebar.ts and useSidebarContext.ts\n\nexport {\n // Core\n Sidebar,\n // Card\n SidebarCard,\n SidebarCardContent,\n SidebarCardFooter,\n SidebarCardHeader,\n SidebarCardTitle,\n SidebarCardTitleLink,\n SidebarContent,\n SidebarFooter,\n // Footer Links\n SidebarFooterLinks,\n // Groups\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n // Sections\n SidebarHeader,\n // Input\n SidebarInput,\n SidebarInset,\n SidebarLayout,\n // Menu\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuButtonIcon,\n SidebarMenuButtonLabel,\n SidebarMenuChevron,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n // Submenu\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarMobile,\n SidebarMobileFooter,\n SidebarMobileHeader,\n // Mobile\n SidebarMobileMenuButton,\n // Provider and composable\n SidebarProvider,\n SidebarRail,\n // Separator\n SidebarSeparator,\n // Trigger\n SidebarTrigger,\n useSidebar,\n} from \"./Sidebar.js\"\n\n// Export types\nexport type {\n SidebarCardContentProps,\n SidebarCardFooterProps,\n SidebarCardHeaderProps,\n SidebarCardProps,\n SidebarCardTitleLinkProps,\n SidebarCardTitleProps,\n // Context types\n SidebarCollapsible,\n SidebarContentProps,\n SidebarFooterLinksProps,\n SidebarFooterProps,\n SidebarGroupActionProps,\n SidebarGroupContentProps,\n SidebarGroupLabelProps,\n SidebarGroupProps,\n SidebarHeaderProps,\n SidebarInputProps,\n SidebarInsetProps,\n SidebarLayoutProps,\n SidebarMenuActionProps,\n SidebarMenuBadgeProps,\n SidebarMenuButtonIconProps,\n SidebarMenuButtonLabelProps,\n SidebarMenuButtonProps,\n SidebarMenuChevronProps,\n SidebarMenuItemProps,\n SidebarMenuProps,\n SidebarMenuSkeletonProps,\n SidebarMenuSubButtonProps,\n SidebarMenuSubItemProps,\n SidebarMenuSubProps,\n SidebarMobileFooterProps,\n SidebarMobileHeaderProps,\n SidebarMobileMenuButtonProps,\n SidebarMobileProps,\n // Component props\n SidebarProps,\n SidebarRailProps,\n SidebarSeparatorProps,\n SidebarSide,\n SidebarTriggerProps,\n SidebarProviderVariant,\n SidebarVariant,\n} from \"./Sidebar.js\"\n\n// Export provider props and context types\nexport type { SidebarContextValue, SidebarProviderProps, SidebarState } from \"./useSidebarContext.js\"\n\n// Export constants\nexport { SIDEBAR_CONSTANTS } from \"./useSidebarContext.js\"\n"]}
@@ -1,4 +1,5 @@
1
1
  import { computed, defineComponent, h, inject, onBeforeUnmount, onMounted, provide, reactive, ref, watch, } from "vue";
2
+ import s from "@plexui/styles/components/Sidebar/Sidebar.module.css";
2
3
  // Vue port of packages/ui/src/components/Sidebar/useSidebarContext.tsx.
3
4
  // - `useSidebar()` returns the context as a reactive object (read
4
5
  // `sidebar.state`; destructuring outside a render loses reactivity).
@@ -13,6 +14,7 @@ import { computed, defineComponent, h, inject, onBeforeUnmount, onMounted, provi
13
14
  const SIDEBAR_COOKIE_NAME = "sidebar:state";
14
15
  const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7; // 7 days
15
16
  const SIDEBAR_WIDTH = "240px";
17
+ const SIDEBAR_WIDTH_APP = "260px";
16
18
  const SIDEBAR_WIDTH_MOBILE = "288px";
17
19
  const SIDEBAR_WIDTH_ICON = "64px";
18
20
  const SIDEBAR_KEYBOARD_SHORTCUT = "b";
@@ -56,6 +58,8 @@ const SidebarProviderComponent = defineComponent({
56
58
  open: { type: Boolean, default: undefined },
57
59
  /** Collapsible mode. @default "offcanvas" */
58
60
  collapsible: { type: String, default: "offcanvas" },
61
+ /** "app" is the shell of a product: a quiet rail, pill rows and on a phone a drawer under the page. @default "sidebar" */
62
+ variant: { type: String, default: "sidebar" },
59
63
  },
60
64
  emits: {
61
65
  /** The open state changes (`v-model:open`) */
@@ -139,10 +143,10 @@ const SidebarProviderComponent = defineComponent({
139
143
  });
140
144
  provide(SidebarContextKey, context);
141
145
  return () => h("div", {
142
- "class": attrs.class,
146
+ "class": [props.variant === "app" && s.App, attrs.class],
143
147
  "style": [
144
148
  {
145
- "--sidebar-width": SIDEBAR_WIDTH,
149
+ "--sidebar-width": props.variant === "app" ? SIDEBAR_WIDTH_APP : SIDEBAR_WIDTH,
146
150
  "--sidebar-width-mobile": SIDEBAR_WIDTH_MOBILE,
147
151
  "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
148
152
  },
@@ -163,6 +167,7 @@ export const SidebarProvider = SidebarProviderComponent;
163
167
  // Re-export constants for external use
164
168
  export const SIDEBAR_CONSTANTS = {
165
169
  WIDTH: SIDEBAR_WIDTH,
170
+ WIDTH_APP: SIDEBAR_WIDTH_APP,
166
171
  WIDTH_MOBILE: SIDEBAR_WIDTH_MOBILE,
167
172
  WIDTH_ICON: SIDEBAR_WIDTH_ICON,
168
173
  KEYBOARD_SHORTCUT: SIDEBAR_KEYBOARD_SHORTCUT,
@@ -1 +1 @@
1
- {"version":3,"file":"useSidebarContext.js","sourceRoot":"","sources":["../../../../src/components/Sidebar/useSidebarContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,eAAe,EACf,SAAS,EACT,OAAO,EACP,QAAQ,EACR,GAAG,EACH,KAAK,GAKN,MAAM,KAAK,CAAA;AAEZ,wEAAwE;AACxE,kEAAkE;AAClE,uEAAuE;AACvE,+DAA+D;AAC/D,6EAA6E;AAC7E,yCAAyC;AACzC,6EAA6E;AAC7E,mFAAmF;AACnF,4EAA4E;AAC5E,gDAAgD;AAEhD,YAAY;AACZ,MAAM,mBAAmB,GAAG,eAAe,CAAA;AAC3C,MAAM,sBAAsB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA,CAAC,SAAS;AACzD,MAAM,aAAa,GAAG,OAAO,CAAA;AAC7B,MAAM,oBAAoB,GAAG,OAAO,CAAA;AACpC,MAAM,kBAAkB,GAAG,MAAM,CAAA;AACjC,MAAM,yBAAyB,GAAG,GAAG,CAAA;AACrC,MAAM,iBAAiB,GAAG,GAAG,CAAA;AAqB7B,UAAU;AACV,MAAM,iBAAiB,GAAsC,MAAM,CAAC,eAAe,CAAC,CAAA;AAEpF,8FAA8F;AAC9F,MAAM,CAAC,MAAM,UAAU,GAAG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aAC1B;YACD,cAAc,EAAE,KAAK,CAAC,KAAK;YAC3B,kBAAkB,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ;YAC3D,kBAAkB,EAAE,KAAK,CAAC,WAAW;SACtC,EACD,KAAK,CAAC,OAAO,EAAE,CAAC,OAAO,CAAU,CAClC,CAAA;IACL,CAAC;CACF,CAAC,CAAA;AAMF;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,wBAE9B,CAAA;AAED,uCAAuC;AACvC,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE,aAAa;IACpB,YAAY,EAAE,oBAAoB;IAClC,UAAU,EAAE,kBAAkB;IAC9B,iBAAiB,EAAE,yBAAyB;IAC5C,iBAAiB;IACjB,WAAW,EAAE,mBAAmB;IAChC,cAAc,EAAE,sBAAsB;CAC9B,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n type InjectionKey,\n type PropType,\n type SlotsType,\n type StyleValue,\n} from \"vue\"\n\n// Vue port of packages/ui/src/components/Sidebar/useSidebarContext.tsx.\n// - `useSidebar()` returns the context as a reactive object (read\n// `sidebar.state`; destructuring outside a render loses reactivity).\n// Templates get the same object as the default slot props of\n// SidebarProvider (`v-slot=\"{ state, toggleSidebar }\"`), the way Popover's\n// content slot exposes its controller.\n// - `open` + `update:open` support `v-model:open`. As in React, the provider\n// is controlled only when `open` is passed; `update:open` is emitted either way.\n// - Mobile detection, the Cmd/Ctrl+B shortcut and the Escape listener start\n// on mount, as React's effects do (SSR-safe).\n\n// Constants\nconst SIDEBAR_COOKIE_NAME = \"sidebar:state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7 // 7 days\nconst SIDEBAR_WIDTH = \"240px\"\nconst SIDEBAR_WIDTH_MOBILE = \"288px\"\nconst SIDEBAR_WIDTH_ICON = \"64px\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\nconst MOBILE_BREAKPOINT = 768\n\n// Types\nexport type SidebarState = \"expanded\" | \"collapsed\"\nexport type SidebarCollapsible = \"offcanvas\" | \"icon\" | \"none\"\nexport type SidebarSide = \"left\" | \"right\"\nexport type SidebarVariant = \"sidebar\" | \"docs\"\n\ntype SetBoolean = (value: boolean | ((prev: boolean) => boolean)) => void\n\nexport type SidebarContextValue = {\n state: SidebarState\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n collapsible: SidebarCollapsible\n toggleSidebar: () => void\n}\n\n// Context\nconst SidebarContextKey: InjectionKey<SidebarContextValue> = Symbol(\"PlexUISidebar\")\n\n/** Sidebar state and controls; call it in `setup()` of a component inside SidebarProvider. */\nexport const useSidebar = (): SidebarContextValue => {\n const context = inject(SidebarContextKey, null)\n\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider\")\n }\n\n return context\n}\n\n// Composable for mobile detection via matchMedia\nfunction useIsMobile() {\n const isMobile = ref(false)\n let cleanup: (() => void) | undefined\n\n onMounted(() => {\n // Check if we're in browser environment\n if (typeof window === \"undefined\") return\n\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)\n\n const handleChange = () => {\n isMobile.value = mql.matches\n }\n handleChange() // Initial check\n\n mql.addEventListener(\"change\", handleChange)\n cleanup = () => mql.removeEventListener(\"change\", handleChange)\n })\n onBeforeUnmount(() => cleanup?.())\n\n return isMobile\n}\n\n/** Native attributes of the provider's `<div>` that React accepts: `class` and `style`. */\nexport type SidebarProviderAttrs = { class?: unknown; style?: StyleValue }\n\nconst SidebarProviderComponent = defineComponent({\n name: \"SidebarProvider\",\n inheritAttrs: false,\n props: {\n /** Default open state (uncontrolled). @default true */\n defaultOpen: { type: Boolean, default: true },\n /** Controlled open state (`v-model:open`) */\n open: { type: Boolean, default: undefined },\n /** Collapsible mode. @default \"offcanvas\" */\n collapsible: { type: String as PropType<SidebarCollapsible>, default: \"offcanvas\" },\n },\n emits: {\n /** The open state changes (`v-model:open`) */\n \"update:open\": (_open: boolean) => true,\n },\n slots: Object as SlotsType<{ default?: (context: SidebarContextValue) => unknown }>,\n setup(props, { attrs, slots, emit }) {\n const isMobile = useIsMobile()\n const openMobile = ref(false)\n\n // Controlled vs uncontrolled state for desktop\n const internalOpen = ref(props.defaultOpen)\n const open = computed(() => props.open ?? internalOpen.value)\n\n const setOpen: SetBoolean = (value) => {\n const openState = typeof value === \"function\" ? value(open.value) : value\n\n // Controlled only when `open` is passed; update:open alone is a notification\n if (props.open === undefined) {\n internalOpen.value = openState\n }\n emit(\"update:open\", openState)\n\n // Persist state in cookie for SSR\n if (typeof document !== \"undefined\") {\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n }\n }\n\n const setOpenMobile: SetBoolean = (value) => {\n openMobile.value = typeof value === \"function\" ? value(openMobile.value) : value\n }\n\n // Toggle function that handles both mobile and desktop\n const toggleSidebar = () => {\n if (isMobile.value) {\n setOpenMobile((prev) => !prev)\n } else {\n setOpen((prev) => !prev)\n }\n }\n\n // Keyboard shortcut: Cmd/Ctrl + B\n const handleShortcut = (event: KeyboardEvent) => {\n // Skip if collapsible is \"none\"\n if (props.collapsible === \"none\") return\n\n // Don't trigger when focus is in an editable element (input, textarea, contenteditable)\n const target = event.target as HTMLElement | null\n if (target?.closest?.(\"input, textarea\") || target?.isContentEditable) return\n\n // Check for Cmd (Mac) or Ctrl (Windows/Linux) + B\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey) &&\n !event.altKey &&\n !event.shiftKey\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n onMounted(() => window.addEventListener(\"keydown\", handleShortcut))\n onBeforeUnmount(() => window.removeEventListener(\"keydown\", handleShortcut))\n\n // Close mobile menu on escape key\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n setOpenMobile(false)\n }\n }\n watch(\n openMobile,\n (isOpen, _, onCleanup) => {\n if (!isOpen) return\n window.addEventListener(\"keydown\", handleEscape)\n onCleanup(() => window.removeEventListener(\"keydown\", handleEscape))\n },\n { flush: \"post\" },\n )\n onBeforeUnmount(() => window.removeEventListener(\"keydown\", handleEscape))\n\n // Derive state from open boolean\n const state = computed<SidebarState>(() => (open.value ? \"expanded\" : \"collapsed\"))\n\n const context = reactive({\n state,\n open,\n setOpen: setOpen as (open: boolean) => void,\n openMobile,\n setOpenMobile: setOpenMobile as (open: boolean) => void,\n isMobile,\n collapsible: computed(() => props.collapsible),\n toggleSidebar,\n }) as SidebarContextValue\n\n provide(SidebarContextKey, context)\n\n return () =>\n h(\n \"div\",\n {\n \"class\": attrs.class,\n \"style\": [\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-mobile\": SIDEBAR_WIDTH_MOBILE,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n },\n attrs.style as StyleValue,\n ],\n \"data-sidebar\": state.value,\n \"data-mobile-menu\": openMobile.value ? \"visible\" : \"hidden\",\n \"data-collapsible\": props.collapsible,\n },\n slots.default?.(context) as never,\n )\n },\n})\n\ntype SidebarProviderOwnProps = InstanceType<typeof SidebarProviderComponent>[\"$props\"]\n\nexport type SidebarProviderProps = SidebarProviderOwnProps & SidebarProviderAttrs\n\n/**\n * Handles the sidebar state and provides it to every part. Like React, it\n * renders a `<div>` that takes only `class` and `style`. The default slot\n * receives the context (`v-slot=\"{ state, toggleSidebar }\"`).\n */\nexport const SidebarProvider = SidebarProviderComponent as typeof SidebarProviderComponent & {\n new (): { $props: SidebarProviderProps }\n}\n\n// Re-export constants for external use\nexport const SIDEBAR_CONSTANTS = {\n WIDTH: SIDEBAR_WIDTH,\n WIDTH_MOBILE: SIDEBAR_WIDTH_MOBILE,\n WIDTH_ICON: SIDEBAR_WIDTH_ICON,\n KEYBOARD_SHORTCUT: SIDEBAR_KEYBOARD_SHORTCUT,\n MOBILE_BREAKPOINT,\n COOKIE_NAME: SIDEBAR_COOKIE_NAME,\n COOKIE_MAX_AGE: SIDEBAR_COOKIE_MAX_AGE,\n} as const\n"]}
1
+ {"version":3,"file":"useSidebarContext.js","sourceRoot":"","sources":["../../../../src/components/Sidebar/useSidebarContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,eAAe,EACf,SAAS,EACT,OAAO,EACP,QAAQ,EACR,GAAG,EACH,KAAK,GAKN,MAAM,KAAK,CAAA;AACZ,OAAO,CAAC,MAAM,sDAAsD,CAAA;AAEpE,wEAAwE;AACxE,kEAAkE;AAClE,uEAAuE;AACvE,+DAA+D;AAC/D,6EAA6E;AAC7E,yCAAyC;AACzC,6EAA6E;AAC7E,mFAAmF;AACnF,4EAA4E;AAC5E,gDAAgD;AAEhD,YAAY;AACZ,MAAM,mBAAmB,GAAG,eAAe,CAAA;AAC3C,MAAM,sBAAsB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA,CAAC,SAAS;AACzD,MAAM,aAAa,GAAG,OAAO,CAAA;AAC7B,MAAM,iBAAiB,GAAG,OAAO,CAAA;AACjC,MAAM,oBAAoB,GAAG,OAAO,CAAA;AACpC,MAAM,kBAAkB,GAAG,MAAM,CAAA;AACjC,MAAM,yBAAyB,GAAG,GAAG,CAAA;AACrC,MAAM,iBAAiB,GAAG,GAAG,CAAA;AAsB7B,UAAU;AACV,MAAM,iBAAiB,GAAsC,MAAM,CAAC,eAAe,CAAC,CAAA;AAEpF,8FAA8F;AAC9F,MAAM,CAAC,MAAM,UAAU,GAAG,GAAwB,EAAE;IAClD,MAAM,OAAO,GAAG,MAAM,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAA;IAE/C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK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BAC9E,wBAAwB,EAAE,oBAAoB;oBAC9C,sBAAsB,EAAE,kBAAkB;iBAC3C;gBACD,KAAK,CAAC,KAAmB;aAC1B;YACD,cAAc,EAAE,KAAK,CAAC,KAAK;YAC3B,kBAAkB,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ;YAC3D,kBAAkB,EAAE,KAAK,CAAC,WAAW;SACtC,EACD,KAAK,CAAC,OAAO,EAAE,CAAC,OAAO,CAAU,CAClC,CAAA;IACL,CAAC;CACF,CAAC,CAAA;AAMF;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,wBAE9B,CAAA;AAED,uCAAuC;AACvC,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,iBAAiB;IAC5B,YAAY,EAAE,oBAAoB;IAClC,UAAU,EAAE,kBAAkB;IAC9B,iBAAiB,EAAE,yBAAyB;IAC5C,iBAAiB;IACjB,WAAW,EAAE,mBAAmB;IAChC,cAAc,EAAE,sBAAsB;CAC9B,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n type InjectionKey,\n type PropType,\n type SlotsType,\n type StyleValue,\n} from \"vue\"\nimport s from \"@plexui/styles/components/Sidebar/Sidebar.module.css\"\n\n// Vue port of packages/ui/src/components/Sidebar/useSidebarContext.tsx.\n// - `useSidebar()` returns the context as a reactive object (read\n// `sidebar.state`; destructuring outside a render loses reactivity).\n// Templates get the same object as the default slot props of\n// SidebarProvider (`v-slot=\"{ state, toggleSidebar }\"`), the way Popover's\n// content slot exposes its controller.\n// - `open` + `update:open` support `v-model:open`. As in React, the provider\n// is controlled only when `open` is passed; `update:open` is emitted either way.\n// - Mobile detection, the Cmd/Ctrl+B shortcut and the Escape listener start\n// on mount, as React's effects do (SSR-safe).\n\n// Constants\nconst SIDEBAR_COOKIE_NAME = \"sidebar:state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7 // 7 days\nconst SIDEBAR_WIDTH = \"240px\"\nconst SIDEBAR_WIDTH_APP = \"260px\"\nconst SIDEBAR_WIDTH_MOBILE = \"288px\"\nconst SIDEBAR_WIDTH_ICON = \"64px\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\nconst MOBILE_BREAKPOINT = 768\n\n// Types\nexport type SidebarState = \"expanded\" | \"collapsed\"\nexport type SidebarCollapsible = \"offcanvas\" | \"icon\" | \"none\"\nexport type SidebarSide = \"left\" | \"right\"\nexport type SidebarVariant = \"sidebar\" | \"docs\"\nexport type SidebarProviderVariant = \"sidebar\" | \"app\"\n\ntype SetBoolean = (value: boolean | ((prev: boolean) => boolean)) => void\n\nexport type SidebarContextValue = {\n state: SidebarState\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n collapsible: SidebarCollapsible\n toggleSidebar: () => void\n}\n\n// Context\nconst SidebarContextKey: InjectionKey<SidebarContextValue> = Symbol(\"PlexUISidebar\")\n\n/** Sidebar state and controls; call it in `setup()` of a component inside SidebarProvider. */\nexport const useSidebar = (): SidebarContextValue => {\n const context = inject(SidebarContextKey, null)\n\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider\")\n }\n\n return context\n}\n\n// Composable for mobile detection via matchMedia\nfunction useIsMobile() {\n const isMobile = ref(false)\n let cleanup: (() => void) | undefined\n\n onMounted(() => {\n // Check if we're in browser environment\n if (typeof window === \"undefined\") return\n\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)\n\n const handleChange = () => {\n isMobile.value = mql.matches\n }\n handleChange() // Initial check\n\n mql.addEventListener(\"change\", handleChange)\n cleanup = () => mql.removeEventListener(\"change\", handleChange)\n })\n onBeforeUnmount(() => cleanup?.())\n\n return isMobile\n}\n\n/** Native attributes of the provider's `<div>` that React accepts: `class` and `style`. */\nexport type SidebarProviderAttrs = { class?: unknown; style?: StyleValue }\n\nconst SidebarProviderComponent = defineComponent({\n name: \"SidebarProvider\",\n inheritAttrs: false,\n props: {\n /** Default open state (uncontrolled). @default true */\n defaultOpen: { type: Boolean, default: true },\n /** Controlled open state (`v-model:open`) */\n open: { type: Boolean, default: undefined },\n /** Collapsible mode. @default \"offcanvas\" */\n collapsible: { type: String as PropType<SidebarCollapsible>, default: \"offcanvas\" },\n /** \"app\" is the shell of a product: a quiet rail, pill rows and on a phone a drawer under the page. @default \"sidebar\" */\n variant: { type: String as PropType<SidebarProviderVariant>, default: \"sidebar\" },\n },\n emits: {\n /** The open state changes (`v-model:open`) */\n \"update:open\": (_open: boolean) => true,\n },\n slots: Object as SlotsType<{ default?: (context: SidebarContextValue) => unknown }>,\n setup(props, { attrs, slots, emit }) {\n const isMobile = useIsMobile()\n const openMobile = ref(false)\n\n // Controlled vs uncontrolled state for desktop\n const internalOpen = ref(props.defaultOpen)\n const open = computed(() => props.open ?? internalOpen.value)\n\n const setOpen: SetBoolean = (value) => {\n const openState = typeof value === \"function\" ? value(open.value) : value\n\n // Controlled only when `open` is passed; update:open alone is a notification\n if (props.open === undefined) {\n internalOpen.value = openState\n }\n emit(\"update:open\", openState)\n\n // Persist state in cookie for SSR\n if (typeof document !== \"undefined\") {\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n }\n }\n\n const setOpenMobile: SetBoolean = (value) => {\n openMobile.value = typeof value === \"function\" ? value(openMobile.value) : value\n }\n\n // Toggle function that handles both mobile and desktop\n const toggleSidebar = () => {\n if (isMobile.value) {\n setOpenMobile((prev) => !prev)\n } else {\n setOpen((prev) => !prev)\n }\n }\n\n // Keyboard shortcut: Cmd/Ctrl + B\n const handleShortcut = (event: KeyboardEvent) => {\n // Skip if collapsible is \"none\"\n if (props.collapsible === \"none\") return\n\n // Don't trigger when focus is in an editable element (input, textarea, contenteditable)\n const target = event.target as HTMLElement | null\n if (target?.closest?.(\"input, textarea\") || target?.isContentEditable) return\n\n // Check for Cmd (Mac) or Ctrl (Windows/Linux) + B\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey) &&\n !event.altKey &&\n !event.shiftKey\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n onMounted(() => window.addEventListener(\"keydown\", handleShortcut))\n onBeforeUnmount(() => window.removeEventListener(\"keydown\", handleShortcut))\n\n // Close mobile menu on escape key\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n setOpenMobile(false)\n }\n }\n watch(\n openMobile,\n (isOpen, _, onCleanup) => {\n if (!isOpen) return\n window.addEventListener(\"keydown\", handleEscape)\n onCleanup(() => window.removeEventListener(\"keydown\", handleEscape))\n },\n { flush: \"post\" },\n )\n onBeforeUnmount(() => window.removeEventListener(\"keydown\", handleEscape))\n\n // Derive state from open boolean\n const state = computed<SidebarState>(() => (open.value ? \"expanded\" : \"collapsed\"))\n\n const context = reactive({\n state,\n open,\n setOpen: setOpen as (open: boolean) => void,\n openMobile,\n setOpenMobile: setOpenMobile as (open: boolean) => void,\n isMobile,\n collapsible: computed(() => props.collapsible),\n toggleSidebar,\n }) as SidebarContextValue\n\n provide(SidebarContextKey, context)\n\n return () =>\n h(\n \"div\",\n {\n \"class\": [props.variant === \"app\" && s.App, attrs.class],\n \"style\": [\n {\n \"--sidebar-width\": props.variant === \"app\" ? SIDEBAR_WIDTH_APP : SIDEBAR_WIDTH,\n \"--sidebar-width-mobile\": SIDEBAR_WIDTH_MOBILE,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n },\n attrs.style as StyleValue,\n ],\n \"data-sidebar\": state.value,\n \"data-mobile-menu\": openMobile.value ? \"visible\" : \"hidden\",\n \"data-collapsible\": props.collapsible,\n },\n slots.default?.(context) as never,\n )\n },\n})\n\ntype SidebarProviderOwnProps = InstanceType<typeof SidebarProviderComponent>[\"$props\"]\n\nexport type SidebarProviderProps = SidebarProviderOwnProps & SidebarProviderAttrs\n\n/**\n * Handles the sidebar state and provides it to every part. Like React, it\n * renders a `<div>` that takes only `class` and `style`. The default slot\n * receives the context (`v-slot=\"{ state, toggleSidebar }\"`).\n */\nexport const SidebarProvider = SidebarProviderComponent as typeof SidebarProviderComponent & {\n new (): { $props: SidebarProviderProps }\n}\n\n// Re-export constants for external use\nexport const SIDEBAR_CONSTANTS = {\n WIDTH: SIDEBAR_WIDTH,\n WIDTH_APP: SIDEBAR_WIDTH_APP,\n WIDTH_MOBILE: SIDEBAR_WIDTH_MOBILE,\n WIDTH_ICON: SIDEBAR_WIDTH_ICON,\n KEYBOARD_SHORTCUT: SIDEBAR_KEYBOARD_SHORTCUT,\n MOBILE_BREAKPOINT,\n COOKIE_NAME: SIDEBAR_COOKIE_NAME,\n COOKIE_MAX_AGE: SIDEBAR_COOKIE_MAX_AGE,\n} as const\n"]}
@@ -0,0 +1,117 @@
1
+ import { type HTMLAttributes, type PropType } from "vue";
2
+ export type PageWidth = "full" | "wide" | "column";
3
+ declare const PageComponent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ /**
5
+ * Width of the column that header and content share: `"full"` (edge to
6
+ * edge, for tables), `"wide"` (1280px, centred, for overviews) or `"column"`
7
+ * (768px, centred, for settings and forms). Set `--page-width` on the page
8
+ * for any other width.
9
+ * @default "full"
10
+ */
11
+ width: {
12
+ type: PropType<PageWidth>;
13
+ default: string;
14
+ };
15
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
16
+ [key: string]: any;
17
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18
+ /**
19
+ * Width of the column that header and content share: `"full"` (edge to
20
+ * edge, for tables), `"wide"` (1280px, centred, for overviews) or `"column"`
21
+ * (768px, centred, for settings and forms). Set `--page-width` on the page
22
+ * for any other width.
23
+ * @default "full"
24
+ */
25
+ width: {
26
+ type: PropType<PageWidth>;
27
+ default: string;
28
+ };
29
+ }>> & Readonly<{}>, {
30
+ width: PageWidth;
31
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
32
+ /** Props of `Page`. */
33
+ export type PageProps = {
34
+ width?: PageWidth;
35
+ } & HTMLAttributes;
36
+ export declare const Page: typeof PageComponent & {
37
+ new (): {
38
+ $props: PageProps;
39
+ };
40
+ };
41
+ /** The band above the content, one column with it (React `Page.Header`). */
42
+ export declare const PageHeader: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
43
+ /**
44
+ * Shows the line, and the glass on a phone, once the content has scrolled
45
+ * under the header. Turn it off when the content already draws a line of
46
+ * its own at that place.
47
+ * @default true
48
+ */
49
+ divider: {
50
+ type: BooleanConstructor;
51
+ default: boolean;
52
+ };
53
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
54
+ [key: string]: any;
55
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
56
+ /**
57
+ * Shows the line, and the glass on a phone, once the content has scrolled
58
+ * under the header. Turn it off when the content already draws a line of
59
+ * its own at that place.
60
+ * @default true
61
+ */
62
+ divider: {
63
+ type: BooleanConstructor;
64
+ default: boolean;
65
+ };
66
+ }>> & Readonly<{}>, {
67
+ divider: boolean;
68
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
69
+ /** The row of the title and the actions (React `Page.Bar`). */
70
+ export declare const PageBar: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
71
+ [key: string]: any;
72
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
73
+ /** Title with what stands beside it, a subtitle under it on a phone (React `Page.Heading`). */
74
+ export declare const PageHeading: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
75
+ [key: string]: any;
76
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
77
+ /** Page heading, an `<h1>` (React `Page.Title`). */
78
+ export declare const PageTitle: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
79
+ [key: string]: any;
80
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
81
+ /** Status of the page, a `<p>` (React `Page.Subtitle`). */
82
+ export declare const PageSubtitle: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
83
+ [key: string]: any;
84
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
85
+ /** Buttons on the trailing side of the bar (React `Page.Actions`). */
86
+ export declare const PageActions: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
87
+ [key: string]: any;
88
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
89
+ /** The part of the page that scrolls (React `Page.Content`). */
90
+ export declare const PageContent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
91
+ /**
92
+ * The content fills the page and scrolls inside itself, as a table does:
93
+ * the page stops scrolling from 768px up.
94
+ * @default false
95
+ */
96
+ fill: {
97
+ type: BooleanConstructor;
98
+ default: boolean;
99
+ };
100
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
101
+ [key: string]: any;
102
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
103
+ /**
104
+ * The content fills the page and scrolls inside itself, as a table does:
105
+ * the page stops scrolling from 768px up.
106
+ * @default false
107
+ */
108
+ fill: {
109
+ type: BooleanConstructor;
110
+ default: boolean;
111
+ };
112
+ }>> & Readonly<{}>, {
113
+ fill: boolean;
114
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
115
+ /** Props of the Page parts: native attributes of their element. */
116
+ export type PageSlotProps = HTMLAttributes;
117
+ export {};
@@ -0,0 +1 @@
1
+ export { Page, PageActions, PageBar, PageContent, PageHeader, PageHeading, PageSubtitle, PageTitle, type PageProps, type PageSlotProps, type PageWidth, } from "./Page.js";
@@ -1,8 +1,8 @@
1
1
  import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type DefineComponent, type HTMLAttributes, type LiHTMLAttributes, type PropType, type VNode } from "vue";
2
2
  import { Input, type InputProps } from "../Input/index.js";
3
- import { SidebarProvider, useSidebar, type SidebarCollapsible, type SidebarSide, type SidebarVariant } from "./useSidebarContext.js";
3
+ import { SidebarProvider, useSidebar, type SidebarCollapsible, type SidebarSide, type SidebarProviderVariant, type SidebarVariant } from "./useSidebarContext.js";
4
4
  export { SidebarProvider, useSidebar };
5
- export type { SidebarCollapsible, SidebarSide, SidebarVariant };
5
+ export type { SidebarCollapsible, SidebarProviderVariant, SidebarSide, SidebarVariant };
6
6
  type Part<A> = DefineComponent & {
7
7
  new (): {
8
8
  $props: A;
@@ -1,4 +1,4 @@
1
1
  export { Sidebar, SidebarCard, SidebarCardContent, SidebarCardFooter, SidebarCardHeader, SidebarCardTitle, SidebarCardTitleLink, SidebarContent, SidebarFooter, SidebarFooterLinks, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuButtonIcon, SidebarMenuButtonLabel, SidebarMenuChevron, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarMobile, SidebarMobileFooter, SidebarMobileHeader, SidebarMobileMenuButton, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, } from "./Sidebar.js";
2
- export type { SidebarCardContentProps, SidebarCardFooterProps, SidebarCardHeaderProps, SidebarCardProps, SidebarCardTitleLinkProps, SidebarCardTitleProps, SidebarCollapsible, SidebarContentProps, SidebarFooterLinksProps, SidebarFooterProps, SidebarGroupActionProps, SidebarGroupContentProps, SidebarGroupLabelProps, SidebarGroupProps, SidebarHeaderProps, SidebarInputProps, SidebarInsetProps, SidebarLayoutProps, SidebarMenuActionProps, SidebarMenuBadgeProps, SidebarMenuButtonIconProps, SidebarMenuButtonLabelProps, SidebarMenuButtonProps, SidebarMenuChevronProps, SidebarMenuItemProps, SidebarMenuProps, SidebarMenuSkeletonProps, SidebarMenuSubButtonProps, SidebarMenuSubItemProps, SidebarMenuSubProps, SidebarMobileFooterProps, SidebarMobileHeaderProps, SidebarMobileMenuButtonProps, SidebarMobileProps, SidebarProps, SidebarRailProps, SidebarSeparatorProps, SidebarSide, SidebarTriggerProps, SidebarVariant, } from "./Sidebar.js";
2
+ export type { SidebarCardContentProps, SidebarCardFooterProps, SidebarCardHeaderProps, SidebarCardProps, SidebarCardTitleLinkProps, SidebarCardTitleProps, SidebarCollapsible, SidebarContentProps, SidebarFooterLinksProps, SidebarFooterProps, SidebarGroupActionProps, SidebarGroupContentProps, SidebarGroupLabelProps, SidebarGroupProps, SidebarHeaderProps, SidebarInputProps, SidebarInsetProps, SidebarLayoutProps, SidebarMenuActionProps, SidebarMenuBadgeProps, SidebarMenuButtonIconProps, SidebarMenuButtonLabelProps, SidebarMenuButtonProps, SidebarMenuChevronProps, SidebarMenuItemProps, SidebarMenuProps, SidebarMenuSkeletonProps, SidebarMenuSubButtonProps, SidebarMenuSubItemProps, SidebarMenuSubProps, SidebarMobileFooterProps, SidebarMobileHeaderProps, SidebarMobileMenuButtonProps, SidebarMobileProps, SidebarProps, SidebarRailProps, SidebarSeparatorProps, SidebarSide, SidebarTriggerProps, SidebarProviderVariant, SidebarVariant, } from "./Sidebar.js";
3
3
  export type { SidebarContextValue, SidebarProviderProps, SidebarState } from "./useSidebarContext.js";
4
4
  export { SIDEBAR_CONSTANTS } from "./useSidebarContext.js";
@@ -3,6 +3,7 @@ export type SidebarState = "expanded" | "collapsed";
3
3
  export type SidebarCollapsible = "offcanvas" | "icon" | "none";
4
4
  export type SidebarSide = "left" | "right";
5
5
  export type SidebarVariant = "sidebar" | "docs";
6
+ export type SidebarProviderVariant = "sidebar" | "app";
6
7
  export type SidebarContextValue = {
7
8
  state: SidebarState;
8
9
  open: boolean;
@@ -36,6 +37,11 @@ declare const SidebarProviderComponent: import("vue").DefineComponent<import("vu
36
37
  type: PropType<SidebarCollapsible>;
37
38
  default: string;
38
39
  };
40
+ /** "app" is the shell of a product: a quiet rail, pill rows and on a phone a drawer under the page. @default "sidebar" */
41
+ variant: {
42
+ type: PropType<SidebarProviderVariant>;
43
+ default: string;
44
+ };
39
45
  }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
40
46
  [key: string]: any;
41
47
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -57,12 +63,18 @@ declare const SidebarProviderComponent: import("vue").DefineComponent<import("vu
57
63
  type: PropType<SidebarCollapsible>;
58
64
  default: string;
59
65
  };
66
+ /** "app" is the shell of a product: a quiet rail, pill rows and on a phone a drawer under the page. @default "sidebar" */
67
+ variant: {
68
+ type: PropType<SidebarProviderVariant>;
69
+ default: string;
70
+ };
60
71
  }>> & Readonly<{
61
72
  "onUpdate:open"?: ((_open: boolean) => any) | undefined;
62
73
  }>, {
63
74
  collapsible: SidebarCollapsible;
64
75
  open: boolean;
65
76
  defaultOpen: boolean;
77
+ variant: SidebarProviderVariant;
66
78
  }, SlotsType<{
67
79
  default?: (context: SidebarContextValue) => unknown;
68
80
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -80,6 +92,7 @@ export declare const SidebarProvider: typeof SidebarProviderComponent & {
80
92
  };
81
93
  export declare const SIDEBAR_CONSTANTS: {
82
94
  readonly WIDTH: "240px";
95
+ readonly WIDTH_APP: "260px";
83
96
  readonly WIDTH_MOBILE: "288px";
84
97
  readonly WIDTH_ICON: "64px";
85
98
  readonly KEYBOARD_SHORTCUT: "b";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/vue",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Plex UI components for Vue 3, built on Reka UI and the shared @plexui/styles CSS",
5
5
  "type": "module",
6
6
  "license": "MIT",