@crisp-ui-kit/crisp 0.54.1 → 0.54.3

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 (171) hide show
  1. package/dist/chip.css +7 -1
  2. package/dist/chip.d.ts +2 -1
  3. package/dist/chip.layered.css +7 -1
  4. package/dist/cjs/components/chip/chip.js +3 -2
  5. package/dist/cjs/components/chip/chip.recipe.js +37 -1
  6. package/dist/cjs/components/datatable/datatable.js +490 -111
  7. package/dist/cjs/components/datatable/datatable.recipe.js +4 -0
  8. package/dist/cjs/components/emptystate/emptystate.js +3 -2
  9. package/dist/cjs/components/emptystate/emptystate.recipe.js +26 -1
  10. package/dist/cjs/components/mentionchip/index.js +7 -0
  11. package/dist/cjs/components/mentionchip/mentionchip.js +57 -0
  12. package/dist/cjs/components/mentionchip/mentionchip.recipe.js +38 -0
  13. package/dist/cjs/components/personchip/index.js +17 -0
  14. package/dist/cjs/components/personchip/personchip.js +50 -0
  15. package/dist/cjs/components/table/table.js +2 -2
  16. package/dist/cjs/components/table/table.recipe.js +15 -3
  17. package/dist/cjs/components/tabs/tabs.js +2 -2
  18. package/dist/cjs/components/tabs/tabs.recipe.js +30 -3
  19. package/dist/cjs/components/text/index.js +7 -0
  20. package/dist/cjs/components/text/text.js +55 -0
  21. package/dist/cjs/components/text/text.recipe.js +34 -0
  22. package/dist/cjs/core/floating-stack.js +18 -0
  23. package/dist/cjs/core/index.js +2 -1
  24. package/dist/cjs/index.js +8 -0
  25. package/dist/cjs/product/formdialog/formdialog.js +171 -0
  26. package/dist/cjs/product/formdialog/formdialog.recipe.js +26 -0
  27. package/dist/cjs/product/formdialog/index.js +8 -0
  28. package/dist/cjs/product/headerbar/headerbar.recipe.js +9 -1
  29. package/dist/cjs/product/importdialog/importdialog.js +134 -0
  30. package/dist/cjs/product/importdialog/importdialog.recipe.js +92 -0
  31. package/dist/cjs/product/importdialog/index.js +18 -0
  32. package/dist/cjs/product/recordpage/recordpage.recipe.js +10 -1
  33. package/dist/cjs/product/recordstable/recordstable.js +89 -6
  34. package/dist/cjs/product/richtext/richtext.recipe.js +26 -1
  35. package/dist/cjs/product/savedviews/index.js +7 -0
  36. package/dist/cjs/product/savedviews/savedviews.js +207 -0
  37. package/dist/cjs/product/savedviews/savedviews.recipe.js +103 -0
  38. package/dist/cjs/product/taskstable/index.js +7 -0
  39. package/dist/cjs/product/taskstable/taskstable.js +27 -0
  40. package/dist/cjs/product/taskstable/taskstable.recipe.js +47 -0
  41. package/dist/cjs/product/themepicker/index.js +17 -0
  42. package/dist/cjs/product/themepicker/themepicker.js +32 -0
  43. package/dist/cjs/product/themepicker/themepicker.recipe.js +98 -0
  44. package/dist/cjs/tokens/palette.js +30 -13
  45. package/dist/cjs/tokens/semantic.js +6 -0
  46. package/dist/datatable.css +20 -21
  47. package/dist/datatable.layered.css +20 -21
  48. package/dist/emptystate.css +15 -1
  49. package/dist/emptystate.d.ts +2 -2
  50. package/dist/emptystate.layered.css +15 -1
  51. package/dist/esm/components/chip/chip.js +3 -2
  52. package/dist/esm/components/chip/chip.recipe.js +37 -1
  53. package/dist/esm/components/datatable/datatable.js +489 -111
  54. package/dist/esm/components/datatable/datatable.recipe.js +4 -0
  55. package/dist/esm/components/emptystate/emptystate.js +4 -3
  56. package/dist/esm/components/emptystate/emptystate.recipe.js +26 -1
  57. package/dist/esm/components/emptystate/index.js +1 -1
  58. package/dist/esm/components/mentionchip/index.js +2 -0
  59. package/dist/esm/components/mentionchip/mentionchip.js +21 -0
  60. package/dist/esm/components/mentionchip/mentionchip.recipe.js +35 -0
  61. package/dist/esm/components/personchip/index.js +1 -0
  62. package/dist/esm/components/personchip/personchip.js +47 -0
  63. package/dist/esm/components/table/table.js +2 -2
  64. package/dist/esm/components/table/table.recipe.js +15 -3
  65. package/dist/esm/components/tabs/tabs.js +2 -2
  66. package/dist/esm/components/tabs/tabs.recipe.js +30 -3
  67. package/dist/esm/components/text/index.js +2 -0
  68. package/dist/esm/components/text/text.js +19 -0
  69. package/dist/esm/components/text/text.recipe.js +31 -0
  70. package/dist/esm/core/floating-stack.js +17 -0
  71. package/dist/esm/core/index.js +1 -1
  72. package/dist/esm/index.js +8 -0
  73. package/dist/esm/product/formdialog/formdialog.js +134 -0
  74. package/dist/esm/product/formdialog/formdialog.recipe.js +23 -0
  75. package/dist/esm/product/formdialog/index.js +2 -0
  76. package/dist/esm/product/headerbar/headerbar.recipe.js +9 -1
  77. package/dist/esm/product/importdialog/importdialog.js +97 -0
  78. package/dist/esm/product/importdialog/importdialog.recipe.js +89 -0
  79. package/dist/esm/product/importdialog/index.js +2 -0
  80. package/dist/esm/product/recordpage/recordpage.recipe.js +10 -1
  81. package/dist/esm/product/recordstable/recordstable.js +90 -8
  82. package/dist/esm/product/richtext/richtext.recipe.js +26 -1
  83. package/dist/esm/product/savedviews/index.js +2 -0
  84. package/dist/esm/product/savedviews/savedviews.js +171 -0
  85. package/dist/esm/product/savedviews/savedviews.recipe.js +100 -0
  86. package/dist/esm/product/taskstable/index.js +2 -0
  87. package/dist/esm/product/taskstable/taskstable.js +24 -0
  88. package/dist/esm/product/taskstable/taskstable.recipe.js +44 -0
  89. package/dist/esm/product/themepicker/index.js +1 -0
  90. package/dist/esm/product/themepicker/themepicker.js +29 -0
  91. package/dist/esm/product/themepicker/themepicker.recipe.js +95 -0
  92. package/dist/esm/tokens/palette.js +30 -13
  93. package/dist/esm/tokens/semantic.js +6 -0
  94. package/dist/formdialog.css +6 -0
  95. package/dist/formdialog.d.ts +7 -0
  96. package/dist/formdialog.layered.css +8 -0
  97. package/dist/headerbar.css +1 -1
  98. package/dist/headerbar.layered.css +1 -1
  99. package/dist/importdialog.css +38 -0
  100. package/dist/importdialog.d.ts +7 -0
  101. package/dist/importdialog.layered.css +40 -0
  102. package/dist/mentionchip.css +3 -0
  103. package/dist/mentionchip.d.ts +7 -0
  104. package/dist/mentionchip.layered.css +5 -0
  105. package/dist/native/tokens.d.ts +1 -1
  106. package/dist/native/tokens.js +14 -6
  107. package/dist/recordpage.css +13 -2
  108. package/dist/recordpage.layered.css +13 -2
  109. package/dist/richtext.css +11 -1
  110. package/dist/richtext.layered.css +11 -1
  111. package/dist/savedviews.css +78 -0
  112. package/dist/savedviews.d.ts +7 -0
  113. package/dist/savedviews.layered.css +80 -0
  114. package/dist/styles.css +287 -37
  115. package/dist/styles.layered.css +287 -37
  116. package/dist/table.css +15 -6
  117. package/dist/table.layered.css +15 -6
  118. package/dist/tabs.css +7 -1
  119. package/dist/tabs.d.ts +2 -2
  120. package/dist/tabs.layered.css +7 -1
  121. package/dist/taskstable.css +23 -0
  122. package/dist/taskstable.d.ts +7 -0
  123. package/dist/taskstable.layered.css +25 -0
  124. package/dist/text.css +9 -0
  125. package/dist/text.d.ts +7 -0
  126. package/dist/text.layered.css +11 -0
  127. package/dist/themepicker.css +27 -0
  128. package/dist/themepicker.d.ts +7 -0
  129. package/dist/themepicker.layered.css +29 -0
  130. package/dist/tokens.css +7 -3
  131. package/dist/tokens.json +14 -6
  132. package/dist/types/components/chip/chip.d.ts +32 -0
  133. package/dist/types/components/chip/chip.recipe.d.ts +31 -0
  134. package/dist/types/components/datatable/datatable.d.ts +39 -4
  135. package/dist/types/components/emptystate/emptystate.d.ts +29 -4
  136. package/dist/types/components/emptystate/emptystate.recipe.d.ts +2 -0
  137. package/dist/types/components/emptystate/index.d.ts +1 -1
  138. package/dist/types/components/mentionchip/index.d.ts +2 -0
  139. package/dist/types/components/mentionchip/mentionchip.d.ts +20 -0
  140. package/dist/types/components/mentionchip/mentionchip.recipe.d.ts +18 -0
  141. package/dist/types/components/personchip/index.d.ts +1 -0
  142. package/dist/types/components/personchip/personchip.d.ts +37 -0
  143. package/dist/types/components/table/table.d.ts +36 -0
  144. package/dist/types/components/tabs/tabs.d.ts +4 -2
  145. package/dist/types/components/tabs/tabs.recipe.d.ts +18 -3
  146. package/dist/types/components/text/index.d.ts +2 -0
  147. package/dist/types/components/text/text.d.ts +32 -0
  148. package/dist/types/components/text/text.recipe.d.ts +40 -0
  149. package/dist/types/core/floating-stack.d.ts +14 -0
  150. package/dist/types/core/index.d.ts +1 -1
  151. package/dist/types/index.d.ts +8 -0
  152. package/dist/types/product/formdialog/formdialog.d.ts +57 -0
  153. package/dist/types/product/formdialog/formdialog.recipe.d.ts +3 -0
  154. package/dist/types/product/formdialog/index.d.ts +2 -0
  155. package/dist/types/product/importdialog/importdialog.d.ts +86 -0
  156. package/dist/types/product/importdialog/importdialog.recipe.d.ts +3 -0
  157. package/dist/types/product/importdialog/index.d.ts +2 -0
  158. package/dist/types/product/recordstable/recordstable.d.ts +24 -2
  159. package/dist/types/product/savedviews/index.d.ts +2 -0
  160. package/dist/types/product/savedviews/savedviews.d.ts +55 -0
  161. package/dist/types/product/savedviews/savedviews.recipe.d.ts +3 -0
  162. package/dist/types/product/taskstable/index.d.ts +2 -0
  163. package/dist/types/product/taskstable/taskstable.d.ts +54 -0
  164. package/dist/types/product/taskstable/taskstable.recipe.d.ts +3 -0
  165. package/dist/types/product/themepicker/index.d.ts +1 -0
  166. package/dist/types/product/themepicker/themepicker.d.ts +21 -0
  167. package/dist/types/product/themepicker/themepicker.recipe.d.ts +3 -0
  168. package/dist/types/tokens/contract.d.ts +2 -0
  169. package/dist/types/tokens/palette.d.ts +11 -3
  170. package/dist/types/tokens/semantic.d.ts +6 -0
  171. package/package.json +41 -1
