@cerebriline/ui 0.0.0-stage → 4.100.313

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 (222) hide show
  1. package/ADOPTION.md +833 -0
  2. package/LICENSE +201 -0
  3. package/RADIX-COLORS-LICENSE +21 -0
  4. package/README.md +427 -2
  5. package/components/agent-approval-card.css +70 -0
  6. package/components/agent-approval-card.tsx +109 -0
  7. package/components/agent-ask-question.css +103 -0
  8. package/components/agent-ask-question.tsx +276 -0
  9. package/components/agent-aurora.css +228 -0
  10. package/components/agent-aurora.tsx +96 -0
  11. package/components/agent-changes.css +13 -0
  12. package/components/agent-changes.tsx +167 -0
  13. package/components/agent-chat/agent-chat.css +556 -0
  14. package/components/agent-chat/index.tsx +1037 -0
  15. package/components/agent-chat/tool-diff.tsx +165 -0
  16. package/components/agent-chat/tool-summary/agents.ts +114 -0
  17. package/components/agent-chat/tool-summary/diff.ts +152 -0
  18. package/components/agent-chat/tool-summary/index.ts +928 -0
  19. package/components/agent-chat/tool-summary/parsers.ts +611 -0
  20. package/components/agent-chat/tool-summary/paths.ts +84 -0
  21. package/components/agent-chat/tool-summary/team.ts +401 -0
  22. package/components/agent-command-output.tsx +63 -0
  23. package/components/agent-composer.tsx +263 -0
  24. package/components/agent-context-usage.tsx +181 -0
  25. package/components/agent-conversation-layout.tsx +139 -0
  26. package/components/agent-hero-heading.css +53 -0
  27. package/components/agent-hero-heading.tsx +45 -0
  28. package/components/agent-image-lightbox.tsx +48 -0
  29. package/components/agent-prompt-queue.css +20 -0
  30. package/components/agent-prompt-queue.tsx +350 -0
  31. package/components/agent-pull-request-bar.css +13 -0
  32. package/components/agent-pull-request-bar.tsx +346 -0
  33. package/components/agent-quick-actions.css +19 -0
  34. package/components/agent-quick-actions.tsx +70 -0
  35. package/components/agent-session-row.tsx +183 -0
  36. package/components/agent-welcome-hero-pointer.ts +199 -0
  37. package/components/agent-welcome-hero.css +205 -0
  38. package/components/agent-welcome-hero.tsx +68 -0
  39. package/components/attachment-drop-zone.tsx +154 -0
  40. package/components/badge.tsx +21 -0
  41. package/components/button.tsx +324 -0
  42. package/components/generated-media.tsx +173 -0
  43. package/components/github-icon.tsx +19 -0
  44. package/components/index.ts +133 -0
  45. package/components/markdown.css +490 -0
  46. package/components/markdown.ts +365 -0
  47. package/components/mermaid-block.tsx +722 -0
  48. package/components/mermaid-diagram.ts +1260 -0
  49. package/components/mermaid-dom.ts +301 -0
  50. package/components/message-scroller.css +118 -0
  51. package/components/message-scroller.tsx +114 -0
  52. package/components/search-combobox.css +67 -0
  53. package/components/search-combobox.tsx +433 -0
  54. package/components/session-status.css +19 -0
  55. package/components/session-status.tsx +39 -0
  56. package/components/switch.css +221 -0
  57. package/components/switch.tsx +48 -0
  58. package/components.css +16 -0
  59. package/dist/components/agent-approval-card.d.ts +14 -0
  60. package/dist/components/agent-approval-card.d.ts.map +1 -0
  61. package/dist/components/agent-approval-card.js +12 -0
  62. package/dist/components/agent-approval-card.js.map +1 -0
  63. package/dist/components/agent-ask-question.d.ts +18 -0
  64. package/dist/components/agent-ask-question.d.ts.map +1 -0
  65. package/dist/components/agent-ask-question.js +101 -0
  66. package/dist/components/agent-ask-question.js.map +1 -0
  67. package/dist/components/agent-aurora.d.ts +3 -0
  68. package/dist/components/agent-aurora.d.ts.map +1 -0
  69. package/dist/components/agent-aurora.js +60 -0
  70. package/dist/components/agent-aurora.js.map +1 -0
  71. package/dist/components/agent-changes.d.ts +26 -0
  72. package/dist/components/agent-changes.d.ts.map +1 -0
  73. package/dist/components/agent-changes.js +19 -0
  74. package/dist/components/agent-changes.js.map +1 -0
  75. package/dist/components/agent-chat/disclosure.d.ts +25 -0
  76. package/dist/components/agent-chat/disclosure.d.ts.map +1 -0
  77. package/dist/components/agent-chat/disclosure.js +39 -0
  78. package/dist/components/agent-chat/disclosure.js.map +1 -0
  79. package/dist/components/agent-chat/index.d.ts +140 -0
  80. package/dist/components/agent-chat/index.d.ts.map +1 -0
  81. package/dist/components/agent-chat/index.js +379 -0
  82. package/dist/components/agent-chat/index.js.map +1 -0
  83. package/dist/components/agent-chat/tool-diff.d.ts +32 -0
  84. package/dist/components/agent-chat/tool-diff.d.ts.map +1 -0
  85. package/dist/components/agent-chat/tool-diff.js +97 -0
  86. package/dist/components/agent-chat/tool-diff.js.map +1 -0
  87. package/dist/components/agent-chat/tool-summary/agents.d.ts +10 -0
  88. package/dist/components/agent-chat/tool-summary/agents.d.ts.map +1 -0
  89. package/dist/components/agent-chat/tool-summary/agents.js +100 -0
  90. package/dist/components/agent-chat/tool-summary/agents.js.map +1 -0
  91. package/dist/components/agent-chat/tool-summary/diff.d.ts +22 -0
  92. package/dist/components/agent-chat/tool-summary/diff.d.ts.map +1 -0
  93. package/dist/components/agent-chat/tool-summary/diff.js +127 -0
  94. package/dist/components/agent-chat/tool-summary/diff.js.map +1 -0
  95. package/dist/components/agent-chat/tool-summary/index.d.ts +145 -0
  96. package/dist/components/agent-chat/tool-summary/index.d.ts.map +1 -0
  97. package/dist/components/agent-chat/tool-summary/index.js +663 -0
  98. package/dist/components/agent-chat/tool-summary/index.js.map +1 -0
  99. package/dist/components/agent-chat/tool-summary/parsers.d.ts +114 -0
  100. package/dist/components/agent-chat/tool-summary/parsers.d.ts.map +1 -0
  101. package/dist/components/agent-chat/tool-summary/parsers.js +502 -0
  102. package/dist/components/agent-chat/tool-summary/parsers.js.map +1 -0
  103. package/dist/components/agent-chat/tool-summary/paths.d.ts +10 -0
  104. package/dist/components/agent-chat/tool-summary/paths.d.ts.map +1 -0
  105. package/dist/components/agent-chat/tool-summary/paths.js +88 -0
  106. package/dist/components/agent-chat/tool-summary/paths.js.map +1 -0
  107. package/dist/components/agent-chat/tool-summary/team.d.ts +16 -0
  108. package/dist/components/agent-chat/tool-summary/team.d.ts.map +1 -0
  109. package/dist/components/agent-chat/tool-summary/team.js +283 -0
  110. package/dist/components/agent-chat/tool-summary/team.js.map +1 -0
  111. package/dist/components/agent-command-output.d.ts +14 -0
  112. package/dist/components/agent-command-output.d.ts.map +1 -0
  113. package/dist/components/agent-command-output.js +22 -0
  114. package/dist/components/agent-command-output.js.map +1 -0
  115. package/dist/components/agent-composer.d.ts +34 -0
  116. package/dist/components/agent-composer.d.ts.map +1 -0
  117. package/dist/components/agent-composer.js +65 -0
  118. package/dist/components/agent-composer.js.map +1 -0
  119. package/dist/components/agent-context-usage.d.ts +28 -0
  120. package/dist/components/agent-context-usage.d.ts.map +1 -0
  121. package/dist/components/agent-context-usage.js +51 -0
  122. package/dist/components/agent-context-usage.js.map +1 -0
  123. package/dist/components/agent-conversation-layout.d.ts +30 -0
  124. package/dist/components/agent-conversation-layout.d.ts.map +1 -0
  125. package/dist/components/agent-conversation-layout.js +24 -0
  126. package/dist/components/agent-conversation-layout.js.map +1 -0
  127. package/dist/components/agent-hero-heading.d.ts +2 -0
  128. package/dist/components/agent-hero-heading.d.ts.map +1 -0
  129. package/dist/components/agent-hero-heading.js +20 -0
  130. package/dist/components/agent-hero-heading.js.map +1 -0
  131. package/dist/components/agent-image-lightbox.d.ts +11 -0
  132. package/dist/components/agent-image-lightbox.d.ts.map +1 -0
  133. package/dist/components/agent-image-lightbox.js +8 -0
  134. package/dist/components/agent-image-lightbox.js.map +1 -0
  135. package/dist/components/agent-prompt-queue.d.ts +14 -0
  136. package/dist/components/agent-prompt-queue.d.ts.map +1 -0
  137. package/dist/components/agent-prompt-queue.js +114 -0
  138. package/dist/components/agent-prompt-queue.js.map +1 -0
  139. package/dist/components/agent-pull-request-bar.d.ts +72 -0
  140. package/dist/components/agent-pull-request-bar.d.ts.map +1 -0
  141. package/dist/components/agent-pull-request-bar.js +90 -0
  142. package/dist/components/agent-pull-request-bar.js.map +1 -0
  143. package/dist/components/agent-quick-actions.d.ts +14 -0
  144. package/dist/components/agent-quick-actions.d.ts.map +1 -0
  145. package/dist/components/agent-quick-actions.js +12 -0
  146. package/dist/components/agent-quick-actions.js.map +1 -0
  147. package/dist/components/agent-session-row.d.ts +45 -0
  148. package/dist/components/agent-session-row.d.ts.map +1 -0
  149. package/dist/components/agent-session-row.js +34 -0
  150. package/dist/components/agent-session-row.js.map +1 -0
  151. package/dist/components/agent-welcome-hero-pointer.d.ts +3 -0
  152. package/dist/components/agent-welcome-hero-pointer.d.ts.map +1 -0
  153. package/dist/components/agent-welcome-hero-pointer.js +169 -0
  154. package/dist/components/agent-welcome-hero-pointer.js.map +1 -0
  155. package/dist/components/agent-welcome-hero.d.ts +9 -0
  156. package/dist/components/agent-welcome-hero.d.ts.map +1 -0
  157. package/dist/components/agent-welcome-hero.js +14 -0
  158. package/dist/components/agent-welcome-hero.js.map +1 -0
  159. package/dist/components/attachment-drop-zone.d.ts +15 -0
  160. package/dist/components/attachment-drop-zone.d.ts.map +1 -0
  161. package/dist/components/attachment-drop-zone.js +64 -0
  162. package/dist/components/attachment-drop-zone.js.map +1 -0
  163. package/dist/components/badge.d.ts +5 -0
  164. package/dist/components/badge.d.ts.map +1 -0
  165. package/dist/components/badge.js +7 -0
  166. package/dist/components/badge.js.map +1 -0
  167. package/dist/components/button.d.ts +27 -0
  168. package/dist/components/button.d.ts.map +1 -0
  169. package/dist/components/button.js +209 -0
  170. package/dist/components/button.js.map +1 -0
  171. package/dist/components/generated-media.d.ts +12 -0
  172. package/dist/components/generated-media.d.ts.map +1 -0
  173. package/dist/components/generated-media.js +105 -0
  174. package/dist/components/generated-media.js.map +1 -0
  175. package/dist/components/github-icon.d.ts +3 -0
  176. package/dist/components/github-icon.d.ts.map +1 -0
  177. package/dist/components/github-icon.js +6 -0
  178. package/dist/components/github-icon.js.map +1 -0
  179. package/dist/components/index.d.ts +24 -0
  180. package/dist/components/index.d.ts.map +1 -0
  181. package/dist/components/index.js +25 -0
  182. package/dist/components/index.js.map +1 -0
  183. package/dist/components/markdown.d.ts +48 -0
  184. package/dist/components/markdown.d.ts.map +1 -0
  185. package/dist/components/markdown.js +264 -0
  186. package/dist/components/markdown.js.map +1 -0
  187. package/dist/components/mermaid-block.d.ts +14 -0
  188. package/dist/components/mermaid-block.d.ts.map +1 -0
  189. package/dist/components/mermaid-block.js +339 -0
  190. package/dist/components/mermaid-block.js.map +1 -0
  191. package/dist/components/mermaid-diagram.d.ts +264 -0
  192. package/dist/components/mermaid-diagram.d.ts.map +1 -0
  193. package/dist/components/mermaid-diagram.js +999 -0
  194. package/dist/components/mermaid-diagram.js.map +1 -0
  195. package/dist/components/mermaid-dom.d.ts +51 -0
  196. package/dist/components/mermaid-dom.d.ts.map +1 -0
  197. package/dist/components/mermaid-dom.js +246 -0
  198. package/dist/components/mermaid-dom.js.map +1 -0
  199. package/dist/components/message-scroller.d.ts +23 -0
  200. package/dist/components/message-scroller.d.ts.map +1 -0
  201. package/dist/components/message-scroller.js +31 -0
  202. package/dist/components/message-scroller.js.map +1 -0
  203. package/dist/components/search-combobox.d.ts +44 -0
  204. package/dist/components/search-combobox.d.ts.map +1 -0
  205. package/dist/components/search-combobox.js +191 -0
  206. package/dist/components/search-combobox.js.map +1 -0
  207. package/dist/components/session-status.d.ts +9 -0
  208. package/dist/components/session-status.d.ts.map +1 -0
  209. package/dist/components/session-status.js +11 -0
  210. package/dist/components/session-status.js.map +1 -0
  211. package/dist/components/switch.d.ts +7 -0
  212. package/dist/components/switch.d.ts.map +1 -0
  213. package/dist/components/switch.js +14 -0
  214. package/dist/components/switch.js.map +1 -0
  215. package/package.json +177 -5
  216. package/theme/base.css +83 -0
  217. package/theme/component-theme.css +126 -0
  218. package/theme/index.css +3 -0
  219. package/theme/palette.css +347 -0
  220. package/theme/scoped-tokens.css +503 -0
  221. package/theme/theme.css +90 -0
  222. package/theme/tokens.css +165 -0
