@adea-ai/ui 0.83.1 → 0.85.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +79 -0
  2. package/dist/NOTICE +26 -0
  3. package/dist/components/composites/catalog-browser/catalog-browser-group.d.ts +20 -0
  4. package/dist/components/composites/catalog-browser/catalog-browser-group.d.ts.map +1 -0
  5. package/dist/components/composites/catalog-browser/catalog-browser-group.js +195 -0
  6. package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -0
  7. package/dist/components/composites/catalog-browser/catalog-browser.d.ts +3 -0
  8. package/dist/components/composites/catalog-browser/catalog-browser.d.ts.map +1 -0
  9. package/dist/components/composites/catalog-browser/catalog-browser.js +378 -0
  10. package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -0
  11. package/dist/components/composites/catalog-browser/catalog-detail.d.ts +21 -0
  12. package/dist/components/composites/catalog-browser/catalog-detail.d.ts.map +1 -0
  13. package/dist/components/composites/catalog-browser/catalog-detail.js +92 -0
  14. package/dist/components/composites/catalog-browser/catalog-detail.js.map +1 -0
  15. package/dist/components/composites/catalog-browser/catalog-types.d.ts +78 -0
  16. package/dist/components/composites/catalog-browser/catalog-types.d.ts.map +1 -0
  17. package/dist/components/composites/catalog-browser/index.d.ts +4 -0
  18. package/dist/components/composites/catalog-browser/index.d.ts.map +1 -0
  19. package/dist/components/composites/catalog-browser/index.js +3 -0
  20. package/dist/components/layout/sidebar-nav/index.d.ts +1 -0
  21. package/dist/components/layout/sidebar-nav/index.d.ts.map +1 -1
  22. package/dist/components/layout/sidebar-nav/index.js +2 -1
  23. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.d.ts +21 -0
  24. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.d.ts.map +1 -0
  25. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js +84 -0
  26. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js.map +1 -0
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +5 -2
  30. package/dist/lint/index.d.ts +1 -0
  31. package/dist/lint/index.d.ts.map +1 -1
  32. package/dist/lint.js +171 -59
  33. package/dist/lint.js.map +1 -1
  34. package/dist/r/catalog-browser.json +47 -0
  35. package/dist/r/registry.json +53 -0
  36. package/dist/r/sidebar-nav.json +6 -0
  37. package/dist/r/src/components/composites/catalog-browser/catalog-browser-group.tsx +148 -0
  38. package/dist/r/src/components/composites/catalog-browser/catalog-browser.tsx +258 -0
  39. package/dist/r/src/components/composites/catalog-browser/catalog-detail.tsx +64 -0
  40. package/dist/r/src/components/composites/catalog-browser/catalog-types.ts +83 -0
  41. package/dist/r/src/components/composites/catalog-browser/index.ts +10 -0
  42. package/dist/r/src/components/layout/sidebar-nav/index.ts +4 -0
  43. package/dist/r/src/components/layout/sidebar-nav/sidebar-nav-resize-handle.tsx +59 -0
  44. package/package.json +1 -1
  45. package/registry.json +53 -0
  46. package/src/components/composites/catalog-browser/catalog-browser-group.tsx +148 -0
  47. package/src/components/composites/catalog-browser/catalog-browser.tsx +258 -0
  48. package/src/components/composites/catalog-browser/catalog-detail.tsx +64 -0
  49. package/src/components/composites/catalog-browser/catalog-types.ts +83 -0
  50. package/src/components/composites/catalog-browser/index.ts +10 -0
  51. package/src/components/layout/sidebar-nav/index.ts +4 -0
  52. package/src/components/layout/sidebar-nav/sidebar-nav-resize-handle.tsx +59 -0
  53. package/src/index.ts +1 -0
  54. package/src/lint/index.ts +168 -19
@@ -1,2 +1,3 @@
1
1
  export { SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavSection, SidebarNavTitle, sidebarNavItemClass, sidebarNavItemStateClass, type SidebarNavItemProps, type SidebarNavProps, type SidebarNavTitleProps, } from './sidebar-nav';
2
+ export { SidebarNavResizeHandle, type SidebarNavResizeHandleProps, } from './sidebar-nav-resize-handle';
2
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"}
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,2 +1,3 @@
1
1
  import { SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavSection, SidebarNavTitle, sidebarNavItemClass, sidebarNavItemStateClass } from "./sidebar-nav.js";
