@adea-ai/ui 0.87.0 → 0.89.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +22 -0
  2. package/dist/components/composites/settings/index.d.ts +2 -0
  3. package/dist/components/composites/settings/index.d.ts.map +1 -1
  4. package/dist/components/composites/settings/index.js +3 -1
  5. package/dist/components/composites/settings/settings-layout.d.ts +28 -0
  6. package/dist/components/composites/settings/settings-layout.d.ts.map +1 -0
  7. package/dist/components/composites/settings/settings-layout.js +62 -0
  8. package/dist/components/composites/settings/settings-layout.js.map +1 -0
  9. package/dist/components/composites/settings/settings-navigation.d.ts +41 -0
  10. package/dist/components/composites/settings/settings-navigation.d.ts.map +1 -0
  11. package/dist/components/composites/settings/settings-navigation.js +102 -0
  12. package/dist/components/composites/settings/settings-navigation.js.map +1 -0
  13. package/dist/components/layout/sidebar-nav/index.d.ts +1 -1
  14. package/dist/components/layout/sidebar-nav/index.d.ts.map +1 -1
  15. package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts +18 -2
  16. package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts.map +1 -1
  17. package/dist/components/layout/sidebar-nav/sidebar-nav.js +42 -11
  18. package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
  19. package/dist/components/layout/top-bar/top-bar.d.ts +3 -1
  20. package/dist/components/layout/top-bar/top-bar.d.ts.map +1 -1
  21. package/dist/components/layout/top-bar/top-bar.js +4 -4
  22. package/dist/components/layout/top-bar/top-bar.js.map +1 -1
  23. package/dist/components/ui/tabs/tabs.d.ts.map +1 -1
  24. package/dist/components/ui/tabs/tabs.js +70 -13
  25. package/dist/components/ui/tabs/tabs.js.map +1 -1
  26. package/dist/index.js +3 -1
  27. package/dist/r/registry.json +12 -0
  28. package/dist/r/settings.json +12 -0
  29. package/dist/r/src/components/composites/settings/index.ts +7 -0
  30. package/dist/r/src/components/composites/settings/settings-layout.tsx +65 -0
  31. package/dist/r/src/components/composites/settings/settings-navigation.tsx +135 -0
  32. package/dist/r/src/components/layout/sidebar-nav/index.ts +2 -0
  33. package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +71 -16
  34. package/dist/r/src/components/layout/top-bar/top-bar.tsx +9 -5
  35. package/dist/r/src/components/ui/tabs/tabs.tsx +80 -10
  36. package/package.json +2 -1
  37. package/registry.json +12 -0
  38. package/src/components/composites/settings/index.ts +7 -0
  39. package/src/components/composites/settings/settings-layout.tsx +65 -0
  40. package/src/components/composites/settings/settings-navigation.tsx +135 -0
  41. package/src/components/layout/sidebar-nav/index.ts +2 -0
  42. package/src/components/layout/sidebar-nav/sidebar-nav.tsx +71 -16
  43. package/src/components/layout/top-bar/top-bar.tsx +9 -5
  44. package/src/components/ui/tabs/tabs.tsx +80 -10
package/README.md CHANGED
@@ -87,6 +87,12 @@ updates, navigation, and other effects remain host callbacks.
87
87
 
88
88
  `SidebarNavTitle` accepts polymorphic `as` for a host's title heading.
89
89
  Use `SidebarNavSection.headingAs` (h1 through h6) for section headings.
90
+ Sections may be uncontrolled with `defaultOpen` or controlled with `open` and
91
+ `onOpenChange`. Put disclosure-button attributes and host-owned row interactions
92
+ in `triggerProps`; its `onClick` and `onKeyDown` run before shared behavior, and
93
+ `preventDefault()` cancels the corresponding toggle or Alt+Arrow reorder callback.
94
+ `triggerProps.onReorder` receives `up` or `down`; the host remains responsible for
95
+ updating its hierarchy and preserving stable row identity.
90
96
  Disclosure buttons stay inside their heading and trailing actions stay outside
91
97
  it, preserving hierarchy and independent keyboard actions.
92
98
 
@@ -241,6 +247,16 @@ setSelection({ accent: 'amber' })
241
247
  Two components ship for the settings surface: `AppearancePanel` is the whole
242
248
  appearance view, and `ThemeToggle` is the light/dark switch on its own.
243
249
 
250
+ `SettingsLayout` composes a controlled vertical tab root, grouped `SettingsNavigation`,
251
+ and a scrollable panel viewport. Supply the selected `value`, `onChange`, navigation
252
+ groups, and matching `TabsContent` panels. The host owns URL or preference updates
253
+ and panel content; the layout contracts its rail at narrow widths, reports repeated
254
+ activation through `onReselect`, and reveals the selected row by default. Use
255
+ `SettingsNavigation` directly when you already own the surrounding tabs composition.
256
+ Shared tabs associate panels with custom trigger IDs in browser and server renders;
257
+ an explicit panel `aria-labelledby` takes precedence. Independent tab roots keep
258
+ their associations separate.
259
+
244
260
  ### Avoiding the flash
245
261
 
246
262
  A themed app has to know the appearance before the first paint, or it paints
@@ -710,6 +726,12 @@ composition evidence; bounded runtime projection, storage and production chat
710
726
  integration remain application acceptance gates. Attribution for the selected
711
727
  KiroCrew source contracts is recorded in the issue-specific `NOTICE` entry.
712
728
 
729
+ The shared `TopBar` contracts its middle track on narrow screens. Its side groups
730
+ scroll horizontally when enlarged text makes all controls wider than the viewport;
731
+ keyboard focus reveals each action. Groups opt out of native window dragging.
732
+ Use `TopBarTitle align="center"` for a centered title and layout-only visibility
733
+ classes when a title should yield space to essential controls.
734
+
713
735
  ### Controlled appearance mode
714
736
 
715
737
  `ThemeModeToggle` provides the shared light/dark/system selector for hosts that
@@ -1,2 +1,4 @@
1
1
  export { SettingsField, SettingsPage, SettingsRow, SettingsSection } from './settings';
2
+ export { SettingsLayout, type SettingsLayoutProps } from './settings-layout';
3
+ export { SettingsNavigation, type SettingsNavigationGroup, type SettingsNavigationItem, type SettingsNavigationProps, } from './settings-navigation';
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACtF,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5E,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAA"}
@@ -1,2 +1,4 @@
1
1
  import { SettingsField, SettingsPage, SettingsRow, SettingsSection } from "./settings.js";
