@crisp-ui-kit/crisp 0.2.0 → 0.5.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 (244) hide show
  1. package/README.md +6 -0
  2. package/dist/base.css +25 -0
  3. package/dist/button.css +1 -1
  4. package/dist/command.css +1 -1
  5. package/dist/contextmenu.css +1 -1
  6. package/dist/datatable.css +60 -0
  7. package/dist/datatable.d.ts +7 -0
  8. package/dist/datepicker.css +1 -1
  9. package/dist/dialog.css +1 -1
  10. package/dist/esm/components/accordion/accordion.js +32 -0
  11. package/dist/esm/components/accordion/accordion.recipe.js +23 -0
  12. package/dist/esm/components/accordion/index.js +2 -0
  13. package/dist/esm/components/avatar/avatar.js +8 -0
  14. package/dist/esm/components/avatar/avatar.recipe.js +39 -0
  15. package/dist/esm/components/avatar/index.js +2 -0
  16. package/dist/esm/components/avatargroup/avatargroup.js +16 -0
  17. package/dist/esm/components/avatargroup/avatargroup.recipe.js +15 -0
  18. package/dist/esm/components/avatargroup/index.js +2 -0
  19. package/dist/esm/components/badge/badge.js +8 -0
  20. package/dist/esm/components/badge/badge.recipe.js +65 -0
  21. package/dist/esm/components/badge/index.js +2 -0
  22. package/dist/esm/components/barchart/barchart.js +29 -0
  23. package/dist/esm/components/barchart/barchart.recipe.js +26 -0
  24. package/dist/esm/components/barchart/index.js +2 -0
  25. package/dist/esm/components/breadcrumb/breadcrumb.js +17 -0
  26. package/dist/esm/components/breadcrumb/breadcrumb.recipe.js +18 -0
  27. package/dist/esm/components/breadcrumb/index.js +2 -0
  28. package/dist/esm/components/bulkbar/bulkbar.js +16 -0
  29. package/dist/esm/components/bulkbar/bulkbar.recipe.js +28 -0
  30. package/dist/esm/components/bulkbar/index.js +2 -0
  31. package/dist/esm/components/button/button.js +15 -0
  32. package/dist/esm/components/button/button.recipe.js +39 -0
  33. package/dist/esm/components/button/index.js +2 -0
  34. package/dist/esm/components/callout/callout.js +22 -0
  35. package/dist/esm/components/callout/callout.recipe.js +26 -0
  36. package/dist/esm/components/callout/index.js +2 -0
  37. package/dist/esm/components/card/card.js +15 -0
  38. package/dist/esm/components/card/card.recipe.js +28 -0
  39. package/dist/esm/components/card/index.js +2 -0
  40. package/dist/esm/components/checkbox/checkbox.js +20 -0
  41. package/dist/esm/components/checkbox/checkbox.recipe.js +23 -0
  42. package/dist/esm/components/checkbox/index.js +2 -0
  43. package/dist/esm/components/contextmenu/contextmenu.js +42 -0
  44. package/dist/esm/components/contextmenu/contextmenu.recipe.js +21 -0
  45. package/dist/esm/components/contextmenu/index.js +2 -0
  46. package/dist/esm/components/datatable/datatable.js +245 -0
  47. package/dist/esm/components/datatable/datatable.recipe.js +72 -0
  48. package/dist/esm/components/datatable/index.js +2 -0
  49. package/dist/esm/components/datepicker/datepicker.js +57 -0
  50. package/dist/esm/components/datepicker/datepicker.recipe.js +32 -0
  51. package/dist/esm/components/datepicker/index.js +2 -0
  52. package/dist/esm/components/dialog/dialog.js +48 -0
  53. package/dist/esm/components/dialog/dialog.recipe.js +32 -0
  54. package/dist/esm/components/dialog/index.js +2 -0
  55. package/dist/esm/components/divider/divider.js +7 -0
  56. package/dist/esm/components/divider/divider.recipe.js +14 -0
  57. package/dist/esm/components/divider/index.js +2 -0
  58. package/dist/esm/components/donutchart/donutchart.js +38 -0
  59. package/dist/esm/components/donutchart/donutchart.recipe.js +27 -0
  60. package/dist/esm/components/donutchart/index.js +2 -0
  61. package/dist/esm/components/drawer/drawer.js +42 -0
  62. package/dist/esm/components/drawer/drawer.recipe.js +27 -0
  63. package/dist/esm/components/drawer/index.js +2 -0
  64. package/dist/esm/components/emptystate/emptystate.js +7 -0
  65. package/dist/esm/components/emptystate/emptystate.recipe.js +31 -0
  66. package/dist/esm/components/emptystate/index.js +2 -0
  67. package/dist/esm/components/formfield/formfield.js +14 -0
  68. package/dist/esm/components/formfield/formfield.recipe.js +19 -0
  69. package/dist/esm/components/formfield/index.js +2 -0
  70. package/dist/esm/components/input/index.js +2 -0
  71. package/dist/esm/components/input/input.js +8 -0
  72. package/dist/esm/components/input/input.recipe.js +23 -0
  73. package/dist/esm/components/kbd/index.js +2 -0
  74. package/dist/esm/components/kbd/kbd.js +8 -0
  75. package/dist/esm/components/kbd/kbd.recipe.js +20 -0
  76. package/dist/esm/components/linechart/index.js +2 -0
  77. package/dist/esm/components/linechart/linechart.js +41 -0
  78. package/dist/esm/components/linechart/linechart.recipe.js +27 -0
  79. package/dist/esm/components/menu/index.js +2 -0
  80. package/dist/esm/components/menu/menu.js +137 -0
  81. package/dist/esm/components/menu/menu.recipe.js +51 -0
  82. package/dist/esm/components/multiselect/index.js +2 -0
  83. package/dist/esm/components/multiselect/multiselect.js +118 -0
  84. package/dist/esm/components/multiselect/multiselect.recipe.js +68 -0
  85. package/dist/esm/components/popover/index.js +2 -0
  86. package/dist/esm/components/popover/popover.js +70 -0
  87. package/dist/esm/components/popover/popover.recipe.js +18 -0
  88. package/dist/esm/components/progress/index.js +2 -0
  89. package/dist/esm/components/progress/progress.js +23 -0
  90. package/dist/esm/components/progress/progress.recipe.js +17 -0
  91. package/dist/esm/components/radiogroup/index.js +2 -0
  92. package/dist/esm/components/radiogroup/radiogroup.js +46 -0
  93. package/dist/esm/components/radiogroup/radiogroup.recipe.js +37 -0
  94. package/dist/esm/components/segmented/index.js +2 -0
  95. package/dist/esm/components/segmented/segmented.js +59 -0
  96. package/dist/esm/components/segmented/segmented.recipe.js +20 -0
  97. package/dist/esm/components/select/index.js +2 -0
  98. package/dist/esm/components/select/select.js +144 -0
  99. package/dist/esm/components/select/select.recipe.js +76 -0
  100. package/dist/esm/components/skeleton/index.js +2 -0
  101. package/dist/esm/components/skeleton/skeleton.js +7 -0
  102. package/dist/esm/components/skeleton/skeleton.recipe.js +14 -0
  103. package/dist/esm/components/spinner/index.js +2 -0
  104. package/dist/esm/components/spinner/spinner.js +11 -0
  105. package/dist/esm/components/spinner/spinner.recipe.js +13 -0
  106. package/dist/esm/components/stagebar/index.js +2 -0
  107. package/dist/esm/components/stagebar/stagebar.js +23 -0
  108. package/dist/esm/components/stagebar/stagebar.recipe.js +14 -0
  109. package/dist/esm/components/statcard/index.js +2 -0
  110. package/dist/esm/components/statcard/statcard.js +12 -0
  111. package/dist/esm/components/statcard/statcard.recipe.js +34 -0
  112. package/dist/esm/components/switch/index.js +2 -0
  113. package/dist/esm/components/switch/switch.js +22 -0
  114. package/dist/esm/components/switch/switch.recipe.js +26 -0
  115. package/dist/esm/components/table/index.js +2 -0
  116. package/dist/esm/components/table/table.js +30 -0
  117. package/dist/esm/components/table/table.recipe.js +40 -0
  118. package/dist/esm/components/tabletoolbar/index.js +2 -0
  119. package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +79 -0
  120. package/dist/esm/components/tabletoolbar/tabletoolbar.js +191 -0
  121. package/dist/esm/components/tabletoolbar/tabletoolbar.recipe.js +23 -0
  122. package/dist/esm/components/tabs/index.js +2 -0
  123. package/dist/esm/components/tabs/tabs.js +70 -0
  124. package/dist/esm/components/tabs/tabs.recipe.js +33 -0
  125. package/dist/esm/components/textarea/index.js +2 -0
  126. package/dist/esm/components/textarea/textarea.js +20 -0
  127. package/dist/esm/components/textarea/textarea.recipe.js +31 -0
  128. package/dist/esm/components/toast/index.js +2 -0
  129. package/dist/esm/components/toast/toast.js +58 -0
  130. package/dist/esm/components/toast/toast.recipe.js +28 -0
  131. package/dist/esm/components/tooltip/index.js +2 -0
  132. package/dist/esm/components/tooltip/tooltip.js +45 -0
  133. package/dist/esm/components/tooltip/tooltip.recipe.js +13 -0
  134. package/dist/esm/core/cx.js +1 -0
  135. package/dist/esm/core/define.js +3 -0
  136. package/dist/esm/core/index.js +4 -0
  137. package/dist/esm/core/primitive.js +13 -0
  138. package/dist/esm/core/resolve.js +41 -0
  139. package/dist/esm/core/types.js +1 -0
  140. package/dist/esm/index.js +71 -0
  141. package/dist/esm/product/appshell/appshell.js +44 -0
  142. package/dist/esm/product/appshell/appshell.recipe.js +27 -0
  143. package/dist/esm/product/appshell/index.js +2 -0
  144. package/dist/esm/product/board/board.js +42 -0
  145. package/dist/esm/product/board/board.recipe.js +28 -0
  146. package/dist/esm/product/board/index.js +2 -0
  147. package/dist/esm/product/command/command.js +188 -0
  148. package/dist/esm/product/command/command.recipe.js +19 -0
  149. package/dist/esm/product/command/index.js +2 -0
  150. package/dist/esm/product/entitycard/entitycard.js +11 -0
  151. package/dist/esm/product/entitycard/entitycard.recipe.js +29 -0
  152. package/dist/esm/product/entitycard/index.js +2 -0
  153. package/dist/esm/product/flowcanvas/flowcanvas.js +85 -0
  154. package/dist/esm/product/flowcanvas/flowcanvas.recipe.js +25 -0
  155. package/dist/esm/product/flowcanvas/index.js +2 -0
  156. package/dist/esm/product/inbox/inbox.js +13 -0
  157. package/dist/esm/product/inbox/inbox.recipe.js +43 -0
  158. package/dist/esm/product/inbox/index.js +2 -0
  159. package/dist/esm/product/listpage/index.js +2 -0
  160. package/dist/esm/product/listpage/listpage.js +21 -0
  161. package/dist/esm/product/listpage/listpage.recipe.js +43 -0
  162. package/dist/esm/product/navitem/index.js +1 -0
  163. package/dist/esm/product/navitem/navitem.js +8 -0
  164. package/dist/esm/product/navitem/navitem.recipe.js +21 -0
  165. package/dist/esm/product/onboarding/index.js +2 -0
  166. package/dist/esm/product/onboarding/onboarding.js +14 -0
  167. package/dist/esm/product/onboarding/onboarding.recipe.js +41 -0
  168. package/dist/esm/product/recordpage/index.js +2 -0
  169. package/dist/esm/product/recordpage/recordpage.js +286 -0
  170. package/dist/esm/product/recordpage/recordpage.recipe.js +157 -0
  171. package/dist/esm/product/recordpanel/index.js +2 -0
  172. package/dist/esm/product/recordpanel/recordpanel.js +47 -0
  173. package/dist/esm/product/recordpanel/recordpanel.recipe.js +52 -0
  174. package/dist/esm/product/recordstable/company-logos.js +26 -0
  175. package/dist/esm/product/recordstable/index.js +2 -0
  176. package/dist/esm/product/recordstable/recordstable.js +963 -0
  177. package/dist/esm/product/recordstable/recordstable.recipe.js +149 -0
  178. package/dist/esm/product/richtext/index.js +2 -0
  179. package/dist/esm/product/richtext/richtext.js +111 -0
  180. package/dist/esm/product/richtext/richtext.recipe.js +40 -0
  181. package/dist/esm/product/settingssection/index.js +2 -0
  182. package/dist/esm/product/settingssection/settingssection.js +11 -0
  183. package/dist/esm/product/settingssection/settingssection.recipe.js +20 -0
  184. package/dist/esm/product/settingsshell/index.js +2 -0
  185. package/dist/esm/product/settingsshell/settingsshell.js +23 -0
  186. package/dist/esm/product/settingsshell/settingsshell.recipe.js +38 -0
  187. package/dist/esm/product/sidebar/index.js +2 -0
  188. package/dist/esm/product/sidebar/sidebar.js +112 -0
  189. package/dist/esm/product/sidebar/sidebar.recipe.js +18 -0
  190. package/dist/esm/product/tasklist/index.js +2 -0
  191. package/dist/esm/product/tasklist/tasklist.js +16 -0
  192. package/dist/esm/product/tasklist/tasklist.recipe.js +35 -0
  193. package/dist/esm/product/trialbanner/index.js +2 -0
  194. package/dist/esm/product/trialbanner/trialbanner.js +10 -0
  195. package/dist/esm/product/trialbanner/trialbanner.recipe.js +29 -0
  196. package/dist/esm/product/viewtoggle/index.js +2 -0
  197. package/dist/esm/product/viewtoggle/viewtoggle.js +11 -0
  198. package/dist/esm/product/viewtoggle/viewtoggle.recipe.js +24 -0
  199. package/dist/esm/tokens/contract.js +18 -0
  200. package/dist/esm/tokens/index.js +4 -0
  201. package/dist/esm/tokens/palette.js +30 -0
  202. package/dist/esm/tokens/scale.js +60 -0
  203. package/dist/esm/tokens/semantic.js +30 -0
  204. package/dist/menu.css +2 -2
  205. package/dist/multiselect.css +3 -3
  206. package/dist/popover.css +1 -1
  207. package/dist/recordpage.css +5 -5
  208. package/dist/recordstable.css +4 -4
  209. package/dist/select.css +10 -4
  210. package/dist/select.d.ts +2 -1
  211. package/dist/sidebar.css +1 -1
  212. package/dist/statcard.css +6 -0
  213. package/dist/statcard.d.ts +2 -2
  214. package/dist/styles.css +222 -27
  215. package/dist/table.css +26 -0
  216. package/dist/table.d.ts +8 -0
  217. package/dist/tabletoolbar.css +70 -0
  218. package/dist/tabletoolbar.d.ts +7 -0
  219. package/dist/tokens.css +24 -0
  220. package/dist/types/components/datatable/datatable.d.ts +98 -0
  221. package/dist/types/components/datatable/datatable.recipe.d.ts +3 -0
  222. package/dist/types/components/datatable/index.d.ts +2 -0
  223. package/dist/types/components/select/select.d.ts +3 -1
  224. package/dist/types/components/select/select.recipe.d.ts +12 -0
  225. package/dist/types/components/statcard/statcard.d.ts +6 -1
  226. package/dist/types/components/statcard/statcard.recipe.d.ts +12 -2
  227. package/dist/types/components/table/index.d.ts +2 -0
  228. package/dist/types/components/table/table.d.ts +53 -0
  229. package/dist/types/components/table/table.recipe.d.ts +21 -0
  230. package/dist/types/components/tabletoolbar/index.d.ts +2 -0
  231. package/dist/types/components/tabletoolbar/tabletoolbar.chrome.d.ts +2 -0
  232. package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +63 -0
  233. package/dist/types/components/tabletoolbar/tabletoolbar.recipe.d.ts +3 -0
  234. package/dist/types/index.d.ts +3 -0
  235. package/dist/types/product/recordstable/company-logos.d.ts +1 -0
  236. package/dist/types/product/recordstable/recordstable.d.ts +42 -1
  237. package/dist/types/product/sidebar/index.d.ts +1 -1
  238. package/dist/types/product/sidebar/sidebar.d.ts +85 -0
  239. package/dist/types/tokens/contract.d.ts +12 -0
  240. package/dist/types/tokens/palette.d.ts +48 -0
  241. package/dist/types/tokens/semantic.d.ts +12 -0
  242. package/dist/viewtoggle.css +2 -2
  243. package/package.json +259 -9
  244. package/dist/index.js +0 -9690