2
- export { SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavSection, SidebarNavTitle, sidebarNavItemClass, sidebarNavItemStateClass };
2
+ import { SidebarNavResizeHandle } from "./sidebar-nav-resize-handle.js";
3
+ export { SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavResizeHandle, SidebarNavSection, SidebarNavTitle, sidebarNavItemClass, sidebarNavItemStateClass };
@@ -0,0 +1,21 @@
1
+ export type SidebarNavResizeHandleProps = {
2
+ value: number;
3
+ minimum: number;
4
+ maximum: number;
5
+ step?: number;
6
+ label?: string;
7
+ controls?: string;
8
+ class?: string;
9
+ onChange(value: number): void;
10
+ onCommit?(value: number): void;
11
+ };
12
+ /**
13
+ * Resize a contextual sidebar without making its host recreate a separator
14
+ * widget. Corvu owns pointer capture, cancellation, constraints, keyboard
15
+ * movement and cleanup. Its two invisible panels provide a bounded pixel
16
+ * ruler; the host retains the real pane layout and preference persistence.
17
+ * Place this inside the positioned sidebar. The ruler can extend over the
18
+ * adjacent content, but only its handle participates in pointer hit testing.
19
+ */
20
+ export declare function SidebarNavResizeHandle(props: SidebarNavResizeHandleProps): import("solid-js").JSX.Element;
21
+ //# sourceMappingURL=sidebar-nav-resize-handle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-nav-resize-handle.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/sidebar-nav/sidebar-nav-resize-handle.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,kCAmCxE"}
@@ -0,0 +1,84 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { createComponent } from "solid-js/web";
3
+ import Resizable from "@corvu/resizable";
4
+ //#region src/components/layout/sidebar-nav/sidebar-nav-resize-handle.tsx
5
+ /**
6
+ * Resize a contextual sidebar without making its host recreate a separator
7
+ * widget. Corvu owns pointer capture, cancellation, constraints, keyboard
8
+ * movement and cleanup. Its two invisible panels provide a bounded pixel
9
+ * ruler; the host retains the real pane layout and preference persistence.
10
+ * Place this inside the positioned sidebar. The ruler can extend over the
11
+ * adjacent content, but only its handle participates in pointer hit testing.
12
+ */
13
+ function SidebarNavResizeHandle(props) {
14
+ const maximum = () => Math.max(1, props.maximum);
15
+ const minimum = () => Math.min(maximum(), Math.max(0, props.minimum));
16
+ const value = () => Math.min(maximum(), Math.max(minimum(), props.value));
17
+ const commit = () => props.onCommit?.(value());
18
+ return createComponent(Resizable, {
19
+ orientation: "horizontal",
20
+ get sizes() {
21
+ return [value() / maximum(), 1 - value() / maximum()];
22
+ },
23
+ get keyboardDelta() {
24
+ return `${props.step ?? 16}px`;
25
+ },
26
+ get style() {
27
+ return { width: `${maximum()}px` };
28
+ },
29
+ get ["class"]() {
30
+ return cn("pointer-events-none absolute inset-y-0 start-0 flex", props.class);
31
+ },
32
+ onSizesChange: (sizes) => {
33
+ const next = Math.round((sizes[0] ?? 0) * maximum());
34
+ if (next !== value()) props.onChange(Math.min(maximum(), Math.max(minimum(), next)));
35
+ },
36
+ get children() {
37
+ return [
38
+ createComponent(Resizable.Panel, {
39
+ get minSize() {
40
+ return minimum() / maximum();
41
+ },
42
+ maxSize: 1,
43
+ "aria-hidden": "true"
44
+ }),
45
+ createComponent(Resizable.Handle, {
46
+ get ["aria-label"]() {
47
+ return props.label ?? "Resize navigation";
48
+ },
49
+ get ["aria-controls"]() {
50
+ return props.controls;
51
+ },
52
+ "aria-orientation": "vertical",
53
+ get ["aria-valuemin"]() {
54
+ return minimum();
55
+ },
56
+ get ["aria-valuemax"]() {
57
+ return maximum();
58
+ },
59
+ get ["aria-valuenow"]() {
60
+ return value();
61
+ },
62
+ onHandleDragEnd: commit,
63
+ onKeyUp: (event) => {
64
+ if ([
65
+ "ArrowLeft",
66
+ "ArrowRight",
67
+ "Home",
68
+ "End"
69
+ ].includes(event.key)) commit();
70
+ },
71
+ "class": "pointer-events-auto relative z-(--z-docked) w-px -translate-x-full shrink-0 bg-transparent after:absolute after:inset-y-0 after:-inset-x-1 after:w-3 hover:bg-primary focus-visible:bg-primary focus-visible:ring-3 focus-visible:ring-primary-subtle focus-visible:outline-none"
72
+ }),
73
+ createComponent(Resizable.Panel, {
74
+ minSize: 0,
75
+ "aria-hidden": "true"
76
+ })
77
+ ];
78
+ }
79
+ });
80
+ }
81
+ //#endregion
82
+ export { SidebarNavResizeHandle };
83
+
84
+ //# sourceMappingURL=sidebar-nav-resize-handle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-nav-resize-handle.js","names":["Resizable","cn","SidebarNavResizeHandleProps","value","minimum","maximum","step","label","controls","class","onChange","onCommit","SidebarNavResizeHandle","props","Math","max","min","commit","_$createComponent","orientation","sizes","keyboardDelta","style","width","onSizesChange","next","round","children","Panel","minSize","maxSize","Handle","aria-label","aria-controls","aria-valuemin","aria-valuemax","aria-valuenow","onHandleDragEnd","onKeyUp","event","includes","key","_$createComponent"],"sources":["../../../../src/components/layout/sidebar-nav/sidebar-nav-resize-handle.tsx"],"sourcesContent":["import Resizable from '@corvu/resizable'\nimport { cn } from '#lib/utils'\n\nexport type SidebarNavResizeHandleProps = {\n value: number\n minimum: number\n maximum: number\n step?: number\n label?: string\n controls?: string\n class?: string\n onChange(value: number): void\n onCommit?(value: number): void\n}\n\n/**\n * Resize a contextual sidebar without making its host recreate a separator\n * widget. Corvu owns pointer capture, cancellation, constraints, keyboard\n * movement and cleanup. Its two invisible panels provide a bounded pixel\n * ruler; the host retains the real pane layout and preference persistence.\n * Place this inside the positioned sidebar. The ruler can extend over the\n * adjacent content, but only its handle participates in pointer hit testing.\n */\nexport function SidebarNavResizeHandle(props: SidebarNavResizeHandleProps) {\n const maximum = () => Math.max(1, props.maximum)\n const minimum = () => Math.min(maximum(), Math.max(0, props.minimum))\n const value = () => Math.min(maximum(), Math.max(minimum(), props.value))\n const commit = () => props.onCommit?.(value())\n\n return (\n <Resizable\n orientation=\"horizontal\"\n sizes={[value() / maximum(), 1 - value() / maximum()]}\n keyboardDelta={`${props.step ?? 16}px`}\n style={{ width: `${maximum()}px` }}\n class={cn('pointer-events-none absolute inset-y-0 start-0 flex', props.class)}\n onSizesChange={(sizes) => {\n const next = Math.round((sizes[0] ?? 0) * maximum())\n if (next !== value()) props.onChange(Math.min(maximum(), Math.max(minimum(), next)))\n }}\n >\n <Resizable.Panel minSize={minimum() / maximum()} maxSize={1} aria-hidden=\"true\" />\n <Resizable.Handle\n aria-label={props.label ?? 'Resize navigation'}\n aria-controls={props.controls}\n aria-orientation=\"vertical\"\n aria-valuemin={minimum()}\n aria-valuemax={maximum()}\n aria-valuenow={value()}\n onHandleDragEnd={commit}\n onKeyUp={(event) => {\n if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) commit()\n }}\n class=\"pointer-events-auto relative z-(--z-docked) w-px -translate-x-full shrink-0 bg-transparent after:absolute after:inset-y-0 after:-inset-x-1 after:w-3 hover:bg-primary focus-visible:bg-primary focus-visible:ring-3 focus-visible:ring-primary-subtle focus-visible:outline-none\"\n />\n <Resizable.Panel minSize={0} aria-hidden=\"true\" />\n </Resizable>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAuBA,SAAgBY,uBAAuBC,OAAoC;CACzE,MAAMR,gBAAgBS,KAAKC,IAAI,GAAGF,MAAMR,OAAO;CAC/C,MAAMD,gBAAgBU,KAAKE,IAAIX,QAAQ,GAAGS,KAAKC,IAAI,GAAGF,MAAMT,OAAO,CAAC;CACpE,MAAMD,cAAcW,KAAKE,IAAIX,QAAQ,GAAGS,KAAKC,IAAIX,QAAQ,GAAGS,MAAMV,KAAK,CAAC;CACxE,MAAMc,eAAeJ,MAAMF,WAAWR,MAAM,CAAC;CAE7C,OAAAe,gBACGlB,WAAS;EACRmB,aAAW;EAAA,IACXC,QAAK;G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ist/index.d.ts CHANGED
@@ -86,6 +86,7 @@ export * from './components/conversation';
86
86
  export * from './components/theme';