2
- export { SettingsField, SettingsPage, SettingsRow, SettingsSection };
2
+ import { SettingsNavigation } from "./settings-navigation.js";
3
+ import { SettingsLayout } from "./settings-layout.js";
4
+ export { SettingsField, SettingsLayout, SettingsNavigation, SettingsPage, SettingsRow, SettingsSection };
@@ -0,0 +1,28 @@
1
+ import type { ComponentProps, JSX } from 'solid-js';
2
+ import { Tabs } from '../../ui/tabs';
3
+ import { type SettingsNavigationGroup } from './settings-navigation';
4
+ export type SettingsLayoutProps = Omit<ComponentProps<typeof Tabs>, 'children' | 'orientation' | 'value' | 'defaultValue' | 'onChange'> & {
5
+ /** Grouped navigation entries; the host owns their values and panel content. */
6
+ groups: readonly SettingsNavigationGroup[];
7
+ /** Accessible name for the vertical tab list. */
8
+ 'aria-label': string;
9
+ /** The host-controlled selected destination. */
10
+ value: string;
11
+ /** Updates the host-controlled selected destination. */
12
+ onChange: (value: string) => void;
13
+ /** Called when the already-selected destination is activated again. */
14
+ onReselect?: (value: string) => void;
15
+ /** Reveal the selected row on value changes and window resizes. Defaults to nearest scroll. */
16
+ revealSelected?: boolean | ((trigger: HTMLButtonElement | undefined) => void);
17
+ /** Panels must be rendered as `TabsContent` descendants. */
18
+ children?: JSX.Element;
19
+ };
20
+ /**
21
+ * SettingsLayout.
22
+ *
23
+ * A controlled, vertical settings rail beside its scrollable panel viewport.
24
+ * The host keeps ownership of selection, URL/hash state and panel content.
25
+ * At narrow viewports the rail contracts while both columns remain shrinkable.
26
+ */
27
+ export declare function SettingsLayout(props: SettingsLayoutProps): JSX.Element;
28
+ //# sourceMappingURL=settings-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-layout.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/settings/settings-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAGnD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAsB,KAAK,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAExF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,cAAc,CAAC,OAAO,IAAI,CAAC,EAC3B,UAAU,GAAG,aAAa,GAAG,OAAO,GAAG,cAAc,GAAG,UAAU,CACnE,GAAG;IACF,gFAAgF;IAChF,MAAM,EAAE,SAAS,uBAAuB,EAAE,CAAA;IAC1C,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAA;IACpB,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAA;IACb,wDAAwD;IACxD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,uEAAuE;IACvE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,+FAA+F;IAC/F,cAAc,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,iBAAiB,GAAG,SAAS,KAAK,IAAI,CAAC,CAAA;IAC7E,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CACvB,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,eA+BxD"}
@@ -0,0 +1,62 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { Tabs } from "../../ui/tabs/tabs.js";
3
+ import { SettingsNavigation } from "./settings-navigation.js";
4
+ import { createComponent, insert, mergeProps, template } from "solid-js/web";
5
+ import { splitProps } from "solid-js";
6
+ //#region src/components/composites/settings/settings-layout.tsx
7
+ var _tmpl$ = /*#__PURE__*/ template(`<div data-slot=settings-layout-panels class="min-h-0 min-w-0 flex-1 overflow-y-auto p-4">`);
8
+ /**
9
+ * SettingsLayout.
10
+ *
11
+ * A controlled, vertical settings rail beside its scrollable panel viewport.
12
+ * The host keeps ownership of selection, URL/hash state and panel content.
13
+ * At narrow viewports the rail contracts while both columns remain shrinkable.
14
+ */
15
+ function SettingsLayout(props) {
16
+ const [local, rest] = splitProps(props, [
17
+ "class",
18
+ "children",
19
+ "groups",
20
+ "aria-label",
21
+ "value",
22
+ "onReselect",
23
+ "revealSelected"
24
+ ]);
25
+ return createComponent(Tabs, mergeProps(rest, {
26
+ orientation: "vertical",
27
+ get value() {
28
+ return local.value;
29
+ },
30
+ get ["class"]() {
31
+ return cn("min-h-0 min-w-0 flex-1 gap-0", local.class);
32
+ },
33
+ get children() {
34
+ return [createComponent(SettingsNavigation, {
35
+ get ["aria-label"]() {
36
+ return local["aria-label"];
37
+ },
38
+ get groups() {
39
+ return local.groups;
40
+ },
41
+ get value() {
42
+ return local.value;
43
+ },
44
+ get onReselect() {
45
+ return local.onReselect;
46
+ },
47
+ get revealSelected() {
48
+ return local.revealSelected;
49
+ },
50
+ "class": "w-24 md:w-sidebar"
51
+ }), (() => {
52
+ var _el$ = _tmpl$();
53
+ insert(_el$, () => local.children);
54
+ return _el$;
55
+ })()];
56
+ }
57
+ }));
58
+ }
59
+ //#endregion
60
+ export { SettingsLayout };
61
+
62
+ //# sourceMappingURL=settings-layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-layout.js","names":["ComponentProps","JSX","splitProps","cn","Tabs","SettingsNavigation","SettingsNavigationGroup","SettingsLayoutProps","Omit","groups","value","onChange","onReselect","revealSelected","trigger","HTMLButtonElement","children","Element","SettingsLayout","props","local","rest","_$createComponent","_$mergeProps","orientation","class","aria-label","_el$","_tmpl$","_$insert","_$createComponent","_$mergeProps"],"sources":["../../../../src/components/composites/settings/settings-layout.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Tabs } from '../../ui/tabs'\nimport { SettingsNavigation, type SettingsNavigationGroup } from './settings-navigation'\n\nexport type SettingsLayoutProps = Omit<\n ComponentProps<typeof Tabs>,\n 'children' | 'orientation' | 'value' | 'defaultValue' | 'onChange'\n> & {\n /** Grouped navigation entries; the host owns their values and panel content. */\n groups: readonly SettingsNavigationGroup[]\n /** Accessible name for the vertical tab list. */\n 'aria-label': string\n /** The host-controlled selected destination. */\n value: string\n /** Updates the host-controlled selected destination. */\n onChange: (value: string) => void\n /** Called when the already-selected destination is activated again. */\n onReselect?: (value: string) => void\n /** Reveal the selected row on value changes and window resizes. Defaults to nearest scroll. */\n revealSelected?: boolean | ((trigger: HTMLButtonElement | undefined) => void)\n /** Panels must be rendered as `TabsContent` descendants. */\n children?: JSX.Element\n}\n\n/**\n * SettingsLayout.\n *\n * A controlled, vertical settings rail beside its scrollable panel viewport.\n * The host keeps ownership of selection, URL/hash state and panel content.\n * At narrow viewports the rail contracts while both columns remain shrinkable.\n */\nexport function SettingsLayout(props: SettingsLayoutProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'children',\n 'groups',\n 'aria-label',\n 'value',\n 'onReselect',\n 'revealSelected',\n ])\n\n return (\n <Tabs\n {...rest}\n orientation=\"vertical\"\n value={local.value}\n class={cn('min-h-0 min-w-0 flex-1 gap-0', local.class)}\n >\n <SettingsNavigation\n aria-label={local['aria-label']}\n groups={local.groups}\n value={local.value}\n onReselect={local.onReselect}\n revealSelected={local.revealSelected}\n class=\"w-24 md:w-sidebar\"\n />\n <div data-slot=\"settings-layout-panels\" class=\"min-h-0 min-w-0 flex-1 overflow-y-auto p-4\">\n {local.children}\n </div>\n </Tabs>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAiCA,SAAgBkB,eAAeC,OAA4B;CACzD,MAAM,CAACC,OAAOC,QAAQnB,WAAWiB,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;CAAgB,CACjB;CAED,OAAAG,gBACGlB,MAAImB,WACCF,MAAI;EACRG,aAAW;EAAA,IACXd,QAAK;GAAA,OAAEU,MAAMV;EAAK;EAAA,KAAA,WAAA;GAAA,OACXP,GAAG,gCAAgCiB,MAAMK,KAAK;EAAC;EAAA,IAAAT,WAAA;GAAA,OAAA,CAAAM,gBAErDjB,oBAAkB;IAAA,KAAA,gBAAA;KAAA,OACLe,MAAM;IAAa;IAAA,IAC/BX,SAAM;KAAA,OAAEW,MAAMX;IAAM;IAAA,IACpBC,QAAK;KAAA,OAAEU,MAAMV;IAAK;IAAA,IAClBE,aAAU;KAAA,OAAEQ,MAAMR;IAAU;IAAA,IAC5BC,iBAAc;KAAA,OAAEO,MAAMP;IAAc;IAAA,SAAA;GAAA,CAAA,UAAA;IAAA,IAAAc,OAAAC,OAAA;IAAAC,OAAAF,YAInCP,MAAMJ,QAAQ;IAAA,OAAAW;GAAA,EAAA,CAAA,CAAA;EAAA;CAAA,CAAA,CAAA;AAIvB"}
@@ -0,0 +1,41 @@
1
+ import type { JSX } from 'solid-js';
2
+ import { type TabsListProps } from '../../ui/tabs';
3
+ /** One host-owned destination in a settings tab list. Values must be unique. */
4
+ export type SettingsNavigationItem = {
5
+ value: string;
6
+ label: string;
7
+ icon?: JSX.Element;
8
+ disabled?: boolean;
9
+ };
10
+ /** A visible, accessibly named group of settings destinations. */
11
+ export type SettingsNavigationGroup = {
12
+ label: string;
13
+ items: readonly SettingsNavigationItem[];
14
+ };
15
+ export type SettingsNavigationProps = Omit<TabsListProps, 'appearance' | 'children' | 'orientation'> & {
16
+ /** Groups are presentation only; the host owns the tab values and panels. */
17
+ groups: readonly SettingsNavigationGroup[];
18
+ /** The same controlled value supplied to the enclosing `Tabs`. */
19
+ value: string;
20
+ /** Called when the already-selected destination is activated again. */
21
+ onReselect?: (value: string) => void;
22
+ /** Reveal the selected row on value changes and window resizes. Defaults to nearest scroll. */
23
+ revealSelected?: boolean | ((trigger: HTMLButtonElement | undefined) => void);
24
+ /** Every tab list needs a label independent of its visible group headings. */
25
+ 'aria-label': string;
26
+ };
27
+ /**
28
+ * SettingsNavigation.
29
+ *
30
+ * A grouped vertical tab list for sibling settings panels. It composes the
31
+ * shared Tabs behaviour with the shared sidebar row recipe; the host supplies
32
+ * the controlled value, panel content, icons and any persistence or routing.
33
+ * Use ordinary tabs for a short, ungrouped row of view choices.
34
+ *
35
+ * Kobalte owns roving focus, arrow keys, selection and tab/panel ARIA. This
36
+ * component adds no URL, storage or host-specific state. Set
37
+ * `revealSelected={false}` when the surrounding layout does not use an internal
38
+ * scrolling viewport.
39
+ */
40
+ export declare function SettingsNavigation(props: SettingsNavigationProps): JSX.Element;
41
+ //# sourceMappingURL=settings-navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-navigation.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/settings/settings-navigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAInC,OAAO,EAAyB,KAAK,aAAa,EAAE,MAAM,eAAe,CAAA;AAEzE,gFAAgF;AAChF,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,kEAAkE;AAClE,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,SAAS,sBAAsB,EAAE,CAAA;CACzC,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,aAAa,EACb,YAAY,GAAG,UAAU,GAAG,aAAa,CAC1C,GAAG;IACF,6EAA6E;IAC7E,MAAM,EAAE,SAAS,uBAAuB,EAAE,CAAA;IAC1C,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,+FAA+F;IAC/F,cAAc,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,iBAAiB,GAAG,SAAS,KAAK,IAAI,CAAC,CAAA;IAC7E,8EAA8E;IAC9E,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,eAqFhE"}
@@ -0,0 +1,102 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { TabsList, TabsTrigger } from "../../ui/tabs/tabs.js";
3
+ import { sidebarNavItemClass, sidebarNavItemStateClass } from "../../layout/sidebar-nav/sidebar-nav.js";
4
+ import { createComponent, insert, memo, mergeProps, setAttribute, template } from "solid-js/web";
5
+ import { createEffect, createUniqueId, onCleanup, splitProps } from "solid-js";
6
+ //#region src/components/composites/settings/settings-navigation.tsx
7
+ var _tmpl$ = /*#__PURE__*/ template(`<div role=none data-slot=settings-navigation-group class="flex min-w-0 flex-col gap-0.5"><span class=sr-only></span><span aria-hidden=true class="px-2 py-1.5 text-2xs font-medium tracking-wide text-sidebar-muted-foreground uppercase">`);
8
+ var _tmpl$2 = /*#__PURE__*/ template(`<span class="min-w-0 truncate">`);
9
+ /**
10
+ * SettingsNavigation.
11
+ *
12
+ * A grouped vertical tab list for sibling settings panels. It composes the
13
+ * shared Tabs behaviour with the shared sidebar row recipe; the host supplies
14
+ * the controlled value, panel content, icons and any persistence or routing.
15
+ * Use ordinary tabs for a short, ungrouped row of view choices.
16
+ *
17
+ * Kobalte owns roving focus, arrow keys, selection and tab/panel ARIA. This
18
+ * component adds no URL, storage or host-specific state. Set
19
+ * `revealSelected={false}` when the surrounding layout does not use an internal
20
+ * scrolling viewport.
21
+ */
22
+ function SettingsNavigation(props) {
23
+ const [local, rest] = splitProps(props, [
24
+ "class",
25
+ "aria-label",
26
+ "groups",
27
+ "value",
28
+ "onReselect",
29
+ "revealSelected"
30
+ ]);
31
+ const triggers = /* @__PURE__ */ new Map();
32
+ const groupIdPrefix = `settings-navigation-${createUniqueId()}`;
33
+ createEffect(() => {
34
+ const value = local.value;
35
+ const reveal = local.revealSelected;
36
+ if (reveal === false) return;
37
+ const revealCurrent = () => {
38
+ const trigger = triggers.get(value);
39
+ if (typeof reveal === "function") reveal(trigger);
40
+ else trigger?.scrollIntoView({
41
+ block: "nearest",
42
+ inline: "nearest"
43
+ });
44
+ };
45
+ revealCurrent();
46
+ window.addEventListener("resize", revealCurrent);
47
+ onCleanup(() => window.removeEventListener("resize", revealCurrent));
48
+ });
49
+ return createComponent(TabsList, mergeProps({
50
+ "data-slot": "settings-navigation",
51
+ get ["aria-label"]() {
52
+ return local["aria-label"];
53
+ },
54
+ orientation: "vertical",
55
+ get ["class"]() {
56
+ return cn("flex max-h-full min-h-0 min-w-0 shrink-0 flex-col items-stretch justify-start gap-2 overflow-x-hidden overflow-y-auto px-2 py-2", local.class);
57
+ }
58
+ }, rest, { get children() {
59
+ return local.groups.map((group, groupIndex) => {
60
+ const groupId = `${groupIdPrefix}-group-${groupIndex}`;
61
+ return (() => {
62
+ var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
63
+ setAttribute(_el$2, "id", groupId);
64
+ insert(_el$2, () => group.label);
65
+ insert(_el$3, () => group.label);
66
+ insert(_el$, () => group.items.map((item) => createComponent(TabsTrigger, {
67
+ "data-slot": "settings-navigation-trigger",
68
+ orientation: "vertical",
69
+ "aria-describedby": groupId,
70
+ get value() {
71
+ return item.value;
72
+ },
73
+ get disabled() {
74
+ return item.disabled;
75
+ },
76
+ ref: (element) => {
77
+ if (element) triggers.set(item.value, element);
78
+ else triggers.delete(item.value);
79
+ },
80
+ onClick: () => {
81
+ if (local.value === item.value) local.onReselect?.(item.value);
82
+ },
83
+ get ["class"]() {
84
+ return cn(sidebarNavItemClass, sidebarNavItemStateClass.idle, "h-row-lg w-full justify-start border-0 px-3 py-2 text-left data-[selected]:bg-primary-subtle data-[selected]:text-foreground");
85
+ },
86
+ get children() {
87
+ return [memo(() => item.icon), (() => {
88
+ var _el$4 = _tmpl$2();
89
+ insert(_el$4, () => item.label);
90
+ return _el$4;
91
+ })()];
92
+ }
93
+ })), null);
94
+ return _el$;
95
+ })();
96
+ });
97
+ } }));
98
+ }
99
+ //#endregion
100
+ export { SettingsNavigation };
101
+
102
+ //# sourceMappingURL=settings-navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-navigation.js","names":["JSX","createEffect","createUniqueId","onCleanup","splitProps","cn","sidebarNavItemClass","sidebarNavItemStateClass","TabsList","TabsTrigger","TabsListProps","SettingsNavigationItem","value","label","icon","Element","disabled","SettingsNavigationGroup","items","SettingsNavigationProps","Omit","groups","onReselect","revealSelected","trigger","HTMLButtonElement","SettingsNavigation","props","local","rest","triggers","Map","groupIdPrefix","reveal","revealCurrent","get","scrollIntoView","block","inline","window","addEventListener","removeEventListener","_$createComponent","_$mergeProps","aria-label","orientation","class","children","map","group","groupIndex","groupId","_el$","_tmpl$","_el$2","firstChild","_el$3","nextSibling","_$setAttribute","_$insert","item","ref","element","set","delete","onClick","idle","_$memo","_el$4","_tmpl$2","_$createComponent","_$mergeProps","_$memo"],"sources":["../../../../src/components/composites/settings/settings-navigation.tsx"],"sourcesContent":["import type { JSX } from 'solid-js'\nimport { createEffect, createUniqueId, onCleanup, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { sidebarNavItemClass, sidebarNavItemStateClass } from '../../layout/sidebar-nav/sidebar-nav'\nimport { TabsList, TabsTrigger, type TabsListProps } from '../../ui/tabs'\n\n/** One host-owned destination in a settings tab list. Values must be unique. */\nexport type SettingsNavigationItem = {\n value: string\n label: string\n icon?: JSX.Element\n disabled?: boolean\n}\n\n/** A visible, accessibly named group of settings destinations. */\nexport type SettingsNavigationGroup = {\n label: string\n items: readonly SettingsNavigationItem[]\n}\n\nexport type SettingsNavigationProps = Omit<\n TabsListProps,\n 'appearance' | 'children' | 'orientation'\n> & {\n /** Groups are presentation only; the host owns the tab values and panels. */\n groups: readonly SettingsNavigationGroup[]\n /** The same controlled value supplied to the enclosing `Tabs`. */\n value: string\n /** Called when the already-selected destination is activated again. */\n onReselect?: (value: string) => void\n /** Reveal the selected row on value changes and window resizes. Defaults to nearest scroll. */\n revealSelected?: boolean | ((trigger: HTMLButtonElement | undefined) => void)\n /** Every tab list needs a label independent of its visible group headings. */\n 'aria-label': string\n}\n\n/**\n * SettingsNavigation.\n *\n * A grouped vertical tab list for sibling settings panels. It composes the\n * shared Tabs behaviour with the shared sidebar row recipe; the host supplies\n * the controlled value, panel content, icons and any persistence or routing.\n * Use ordinary tabs for a short, ungrouped row of view choices.\n *\n * Kobalte owns roving focus, arrow keys, selection and tab/panel ARIA. This\n * component adds no URL, storage or host-specific state. Set\n * `revealSelected={false}` when the surrounding layout does not use an internal\n * scrolling viewport.\n */\nexport function SettingsNavigation(props: SettingsNavigationProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'aria-label',\n 'groups',\n 'value',\n 'onReselect',\n 'revealSelected',\n ])\n const triggers = new Map<string, HTMLButtonElement>()\n const groupIdPrefix = `settings-navigation-${createUniqueId()}`\n\n createEffect(() => {\n const value = local.value\n const reveal = local.revealSelected\n if (reveal === false) return\n\n const revealCurrent = () => {\n const trigger = triggers.get(value)\n if (typeof reveal === 'function') reveal(trigger)\n else trigger?.scrollIntoView({ block: 'nearest', inline: 'nearest' })\n }\n\n revealCurrent()\n window.addEventListener('resize', revealCurrent)\n onCleanup(() => window.removeEventListener('resize', revealCurrent))\n })\n\n return (\n <TabsList\n data-slot=\"settings-navigation\"\n aria-label={local['aria-label']}\n orientation=\"vertical\"\n class={cn(\n 'flex max-h-full min-h-0 min-w-0 shrink-0 flex-col items-stretch justify-start gap-2 overflow-x-hidden overflow-y-auto px-2 py-2',\n local.class\n )}\n {...rest}\n >\n {local.groups.map((group, groupIndex) => {\n const groupId = `${groupIdPrefix}-group-${groupIndex}`\n return (\n <div\n role=\"none\"\n data-slot=\"settings-navigation-group\"\n class=\"flex min-w-0 flex-col gap-0.5\"\n >\n <span id={groupId} class=\"sr-only\">\n {group.label}\n </span>\n <span\n aria-hidden=\"true\"\n class=\"px-2 py-1.5 text-2xs font-medium tracking-wide text-sidebar-muted-foreground uppercase\"\n >\n {group.label}\n </span>\n {group.items.map((item) => (\n <TabsTrigger\n data-slot=\"settings-navigation-trigger\"\n orientation=\"vertical\"\n aria-describedby={groupId}\n value={item.value}\n disabled={item.disabled}\n ref={(element: HTMLButtonElement | undefined) => {\n if (element) triggers.set(item.value, element)\n else triggers.delete(item.value)\n }}\n onClick={() => {\n if (local.value === item.value) local.onReselect?.(item.value)\n }}\n class={cn(\n sidebarNavItemClass,\n sidebarNavItemStateClass.idle,\n 'h-row-lg w-full justify-start border-0 px-3 py-2 text-left data-[selected]:bg-primary-subtle data-[selected]:text-foreground'\n )}\n >\n {item.icon}\n <span class=\"min-w-0 truncate\">{item.label}</span>\n </TabsTrigger>\n ))}\n </div>\n )\n })}\n </TabsList>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiDA,SAAgB0B,mBAAmBC,OAAgC;CACjE,MAAM,CAACC,OAAOC,QAAQzB,WAAWuB,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;CAAgB,CACjB;CACD,MAAMG,2BAAW,IAAIC,IAA+B;CACpD,MAAMC,gBAAgB,uBAAuB9B,eAAe;CAE5DD,mBAAmB;EACjB,MAAMW,QAAQgB,MAAMhB;EACpB,MAAMqB,SAASL,MAAML;EACrB,IAAIU,WAAW,OAAO;EAEtB,MAAMC,sBAAsB;GAC1B,MAAMV,UAAUM,SAASK,IAAIvB,KAAK;GAClC,IAAI,OAAOqB,WAAW,YAAYA,OAAOT,OAAO;QAC3CA,SAASY,eAAe;IAAEC,OAAO;IAAWC,QAAQ;GAAU,CAAC;EACtE;EAEAJ,cAAc;EAC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OAAA,OAAAuD;MAAA,EAAA,CAAA,CAAA;KAAA;IAAA,CAAA,CAE7C,GAAC,IAAA;IAAA,OAAAhB;GAAA,EAAA,CAAA;EAGR,CAAC;CAAC,EAAA,CAAA,CAAA;AAGR"}
@@ -1,3 +1,3 @@
1
- export { SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavSection, SidebarNavTitle, sidebarNavItemClass, sidebarNavItemStateClass, type SidebarNavItemProps, type SidebarNavProps, type SidebarNavTitleProps, } from './sidebar-nav';
1
+ export { SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavSection, SidebarNavTitle, sidebarNavItemClass, sidebarNavItemStateClass, type SidebarNavItemProps, type SidebarNavProps, type SidebarNavSectionProps, type SidebarNavSectionTriggerProps, type SidebarNavTitleProps, } from './sidebar-nav';
2
2
  export { SidebarNavResizeHandle, type SidebarNavResizeHandleProps, } from './sidebar-nav-resize-handle';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/sidebar-nav/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,oBAAoB,GAC1B,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,sBAAsB,EACtB,KAAK,2BAA2B,GACjC,MAAM,6BAA6B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/sidebar-nav/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,EAClC,KAAK,oBAAoB,GAC1B,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,sBAAsB,EACtB,KAAK,2BAA2B,GACjC,MAAM,6BAA6B,CAAA"}