@@ -0,0 +1,149 @@
1
+ import { toolbarChromeBody, toolbarChromeHead, } from "../../components/tabletoolbar/tabletoolbar.chrome.js";
2
+ import { defineRecipe, resolveRecipe } from "../../core/index.js";
3
+ import { contract as c } from "../../tokens/index.js";
4
+ // Attio's record grid, measured: 36px rows, 1px borderSubtle (#eeeff1) grid
5
+ // lines on BOTH axes, sticky checkbox + entity (first) columns, entity = 16px
6
+ // avatar + 14px/500 name, 28px toolbar controls, a floating bulk-action bar.
7
+ //
8
+ // The toolbar's measured chrome now lives in the TableToolbar primitive
9
+ // (components/tabletoolbar/tabletoolbar.chrome.ts) and is emitted below under
10
+ // this surface's own class prefix, so RecordsTable's markup is unchanged. The
11
+ // three rules between the two halves are RecordsTable's own and must stay
12
+ // mid-block: they depend on following the .menu rule in source order.
13
+ const config = defineRecipe({
14
+ name: "recordstable",
15
+ base: `
16
+ box-sizing: border-box; position: relative; display: flex; flex-direction: column; min-height: 0; height: 100%; width: 100%; font-family: ${c.font.sans}; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
17
+ & * { box-sizing: border-box; }
18
+
19
+ /* toolbar */
20
+ ${toolbarChromeHead("recordstable")}
21
+ & .recordstable-ctx { z-index: 60; }
22
+ & .recordstable-th[data-drop] { box-shadow: inset 2px 0 0 ${c.bgBrandSolid}; }
23
+ & .recordstable-th-inner[draggable="true"]:active { cursor: grabbing; }
24
+ ${toolbarChromeBody("recordstable")}
25
+
26
+ /* scroll frame + table */
27
+ & .recordstable-scroll { flex: 1; min-height: 0; overflow: auto; background: ${c.bgSurface}; border-top: 1px solid ${c.borderSubtle}; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, ${c.fgPrimary} 22%, transparent) transparent; }
28
+ & .recordstable-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
29
+ & .recordstable-scroll::-webkit-scrollbar-thumb { background: color-mix(in srgb, ${c.fgPrimary} 20%, transparent); border-radius: ${c.radius.full}; border: 2px solid ${c.bgSurface}; background-clip: padding-box; }
30
+ & .recordstable-scroll::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, ${c.fgPrimary} 34%, transparent); background-clip: padding-box; }
31
+ & .recordstable-scroll::-webkit-scrollbar-corner { background: transparent; }
32
+ & .recordstable-table { table-layout: fixed; border-collapse: separate; border-spacing: 0; }
33
+ & .recordstable-th, & .recordstable-td { position: relative; height: ${c.size.tableRow}; padding: 0 ${c.space["2"]}; border-bottom: 1px solid ${c.borderSubtle}; border-right: 1px solid ${c.borderSubtle}; text-align: left; white-space: nowrap; overflow: hidden; }
34
+ & .recordstable-th { position: sticky; top: 0; z-index: 2; height: 40px; background: ${c.bgSurface}; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; letter-spacing: -0.14px; color: ${c.fgPrimary}; user-select: none; }
35
+ & .recordstable-scroll[data-scrolled-y] .recordstable-th { box-shadow: 0 1px 0 ${c.borderDefault}, 0 6px 12px -8px rgba(28,40,64,0.18); }
36
+ & .recordstable-th-inner { display: flex; align-items: center; gap: ${c.space["1.5"]}; width: 100%; height: 100%; margin: 0; padding: 0; border: none; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
37
+ & .recordstable-th-inner svg { flex-shrink: 0; color: color-mix(in srgb, ${c.fgPrimary} 45%, transparent); }
38
+ & .recordstable-th-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
39
+ & .recordstable-th-rename { width: 100%; min-width: 0; height: 100%; margin: 0; padding: 0; border: none; outline: none; background: none; color: inherit; font: inherit; letter-spacing: inherit; }
40
+ & .recordstable-sort { flex-shrink: 0; opacity: 0.4; transition: opacity .12s; color: color-mix(in srgb, ${c.fgPrimary} 45%, transparent); }
41
+ & .recordstable-th:hover .recordstable-sort, & .recordstable-th[data-sorted] .recordstable-sort { opacity: 1; }
42
+ & .recordstable-th[data-sorted="desc"] .recordstable-sort svg { transform: rotate(180deg); }
43
+
44
+ /* column resize handle */
45
+ & .recordstable-resize { position: absolute; top: 0; right: -3px; width: 9px; height: 100%; cursor: col-resize; z-index: 6; touch-action: none; }
46
+ & .recordstable-resize::after { content: ""; position: absolute; top: 0; left: 3px; width: 2px; height: 100%; background: ${c.bgBrandSolid}; opacity: 0; transition: opacity .12s; }
47
+ & .recordstable-resize:hover::after, & .recordstable-resize[data-resizing]::after { opacity: 1; }
48
+
49
+ /* add-column header */
50
+ & .recordstable-addcol { min-width: 44px; }
51
+ & .recordstable-addcol button { display: flex; align-items: center; justify-content: center; width: 44px; height: 100%; border: none; background: none; color: ${c.fgMuted}; cursor: pointer; }
52
+ & .recordstable-addcol button:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
53
+
54
+ /* cells */
55
+ & .recordstable-td { font-size: ${c.text.lg}; color: ${c.fgPrimary}; background: ${c.bgSurface}; cursor: default; }
56
+ & .recordstable-td--editable { cursor: text; }
57
+ /* keyboard/click cell selection (spreadsheet-style) */
58
+ & .recordstable-td[data-selected] { outline: 2px solid ${c.bgBrandSolid}; outline-offset: -2px; border-radius: ${c.radius.sm}; z-index: 3; }
59
+ & .recordstable-scroll:focus { outline: none; }
60
+ /* picker cells (status / date / reference) host a ghost control edge-to-edge */
61
+ & .recordstable-td--picker { padding: 0; }
62
+ & .recordstable-td--picker .select-trigger, & .recordstable-td--picker .datepicker-trigger, & .recordstable-td--picker .multiselect-trigger { width: 100%; height: 100%; min-height: 0; border-radius: 0; box-shadow: none; padding: 0 ${c.space["2"]}; }
63
+ & .recordstable-td--picker .multiselect-trigger:hover { background: none; }
64
+ & .recordstable-td--picker .multiselect-trigger[data-open] { box-shadow: inset 0 0 0 1.5px ${c.bgBrandSolid}; }
65
+ /* tag cell: one compact clipped line of full chips, no chevron (opens the picker on click) */
66
+ & .recordstable-td--picker .multiselect-chips { flex-wrap: nowrap; overflow: hidden; }
67
+ & .recordstable-td--picker .multiselect-chips .recordstable-tag { flex-shrink: 0; max-width: none; }
68
+ & .recordstable-td--picker .multiselect-chevron { display: none; }
69
+ & .recordstable-td--picker .multiselect-placeholder { color: ${c.fgMuted}; }
70
+ & .recordstable-status { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; min-width: 0; }
71
+ & .recordstable-status-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: ${c.radius.full}; }
72
+ & .recordstable-cell { display: flex; align-items: center; gap: ${c.space["2"]}; height: 100%; min-width: 0; }
73
+ & .recordstable-cell--num { justify-content: flex-end; font-variant-numeric: tabular-nums; }
74
+ & .recordstable-cell--tags { gap: ${c.space["1"]}; }
75
+ & .recordstable-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 ${c.space["1"]}; border-radius: 7px; font-size: ${c.text.lg}; line-height: 20px; font-weight: ${c.weight.medium}; white-space: nowrap; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: color-mix(in srgb, ${c.fgPrimary} 82%, transparent); }
76
+ & .recordstable-tag[data-tone="brand"] { background: color-mix(in srgb, ${c.bgBrandSolid} 14%, transparent); color: color-mix(in srgb, ${c.bgBrandSolid} 82%, ${c.fgPrimary}); }
77
+ & .recordstable-tag[data-tone="success"] { background: color-mix(in srgb, ${c.bgSuccess} 16%, transparent); color: color-mix(in srgb, ${c.bgSuccess} 78%, ${c.fgPrimary}); }
78
+ & .recordstable-tag[data-tone="warning"] { background: color-mix(in srgb, ${c.bgWarning} 18%, transparent); color: color-mix(in srgb, ${c.bgWarning} 82%, ${c.fgPrimary}); }
79
+ & .recordstable-tag[data-tone="danger"] { background: color-mix(in srgb, ${c.bgDanger} 15%, transparent); color: color-mix(in srgb, ${c.bgDanger} 80%, ${c.fgPrimary}); }
80
+ & .recordstable-tag[data-tone="purple"] { background: color-mix(in srgb, ${c.bgPurple} 16%, transparent); color: color-mix(in srgb, ${c.bgPurple} 80%, ${c.fgPrimary}); }
81
+ & .recordstable-tag[data-tone="cyan"] { background: color-mix(in srgb, ${c.bgCyan} 18%, transparent); color: color-mix(in srgb, ${c.bgCyan} 82%, ${c.fgPrimary}); }
82
+ & .recordstable-tag[data-tone="orange"] { background: color-mix(in srgb, ${c.bgOrange} 16%, transparent); color: color-mix(in srgb, ${c.bgOrange} 82%, ${c.fgPrimary}); }
83
+ & .recordstable-muted { color: ${c.fgMuted}; }
84
+ & .recordstable-entity { display: flex; align-items: center; gap: ${c.space["1.5"]}; min-width: 0; color: ${c.fgPrimary}; font-weight: ${c.weight.medium}; text-decoration: none; }
85
+ & .recordstable-entity:hover .recordstable-entity-name { text-decoration: underline; }
86
+ & .recordstable-entity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
87
+ & button.recordstable-entity-name--link { margin: 0; padding: 0; border: none; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; max-width: 100%; }
88
+ & .recordstable-fav { width: ${c.size.icon}; height: ${c.size.icon}; border-radius: ${c.radius.sm}; flex-shrink: 0; object-fit: cover; background: ${c.bgRaised}; }
89
+ & .recordstable-open { position: absolute; right: ${c.space["1"]}; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: none; border-radius: ${c.radius.sm}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderDefault}; color: ${c.fgMuted}; cursor: pointer; opacity: 0; transition: opacity .12s, background-color .12s; z-index: 3; }
90
+ & .recordstable-open:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
91
+ & tbody tr:hover .recordstable-open { opacity: 1; }
92
+ & .recordstable-link { color: ${c.fgPrimary}; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
93
+ & .recordstable-link:hover { text-decoration: underline; }
94
+
95
+ /* inline edit input */
96
+ & .recordstable-edit { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0 ${c.space["2"]}; border: none; outline: 2px solid ${c.bgBrandSolid}; outline-offset: -2px; border-radius: ${c.radius.sm}; background: ${c.bgSurface}; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; z-index: 5; }
97
+ & .recordstable-edit--num { text-align: right; font-variant-numeric: tabular-nums; }
98
+
99
+ /* selection / hover / sticky */
100
+ & .recordstable-col-check { width: 40px; min-width: 40px; padding: 0; }
101
+ & .recordstable-check-inner { display: flex; align-items: center; justify-content: center; height: 100%; }
102
+ & .recordstable-col-check, & .recordstable-col-entity { position: sticky; z-index: 3; background: ${c.bgSurface}; }
103
+ & .recordstable-col-check { left: 0; }
104
+ & .recordstable-col-entity { left: 40px; clip-path: inset(0 -24px 0 0); transition: box-shadow .18s ease; }
105
+ & thead .recordstable-col-check, & thead .recordstable-col-entity { z-index: 4; }
106
+ /* soft shadow on the sticky column edge once the grid is scrolled horizontally */
107
+ & .recordstable-scroll[data-scrolled] .recordstable-col-entity { box-shadow: 10px 0 16px -10px rgba(28,40,64,0.16), 2px 0 3px -2px rgba(28,40,64,0.10); }
108
+ & tbody tr:hover .recordstable-td { background: color-mix(in srgb, ${c.fgPrimary} 3%, ${c.bgSurface}); }
109
+ & tbody tr[data-selected] .recordstable-td { background: color-mix(in srgb, ${c.bgBrandSolid} 6%, ${c.bgSurface}); }
110
+ & .recordstable-th:last-child, & .recordstable-td:last-child { border-right: none; }
111
+
112
+ /* add-row footer */
113
+ & .recordstable-addrow { display: flex; align-items: center; gap: ${c.space["2"]}; width: 100%; height: ${c.size.tableRow}; padding: 0 ${c.space["2"]}; border: none; border-top: 1px solid ${c.borderSubtle}; background: ${c.bgSurface}; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.lg}; cursor: pointer; }
114
+ & .recordstable-addrow:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
115
+ /* zero-row empty state — centred in the body region (headers + summary stay) */
116
+ & .recordstable-empty { display: flex; align-items: center; justify-content: center; min-height: 320px; padding: ${c.space["8"]} ${c.space["4"]}; }
117
+
118
+ /* summary footer — per-column aggregation, sticky to the bottom */
119
+ & .recordstable-sum { position: sticky; bottom: 0; z-index: 2; height: ${c.size.tableRow}; padding: 0; border-top: 1px solid ${c.borderSubtle}; border-right: 1px solid ${c.borderSubtle}; background: ${c.bgSurface}; }
120
+ & tfoot .recordstable-col-check, & tfoot .recordstable-col-entity { position: sticky; bottom: 0; z-index: 3; }
121
+ & .recordstable-sum:last-child { border-right: none; }
122
+ & .recordstable-sum-btn { display: flex; align-items: center; justify-content: flex-end; gap: ${c.space["1.5"]}; width: 100%; height: 100%; margin: 0; padding: 0 ${c.space["3"]}; border: none; background: none; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; cursor: pointer; white-space: nowrap; overflow: hidden; }
123
+ & .recordstable-sum-btn:hover { background: ${c.bgRaised}; }
124
+ & .recordstable-sum-label { color: color-mix(in srgb, ${c.fgPrimary} 45%, transparent); text-transform: capitalize; }
125
+ & .recordstable-sum-value { color: ${c.fgPrimary}; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
126
+ & .recordstable-sumgroup { width: 100%; height: 100%; }
127
+ & .recordstable-pin { flex-shrink: 0; margin-left: ${c.space["1"]}; color: ${c.bgWarning}; fill: color-mix(in srgb, ${c.bgWarning} 35%, transparent); }
128
+ & .recordstable-sum-btn[data-empty] { opacity: 0; justify-content: flex-start; }
129
+ & .recordstable-sum-btn[data-empty]:hover { opacity: 1; }
130
+
131
+ /* bulk action bar lives in its own component now — see components/bulkbar */
132
+ & .recordstable-bulk-sep { width: 1px; height: 20px; margin: 0 ${c.space["0.5"]}; background: ${c.borderSubtle}; }
133
+ & .recordstable-bulk-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: none; border-radius: ${c.radius.md}; background: transparent; color: ${c.fgMuted}; cursor: pointer; }
134
+ & .recordstable-bulk-close:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
135
+ `,
136
+ variants: {},
137
+ defaultVariants: {},
138
+ compoundVariants: [],
139
+ });
140
+ export const recordstableRecipe = Object.assign(resolveRecipe(config), {
141
+ config,
142
+ meta: {
143
+ row: {
144
+ height: "36px",
145
+ gridLine: "1px",
146
+ },
147
+ },
148
+ });
149
+ export default config;
@@ -0,0 +1,2 @@
1
+ export { RichTextEditor, } from "./richtext.js";
2
+ export { richtextRecipe } from "./richtext.recipe.js";
@@ -0,0 +1,111 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Bold, Heading1, Heading2, Italic, Link2, List, ListOrdered, Quote, Strikethrough, Underline, } from "lucide-react";
3
+ import * as React from "react";
4
+ import { richtextRecipe } from "./richtext.recipe.js";
5
+ const exec = (cmd, value) => document.execCommand(cmd, false, value);
6
+ /**
7
+ * A block rich-text editor — measured from Attio's Notes editor. A large title,
8
+ * a prose body (headings, lists, quote, marks, links), and a floating toolbar
9
+ * that appears over a text selection. Built on contentEditable, dependency-free.
10
+ * Uncontrolled: seed with `defaultTitle`/`defaultHtml`, read via `onChange`.
11
+ */
12
+ export function RichTextEditor({ defaultTitle = "", defaultHtml = "", titlePlaceholder = "Untitled", placeholder = "Start writing, or press a toolbar button…", onChange, className, }) {
13
+ const titleRef = React.useRef(null);
14
+ const bodyRef = React.useRef(null);
15
+ const [bar, setBar] = React.useState(null);
16
+ const [active, setActive] = React.useState({});
17
+ const syncEmpty = (el) => {
18
+ if (el)
19
+ el.toggleAttribute("data-empty", (el.textContent ?? "") === "");
20
+ };
21
+ const emit = React.useCallback(() => {
22
+ onChange?.({
23
+ title: titleRef.current?.textContent ?? "",
24
+ html: bodyRef.current?.innerHTML ?? "",
25
+ });
26
+ }, [onChange]);
27
+ // seed the uncontrolled editable nodes once
28
+ // biome-ignore lint/correctness/useExhaustiveDependencies: seed once on mount
29
+ React.useEffect(() => {
30
+ if (titleRef.current)
31
+ titleRef.current.textContent = defaultTitle;
32
+ if (bodyRef.current)
33
+ bodyRef.current.innerHTML = defaultHtml;
34
+ syncEmpty(titleRef.current);
35
+ syncEmpty(bodyRef.current);
36
+ }, []);
37
+ const blockTag = () => {
38
+ const sel = window.getSelection();
39
+ let node = sel?.anchorNode;
40
+ while (node && node !== bodyRef.current) {
41
+ if (node.nodeType === 1 &&
42
+ /^(H1|H2|H3|BLOCKQUOTE|LI)$/.test(node.tagName))
43
+ return node.tagName.toLowerCase();
44
+ node = node.parentElement;
45
+ }
46
+ return "p";
47
+ };
48
+ // biome-ignore lint/correctness/useExhaustiveDependencies: blockTag only reads stable refs
49
+ const updateBar = React.useCallback(() => {
50
+ const sel = window.getSelection();
51
+ const body = bodyRef.current;
52
+ if (!sel ||
53
+ sel.isCollapsed ||
54
+ sel.rangeCount === 0 ||
55
+ !body ||
56
+ !body.contains(sel.anchorNode)) {
57
+ setBar(null);
58
+ return;
59
+ }
60
+ const rect = sel.getRangeAt(0).getBoundingClientRect();
61
+ if (rect.width === 0 && rect.height === 0) {
62
+ setBar(null);
63
+ return;
64
+ }
65
+ setBar({ x: rect.left + rect.width / 2, y: rect.top - 8 });
66
+ const tag = blockTag();
67
+ setActive({
68
+ bold: document.queryCommandState("bold"),
69
+ italic: document.queryCommandState("italic"),
70
+ underline: document.queryCommandState("underline"),
71
+ strikeThrough: document.queryCommandState("strikeThrough"),
72
+ h1: tag === "h1",
73
+ h2: tag === "h2",
74
+ ul: document.queryCommandState("insertUnorderedList"),
75
+ ol: document.queryCommandState("insertOrderedList"),
76
+ blockquote: tag === "blockquote",
77
+ });
78
+ }, []);
79
+ React.useEffect(() => {
80
+ const h = () => updateBar();
81
+ document.addEventListener("selectionchange", h);
82
+ return () => document.removeEventListener("selectionchange", h);
83
+ }, [updateBar]);
84
+ const run = (cmd, value) => {
85
+ bodyRef.current?.focus();
86
+ exec(cmd, value);
87
+ updateBar();
88
+ syncEmpty(bodyRef.current);
89
+ emit();
90
+ };
91
+ const toggleBlock = (tag) => {
92
+ run("formatBlock", blockTag() === tag ? "p" : tag);
93
+ };
94
+ const addLink = () => {
95
+ const url = window.prompt("Link URL");
96
+ if (url)
97
+ run("createLink", url);
98
+ };
99
+ // mousedown on the toolbar must not clear the selection
100
+ const keepSel = (e) => e.preventDefault();
101
+ const tool = (key, label, icon, onClick) => (_jsx("button", { type: "button", className: "rte-tool", "aria-label": label, "aria-pressed": !!active[key], "data-active": active[key] ? "" : undefined, onMouseDown: keepSel, onClick: onClick, children: icon }));
102
+ const ic = { size: 15, strokeWidth: 2 };
103
+ return (_jsxs("div", { className: richtextRecipe({ className }), children: [_jsx("div", { ref: titleRef, className: "rte-title", contentEditable: true, suppressContentEditableWarning: true, role: "textbox", tabIndex: 0, "aria-label": "Title", "data-placeholder": titlePlaceholder, onInput: () => {
104
+ syncEmpty(titleRef.current);
105
+ emit();
106
+ } }), _jsx("div", { ref: bodyRef, className: "rte-body", contentEditable: true, suppressContentEditableWarning: true, role: "textbox", tabIndex: 0, "aria-multiline": "true", "aria-label": "Note body", "data-placeholder": placeholder, onInput: () => {
107
+ syncEmpty(bodyRef.current);
108
+ emit();
109
+ }, onMouseUp: updateBar, onKeyUp: updateBar }), bar && (_jsxs("div", { className: "rte-toolbar", style: { left: bar.x, top: bar.y }, children: [tool("bold", "Bold", _jsx(Bold, { ...ic }), () => run("bold")), tool("italic", "Italic", _jsx(Italic, { ...ic }), () => run("italic")), tool("underline", "Underline", _jsx(Underline, { ...ic }), () => run("underline")), tool("strikeThrough", "Strikethrough", _jsx(Strikethrough, { ...ic }), () => run("strikeThrough")), tool("link", "Link", _jsx(Link2, { ...ic }), addLink), _jsx("span", { className: "rte-tool-sep" }), tool("h1", "Heading 1", _jsx(Heading1, { ...ic }), () => toggleBlock("h1")), tool("h2", "Heading 2", _jsx(Heading2, { ...ic }), () => toggleBlock("h2")), tool("ul", "Bullet list", _jsx(List, { ...ic }), () => run("insertUnorderedList")), tool("ol", "Numbered list", _jsx(ListOrdered, { ...ic }), () => run("insertOrderedList")), tool("blockquote", "Quote", _jsx(Quote, { ...ic }), () => toggleBlock("blockquote"))] }))] }));
110
+ }
111
+ RichTextEditor.displayName = "RichTextEditor";
@@ -0,0 +1,40 @@
1
+ import { defineRecipe, resolveRecipe } from "../../core/index.js";
2
+ import { contract as c } from "../../tokens/index.js";
3
+ // A block rich-text editor — measured from Attio's Notes editor: a large 32/36
4
+ // title, a 14/20 prose body (headings, lists, quote, code, marks, links), and a
5
+ // floating selection toolbar. Built on contentEditable so it stays dependency-
6
+ // free. Placeholders show via [data-empty]::before.
7
+ const config = defineRecipe({
8
+ name: "richtext",
9
+ base: `display: flex; flex-direction: column; box-sizing: border-box; font-family: ${c.font.sans}; color: ${c.fgPrimary};
10
+ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
11
+
12
+ & .rte-title { font-size: 32px; line-height: 36px; font-weight: ${c.weight.semibold}; letter-spacing: -0.6px; color: ${c.fgPrimary}; outline: none; }
13
+ & .rte-title[data-empty]::before { content: attr(data-placeholder); color: color-mix(in srgb, ${c.fgPrimary} 28%, transparent); pointer-events: none; }
14
+
15
+ & .rte-body { margin-top: ${c.space["3"]}; font-size: ${c.text.lg}; line-height: 20px; color: ${c.fgPrimary}; outline: none; }
16
+ & .rte-body[data-empty]::before { content: attr(data-placeholder); color: color-mix(in srgb, ${c.fgPrimary} 28%, transparent); pointer-events: none; }
17
+ & .rte-body > * { margin: 0; }
18
+ & .rte-body > * + * { margin-top: ${c.space["2"]}; }
19
+ & .rte-body h1 { font-size: ${c.text.xl}; line-height: 28px; font-weight: ${c.weight.semibold}; letter-spacing: -0.3px; margin-top: ${c.space["4"]}; }
20
+ & .rte-body h2 { font-size: 17px; line-height: 24px; font-weight: ${c.weight.semibold}; letter-spacing: -0.2px; margin-top: ${c.space["3"]}; }
21
+ & .rte-body h3 { font-size: ${c.text.lg}; line-height: 20px; font-weight: ${c.weight.semibold}; margin-top: ${c.space["2.5"]}; }
22
+ & .rte-body ul, & .rte-body ol { padding-left: ${c.space["5"]}; }
23
+ & .rte-body li { margin-top: ${c.space["1"]}; }
24
+ & .rte-body blockquote { padding-left: ${c.space["3"]}; border-left: 2px solid ${c.borderDefault}; color: ${c.fgMuted}; }
25
+ & .rte-body code { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: ${c.text.md}; padding: 1px ${c.space["1"]}; border-radius: ${c.radius.sm}; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); }
26
+ & .rte-body a { color: ${c.bgBrandSolid}; text-decoration: underline; text-underline-offset: 2px; }
27
+ & .rte-body strong { font-weight: ${c.weight.semibold}; }
28
+
29
+ & .rte-toolbar { position: fixed; z-index: 70; display: inline-flex; align-items: center; gap: 2px; padding: ${c.space["0.5"]}; border-radius: ${c.radius.md}; background: #20242c; box-shadow: 0 8px 28px -6px rgba(0,0,0,0.36), 0 2px 6px -2px rgba(0,0,0,0.24); transform: translate(-50%, -100%); opacity: 1; transition: opacity 0.1s ease; }
30
+ & .rte-toolbar { @starting-style { opacity: 0; } }
31
+ & .rte-tool { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; margin: 0; border: none; border-radius: ${c.radius.sm}; background: none; color: rgba(255,255,255,0.86); cursor: pointer; transition: background-color .1s; }
32
+ & .rte-tool:hover { background: rgba(255,255,255,0.12); color: #fff; }
33
+ & .rte-tool[data-active] { color: ${c.bgBrandSolid}; }
34
+ & .rte-tool-sep { width: 1px; height: 16px; margin: 0 2px; background: rgba(255,255,255,0.16); }`,
35
+ variants: {},
36
+ defaultVariants: {},
37
+ compoundVariants: [],
38
+ });
39
+ export const richtextRecipe = resolveRecipe(config);
40
+ export default config;
@@ -0,0 +1,2 @@
1
+ export { SettingsSection, } from "./settingssection.js";
2
+ export { settingssectionRecipe } from "./settingssection.recipe.js";
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { settingssectionRecipe } from "./settingssection.recipe.js";
3
+ /**
4
+ * A settings section — measured from Attio's Settings pages. A title + optional
5
+ * subtitle and trailing action, then a gapped stack of rows (pair with
6
+ * FormField). Compose several inside a settings content pane.
7
+ */
8
+ export function SettingsSection({ title, description, action, children, className, }) {
9
+ return (_jsxs("section", { className: settingssectionRecipe({ className }), children: [_jsxs("div", { className: "settingssection-head", children: [_jsxs("div", { className: "settingssection-heading", children: [_jsx("div", { className: "settingssection-title", children: title }), description != null && (_jsx("div", { className: "settingssection-sub", children: description }))] }), action != null && (_jsx("div", { className: "settingssection-action", children: action }))] }), children != null && (_jsx("div", { className: "settingssection-body", children: children }))] }));
10
+ }
11
+ SettingsSection.displayName = "SettingsSection";
@@ -0,0 +1,20 @@
1
+ import { defineRecipe, resolveRecipe } from "../../core/index.js";
2
+ import { contract as c } from "../../tokens/index.js";
3
+ // A settings section — measured from Attio's Settings pages: a 16px/600 title
4
+ // with an optional subtitle, then a stack of rows (form fields, toggles…). Rows
5
+ // gap evenly; an optional trailing action sits on the title row.
6
+ const config = defineRecipe({
7
+ name: "settingssection",
8
+ base: `display: flex; flex-direction: column; box-sizing: border-box; font-family: ${c.font.sans};
9
+ & .settingssection-head { display: flex; align-items: flex-start; gap: ${c.space["2"]}; }
10
+ & .settingssection-heading { flex: 1; min-width: 0; }
11
+ & .settingssection-title { font-size: ${c.text.xl}; line-height: 24px; font-weight: ${c.weight.semibold}; letter-spacing: -0.2px; color: ${c.fgPrimary}; }
12
+ & .settingssection-sub { margin-top: ${c.space["0.5"]}; font-size: ${c.text.md}; line-height: 18px; color: ${c.fgMuted}; }
13
+ & .settingssection-action { flex-shrink: 0; }
14
+ & .settingssection-body { display: flex; flex-direction: column; gap: ${c.space["4"]}; margin-top: ${c.space["3"]}; }`,
15
+ variants: {},
16
+ defaultVariants: {},
17
+ compoundVariants: [],
18
+ });
19
+ export const settingssectionRecipe = resolveRecipe(config);
20
+ export default config;
@@ -0,0 +1,2 @@
1
+ export { SettingsShell, } from "./settingsshell.js";
2
+ export { settingsshellRecipe } from "./settingsshell.recipe.js";
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ChevronLeft, Search } from "lucide-react";
3
+ import * as React from "react";
4
+ import { settingsshellRecipe } from "./settingsshell.recipe.js";
5
+ /**
6
+ * The Settings layout — measured from Attio's Settings. A left nav (back header,
7
+ * search, grouped items) beside a scrolling content pane. The search filters the
8
+ * nav by label. Fills the height its container gives it.
9
+ */
10
+ export function SettingsShell({ title = "Settings", onBack, groups, activeItem, onSelect, searchable = true, searchPlaceholder = "Search settings…", children, className, }) {
11
+ const [query, setQuery] = React.useState("");
12
+ const q = query.trim().toLowerCase();
13
+ const filtered = q
14
+ ? groups
15
+ .map((g) => ({
16
+ ...g,
17
+ items: g.items.filter((i) => i.label.toLowerCase().includes(q)),
18
+ }))
19
+ .filter((g) => g.items.length > 0)
20
+ : groups;
21
+ return (_jsxs("div", { className: settingsshellRecipe({ className }), children: [_jsxs("nav", { className: "settingsshell-nav", "aria-label": "Settings", children: [_jsxs("button", { type: "button", className: "settingsshell-back", onClick: onBack, children: [_jsx(ChevronLeft, { size: 16, strokeWidth: 2 }), title] }), searchable && (_jsxs("div", { className: "settingsshell-search", children: [_jsx(Search, { size: 15, strokeWidth: 1.75 }), _jsx("input", { type: "text", placeholder: searchPlaceholder, "aria-label": searchPlaceholder, value: query, onChange: (e) => setQuery(e.target.value) })] })), _jsx("div", { className: "settingsshell-groups", children: filtered.length === 0 ? (_jsx("div", { className: "settingsshell-empty", children: "No settings found" })) : (filtered.map((g, gi) => (_jsxs("div", { className: "settingsshell-group", children: [g.label != null && (_jsx("div", { className: "settingsshell-group-label", children: g.label })), g.items.map((it) => (_jsxs("button", { type: "button", className: "settingsshell-item", "aria-current": it.id === activeItem ? "page" : undefined, "data-active": it.id === activeItem ? "" : undefined, onClick: () => onSelect(it.id), children: [it.icon, _jsx("span", { className: "settingsshell-item-label", children: it.label })] }, it.id)))] }, gi)))) })] }), _jsx("div", { className: "settingsshell-content", children: children })] }));
22
+ }
23
+ SettingsShell.displayName = "SettingsShell";
@@ -0,0 +1,38 @@
1
+ import { defineRecipe, resolveRecipe } from "../../core/index.js";
2
+ import { contract as c } from "../../tokens/index.js";
3
+ // The Settings layout — measured from Attio's Settings: a 256px left nav with a
4
+ // back header, a search field, and grouped nav items (active row raised), beside
5
+ // a scrolling content pane. Sits inside whatever height its container gives it.
6
+ const config = defineRecipe({
7
+ name: "settingsshell",
8
+ base: `display: flex; min-height: 0; box-sizing: border-box; font-family: ${c.font.sans}; color: ${c.fgPrimary};
9
+ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
10
+
11
+ & .settingsshell-nav { display: flex; flex-direction: column; width: 256px; flex-shrink: 0; min-height: 0; padding: ${c.space["3"]}; border-right: 1px solid ${c.borderSubtle}; }
12
+ & .settingsshell-back { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; height: 28px; padding: 0 ${c.space["1"]}; margin: 0 0 ${c.space["2"]}; border: none; background: none; font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; cursor: pointer; border-radius: ${c.radius.md}; }
13
+ & .settingsshell-back svg { color: ${c.fgMuted}; }
14
+ & .settingsshell-back:hover svg { color: ${c.fgPrimary}; }
15
+
16
+ & .settingsshell-search { display: flex; align-items: center; gap: ${c.space["2"]}; height: 32px; margin-bottom: ${c.space["2"]}; padding: 0 ${c.space["2.5"]}; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderDefault}; color: ${c.fgMuted}; }
17
+ & .settingsshell-search svg { flex-shrink: 0; }
18
+ & .settingsshell-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; }
19
+ & .settingsshell-search input::placeholder { color: ${c.fgMuted}; }
20
+
21
+ & .settingsshell-groups { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: ${c.space["2.5"]}; }
22
+ & .settingsshell-group { display: flex; flex-direction: column; gap: 1px; }
23
+ & .settingsshell-group-label { padding: ${c.space["1"]} ${c.space["2"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
24
+ & .settingsshell-item { display: flex; align-items: center; gap: ${c.space["2"]}; height: 30px; padding: 0 ${c.space["2"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: none; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; text-align: left; cursor: pointer; transition: background-color .12s; }
25
+ & .settingsshell-item svg { flex-shrink: 0; color: ${c.fgMuted}; }
26
+ & .settingsshell-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
27
+ & .settingsshell-item:hover { background: ${c.bgRaised}; }
28
+ & .settingsshell-item[data-active] { background: ${c.bgRaised}; font-weight: ${c.weight.medium}; }
29
+ & .settingsshell-item[data-active] svg { color: ${c.fgPrimary}; }
30
+ & .settingsshell-empty { padding: ${c.space["3"]} ${c.space["2"]}; font-size: ${c.text.md}; color: ${c.fgMuted}; }
31
+
32
+ & .settingsshell-content { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; padding: ${c.space["6"]} ${c.space["8"]}; }`,
33
+ variants: {},
34
+ defaultVariants: {},
35
+ compoundVariants: [],
36
+ });
37
+ export const settingsshellRecipe = resolveRecipe(config);
38
+ export default config;
@@ -0,0 +1,2 @@
1
+ export { ATTIO_SIDEBAR_CHATS_SECTION, ATTIO_SIDEBAR_FOOTER, ATTIO_SIDEBAR_ITEMS, ATTIO_SIDEBAR_LISTS_SECTION, ATTIO_SIDEBAR_RECORDS_SECTION, ATTIO_SIDEBAR_WORKSPACE, Sidebar, } from "./sidebar.js";
2
+ export { sidebarRecipe } from "./sidebar.recipe.js";
@@ -0,0 +1,112 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Building2, ChartNoAxesColumn, ChevronDown, CircleDollarSign, FileText, House, Inbox, LayoutGrid, Mail, MessageSquare, PanelLeft, Phone, Search, Send, SquareCheck, User, UserPlus, Users, Waypoints, } from "lucide-react";
3
+ import * as React from "react";
4
+ import { Avatar } from "../../components/avatar/index.js";
5
+ import { Badge } from "../../components/badge/index.js";
6
+ import { Button } from "../../components/button/index.js";
7
+ import { Primitive } from "../../core/index.js";
8
+ import { Command } from "../command/index.js";
9
+ import { NavItem } from "../navitem/index.js";
10
+ import { sidebarRecipe } from "./sidebar.recipe.js";
11
+ const IconHome = ({ className }) => (_jsx(House, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
12
+ const IconTasks = ({ className }) => (_jsx(SquareCheck, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
13
+ const IconNotes = ({ className }) => (_jsx(FileText, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
14
+ const IconEmails = ({ className }) => (_jsx(Mail, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
15
+ const IconCalls = ({ className }) => (_jsx(Phone, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
16
+ const IconReports = ({ className }) => (_jsx(ChartNoAxesColumn, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
17
+ const IconSequences = ({ className }) => (_jsx(Send, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
18
+ const IconWorkflows = ({ className }) => (_jsx(Waypoints, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
19
+ const IconChevronDown = ({ className }) => (_jsx(ChevronDown, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
20
+ const IconSearch = ({ className }) => (_jsx(Search, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
21
+ const IconInbox = ({ className }) => (_jsx(Inbox, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
22
+ const IconInvite = ({ className }) => (_jsx(UserPlus, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
23
+ const IconChat = ({ className }) => (_jsx(MessageSquare, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
24
+ const IconCollapsePanel = ({ className }) => (_jsx(PanelLeft, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
25
+ const IconChevronMini = () => (_jsx(ChevronDown, { size: 12, strokeWidth: 1.75, "aria-hidden": "true" }));
26
+ const GlyphCompanies = () => (_jsx(Building2, { size: 12, color: "white", strokeWidth: 1.75, "aria-hidden": "true" }));
27
+ const GlyphPeople = () => (_jsx(User, { size: 12, color: "white", strokeWidth: 1.75, "aria-hidden": "true" }));
28
+ const GlyphDeals = () => (_jsx(CircleDollarSign, { size: 12, color: "white", strokeWidth: 1.75, "aria-hidden": "true" }));
29
+ const GlyphUsers = () => (_jsx(Users, { size: 12, color: "white", strokeWidth: 1.75, "aria-hidden": "true" }));
30
+ const GlyphWorkspaces = () => (_jsx(LayoutGrid, { size: 12, color: "white", strokeWidth: 1.75, "aria-hidden": "true" }));
31
+ /** The measured Attio workspace switcher — the default `workspace` prop. */
32
+ export const ATTIO_SIDEBAR_WORKSPACE = {
33
+ name: "techpartners",
34
+ avatarLabel: "T",
35
+ avatarTone: "cyan",
36
+ };
37
+ /** The measured Attio main nav — the default `items` prop. */
38
+ export const ATTIO_SIDEBAR_ITEMS = [
39
+ { label: "Home", icon: IconHome },
40
+ {
41
+ label: "Tasks",
42
+ icon: IconTasks,
43
+ active: true,
44
+ trailing: (_jsx(Badge, { tone: "brand", variant: "solid", size: "small", children: "1" })),
45
+ },
46
+ { label: "Notes", icon: IconNotes },
47
+ { label: "Emails", icon: IconEmails },
48
+ { label: "Calls", icon: IconCalls },
49
+ { label: "Reports", icon: IconReports },
50
+ { label: "Sequences", icon: IconSequences },
51
+ { label: "Workflows", icon: IconWorkflows },
52
+ ];
53
+ /** The measured Attio Records section — the default `recordsSection` prop. */
54
+ export const ATTIO_SIDEBAR_RECORDS_SECTION = {
55
+ label: "Records",
56
+ items: [
57
+ { label: "Companies", tone: "brand", glyph: GlyphCompanies },
58
+ { label: "People", tone: "brand", glyph: GlyphPeople },
59
+ { label: "Deals", tone: "orange", glyph: GlyphDeals },
60
+ { label: "Users", tone: "cyan", glyph: GlyphUsers },
61
+ { label: "Workspaces", tone: "purple", glyph: GlyphWorkspaces },
62
+ ],
63
+ };
64
+ /** The measured Attio Lists section — the default `listsSection` prop. */
65
+ export const ATTIO_SIDEBAR_LISTS_SECTION = {
66
+ label: "Lists",
67
+ newListLabel: "+ New list",
68
+ };
69
+ /** The measured Attio Chats section — the default `chatsSection` prop. */
70
+ export const ATTIO_SIDEBAR_CHATS_SECTION = {
71
+ label: "Chats",
72
+ items: [{ label: "In-app notification for deal wins", icon: IconChat }],
73
+ };
74
+ /** The measured Attio footer copy — the default `footer` prop. */
75
+ export const ATTIO_SIDEBAR_FOOTER = {
76
+ gettingStartedLabel: "Getting started 1/6",
77
+ inviteLabel: "Invite team members",
78
+ trialText: "13 days left on trial!",
79
+ trialActionLabel: "Keep Pro",
80
+ };
81
+ function SectionHeader({ label, open, onToggle, }) {
82
+ return (_jsxs("button", { type: "button", className: "sidebar-section-header", "data-collapsed": open ? undefined : "", "aria-expanded": open, onClick: onToggle, children: [_jsx(IconChevronMini, {}), _jsx("span", { children: label })] }));
83
+ }
84
+ export const Sidebar = React.forwardRef(({ className, asChild, onToggleCollapse, workspace = ATTIO_SIDEBAR_WORKSPACE, items = ATTIO_SIDEBAR_ITEMS, recordsSection = ATTIO_SIDEBAR_RECORDS_SECTION, listsSection = ATTIO_SIDEBAR_LISTS_SECTION, chatsSection = ATTIO_SIDEBAR_CHATS_SECTION, footer = ATTIO_SIDEBAR_FOOTER, ...props }, ref) => {
85
+ const [collapsedSections, setCollapsedSections] = React.useState(() => new Set());
86
+ const [commandOpen, setCommandOpen] = React.useState(false);
87
+ React.useEffect(() => {
88
+ function handleKeyDown(event) {
89
+ if ((event.metaKey || event.ctrlKey) &&
90
+ event.key.toLowerCase() === "k") {
91
+ event.preventDefault();
92
+ setCommandOpen(true);
93
+ }
94
+ }
95
+ document.addEventListener("keydown", handleKeyDown);
96
+ return () => document.removeEventListener("keydown", handleKeyDown);
97
+ }, []);
98
+ const toggleSection = React.useCallback((key) => {
99
+ setCollapsedSections((prev) => {
100
+ const next = new Set(prev);
101
+ if (next.has(key)) {
102
+ next.delete(key);
103
+ }
104
+ else {
105
+ next.add(key);
106
+ }
107
+ return next;
108
+ });
109
+ }, []);
110
+ return (_jsxs(Primitive.div, { ref: ref, asChild: asChild, className: sidebarRecipe({ className }), ...props, children: [_jsxs("div", { className: "sidebar-ws", children: [_jsx(Avatar, { size: "lg", shape: "rounded", tone: workspace.avatarTone, children: workspace.avatarLabel }), _jsx("span", { className: "sidebar-ws-name", children: workspace.name }), _jsx(IconChevronDown, {}), _jsx(Button, { intent: "ghost", size: "sm", shape: "icon", className: "sidebar-ws-collapse", "aria-label": "Collapse sidebar", onClick: onToggleCollapse, children: _jsx(IconCollapsePanel, {}) })] }), _jsxs("div", { className: "sidebar-searchrow", children: [_jsxs("button", { type: "button", className: "sidebar-search", onClick: () => setCommandOpen(true), children: [_jsx(IconSearch, {}), _jsx("span", { className: "sidebar-search-label", children: "Search" }), _jsx("span", { className: "sidebar-search-kbd", children: "\u2318K" })] }), _jsx(Button, { intent: "neutral", size: "sm", shape: "icon", "aria-label": "Inbox", children: _jsx(IconInbox, {}) })] }), _jsx("div", { className: "sidebar-divider" }), _jsx("div", { className: "sidebar-section", children: items.map(({ label, icon: ItemIcon, active, trailing }) => (_jsx(NavItem, { href: "#", active: active, icon: _jsx(ItemIcon, {}), trailing: trailing, children: label }, label))) }), _jsx(SectionHeader, { label: recordsSection.label, open: !collapsedSections.has("records"), onToggle: () => toggleSection("records") }), _jsx("div", { className: "sidebar-section", "data-collapsed": collapsedSections.has("records") ? "" : undefined, children: recordsSection.items.map(({ label, tone, glyph: Glyph }) => (_jsx(NavItem, { href: "#", icon: _jsx(Avatar, { size: "sm", shape: "rounded", tone: tone, children: _jsx(Glyph, {}) }), children: label }, label))) }), _jsx(SectionHeader, { label: listsSection.label, open: !collapsedSections.has("lists"), onToggle: () => toggleSection("lists") }), _jsx("div", { className: "sidebar-section", "data-collapsed": collapsedSections.has("lists") ? "" : undefined, children: _jsx("button", { type: "button", className: "sidebar-newlist", children: listsSection.newListLabel }) }), _jsx(SectionHeader, { label: chatsSection.label, open: !collapsedSections.has("chats"), onToggle: () => toggleSection("chats") }), _jsx("div", { className: "sidebar-section", "data-collapsed": collapsedSections.has("chats") ? "" : undefined, children: chatsSection.items.map(({ label, icon: ItemIcon }) => (_jsx(NavItem, { href: "#", icon: _jsx(ItemIcon, {}), children: label }, label))) }), _jsxs("div", { className: "sidebar-footer", children: [_jsx(Button, { intent: "neutral", size: "sm", className: "sidebar-pill", children: footer.gettingStartedLabel }), _jsx(NavItem, { href: "#", icon: _jsx(IconInvite, {}), children: footer.inviteLabel }), _jsx("div", { className: "sidebar-divider" }), _jsxs("div", { className: "sidebar-trial", children: [_jsx("span", { children: footer.trialText }), _jsx(Button, { intent: "neutral", size: "sm", children: footer.trialActionLabel })] })] }), _jsx(Command, { open: commandOpen, onOpenChange: setCommandOpen })] }));
111
+ });
112
+ Sidebar.displayName = "Sidebar";
@@ -0,0 +1,18 @@
1
+ import { defineRecipe, resolveRecipe } from "../../core/index.js";
2
+ import { contract as c } from "../../tokens/index.js";
3
+ const config = defineRecipe({
4
+ name: "sidebar",
5
+ base: `box-sizing: border-box; display: flex; flex-direction: column; width: 275px; height: 100%; background: ${c.bgSidebar}; border-right: 1px solid ${c.borderSubtle}; padding: ${c.space["2"]}; font-family: ${c.font.sans}; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-y: auto; & .sidebar-section { display: flex; flex-direction: column; gap: ${c.space.px}; margin-top: ${c.space["2"]}; } & .sidebar-section[data-collapsed] { display: none; } & .sidebar-label { font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; padding: ${c.space["1.5"]} ${c.space["2"]} ${c.space["0.5"]}; } & .sidebar-section-header { display: flex; align-items: center; gap: ${c.space["1"]}; width: 100%; margin: 0; border: none; background: none; padding: ${c.space["1.5"]} ${c.space["2"]} ${c.space["0.5"]}; font-family: ${c.font.sans}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; cursor: pointer; } & .sidebar-section-header svg { flex-shrink: 0; transition: transform .15s ease; } & .sidebar-section-header[data-collapsed] svg { transform: rotate(-90deg); } & .sidebar-ws { display: flex; align-items: center; gap: ${c.space["2"]}; height: ${c.size.header}; padding: 0 ${c.space["2"]}; border-radius: ${c.radius.lg}; cursor: pointer; transition: background-color 0.16s; } & .sidebar-ws:hover { background: color-mix(in srgb, ${c.fgPrimary} 5%, transparent); } & .sidebar-ws-name { font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } & .sidebar-ws-collapse { margin-left: auto; } & .sidebar-searchrow { display: flex; align-items: center; gap: ${c.space["1.5"]}; margin-top: ${c.space["2.5"]}; padding-right: ${c.space["2"]}; } & .sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: ${c.space["0.5"]}; } & .sidebar-trial { display: flex; align-items: center; justify-content: space-between; gap: ${c.space["2"]}; padding: ${c.space["1.5"]} ${c.space["2"]}; font-size: ${c.text.sm}; color: ${c.fgMuted}; } & .sidebar-search { box-sizing: border-box; flex: 1; min-width: 0; display: flex; align-items: center; gap: ${c.space["2"]}; height: ${c.size.row}; margin: 0; padding: 0 ${c.space["1"]} 0 ${c.space["2"]}; border: none; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.ringNeutral}, 0 0 2px rgba(28,40,64,0.18), 0 1px 3px rgba(0,0,0,0.04); color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.lg}; text-align: left; cursor: pointer; transition: background-color 0.14s; } & .sidebar-search:hover { background: ${c.bgRaised}; } & .sidebar-search-label { flex: 1; color: ${c.fgPrimary}; font-weight: ${c.weight.medium}; } & .sidebar-search-kbd { margin-left: auto; display: inline-flex; align-items: center; height: 18px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.sm}; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 8%, transparent); color: color-mix(in srgb, ${c.fgPrimary} 50%, transparent); font-size: ${c.text.xs}; } & .sidebar-pill { border-radius: ${c.radius.full}; align-self: center; width: auto; height: 32px; padding-inline: ${c.space["4"]}; } & .sidebar-divider { height: 0; border: none; border-top: 1px solid ${c.borderSubtle}; margin: ${c.space["2"]} calc(-1 * ${c.space["2"]}) 0; } & .sidebar-newlist { box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 100%; height: ${c.size.row}; border-radius: ${c.radius.md}; border: 1px dashed ${c.borderDefault}; background: transparent; color: ${c.fgMuted}; font-family: ${c.font.sans}; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; cursor: pointer; } & .sidebar-newlist:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }`,
6
+ variants: {},
7
+ defaultVariants: {},
8
+ compoundVariants: [],
9
+ });
10
+ export const sidebarRecipe = Object.assign(resolveRecipe(config), {
11
+ config,
12
+ meta: {
13
+ container: {
14
+ width: "275px",
15
+ },
16
+ },
17
+ });
18
+ export default config;
@@ -0,0 +1,2 @@
1
+ export { TaskList, } from "./tasklist.js";
2
+ export { tasklistRecipe } from "./tasklist.recipe.js";
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { tasklistRecipe } from "./tasklist.recipe.js";
3
+ function Row({ task, onToggle, }) {
4
+ return (_jsxs("div", { className: "tasklist-row", "data-done": task.done ? "" : undefined, children: [_jsx("input", { type: "checkbox", className: "tasklist-check", checked: !!task.done, "aria-label": task.done ? "Mark incomplete" : "Mark complete", onChange: () => onToggle?.(task.id, !task.done) }), _jsx("span", { className: "tasklist-title", children: task.title }), (task.due != null || task.meta != null) && (_jsxs("span", { className: "tasklist-meta", children: [task.due != null && (_jsx("span", { className: "tasklist-due", "data-overdue": task.overdue ? "" : undefined, children: task.due })), task.meta] }))] }));
5
+ }
6
+ /**
7
+ * A task list — measured from Attio's Tasks page. Optional group headers with a
8
+ * count, then rows of a round complete-checkbox + title + trailing meta.
9
+ * Completed rows strike through; overdue dates go red.
10
+ */
11
+ export function TaskList({ tasks, groups, onToggle, emptyLabel = "No tasks", className, }) {
12
+ const resolved = groups ?? (tasks?.length ? [{ label: null, tasks }] : []);
13
+ const total = resolved.reduce((s, g) => s + g.tasks.length, 0);
14
+ return (_jsx("div", { className: tasklistRecipe({ className }), children: total === 0 ? (_jsx("div", { className: "tasklist-empty", children: emptyLabel })) : (resolved.map((g, gi) => (_jsxs("div", { children: [g.label != null && (_jsxs("div", { className: "tasklist-group", children: [g.label, _jsx("span", { className: "tasklist-group-count", children: g.tasks.length })] })), g.tasks.map((t) => (_jsx(Row, { task: t, onToggle: onToggle }, t.id)))] }, gi)))) }));
15
+ }
16
+ TaskList.displayName = "TaskList";