87
87
  export * from './components/composites/account-menu';
88
88
  export * from './components/composites/action-button';
89
+ export * from './components/composites/catalog-browser';
89
90
  export * from './components/composites/list-row';
90
91
  export * from './components/composites/settings';
91
92
  export * from './components/composites/stat';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC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EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3F,OAAO,EACL,aAAa,EACb,SAAS,EACT,WAAW,EACX,aAAa,EACb,YAAY,EACZ,eAAe,EACf,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,wBAAwB,EACxB,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,SAAS,GACf,MAAM,cAAc,CAAA"}
package/dist/index.js CHANGED
@@ -71,6 +71,7 @@ import { Panel, PanelActions, PanelBody, PanelCard, PanelDescription, PanelFoote
71
71
  import { useSideRail } from "./components/layout/side-rail/side-rail-context.js";
72
72
  import { SideRail, SideRailButton, SideRailContent, SideRailFooter, SideRailHeader, SideRailItem, SideRailSection } from "./components/layout/side-rail/side-rail.js";
73
73
  import { SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavSection, SidebarNavTitle, sidebarNavItemClass, sidebarNavItemStateClass } from "./components/layout/sidebar-nav/sidebar-nav.js";
74
+ import { SidebarNavResizeHandle } from "./components/layout/sidebar-nav/sidebar-nav-resize-handle.js";
74
75
  import { StatusBar, StatusBarItem, StatusBarSpacer } from "./components/layout/status-bar/status-bar.js";
75
76
  import { TopBar, TopBarBreadcrumb, TopBarPill, TopBarSearch, TopBarSection, TopBarTitle } from "./components/layout/top-bar/top-bar.js";
76
77
  import { BusySendButton } from "./components/conversation/busy-send-button.js";
@@ -90,6 +91,9 @@ import { AppearancePanel } from "./components/theme/appearance-panel.js";
90
91
  import { ThemeToggle } from "./components/theme/theme-toggle.js";
91
92
  import { AccountMenu } from "./components/composites/account-menu/account-menu.js";
92
93
  import { ActionButton } from "./components/composites/action-button/action-button.js";
94
+ import { keyedRows } from "./lib/keyed-rows.js";
95
+ import { CatalogBrowser } from "./components/composites/catalog-browser/catalog-browser.js";
96
+ import { CatalogDetail, CatalogDetailSection } from "./components/composites/catalog-browser/catalog-detail.js";
93
97
  import { ListGroup, ListRow } from "./components/composites/list-row/list-row.js";
94
98
  import { SettingsField, SettingsPage, SettingsRow, SettingsSection } from "./components/composites/settings/settings.js";
95
99
  import { PropertyList, PropertyRow, PropertyTerm, PropertyValue, Stat, StatGroup } from "./components/composites/stat/stat.js";
@@ -98,5 +102,4 @@ import { AppearanceEditor, AppearancePopover } from "./components/composites/app
98
102
  import { formatBytes, formatReleaseDate, plainTextFromMarkdown } from "./lib/version-notes.js";
99
103
  import { UpdateDialog } from "./components/composites/update-dialog/update-dialog.js";
100
104
  import { WorkspaceMark } from "./components/composites/workspace-mark/workspace-mark.js";
101
- import { keyedRows } from "./lib/keyed-rows.js";
102
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountMenu, ActionButton, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppShell, AppShellBody, AppShellContent, AppShellMain, AppearanceEditor, AppearancePanel, AppearancePopover, AspectRatio, AttachmentCard, Avatar, AvatarFallback, AvatarImage, Badge, Board, BoardCardBody, BoardCardTitle, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator, BusySendButton, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CalendarSurface, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatComposer, Checkbox, CheckboxDescription, CheckboxLabel, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxClear, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxSection, ComboboxTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, ComposerAttachmentButton, ComposerHint, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ConversationAvatar, ConversationSurface, DatePicker, DetailPanel, DetailPanelBody, DetailPanelField, DetailPanelHeader, DetailPanelSection, Dialog, DialogClose, DialogCloseButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffBlock, DiffSummary, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, EntityIcon, Field, FieldDescription, FieldError, FieldInput, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTextArea, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputOtp, InputOtpCaret, Item, ItemDescription, ItemEmpty, ItemGroup, ItemGroupEntry, ItemTitle, Kbd, KbdGroup, Label, ListGroup, ListRow, MAX_LAYOUT_DEPTH, MAX_LAYOUT_LEAVES, MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageBody, MessageComposer, MessageDayDivider, MessageGroup, MessageRow, ModalDialog, Motion, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport, OrbitItem, OrbitLayout, PASTE_THRESHOLD_CHARS, PASTE_THRESHOLD_LINES, PASTE_TOKEN_REGEX, Page, PageHeader, PageHeaderActions, PageHeaderContent, PageHeaderDescription, PageHeaderTitle, PageSection, Pagination, PaginationEllipsis, PaginationItem, PaginationNext, PaginationPrevious, PalettePreview, Panel, PanelActions, PanelBody, PanelCard, PanelDescription, PanelFooter, PanelHeader, PanelPlaceholder, PanelTitle, PanelToolbar, Popover, PopoverAnchor, PopoverCloseButton, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, Presence, Progress, PropertyList, PropertyRow, PropertyTerm, PropertyValue, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, Select, SelectChevronsUpDown, SelectContent, SelectItem, SelectLabel, SelectSection, SelectTrigger, SelectValue, Separator, SettingsField, SettingsPage, SettingsRow, SettingsSection, Sheet, SheetBody, SheetCloseButton, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SideRail, SideRailButton, SideRailContent, SideRailFooter, SideRailHeader, SideRailItem, SideRailSection, SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavSection, SidebarNavTitle, Skeleton, Slider, Spinner, SplitLayout, Stat, StatGroup, StatusBar, StatusBarItem, StatusBarSpacer, StatusChip, StatusList, Switch, SwitchDescription, SwitchLabel, TALL_CODE_BLOCK_PX, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableNumericCell, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeMiniature, ThemeMiniatureSplit, ThemePicker, ThemePreview, ThemeProvider, ThemeSwatch, ThemeToggle, ThreadPanel, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, TopBarBreadcrumb, TopBarPill, TopBarSearch, TopBarSection, TopBarTitle, TranscriptComposition, UpdateDialog, VirtualWindow, WorkspaceMark, accentPresets, alertVariants, allTokens, badgeVariants, boardCardTitleVariants, builtinThemes, buttonVariants, closePane, cn, colorTokens, computeLayoutFrames, contrastRatio, controlInteractive, controlSize, controlSizeIcon, controlSizes, countLeaves, countLines, createLayoutState, cva, defaultDarkThemeId, defaultLightThemeId, defaultThemeSelection, densityTokens, designTokens, diffLineVariants, diffStats, diffTargetPath, elevationTokens, entityIconVariants, expandAll, findTokenRanges, focusPane, fontOptions, formatBytes, formatReleaseDate, formatToken, initialsFrom, inlineScriptLiteral, isPasteBlock, itemVariants, keyedRows, layoutDepth, listLeaves, monogram, motionTokens, movePane, neighborLeaf, nextSeq, normalizeLayout, parseDiff, plainTextFromMarkdown, pruneBlocks, radiusTokens, recollapsePastes, remapCarriedBlocks, resizeSplit, resolvedDensity, sheetVariants, shouldCollapse, sidebarNavItemClass, sidebarNavItemStateClass, splitPane, statusDotVariants, stripTrailingBlankLines, surfaceInteractive, swapPanes, themeById, themeCssVariables, themeFamilies, themeScript, themesForAppearance, toast, toaster, toggleVariants, tokenRangeAt, transcriptDisclosureKey, typographyTokens, undoClosePane, undocumentedTokenAliases, useSideRail, useTheme, validateTheme, validateThemeRegistry, zIndexTokens };
105
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountMenu, ActionButton, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppShell, AppShellBody, AppShellContent, AppShellMain, AppearanceEditor, AppearancePanel, AppearancePopover, AspectRatio, AttachmentCard, Avatar, AvatarFallback, AvatarImage, Badge, Board, BoardCardBody, BoardCardTitle, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator, BusySendButton, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CalendarSurface, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CatalogBrowser, CatalogDetail, CatalogDetailSection, ChatComposer, Checkbox, CheckboxDescription, CheckboxLabel, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxClear, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxSection, ComboboxTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, ComposerAttachmentButton, ComposerHint, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ConversationAvatar, ConversationSurface, DatePicker, DetailPanel, DetailPanelBody, DetailPanelField, DetailPanelHeader, DetailPanelSection, Dialog, DialogClose, DialogCloseButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffBlock, DiffSummary, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, EntityIcon, Field, FieldDescription, FieldError, FieldInput, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTextArea, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputOtp, InputOtpCaret, Item, ItemDescription, ItemEmpty, ItemGroup, ItemGroupEntry, ItemTitle, Kbd, KbdGroup, Label, ListGroup, ListRow, MAX_LAYOUT_DEPTH, MAX_LAYOUT_LEAVES, MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageBody, MessageComposer, MessageDayDivider, MessageGroup, MessageRow, ModalDialog, Motion, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport, OrbitItem, OrbitLayout, PASTE_THRESHOLD_CHARS, PASTE_THRESHOLD_LINES, PASTE_TOKEN_REGEX, Page, PageHeader, PageHeaderActions, PageHeaderContent, PageHeaderDescription, PageHeaderTitle, PageSection, Pagination, PaginationEllipsis, PaginationItem, PaginationNext, PaginationPrevious, PalettePreview, Panel, PanelActions, PanelBody, PanelCard, PanelDescription, PanelFooter, PanelHeader, PanelPlaceholder, PanelTitle, PanelToolbar, Popover, PopoverAnchor, PopoverCloseButton, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, Presence, Progress, PropertyList, PropertyRow, PropertyTerm, PropertyValue, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, Select, SelectChevronsUpDown, SelectContent, SelectItem, SelectLabel, SelectSection, SelectTrigger, SelectValue, Separator, SettingsField, SettingsPage, SettingsRow, SettingsSection, Sheet, SheetBody, SheetCloseButton, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SideRail, SideRailButton, SideRailContent, SideRailFooter, SideRailHeader, SideRailItem, SideRailSection, SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavResizeHandle, SidebarNavSection, SidebarNavTitle, Skeleton, Slider, Spinner, SplitLayout, Stat, StatGroup, StatusBar, StatusBarItem, StatusBarSpacer, StatusChip, StatusList, Switch, SwitchDescription, SwitchLabel, TALL_CODE_BLOCK_PX, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableNumericCell, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeMiniature, ThemeMiniatureSplit, ThemePicker, ThemePreview, ThemeProvider, ThemeSwatch, ThemeToggle, ThreadPanel, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, TopBarBreadcrumb, TopBarPill, TopBarSearch, TopBarSection, TopBarTitle, TranscriptComposition, UpdateDialog, VirtualWindow, WorkspaceMark, accentPresets, alertVariants, allTokens, badgeVariants, boardCardTitleVariants, builtinThemes, buttonVariants, closePane, cn, colorTokens, computeLayoutFrames, contrastRatio, controlInteractive, controlSize, controlSizeIcon, controlSizes, countLeaves, countLines, createLayoutState, cva, defaultDarkThemeId, defaultLightThemeId, defaultThemeSelection, densityTokens, designTokens, diffLineVariants, diffStats, diffTargetPath, elevationTokens, entityIconVariants, expandAll, findTokenRanges, focusPane, fontOptions, formatBytes, formatReleaseDate, formatToken, initialsFrom, inlineScriptLiteral, isPasteBlock, itemVariants, keyedRows, layoutDepth, listLeaves, monogram, motionTokens, movePane, neighborLeaf, nextSeq, normalizeLayout, parseDiff, plainTextFromMarkdown, pruneBlocks, radiusTokens, recollapsePastes, remapCarriedBlocks, resizeSplit, resolvedDensity, sheetVariants, shouldCollapse, sidebarNavItemClass, sidebarNavItemStateClass, splitPane, statusDotVariants, stripTrailingBlankLines, surfaceInteractive, swapPanes, themeById, themeCssVariables, themeFamilies, themeScript, themesForAppearance, toast, toaster, toggleVariants, tokenRangeAt, transcriptDisclosureKey, typographyTokens, undoClosePane, undocumentedTokenAliases, useSideRail, useTheme, validateTheme, validateThemeRegistry, zIndexTokens };
@@ -31,6 +31,7 @@ declare const plugin: {
31
31
  'no-raw-interactive-elements': RuleModule;
32
32
  'no-primitive-library-imports': RuleModule;
33
33
  'no-interactive-wrappers': RuleModule;
34
+ 'require-action-button-tooltip': RuleModule;
34
35
  };