@@ -1,16 +1,25 @@
1
1
  @layer crisp-components {
2
2
  .crisp-table {
3
- display: block; box-sizing: border-box; background: var(--crisp-bg-surface);
4
- & .crisp-table-scroll { overflow-x: auto; }
3
+ display: block; box-sizing: border-box; background: var(--crisp-bg-surface); /* #554: both axes -- a consumer bounds the height via `scrollProps` (style/className on this element), and the header/footer below pin inside it exactly the way Attio's own grid does ("Both the header and
4
+ the summary row are sticky, on the scroll container rather than the
5
+ cells" -- docs/study/attio-table.md). Unbounded, `overflow: auto`
6
+ shows no vertical scrollbar and nothing sticks, so this is a no-op
7
+ for every existing consumer that never set a height. */
8
+ & .crisp-table-scroll { overflow: auto; }
5
9
  & table { width: 100%; border-collapse: separate; border-spacing: 0; font-family: var(--crisp-font-sans); font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); }
6
- /* #465: 12px, not crisp's old 8px -- measured on a live header cell
7
- (padding: 0 12px) and independently on a body cell's text inset (getBoundingClientRect delta from the cell edge). Matches ColumnCalc's own already-correct 12px trigger inset. */
10
+ /* #465: 12px, not crisp's old 8px -- measured on a live header cell (padding: 0 12px) and independently on a body cell's text inset
11
+ (getBoundingClientRect delta from the cell edge). Matches
12
+ ColumnCalc's own already-correct 12px trigger inset. */
8
13
  & th, & td { position: relative; height: var(--crisp-size-tableRow); padding: 0 var(--crisp-space-3); border-bottom: 1px solid var(--crisp-border-subtle); border-inline-end: 1px solid var(--crisp-border-subtle); text-align: start; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
9
- & th { height: var(--crisp-size-tableHeader); background: var(--crisp-bg-surface); border-top: 1px solid var(--crisp-border-subtle); font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); letter-spacing: -0.14px; color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); user-select: none; }
14
+ /* #554: sticky on the vertical axis, mirroring RecordsTable's own
15
+ `.crisp-recordstable-th`. z-index 2 sits above a plain body cell (auto)
16
+ and below a sticky-column corner cell (DataTable's `th[data-sticky]`, z-index 3), so the corner always wins. */
17
+ & th { position: sticky; top: 0; z-index: 2; height: var(--crisp-size-tableHeader); background: var(--crisp-bg-surface); border-top: 1px solid var(--crisp-border-subtle); font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); letter-spacing: -0.14px; color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); user-select: none; }
10
18
  & td { color: var(--crisp-fg-primary); background: var(--crisp-bg-surface); }