@@ -30,23 +30,39 @@ export declare function SidebarNavTitle<T extends ValidComponent = 'div'>(props:
30
30
  /** The scrolling middle of the sidebar. */
31
31
  export declare function SidebarNavContent(props: ComponentProps<'div'>): JSX.Element;
32
32
  export declare function SidebarNavFooter(props: ComponentProps<'div'>): JSX.Element;
33
+ /** Props forwarded to a collapsible section's disclosure button. */
34
+ export type SidebarNavSectionTriggerProps = Omit<ComponentProps<'button'>, 'type' | 'aria-expanded' | 'onClick' | 'onKeyDown' | 'children' | 'class' | 'style'> & {
35
+ /** Called for Alt+ArrowUp/Down; the host owns ordering and row identity. */
36
+ onReorder?: (direction: 'up' | 'down') => void;
37
+ /** Runs before the section toggle and may cancel it with `preventDefault()`. */
38
+ onClick?: ComponentProps<'button'>['onClick'];
39
+ /** Runs before shared Alt+Arrow handling and may cancel it with `preventDefault()`. */
40
+ onKeyDown?: ComponentProps<'button'>['onKeyDown'];
41
+ };
33
42
  /**
34
43
  * A titled, collapsible group. Collapsible because a list of projects
35
44
  * inevitably outgrows the column, and the user needs to put the ones they are
36
45
  * not using away *without* them disappearing into a menu.
37
46
  */
38
- export declare function SidebarNavSection(props: ComponentProps<'div'> & {
47
+ export type SidebarNavSectionProps = ComponentProps<'div'> & {
39
48
  label: string;
40
49
  /** Render a disclosure control instead of a plain heading. */
41
50
  collapsible?: boolean;
42
51
  defaultOpen?: boolean;
52
+ /** Controlled disclosure state. When supplied, the host owns changes. */
53
+ open?: boolean;
54
+ /** Called for user-initiated disclosure changes. */
55
+ onOpenChange?: (open: boolean) => void;
56
+ /** Native props and reorder callbacks for the disclosure control. */
57
+ triggerProps?: SidebarNavSectionTriggerProps;
43
58
  /** Count shown beside the label. */
44
59
  count?: number;
45
60
  /** A control at the trailing edge of the heading row. */
46
61
  action?: JSX.Element;
47
62
  /** Semantic heading element for a host's section hierarchy. */
48
63
  headingAs?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
49
- }): JSX.Element;
64
+ };
65
+ export declare function SidebarNavSection(props: SidebarNavSectionProps): JSX.Element;
50
66
  export type SidebarNavItemProps<T extends ValidComponent = 'a'> = PolymorphicProps<T, {
51
67
  class?: string;
52
68
  active?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar-nav.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/sidebar-nav/sidebar-nav.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAGjE,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAInE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,cAAc,GAAG,KAAK,IAAI,gBAAgB,CAC9E,CAAC,EACD;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAC1C,CAAA;AAED,wBAAgB,UAAU,CAAC,CAAC,SAAS,cAAc,GAAG,KAAK,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,eAgBrF;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eAS5D;AAED,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,cAAc,GAAG,KAAK,IAAI,gBAAgB,CACnF,CAAC,EACD;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CACnB,CAAA;AAED,wBAAgB,eAAe,CAAC,CAAC,SAAS,cAAc,GAAG,KAAK,EAAE,KAAK,EA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AAED,+EAA+E;AAC/E,eAAO,MAAM,mBAAmB,QAKrB,CAAA;AAEX,eAAO,MAAM,wBAAwB;;;CAGpC,CAAA;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,cAAc,GAAG,GAAG,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,eA4B3F;AAED,wEAAwE;AACxE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,QAAQ,CAAC,eAiB/D"}
@@ -1,5 +1,5 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
- import { createComponent, delegateEvents, effect, insert, memo, mergeProps, setAttribute, spread, template } from "solid-js/web";
2
+ import { createComponent, insert, memo, mergeProps, spread, template } from "solid-js/web";
3
3
  import { ChevronRight } from "lucide-solid";
4
4
  import { Show, createSignal, splitProps } from "solid-js";
5
5
  import { Polymorphic } from "@kobalte/core/polymorphic";
@@ -9,12 +9,18 @@ var _tmpl$2 = /*#__PURE__*/ template(`<div data-slot=sidebar-nav-content>`);
9
9
  var _tmpl$3 = /*#__PURE__*/ template(`<div data-slot=sidebar-nav-footer>`);
10
10
  var _tmpl$4 = /*#__PURE__*/ template(`<span class="min-w-0 flex-1 truncate">`);
11
11
  var _tmpl$5 = /*#__PURE__*/ template(`<span class="shrink-0 tabular-nums text-muted-foreground">`);
12
- var _tmpl$6 = /*#__PURE__*/ template(`<button type=button class="flex min-w-0 flex-1 items-center gap-1.5 rounded-sm text-2xs font-medium tracking-wide text-sidebar-muted-foreground uppercase outline-none transition-colors ease-out hover:text-sidebar-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle">`);
12
+ var _tmpl$6 = /*#__PURE__*/ template(`<button>`);
13
13
  var _tmpl$7 = /*#__PURE__*/ template(`<span class="shrink-0 opacity-0 transition-opacity ease-out group-hover/section-header:opacity-100 focus-within:opacity-100 [@media(hover:none)]:opacity-100">`);
14
14
  var _tmpl$8 = /*#__PURE__*/ template(`<div class="flex flex-col gap-0.5">`);
15
15
  var _tmpl$9 = /*#__PURE__*/ template(`<div data-slot=sidebar-nav-section><div class="group/section-header flex items-center gap-1 rounded-md px-2 py-1.5 hover:bg-sidebar-accent/60">`);
16
16
  var _tmpl$0 = /*#__PURE__*/ template(`<span class="ms-auto flex shrink-0 items-center gap-1">`);
17
17
  var _tmpl$1 = /*#__PURE__*/ template(`<button type=button>`);
18
+ function invokeEventHandler(handler, event) {
19
+ if (Array.isArray(handler)) {
20
+ const [callback, data] = handler;
21
+ callback(data, event);
22
+ } else if (typeof handler === "function") handler(event);
23
+ }
18
24
  function SidebarNav(props) {
19
25
  const [local, rest] = splitProps(props, [
20
26
  "class",
@@ -74,23 +80,31 @@ function SidebarNavFooter(props) {
74
80
  return _el$3;
75
81
  })();
76
82
  }
77
- /**
78
- * A titled, collapsible group. Collapsible because a list of projects
79
- * inevitably outgrows the column, and the user needs to put the ones they are
80
- * not using away *without* them disappearing into a menu.
81
- */
82
83
  function SidebarNavSection(props) {
83
84
  const [local, rest] = splitProps(props, [
84
85
  "class",
85
86
  "label",
86
87
  "collapsible",
87
88
  "defaultOpen",
89
+ "open",
90
+ "onOpenChange",
91
+ "triggerProps",
88
92
  "count",
89
93
  "action",
90
94
  "headingAs",
91
95
  "children"
92
96
  ]);
93
- const [open, setOpen] = createSignal(local.defaultOpen ?? true);
97
+ const [uncontrolledOpen, setUncontrolledOpen] = createSignal(local.defaultOpen ?? true);
98
+ const open = () => local.open ?? uncontrolledOpen();
99
+ const setOpen = (next) => {
100
+ if (local.open === void 0) setUncontrolledOpen(next);
101
+ local.onOpenChange?.(next);
102
+ };
103
+ const [trigger, triggerRest] = splitProps(local.triggerProps ?? {}, [
104
+ "onClick",
105
+ "onKeyDown",
106
+ "onReorder"
107
+ ]);
94
108
  const heading = [
95
109
  createComponent(Show, {
96
110
  get when() {
@@ -142,9 +156,27 @@ function SidebarNavSection(props) {
142
156
  fallback: heading,
143
157
  get children() {
144
158
  var _el$8 = _tmpl$6();
145
- _el$8.$$click = () => setOpen((value) => !value);
159
+ spread(_el$8, mergeProps(triggerRest, {
160
+ "type": "button",
161
+ get ["aria-expanded"]() {
162
+ return open();
163
+ },
164
+ "onClick": (event) => {
165
+ invokeEventHandler(trigger.onClick, event);
166
+ if (event.defaultPrevented) return;
167
+ setOpen(!open());
168
+ },
169
+ "onKeyDown": (event) => {
170
+ invokeEventHandler(trigger.onKeyDown, event);
171
+ if (event.defaultPrevented || !event.altKey) return;
172
+ if (event.key !== "ArrowUp" && event.key !== "ArrowDown") return;
173
+ event.preventDefault();
174
+ event.stopPropagation();
175
+ trigger.onReorder?.(event.key === "ArrowUp" ? "up" : "down");
176
+ },
177
+ "class": "flex min-w-0 flex-1 items-center gap-1.5 rounded-sm text-2xs font-medium tracking-wide text-sidebar-muted-foreground uppercase outline-none transition-colors ease-out hover:text-sidebar-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle"
178
+ }), false, true);
146
179
  insert(_el$8, heading);
147
- effect(() => setAttribute(_el$8, "aria-expanded", open()));
148
180
  return _el$8;
149
181
  }
150
182
  });
@@ -228,7 +260,6 @@ function SidebarNavButton(props) {
228
260
  return _el$10;
229
261
  })();
230
262
  }
231
- delegateEvents(["click"]);
232
263
  //#endregion
233
264
  export { SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavSection, SidebarNavTitle, sidebarNavItemClass, sidebarNavItemStateClass };
234
265
 
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar-nav.js","names":["PolymorphicProps","Polymorphic","ChevronRight","ComponentProps","JSX","ValidComponent","Show","createSignal","splitProps","cn","SidebarNavProps","T","class","SidebarNav","props","local","rest","_$createComponent","_$mergeProps","as","aria-label","children","SidebarNavHeader","_el$","_tmpl$","_$spread","SidebarNavTitleProps","SidebarNavTitle","SidebarNavContent","_el$2","_tmpl$2","SidebarNavFooter","_el$3","_tmpl$3","SidebarNavSection","label","collapsible","defaultOpen","count","action","Element","headingAs","open","setOpen","heading","when","_el$4","_tmpl$4","_$insert","undefined","_el$5","_tmpl$5","_el$6","_tmpl$9","_el$7","firstChild","_$memo","fallback","_el$8","_tmpl$6","$$click","value","_$effect","_$setAttribute","_el$9","_tmpl$7","_el$0","_tmpl$8","SidebarNavItemProps","active","nested","trailing","sidebarNavItemClass","join","sidebarNavItemStateClass","idle","SidebarNavItem","aria-current","data-active","_el$1","_tmpl$0","SidebarNavButton","_el$10","_tmpl$1","_$delegateEvents","_$createComponent","_$mergeProps","_$memo","_$setAttribute","_$delegateEvents"],"sources":["../../../../src/components/layout/sidebar-nav/sidebar-nav.tsx"],"sourcesContent":["import type { PolymorphicProps } from '@kobalte/core/polymorphic'\nimport { Polymorphic } from '@kobalte/core/polymorphic'\nimport { ChevronRight } from 'lucide-solid'\nimport type { ComponentProps, JSX, ValidComponent } from 'solid-js'\nimport { Show, createSignal, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * SidebarNav.\n *\n * The secondary navigation column: the list of things inside the destination\n * the rail selected — projects, sessions, files, threads. It is a different\n * object from the rail, not a wider version of it, which is why it is a separate\n * component rather than the rail with labels on.\n *\n * Rows share one recipe with the rail's, so a row in a sidebar and a row in a\n * rail read as the same kind of thing at the same density. That recipe is\n * exactly KiroCrew's nav row: `text-sm font-medium`, `gap-2.5`, `px-3 py-2`,\n * `rounded-md`, `transition-colors`.\n *\n * The width comes from `--sidebar-width`. Sections collapse by default only when\n * the caller says so, because a section that starts collapsed and holds the\n * user's own work is a hidden default.\n */\nexport type SidebarNavProps<T extends ValidComponent = 'nav'> = PolymorphicProps<\n T,\n { class?: string; 'aria-label'?: string }\n>\n\nexport function SidebarNav<T extends ValidComponent = 'nav'>(props: SidebarNavProps<T>) {\n const [local, rest] = splitProps(props as SidebarNavProps, ['class', 'aria-label', 'children'])\n\n return (\n <Polymorphic\n as=\"nav\"\n aria-label={local['aria-label'] ?? 'Section'}\n class={cn(\n 'bg-sidebar text-sidebar-foreground flex h-full w-sidebar shrink-0 flex-col border-e border-sidebar-border',\n local.class\n )}\n {...(rest as ComponentProps<'nav'>)}\n >\n {local.children}\n </Polymorphic>\n )\n}\n\nexport function SidebarNavHeader(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sidebar-nav-header\"\n class={cn('flex h-topbar shrink-0 items-center justify-between gap-2 px-3', local.class)}\n {...rest}\n />\n )\n}\n\nexport type SidebarNavTitleProps<T extends ValidComponent = 'div'> = PolymorphicProps<\n T,\n { class?: string }\n>\n\nexport function SidebarNavTitle<T extends ValidComponent = 'div'>(props: SidebarNavTitleProps<T>) {\n const [local, rest] = splitProps(props as SidebarNavTitleProps, ['class'])\n return (\n <Polymorphic\n as=\"div\"\n data-slot=\"sidebar-nav-title\"\n class={cn('truncate text-sm font-semibold tracking-tight', local.class)}\n {...(rest as ComponentProps<'div'>)}\n />\n )\n}\n\n/** The scrolling middle of the sidebar. */\nexport function SidebarNavContent(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sidebar-nav-content\"\n class={cn('flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto px-2 py-2', local.class)}\n {...rest}\n />\n )\n}\n\nexport function SidebarNavFooter(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sidebar-nav-footer\"\n class={cn('flex shrink-0 items-center gap-1 border-t border-sidebar-border p-2', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * A titled, collapsible group. Collapsible because a list of projects\n * inevitably outgrows the column, and the user needs to put the ones they are\n * not using away *without* them disappearing into a menu.\n */\nexport function SidebarNavSection(\n props: ComponentProps<'div'> & {\n label: string\n /** Render a disclosure control instead of a plain heading. */\n collapsible?: boolean\n defaultOpen?: boolean\n /** Count shown beside the label. */\n count?: number\n /** A control at the trailing edge of the heading row. */\n action?: JSX.Element\n /** Semantic heading element for a host's section hierarchy. */\n headingAs?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n }\n) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'label',\n 'collapsible',\n 'defaultOpen',\n 'count',\n 'action',\n 'headingAs',\n 'children',\n ])\n const [open, setOpen] = createSignal(local.defaultOpen ?? true)\n\n const heading = (\n <>\n <Show when={local.collapsible}>\n <ChevronRight\n aria-hidden=\"true\"\n class={cn('size-3.5 shrink-0 text-muted-foreground transition-transform ease-out', {\n 'rotate-90': open(),\n })}\n />\n </Show>\n <span class=\"min-w-0 flex-1 truncate\">{local.label}</span>\n <Show when={local.count !== undefined}>\n <span class=\"shrink-0 tabular-nums text-muted-foreground\">{local.count}</span>\n </Show>\n </>\n )\n\n return (\n <div data-slot=\"sidebar-nav-section\" class={cn('flex flex-col gap-0.5', local.class)} {...rest}>\n <div class=\"group/section-header flex items-center gap-1 rounded-md px-2 py-1.5 hover:bg-sidebar-accent/60\">\n <Polymorphic\n as={local.headingAs ?? 'div'}\n aria-label={local.headingAs ? local.label : undefined}\n class=\"flex min-w-0 flex-1 items-center gap-1.5 text-2xs font-medium tracking-wide text-sidebar-muted-foreground uppercase\"\n >\n <Show when={local.collapsible} fallback={heading}>\n <button\n type=\"button\"\n aria-expanded={open()}\n onClick={() => setOpen((value) => !value)}\n class=\"flex min-w-0 flex-1 items-center gap-1.5 rounded-sm text-2xs font-medium tracking-wide text-sidebar-muted-foreground uppercase outline-none transition-colors ease-out hover:text-sidebar-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle\"\n >\n {heading}\n </button>\n </Show>\n </Polymorphic>\n <Show when={local.action}>\n <span class=\"shrink-0 opacity-0 transition-opacity ease-out group-hover/section-header:opacity-100 focus-within:opacity-100 [@media(hover:none)]:opacity-100\">\n {local.action}\n </span>\n </Show>\n </div>\n <Show when={!local.collapsible || open()}>\n <div class=\"flex flex-col gap-0.5\">{local.children}</div>\n </Show>\n </div>\n )\n}\n\nexport type SidebarNavItemProps<T extends ValidComponent = 'a'> = PolymorphicProps<\n T,\n {\n class?: string\n active?: boolean\n /** Indent one level, for a child row such as a branch under a project. */\n nested?: boolean\n /** Trailing slot: a count, a status dot, a hover action. */\n trailing?: JSX.Element\n }\n>\n\n/** A sidebar row. Exported classes, so a caller's own element can match it. */\nexport const sidebarNavItemClass = [\n 'group/nav-item relative flex min-w-0 items-center gap-2.5 rounded-md px-3 py-2 text-sm font-medium',\n 'whitespace-nowrap transition-colors ease-out outline-none select-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n '[&_svg]:size-4 [&_svg]:shrink-0',\n].join(' ')\n\nexport const sidebarNavItemStateClass = {\n active: 'bg-primary-subtle text-foreground',\n idle: 'text-muted-foreground hover:bg-surface-hover hover:text-foreground',\n}\n\nexport function SidebarNavItem<T extends ValidComponent = 'a'>(props: SidebarNavItemProps<T>) {\n const [local, rest] = splitProps(props as SidebarNavItemProps, [\n 'class',\n 'active',\n 'nested',\n 'trailing',\n 'children',\n ])\n\n return (\n <Polymorphic\n as=\"a\"\n aria-current={local.active ? 'page' : undefined}\n data-active={local.active ? '' : undefined}\n class={cn(\n sidebarNavItemClass,\n local.active ? sidebarNavItemStateClass.active : sidebarNavItemStateClass.idle,\n { 'ps-8': local.nested },\n local.class\n )}\n {...(rest as ComponentProps<'a'>)}\n >\n {local.children}\n <Show when={local.trailing}>\n <span class=\"ms-auto flex shrink-0 items-center gap-1\">{local.trailing}</span>\n </Show>\n </Polymorphic>\n )\n}\n\n/** A row that is a button rather than a destination — \"New project\". */\nexport function SidebarNavButton(props: ComponentProps<'button'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <button\n type=\"button\"\n class={cn(\n sidebarNavItemClass,\n sidebarNavItemStateClass.idle,\n 'w-full disabled:pointer-events-none disabled:opacity-50',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </button>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA6BA,SAAgBa,WAA6CC,OAA2B;CACtF,MAA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+B;CAC5F,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAA8B;EAC7D;EACA;EACA;EACA;EACA;CAAU,CACX;CAED,OAAAG,gBACGhB,aAAWiB,WAAA;EACVC,IAAE;EAAA,KAAA,kBAAA;GAAA,OACYJ,MAAMsD,SAAS,SAASpB,KAAAA;EAAS;EAAA,KAAA,iBAAA;GAAA,OAClClC,MAAMsD,SAAS,KAAKpB,KAAAA;EAAS;EAAA,KAAA,WAAA;GAAA,OACnCxC,GACL+D,qBACAzD,MAAMsD,SAASK,yBAAyBL,SAASK,yBAAyBC,MAC1E,EAAE,QAAQ5D,MAAMuD,OAAO,GACvBvD,MAAMH,KACR;EAAC;CAAA,GACII,MAA2B,EAAA,IAAAK,WAAA;EAAA,OAAA,CAAAmC,WAE/BzC,MAAMM,QAAQ,GAAAJ,gBACdX,MAAI;GAAA,IAACuC,OAAI;IAAA,OAAE9B,MAAMwD;GAAQ;GAAA,IAAAlD,WAAA;IAAA,IAAA0D,QAAAC,QAAA;IAAAhC,OAAA+B,aACgChE,MAAMwD,QAAQ;IAAA,OAAAQ;GAAA;EAAA,CAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAI9E;;AAGA,SAAgBE,iBAAiBnE,OAAiC;CAChE,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,cAAA;EAAA,IAAAoE,SAAAC,QAAA;EAAA1D,OAAAyD,QAAAhE,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWT,GACL+D,qBACAE,yBAAyBC,MACzB,2DACA5D,MAAMH,KACR;EAAC,EAAA,GACGI,IAAI,GAAA,OAAA,IAAA;EAAAgC,OAAAkC,cAEPnE,MAAMM,QAAQ;EAAA,OAAA6D;CAAA,EAAA,CAAA;AAGrB;AAACE,eAAA,CAAA,OAAA,CAAA"}
1
+ {"version":3,"file":"sidebar-nav.js","names":["PolymorphicProps","Polymorphic","ChevronRight","ComponentProps","JSX","ValidComponent","Show","createSignal","splitProps","cn","invokeEventHandler","handler","event","Event","Array","isArray","callback","data","SidebarNavProps","T","class","SidebarNav","props","local","rest","_$createComponent","_$mergeProps","as","aria-label","children","SidebarNavHeader","_el$","_tmpl$","_$spread","SidebarNavTitleProps","SidebarNavTitle","SidebarNavContent","_el$2","_tmpl$2","SidebarNavFooter","_el$3","_tmpl$3","SidebarNavSectionTriggerProps","Omit","onReorder","direction","onClick","onKeyDown","SidebarNavSectionProps","label","collapsible","defaultOpen","open","onOpenChange","triggerProps","count","action","Element","headingAs","SidebarNavSection","uncontrolledOpen","setUncontrolledOpen","setOpen","next","undefined","trigger","triggerRest","heading","when","_el$4","_tmpl$4","_$insert","_el$5","_tmpl$5","_el$6","_tmpl$9","_el$7","firstChild","_$memo","fallback","_el$8","_tmpl$6","aria-expanded","defaultPrevented","altKey","key","preventDefault","stopPropagation","_el$9","_tmpl$7","_el$0","_tmpl$8","SidebarNavItemProps","active","nested","trailing","sidebarNavItemClass","join","sidebarNavItemStateClass","idle","SidebarNavItem","aria-current","data-active","_el$1","_tmpl$0","SidebarNavButton","_el$10","_tmpl$1","_$createComponent","_$mergeProps","_$memo"],"sources":["../../../../src/components/layout/sidebar-nav/sidebar-nav.tsx"],"sourcesContent":["import type { PolymorphicProps } from '@kobalte/core/polymorphic'\nimport { Polymorphic } from '@kobalte/core/polymorphic'\nimport { ChevronRight } from 'lucide-solid'\nimport type { ComponentProps, JSX, ValidComponent } from 'solid-js'\nimport { Show, createSignal, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\nfunction invokeEventHandler(handler: unknown, event: Event) {\n if (Array.isArray(handler)) {\n const [callback, data] = handler as [(data: unknown, event: Event) => void, unknown]\n callback(data, event)\n } else if (typeof handler === 'function') {\n ;(handler as (event: Event) => void)(event)\n }\n}\n\n/**\n * SidebarNav.\n *\n * The secondary navigation column: the list of things inside the destination\n * the rail selected — projects, sessions, files, threads. It is a different\n * object from the rail, not a wider version of it, which is why it is a separate\n * component rather than the rail with labels on.\n *\n * Rows share one recipe with the rail's, so a row in a sidebar and a row in a\n * rail read as the same kind of thing at the same density. That recipe is\n * exactly KiroCrew's nav row: `text-sm font-medium`, `gap-2.5`, `px-3 py-2`,\n * `rounded-md`, `transition-colors`.\n *\n * The width comes from `--sidebar-width`. Sections collapse by default only when\n * the caller says so, because a section that starts collapsed and holds the\n * user's own work is a hidden default.\n */\nexport type SidebarNavProps<T extends ValidComponent = 'nav'> = PolymorphicProps<\n T,\n { class?: string; 'aria-label'?: string }\n>\n\nexport function SidebarNav<T extends ValidComponent = 'nav'>(props: SidebarNavProps<T>) {\n const [local, rest] = splitProps(props as SidebarNavProps, ['class', 'aria-label', 'children'])\n\n return (\n <Polymorphic\n as=\"nav\"\n aria-label={local['aria-label'] ?? 'Section'}\n class={cn(\n 'bg-sidebar text-sidebar-foreground flex h-full w-sidebar shrink-0 flex-col border-e border-sidebar-border',\n local.class\n )}\n {...(rest as ComponentProps<'nav'>)}\n >\n {local.children}\n </Polymorphic>\n )\n}\n\nexport function SidebarNavHeader(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sidebar-nav-header\"\n class={cn('flex h-topbar shrink-0 items-center justify-between gap-2 px-3', local.class)}\n {...rest}\n />\n )\n}\n\nexport type SidebarNavTitleProps<T extends ValidComponent = 'div'> = PolymorphicProps<\n T,\n { class?: string }\n>\n\nexport function SidebarNavTitle<T extends ValidComponent = 'div'>(props: SidebarNavTitleProps<T>) {\n const [local, rest] = splitProps(props as SidebarNavTitleProps, ['class'])\n return (\n <Polymorphic\n as=\"div\"\n data-slot=\"sidebar-nav-title\"\n class={cn('truncate text-sm font-semibold tracking-tight', local.class)}\n {...(rest as ComponentProps<'div'>)}\n />\n )\n}\n\n/** The scrolling middle of the sidebar. */\nexport function SidebarNavContent(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sidebar-nav-content\"\n class={cn('flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto px-2 py-2', local.class)}\n {...rest}\n />\n )\n}\n\nexport function SidebarNavFooter(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sidebar-nav-footer\"\n class={cn('flex shrink-0 items-center gap-1 border-t border-sidebar-border p-2', local.class)}\n {...rest}\n />\n )\n}\n\n/** Props forwarded to a collapsible section's disclosure button. */\nexport type SidebarNavSectionTriggerProps = Omit<\n ComponentProps<'button'>,\n 'type' | 'aria-expanded' | 'onClick' | 'onKeyDown' | 'children' | 'class' | 'style'\n> & {\n /** Called for Alt+ArrowUp/Down; the host owns ordering and row identity. */\n onReorder?: (direction: 'up' | 'down') => void\n /** Runs before the section toggle and may cancel it with `preventDefault()`. */\n onClick?: ComponentProps<'button'>['onClick']\n /** Runs before shared Alt+Arrow handling and may cancel it with `preventDefault()`. */\n onKeyDown?: ComponentProps<'button'>['onKeyDown']\n}\n\n/**\n * A titled, collapsible group. Collapsible because a list of projects\n * inevitably outgrows the column, and the user needs to put the ones they are\n * not using away *without* them disappearing into a menu.\n */\nexport type SidebarNavSectionProps = ComponentProps<'div'> & {\n label: string\n /** Render a disclosure control instead of a plain heading. */\n collapsible?: boolean\n defaultOpen?: boolean\n /** Controlled disclosure state. When supplied, the host owns changes. */\n open?: boolean\n /** Called for user-initiated disclosure changes. */\n onOpenChange?: (open: boolean) => void\n /** Native props and reorder callbacks for the disclosure control. */\n triggerProps?: SidebarNavSectionTriggerProps\n /** Count shown beside the label. */\n count?: number\n /** A control at the trailing edge of the heading row. */\n action?: JSX.Element\n /** Semantic heading element for a host's section hierarchy. */\n headingAs?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n}\n\nexport function SidebarNavSection(props: SidebarNavSectionProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'label',\n 'collapsible',\n 'defaultOpen',\n 'open',\n 'onOpenChange',\n 'triggerProps',\n 'count',\n 'action',\n 'headingAs',\n 'children',\n ])\n const [uncontrolledOpen, setUncontrolledOpen] = createSignal(local.defaultOpen ?? true)\n const open = () => local.open ?? uncontrolledOpen()\n const setOpen = (next: boolean) => {\n if (local.open === undefined) setUncontrolledOpen(next)\n local.onOpenChange?.(next)\n }\n\n const [trigger, triggerRest] = splitProps(local.triggerProps ?? {}, [\n 'onClick',\n 'onKeyDown',\n 'onReorder',\n ])\n\n const heading = (\n <>\n <Show when={local.collapsible}>\n <ChevronRight\n aria-hidden=\"true\"\n class={cn('size-3.5 shrink-0 text-muted-foreground transition-transform ease-out', {\n 'rotate-90': open(),\n })}\n />\n </Show>\n <span class=\"min-w-0 flex-1 truncate\">{local.label}</span>\n <Show when={local.count !== undefined}>\n <span class=\"shrink-0 tabular-nums text-muted-foreground\">{local.count}</span>\n </Show>\n </>\n )\n\n return (\n <div data-slot=\"sidebar-nav-section\" class={cn('flex flex-col gap-0.5', local.class)} {...rest}>\n <div class=\"group/section-header flex items-center gap-1 rounded-md px-2 py-1.5 hover:bg-sidebar-accent/60\">\n <Polymorphic\n as={local.headingAs ?? 'div'}\n aria-label={local.headingAs ? local.label : undefined}\n class=\"flex min-w-0 flex-1 items-center gap-1.5 text-2xs font-medium tracking-wide text-sidebar-muted-foreground uppercase\"\n >\n <Show when={local.collapsible} fallback={heading}>\n <button\n {...(triggerRest as ComponentProps<'button'>)}\n type=\"button\"\n aria-expanded={open()}\n onClick={(event) => {\n invokeEventHandler(trigger.onClick, event)\n if (event.defaultPrevented) return\n setOpen(!open())\n }}\n onKeyDown={(event) => {\n invokeEventHandler(trigger.onKeyDown, event)\n if (event.defaultPrevented || !event.altKey) return\n if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown') return\n event.preventDefault()\n event.stopPropagation()\n trigger.onReorder?.(event.key === 'ArrowUp' ? 'up' : 'down')\n }}\n class=\"flex min-w-0 flex-1 items-center gap-1.5 rounded-sm text-2xs font-medium tracking-wide text-sidebar-muted-foreground uppercase outline-none transition-colors ease-out hover:text-sidebar-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle\"\n >\n {heading}\n </button>\n </Show>\n </Polymorphic>\n <Show when={local.action}>\n <span class=\"shrink-0 opacity-0 transition-opacity ease-out group-hover/section-header:opacity-100 focus-within:opacity-100 [@media(hover:none)]:opacity-100\">\n {local.action}\n </span>\n </Show>\n </div>\n <Show when={!local.collapsible || open()}>\n <div class=\"flex flex-col gap-0.5\">{local.children}</div>\n </Show>\n </div>\n )\n}\n\nexport type SidebarNavItemProps<T extends ValidComponent = 'a'> = PolymorphicProps<\n T,\n {\n class?: string\n active?: boolean\n /** Indent one level, for a child row such as a branch under a project. */\n nested?: boolean\n /** Trailing slot: a count, a status dot, a hover action. */\n trailing?: JSX.Element\n }\n>\n\n/** A sidebar row. Exported classes, so a caller's own element can match it. */\nexport const sidebarNavItemClass = [\n 'group/nav-item relative flex min-w-0 items-center gap-2.5 rounded-md px-3 py-2 text-sm font-medium',\n 'whitespace-nowrap transition-colors ease-out outline-none select-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n '[&_svg]:size-4 [&_svg]:shrink-0',\n].join(' ')\n\nexport const sidebarNavItemStateClass = {\n active: 'bg-primary-subtle text-foreground',\n idle: 'text-muted-foreground hover:bg-surface-hover hover:text-foreground',\n}\n\nexport function SidebarNavItem<T extends ValidComponent = 'a'>(props: SidebarNavItemProps<T>) {\n const [local, rest] = splitProps(props as SidebarNavItemProps, [\n 'class',\n 'active',\n 'nested',\n 'trailing',\n 'children',\n ])\n\n return (\n <Polymorphic\n as=\"a\"\n aria-current={local.active ? 'page' : undefined}\n data-active={local.active ? '' : undefined}\n class={cn(\n sidebarNavItemClass,\n local.active ? sidebarNavItemStateClass.active : sidebarNavItemStateClass.idle,\n { 'ps-8': local.nested },\n local.class\n )}\n {...(rest as ComponentProps<'a'>)}\n >\n {local.children}\n <Show when={local.trailing}>\n <span class=\"ms-auto flex shrink-0 items-center gap-1\">{local.trailing}</span>\n </Show>\n </Polymorphic>\n )\n}\n\n/** A row that is a button rather than a destination — \"New project\". */\nexport function SidebarNavButton(props: ComponentProps<'button'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <button\n type=\"button\"\n class={cn(\n sidebarNavItemClass,\n sidebarNavItemStateClass.idle,\n 'w-full disabled:pointer-events-none disabled:opacity-50',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </button>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAOA,SAASU,mBAAmBC,SAAkBC,OAAc;CAC1D,IAAIE,MAAMC,QAAQJ,OAAO,GAAG;EAC1B,MAAM,CAACK,UAAUC,QAAQN;EACzBK,SAASC,MAAML,KAAK;CACtB,OAAO,IAAI,OAAOD,YAAY,YAC3B,QAAoCC,KAAK;AAE9C;AAwBA,SAAgBS,WAA6CC,OAA2B;CACtF,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAA0B;EAAC;EAAS;EAAc;CAAU,CAAC;CAE9F,OAAAG,gBACGxB,aAAWyB,WAAA;EACVC,IAAE;EAAA,KAAA,gBAAA;GAAA,OACUJ,MAAM,iBAAiB;EAAS;EAAA,KAAA,WAAA;GAAA,OACrCd,GACL,6GACAc,MAAMH,KACR;EAAC;CAAA,GACII,MAA6B,EAAA,IAAAK,WAAA;EAAA,OAEjCN,MAAMM;CAAQ,EAAA,CAAA,CAAA;AAGrB;AAEA,SAAgBC,iBAAiBR,OAA8B;CAC7D,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAAS,OAAAC,OAAA;EAAAC,OAAAF,MAAAL,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWjB,GAAG,kEAAkEc,MAAMH,KAAK;EAAC,EAAA,GACpFI,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAO;CAAA,EAAA,CAAA;AAGd;AAOA,SAAgBI,gBAAkDb,OAAgC;CAChG,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OA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solid-js").JSX.Eleme
29
29
  export declare function TopBarSection(props: ComponentProps<'div'> & {
30
30
  align?: 'start' | 'end';
31
31
  }): import("solid-js").JSX.Element;
32
- export declare function TopBarTitle(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
32
+ export declare function TopBarTitle(props: ComponentProps<'div'> & {
33
+ align?: 'start' | 'center';
34
+ }): import("solid-js").JSX.Element;
33
35
  /** A breadcrumb or path readout that yields to the actions when space runs out. */
34
36
  export declare function TopBarBreadcrumb(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
35
37
  export type TopBarSearchProps = ComponentProps<'button'> & {
@@ -1 +1 @@
1
- {"version":3,"file":"top-bar.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/top-bar/top-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI9C;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG;IACnD,sDAAsD;IACtD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,kDAAkD;IAClD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,qDAAqD;IACrD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gDAAgD;IAChD,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,kCAuBxC;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;CAAE,kCAevF;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,kCASvD;AAED,mFAAmF;AACnF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,kCAS5D;AAED,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC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