35
36
  };
36
37
  export default plugin;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lint/index.ts"],"names":[],"mappings":"AAmBA,KAAK,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA;AAa/E,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS,CAAA;QACf,IAAI,EAAE;YAAE,WAAW,EAAE,MAAM,CAAA;SAAE,CAAA;QAC7B,MAAM,EAAE,IAAI,EAAE,CAAA;QACd,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KACjC,CAAA;IACD,MAAM,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC,CAAA;CACtE,CAAA;AAED,UAAU,WAAW;IACnB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;IACnB,MAAM,EAAE,CAAC,UAAU,EAAE;QACnB,IAAI,EAAE,OAAO,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;KAC5B,KAAK,IAAI,CAAA;CACX;AA4aD,QAAA,MAAM,MAAM;;;;;;;;;;;CASX,CAAA;AAED,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lint/index.ts"],"names":[],"mappings":"AAmBA,KAAK,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA;AAa/E,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS,CAAA;QACf,IAAI,EAAE;YAAE,WAAW,EAAE,MAAM,CAAA;SAAE,CAAA;QAC7B,MAAM,EAAE,IAAI,EAAE,CAAA;QACd,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KACjC,CAAA;IACD,MAAM,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC,CAAA;CACtE,CAAA;AAED,UAAU,WAAW;IACnB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;IACnB,MAAM,EAAE,CAAC,UAAU,EAAE;QACnB,IAAI,EAAE,OAAO,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;KAC5B,KAAK,IAAI,CAAA;CACX;AAgkBD,QAAA,MAAM,MAAM;;;;;;;;;;;;CAUX,CAAA;AAED,eAAe,MAAM,CAAA"}
