@adea-ai/ui 0.106.2 → 0.108.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 (112) hide show
  1. package/dist/components/composites/appearance-editor/appearance-editor.d.ts +9 -3
  2. package/dist/components/composites/appearance-editor/appearance-editor.d.ts.map +1 -1
  3. package/dist/components/composites/appearance-editor/appearance-editor.js +61 -29
  4. package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
  5. package/dist/components/composites/appearance-editor/appearance-types.d.ts +2 -0
  6. package/dist/components/composites/appearance-editor/appearance-types.d.ts.map +1 -1
  7. package/dist/components/composites/appearance-editor/index.d.ts +1 -1
  8. package/dist/components/composites/appearance-editor/index.d.ts.map +1 -1
  9. package/dist/components/composites/appearance-editor/index.js +2 -2
  10. package/dist/components/layout/contextual-sidebar/contextual-sidebar.d.ts +55 -0
  11. package/dist/components/layout/contextual-sidebar/contextual-sidebar.d.ts.map +1 -0
  12. package/dist/components/layout/contextual-sidebar/contextual-sidebar.js +199 -0
  13. package/dist/components/layout/contextual-sidebar/contextual-sidebar.js.map +1 -0
  14. package/dist/components/layout/contextual-sidebar/index.d.ts +3 -0
  15. package/dist/components/layout/contextual-sidebar/index.d.ts.map +1 -0
  16. package/dist/components/layout/contextual-sidebar/index.js +3 -0
  17. package/dist/components/layout/pixel-resize-handle/index.d.ts +2 -0
  18. package/dist/components/layout/pixel-resize-handle/index.d.ts.map +1 -0
  19. package/dist/components/layout/pixel-resize-handle/index.js +2 -0
  20. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.d.ts +29 -0
  21. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.d.ts.map +1 -0
  22. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +183 -0
  23. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -0
  24. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.d.ts +3 -19
  25. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.d.ts.map +1 -1
  26. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js +8 -76
  27. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js.map +1 -1
  28. package/dist/components/ui/badge/badge.d.ts.map +1 -1
  29. package/dist/components/ui/badge/badge.js +9 -5
  30. package/dist/components/ui/badge/badge.js.map +1 -1
  31. package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
  32. package/dist/components/ui/combobox/combobox.js +2 -2
  33. package/dist/components/ui/combobox/combobox.js.map +1 -1
  34. package/dist/components/ui/context-menu/context-menu.d.ts.map +1 -1
  35. package/dist/components/ui/context-menu/context-menu.js +3 -3
  36. package/dist/components/ui/context-menu/context-menu.js.map +1 -1
  37. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  38. package/dist/components/ui/dropdown-menu/dropdown-menu.js +7 -4
  39. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
  40. package/dist/components/ui/menubar/menubar.d.ts.map +1 -1
  41. package/dist/components/ui/menubar/menubar.js +3 -3
  42. package/dist/components/ui/menubar/menubar.js.map +1 -1
  43. package/dist/components/ui/popover/popover.d.ts.map +1 -1
  44. package/dist/components/ui/popover/popover.js +2 -2
  45. package/dist/components/ui/popover/popover.js.map +1 -1
  46. package/dist/components/ui/resizable/resizable.d.ts.map +1 -1
  47. package/dist/components/ui/resizable/resizable.js +2 -2
  48. package/dist/components/ui/resizable/resizable.js.map +1 -1
  49. package/dist/components/ui/select/select.d.ts.map +1 -1
  50. package/dist/components/ui/select/select.js +2 -2
  51. package/dist/components/ui/select/select.js.map +1 -1
  52. package/dist/components/ui/sheet/sheet.d.ts +16 -0
  53. package/dist/components/ui/sheet/sheet.d.ts.map +1 -1
  54. package/dist/components/ui/sheet/sheet.js +82 -16
  55. package/dist/components/ui/sheet/sheet.js.map +1 -1
  56. package/dist/index.d.ts +1 -0
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +4 -2
  59. package/dist/lib/overlay.d.ts +15 -0
  60. package/dist/lib/overlay.d.ts.map +1 -1
  61. package/dist/lib/overlay.js +14 -1
  62. package/dist/lib/overlay.js.map +1 -1
  63. package/dist/lint/index.d.ts.map +1 -1
  64. package/dist/lint.js +154 -20
  65. package/dist/lint.js.map +1 -1
  66. package/dist/r/appearance-editor.json +1 -1
  67. package/dist/r/contextual-sidebar.json +25 -0
  68. package/dist/r/pixel-resize-handle.json +23 -0
  69. package/dist/r/registry.json +50 -2
  70. package/dist/r/sidebar-nav.json +1 -1
  71. package/dist/r/src/components/composites/appearance-editor/appearance-editor.tsx +55 -33
  72. package/dist/r/src/components/composites/appearance-editor/appearance-types.ts +2 -0
  73. package/dist/r/src/components/composites/appearance-editor/index.ts +1 -1
  74. package/dist/r/src/components/layout/contextual-sidebar/contextual-sidebar.tsx +180 -0
  75. package/dist/r/src/components/layout/contextual-sidebar/index.ts +6 -0
  76. package/dist/r/src/components/layout/pixel-resize-handle/index.ts +1 -0
  77. package/dist/r/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +177 -0
  78. package/dist/r/src/components/layout/sidebar-nav/sidebar-nav-resize-handle.tsx +7 -55
  79. package/dist/r/src/components/ui/badge/badge.tsx +9 -5
  80. package/dist/r/src/components/ui/combobox/combobox.tsx +2 -1
  81. package/dist/r/src/components/ui/context-menu/context-menu.tsx +3 -0
  82. package/dist/r/src/components/ui/dropdown-menu/dropdown-menu.tsx +9 -0
  83. package/dist/r/src/components/ui/menubar/menubar.tsx +3 -0
  84. package/dist/r/src/components/ui/popover/popover.tsx +8 -1
  85. package/dist/r/src/components/ui/resizable/resizable.tsx +4 -2
  86. package/dist/r/src/components/ui/select/select.tsx +2 -1
  87. package/dist/r/src/components/ui/sheet/sheet.tsx +78 -15
  88. package/dist/r/src/lib/overlay.ts +14 -0
  89. package/dist/r/src/styles/base.css +13 -0
  90. package/package.json +3 -1
  91. package/registry.json +50 -2
  92. package/src/components/composites/appearance-editor/appearance-editor.tsx +55 -33
  93. package/src/components/composites/appearance-editor/appearance-types.ts +2 -0
  94. package/src/components/composites/appearance-editor/index.ts +1 -1
  95. package/src/components/layout/contextual-sidebar/contextual-sidebar.tsx +180 -0
  96. package/src/components/layout/contextual-sidebar/index.ts +6 -0
  97. package/src/components/layout/pixel-resize-handle/index.ts +1 -0
  98. package/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +177 -0
  99. package/src/components/layout/sidebar-nav/sidebar-nav-resize-handle.tsx +7 -55
  100. package/src/components/ui/badge/badge.tsx +9 -5
  101. package/src/components/ui/combobox/combobox.tsx +2 -1
  102. package/src/components/ui/context-menu/context-menu.tsx +3 -0
  103. package/src/components/ui/dropdown-menu/dropdown-menu.tsx +9 -0
  104. package/src/components/ui/menubar/menubar.tsx +3 -0
  105. package/src/components/ui/popover/popover.tsx +8 -1
  106. package/src/components/ui/resizable/resizable.tsx +4 -2
  107. package/src/components/ui/select/select.tsx +2 -1
  108. package/src/components/ui/sheet/sheet.tsx +78 -15
  109. package/src/index.ts +1 -0
  110. package/src/lib/overlay.ts +14 -0
  111. package/src/lint/index.ts +234 -22
  112. package/src/styles/base.css +13 -0