11
19
  & th:last-child, & td:last-child { border-inline-end: none; }
12
20
  & tbody tr:last-child td { border-bottom: none; }
13
- & tfoot td { border-top: 1px solid var(--crisp-border-subtle); border-bottom: 1px solid var(--crisp-border-subtle); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
21
+ /* #554: sticky to the bottom, mirroring `.crisp-recordstable-sum`. */
22
+ & tfoot td { position: sticky; bottom: 0; z-index: 2; border-top: 1px solid var(--crisp-border-subtle); border-bottom: 1px solid var(--crisp-border-subtle); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
14
23
  & caption { padding: var(--crisp-space-2) var(--crisp-space-2); text-align: start; font-size: var(--crisp-text-sm); color: var(--crisp-fg-muted); caption-side: bottom; }
15
24
  & td[data-align="right"], & th[data-align="right"] { text-align: end; }
16
25
  & td[data-align="center"], & th[data-align="center"] { text-align: center; }
package/dist/tabs.css CHANGED
@@ -11,9 +11,15 @@
11
11
  & .crisp-tabs-tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 var(--crisp-space-1); border-radius: var(--crisp-radius-sm); background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); font-size: var(--crisp-text-xs); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
12
12
  & .crisp-tabs-tab[data-selected] .crisp-tabs-tab-badge { color: var(--crisp-fg-primary); }
13
13
  & .crisp-tabs-indicator { position: absolute; bottom: 0; left: 0; z-index: 1; height: 1px; background: var(--crisp-fg-primary); border-radius: 2px 2px 0 0; transition: transform .2s cubic-bezier(.4,0,.2,1), width .2s cubic-bezier(.4,0,.2,1); pointer-events: none; }
14
- & .crisp-tabs-panel { flex: 1; min-height: 0; }
14
+ & .crisp-tabs-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-top: var(--crisp-space-8); }
15
15
  & .crisp-tabs-panel:focus-visible { outline: none; }
16
16
  }
17
+ .crisp-tabs--fill_true {
18
+ height: 100%;
19
+ }
20
+ .crisp-tabs--fill_false {
21
+
22
+ }
17
23
 
18
24
  @media (prefers-reduced-motion: reduce) {
19
25
  .crisp-tabs, .crisp-tabs * {
package/dist/tabs.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { RecipeFn } from "../core/types";
2
2
 
3
3
  export interface TabsVariants {
4
-
4
+ fill?: boolean;
5
5
  }
6
6
 
7
- export declare const tabsRecipe: RecipeFn<{ }>;
7
+ export declare const tabsRecipe: RecipeFn<{ fill: { true: string; false: string } }>;
@@ -12,9 +12,15 @@
12
12
  & .crisp-tabs-tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 var(--crisp-space-1); border-radius: var(--crisp-radius-sm); background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); font-size: var(--crisp-text-xs); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
13
13
  & .crisp-tabs-tab[data-selected] .crisp-tabs-tab-badge { color: var(--crisp-fg-primary); }
14
14
  & .crisp-tabs-indicator { position: absolute; bottom: 0; left: 0; z-index: 1; height: 1px; background: var(--crisp-fg-primary); border-radius: 2px 2px 0 0; transition: transform .2s cubic-bezier(.4,0,.2,1), width .2s cubic-bezier(.4,0,.2,1); pointer-events: none; }
15
- & .crisp-tabs-panel { flex: 1; min-height: 0; }
15
+ & .crisp-tabs-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-top: var(--crisp-space-8); }
16
16
  & .crisp-tabs-panel:focus-visible { outline: none; }
17
17
  }
18
+ .crisp-tabs--fill_true {
19
+ height: 100%;
20
+ }
21
+ .crisp-tabs--fill_false {
22
+
23
+ }
18
24
 