package/dist/lint.js CHANGED
@@ -45,6 +45,18 @@ var objectHasStaticProperty = (node, name, seen = /* @__PURE__ */ new Set()) =>
45
45
  return false;
46
46
  });
47
47
  };
48
+ /** Returns literal values for a statically named property in an object spread. */
49
+ var staticObjectPropertyValues = (node, name, seen = /* @__PURE__ */ new Set()) => {
50
+ if (!node || seen.has(node)) return [];
51
+ seen.add(node);
52
+ if (node.type === "TSAsExpression" || node.type === "TSSatisfiesExpression" || node.type === "TSNonNullExpression") return staticObjectPropertyValues(node.expression, name, seen);
53
+ if (node.type !== "ObjectExpression") return [];
54
+ return node.properties.flatMap((property) => {
55
+ if (property.type === "Property") return staticPropertyKey(property.key, property.computed === true) === name ? [property.value] : [];
56
+ if (property.type === "SpreadElement") return staticObjectPropertyValues(property.argument, name, seen);
57
+ return [];
58
+ });
59
+ };
48
60
  var noInlineStyles = {
49
61
  meta: {
50
62
  type: "problem",
@@ -251,20 +263,139 @@ var staticStrings = (node) => {
251
263
  };
252
264
  var roleOf = (node) => {
253
265
  for (const attribute of node.attributes ?? []) {
266
+ if (attribute.type === "JSXSpreadAttribute") {
267
+ const role = staticObjectPropertyValues(attribute.argument, "role").flatMap((value) => staticStrings(value)).flatMap((value) => value.split(/\s+/)).find((value) => value in ROLE_PRIMITIVES);
268
+ if (role) return role;
269
+ continue;
270
+ }
254
271
  if (attribute.type !== "JSXAttribute" || attribute.name?.name !== "role") continue;
255
272
  return staticStrings(attribute.value).flatMap((role) => role.split(/\s+/)).find((role) => role in ROLE_PRIMITIVES) ?? null;
256
273
  }
257
274
  return null;
258
275
  };
259
276
  /** Whether the element carries the attribute, by name. */
260
- var has = (node, name) => (node.attributes ?? []).some((attribute) => attribute.type === "JSXAttribute" && (attribute.name?.type === "JSXNamespacedName" ? `${attribute.name.namespace.name}:${attribute.name.name.name}` : attribute.name?.name) === name);
261
- var hasTabStop = (node) => (node.attributes ?? []).some((attribute) => {
262
- if (attribute.type !== "JSXAttribute" || !["tabIndex", "tabindex"].includes(attribute.name?.name)) return false;
263
- const value = attribute.value?.type === "JSXExpressionContainer" ? attribute.value.expression : attribute.value;
264
- if (value?.type === "Literal") return !(Number(value.value) < 0);
265
- if (value?.type === "UnaryExpression" && value.operator === "-" && value.argument?.type === "Literal") return !(Number(value.argument.value) > 0);
277
+ var has = (node, name) => (node.attributes ?? []).some((attribute) => attribute.type === "JSXAttribute" && (attribute.name?.type === "JSXNamespacedName" ? `${attribute.name.namespace.name}:${attribute.name.name.name}` : attribute.name?.name) === name || attribute.type === "JSXSpreadAttribute" && objectHasStaticProperty(attribute.argument, name));
278
+ var tabStopValue = (value) => {
279
+ const expression = value?.type === "JSXExpressionContainer" ? value.expression : value;
280
+ if (expression?.type === "Literal") return !(Number(expression.value) < 0);
281
+ if (expression?.type === "UnaryExpression" && expression.operator === "-" && expression.argument?.type === "Literal") return !(Number(expression.argument.value) > 0);
266
282
  return true;
283
+ };
284
+ var hasTabStop = (node) => (node.attributes ?? []).some((attribute) => {
285
+ if (attribute.type === "JSXAttribute" && ["tabIndex", "tabindex"].includes(attribute.name?.name)) return tabStopValue(attribute.value);
286
+ if (attribute.type === "JSXSpreadAttribute") return ["tabIndex", "tabindex"].some((name) => staticObjectPropertyValues(attribute.argument, name).some(tabStopValue));
287
+ return false;
288
+ });
289
+ var noInteractiveWrappers = {
290
+ meta: {
291
+ type: "problem",
292
+ docs: { description: "Generic elements dressed as interactive controls — an interactive role, a click handler or a tabindex on a layout element — re-implement a primitive by hand. Compose the real component." },
293
+ schema: [{
294
+ type: "object",
295
+ properties: {
296
+ allow: {
297
+ type: "array",
298
+ items: { type: "string" }
299
+ },
300
+ message: { type: "string" }
301
+ },
302
+ additionalProperties: false
303
+ }],
304
+ messages: {
305
+ roleWrapper: "A {{element}} with role=\"{{role}}\" hand-builds {{primitive}}: use {{primitive}} from {{path}}. The primitive brings keyboard activation, focus behaviour and ARIA wiring; the wrapper re-implements them badly.",
306
+ clickWrapper: "A click handler on {{element}} composes {{primitive}} by hand: use {{primitive}} from {{path}}. A div that reacts to clicks is a button that cannot be reached by keyboard.",
307
+ tabindexWrapper: "A tabindex on {{element}} makes a layout element focusable, which is focus management the primitives already own: compose the real component instead."
308
+ }
309
+ },
310
+ create(context) {
311
+ const options = context.options?.[0] ?? {};
312
+ const allowed = new Set(options.allow ?? []);
313
+ return { JSXOpeningElement(node) {
314
+ if (node.name?.type !== "JSXIdentifier") return;
315
+ const element = node.name.name;
316
+ if (allowed.has(element) || element in ELEMENT_PRIMITIVES) return;
317
+ if (element[0] === element[0]?.toUpperCase()) return;
318
+ const role = roleOf(node);
319
+ if (role && role in ROLE_PRIMITIVES) {
320
+ const target = ROLE_PRIMITIVES[role];
321
+ context.report({
322
+ node,
323
+ messageId: "roleWrapper",
324
+ data: {
325
+ element,
326
+ role,
327
+ primitive: target.primitive,
328
+ path: target.path
329
+ },
330
+ ...options.message ? { message: options.message } : {}
331
+ });
332
+ return;
333
+ }
334
+ if (GENERIC_ELEMENTS.has(element)) {
335
+ if ([...CLICK_HANDLERS].find((handler) => has(node, handler))) {
336
+ const target = ROLE_PRIMITIVES.button;
337
+ context.report({
338
+ node,
339
+ messageId: "clickWrapper",
340
+ data: {
341
+ element,
342
+ primitive: target.primitive,
343
+ path: target.path
344
+ },
345
+ ...options.message ? { message: options.message } : {}
346
+ });
347
+ return;
348
+ }
349
+ if (hasTabStop(node)) context.report({
350
+ node,
351
+ messageId: "tabindexWrapper",
352
+ data: { element },
353
+ ...options.message ? { message: options.message } : {}
354
+ });
355
+ }
356
+ } };
357
+ }
358
+ };
359
+ var BUTTON_MODULE = "@adea-ai/ui/components/ui/button";
360
+ var ACTION_BUTTON_MODULE = "@adea-ai/ui/components/composites/action-button";
361
+ var ICON_BUTTON_SIZES = /* @__PURE__ */ new Set([
362
+ "icon-2xs",
363
+ "icon-xs",
364
+ "icon-sm",
365
+ "icon-md",
366
+ "icon-lg",
367
+ "icon-xl"
368
+ ]);
369
+ var staticJsxValues = (value) => value?.type === "JSXExpressionContainer" ? [value.expression] : value ? [value] : [];
370
+ var attributeValues = (node, name) => {
371
+ const values = [];
372
+ for (const attribute of node.attributes ?? []) {
373
+ if (attribute.type === "JSXAttribute" && attribute.name?.name === name) values.splice(0, values.length, ...staticJsxValues(attribute.value));
374
+ if (attribute.type === "JSXSpreadAttribute") {
375
+ const spreadValues = staticObjectPropertyValues(attribute.argument, name);
376
+ if (spreadValues.length > 0) values.splice(0, values.length, spreadValues.at(-1));
377
+ }
378
+ }
379
+ return values;
380
+ };
381
+ var staticStringValue = (node) => {
382
+ if (node?.type === "Literal" && typeof node.value === "string") return node.value;
383
+ if (node?.type === "TemplateLiteral" && node.expressions.length === 0) return node.quasis[0].value.cooked ?? node.quasis[0].value.raw;
384
+ return null;
385
+ };
386
+ var isIconButtonSize = (node) => attributeValues(node, "size").some((value) => {
387
+ const size = staticStringValue(value);
388
+ return size !== null && ICON_BUTTON_SIZES.has(size);
267
389
  });
390
+ var actionTooltipStatus = (node) => {
391
+ const values = attributeValues(node, "tooltip");
392
+ if (values.length === 0) return "missing";
393
+ const strings = values.map(staticStringValue);
394
+ if (strings.some((value) => value !== null && value.trim().length > 0)) return "valid";
395
+ if (strings.every((value) => value !== null)) return "blank";
396
+ return "unknown";
397
+ };
398
+ var isImportedComponent = (identifier, imports) => identifier?.type === "Identifier" && imports.has(identifier.name);
268
399
  var plugin = {
269
400
  meta: { name: "adea" },
270
401
  rules: {
@@ -325,74 +456,55 @@ var plugin = {
325
456
  };
326
457
  }
327
458
  },
328
- "no-interactive-wrappers": {
459
+ "no-interactive-wrappers": noInteractiveWrappers,
460
+ "require-action-button-tooltip": {
329
461
  meta: {
330
462
  type: "problem",
331
- docs: { description: "Generic elements dressed as interactive controls — an interactive role, a click handler or a tabindex on a layout element — re-implement a primitive by hand. Compose the real component." },
332
- schema: [{
333
- type: "object",
334
- properties: {
335
- allow: {
336
- type: "array",
337
- items: { type: "string" }
338
- },
339
- message: { type: "string" }
340
- },
341
- additionalProperties: false
342
- }],
463
+ docs: { description: "Consumer icon-size shared Button actions use ActionButton with a nonblank tooltip; dynamic values remain a review boundary." },
464
+ schema: [],
343
465
  messages: {
344
- roleWrapper: "A {{element}} with role=\"{{role}}\" hand-builds {{primitive}}: use {{primitive}} from {{path}}. The primitive brings keyboard activation, focus behaviour and ARIA wiring; the wrapper re-implements them badly.",
345
- clickWrapper: "A click handler on {{element}} composes {{primitive}} by hand: use {{primitive}} from {{path}}. A div that reacts to clicks is a button that cannot be reached by keyboard.",
346
- tabindexWrapper: "A tabindex on {{element}} makes a layout element focusable, which is focus management the primitives already own: compose the real component instead."
466
+ useActionButton: "Icon-size Button actions use ActionButton with a nonblank tooltip. Keep the control name in aria-label; the tooltip explains the action.",
467
+ missingTooltip: "An icon-size ActionButton needs a supplied nonblank tooltip. Keep its accessible name in aria-label as well."
347
468
  }
348
469
  },
349
470
  create(context) {
350
- const options = context.options?.[0] ?? {};
351
- const allowed = new Set(options.allow ?? []);
352
- return { JSXOpeningElement(node) {
353
- if (node.name?.type !== "JSXIdentifier") return;
354
- const element = node.name.name;
355
- if (allowed.has(element) || element in ELEMENT_PRIMITIVES) return;
356
- if (element[0] === element[0]?.toUpperCase()) return;
357
- const role = roleOf(node);
358
- if (role && role in ROLE_PRIMITIVES) {
359
- const target = ROLE_PRIMITIVES[role];
360
- context.report({
361
- node,
362
- messageId: "roleWrapper",
363
- data: {
364
- element,
365
- role,
366
- primitive: target.primitive,
367
- path: target.path
368
- },
369
- ...options.message ? { message: options.message } : {}
370
- });
371
- return;
471
+ const buttons = /* @__PURE__ */ new Set();
472
+ const actionButtons = /* @__PURE__ */ new Set();
473
+ const recordImports = (node) => {
474
+ const source = node.source?.value;
475
+ const target = source === BUTTON_MODULE ? buttons : source === ACTION_BUTTON_MODULE ? actionButtons : null;
476
+ if (!target) return;
477
+ for (const specifier of node.specifiers ?? []) {
478
+ if (specifier.type !== "ImportSpecifier") continue;
479
+ const imported = specifier.imported?.name ?? specifier.imported?.value;
480
+ if (source === BUTTON_MODULE && imported === "Button" || source === ACTION_BUTTON_MODULE && imported === "ActionButton") target.add(specifier.local?.name);
372
481
  }
373
- if (GENERIC_ELEMENTS.has(element)) {
374
- if ([...CLICK_HANDLERS].find((handler) => has(node, handler))) {
375
- const target = ROLE_PRIMITIVES.button;
482
+ };
483
+ return {
484
+ ImportDeclaration: recordImports,
485
+ JSXOpeningElement(node) {
486
+ if (!isIconButtonSize(node)) return;
487
+ const name = node.name?.type === "JSXIdentifier" ? node.name.name : null;
488
+ const isButton = name !== null && buttons.has(name);
489
+ const isActionButton = name !== null && actionButtons.has(name);
490
+ const asValues = attributeValues(node, "as");
491
+ const targetsButton = asValues.some((value) => isImportedComponent(value, buttons));
492
+ const targetsActionButton = asValues.some((value) => isImportedComponent(value, actionButtons));
493
+ if (isButton || targetsButton) {
376
494
  context.report({
377
495
  node,
378
- messageId: "clickWrapper",
379
- data: {
380
- element,
381
- primitive: target.primitive,
382
- path: target.path
383
- },
384
- ...options.message ? { message: options.message } : {}
496
+ messageId: "useActionButton"
385
497
  });
386
498
  return;
387
499
  }
388
- if (hasTabStop(node)) context.report({
500
+ if (!isActionButton && !targetsActionButton) return;
501
+ const status = actionTooltipStatus(node);
502
+ if (status === "missing" || status === "blank") context.report({
389
503
  node,
390
- messageId: "tabindexWrapper",
391
- data: { element },
392
- ...options.message ? { message: options.message } : {}
504
+ messageId: "missingTooltip"
393
505
  });
394
506
  }
395
- } };
507
+ };
396
508
  }
397
509
  }
398
510
  }