@@ -1 +1 @@
1
- {"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/sheet/sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,IAAI,aAAa,EACvB,OAAO,IAAI,oBAAoB,EAEhC,MAAM,sBAAsB,CAAA;AAG7B,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE7D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAKtD;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,aAAa;;8EAelB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,oBAAoB,CAAC,GACzE,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IACnC,WAAW,CAAC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AM,aAAa;;;8EAuClB,CAAA;AAQD,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,oBAAoB,CAAC,GACzE,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IACnC,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,KAAK,CAAA;IACjC,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,sFAAsF;IACtF,eAAe,CAAC,EAAE,QAAQ,CAAC,WAAW,GAAG,SAAS,CAAC,CAAA;CACpD,CAAA;AAEH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,eA0DpD;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,eAEhE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,eAE/E;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,WAAW,CAAC,eAGvF;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eAYvD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eASrD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eAYvD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,KAAK,CAAC,eAQ3E;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,WAAW,CAAC,eAKvF;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
@@ -22,26 +22,74 @@ var _tmpl$3 = /*#__PURE__*/ template(`<div data-slot=sheet-footer>`);
22
22
  * `end`, and a full-width row for `top` and `bottom`. The slide-in direction
23
23
  * follows from the side, so a caller never pairs them by hand.
24
24
  *
25
+ * `variant` decides how it meets that edge. `inset` — the default for `end` —
26
+ * docks the panel inside the main view: below the top bar, one equal gap from
27
+ * the top bar, the end edge and the bottom, with no scrim, so the work it edits
28
+ * stays visible and the top bar stays reachable. It is the shape for editing one
29
+ * thing beside its context (appearance settings, a task, a record). `edge` runs
30
+ * edge to edge over a scrim — the shape of a navigation drawer, and the default
31
+ * for every other side.
32
+ *
33
+ * Its parts read alike everywhere: `SheetHeader` holds a heading, a description
34
+ * and a full-width rule beneath, with the close button in the corner;
35
+ * `SheetBody` scrolls on its own; `SheetFooter` is a full-width tinted band that
36
+ * holds the decision.
37
+ *
25
38
  * Controlled sheets opened from outside a `SheetTrigger` restore focus to the
26
39
  * element focused before opening. Pass `restoreFocusRef` when a stable external
27
40
  * opener must be used instead, such as when another layer closes before the
28
41
  * sheet opens.
29
42
  */
30
- var sheetVariants = cva("bg-popover text-popover-foreground fixed z-(--z-dialog) flex flex-col gap-4 border-border shadow-lg", {
31
- variants: { side: {
32
- top: "inset-x-0 top-0 h-auto max-h-[85vh] rounded-b-xl border-b data-expanded:slide-in-from-top data-closed:slide-out-to-top",
33
- bottom: "inset-x-0 bottom-0 h-auto max-h-[85vh] rounded-t-xl border-t data-expanded:slide-in-from-bottom data-closed:slide-out-to-bottom",
34
- start: "inset-y-0 start-0 h-full w-80 max-w-[85vw] rounded-e-xl border-e data-expanded:slide-in-from-left data-closed:slide-out-to-left",
35
- end: "inset-y-0 end-0 h-full w-80 max-w-[85vw] rounded-s-xl border-s data-expanded:slide-in-from-right data-closed:slide-out-to-right"
36
- } },
37
- defaultVariants: { side: "end" }
43
+ var sheetVariants = cva("bg-popover text-popover-foreground fixed z-(--z-dialog) flex flex-col overflow-clip border-border shadow-lg", {
44
+ variants: {
45
+ side: {
46
+ top: "data-expanded:slide-in-from-top data-closed:slide-out-to-top",
47
+ bottom: "data-expanded:slide-in-from-bottom data-closed:slide-out-to-bottom",
48
+ start: "data-expanded:slide-in-from-left data-closed:slide-out-to-left",
49
+ end: "data-expanded:slide-in-from-right data-closed:slide-out-to-right"
50
+ },
51
+ variant: {
52
+ edge: "",
53
+ inset: "panel-dialog-inset w-lg rounded-xl border"
54
+ }
55
+ },
56
+ compoundVariants: [
57
+ {
58
+ side: "top",
59
+ variant: "edge",
60
+ class: "inset-x-0 top-0 h-auto max-h-[85vh] rounded-b-xl border-b"
61
+ },
62
+ {
63
+ side: "bottom",
64
+ variant: "edge",
65
+ class: "inset-x-0 bottom-0 h-auto max-h-[85vh] rounded-t-xl border-t"
66
+ },
67
+ {
68
+ side: "start",
69
+ variant: "edge",
70
+ class: "inset-y-0 start-0 h-full w-80 max-w-[85vw] rounded-e-xl border-e"
71
+ },
72
+ {
73
+ side: "end",
74
+ variant: "edge",
75
+ class: "inset-y-0 end-0 h-full w-80 max-w-[85vw] rounded-s-xl border-s"
76
+ }
77
+ ],
78
+ defaultVariants: {
79
+ side: "end",
80
+ variant: "edge"
81
+ }
38
82
  });
83
+ /** `inset` for the end edge, `edge` for every other side, unless the caller says. */
84
+ var sheetVariantFor = (side, variant) => variant ?? ((side ?? "end") === "end" ? "inset" : "edge");
39
85
  function SheetContent(props) {
40
86
  const [local, rest] = splitProps(props, [
41
87
  "class",
42
88
  "side",
89
+ "variant",
43
90
  "children",
44
91
  "closeButton",
92
+ "closeLabel",
45
93
  "restoreFocusRef",
46
94
  "onOpenAutoFocus",
47
95
  "onCloseAutoFocus"
@@ -53,10 +101,26 @@ function SheetContent(props) {
53
101
  onOpenAutoFocus: local.onOpenAutoFocus,
54
102
  onCloseAutoFocus: local.onCloseAutoFocus
55
103
  });
104
+ const variant = () => sheetVariantFor(local.side, local.variant);
56
105
  return createComponent(Dialog.Portal, { get children() {
57
- return [createComponent(DialogOverlay, {}), createComponent(Content, mergeProps({ get ["class"]() {
58
- return cn(sheetVariants({ side: local.side }), "data-expanded:animate-in data-expanded:fade-in-0 data-expanded:duration-200", "data-closed:animate-out data-closed:fade-out-0 data-closed:duration-150", local.class);
59
- } }, rest, {
106
+ return [createComponent(Show, {
107
+ get when() {
108
+ return variant() === "edge";
109
+ },
110
+ get children() {
111
+ return createComponent(DialogOverlay, {});
112
+ }
113
+ }), createComponent(Content, mergeProps({
114
+ get ["data-variant"]() {
115
+ return variant();
116
+ },
117
+ get ["class"]() {
118
+ return cn(sheetVariants({
119
+ side: local.side,
120
+ variant: variant()
121
+ }), "data-expanded:animate-in data-expanded:fade-in-0 data-expanded:duration-200", "data-closed:animate-out data-closed:fade-out-0 data-closed:duration-150", local.class);
122
+ }
123
+ }, rest, {
60
124
  get onOpenAutoFocus() {
61
125
  return focusRestoration.onOpenAutoFocus;
62
126
  },
@@ -70,7 +134,9 @@ function SheetContent(props) {
70
134
  },
71
135
  get children() {
72
136
  return createComponent(Dialog.CloseButton, {
73
- "aria-label": "Close",
137
+ get ["aria-label"]() {
138
+ return local.closeLabel ?? "Close";
139
+ },
74
140
  tabindex: "0",
75
141
  "class": "absolute top-3.5 end-3.5 rounded-md p-1 text-muted-foreground transition-colors ease-out outline-none hover:bg-surface-hover hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle",
76
142
  get children() {
@@ -100,7 +166,7 @@ function SheetHeader(props) {
100
166
  return (() => {
101
167
  var _el$ = _tmpl$();
102
168
  spread(_el$, mergeProps({ get ["class"]() {
103
- return cn("flex flex-col gap-1.5 border-b border-border p-4 pe-12 text-start", local.class);
169
+ return cn("flex shrink-0 flex-col gap-1.5 border-b border-border p-4 pe-12 text-start", local.class);
104
170
  } }, rest), false, false);
105
171
  return _el$;
106
172
  })();
@@ -110,7 +176,7 @@ function SheetBody(props) {
110
176
  return (() => {
111
177
  var _el$2 = _tmpl$2();
112
178
  spread(_el$2, mergeProps({ get ["class"]() {
113
- return cn("flex-1 overflow-y-auto px-4 pb-4", local.class);
179
+ return cn("min-h-0 flex-1 overflow-y-auto p-4", local.class);
114
180
  } }, rest), false, false);
115
181
  return _el$2;
116
182
  })();
@@ -120,7 +186,7 @@ function SheetFooter(props) {
120
186
  return (() => {
121
187
  var _el$3 = _tmpl$3();
122
188
  spread(_el$3, mergeProps({ get ["class"]() {
123
- return cn("flex items-center justify-end gap-2 border-t border-border p-4", local.class);
189
+ return cn("flex shrink-0 flex-wrap items-center justify-end gap-2 border-t border-border bg-background px-4 py-3", local.class);
124
190
  } }, rest), false, false);
125
191
  return _el$3;
126
192
  })();
@@ -129,7 +195,7 @@ function SheetTitle(props) {
129
195
  const [local, rest] = splitProps(props, ["class"]);
130
196
  return createComponent(Dialog.Title, mergeProps({ get ["class"]() {
131
197
  return cn(headingVariants({
132
- size: "subsection",
198
+ size: "card",
133
199
  leading: "none"
134
200
  }), local.class);
135
201
  } }, rest));
@@ -1 +1 @@
1
- {"version":3,"file":"sheet.js","names":["Dialog","KobalteDialog","Content","KobalteDialogContent","useDialogContext","X","Accessor","ComponentProps","JSX","Show","splitProps","cva","VariantProps","cn","createDialogFocusRestoration","DialogOverlay","headingVariants","sheetVariants","variants","side","top","bottom","start","end","defaultVariants","SheetContentProps","closeButton","Element","restoreFocusRef","HTMLElement","SheetContent","props","local","rest","dialog","focusRestoration","open","isOpen","onOpenAutoFocus","onCloseAutoFocus","_$createComponent","Portal","children","_$mergeProps","class","_$memo","when","CloseButton","tabindex","Sheet","SheetTrigger","Trigger","SheetCloseButton","SheetHeader","_el$","_tmpl$","_$spread","SheetBody","_el$2","_tmpl$2","SheetFooter","_el$3","_tmpl$3","SheetTitle","Title","size","leading","SheetDescription","Description","_$createComponent","KobalteDialog","KobalteDialogContent","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/sheet/sheet.tsx"],"sourcesContent":["import {\n Dialog as KobalteDialog,\n Content as KobalteDialogContent,\n useDialogContext,\n} from '@kobalte/core/dialog'\n// AlertDialog shares DialogRoot.Content; Sheet uses the stable named primitive.\nimport { X } from 'lucide-solid'\nimport type { Accessor, ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\nimport { createDialogFocusRestoration, DialogOverlay } from '../dialog/dialog'\nimport { headingVariants } from '../typography'\n\n/**\n * Sheet.\n *\n * A dialog anchored to an edge of the window rather than centred. Use it when\n * the content is a *panel beside* the work — a details inspector, a filter rail,\n * a settings flyout — so the user keeps the context it belongs to in view.\n * A centred dialog interrupts; a sheet is inspected.\n *\n * `side` decides which edge; the panel is a full-height column for `start` and\n * `end`, and a full-width row for `top` and `bottom`. The slide-in direction\n * follows from the side, so a caller never pairs them by hand.\n *\n * Controlled sheets opened from outside a `SheetTrigger` restore focus to the\n * element focused before opening. Pass `restoreFocusRef` when a stable external\n * opener must be used instead, such as when another layer closes before the\n * sheet opens.\n */\nconst sheetVariants = cva(\n 'bg-popover text-popover-foreground fixed z-(--z-dialog) flex flex-col gap-4 border-border shadow-lg',\n {\n variants: {\n side: {\n top: 'inset-x-0 top-0 h-auto max-h-[85vh] rounded-b-xl border-b data-expanded:slide-in-from-top data-closed:slide-out-to-top',\n bottom:\n 'inset-x-0 bottom-0 h-auto max-h-[85vh] rounded-t-xl border-t data-expanded:slide-in-from-bottom data-closed:slide-out-to-bottom',\n start:\n 'inset-y-0 start-0 h-full w-80 max-w-[85vw] rounded-e-xl border-e data-expanded:slide-in-from-left data-closed:slide-out-to-left',\n end: 'inset-y-0 end-0 h-full w-80 max-w-[85vw] rounded-s-xl border-s data-expanded:slide-in-from-right data-closed:slide-out-to-right',\n },\n },\n defaultVariants: { side: 'end' },\n }\n)\n\nexport type SheetContentProps = ComponentProps<typeof KobalteDialogContent> &\n VariantProps<typeof sheetVariants> & {\n closeButton?: JSX.Element | false\n /** Supplies the stable external element to focus when the controlled sheet closes. */\n restoreFocusRef?: Accessor<HTMLElement | undefined>\n }\n\nexport function SheetContent(props: SheetContentProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'side',\n 'children',\n 'closeButton',\n 'restoreFocusRef',\n 'onOpenAutoFocus',\n 'onCloseAutoFocus',\n ])\n const dialog = useDialogContext()\n const focusRestoration = createDialogFocusRestoration({\n open: dialog.isOpen,\n restoreFocusRef: local.restoreFocusRef,\n onOpenAutoFocus: local.onOpenAutoFocus,\n onCloseAutoFocus: local.onCloseAutoFocus,\n })\n\n return (\n <KobalteDialog.Portal>\n <DialogOverlay />\n <KobalteDialogContent\n class={cn(\n sheetVariants({ side: local.side }),\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:duration-200',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:duration-150',\n local.class\n )}\n {...rest}\n onOpenAutoFocus={focusRestoration.onOpenAutoFocus}\n onCloseAutoFocus={focusRestoration.onCloseAutoFocus}\n >\n {local.children}\n <Show when={local.closeButton !== false}>\n {/* The close action opts into the tab order explicitly. Engines that\n derive tabbability from the DOM instead of the host (Playwright's\n WebKit walks only explicit tabindex and form controls) would skip\n an implicitly-tabbable button and jump past the sheet's end. */}\n <KobalteDialog.CloseButton\n aria-label=\"Close\"\n tabindex=\"0\"\n class=\"absolute top-3.5 end-3.5 rounded-md p-1 text-muted-foreground transition-colors ease-out outline-none hover:bg-surface-hover hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle\"\n >\n {local.closeButton ?? <X class=\"size-4\" />}\n </KobalteDialog.CloseButton>\n </Show>\n </KobalteDialogContent>\n </KobalteDialog.Portal>\n )\n}\n\nexport function Sheet(props: ComponentProps<typeof KobalteDialog>) {\n return <KobalteDialog {...props} />\n}\n\nexport function SheetTrigger(props: ComponentProps<typeof KobalteDialog.Trigger>) {\n return <KobalteDialog.Trigger {...props} />\n}\n\nexport function SheetCloseButton(props: ComponentProps<typeof KobalteDialog.CloseButton>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteDialog.CloseButton class={cn(local.class)} {...rest} />\n}\n\nexport function SheetHeader(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sheet-header\"\n class={cn('flex flex-col gap-1.5 border-b border-border p-4 pe-12 text-start', local.class)}\n {...rest}\n />\n )\n}\n\nexport function SheetBody(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sheet-body\"\n class={cn('flex-1 overflow-y-auto px-4 pb-4', local.class)}\n {...rest}\n />\n )\n}\n\nexport function SheetFooter(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sheet-footer\"\n class={cn('flex items-center justify-end gap-2 border-t border-border p-4', local.class)}\n {...rest}\n />\n )\n}\n\nexport function SheetTitle(props: ComponentProps<typeof KobalteDialog.Title>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteDialog.Title\n class={cn(headingVariants({ size: 'subsection', leading: 'none' }), local.class)}\n {...rest}\n />\n )\n}\n\nexport function SheetDescription(props: ComponentProps<typeof KobalteDialog.Description>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteDialog.Description class={cn('text-muted-foreground text-sm', local.class)} {...rest} />\n )\n}\n\nexport { sheetVariants }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,IAAMiB,gBAAgBN,IACpB,uGACA;CACEO,UAAU,EACRC,MAAM;EACJC,KAAK;EACLC,QACE;EACFC,OACE;EACFC,KAAK;CACP,EACF;CACAC,iBAAiB,EAAEL,MAAM,MAAM;AACjC,CACF;AASA,SAAgBW,aAAaC,OAA0B;CACrD,MAAM,CAACC,OAAOC,QAAQvB,WAAWqB,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;CAAkB,CACnB;CACD,MAAMG,SAAS9B,iBAAiB;CAChC,MAAM+B,mBAAmBrB,6BAA6B;EACpDsB,MAAMF,OAAOG;EACbT,iBAAiBI,MAAMJ;EACvBU,iBAAiBN,MAAMM;EACvBC,kBAAkBP,MAAMO;CAC1B,CAAC;CAED,OAAAC,gBACGvC,OAAcwC,QAAM,EAAA,IAAAC,WAAA;EAAA,OAAA,CAAAF,gBAClBzB,eAAa,CAAA,CAAA,GAAAyB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B,GAAG,iCAAiCmB,MAAMY,KAAK;CAAC,EAAA,GAAMX,IAAI,CAAA;AAEhG"}
1
+ {"version":3,"file":"sheet.js","names":["Dialog","KobalteDialog","Content","KobalteDialogContent","useDialogContext","X","Accessor","ComponentProps","JSX","Show","splitProps","cva","VariantProps","cn","createDialogFocusRestoration","DialogOverlay","headingVariants","sheetVariants","variants","side","top","bottom","start","end","variant","edge","inset","compoundVariants","class","defaultVariants","sheetVariantFor","SheetContentProps","closeButton","Element","closeLabel","restoreFocusRef","HTMLElement","SheetContent","props","local","rest","dialog","focusRestoration","open","isOpen","onOpenAutoFocus","onCloseAutoFocus","_$createComponent","Portal","children","when","_$mergeProps","data-variant","_$memo","CloseButton","aria-label","tabindex","Sheet","SheetTrigger","Trigger","SheetCloseButton","SheetHeader","_el$","_tmpl$","_$spread","SheetBody","_el$2","_tmpl$2","SheetFooter","_el$3","_tmpl$3","SheetTitle","Title","size","leading","SheetDescription","Description","_$createComponent","KobalteDialog","KobalteDialogContent","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/sheet/sheet.tsx"],"sourcesContent":["import {\n Dialog as KobalteDialog,\n Content as KobalteDialogContent,\n useDialogContext,\n} from '@kobalte/core/dialog'\n// AlertDialog shares DialogRoot.Content; Sheet uses the stable named primitive.\nimport { X } from 'lucide-solid'\nimport type { Accessor, ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\nimport { createDialogFocusRestoration, DialogOverlay } from '../dialog/dialog'\nimport { headingVariants } from '../typography'\n\n/**\n * Sheet.\n *\n * A dialog anchored to an edge of the window rather than centred. Use it when\n * the content is a *panel beside* the work — a details inspector, a filter rail,\n * a settings flyout — so the user keeps the context it belongs to in view.\n * A centred dialog interrupts; a sheet is inspected.\n *\n * `side` decides which edge; the panel is a full-height column for `start` and\n * `end`, and a full-width row for `top` and `bottom`. The slide-in direction\n * follows from the side, so a caller never pairs them by hand.\n *\n * `variant` decides how it meets that edge. `inset` — the default for `end` —\n * docks the panel inside the main view: below the top bar, one equal gap from\n * the top bar, the end edge and the bottom, with no scrim, so the work it edits\n * stays visible and the top bar stays reachable. It is the shape for editing one\n * thing beside its context (appearance settings, a task, a record). `edge` runs\n * edge to edge over a scrim — the shape of a navigation drawer, and the default\n * for every other side.\n *\n * Its parts read alike everywhere: `SheetHeader` holds a heading, a description\n * and a full-width rule beneath, with the close button in the corner;\n * `SheetBody` scrolls on its own; `SheetFooter` is a full-width tinted band that\n * holds the decision.\n *\n * Controlled sheets opened from outside a `SheetTrigger` restore focus to the\n * element focused before opening. Pass `restoreFocusRef` when a stable external\n * opener must be used instead, such as when another layer closes before the\n * sheet opens.\n */\n// `overflow-clip`, not `overflow-hidden`: a hidden overflow can still be\n// scrolled programmatically (focus, scrollIntoView, scrollTop), which slid the\n// pinned footer out of view. Only SheetBody scrolls.\nconst sheetVariants = cva(\n 'bg-popover text-popover-foreground fixed z-(--z-dialog) flex flex-col overflow-clip border-border shadow-lg',\n {\n variants: {\n side: {\n top: 'data-expanded:slide-in-from-top data-closed:slide-out-to-top',\n bottom: 'data-expanded:slide-in-from-bottom data-closed:slide-out-to-bottom',\n start: 'data-expanded:slide-in-from-left data-closed:slide-out-to-left',\n end: 'data-expanded:slide-in-from-right data-closed:slide-out-to-right',\n },\n variant: {\n edge: '',\n inset: 'panel-dialog-inset w-lg rounded-xl border',\n },\n },\n compoundVariants: [\n {\n side: 'top',\n variant: 'edge',\n class: 'inset-x-0 top-0 h-auto max-h-[85vh] rounded-b-xl border-b',\n },\n {\n side: 'bottom',\n variant: 'edge',\n class: 'inset-x-0 bottom-0 h-auto max-h-[85vh] rounded-t-xl border-t',\n },\n {\n side: 'start',\n variant: 'edge',\n class: 'inset-y-0 start-0 h-full w-80 max-w-[85vw] rounded-e-xl border-e',\n },\n {\n side: 'end',\n variant: 'edge',\n class: 'inset-y-0 end-0 h-full w-80 max-w-[85vw] rounded-s-xl border-s',\n },\n ],\n defaultVariants: { side: 'end', variant: 'edge' },\n }\n)\n\n/** `inset` for the end edge, `edge` for every other side, unless the caller says. */\nconst sheetVariantFor = (\n side: SheetContentProps['side'],\n variant: SheetContentProps['variant']\n): 'edge' | 'inset' => variant ?? ((side ?? 'end') === 'end' ? 'inset' : 'edge')\n\nexport type SheetContentProps = ComponentProps<typeof KobalteDialogContent> &\n VariantProps<typeof sheetVariants> & {\n closeButton?: JSX.Element | false\n /** The close button's accessible name. Defaults to \"Close\". */\n closeLabel?: string\n /** Supplies the stable external element to focus when the controlled sheet closes. */\n restoreFocusRef?: Accessor<HTMLElement | undefined>\n }\n\nexport function SheetContent(props: SheetContentProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'side',\n 'variant',\n 'children',\n 'closeButton',\n 'closeLabel',\n 'restoreFocusRef',\n 'onOpenAutoFocus',\n 'onCloseAutoFocus',\n ])\n const dialog = useDialogContext()\n const focusRestoration = createDialogFocusRestoration({\n open: dialog.isOpen,\n restoreFocusRef: local.restoreFocusRef,\n onOpenAutoFocus: local.onOpenAutoFocus,\n onCloseAutoFocus: local.onCloseAutoFocus,\n })\n\n const variant = () => sheetVariantFor(local.side, local.variant)\n\n return (\n <KobalteDialog.Portal>\n {/* An inset panel is beside the work, so the work stays in view: no scrim.\n It is still modal — focus stays inside and an outside click dismisses. */}\n <Show when={variant() === 'edge'}>\n <DialogOverlay />\n </Show>\n <KobalteDialogContent\n data-variant={variant()}\n class={cn(\n sheetVariants({ side: local.side, variant: variant() }),\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:duration-200',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:duration-150',\n local.class\n )}\n {...rest}\n onOpenAutoFocus={focusRestoration.onOpenAutoFocus}\n onCloseAutoFocus={focusRestoration.onCloseAutoFocus}\n >\n {local.children}\n <Show when={local.closeButton !== false}>\n {/* The close action opts into the tab order explicitly. Engines that\n derive tabbability from the DOM instead of the host (Playwright's\n WebKit walks only explicit tabindex and form controls) would skip\n an implicitly-tabbable button and jump past the sheet's end. */}\n <KobalteDialog.CloseButton\n aria-label={local.closeLabel ?? 'Close'}\n tabindex=\"0\"\n class=\"absolute top-3.5 end-3.5 rounded-md p-1 text-muted-foreground transition-colors ease-out outline-none hover:bg-surface-hover hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle\"\n >\n {local.closeButton ?? <X class=\"size-4\" />}\n </KobalteDialog.CloseButton>\n </Show>\n </KobalteDialogContent>\n </KobalteDialog.Portal>\n )\n}\n\nexport function Sheet(props: ComponentProps<typeof KobalteDialog>) {\n return <KobalteDialog {...props} />\n}\n\nexport function SheetTrigger(props: ComponentProps<typeof KobalteDialog.Trigger>) {\n return <KobalteDialog.Trigger {...props} />\n}\n\nexport function SheetCloseButton(props: ComponentProps<typeof KobalteDialog.CloseButton>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteDialog.CloseButton class={cn(local.class)} {...rest} />\n}\n\nexport function SheetHeader(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sheet-header\"\n class={cn(\n 'flex shrink-0 flex-col gap-1.5 border-b border-border p-4 pe-12 text-start',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function SheetBody(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sheet-body\"\n class={cn('min-h-0 flex-1 overflow-y-auto p-4', local.class)}\n {...rest}\n />\n )\n}\n\nexport function SheetFooter(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sheet-footer\"\n class={cn(\n 'flex shrink-0 flex-wrap items-center justify-end gap-2 border-t border-border bg-background px-4 py-3',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function SheetTitle(props: ComponentProps<typeof KobalteDialog.Title>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteDialog.Title\n class={cn(headingVariants({ size: 'card', leading: 'none' }), local.class)}\n {...rest}\n />\n )\n}\n\nexport function SheetDescription(props: ComponentProps<typeof KobalteDialog.Description>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteDialog.Description class={cn('text-muted-foreground text-sm', local.class)} {...rest} />\n )\n}\n\nexport { sheetVariants }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,IAAMiB,gBAAgBN,IACpB,+GACA;CACEO,UAAU;EACRC,MAAM;GACJC,KAAK;GACLC,QAAQ;GACRC,OAAO;GACPC,KAAK;EACP;EACAC,SAAS;GACPC,MAAM;GACNC,OAAO;EACT;CACF;CACAC,kBAAkB;EAChB;GACER,MAAM;GACNK,SAAS;GACTI,OAAO;EACT;EACA;GACET,MAAM;GACNK,SAAS;GACTI,OAAO;EACT;EACA;GACET,MAAM;GACNK,SAAS;GACTI,OAAO;EACT;EACA;GACET,MAAM;GACNK,SAAS;GACTI,OAAO;EACT;CAAC;CAEHC,iBAAiB;EAAEV,MAAM;EAAOK,SAAS;CAAO;AAClD,CACF;;AAGA,IAAMM,mBACJX,MACAK,YACqBA,aAAaL,QAAQ,WAAW,QAAQ,UAAU;AAWzE,SAAgBkB,aAAaC,OAA0B;CACrD,MAAM,CAACC,OAAOC,QAAQ9B,WAAW4B,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAkB,CACnB;CACD,MAAMG,SAASrC,iBAAiB;CAChC,MAAMsC,mBAAmB5B,6BAA6B;EACpD6B,MAAMF,OAAOG;EACbT,iBAAiBI,MAAMJ;EACvBU,iBAAiBN,MAAMM;EACvBC,kBAAkBP,MAAMO;CAC1B,CAAC;CAED,MAAMtB,gBAAgBM,gBAAgBS,MAAMpB,MAAMoB,MAAMf,OAAO;CAE/D,OAAAuB,gBACG9C,OAAc+C,QAAM,EAAA,IAAAC,WAAA;EAAA,OAAA,CAAAF,gBAGlBtC,MAAI;GAAA,IAACyC,OAAI;IAAA,O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AK;CAAC,EAAA,GACtEY,IAAI,CAAA;AAGd;AAEA,SAAgBmC,iBAAiBrC,OAAyD;CACxF,MAAM,CAACC,OAAOC,QAAQ9B,WAAW4B,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAS,gBACG9C,OAAc2E,aAAWzB,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQtC,GAAG,iCAAiC0B,MAAMX,KAAK;CAAC,EAAA,GAAMY,IAAI,CAAA;AAEhG"}
package/dist/index.d.ts CHANGED
@@ -83,6 +83,7 @@ export * from './components/layout/page';
83
83
  export * from './components/layout/panel';
84
84
  export * from './components/layout/side-rail';
85
85
  export * from './components/layout/sidebar-nav';
86
+ export * from './components/layout/contextual-sidebar';
86
87
  export * from './components/layout/status-bar';
87
88
  export * from './components/layout/top-bar';
88
89
  export * from './components/conversation';
@@ -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,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Y,EACjB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,SAAS,GACf,MAAM,cAAc,CAAA"}
package/dist/index.js CHANGED
@@ -83,7 +83,9 @@ import { Panel, PanelActions, PanelBody, PanelCard, PanelDescription, PanelFoote
83
83
  import { useSideRail } from "./components/layout/side-rail/side-rail-context.js";
84
84
  import { SideRail, SideRailButton, SideRailContent, SideRailFooter, SideRailHeader, SideRailItem, SideRailSection } from "./components/layout/side-rail/side-rail.js";
85
85
  import { SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavLabel, SidebarNavRow, SidebarNavSection, SidebarNavTitle, sidebarNavItemClass, sidebarNavItemStateClass } from "./components/layout/sidebar-nav/sidebar-nav.js";
86
+ import { PixelResizeHandle } from "./components/layout/pixel-resize-handle/pixel-resize-handle.js";
86
87
  import { SidebarNavResizeHandle } from "./components/layout/sidebar-nav/sidebar-nav-resize-handle.js";
88
+ import { ContextualSidebar } from "./components/layout/contextual-sidebar/contextual-sidebar.js";
87
89
  import { StatusBar, StatusBarItem, StatusBarSpacer } from "./components/layout/status-bar/status-bar.js";
88
90
  import { TopBar, TopBarBreadcrumb, TopBarPill, TopBarSearch, TopBarSection, TopBarTitle } from "./components/layout/top-bar/top-bar.js";
89
91
  import { BusySendButton } from "./components/conversation/busy-send-button.js";
@@ -119,11 +121,11 @@ import { SettingsNavigation } from "./components/composites/settings/settings-na
119
121
  import { SettingsLayout } from "./components/composites/settings/settings-layout.js";
120
122
  import { SceneControls } from "./components/composites/scene-controls/scene-controls.js";
121
123
  import { PropertyList, PropertyRow, PropertyTerm, PropertyValue, Stat, StatGroup } from "./components/composites/stat/stat.js";
122
- import { AppearanceEditor, AppearancePopover } from "./components/composites/appearance-editor/appearance-editor.js";
124
+ import { AppearanceEditor, AppearanceEditorActions, AppearancePopover } from "./components/composites/appearance-editor/appearance-editor.js";
123
125
  import { formatBytes, formatReleaseDate, plainTextFromMarkdown } from "./lib/version-notes.js";
124
126
  import { UpdateDialog } from "./components/composites/update-dialog/update-dialog.js";
125
127
  import { AboutDialog } from "./components/composites/about-dialog/about-dialog.js";
126
128
  import { HelpCenter } from "./components/composites/help-center/help-center.js";
127
129
  import { WorkspaceMark } from "./components/composites/workspace-mark/workspace-mark.js";
128
130
  import { writeClipboardText } from "./lib/clipboard.js";
129
- export { APPEARANCE_EDITOR_FONT_AXES, APPEARANCE_EDITOR_FONT_SIZE_MAX, APPEARANCE_EDITOR_FONT_SIZE_MIN, AboutDialog, 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, AppearanceFontSettingsGroup, AppearancePanel, AppearancePopover, AspectRatio, AttachmentCard, Avatar, AvatarFallback, AvatarImage, Badge, Board, BoardCardBody, BoardCardTitle, BoardCardTrigger, 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, DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS, 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, EmptyState, EmptyTitle, EntityIcon, FLOATING_PREVIEW_CORNER_RADIUS, FLOATING_PREVIEW_EDGE_GAP, Field, FieldDescription, FieldError, FieldGroup, FieldInput, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTextArea, FloatingPreview, FormField, Heading, HelpCenter, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, Input, InputControl, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputOtp, InputOtpCaret, Item, ItemDescription, ItemEmpty, ItemGroup, ItemGroupEntry, ItemTitle, Kbd, KbdChord, KbdGroup, Label, ListGroup, ListRow, ListRowControl, 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, NO_FLOATING_PREVIEW_OBSTACLES, NO_PREVIEW_MINI_PLAYER_OBSTACLES, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport, NumberField, OrbitItem, OrbitLayout, PASTE_THRESHOLD_CHARS, PASTE_THRESHOLD_LINES, PASTE_TOKEN_REGEX, PREVIEW_MINI_PLAYER_CORNER_RADIUS, PREVIEW_MINI_PLAYER_EDGE_GAP, 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, SceneControls, ScrollArea, SecretInputGroup, Select, SelectChevronsUpDown, SelectContent, SelectItem, SelectLabel, SelectSection, SelectTrigger, SelectValue, Separator, SettingsField, SettingsLayout, SettingsNavigation, 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, SidebarNavLabel, SidebarNavResizeHandle, SidebarNavRow, SidebarNavSection, SidebarNavTitle, Skeleton, SkipLink, 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, Text, TextLink, Textarea, ThemeMiniature, ThemeMiniatureSplit, ThemeModeToggle, ThemePicker, ThemePreview, ThemeProvider, ThemeSwatch, ThemeToggle, ThreadPanel, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, TopBarBreadcrumb, TopBarPill, TopBarSearch, TopBarSection, TopBarTitle, TranscriptComposition, Tree, TreeRow, UpdateDialog, ValueCombobox, VirtualWindow, WorkspaceMark, accentPresets, alertVariants, allTokens, appearancePreviewThemes, applyAppearanceFontSettings, badgeVariants, boardCardTitleVariants, builtinThemes, buttonVariants, clampFloatingPreviewPosition, clampPreviewMiniPlayerPosition, closePane, cn, colorTokens, computeLayoutFrames, contrastRatio, controlInteractive, controlSize, controlSizeIcon, controlSizes, countLeaves, countLines, createAppMenuItems, createLayoutState, cva, defaultDarkThemeId, defaultLightThemeId, defaultThemeSelection, densityTokens, designTokens, diffLineVariants, diffStats, diffTargetPath, elevationTokens, entityIconVariants, expandAll, findTokenRanges, focusPane, fontOptions, fontSettingsBootstrapScript, formatBytes, formatReleaseDate, formatToken, headingElement, headingVariants, initialsFrom, inlineScriptLiteral, isPasteBlock, isThemeAccentId, itemVariants, kbdChordKeys, kbdGroupVariants, kbdVariants, keyedRows, layoutDepth, listLeaves, monogram, motionTokens, movePane, neighborLeaf, nextSeq, normalizeAppearanceEditorFontSettings, normalizeAppearanceEditorFontSize, normalizeLayout, parseDiff, plainTextFromMarkdown, pruneBlocks, radiusTokens, recollapsePastes, remapCarriedBlocks, resizeFloatingPreview, resizePreviewMiniPlayer, resizeSplit, resolveAccentPreset, resolveFloatingPreviewFrame, resolvePreviewMiniPlayerFrame, resolvedDensity, sheetVariants, shouldCollapse, sidebarNavItemClass, sidebarNavItemStateClass, splitPane, statusDotVariants, stripTrailingBlankLines, surfaceInteractive, swapPanes, textElement, textVariants, textareaVariants, themeAccentsFor, themeById, themeCssVariables, themeFamilies, themeRecordById, themeRecords, themeScript, themesForAppearance, toast, toaster, toggleVariants, tokenRangeAt, transcriptDisclosureKey, typographyTokens, undoClosePane, undocumentedTokenAliases, useSideRail, useTheme, validateTheme, validateThemeRegistry, withAccent, writeClipboardText, zIndexTokens };
131
+ export { APPEARANCE_EDITOR_FONT_AXES, APPEARANCE_EDITOR_FONT_SIZE_MAX, APPEARANCE_EDITOR_FONT_SIZE_MIN, AboutDialog, 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, AppearanceEditorActions, AppearanceFontSettingsGroup, AppearancePanel, AppearancePopover, AspectRatio, AttachmentCard, Avatar, AvatarFallback, AvatarImage, Badge, Board, BoardCardBody, BoardCardTitle, BoardCardTrigger, 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, ContextualSidebar, ConversationAvatar, ConversationSurface, DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS, 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, EmptyState, EmptyTitle, EntityIcon, FLOATING_PREVIEW_CORNER_RADIUS, FLOATING_PREVIEW_EDGE_GAP, Field, FieldDescription, FieldError, FieldGroup, FieldInput, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTextArea, FloatingPreview, FormField, Heading, HelpCenter, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, Input, InputControl, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputOtp, InputOtpCaret, Item, ItemDescription, ItemEmpty, ItemGroup, ItemGroupEntry, ItemTitle, Kbd, KbdChord, KbdGroup, Label, ListGroup, ListRow, ListRowControl, 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, NO_FLOATING_PREVIEW_OBSTACLES, NO_PREVIEW_MINI_PLAYER_OBSTACLES, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport, NumberField, OrbitItem, OrbitLayout, PASTE_THRESHOLD_CHARS, PASTE_THRESHOLD_LINES, PASTE_TOKEN_REGEX, PREVIEW_MINI_PLAYER_CORNER_RADIUS, PREVIEW_MINI_PLAYER_EDGE_GAP, Page, PageHeader, PageHeaderActions, PageHeaderContent, PageHeaderDescription, PageHeaderTitle, PageSection, Pagination, PaginationEllipsis, PaginationItem, PaginationNext, PaginationPrevious, PalettePreview, Panel, PanelActions, PanelBody, PanelCard, PanelDescription, PanelFooter, PanelHeader, PanelPlaceholder, PanelTitle, PanelToolbar, PixelResizeHandle, Popover, PopoverAnchor, PopoverCloseButton, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, Presence, Progress, PropertyList, PropertyRow, PropertyTerm, PropertyValue, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, SceneControls, ScrollArea, SecretInputGroup, Select, SelectChevronsUpDown, SelectContent, SelectItem, SelectLabel, SelectSection, SelectTrigger, SelectValue, Separator, SettingsField, SettingsLayout, SettingsNavigation, 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, SidebarNavLabel, SidebarNavResizeHandle, SidebarNavRow, SidebarNavSection, SidebarNavTitle, Skeleton, SkipLink, 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, Text, TextLink, Textarea, ThemeMiniature, ThemeMiniatureSplit, ThemeModeToggle, ThemePicker, ThemePreview, ThemeProvider, ThemeSwatch, ThemeToggle, ThreadPanel, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, TopBarBreadcrumb, TopBarPill, TopBarSearch, TopBarSection, TopBarTitle, TranscriptComposition, Tree, TreeRow, UpdateDialog, ValueCombobox, VirtualWindow, WorkspaceMark, accentPresets, alertVariants, allTokens, appearancePreviewThemes, applyAppearanceFontSettings, badgeVariants, boardCardTitleVariants, builtinThemes, buttonVariants, clampFloatingPreviewPosition, clampPreviewMiniPlayerPosition, closePane, cn, colorTokens, computeLayoutFrames, contrastRatio, controlInteractive, controlSize, controlSizeIcon, controlSizes, countLeaves, countLines, createAppMenuItems, createLayoutState, cva, defaultDarkThemeId, defaultLightThemeId, defaultThemeSelection, densityTokens, designTokens, diffLineVariants, diffStats, diffTargetPath, elevationTokens, entityIconVariants, expandAll, findTokenRanges, focusPane, fontOptions, fontSettingsBootstrapScript, formatBytes, formatReleaseDate, formatToken, headingElement, headingVariants, initialsFrom, inlineScriptLiteral, isPasteBlock, isThemeAccentId, itemVariants, kbdChordKeys, kbdGroupVariants, kbdVariants, keyedRows, layoutDepth, listLeaves, monogram, motionTokens, movePane, neighborLeaf, nextSeq, normalizeAppearanceEditorFontSettings, normalizeAppearanceEditorFontSize, normalizeLayout, parseDiff, plainTextFromMarkdown, pruneBlocks, radiusTokens, recollapsePastes, remapCarriedBlocks, resizeFloatingPreview, resizePreviewMiniPlayer, resizeSplit, resolveAccentPreset, resolveFloatingPreviewFrame, resolvePreviewMiniPlayerFrame, resolvedDensity, sheetVariants, shouldCollapse, sidebarNavItemClass, sidebarNavItemStateClass, splitPane, statusDotVariants, stripTrailingBlankLines, surfaceInteractive, swapPanes, textElement, textVariants, textareaVariants, themeAccentsFor, themeById, themeCssVariables, themeFamilies, themeRecordById, themeRecords, themeScript, themesForAppearance, toast, toaster, toggleVariants, tokenRangeAt, transcriptDisclosureKey, typographyTokens, undoClosePane, undocumentedTokenAliases, useSideRail, useTheme, validateTheme, validateThemeRegistry, withAccent, writeClipboardText, zIndexTokens };
@@ -50,4 +50,19 @@ export declare const menuLabel = "px-2 py-1.5 text-2xs font-medium tracking-wide
50
50
  export declare const menuSeparator = "bg-border -mx-1 my-1 h-px";
51
51
  /** Padding shared by every menu-list surface. */
52
52
  export declare const menuContentPadding = "p-1";
53
+ /**
54
+ * Marks a floating layer — a menu, a listbox, a popover — as part of the top
55
+ * layer.
56
+ *
57
+ * A modal dialog hides everything outside itself from assistive technology
58
+ * (`aria-hidden` on its siblings) and keeps watching `<body>` for new nodes.
59
+ * A menu or select opened from inside the dialog portals to `<body>`, so the
60
+ * dialog hid it too: the list was on screen, focused, and invisible to a
61
+ * screen reader, and an outside-click check could treat a click on it as a
62
+ * click away from the dialog. Kobalte exempts nodes carrying this attribute
63
+ * from both, so every floating layer carries it.
64
+ */
65
+ export declare const topLayerProps: {
66
+ readonly 'data-kb-top-layer': "";
67
+ };
53
68
  //# sourceMappingURL=overlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../src/lib/overlay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,gEAAgE;AAChE,eAAO,MAAM,cAAc,iFACqD,CAAA;AAEhF,yEAAyE;AAC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O,MAAM,aAAa,8BAA8B,CAAA;AAExD,iDAAiD;AACjD,eAAO,MAAM,kBAAkB,QAAQ,CAAA;AAEvC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa;;CAAuC,CAAA"}
@@ -60,7 +60,20 @@ var destructiveMenuItem = "border-s-2 border-destructive ps-1.5 text-foreground
60
60
  var menuLabel = "px-2 py-1.5 text-2xs font-medium tracking-wide text-muted-foreground uppercase";
61
61
  /** The rule between menu groups. */
62
62
  var menuSeparator = "bg-border -mx-1 my-1 h-px";
63
+ /**
64
+ * Marks a floating layer — a menu, a listbox, a popover — as part of the top
65
+ * layer.
66
+ *
67
+ * A modal dialog hides everything outside itself from assistive technology
68
+ * (`aria-hidden` on its siblings) and keeps watching `<body>` for new nodes.
69
+ * A menu or select opened from inside the dialog portals to `<body>`, so the
70
+ * dialog hid it too: the list was on screen, focused, and invisible to a
71
+ * screen reader, and an outside-click check could treat a click on it as a
72
+ * click away from the dialog. Kobalte exempts nodes carrying this attribute
73
+ * from both, so every floating layer carries it.
74
+ */
75
+ var topLayerProps = { "data-kb-top-layer": "" };
63
76
  //#endregion
64
- export { destructiveMenuItem, menuItem, menuLabel, menuSeparator, overlayMotion, overlayPositioner, overlayScrim, overlaySurface, popoverArrow, popoverMotion, tooltipTip };
77
+ export { destructiveMenuItem, menuItem, menuLabel, menuSeparator, overlayMotion, overlayPositioner, overlayScrim, overlaySurface, popoverArrow, popoverMotion, tooltipTip, topLayerProps };
65
78
 
66
79
  //# sourceMappingURL=overlay.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.js","names":[],"sources":["../../src/lib/overlay.ts"],"sourcesContent":["/**\n * Shared strings for the overlay layer: dialogs, sheets, menus, popovers,\n * tooltips and the command palette.\n *\n * These live here rather than in each component because the overlay family is\n * where consistency is most visible and least likely to survive duplication.\n * A dialog, a sheet and a dropdown that disagree about their border, radius,\n * motion or shadow read as three different apps — and an app that adopts this\n * library would inherit all three. Declaring the surface once is what makes\n * \"an overlay looks like this\" a fact rather than a convention.\n */\n\n/** The panel itself: fill, hairline edge, radius, elevation. */\nexport const overlaySurface =\n 'bg-popover text-popover-foreground rounded-xl border border-border shadow-lg'\n\n/** The span of the portal wrapper that centres a dialog-like overlay. */\nexport const overlayPositioner = 'fixed inset-0 z-(--z-dialog) grid place-items-center p-4'\n\n/** The dimming layer behind a modal overlay. */\nexport const overlayScrim =\n 'fixed inset-0 z-(--z-dialog) bg-scrim/50 supports-[backdrop-filter]:backdrop-blur-xs'\n\n/**\n * The tip: the card-toned bubble an explanation shows in. The side rail draws\n * it flush to a collapsed row and every floating tooltip composes the same\n * fill, edge, and type, so a control never explains itself in two visual\n * languages.\n */\nexport const tooltipTip =\n 'bg-card text-card-foreground rounded-md border border-border text-sm font-medium shadow-lg'\n\n/**\n * Entrance and exit motion, expressed as data-state classes.\n *\n * `data-expanded` / `data-closed` are Kobalte's; `data-side-*` come from its\n * popper positioning and let a menu slide in from the edge it is anchored to,\n * which is what makes a dropdown feel attached to its trigger rather than\n * dropped on the screen. Exit motion is shorter than entry, because a\n * dismissal should feel immediate while an arrival benefits from being seen.\n */\nexport const overlayMotion = [\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n 'data-expanded:duration-200 data-closed:duration-150',\n].join(' ')\n\n/** Popover-style motion: no zoom, so a panel anchored to a control does not\n * appear to breathe away from it. */\nexport const popoverMotion = [\n 'data-expanded:animate-in data-expanded:fade-in-0 data-closed:animate-out data-closed:fade-out-0',\n 'data-expanded:duration-150 data-closed:duration-100',\n].join(' ')\n\n/** The popper arrow. Sized in the component; coloured here. */\nexport const popoverArrow = 'fill-popover stroke-border'\n\n/**\n * A menu row: the shared height, radius, hover fill and focus treatment for\n * every item inside a menu, listbox or command list.\n */\nexport const menuItem = [\n 'relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none',\n 'transition-colors ease-out',\n 'data-[highlighted]:bg-surface-hover data-[highlighted]:text-foreground',\n 'data-[disabled]:pointer-events-none data-[disabled]:text-muted-foreground',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4',\n '[&_svg:not([class*=text-])]:text-muted-foreground',\n].join(' ')\n\n/** A destructive action keeps readable text and marks its row with a status edge. */\nexport const destructiveMenuItem =\n 'border-s-2 border-destructive ps-1.5 text-foreground data-[highlighted]:bg-destructive-subtle'\n\n/** The label above a group of menu rows. */\nexport const menuLabel =\n 'px-2 py-1.5 text-2xs font-medium tracking-wide text-muted-foreground uppercase'\n\n/** The rule between menu groups. */\nexport const menuSeparator = 'bg-border -mx-1 my-1 h-px'\n\n/** Padding shared by every menu-list surface. */\nexport const menuContentPadding = 'p-1'\n"],"mappings":";;;;;;;;;;;;;AAaA,IAAa,iBACX;;AAGF,IAAa,oBAAoB;;AAGjC,IAAa,eACX;;;;;;;AAQF,IAAa,aACX;;;;;;;;;;AAWF,IAAa,gBAAgB;CAC3B;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;;;AAIV,IAAa,gBAAgB,CAC3B,mGACA,qDACF,CAAC,CAAC,KAAK,GAAG;;AAGV,IAAa,eAAe;;;;;AAM5B,IAAa,WAAW;CACtB;CACA;CACA;CACA;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;;AAGV,IAAa,sBACX;;AAGF,IAAa,YACX;;AAGF,IAAa,gBAAgB"}
1
+ {"version":3,"file":"overlay.js","names":[],"sources":["../../src/lib/overlay.ts"],"sourcesContent":["/**\n * Shared strings for the overlay layer: dialogs, sheets, menus, popovers,\n * tooltips and the command palette.\n *\n * These live here rather than in each component because the overlay family is\n * where consistency is most visible and least likely to survive duplication.\n * A dialog, a sheet and a dropdown that disagree about their border, radius,\n * motion or shadow read as three different apps — and an app that adopts this\n * library would inherit all three. Declaring the surface once is what makes\n * \"an overlay looks like this\" a fact rather than a convention.\n */\n\n/** The panel itself: fill, hairline edge, radius, elevation. */\nexport const overlaySurface =\n 'bg-popover text-popover-foreground rounded-xl border border-border shadow-lg'\n\n/** The span of the portal wrapper that centres a dialog-like overlay. */\nexport const overlayPositioner = 'fixed inset-0 z-(--z-dialog) grid place-items-center p-4'\n\n/** The dimming layer behind a modal overlay. */\nexport const overlayScrim =\n 'fixed inset-0 z-(--z-dialog) bg-scrim/50 supports-[backdrop-filter]:backdrop-blur-xs'\n\n/**\n * The tip: the card-toned bubble an explanation shows in. The side rail draws\n * it flush to a collapsed row and every floating tooltip composes the same\n * fill, edge, and type, so a control never explains itself in two visual\n * languages.\n */\nexport const tooltipTip =\n 'bg-card text-card-foreground rounded-md border border-border text-sm font-medium shadow-lg'\n\n/**\n * Entrance and exit motion, expressed as data-state classes.\n *\n * `data-expanded` / `data-closed` are Kobalte's; `data-side-*` come from its\n * popper positioning and let a menu slide in from the edge it is anchored to,\n * which is what makes a dropdown feel attached to its trigger rather than\n * dropped on the screen. Exit motion is shorter than entry, because a\n * dismissal should feel immediate while an arrival benefits from being seen.\n */\nexport const overlayMotion = [\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n 'data-expanded:duration-200 data-closed:duration-150',\n].join(' ')\n\n/** Popover-style motion: no zoom, so a panel anchored to a control does not\n * appear to breathe away from it. */\nexport const popoverMotion = [\n 'data-expanded:animate-in data-expanded:fade-in-0 data-closed:animate-out data-closed:fade-out-0',\n 'data-expanded:duration-150 data-closed:duration-100',\n].join(' ')\n\n/** The popper arrow. Sized in the component; coloured here. */\nexport const popoverArrow = 'fill-popover stroke-border'\n\n/**\n * A menu row: the shared height, radius, hover fill and focus treatment for\n * every item inside a menu, listbox or command list.\n */\nexport const menuItem = [\n 'relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none',\n 'transition-colors ease-out',\n 'data-[highlighted]:bg-surface-hover data-[highlighted]:text-foreground',\n 'data-[disabled]:pointer-events-none data-[disabled]:text-muted-foreground',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4',\n '[&_svg:not([class*=text-])]:text-muted-foreground',\n].join(' ')\n\n/** A destructive action keeps readable text and marks its row with a status edge. */\nexport const destructiveMenuItem =\n 'border-s-2 border-destructive ps-1.5 text-foreground data-[highlighted]:bg-destructive-subtle'\n\n/** The label above a group of menu rows. */\nexport const menuLabel =\n 'px-2 py-1.5 text-2xs font-medium tracking-wide text-muted-foreground uppercase'\n\n/** The rule between menu groups. */\nexport const menuSeparator = 'bg-border -mx-1 my-1 h-px'\n\n/** Padding shared by every menu-list surface. */\nexport const menuContentPadding = 'p-1'\n\n/**\n * Marks a floating layer — a menu, a listbox, a popover — as part of the top\n * layer.\n *\n * A modal dialog hides everything outside itself from assistive technology\n * (`aria-hidden` on its siblings) and keeps watching `<body>` for new nodes.\n * A menu or select opened from inside the dialog portals to `<body>`, so the\n * dialog hid it too: the list was on screen, focused, and invisible to a\n * screen reader, and an outside-click check could treat a click on it as a\n * click away from the dialog. Kobalte exempts nodes carrying this attribute\n * from both, so every floating layer carries it.\n */\nexport const topLayerProps = { 'data-kb-top-layer': '' } as const\n"],"mappings":";;;;;;;;;;;;;AAaA,IAAa,iBACX;;AAGF,IAAa,oBAAoB;;AAGjC,IAAa,eACX;;;;;;;AAQF,IAAa,aACX;;;;;;;;;;AAWF,IAAa,gBAAgB;CAC3B;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;;;AAIV,IAAa,gBAAgB,CAC3B,mGACA,qDACF,CAAC,CAAC,KAAK,GAAG;;AAGV,IAAa,eAAe;;;;;AAM5B,IAAa,WAAW;CACtB;CACA;CACA;CACA;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;;AAGV,IAAa,sBACX;;AAGF,IAAa,YACX;;AAGF,IAAa,gBAAgB;;;;;;;;;;;;;AAiB7B,IAAa,gBAAgB,EAAE,qBAAqB,GAAG"}
@@ -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,UAAU,CAAC,EAAE;QACX,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,SAAS,GAAG,SAAS,CAAA;KACpD,CAAA;IACD,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;AAED,UAAU,SAAS;IACjB,GAAG,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AA8zBD,QAAA,MAAM,MAAM;;;;;;;;;;;;CAUX,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,UAAU,CAAC,EAAE;QACX,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,SAAS,GAAG,SAAS,CAAA;KACpD,CAAA;IACD,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;AAED,UAAU,SAAS;IACjB,GAAG,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAkhCD,QAAA,MAAM,MAAM;;;;;;;;;;;;CAUX,CAAA;AAED,eAAe,MAAM,CAAA"}
package/dist/lint.js CHANGED
@@ -575,6 +575,111 @@ var staticStringValue = (node) => {
575
575
  if (node?.type === "TemplateLiteral" && node.expressions.length === 0) return node.quasis[0].value.cooked ?? node.quasis[0].value.raw;
576
576
  return null;
577
577
  };
578
+ var isImportedJsxComponent = (name, imports, context, namespaceExport) => {
579
+ if (name?.type === "JSXIdentifier" || name?.type === "Identifier") return isImportedBinding(name, imports.named, context);
580
+ const memberName = name?.property?.name;
581
+ return (name?.type === "JSXMemberExpression" || name?.type === "MemberExpression") && (name.object?.type === "JSXIdentifier" || name.object?.type === "Identifier") && (name.property?.type === "JSXIdentifier" || name.property?.type === "Identifier") && (namespaceExport ? memberName === namespaceExport : /^[A-Z]/.test(memberName ?? "")) && isImportedBinding(name.object, imports.namespaces, context);
582
+ };
583
+ var CONTENT_OVERRIDE_PROPS = /* @__PURE__ */ new Set([
584
+ "children",
585
+ "dangerouslySetInnerHTML",
586
+ "innerHTML",
587
+ "textContent"
588
+ ]);
589
+ /** Opaque spreads and objects containing content props may override children. */
590
+ var spreadMayOverrideContent = (argument) => {
591
+ while (argument?.type === "TSAsExpression" || argument?.type === "TSSatisfiesExpression" || argument?.type === "TSNonNullExpression") argument = argument.expression;
592
+ if (argument?.type !== "ObjectExpression") return true;
593
+ return argument.properties.some((property) => {
594
+ if (property.type !== "Property") return true;
595
+ const key = staticPropertyKey(property.key, property.computed === true);
596
+ return key === null || CONTENT_OVERRIDE_PROPS.has(key);
597
+ });
598
+ };
599
+ var hasContentOverride = (openingElement) => (openingElement?.attributes ?? []).some((attribute) => {
600
+ if (attribute.type === "JSXSpreadAttribute") return spreadMayOverrideContent(attribute.argument);
601
+ return attribute.type === "JSXAttribute" && attribute.name?.type === "JSXIdentifier" && CONTENT_OVERRIDE_PROPS.has(attribute.name.name);
602
+ });
603
+ var iconChildrenKind = (children, icons, context) => {
604
+ let hasIcon = false;
605
+ for (const child of children) {
606
+ const kind = iconChildKind(child, icons, context);
607
+ if (kind === "text" || kind === "unknown") return kind;
608
+ if (kind === "icon") hasIcon = true;
609
+ }
610
+ return hasIcon ? "icon" : "empty";
611
+ };
612
+ var SVG_TEXT_CONTAINERS = /* @__PURE__ */ new Set(["text", "foreignObject"]);
613
+ /** A raw SVG may be labelled or contain dynamic text instead of an icon. */
614
+ var svgMayContainVisibleText = (children) => {
615
+ for (const child of children) {
616
+ if (!child) return true;
617
+ if (child.type === "JSXText") {
618
+ if (String(child.value ?? "").trim()) return true;
619
+ continue;
620
+ }
621
+ if (child.type === "JSXFragment") {
622
+ if (svgMayContainVisibleText(child.children ?? [])) return true;
623
+ continue;
624
+ }
625
+ if (child.type === "JSXExpressionContainer") {
626
+ const expression = child.expression;
627
+ if (!expression || expression.type === "JSXEmptyExpression") continue;
628
+ if (expression.type === "JSXElement" || expression.type === "JSXFragment") {
629
+ if (svgMayContainVisibleText(expression.type === "JSXElement" ? [expression] : expression.children ?? [])) return true;
630
+ continue;
631
+ }
632
+ const text = staticStringValue(expression);
633
+ if (text !== null) {
634
+ if (text.trim()) return true;
635
+ continue;
636
+ }
637
+ if (expression.type === "Literal" && (expression.value === null || typeof expression.value === "boolean")) continue;
638
+ return true;
639
+ }
640
+ if (child.type !== "JSXElement") return true;
641
+ const name = child.openingElement?.name;
642
+ if (name?.type !== "JSXIdentifier") return true;
643
+ if (SVG_TEXT_CONTAINERS.has(name.name)) return true;
644
+ if (hasContentOverride(child.openingElement)) return true;
645
+ if (name.name === "title" || name.name === "desc") continue;
646
+ if (!/^[a-z]/.test(name.name) || name.name.includes("-")) return true;
647
+ if (svgMayContainVisibleText(child.children ?? [])) return true;
648
+ }
649
+ return false;
650
+ };
651
+ /**
652
+ * Proves only the uncomplicated icon-only forms that can be read without
653
+ * executing Solid expressions: imported Lucide components, raw SVG, fragments,
654
+ * whitespace, and spans that contain only those forms.
655
+ */
656
+ var iconChildKind = (child, icons, context) => {
657
+ if (!child) return "unknown";
658
+ if (child.type === "JSXText") return String(child.value ?? "").trim() ? "text" : "empty";
659
+ if (child.type === "JSXFragment") return iconChildrenKind(child.children ?? [], icons, context);
660
+ if (child.type === "JSXExpressionContainer") {
661
+ const expression = child.expression;
662
+ if (!expression || expression.type === "JSXEmptyExpression") return "empty";
663
+ if (expression.type === "JSXElement" || expression.type === "JSXFragment") return iconChildKind(expression, icons, context);
664
+ const text = staticStringValue(expression);
665
+ if (text !== null) return text.trim() ? "text" : "empty";
666
+ if (expression.type === "Literal" && (expression.value === null || typeof expression.value === "boolean")) return "empty";
667
+ if (expression.type === "Literal" && typeof expression.value === "number") return "text";
668
+ return "unknown";
669
+ }
670
+ if (child.type !== "JSXElement") return "unknown";
671
+ const name = child.openingElement?.name;
672
+ if (name?.type === "JSXIdentifier" && name.name === "svg") return hasContentOverride(child.openingElement) || svgMayContainVisibleText(child.children ?? []) ? "unknown" : "icon";
673
+ if (isImportedJsxComponent(name, icons, context)) return hasContentOverride(child.openingElement) ? "unknown" : "icon";
674
+ if (name?.type === "JSXIdentifier" && name.name === "span") {
675
+ if (hasContentOverride(child.openingElement)) return "unknown";
676
+ return iconChildrenKind(child.children ?? [], icons, context);
677
+ }
678
+ return "unknown";
679
+ };
680
+ var hasStaticallyIconOnlyChildren = (node, icons, context) => {
681
+ return !hasContentOverride(node.openingElement) && iconChildrenKind(node.children ?? [], icons, context) === "icon";
682
+ };
578
683
  var isIconButtonSize = (node) => attributeValues(node, "size").some((value) => {
579
684
  const size = staticStringValue(value);
580
685
  return size !== null && ICON_BUTTON_SIZES.has(size);
@@ -587,7 +692,6 @@ var actionTooltipStatus = (node) => {
587
692
  if (strings.every((value) => value !== null)) return "blank";
588
693
  return "unknown";
589
694
  };
590
- var isImportedComponent = (identifier, imports) => identifier?.type === "Identifier" && imports.has(identifier.name);
591
695
  var plugin = {
592
696
  meta: { name: "adea" },
593
697
  rules: {
@@ -652,47 +756,77 @@ var plugin = {
652
756
  "require-action-button-tooltip": {
653
757
  meta: {
654
758
  type: "problem",
655
- docs: { description: "Consumer icon-size shared Button actions use ActionButton with a nonblank tooltip; dynamic values remain a review boundary." },
759
+ docs: { description: "Icon-sized shared Buttons and statically proven icon-only Buttons use ActionButton with a tooltip; icon-only ActionButtons need one too." },
656
760
  schema: [],
657
761
  messages: {
658
- useActionButton: "Icon-size Button actions use ActionButton with a nonblank tooltip. Keep the control name in aria-label; the tooltip explains the action.",
659
- missingTooltip: "An icon-size ActionButton needs a supplied nonblank tooltip. Keep its accessible name in aria-label as well."
762
+ useActionButton: "Icon-size or icon-only Button actions must use ActionButton with a nonblank tooltip. Keep the control name in aria-label; the tooltip explains the action.",
763
+ missingTooltip: "An icon-size or icon-only ActionButton needs a supplied nonblank tooltip. Keep its accessible name in aria-label as well."
660
764
  }
661
765
  },
662
766
  create(context) {
663
- const buttons = /* @__PURE__ */ new Set();
664
- const actionButtons = /* @__PURE__ */ new Set();
767
+ const buttons = {
768
+ named: /* @__PURE__ */ new WeakSet(),
769
+ namespaces: /* @__PURE__ */ new WeakSet()
770
+ };
771
+ const actionButtons = {
772
+ named: /* @__PURE__ */ new WeakSet(),
773
+ namespaces: /* @__PURE__ */ new WeakSet()
774
+ };
775
+ const icons = {
776
+ named: /* @__PURE__ */ new WeakSet(),
777
+ namespaces: /* @__PURE__ */ new WeakSet()
778
+ };
665
779
  const recordImports = (node) => {
666
780
  const source = node.source?.value;
667
781
  const target = source === BUTTON_MODULE ? buttons : source === ACTION_BUTTON_MODULE ? actionButtons : null;
782
+ if (source === "lucide-solid") {
783
+ if (node.importKind === "type") return;
784
+ for (const specifier of node.specifiers ?? []) {
785
+ if (!specifier.local || specifier.importKind === "type") continue;
786
+ if (specifier.type === "ImportNamespaceSpecifier") icons.namespaces.add(specifier.local);
787
+ else if (specifier.type === "ImportSpecifier") {
788
+ const imported = specifier.imported?.name ?? specifier.imported?.value;
789
+ if (typeof imported === "string" && /^[A-Z]/.test(imported)) icons.named.add(specifier.local);
790
+ }
791
+ }
792
+ return;
793
+ }
668
794
  if (!target) return;
795
+ if (node.importKind === "type") return;
669
796
  for (const specifier of node.specifiers ?? []) {
670
- if (specifier.type !== "ImportSpecifier") continue;
797
+ if (specifier.type === "ImportNamespaceSpecifier" && specifier.local) {
798
+ target.namespaces.add(specifier.local);
799
+ continue;
800
+ }
801
+ if (specifier.type !== "ImportSpecifier" || !specifier.local || specifier.importKind === "type") continue;
671
802
  const imported = specifier.imported?.name ?? specifier.imported?.value;
672
- if (source === BUTTON_MODULE && imported === "Button" || source === ACTION_BUTTON_MODULE && imported === "ActionButton") target.add(specifier.local?.name);
803
+ if (source === BUTTON_MODULE && imported === "Button" || source === ACTION_BUTTON_MODULE && imported === "ActionButton") target.named.add(specifier.local);
673
804
  }
674
805
  };
675
806
  return {
676
- ImportDeclaration: recordImports,
677
- JSXOpeningElement(node) {
678
- if (!isIconButtonSize(node)) return;
679
- const name = node.name?.type === "JSXIdentifier" ? node.name.name : null;
680
- const isButton = name !== null && buttons.has(name);
681
- const isActionButton = name !== null && actionButtons.has(name);
682
- const asValues = attributeValues(node, "as");
683
- const targetsButton = asValues.some((value) => isImportedComponent(value, buttons));
684
- const targetsActionButton = asValues.some((value) => isImportedComponent(value, actionButtons));
807
+ Program(node) {
808
+ for (const statement of node.body ?? []) if (statement.type === "ImportDeclaration") recordImports(statement);
809
+ },
810
+ JSXElement(node) {
811
+ const opening = node.openingElement;
812
+ const isButton = isImportedJsxComponent(opening.name, buttons, context, "Button");
813
+ const isActionButton = isImportedJsxComponent(opening.name, actionButtons, context, "ActionButton");
814
+ const asValues = attributeValues(opening, "as");
815
+ const targetsButton = asValues.some((value) => isImportedJsxComponent(value, buttons, context, "Button"));
816
+ const targetsActionButton = asValues.some((value) => isImportedJsxComponent(value, actionButtons, context, "ActionButton"));
817
+ if (!isButton && !isActionButton && !targetsButton && !targetsActionButton) return;
818
+ if (!isIconButtonSize(opening) && !hasStaticallyIconOnlyChildren(node, icons, context)) return;
685
819
  if (isButton || targetsButton) {
686
820
  context.report({
687
- node,
821
+ node: opening,
688
822
  messageId: "useActionButton"
689
823
  });
690
824
  return;
691
825
  }
692
826
  if (!isActionButton && !targetsActionButton) return;
693
- const status = actionTooltipStatus(node);
827
+ const status = actionTooltipStatus(opening);
694
828
  if (status === "missing" || status === "blank") context.report({
695
- node,
829
+ node: opening,
696
830
  messageId: "missingTooltip"
697
831
  });
698
832
  }