19
25
  @media (prefers-reduced-motion: reduce) {
20
26
  .crisp-tabs, .crisp-tabs * {
@@ -0,0 +1,23 @@
1
+ .crisp-taskstable {
2
+ display: flex; flex-direction: column; min-height: 0; box-sizing: border-box; font-family: var(--crisp-font-sans); color: var(--crisp-fg-primary); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
3
+ & .crisp-taskstable-colhead { display: flex; align-items: center; gap: var(--crisp-space-1-5); min-height: 49px; max-height: 49px; padding: var(--crisp-space-2-5) var(--crisp-space-3); box-shadow: inset 0 -1px 0 var(--crisp-border-subtle); font-size: var(--crisp-text-sm); color: var(--crisp-fg-muted); }
4
+ & .crisp-taskstable-colhead-cell { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); min-width: 0; }
5
+ & .crisp-taskstable-row { display: flex; align-items: center; gap: var(--crisp-space-1-5); }
6
+ & .crisp-taskstable-cell { display: flex; align-items: center; min-width: 0; }
7
+ & .crisp-taskstable-check { appearance: none; -webkit-appearance: none; box-sizing: border-box; flex-shrink: 0; margin: 0; width: 16px; height: 16px; border: none; border-radius: var(--crisp-radius-full); background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-fg-primary) 9%, transparent); cursor: pointer; transition: background-color .12s, box-shadow .12s; }
8
+ & .crisp-taskstable-check:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-fg-primary) 30%, transparent); }
9
+ & .crisp-taskstable-check:checked { background: var(--crisp-bg-brand-solid) center / 10px no-repeat; box-shadow: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.5 5 9l4.5-5'/%3E%3C/svg%3E"); }
10
+ & .crisp-taskstable-check:focus-visible { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: 1px; }
11
+ & .crisp-taskstable-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-primary); }
12
+ & .crisp-taskstable-due { font-size: var(--crisp-text-lg); color: var(--crisp-fg-muted); white-space: nowrap; }
13
+ & .crisp-taskstable-due[data-overdue] { color: var(--crisp-fg-danger); }
14
+ & .crisp-taskstable-empty { padding: var(--crisp-space-8) var(--crisp-space-4); text-align: center; font-size: var(--crisp-text-md); color: var(--crisp-fg-muted); }
15
+ }
16
+
17
+ @media (prefers-reduced-motion: reduce) {
18
+ .crisp-taskstable, .crisp-taskstable * {
19
+ animation-duration: 0.01ms !important;
20
+ animation-iteration-count: 1 !important;
21
+ transition-duration: 0.01ms !important;
22
+ }
23
+ }
@@ -0,0 +1,7 @@
1
+ import type { RecipeFn } from "../core/types";
2
+
3
+ export interface TaskstableVariants {
4
+
5
+ }
6
+
7
+ export declare const taskstableRecipe: RecipeFn<{ }>;
@@ -0,0 +1,25 @@
1
+ @layer crisp-components {
2
+ .crisp-taskstable {
3
+ display: flex; flex-direction: column; min-height: 0; box-sizing: border-box; font-family: var(--crisp-font-sans); color: var(--crisp-fg-primary); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
4
+ & .crisp-taskstable-colhead { display: flex; align-items: center; gap: var(--crisp-space-1-5); min-height: 49px; max-height: 49px; padding: var(--crisp-space-2-5) var(--crisp-space-3); box-shadow: inset 0 -1px 0 var(--crisp-border-subtle); font-size: var(--crisp-text-sm); color: var(--crisp-fg-muted); }
5
+ & .crisp-taskstable-colhead-cell { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); min-width: 0; }
6
+ & .crisp-taskstable-row { display: flex; align-items: center; gap: var(--crisp-space-1-5); }
7
+ & .crisp-taskstable-cell { display: flex; align-items: center; min-width: 0; }
8
+ & .crisp-taskstable-check { appearance: none; -webkit-appearance: none; box-sizing: border-box; flex-shrink: 0; margin: 0; width: 16px; height: 16px; border: none; border-radius: var(--crisp-radius-full); background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-fg-primary) 9%, transparent); cursor: pointer; transition: background-color .12s, box-shadow .12s; }
9
+ & .crisp-taskstable-check:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-fg-primary) 30%, transparent); }
10
+ & .crisp-taskstable-check:checked { background: var(--crisp-bg-brand-solid) center / 10px no-repeat; box-shadow: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.5 5 9l4.5-5'/%3E%3C/svg%3E"); }
11
+ & .crisp-taskstable-check:focus-visible { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: 1px; }
12
+ & .crisp-taskstable-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-primary); }
13
+ & .crisp-taskstable-due { font-size: var(--crisp-text-lg); color: var(--crisp-fg-muted); white-space: nowrap; }
14
+ & .crisp-taskstable-due[data-overdue] { color: var(--crisp-fg-danger); }
15
+ & .crisp-taskstable-empty { padding: var(--crisp-space-8) var(--crisp-space-4); text-align: center; font-size: var(--crisp-text-md); color: var(--crisp-fg-muted); }
16
+ }
17
+
18
+ @media (prefers-reduced-motion: reduce) {
19
+ .crisp-taskstable, .crisp-taskstable * {
20
+ animation-duration: 0.01ms !important;
21
+ animation-iteration-count: 1 !important;
22
+ transition-duration: 0.01ms !important;
23
+ }
24
+ }
25
+ }
package/dist/text.css ADDED
@@ -0,0 +1,9 @@
1
+ .crisp-text {
2
+ display: inline;
3
+ }
4
+ .crisp-text--tone_default {
5
+ color: var(--crisp-fg-primary);
6
+ }
7
+ .crisp-text--tone_muted {
8
+ color: var(--crisp-fg-neutral-muted);
9
+ }
package/dist/text.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import type { RecipeFn } from "../core/types";
2
+
3
+ export interface TextVariants {
4
+ tone?: "default" | "muted";
5
+ }
6
+
7
+ export declare const textRecipe: RecipeFn<{ tone: { default: string; muted: string } }>;
@@ -0,0 +1,11 @@
1
+ @layer crisp-components {
2
+ .crisp-text {
3
+ display: inline;
4
+ }
5
+ .crisp-text--tone_default {
6
+ color: var(--crisp-fg-primary);
7
+ }
8
+ .crisp-text--tone_muted {
9
+ color: var(--crisp-fg-neutral-muted);
10
+ }
11
+ }
@@ -0,0 +1,27 @@
1
+ .crisp-themepicker {
2
+ display: flex; gap: var(--crisp-space-2); font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
3
+ & .crisp-themepicker-option { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: var(--crisp-space-1-5); width: 224px; padding: var(--crisp-space-1); border: 1px solid var(--crisp-border-subtle); border-radius: 16px; background: var(--crisp-bg-surface); cursor: pointer; font-family: inherit; }
4
+ & .crisp-themepicker-option[data-selected] { border-color: var(--crisp-bg-brand-solid); }
5
+ & .crisp-themepicker-preview { box-sizing: border-box; display: flex; width: 100%; height: 114px; padding: var(--crisp-space-2); gap: var(--crisp-space-1-5); border-radius: var(--crisp-radius-xl); overflow: hidden; }
6
+ & .crisp-themepicker-preview-side { flex-shrink: 0; width: 28%; display: flex; flex-direction: column; gap: var(--crisp-space-1); }
7
+ & .crisp-themepicker-preview-bar { height: 4px; border-radius: var(--crisp-radius-full); }
8
+ & .crisp-themepicker-preview-bar:nth-child(1) { width: 70%; background: var(--crisp-bg-brand-solid); }
9
+ & .crisp-themepicker-preview-bar:nth-child(2) { width: 90%; }
10
+ & .crisp-themepicker-preview-bar:nth-child(3) { width: 60%; }
11
+ & .crisp-themepicker-preview-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--crisp-space-1-5); padding: var(--crisp-space-1-5); border-radius: var(--crisp-radius-md); }
12
+ /* Light / System (default) swatch colours. */
13
+ & .crisp-themepicker-preview[data-swatch="light"], & .crisp-themepicker-preview[data-swatch="system"] { border: 1px solid #eeeff1; background: #fbfbfb; }
14
+ & [data-swatch="light"] .crisp-themepicker-preview-bar:not(:nth-child(1)), & [data-swatch="system"] .crisp-themepicker-preview-bar:not(:nth-child(1)) { background: #eeeff1; }
15
+ & [data-swatch="light"] .crisp-themepicker-preview-main, & [data-swatch="system"] .crisp-themepicker-preview-main { background: #ffffff; }
16
+ & [data-swatch="light"] .crisp-themepicker-preview-main .crisp-themepicker-preview-bar, & [data-swatch="system"] .crisp-themepicker-preview-main .crisp-themepicker-preview-bar { background: #eeeff1; }
17
+ /* Dark swatch colours -- always for "dark", and for "system" only when the OS itself reports dark. */
18
+ & .crisp-themepicker-preview[data-swatch="dark"] { border: 1px solid #1c1d1f; background: #0e0f10; }
19
+ & [data-swatch="dark"] .crisp-themepicker-preview-bar:not(:nth-child(1)) { background: #1c1d1f; }
20
+ & [data-swatch="dark"] .crisp-themepicker-preview-main { background: #0a0a0a; }
21
+ & [data-swatch="dark"] .crisp-themepicker-preview-main .crisp-themepicker-preview-bar { background: #1c1d1f; }
22
+ @media (prefers-color-scheme: dark) { & .crisp-themepicker-preview[data-swatch="system"] { border: 1px solid #1c1d1f; background: #0e0f10; } & [data-swatch="system"] .crisp-themepicker-preview-bar:not(:nth-child(1)) { background: #1c1d1f; } & [data-swatch="system"] .crisp-themepicker-preview-main { background: #0a0a0a; } & [data-swatch="system"] .crisp-themepicker-preview-main .crisp-themepicker-preview-bar { background: #1c1d1f; } }
23
+ & .crisp-themepicker-label { display: flex; align-items: center; gap: var(--crisp-space-1); font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
24
+ & .crisp-themepicker-option[data-selected] .crisp-themepicker-label { color: var(--crisp-fg-primary); }
25
+ & .crisp-themepicker-radio { flex-shrink: 0; width: 14px; height: 14px; border-radius: var(--crisp-radius-full); border: 1px solid var(--crisp-border-default); box-sizing: border-box; }
26
+ & .crisp-themepicker-option[data-selected] .crisp-themepicker-radio { border: 4px solid var(--crisp-bg-brand-solid); }
27
+ }
@@ -0,0 +1,7 @@
1
+ import type { RecipeFn } from "../core/types";
2
+
3
+ export interface ThemepickerVariants {
4
+
5
+ }
6
+
7
+ export declare const themepickerRecipe: RecipeFn<{ }>;
@@ -0,0 +1,29 @@
1
+ @layer crisp-components {
2
+ .crisp-themepicker {
3
+ display: flex; gap: var(--crisp-space-2); font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
4
+ & .crisp-themepicker-option { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: var(--crisp-space-1-5); width: 224px; padding: var(--crisp-space-1); border: 1px solid var(--crisp-border-subtle); border-radius: 16px; background: var(--crisp-bg-surface); cursor: pointer; font-family: inherit; }
5
+ & .crisp-themepicker-option[data-selected] { border-color: var(--crisp-bg-brand-solid); }
6
+ & .crisp-themepicker-preview { box-sizing: border-box; display: flex; width: 100%; height: 114px; padding: var(--crisp-space-2); gap: var(--crisp-space-1-5); border-radius: var(--crisp-radius-xl); overflow: hidden; }
7
+ & .crisp-themepicker-preview-side { flex-shrink: 0; width: 28%; display: flex; flex-direction: column; gap: var(--crisp-space-1); }
8
+ & .crisp-themepicker-preview-bar { height: 4px; border-radius: var(--crisp-radius-full); }
9
+ & .crisp-themepicker-preview-bar:nth-child(1) { width: 70%; background: var(--crisp-bg-brand-solid); }
10
+ & .crisp-themepicker-preview-bar:nth-child(2) { width: 90%; }
11
+ & .crisp-themepicker-preview-bar:nth-child(3) { width: 60%; }
12
+ & .crisp-themepicker-preview-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--crisp-space-1-5); padding: var(--crisp-space-1-5); border-radius: var(--crisp-radius-md); }
13
+ /* Light / System (default) swatch colours. */
14
+ & .crisp-themepicker-preview[data-swatch="light"], & .crisp-themepicker-preview[data-swatch="system"] { border: 1px solid #eeeff1; background: #fbfbfb; }
15
+ & [data-swatch="light"] .crisp-themepicker-preview-bar:not(:nth-child(1)), & [data-swatch="system"] .crisp-themepicker-preview-bar:not(:nth-child(1)) { background: #eeeff1; }
16
+ & [data-swatch="light"] .crisp-themepicker-preview-main, & [data-swatch="system"] .crisp-themepicker-preview-main { background: #ffffff; }
17
+ & [data-swatch="light"] .crisp-themepicker-preview-main .crisp-themepicker-preview-bar, & [data-swatch="system"] .crisp-themepicker-preview-main .crisp-themepicker-preview-bar { background: #eeeff1; }
18
+ /* Dark swatch colours -- always for "dark", and for "system" only when the OS itself reports dark. */
19
+ & .crisp-themepicker-preview[data-swatch="dark"] { border: 1px solid #1c1d1f; background: #0e0f10; }
20
+ & [data-swatch="dark"] .crisp-themepicker-preview-bar:not(:nth-child(1)) { background: #1c1d1f; }
21
+ & [data-swatch="dark"] .crisp-themepicker-preview-main { background: #0a0a0a; }
22
+ & [data-swatch="dark"] .crisp-themepicker-preview-main .crisp-themepicker-preview-bar { background: #1c1d1f; }
23
+ @media (prefers-color-scheme: dark) { & .crisp-themepicker-preview[data-swatch="system"] { border: 1px solid #1c1d1f; background: #0e0f10; } & [data-swatch="system"] .crisp-themepicker-preview-bar:not(:nth-child(1)) { background: #1c1d1f; } & [data-swatch="system"] .crisp-themepicker-preview-main { background: #0a0a0a; } & [data-swatch="system"] .crisp-themepicker-preview-main .crisp-themepicker-preview-bar { background: #1c1d1f; } }
24
+ & .crisp-themepicker-label { display: flex; align-items: center; gap: var(--crisp-space-1); font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
25
+ & .crisp-themepicker-option[data-selected] .crisp-themepicker-label { color: var(--crisp-fg-primary); }
26
+ & .crisp-themepicker-radio { flex-shrink: 0; width: 14px; height: 14px; border-radius: var(--crisp-radius-full); border: 1px solid var(--crisp-border-default); box-sizing: border-box; }
27
+ & .crisp-themepicker-option[data-selected] .crisp-themepicker-radio { border: 4px solid var(--crisp-bg-brand-solid); }
28
+ }
29
+ }
package/dist/tokens.css CHANGED
@@ -7,6 +7,7 @@
7
7
  --crisp-bg-raised: #f4f4f5;
8
8
  --crisp-border-default: #e4e4e7;
9
9
  --crisp-border-subtle: #eeeff1;
10
+ --crisp-border-dropzone: #e6e7ea;
10
11
  --crisp-ring-neutral: transparent;
11
12
  --crisp-ring-field: rgba(0,0,0,0.06);
12
13
  --crisp-ring-switch: #d9dade;
@@ -25,6 +26,7 @@
25
26
  --crisp-fg-muted: #71717a;
26
27
  --crisp-bg-danger: #e5484d;
27
28
  --crisp-bg-danger-solid: #ba2525;
29
+ --crisp-fg-danger: #eb3b3b;
28
30
  --crisp-stroke-field-focus: #1a1c20;
29
31
  --crisp-fg-disabled: #d1d3d8;
30
32
  --crisp-bg-neutral-weak: #f3f4f5;
@@ -59,6 +61,7 @@
59
61
  --crisp-bg-raised: #101112;
60
62
  --crisp-border-default: #212224;
61
63
  --crisp-border-subtle: #1c1d1f;
64
+ --crisp-border-dropzone: #212224;
62
65
  --crisp-ring-neutral: #212224;
63
66
  --crisp-ring-field: #212224;
64
67
  --crisp-ring-switch: #212224;
@@ -77,6 +80,7 @@
77
80
  --crisp-fg-muted: #9a9aa2;
78
81
  --crisp-bg-danger: #ff5a5f;
79
82
  --crisp-bg-danger-solid: #ba2525;
83
+ --crisp-fg-danger: #ff5a5f;
80
84
  --crisp-stroke-field-focus: #f3f4f5;
81
85
  --crisp-fg-disabled: #5b606a;
82
86
  --crisp-bg-neutral-weak: #1d2025;
@@ -97,9 +101,9 @@
97
101
  --crisp-fg-warning-soft: #e0982a;
98
102
  --crisp-fg-danger-soft: #ff5a5f;
99
103
  --crisp-fg-neutral-soft: #9a9aa2;
100
- --crisp-bg-purple-soft: #f5f0ff;
101
- --crisp-fg-purple-soft: #6238b5;
102
- --crisp-ring-purple-soft: #e8ddfe;
104
+ --crisp-bg-purple-soft: #2f1e5a;
105
+ --crisp-fg-purple-soft: #d8c4ff;
106
+ --crisp-ring-purple-soft: #45297d;
103
107
  }
104
108
 
105
109
  :root {
package/dist/tokens.json CHANGED
@@ -9,6 +9,7 @@
9
9
  "bgRaised": "#f4f4f5",
10
10
  "borderDefault": "#e4e4e7",
11
11
  "borderSubtle": "#eeeff1",
12
+ "borderDropzone": "#e6e7ea",
12
13
  "ringNeutral": "transparent",
13
14
  "ringField": "rgba(0,0,0,0.06)",
14
15
  "ringSwitch": "#d9dade",
@@ -27,6 +28,7 @@
27
28
  "fgMuted": "#71717a",
28
29
  "bgDanger": "#e5484d",
29
30
  "bgDangerSolid": "#ba2525",
31
+ "fgDanger": "#eb3b3b",
30
32
  "strokeFieldFocus": "#1a1c20",
31
33
  "fgDisabled": "#d1d3d8",
32
34
  "bgNeutralWeak": "#f3f4f5",
@@ -60,6 +62,7 @@
60
62
  "bgRaised": "#101112",
61
63
  "borderDefault": "#212224",
62
64
  "borderSubtle": "#1c1d1f",
65
+ "borderDropzone": "#212224",
63
66
  "ringNeutral": "#212224",
64
67
  "ringField": "#212224",
65
68
  "ringSwitch": "#212224",
@@ -78,6 +81,7 @@
78
81
  "fgMuted": "#9a9aa2",
79
82
  "bgDanger": "#ff5a5f",
80
83
  "bgDangerSolid": "#ba2525",
84
+ "fgDanger": "#ff5a5f",
81
85
  "strokeFieldFocus": "#f3f4f5",
82
86
  "fgDisabled": "#5b606a",
83
87
  "bgNeutralWeak": "#1d2025",
@@ -98,9 +102,9 @@
98
102
  "fgWarningSoft": "#e0982a",
99
103
  "fgDangerSoft": "#ff5a5f",
100
104
  "fgNeutralSoft": "#9a9aa2",
101
- "bgPurpleSoft": "#f5f0ff",
102
- "fgPurpleSoft": "#6238b5",
103
- "ringPurpleSoft": "#e8ddfe"
105
+ "bgPurpleSoft": "#2f1e5a",
106
+ "fgPurpleSoft": "#d8c4ff",
107
+ "ringPurpleSoft": "#45297d"
104
108
  }
105
109
  },
106
110
  "palette": {
@@ -112,6 +116,7 @@
112
116
  "gray900": "#101112",
113
117
  "line200": "#e4e4e7",
114
118
  "line100": "#eeeff1",
119
+ "line150": "#e6e7ea",
115
120
  "ringNeutral": "transparent",
116
121
  "ringField": "rgba(0,0,0,0.06)",
117
122
  "ringSwitch": "#d9dade",
@@ -131,6 +136,7 @@
131
136
  "brand700": "#1f5fd6",
132
137
  "red600": "#e5484d",
133
138
  "red700": "#ba2525",
139
+ "red500": "#eb3b3b",
134
140
  "fieldFocus": "#1a1c20",
135
141
  "disabledFg": "#d1d3d8",
136
142
  "neutralWeak": "#f3f4f5",
@@ -162,6 +168,7 @@
162
168
  "gray900": "#f5f5f5",
163
169
  "line200": "#212224",
164
170
  "line100": "#1c1d1f",
171
+ "line150": "#212224",
165
172
  "ringNeutral": "#212224",
166
173
  "ringField": "#212224",
167
174
  "ringSwitch": "#212224",
@@ -181,6 +188,7 @@
181
188
  "brand700": "#1f5fd6",
182
189
  "red600": "#ff5a5f",
183
190
  "red700": "#ba2525",
191
+ "red500": "#ff5a5f",
184
192
  "fieldFocus": "#f3f4f5",
185
193
  "disabledFg": "#5b606a",
186
194
  "neutralWeak": "#1d2025",
@@ -200,9 +208,9 @@
200
208
  "softWarningText": "#e0982a",
201
209
  "softDangerText": "#ff5a5f",
202
210
  "softNeutralText": "#9a9aa2",
203
- "purpleTint": "#f5f0ff",
204
- "softPurpleText": "#6238b5",
205
- "purpleRing": "#e8ddfe"
211
+ "purpleTint": "#2f1e5a",
212
+ "softPurpleText": "#d8c4ff",
213
+ "purpleRing": "#45297d"
206
214
  }
207
215
  },
208
216
  "space": {
@@ -3,6 +3,18 @@ import type { VariantProps } from "../../core";
3
3
  import { chipRecipe } from "./chip.recipe";
4
4
  export type ChipProps = React.ComponentPropsWithoutRef<"span"> & VariantProps<typeof chipRecipe> & {
5
5
  asChild?: boolean;
6
+ /**
7
+ * Ellipsis-truncates the label when it no longer fits. Only meaningful
8
+ * when `children` is a plain string — anything else (an avatar, a
9
+ * multi-node label) is rendered as given, untruncated.
10
+ *
11
+ * Ellipsis only, no `Tooltip` on hover (dropped, #623 — a truncated
12
+ * value in Attio is revealed by the cell's own click-to-expand, #579,
13
+ * not by a chip tooltip; there was no Attio reference for one, which
14
+ * is exactly the "never add polish the reference lacks" case). Not
15
+ * Attio's "+N" overflow badge either — see `chip.recipe.ts` for why.
16
+ */
17
+ truncate?: boolean;
6
18
  };
7
19
  /**
8
20
  * A small pill — the same measured chip RecordsTable, RecordPanel and
@@ -19,6 +31,10 @@ export type ChipProps = React.ComponentPropsWithoutRef<"span"> & VariantProps<ty
19
31
  * spacing from the label.
20
32
  */
21
33
  export declare const Chip: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & VariantProps<import("../..").RecipeFn<{
34
+ readonly truncate: {
35
+ readonly true: string;
36
+ readonly false: string;
37
+ };
22
38
  readonly tone: {
23
39
  readonly neutral: string;
24
40
  readonly brand: string;
@@ -31,6 +47,10 @@ export declare const Chip: React.ForwardRefExoticComponent<Omit<React.DetailedHT
31
47
  };
32
48
  }> & {
33
49
  config: import("../..").RecipeConfig<{
50
+ readonly truncate: {
51
+ readonly true: string;
52
+ readonly false: string;
53
+ };
34
54
  readonly tone: {
35
55
  readonly neutral: string;
36
56
  readonly brand: string;
@@ -44,4 +64,16 @@ export declare const Chip: React.ForwardRefExoticComponent<Omit<React.DetailedHT
44
64
  }>;
45
65
  }> & {
46
66
  asChild?: boolean;
67
+ /**
68
+ * Ellipsis-truncates the label when it no longer fits. Only meaningful
69
+ * when `children` is a plain string — anything else (an avatar, a
70
+ * multi-node label) is rendered as given, untruncated.
71
+ *
72
+ * Ellipsis only, no `Tooltip` on hover (dropped, #623 — a truncated
73
+ * value in Attio is revealed by the cell's own click-to-expand, #579,
74
+ * not by a chip tooltip; there was no Attio reference for one, which
75
+ * is exactly the "never add polish the reference lacks" case). Not
76
+ * Attio's "+N" overflow badge either — see `chip.recipe.ts` for why.
77
+ */
78
+ truncate?: boolean;
47
79
  } & React.RefAttributes<HTMLSpanElement>>;
@@ -3,7 +3,9 @@ declare const spec: {
3
3
  readonly base: {
4
4
  readonly display: "inline-flex";
5
5
  readonly alignItems: "center";
6
+ readonly gap: "3px";
6
7
  readonly height: `var(--${string})`;
8
+ readonly minWidth: 0;
7
9
  readonly paddingInline: `var(--${string})`;
8
10
  readonly borderRadius: `var(--${string})`;
9
11
  readonly fontSize: `var(--${string})`;
@@ -12,6 +14,22 @@ declare const spec: {
12
14
  readonly whiteSpace: "nowrap";
13
15
  };
14
16
  readonly variants: {
17
+ readonly truncate: {
18
+ readonly true: {
19
+ readonly decls: {};
20
+ readonly parts: [{
21
+ readonly selector: "& .crisp-chip-label";
22
+ readonly decls: {
23
+ readonly minWidth: 0;
24
+ readonly overflow: "hidden";
25
+ readonly textOverflow: "ellipsis";
26
+ readonly whiteSpace: "nowrap";
27
+ readonly display: "block";
28
+ };
29
+ }];
30
+ };
31
+ readonly false: {};
32
+ };
15
33
  readonly tone: {
16
34
  readonly neutral: {
17
35
  readonly background: string;
@@ -57,9 +75,14 @@ declare const spec: {
57
75
  };
58
76
  readonly defaultVariants: {
59
77
  readonly tone: "neutral";
78
+ readonly truncate: false;
60
79
  };
61
80
  };
62
81
  declare const config: import("../..").RecipeConfig<{
82
+ readonly truncate: {
83
+ readonly true: string;
84
+ readonly false: string;
85
+ };
63
86
  readonly tone: {
64
87
  readonly neutral: string;
65
88
  readonly brand: string;
@@ -72,6 +95,10 @@ declare const config: import("../..").RecipeConfig<{
72
95
  };
73
96
  }>;
74
97
  export declare const chipRecipe: import("../..").RecipeFn<{
98
+ readonly truncate: {
99
+ readonly true: string;
100
+ readonly false: string;
101
+ };
75
102
  readonly tone: {
76
103
  readonly neutral: string;
77
104
  readonly brand: string;
@@ -84,6 +111,10 @@ export declare const chipRecipe: import("../..").RecipeFn<{
84
111
  };
85
112
  }> & {
86
113
  config: import("../..").RecipeConfig<{
114
+ readonly truncate: {
115
+ readonly true: string;
116
+ readonly false: string;
117
+ };
87
118
  readonly tone: {
88
119
  readonly neutral: string;
89
120
  readonly brand: string;
@@ -3,6 +3,10 @@ type IconType = React.ComponentType<{
3
3
  size?: number;
4
4
  strokeWidth?: number;
5
5
  }>;
6
+ export declare function isLabelTruncated(el: {
7
+ scrollWidth: number;
8
+ clientWidth: number;
9
+ }): boolean;
6
10
  export type EntityValue = {
7
11
  name: string;
8
12
  avatar?: string;
@@ -21,9 +25,10 @@ export type DataEditableOption = {
21
25
  export type DataCellType = "text" | "entity" | "tags" | "status" | "date" | "datetime" | "number" | "currency";
22
26
  export type DataTableColumn<T> = {
23
27
  key: string;
24
- /** Truncates with an ellipsis when it's wider than the
25
- * column. The full text stays in the DOM, so assistive tech and copy/paste
26
- * get all of it; there is deliberately no `title` tooltip — see the recipe. */
28
+ /** Truncates with an ellipsis when it's wider than the column (#534: a
29
+ * `Tooltip` with the full text appears on hover/focus once it actually
30
+ * overflows — see `ThLabel` below). The full text stays in the DOM
31
+ * regardless, so assistive tech and copy/paste get all of it either way. */
27
32
  header: React.ReactNode;
28
33
  /** Built-in rich renderer: entity (avatar+name), tags (colour pills), status
29
34
  * (dot), date, number, currency. Overridden by `render`. */
@@ -220,6 +225,17 @@ export type DataTableProps<T extends {
220
225
  * direction like `stickyFirst` does: it pins to the trailing edge, which is
221
226
  * the left edge under `dir="rtl"` (#288). */
222
227
  stickyLast?: boolean;
228
+ /** Props on the scroll element itself (`style`/`className`/other div
229
+ * attributes) -- for bounding the grid's height so its sticky header and
230
+ * calc footer (#554) pin the way Attio's own grid does, the same
231
+ * `scrollProps` shape `Table` already takes directly (its own doc comment
232
+ * on #554 assumes this -- `DataTable` didn't actually expose it, #569).
233
+ * e.g. `scrollProps={{ style: { maxHeight: "calc(100vh - 220px)" } }}`.
234
+ * `ref` and `onScroll` are owned internally (this component tracks its own
235
+ * sticky-column scroll shadows) and are dropped if passed. `className`
236
+ * merges with the internal `crisp-table-scroll` class the same way
237
+ * `Table`'s own `scrollProps` does. */
238
+ scrollProps?: Omit<React.ComponentPropsWithoutRef<"div">, "ref" | "onScroll">;
223
239
  /** BCP 47 locale for the built-in `date`/`number`/`currency` renderers
224
240
  * (default "en-US"). Formats the date and groups the number the way that
225
241
  * locale's readers expect — e.g. "mn-MN" renders a date as "2026.09.12"
@@ -250,11 +266,30 @@ export type DataTableProps<T extends {
250
266
  countLabel?: (shown: number, total: number) => React.ReactNode;
251
267
  /** Extra toolbar content (e.g. buttons) on the right of the toolbar. */
252
268
  toolbar?: React.ReactNode;
269
+ /**
270
+ * Bounds the grid's body to a fixed viewport height and makes it scroll
271
+ * internally (the way Attio's own grid does), which is also what turns on
272
+ * ROW virtualization (#577) -- only rows inside that viewport (plus a
273
+ * small overscan) render; rows outside it collapse into two spacer `<tr>`s
274
+ * so the scrollbar still reflects the true row count. A number is pixels;
275
+ * a string is any CSS length ("100%", "60vh") -- the first paint
276
+ * (including SSR) windows to an assumed viewport before the real size is
277
+ * measured on mount, so a plain number gets a pixel-accurate first window
278
+ * and a string gets an approximate one that corrects itself right after
279
+ * hydration.
280
+ *
281
+ * Omitted (the default): the grid grows to fit every row, exactly as
282
+ * before -- there is no internal scroll position for row windowing to mean
283
+ * anything, so this is the opt-in half of virtualization. COLUMN
284
+ * virtualization (below) is the other half and does NOT need this prop --
285
+ * the grid already has a determinate horizontal scroll container.
286
+ */
287
+ height?: number | string;
253
288
  className?: string;
254
289
  };
255
290
  export declare function DataTable<T extends {
256
291
  id: string;
257
- }>({ columns: columnsProp, data, selectable, selectedIds, onSelectionChange, selectAllLabel: selectAllLabelProp, selectRowLabel, selectionAnnouncement, columnMenu, onColumnsChange, groupBy, onRowsReorder, error, sort: sortProp, defaultSort, onSortChange, filterable, searchPlaceholder: searchPlaceholderProp, searchLabel: searchLabelProp, onEdit, stickyFirst, stickyLast, locale: localeProp, avatarTone, surface, interactive, onRowClick, onAddRow, addRowLabel: addRowLabelProp, empty: emptyProp, showCount, countLabel, toolbar, className, reorderRowLabel: reorderRowLabelProp, sortAscendingLabel: sortAscendingLabelProp, sortDescendingLabel: sortDescendingLabelProp, moveColumnLeftLabel: moveColumnLeftLabelProp, moveColumnRightLabel: moveColumnRightLabelProp, editColumnLabel: editColumnLabelProp, hideColumnLabel: hideColumnLabelProp, renameColumnLabel: renameColumnLabelProp, viewSettingsLabel: viewSettingsLabelProp, columnsGroupLabel: columnsGroupLabelProp, ...rest }: DataTableProps<T>): React.JSX.Element;
292
+ }>({ columns: columnsProp, data, selectable, selectedIds, onSelectionChange, selectAllLabel: selectAllLabelProp, selectRowLabel, selectionAnnouncement, columnMenu, onColumnsChange, groupBy, onRowsReorder, error, sort: sortProp, defaultSort, onSortChange, filterable, searchPlaceholder: searchPlaceholderProp, searchLabel: searchLabelProp, onEdit, stickyFirst, stickyLast, scrollProps, locale: localeProp, avatarTone, surface, interactive, onRowClick, onAddRow, addRowLabel: addRowLabelProp, empty: emptyProp, showCount, countLabel, toolbar, height, className, reorderRowLabel: reorderRowLabelProp, sortAscendingLabel: sortAscendingLabelProp, sortDescendingLabel: sortDescendingLabelProp, moveColumnLeftLabel: moveColumnLeftLabelProp, moveColumnRightLabel: moveColumnRightLabelProp, editColumnLabel: editColumnLabelProp, hideColumnLabel: hideColumnLabelProp, renameColumnLabel: renameColumnLabelProp, viewSettingsLabel: viewSettingsLabelProp, columnsGroupLabel: columnsGroupLabelProp, ...rest }: DataTableProps<T>): React.JSX.Element;
258
293
  export declare namespace DataTable {
259
294
  var displayName: string;
260
295
  }
@@ -1,19 +1,44 @@
1
1
  import type * as React from "react";
2
+ /**
3
+ * #603: Attio's zero-*records* state (Users/Workspaces with nothing
4
+ * imported yet) pairs a "Learn more" label with a clickable card — an
5
+ * icon tile plus a title, e.g. "Learn more" / "Understanding records".
6
+ * Rendered as an `<a>` when `href` is given (matches Attio's own
7
+ * "Import CSV"/card being real links), a `<button>` otherwise.
8
+ */
9
+ export type EmptyStateLearnMore = {
10
+ icon: React.ReactNode;
11
+ /** Defaults to "Learn more". */
12
+ label?: React.ReactNode;
13
+ title: React.ReactNode;
14
+ href?: string;
15
+ onClick?: () => void;
16
+ };
2
17
  export type EmptyStateProps = Omit<React.ComponentPropsWithoutRef<"div">, "title"> & {
3
18
  icon?: React.ReactNode;
4
19
  title: React.ReactNode;
5
20
  description?: React.ReactNode;
6
- /** A primary action (e.g. a Button) shown below. */
21
+ /**
22
+ * A primary action (e.g. a Button) shown below. Pass more than one
23
+ * (a Fragment of Buttons) for a multi-CTA state (#603, measured:
24
+ * Attio's zero-records "Import CSV" + "Connect data source" pair,
25
+ * 8px gap) -- the container lays them out in a row automatically.
26
+ */
7
27
  action?: React.ReactNode;
28
+ /** A "Learn more" card below the action(s) (#603). */
29
+ learnMore?: EmptyStateLearnMore;
8
30
  /**
9
31
  * `illustrated` shows a large icon on a dotted-grid backdrop; `page` is
10
- * the full-view empty state (ringed circle icon + 20px heading).
32
+ * the full-view empty state (ringed circle icon + 20px heading);
33
+ * `records` is the larger (138px) dotted-grid tile Attio's zero-records
34
+ * table state uses (#603) -- same backdrop idiom as `illustrated`, a
35
+ * different measured size because it's a different surface.
11
36
  */
12
- variant?: "default" | "illustrated" | "page";
37
+ variant?: "default" | "illustrated" | "page" | "records";
13
38
  className?: string;
14
39
  };
15
40
  /** A centred empty-state panel — icon, title, description, optional action. */
16
- export declare function EmptyState({ icon, title, description, action, variant, className, ...rest }: EmptyStateProps): React.JSX.Element;
41
+ export declare function EmptyState({ icon, title, description, action, learnMore, variant, className, ...rest }: EmptyStateProps): React.JSX.Element;
17
42
  export declare namespace EmptyState {
18
43
  var displayName: string;
19
44
  }