@@ -0,0 +1,191 @@
1
+ "use client";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useId, useMemo, useRef, useState, } from "react";
4
+ function optionMatches(option, query) {
5
+ return `${option.label} ${option.description ?? ""} ${option.value}`
6
+ .toLowerCase()
7
+ .includes(query);
8
+ }
9
+ function highlightMatch(label, query) {
10
+ const normalized = query.trim().toLowerCase();
11
+ if (!normalized) {
12
+ return label;
13
+ }
14
+ const index = label.toLowerCase().indexOf(normalized);
15
+ if (index === -1) {
16
+ return label;
17
+ }
18
+ return (_jsxs(_Fragment, { children: [label.slice(0, index), _jsx("span", { className: "cline-ui-search-combobox__match font-cline-ui-semibold text-cline-ui-foreground", children: label.slice(index, index + normalized.length) }), label.slice(index + normalized.length)] }));
19
+ }
20
+ export function SearchCombobox({ align = "start", ariaLabel, className, disabled = false, emptyText = "No results", loading = false, loadingText = "Loading…", onOpen, onValueChange, options, panelWidth = "16rem", placeholder = "Select", placement = "bottom", searchPlaceholder = "Search…", sections, value, }) {
21
+ const [open, setOpen] = useState(false);
22
+ const [search, setSearch] = useState("");
23
+ const [activeIndex, setActiveIndex] = useState(0);
24
+ const containerRef = useRef(null);
25
+ const triggerRef = useRef(null);
26
+ // How to follow the active row: center it when the panel opens, keep it
27
+ // just in view for keyboard navigation, and never scroll for mouse hover —
28
+ // scrolling under the cursor re-triggers hover and makes the list jump.
29
+ const scrollModeRef = useRef("center");
30
+ const listboxId = useId();
31
+ useEffect(() => {
32
+ if (!open) {
33
+ setSearch("");
34
+ scrollModeRef.current = "center";
35
+ return;
36
+ }
37
+ const handlePointerDown = (event) => {
38
+ if (!containerRef.current?.contains(event.target))
39
+ setOpen(false);
40
+ };
41
+ document.addEventListener("pointerdown", handlePointerDown, true);
42
+ return () => document.removeEventListener("pointerdown", handlePointerDown, true);
43
+ }, [open]);
44
+ const selected = options.find((option) => option.value === value);
45
+ const displayedValue = loading
46
+ ? loadingText
47
+ : (selected?.label ?? value) || placeholder;
48
+ const query = search.trim().toLowerCase();
49
+ const filtered = useMemo(() => query
50
+ ? options.filter((option) => optionMatches(option, query))
51
+ : options, [options, query]);
52
+ const sectionById = useMemo(() => {
53
+ const map = new Map();
54
+ for (const section of sections ?? [])
55
+ map.set(section.id, section);
56
+ return map;
57
+ }, [sections]);
58
+ const optionId = useCallback((index) => `${listboxId}-option-${index}`, [listboxId]);
59
+ // Reset the active row when the option set changes: to the selected option
60
+ // on open, to the top match while searching.
61
+ useEffect(() => {
62
+ if (!open)
63
+ return;
64
+ if (query) {
65
+ setActiveIndex(0);
66
+ return;
67
+ }
68
+ const selectedIndex = filtered.findIndex((option) => option.value === value);
69
+ setActiveIndex(selectedIndex >= 0 ? selectedIndex : 0);
70
+ }, [filtered, open, query, value]);
71
+ useEffect(() => {
72
+ if (!open || scrollModeRef.current === "none")
73
+ return;
74
+ const activeElement = document.getElementById(optionId(activeIndex));
75
+ if (typeof activeElement?.scrollIntoView === "function") {
76
+ activeElement.scrollIntoView({ block: scrollModeRef.current });
77
+ }
78
+ }, [activeIndex, open, optionId]);
79
+ const handleSelect = useCallback((option) => {
80
+ if (disabled)
81
+ return;
82
+ if (option.value !== value)
83
+ onValueChange(option.value);
84
+ setOpen(false);
85
+ // Selecting unmounts the focused search input; without an explicit
86
+ // focus target, focus falls back to <body> and keyboard users lose
87
+ // their place.
88
+ triggerRef.current?.focus();
89
+ }, [disabled, onValueChange, value]);
90
+ const closeAndRestoreFocus = () => {
91
+ setOpen(false);
92
+ triggerRef.current?.focus();
93
+ };
94
+ const handleSearchKeyDown = (event) => {
95
+ if (event.key === "Escape") {
96
+ event.preventDefault();
97
+ event.stopPropagation();
98
+ closeAndRestoreFocus();
99
+ return;
100
+ }
101
+ if (event.key === "Tab") {
102
+ // The search input is the only tabbable element in the panel, so
103
+ // Tab always moves focus outside the component; close the popup
104
+ // instead of leaving it open behind the new focus target.
105
+ setOpen(false);
106
+ return;
107
+ }
108
+ if (filtered.length === 0)
109
+ return;
110
+ scrollModeRef.current = "nearest";
111
+ if (event.key === "ArrowDown") {
112
+ event.preventDefault();
113
+ setActiveIndex((current) => Math.min(current + 1, filtered.length - 1));
114
+ }
115
+ else if (event.key === "ArrowUp") {
116
+ event.preventDefault();
117
+ setActiveIndex((current) => Math.max(current - 1, 0));
118
+ }
119
+ else if (event.key === "Home") {
120
+ event.preventDefault();
121
+ setActiveIndex(0);
122
+ }
123
+ else if (event.key === "End") {
124
+ event.preventDefault();
125
+ setActiveIndex(filtered.length - 1);
126
+ }
127
+ else if (event.key === "Enter") {
128
+ event.preventDefault();
129
+ const option = filtered[activeIndex];
130
+ if (option)
131
+ handleSelect(option);
132
+ }
133
+ };
134
+ const renderOption = (option, index) => {
135
+ const isSelected = option.value === value;
136
+ const isActive = index === activeIndex;
137
+ return (_jsxs("button", { "aria-selected": isSelected, className: [
138
+ "cline-ui-search-combobox__option flex w-full cursor-pointer items-center gap-2 rounded-cline-ui-md border-0 px-2 py-1.5 text-left text-cline-ui-foreground",
139
+ isSelected
140
+ ? "bg-cline-ui-accent"
141
+ : isActive
142
+ ? "bg-cline-ui-surface-hover"
143
+ : "bg-transparent",
144
+ ].join(" "), "data-active": isActive || undefined, disabled: disabled, id: optionId(index), onClick: () => handleSelect(option), onMouseMove: () => {
145
+ if (!isActive) {
146
+ scrollModeRef.current = "none";
147
+ setActiveIndex(index);
148
+ }
149
+ }, role: "option", tabIndex: -1, type: "button", children: [option.icon, _jsxs("span", { className: "cline-ui-search-combobox__option-copy flex min-w-0 flex-1 flex-col text-cline-ui-sm", children: [_jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [_jsx("span", { className: "truncate", children: highlightMatch(option.label, search) }), option.badge ? (_jsx("span", { className: "cline-ui-search-combobox__badge inline-flex shrink-0 items-center rounded-cline-ui-sm bg-cline-ui-surface-hover px-1 py-px font-cline-ui-medium text-[0.625rem] text-cline-ui-muted-foreground uppercase tracking-wide", children: option.badge })) : null] }), option.description ? (_jsx("small", { className: "truncate text-[0.625rem] text-cline-ui-muted-foreground", children: option.description })) : null] }), isSelected ? (_jsx("svg", { "aria-hidden": "true", className: "cline-ui-search-combobox__check size-3 shrink-0", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", children: _jsx("path", { d: "M20 6 9 17l-5-5" }) })) : null] }, option.value));
150
+ };
151
+ const renderOptions = () => {
152
+ const rows = [];
153
+ let previousSection;
154
+ filtered.forEach((option, index) => {
155
+ if (option.section && option.section !== previousSection) {
156
+ const section = sectionById.get(option.section);
157
+ if (section) {
158
+ rows.push(_jsxs("div", { className: [
159
+ "cline-ui-search-combobox__section px-2 pb-1 text-cline-ui-muted-foreground",
160
+ index === 0 ? "pt-1" : "pt-2.5",
161
+ ].join(" "), children: [_jsx("div", { className: "font-cline-ui-medium text-[0.625rem] uppercase tracking-wider", children: section.label }), section.description ? (_jsx("div", { className: "text-[0.625rem]", children: section.description })) : null] }, `section-${option.section}`));
162
+ }
163
+ }
164
+ previousSection = option.section;
165
+ rows.push(renderOption(option, index));
166
+ });
167
+ return rows;
168
+ };
169
+ return (_jsxs("div", { className: "cline-ui-search-combobox relative min-w-0", ref: containerRef, children: [_jsxs("button", { "aria-busy": loading || undefined, "aria-expanded": open, "aria-haspopup": "dialog", "aria-label": `${ariaLabel}: ${displayedValue}`, className: [
170
+ "cline-ui-search-combobox__trigger inline-flex min-w-0 cursor-pointer items-center gap-1 rounded-cline-ui-md border-0 bg-transparent px-2 py-1 text-cline-ui-sm font-cline-ui-medium text-cline-ui-foreground ease-[ease] [&:hover:not(:disabled)]:bg-cline-ui-surface-hover focus-visible:outline-2 focus-visible:outline-cline-ui-ring focus-visible:outline-offset-0 disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none",
171
+ className,
172
+ ]
173
+ .filter(Boolean)
174
+ .join(" "), disabled: disabled, onClick: () => {
175
+ if (!open)
176
+ onOpen?.();
177
+ setOpen(!open);
178
+ }, ref: triggerRef, title: displayedValue, type: "button", children: [selected?.icon, _jsx("span", { className: "cline-ui-search-combobox__value min-w-0 truncate", children: displayedValue }), _jsx("svg", { "aria-hidden": "true", className: "cline-ui-search-combobox__chevron size-2.5 shrink-0 text-cline-ui-muted-foreground", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", children: _jsx("path", { d: "m6 9 6 6 6-6" }) })] }), open ? (_jsxs("div", { "aria-label": `Search ${ariaLabel.toLowerCase()}`, className: [
179
+ "cline-ui-search-combobox__panel absolute z-50 overflow-hidden rounded-cline-ui-lg border border-cline-ui-border bg-cline-ui-popover shadow-xl",
180
+ `cline-ui-search-combobox__panel--${align}`,
181
+ `cline-ui-search-combobox__panel--${placement}`,
182
+ align === "start" ? "left-0" : "right-0",
183
+ placement === "top" ? "bottom-full mb-2" : "top-full mt-2",
184
+ ].join(" "), role: "dialog", style: { width: panelWidth, maxWidth: "calc(100vw - 1.5rem)" }, children: [_jsxs("div", { className: "cline-ui-search-combobox__search-row flex items-center gap-2 border-cline-ui-border border-b px-3", children: [_jsxs("svg", { "aria-hidden": "true", className: "cline-ui-search-combobox__search-icon size-3 shrink-0 text-cline-ui-muted-foreground", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", children: [_jsx("path", { d: "m21 21-4.34-4.34" }), _jsx("circle", { cx: "11", cy: "11", r: "8" })] }), _jsx("input", { "aria-activedescendant": filtered.length > 0 ? optionId(activeIndex) : undefined, "aria-controls": listboxId, "aria-expanded": "true", "aria-label": searchPlaceholder,
185
+ // biome-ignore lint/a11y/noAutofocus: opening the picker focuses search
186
+ autoFocus: true, className: "cline-ui-search-combobox__search h-8 w-full border-0 bg-transparent p-0 text-cline-ui-sm text-cline-ui-foreground outline-0 placeholder:text-cline-ui-muted-foreground", onChange: (event) => {
187
+ scrollModeRef.current = "nearest";
188
+ setSearch(event.target.value);
189
+ }, onKeyDown: handleSearchKeyDown, placeholder: searchPlaceholder, role: "combobox", value: search })] }), _jsx("div", { className: "cline-ui-search-combobox__options flex max-h-64 flex-col overflow-y-auto overscroll-contain p-1.5", id: listboxId, role: "listbox", children: loading ? (_jsx("div", { className: "cline-ui-search-combobox__empty p-2 text-cline-ui-sm text-cline-ui-muted-foreground", children: loadingText })) : filtered.length === 0 ? (_jsx("div", { className: "cline-ui-search-combobox__empty p-2 text-cline-ui-sm text-cline-ui-muted-foreground", children: emptyText })) : (renderOptions()) })] })) : null] }));
190
+ }
191
+ //# sourceMappingURL=search-combobox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-combobox.js","sourceRoot":"","sources":["../../components/search-combobox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAEN,WAAW,EACX,SAAS,EACT,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,GACR,MAAM,OAAO,CAAC;AA8Cf,SAAS,aAAa,CAAC,MAA4B,EAAE,KAAa;IACjE,OAAO,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,WAAW,IAAI,EAAE,IAAI,MAAM,CAAC,KAAK,EAAE;SAClE,WAAW,EAAE;SACb,QAAQ,CAAC,KAAK,CAAC,CAAC;AACnB,CAAC;AAED,SAAS,cAAc,CAAC,KAAa,EAAE,KAAa;IACnD,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9C,IAAI,CAAC,UAAU,EAAE,CAAC;QACjB,OAAO,KAAK,CAAC;IACd,CAAC;IACD,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACtD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;QAClB,OAAO,KAAK,CAAC;IACd,CAAC;IACD,OAAO,CACN,8BACE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,EACtB,eAAM,SAAS,EAAC,iFAAiF,YAC/F,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,GACxC,EACN,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,IACrC,CACH,CAAC;AACH,CAAC;AAED,MAAM,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K,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gCAC/B,CAAC,EACD,SAAS,EAAE,mBAAmB,EAC9B,WAAW,EAAE,iBAAiB,EAC9B,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,MAAM,GACZ,IACG,EACN,cACC,SAAS,EAAC,mGAAmG,EAC7G,EAAE,EAAE,SAAS,EACb,IAAI,EAAC,SAAS,YAEb,OAAO,CAAC,CAAC,CAAC,CACV,cAAK,SAAS,EAAC,qFAAqF,YAClG,WAAW,GACP,CACN,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAC3B,cAAK,SAAS,EAAC,qFAAqF,YAClG,SAAS,GACL,CACN,CAAC,CAAC,CAAC,CACH,aAAa,EAAE,CACf,GACI,IACD,CACN,CAAC,CAAC,CAAC,IAAI,IACH,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { OutputHTMLAttributes } from "react";
2
+ export type SessionStatusTone = "neutral" | "running" | "error";
3
+ export interface SessionStatusProps extends OutputHTMLAttributes<HTMLOutputElement> {
4
+ label: string;
5
+ showLabel?: boolean;
6
+ tone?: SessionStatusTone;
7
+ }
8
+ export declare function SessionStatus({ className, label, showLabel, tone, ...props }: SessionStatusProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=session-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-status.d.ts","sourceRoot":"","sources":["../../components/session-status.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEhE,MAAM,WAAW,kBAChB,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,iBAAiB,CAAC;CACzB;AAED,wBAAgB,aAAa,CAAC,EAC7B,SAAS,EACT,KAAK,EACL,SAAgB,EAChB,IAAgB,EAChB,GAAG,KAAK,EACR,EAAE,kBAAkB,2CAqBpB"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function SessionStatus({ className, label, showLabel = true, tone = "neutral", ...props }) {
3
+ return (_jsxs("output", { className: [
4
+ "cline-ui-session-status inline-flex items-center gap-1.5 text-cline-ui-xs leading-none text-cline-ui-muted-foreground",
5
+ `cline-ui-session-status--${tone}`,
6
+ className,
7
+ ]
8
+ .filter(Boolean)
9
+ .join(" "), ...props, children: [_jsx("span", { "aria-hidden": "true", className: "cline-ui-session-status__dot size-1.5 shrink-0 rounded-full" }), _jsx("span", { className: showLabel ? undefined : "cline-ui-sr-only sr-only", children: label })] }));
10
+ }
11
+ //# sourceMappingURL=session-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-status.js","sourceRoot":"","sources":["../../components/session-status.tsx"],"names":[],"mappings":";AAWA,MAAM,UAAU,aAAa,CAAC,EAC7B,SAAS,EACT,KAAK,EACL,SAAS,GAAG,IAAI,EAChB,IAAI,GAAG,SAAS,EAChB,GAAG,KAAK,EACY;IACpB,OAAO,CACN,kBACC,SAAS,EAAE;YACV,uHAAuH;YACvH,4BAA4B,IAAI,EAAE;YAClC,SAAS;SACT;aACC,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,KACP,KAAK,aAET,8BACa,MAAM,EAClB,SAAS,EAAC,6DAA6D,GACtE,EACF,eAAM,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,0BAA0B,YACjE,KAAK,GACA,IACC,CACT,CAAC;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type InputHTMLAttributes } from "react";
2
+ export interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "children" | "type" | "role" | "size" | "aria-checked"> {
3
+ onCheckedChange?: (checked: boolean) => void;
4
+ }
5
+ /** A native checkbox with switch semantics; className and style apply to the wrapper. */
6
+ export declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLInputElement>>;
7
+ //# sourceMappingURL=switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../components/switch.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAE7D,MAAM,WAAW,WAChB,SAAQ,IAAI,CACX,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,cAAc,CACtD;IACD,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AAED,yFAAyF;AACzF,eAAO,MAAM,MAAM,0GAgClB,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { clsx } from "clsx";
4
+ import { forwardRef } from "react";
5
+ /** A native checkbox with switch semantics; className and style apply to the wrapper. */
6
+ export const Switch = forwardRef(({ className, style, dir, hidden, onChange, onCheckedChange, ...props }, ref) => (_jsxs("span", { className: clsx("cline-ui-switch", className), "data-slot": "switch-root", dir: dir, hidden: hidden, style: style, children: [_jsx("input", { ...props, className: "cline-ui-switch__input", "data-slot": "switch", dir: dir, onChange: (event) => {
7
+ const checked = event.currentTarget.checked;
8
+ onChange?.(event);
9
+ onCheckedChange?.(checked);
10
+ }, ref: ref,
11
+ // biome-ignore lint/a11y/useAriaPropsForRole: Native checkboxes expose checked state, including after form reset; aria-checked would duplicate it.
12
+ role: "switch", type: "checkbox" }), _jsx("span", { "aria-hidden": "true", className: "cline-ui-switch__track", children: _jsx("span", { className: "cline-ui-switch__thumb", "data-slot": "switch-thumb" }) })] })));
13
+ Switch.displayName = "Switch";
14
+ //# sourceMappingURL=switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.js","sourceRoot":"","sources":["../../components/switch.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAA4B,MAAM,OAAO,CAAC;AAU7D,yFAAyF;AACzF,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAC/B,CACC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,GAAG,KAAK,EAAE,EACtE,GAAG,EACF,EAAE,CAAC,CACJ,gBACC,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,eACnC,aAAa,EACvB,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,aAEZ,mBACK,KAAK,EACT,SAAS,EAAC,wBAAwB,eACxB,QAAQ,EAClB,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;gBACnB,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC;gBAC5C,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;gBAClB,eAAe,EAAE,CAAC,OAAO,CAAC,CAAC;YAC5B,CAAC,EACD,GAAG,EAAE,GAAG;YACR,mJAAmJ;YACnJ,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,UAAU,GACd,EACF,8BAAkB,MAAM,EAAC,SAAS,EAAC,wBAAwB,YAC1D,eAAM,SAAS,EAAC,wBAAwB,eAAW,cAAc,GAAG,GAC9D,IACD,CACP,CACD,CAAC;AACF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,178 @@
1
1
  {
2
- "name": "@cerebriline/ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@cerebriline/ui",
3
+ "version": "4.100.313",
4
+ "description": "Shared Cerebriline web theme and reusable agent UI components",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/mann1x/cline.git",
8
+ "directory": "sdk/packages/ui"
9
+ },
10
+ "private": false,
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "type": "module",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/components/index.d.ts",
18
+ "import": "./dist/components/index.js"
19
+ },
20
+ "./components.css": "./components.css",
21
+ "./components/agent-chat": {
22
+ "types": "./dist/components/agent-chat/index.d.ts",
23
+ "import": "./dist/components/agent-chat/index.js"
24
+ },
25
+ "./components/agent-chat/tool-summary": {
26
+ "types": "./dist/components/agent-chat/tool-summary/index.d.ts",
27
+ "import": "./dist/components/agent-chat/tool-summary/index.js"
28
+ },
29
+ "./components/agent-chat/tool-diff": {
30
+ "types": "./dist/components/agent-chat/tool-diff.d.ts",
31
+ "import": "./dist/components/agent-chat/tool-diff.js"
32
+ },
33
+ "./components/agent-chat.css": "./components/agent-chat/agent-chat.css",
34
+ "./components/markdown": {
35
+ "types": "./dist/components/markdown.d.ts",
36
+ "import": "./dist/components/markdown.js"
37
+ },
38
+ "./components/markdown.css": "./components/markdown.css",
39
+ "./components/mermaid-block": {
40
+ "types": "./dist/components/mermaid-block.d.ts",
41
+ "import": "./dist/components/mermaid-block.js"
42
+ },
43
+ "./components/mermaid-diagram": {
44
+ "types": "./dist/components/mermaid-diagram.d.ts",
45
+ "import": "./dist/components/mermaid-diagram.js"
46
+ },
47
+ "./theme/index.css": "./theme/index.css",
48
+ "./theme/palette.css": "./theme/palette.css",
49
+ "./theme/scoped-tokens.css": "./theme/scoped-tokens.css",
50
+ "./theme/tokens.css": "./theme/tokens.css",
51
+ "./theme/theme.css": "./theme/theme.css",
52
+ "./theme/base.css": "./theme/base.css",
53
+ "./package.json": "./package.json",
54
+ "./components/message-scroller": {
55
+ "types": "./dist/components/message-scroller.d.ts",
56
+ "import": "./dist/components/message-scroller.js"
57
+ },
58
+ "./components/message-scroller.css": "./components/message-scroller.css"
59
+ },
60
+ "files": [
61
+ "components.css",
62
+ "components/agent-changes.tsx",
63
+ "components/agent-changes.css",
64
+ "components/agent-pull-request-bar.tsx",
65
+ "components/agent-pull-request-bar.css",
66
+ "components/agent-command-output.tsx",
67
+ "components/agent-image-lightbox.tsx",
68
+ "components/attachment-drop-zone.tsx",
69
+ "components/badge.tsx",
70
+ "components/button.tsx",
71
+ "components/generated-media.tsx",
72
+ "components/agent-chat/agent-chat.css",
73
+ "components/agent-chat/index.tsx",
74
+ "components/agent-chat/tool-diff.tsx",
75
+ "components/agent-chat/tool-summary",
76
+ "components/agent-approval-card.css",
77
+ "components/agent-approval-card.tsx",
78
+ "components/agent-ask-question.css",
79
+ "components/agent-ask-question.tsx",
80
+ "components/agent-context-usage.tsx",
81
+ "components/agent-aurora.css",
82
+ "components/agent-aurora.tsx",
83
+ "components/agent-conversation-layout.tsx",
84
+ "components/agent-hero-heading.css",
85
+ "components/agent-hero-heading.tsx",
86
+ "components/agent-welcome-hero.css",
87
+ "components/agent-welcome-hero.tsx",
88
+ "components/agent-welcome-hero-pointer.ts",
89
+ "components/agent-prompt-queue.css",
90
+ "components/agent-prompt-queue.tsx",
91
+ "components/agent-quick-actions.css",
92
+ "components/agent-quick-actions.tsx",
93
+ "components/agent-session-row.tsx",
94
+ "components/github-icon.tsx",
95
+ "components/markdown.css",
96
+ "components/markdown.ts",
97
+ "components/mermaid-block.tsx",
98
+ "components/mermaid-diagram.ts",
99
+ "components/mermaid-dom.ts",
100
+ "components/index.ts",
101
+ "components/search-combobox.css",
102
+ "components/search-combobox.tsx",
103
+ "components/session-status.css",
104
+ "components/session-status.tsx",
105
+ "components/switch.css",
106
+ "components/switch.tsx",
107
+ "dist",
108
+ "theme",
109
+ "ADOPTION.md",
110
+ "README.md",
111
+ "RADIX-COLORS-LICENSE",
112
+ "components/agent-composer.tsx",
113
+ "components/message-scroller.tsx",
114
+ "components/message-scroller.css"
115
+ ],
116
+ "sideEffects": [
117
+ "./components.css",
118
+ "./components/**/*.css",
119
+ "./theme/*.css"
120
+ ],
121
+ "keywords": [
122
+ "cline",
123
+ "ui",
124
+ "design-system",
125
+ "react",
126
+ "tailwindcss",
127
+ "agent-chat"
128
+ ],
129
+ "license": "Apache-2.0",
130
+ "peerDependencies": {
131
+ "@pierre/diffs": "^1.3.0",
132
+ "@shikijs/langs": ">=4.0.0 <5",
133
+ "@shikijs/themes": ">=4.0.0 <5",
134
+ "react": ">=18.3.0 <20",
135
+ "mermaid": ">=11.16.0 <12",
136
+ "shiki": ">=4.0.0 <5",
137
+ "streamdown": "^2.5.0",
138
+ "tailwindcss": ">=4.0.0 <5"
139
+ },
140
+ "peerDependenciesMeta": {
141
+ "@pierre/diffs": {
142
+ "optional": true
143
+ },
144
+ "@shikijs/langs": {
145
+ "optional": true
146
+ },
147
+ "@shikijs/themes": {
148
+ "optional": true
149
+ },
150
+ "mermaid": {
151
+ "optional": true
152
+ },
153
+ "react": {
154
+ "optional": true
155
+ },
156
+ "shiki": {
157
+ "optional": true
158
+ },
159
+ "streamdown": {
160
+ "optional": true
161
+ },
162
+ "tailwindcss": {
163
+ "optional": true
164
+ }
165
+ },
166
+ "dependencies": {
167
+ "@radix-ui/react-slot": "1.2.4",
168
+ "@shadcn/react": "0.3.1",
169
+ "class-variance-authority": "^0.7.1",
170
+ "clsx": "^2.1.1",
171
+ "lucide-react": "^0.564.0",
172
+ "@cerebriline/shared": "4.100.313"
173
+ },
174
+ "homepage": "https://github.com/mann1x/cline/tree/main/sdk",
175
+ "bugs": {
176
+ "url": "https://github.com/mann1x/cline/issues"
177
+ }
178
+ }
package/theme/base.css ADDED
@@ -0,0 +1,83 @@
1
+ @import "@cerebriline/ui/components/markdown.css" layer(components);
2
+
3
+ :root {
4
+ color-scheme: light;
5
+ }
6
+
7
+ .dark {
8
+ color-scheme: dark;
9
+ }
10
+
11
+ @layer base {
12
+ * {
13
+ @apply border-border outline-ring/50;
14
+ }
15
+
16
+ html {
17
+ font-size: 15px;
18
+ @apply font-sans;
19
+ }
20
+
21
+ body {
22
+ @apply m-0 bg-background text-base font-normal text-foreground;
23
+ }
24
+ }
25
+
26
+ ::-webkit-scrollbar {
27
+ width: 6px;
28
+ height: 6px;
29
+ }
30
+
31
+ ::-webkit-scrollbar-track {
32
+ background: transparent;
33
+ }
34
+
35
+ ::-webkit-scrollbar-thumb {
36
+ background: var(--scrollbar-thumb);
37
+ border-radius: 3px;
38
+ }
39
+
40
+ ::-webkit-scrollbar-thumb:hover {
41
+ background: var(--scrollbar-thumb-hover);
42
+ }
43
+
44
+ ::selection {
45
+ background: var(--selection-background);
46
+ }
47
+
48
+ :where(
49
+ button:not(:disabled),
50
+ a[href],
51
+ area[href],
52
+ label[for],
53
+ select:not(:disabled),
54
+ summary,
55
+ input[type="button"]:not(:disabled),
56
+ input[type="checkbox"]:not(:disabled),
57
+ input[type="color"]:not(:disabled),
58
+ input[type="file"]:not(:disabled),
59
+ input[type="radio"]:not(:disabled),
60
+ input[type="range"]:not(:disabled),
61
+ input[type="reset"]:not(:disabled),
62
+ input[type="submit"]:not(:disabled),
63
+ input[role="combobox"][readonly]:not(:disabled),
64
+ [role="button"]:not([aria-disabled="true"]),
65
+ [role="checkbox"]:not([aria-disabled="true"]),
66
+ [role="menuitem"]:not([aria-disabled="true"]),
67
+ [role="menuitemcheckbox"]:not([aria-disabled="true"]),
68
+ [role="menuitemradio"]:not([aria-disabled="true"]),
69
+ [role="link"]:not([aria-disabled="true"]),
70
+ [role="option"]:not([aria-disabled="true"]),
71
+ [role="radio"]:not([aria-disabled="true"]),
72
+ [role="slider"]:not([aria-disabled="true"]),
73
+ [role="switch"]:not([aria-disabled="true"]),
74
+ [role="tab"]:not([aria-disabled="true"]),
75
+ [role="treeitem"]:not([aria-disabled="true"]),
76
+ [data-interactive]:not([aria-disabled="true"]):not([data-disabled])
77
+ ) {
78
+ cursor: pointer;
79
+ }
80
+
81
+ [data-cursor="default"] {
82
+ cursor: default;
83
+ }