@crisp-ui-kit/crisp 0.54.8 → 0.54.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/board.css +32 -8
  2. package/dist/board.layered.css +32 -8
  3. package/dist/cjs/components/contextmenu/contextmenu.js +2 -2
  4. package/dist/cjs/components/contextmenu/contextmenu.recipe.js +24 -0
  5. package/dist/cjs/components/datatable/datatable.js +541 -51
  6. package/dist/cjs/components/datatable/datatable.recipe.js +61 -3
  7. package/dist/cjs/components/dialog/dialog.js +65 -1
  8. package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +37 -2
  9. package/dist/cjs/components/tabletoolbar/tabletoolbar.js +148 -15
  10. package/dist/cjs/components/tabletoolbar/tabletoolbar.recipe.js +35 -1
  11. package/dist/cjs/product/board/board.js +62 -28
  12. package/dist/cjs/product/board/board.recipe.js +42 -2
  13. package/dist/cjs/product/comments/comments.js +11 -2
  14. package/dist/cjs/product/comments/comments.recipe.js +14 -4
  15. package/dist/cjs/product/recordstable/recordstable.js +1 -17
  16. package/dist/cjs/product/savedviews/savedviews.js +55 -24
  17. package/dist/cjs/product/savedviews/savedviews.recipe.js +27 -0
  18. package/dist/comments.css +14 -4
  19. package/dist/comments.layered.css +14 -4
  20. package/dist/contextmenu.css +24 -0
  21. package/dist/contextmenu.layered.css +24 -0
  22. package/dist/datatable.css +103 -77
  23. package/dist/datatable.layered.css +103 -77
  24. package/dist/esm/components/contextmenu/contextmenu.js +2 -2
  25. package/dist/esm/components/contextmenu/contextmenu.recipe.js +24 -0
  26. package/dist/esm/components/datatable/datatable.js +541 -52
  27. package/dist/esm/components/datatable/datatable.recipe.js +62 -4
  28. package/dist/esm/components/dialog/dialog.js +65 -1
  29. package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +37 -2
  30. package/dist/esm/components/tabletoolbar/tabletoolbar.js +149 -16
  31. package/dist/esm/components/tabletoolbar/tabletoolbar.recipe.js +37 -3
  32. package/dist/esm/product/board/board.js +63 -29
  33. package/dist/esm/product/board/board.recipe.js +42 -2
  34. package/dist/esm/product/comments/comments.js +12 -3
  35. package/dist/esm/product/comments/comments.recipe.js +14 -4
  36. package/dist/esm/product/recordstable/recordstable.js +2 -18
  37. package/dist/esm/product/savedviews/savedviews.js +57 -26
  38. package/dist/esm/product/savedviews/savedviews.recipe.js +27 -0
  39. package/dist/recordstable.css +33 -31
  40. package/dist/recordstable.layered.css +33 -31
  41. package/dist/savedviews.css +27 -0
  42. package/dist/savedviews.layered.css +27 -0
  43. package/dist/styles.css +266 -124
  44. package/dist/styles.layered.css +266 -124
  45. package/dist/tabletoolbar.css +33 -4
  46. package/dist/tabletoolbar.layered.css +33 -4
  47. package/dist/types/components/contextmenu/contextmenu.d.ts +8 -1
  48. package/dist/types/components/datatable/datatable.d.ts +90 -2
  49. package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +72 -2
  50. package/dist/types/product/board/board.d.ts +48 -2
  51. package/dist/types/product/comments/comments.d.ts +6 -1
  52. package/dist/types/product/recordstable/recordstable.d.ts +0 -1
  53. package/dist/types/product/savedviews/savedviews.d.ts +45 -8
  54. package/package.json +1 -1
@@ -13,11 +13,21 @@
13
13
 
14
14
  /* Row badge (CommentCountBadge) -- lives in its own class family so the
15
15
  grid lanes can drop it into a cell without pulling in the panel's
16
- CSS. Persistent state: a 6px grey dot. Hover state: a 12px comment
17
- icon + 12px count text, both at 55% ink, replacing the dot. */
18
- .crisp-comments-badge { box-sizing: border-box; font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; display: inline-flex; align-items: center; gap: var(--crisp-space-1); border: none; background: none; padding: 0; margin: 0; cursor: pointer; color: color-mix(in srgb, var(--crisp-fg-primary) 55%, transparent); }
16
+ CSS. Re-measured live on a real commented row (crisp/#601
17
+ supersession, right-aligned in a DataTable primary column): a 6px
18
+ grey dot at rest (unchanged, already matched); on hover, the trigger
19
+ button is auto-width with a 12px icon + 12px/500 count text,
20
+ "padding: 2px 6px 2px 4px", radius 6px -- distinct from the preview
21
+ button beside it, a fixed 20px square with a 16px icon, same radius.
22
+ Both share the 55%-ink idle colour and darken on their OWN hover
23
+ (color-mix 4%, the same formula DataTable's own #601 icons use). */
24
+ .crisp-comments-badge { box-sizing: border-box; font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); }
19
25
  .crisp-comments-badge-dot { box-sizing: border-box; width: 6px; height: 6px; border-radius: var(--crisp-radius-full); background: color-mix(in srgb, var(--crisp-fg-primary) 38%, transparent); }
20
- .crisp-comments-badge-count { font-size: 12px; line-height: 16px; }
26
+ .crisp-comments-badge-trigger { box-sizing: border-box; display: inline-flex; align-items: center; gap: var(--crisp-space-1); height: 20px; margin: 0; padding: 2px var(--crisp-space-1-5) 2px var(--crisp-space-1); border: none; border-radius: var(--crisp-radius-sm); background: none; font-family: inherit; color: color-mix(in srgb, var(--crisp-fg-primary) 55%, transparent); cursor: pointer; }
27
+ .crisp-comments-badge-trigger:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, transparent); color: var(--crisp-fg-primary); }
28
+ .crisp-comments-badge-preview { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin: 0; padding: 0; border: none; border-radius: var(--crisp-radius-sm); background: none; font-family: inherit; color: color-mix(in srgb, var(--crisp-fg-primary) 55%, transparent); cursor: pointer; flex-shrink: 0; }
29
+ .crisp-comments-badge-preview:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, transparent); color: var(--crisp-fg-primary); }
30
+ .crisp-comments-badge-count { font-size: 12px; line-height: 16px; font-weight: var(--crisp-weight-medium); }
21
31
  [dir="rtl"] .crisp-comments-badge [data-rtl-flip] { transform: scaleX(-1); }
22
32
 
23
33
  .crisp-comments {
@@ -13,6 +13,30 @@
13
13
  .crisp-contextmenu-item--danger:hover { background: color-mix(in srgb, var(--crisp-bg-danger) 10%, transparent); }
14
14
  .crisp-contextmenu-shortcut { margin-inline-start: auto; padding-inline-start: var(--crisp-space-3); color: var(--crisp-fg-muted); font-size: var(--crisp-text-sm); }
15
15
  .crisp-contextmenu-sep { height: 1px; margin: var(--crisp-space-1) 0; border: none; background: var(--crisp-border-subtle); }
16
+ /* crisp/#598: Attio's OWN cell-level context menu, measured live on
17
+ app.attio.com/techpartners/companies (right-click a data cell) --
18
+ theme-INDEPENDENT dark chrome, not this app's dark THEME (every
19
+ geometry value above -- 12px/8px radius, 4px/8px padding, 32px item
20
+ height, item gap included below -- already matched what was
21
+ measured here; only the colour pair differs, so only colours are
22
+ overridden). Same "#101112 / #eeeff1" dark-pill ink Tooltip
23
+ already hardcodes for the identical reason (that surface is ALSO
24
+ theme-independent). */
25
+ .crisp-contextmenu-content[data-variant="dark"] { background: #101112; box-shadow: none; }
26
+ .crisp-contextmenu-content[data-variant="dark"] .crisp-contextmenu-item { gap: var(--crisp-space-1-5); color: #eeeff1; }
27
+ .crisp-contextmenu-content[data-variant="dark"] .crisp-contextmenu-item svg { color: #898a8d; }
28
+ /* Plain-item hover re-measured live on the same cell menu (right-click
29
+ "Description" on app.attio.com/techpartners/companies, hover the
30
+ "Copy" row): getComputedStyle on the row is rgba(255,255,255,0.1),
31
+ not the 0.08 this used to guess at. The danger row's own hover
32
+ (hovering "Clear value") still didn't get re-measured -- that one
33
+ remains the derived red-on-black translation below, flagged on
34
+ crisp#598 for someone to confirm live. */
35
+ .crisp-contextmenu-content[data-variant="dark"] .crisp-contextmenu-item:hover { background: rgba(255,255,255,0.1); }
36
+ .crisp-contextmenu-content[data-variant="dark"] .crisp-contextmenu-item--danger { color: #ff5454; }
37
+ .crisp-contextmenu-content[data-variant="dark"] .crisp-contextmenu-item--danger svg { color: #ff5454; }
38
+ .crisp-contextmenu-content[data-variant="dark"] .crisp-contextmenu-item--danger:hover { background: rgba(255,84,84,0.12); }
39
+ .crisp-contextmenu-content[data-variant="dark"] .crisp-contextmenu-sep { background: rgba(255,255,255,0.1); }
16
40
 
17
41
  .crisp-contextmenu {
18
42
  display: contents; font-family: var(--crisp-font-sans);
@@ -14,6 +14,30 @@
14
14
  .crisp-contextmenu-item--danger:hover { background: color-mix(in srgb, var(--crisp-bg-danger) 10%, transparent); }
15
15
  .crisp-contextmenu-shortcut { margin-inline-start: auto; padding-inline-start: var(--crisp-space-3); color: var(--crisp-fg-muted); font-size: var(--crisp-text-sm); }
16
16
  .crisp-contextmenu-sep { height: 1px; margin: var(--crisp-space-1) 0; border: none; background: var(--crisp-border-subtle); }
17
+ /* crisp/#598: Attio's OWN cell-level context menu, measured live on
18
+ app.attio.com/techpartners/companies (right-click a data cell) --
19
+ theme-INDEPENDENT dark chrome, not this app's dark THEME (every
20
+ geometry value above -- 12px/8px radius, 4px/8px padding, 32px item
21
+ height, item gap included below -- already matched what was
22
+ measured here; only the colour pair differs, so only colours are
23
+ overridden). Same "#101112 / #eeeff1" dark-pill ink Tooltip
24
+ already hardcodes for the identical reason (that surface is ALSO
25
+ theme-independent). */
26
+ .crisp-contextmenu-content[data-variant="dark"] { background: #101112; box-shadow: none; }
27
+ .crisp-contextmenu-content[data-variant="dark"] .crisp-contextmenu-item { gap: var(--crisp-space-1-5); color: #eeeff1; }
28
+ .crisp-contextmenu-content[data-variant="dark"] .crisp-contextmenu-item svg { color: #898a8d; }
29
+ /* Plain-item hover re-measured live on the same cell menu (right-click
30
+ "Description" on app.attio.com/techpartners/companies, hover the
31
+ "Copy" row): getComputedStyle on the row is rgba(255,255,255,0.1),
32
+ not the 0.08 this used to guess at. The danger row's own hover
33
+ (hovering "Clear value") still didn't get re-measured -- that one
34
+ remains the derived red-on-black translation below, flagged on
35
+ crisp#598 for someone to confirm live. */
36
+ .crisp-contextmenu-content[data-variant="dark"] .crisp-contextmenu-item:hover { background: rgba(255,255,255,0.1); }
37
+ .crisp-contextmenu-content[data-variant="dark"] .crisp-contextmenu-item--danger { color: #ff5454; }
38
+ .crisp-contextmenu-content[data-variant="dark"] .crisp-contextmenu-item--danger svg { color: #ff5454; }
39
+ .crisp-contextmenu-content[data-variant="dark"] .crisp-contextmenu-item--danger:hover { background: rgba(255,84,84,0.12); }
40
+ .crisp-contextmenu-content[data-variant="dark"] .crisp-contextmenu-sep { background: rgba(255,255,255,0.1); }
17
41
 
18
42
  .crisp-contextmenu {
19
43
  display: contents; font-family: var(--crisp-font-sans);
@@ -9,61 +9,71 @@
9
9
  & .crisp-datatable-count { margin-inline-start: auto; font-size: var(--crisp-text-md); color: var(--crisp-fg-muted); }
10
10
  /* announced, never drawn */
11
11
  & .crisp-datatable-live { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
12
- /* The header cell has no padding of its own -- the button owns the full cell so the whole header is clickable (its own inset is 12px). Mirrors the summary-row fix. `& .crisp-table th`, not bare `& th` (found while re-checking #691's
12
+ /* crisp/#645: visually-hidden-but-focusable, not visually-hidden-and- inert like .crisp-datatable-live above -- same clip-rect shape, this one just needs to actually hold DOM focus so a native copy/paste event has something to fire on (see its own comment in datatable.tsx). resize: none keeps a stray native textarea handle from ever being drawable, even though it's clipped to 1px anyway. */
13
+ & .crisp-datatable-clipboard-proxy {
14
+ position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
15
+ overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
16
+ resize: none;
17
+ }
18
+ /* single active cell (crisp/#645 follow-up -- this had no styling of its
19
+ own at all before, a gap against Golden Rule 0: RecordsTable's own measured value, .crisp-recordstable-td[data-selected], brought across unchanged now that a visible anchor actually matters for the Shift+Click range below). */
20
+ & td[data-selected] { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: -2px; border-radius: var(--crisp-radius-sm); z-index: 3; }
21
+ /* crisp/#645, G-101: a Shift+Click range -- reuses the row-selection tint formula already used twice below (tbody tr[data-selected] td) for the same reason a selected group of rows gets one: a selected GROUP of cells is the same kind of state, just cell-scoped instead of row-scoped. Not independently re-measured against Attio's own range
22
+ highlight (out of scope this slice -- flagged on crisp#645). */
23
+ & td[data-in-range] { background: color-mix(in srgb, var(--crisp-bg-brand-solid) 10%, var(--crisp-bg-surface));
24
+ } /* The header cell has no padding of its own -- the button owns the full cell so the whole header is clickable (its own inset is 12px). Mirrors the summary-row fix. `& .crisp-table th`, not bare `& th` (found while re-checking #691's
13
25
  own fix live): DataTable's root nests `Table`'s own wrapper, whose
14
- `table.recipe.ts` carries `& th, & td { padding: 0 12px }` at the
15
- SAME specificity (.crisp-table th vs .crisp-datatable th, both one
16
- class + one element) -- a bare `& th` here only won by source
17
- order, which flipped the moment table.recipe.ts's own CSS file happened to land after datatable's in the build (alphabetical:
18
- datatable < table), silently reinstating 12px on every header cell
19
- in the whole product and making every interactive column's button double it to 24px. Scoping through `.crisp-table` adds a second class to the selector (0,2,1 beats 0,1,1) so this can never lose a specificity tie to source order again. */
26
+ `table.recipe.ts` carries `& th, & td { padding: 0 12px }
27
+ ` at the SAME specificity (.crisp-table th vs .crisp-datatable th, both one class + one element) -- a bare `& th` here only won by source order, which flipped the moment table.recipe.ts's own CSS file
28
+ happened to land after datatable's in the build (alphabetical: datatable < table), silently reinstating 12px on every header cell in the whole product and making every interactive column's button
29
+ double it to 24px. Scoping through `.crisp-table` adds a second
30
+ class to the selector (0,2,1 beats 0,1,1) so this can never lose a
31
+ specificity tie to source order again. */
20
32
  & .crisp-table th { padding: 0; }
21
- /* Same wrapper trap as AUTHORING.md Lesson 40 (ColumnCalc's summary trigger):
22
- Menu wraps its trigger in a flex div that sizes to its content, so a
23
- long header grew past the column instead of filling it -- with nothing
24
- left to squeeze, the label's own ellipsis CSS (below) had no properly -sized box to truncate against, and the th's own overflow hard-clipped
25
- it with no "...". Fill the wrapper, scoped to th so Menu's default (correct everywhere else) is untouched. */
33
+ /* Same wrapper trap as AUTHORING.md Lesson 40 (ColumnCalc's summary trigger): Menu wraps its trigger in a flex div that sizes to its content, so a long header grew past the column instead of filling it -- with nothing left to squeeze, the label's own ellipsis CSS (below) had no properly
34
+ -sized box to truncate against, and the th's own overflow hard-clipped it with no "...". Fill the wrapper, scoped to th so Menu's default
35
+ (correct everywhere else) is untouched. */
26
36
  & th .crisp-menu { width: 100%; height: 100%; }
27
37
  & .crisp-datatable-th-inner { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); width: 100%; min-width: 0; height: 100%; }
28
38
  & .crisp-datatable-th-inner > svg { flex-shrink: 0; color: var(--crisp-fg-muted); }
29
- /* crisp/#605 follow-up: a header with neither a Menu nor a sort button (the primary/entity column's now-inert path, or any column with no
30
- columnMenu/sortable at all) renders .crisp-datatable-th-inner as a
31
- DIRECT child of th instead of nested inside a button -- and loses
32
- the button's own 12px inset, drifting left of the td's 12px base
33
- inset. Measured live on Attio's own Companies grid: the header label and the cell's own text land at the exact same x (335px from the
34
- viewport, both 40px from the column's left edge) via two different padding+icon+gap combinations -- Attio does not leave the inert primary header flush left either. The `>` combinator targets only the button-less case: Menu's own wrapper (`.crisp-menu`) and the
35
- plain sort `button` both put >=1 more level between `th` and this
36
- span, so their own 12px (already on the button) isn't doubled. */
39
+ /* crisp/#605 follow-up: a header with neither a Menu nor a sort button
40
+ (the primary/entity column's now-inert path, or any column with no columnMenu/sortable at all) renders .crisp-datatable-th-inner as a DIRECT child of th instead of nested inside a button -- and loses the button's own 12px inset, drifting left of the td's 12px base inset. Measured live on Attio's own Companies grid: the header label
41
+ and the cell's own text land at the exact same x (335px from the viewport, both 40px from the column's left edge) via two different
42
+ padding+icon+gap combinations -- Attio does not leave the inert
43
+ primary header flush left either. The `>` combinator targets only
44
+ the button-less case: Menu's own wrapper (`.crisp-menu`) and the plain sort `button` both put >=1 more level between `th` and this span, so their own 12px (already on the button) isn't doubled. */
37
45
  & th > .crisp-datatable-th-inner { box-sizing: border-box; padding: 0 var(--crisp-space-3); }
38
- /* The summary cell has NO padding of its own -- the calculation trigger owns the whole 246x37 area so a click anywhere in the cell opens the menu. Zero the cell's inset and let ColumnCalc supply the 12px. */
46
+ /* The summary cell has NO padding of its own -- the calculation trigger
47
+ owns the whole 246x37 area so a click anywhere in the cell opens the
48
+ menu. Zero the cell's inset and let ColumnCalc supply the 12px. */
39
49
  & tfoot td { padding: 0; }
40
- /* Group heading row -- a view is grouped under a subtle label with the
41
- bucket's count beside it. */
42
- & .crisp-datatable-viewsettings { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); height: var(--crisp-size-row); margin: 0; padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-md); background: transparent; color: var(--crisp-fg-muted); font-family: inherit; font-size: var(--crisp-text-md); font-weight: var(--crisp-weight-medium); white-space: nowrap; cursor: pointer; transition: background-color .12s, color .12s; }
50
+ /* Group heading row -- a view is grouped under a subtle label with the bucket's count beside it. */
51
+ & .crisp-datatable-viewsettings { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); height: var(--crisp-size-row); margin: 0; padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-md); background: transparent; color: var(--crisp-fg-muted); font-family: inherit; font-size: var(--crisp-text-md); font-weight: var(--crisp-weight-medium); white-space: nowrap; cursor: pointer; transition: background-color .12s, color .12s; }
43
52
  & .crisp-datatable-viewsettings:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, transparent); color: var(--crisp-fg-primary); }
44
53
  & .crisp-datatable-group-label { padding: var(--crisp-space-1-5) var(--crisp-space-2) var(--crisp-space-1); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
45
- & .crisp-datatable-group { height: var(--crisp-size-menuRow); padding: 0 var(--crisp-space-3); background: var(--crisp-bg-subtle); border-bottom: 1px solid var(--crisp-border-subtle); font-size: var(--crisp-text-md); font-weight: var(--crisp-weight-medium); color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); }
54
+ & .crisp-datatable-group { height: var(--crisp-size-menuRow); padding: 0 var(--crisp-space-3); background: var(--crisp-bg-subtle); border-bottom: 1px solid var(--crisp-border-subtle); font-size: var(--crisp-text-md); font-weight: var(--crisp-weight-medium); color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); }
46
55
  & .crisp-datatable-group-count { margin-inline-start: var(--crisp-space-1-5); color: var(--crisp-fg-muted); font-variant-numeric: tabular-nums; }
47
56
  & .crisp-datatable-th-rename { width: 100%; min-width: 0; height: var(--crisp-size-row); margin: 0; padding: 0 var(--crisp-space-1); border: none; border-radius: var(--crisp-radius-md); background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); font-family: inherit; font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-primary); outline: none; }
48
57
  & .crisp-datatable-th-rename:focus { box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); }
49
58
  & .crisp-datatable-th-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
50
- /* #465: 12px per the comment above (and Attio's measured header cell
51
- padding: 0 12px) -- was still c.space["2"] (8px), drifted from its
52
- own documented value. */
59
+ /* #465: 12px per the comment above (and Attio's measured header cell padding: 0 12px) -- was still c.space["2"] (8px), drifted from its own documented value. */
53
60
  & .crisp-datatable-sort { display: flex; align-items: center; gap: var(--crisp-space-1-5); width: 100%; min-width: 0; height: 100%; margin: 0; padding: 0 var(--crisp-space-3); border: none; background: none; font: inherit; letter-spacing: inherit; color: inherit; text-align: start; cursor: pointer; }
54
- /* A right-aligned column's header keeps its field-icon + label packed at the START, matching its own values only in that the VALUES right-align -- Attio's own right-aligned header (measured live: "Twitter follower
55
- count") keeps the icon+label left and only the trailing column-menu
56
- icon sits pinned to the right edge, independent of the label's width (#406, reversing #393's own justify-content: flex-end here). The
57
- chevron's own margin-inline-start: auto below already pins IT to the end of a flex-start row with no override needed -- that's what pins
58
- the trailing icon on Attio too. */
61
+ /* A right-aligned column's header keeps its field-icon + label packed at
62
+ the START, matching its own values only in that the VALUES right-align
63
+ -- Attio's own right-aligned header (measured live: "Twitter follower
64
+ count") keeps the icon+label left and only the trailing column-menu icon sits pinned to the right edge, independent of the label's width
65
+ (#406, reversing #393's own justify-content: flex-end here). The chevron's own margin-inline-start: auto below already pins IT to the
66
+ end of a flex-start row with no override needed -- that's what pins the trailing icon on Attio too. */
59
67
  & .crisp-datatable-chevron { margin-inline-start: auto; flex-shrink: 0; color: var(--crisp-fg-muted); opacity: 0; transition: opacity .12s; }
60
68
  & .crisp-datatable-sort:hover .crisp-datatable-chevron { opacity: 0.6; }
61
69
  & .crisp-datatable-sort[data-sorted] .crisp-datatable-chevron { opacity: 1; color: var(--crisp-fg-primary); }
62
70
  /* sticky first column(s) + horizontal scroll shadow — RecordsTable's feel */
63
71
  & th[data-sticky], & td[data-sticky] { position: sticky; z-index: 1; background: var(--crisp-bg-surface); }
64
- & th[data-sticky] { z-index: 3; }
65
- /* #554: a footer sticky-column cell sits in the bottom-sticky row (table.recipe.ts's
66
- `tfoot td { z-index: 2 }`), which `td[data-sticky]`'s own higher-specificity `z-index: 1` would otherwise undercut -- keep it level with the row it's in. */
72
+ & th[data-sticky] { z-index: 3;
73
+ } /* #554: a footer sticky-column cell sits in the bottom-sticky row (table.recipe.ts's
74
+ `tfoot td { z-index: 2 }
75
+ `), which `td[data-sticky]`'s own higher-specificity
76
+ `z-index: 1` would otherwise undercut -- keep it level with the row it's in. */
67
77
  & tfoot td[data-sticky] { z-index: 2; }
68
78
  & tbody tr[data-selected] td[data-sticky] { background: color-mix(in srgb, var(--crisp-bg-brand-solid) 10%, var(--crisp-bg-surface)); }
69
79
  & tbody tr:hover td[data-sticky] { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, var(--crisp-bg-surface)); }
@@ -82,62 +92,79 @@
82
92
  & .crisp-datatable-editable:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, var(--crisp-bg-surface)); cursor: text; }
83
93
  & .crisp-datatable-edit { width: 100%; height: 28px; margin: 0; padding: 0 var(--crisp-space-1-5); border: none; border-radius: var(--crisp-radius-sm); background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); outline: none; vertical-align: middle; }
84
94
  & .crisp-datatable-edit:focus { box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); }
85
- /* An async onEdit's in-flight state (#385) -- the field/picker dims and
86
- stops accepting input rather than disappearing, so the just-typed or
87
- just-chosen value stays visible while its commit is pending. Same
88
- treatment Input already gives its own disabled state. */
95
+ /* An async onEdit's in-flight state (#385) -- the field/picker dims and stops accepting input rather than disappearing, so the just-typed or just-chosen value stays visible while its commit is pending. Same treatment Input already gives its own disabled state. */
89
96
  & .crisp-datatable-edit:disabled { opacity: 0.5; cursor: not-allowed; }
90
97
  & .crisp-datatable-edit-pending { flex-shrink: 0; margin-inline-start: var(--crisp-space-1); color: var(--crisp-fg-muted); vertical-align: middle; }
91
- /* The rejection's message, beside the cell's own content -- a sibling in
92
- the TableCell, never nested inside a column's own render output, so a hover-only wrapper (a Tooltip, say) around a custom render can't hide
93
- it. Block-level: the row grows to fit it rather than floating over
94
- the row below, so it can never end up clipped by the scroll
95
- container's overflow the way a position:fixed escape would need guarding against. */
98
+ /* The rejection's message, beside the cell's own content -- a sibling in the TableCell, never nested inside a column's own render output, so a
99
+ hover-only wrapper (a Tooltip, say) around a custom render can't hide it. Block-level: the row grows to fit it rather than floating over the row below, so it can never end up clipped by the scroll container's overflow the way a position:fixed escape would need
100
+ guarding against. */
96
101
  & .crisp-datatable-edit-error { display: block; padding: var(--crisp-space-0-5) 0 0; font-size: var(--crisp-text-sm); color: var(--crisp-bg-danger); }
97
- /* editor: "select"/"switch" -- always live, no separate edit mode, so the cell IS the picker: same chromeless-fill treatment as RecordsTable's own --picker cells (measured there already; DataTable
98
- shares RecordsTable's grid, Golden Rule 0). */
102
+ /* editor: "select"/"switch" -- always live, no separate edit mode, so
103
+ the cell IS the picker: same chromeless-fill treatment as
104
+ RecordsTable's own --picker cells (measured there already; DataTable shares RecordsTable's grid, Golden Rule 0). */
99
105
  & .crisp-datatable-td--picker { padding: 0; }
100
106
  & .crisp-datatable-edit-picker { display: flex; align-items: center; gap: var(--crisp-space-1); height: var(--crisp-size-tableRow); padding: 0 var(--crisp-space-2); }
101
107
  & .crisp-datatable-edit-picker .crisp-select-trigger { flex: 1; min-width: 0; height: 100%; min-height: 0; border-radius: 0; box-shadow: none; padding: 0; }
102
108
  & .crisp-datatable-td--picker .crisp-datatable-edit-error { padding-inline-start: var(--crisp-space-2); }
103
- /* reference picker: a leading 16px avatar per option, plus a trailing "Create X" row when the consumer supplies one (#449) -- same measured values as RecordsTable's own .crisp-recordstable-refoption*. */
109
+ /* reference picker: a leading 16px avatar per option, plus a trailing
110
+ "Create X" row when the consumer supplies one (#449) -- same measured
111
+ values as RecordsTable's own .crisp-recordstable-refoption*. */
104
112
  & .crisp-datatable-refoption { display: flex; align-items: center; gap: var(--crisp-space-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
105
113
  & .crisp-datatable-refoption-avatar { flex-shrink: 0; }
106
114
  & .crisp-datatable-refoption--create { color: var(--crisp-fg-muted); }
107
115
  & .crisp-datatable-empty { padding: var(--crisp-space-8) var(--crisp-space-3); text-align: center; color: var(--crisp-fg-muted); font-size: var(--crisp-text-lg); }
108
- /* #579: click-to-expand overlay for a truncated cell -- a read-only,
109
- full-value card, settled live as click (not Attio's usual hover-expand) and measured position: absolute, unlike this file's
110
- floating chrome (Menu/Select popovers) which portals and escapes the
111
- scroll container. Deliberately NOT the edit-error pattern above
112
- (grow the row, block-level, never clipped): a virtualized grid
113
- assumes a fixed row height for its scroll math (owned by the grid
114
- core, not this cell), so growing a row here would fight it. Anchored
115
- to the SAME column width the cell itself renders at (measured:
116
- Attio's own overlay came out only slightly wider than the triggering cell's clientWidth -- the overshoot is this padding),
117
- wrapping onto as many lines as the value needs; it CAN be clipped by
118
- `.crisp-table-scroll`'s own `overflow: auto` if it grows past the visible viewport, same as the edit-error comment above already notes for any position:absolute escape -- unmeasured against Attio for this exact case, flagged rather than guessed. */
116
+ /* #579: click-to-expand overlay for a truncated cell -- a read-only, full-value card, settled live as click (not Attio's usual
117
+ hover-expand) and measured position: absolute, unlike this file's floating chrome (Menu/Select popovers) which portals and escapes the scroll container. Deliberately NOT the edit-error pattern above (grow the row, block-level, never clipped): a virtualized grid assumes a fixed row height for its scroll math (owned by the grid core, not this cell), so growing a row here would fight it. Anchored to the SAME column width the cell itself renders at (measured: Attio's own overlay came out only slightly wider than the
118
+ triggering cell's clientWidth -- the overshoot is this padding), wrapping onto as many lines as the value needs; it CAN be clipped by `.crisp-table-scroll`'s own `overflow: auto` if it grows past the
119
+ visible viewport, same as the edit-error comment above already
120
+ notes for any position:absolute escape -- unmeasured against Attio
121
+ for this exact case, flagged rather than guessed. */
119
122
  & td[data-cell-expanded] { overflow: visible; z-index: 7; }
120
- & .crisp-datatable-cell-overlay { position: absolute; inset-inline-start: 0; top: 0; width: 100%; box-sizing: border-box; padding: var(--crisp-space-2) var(--crisp-space-3); background: var(--crisp-bg-surface); border: 1px solid var(--crisp-bg-brand-solid); border-radius: 4px; font-family: var(--crisp-font-sans); font-size: var(--crisp-text-lg); line-height: 20px; font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-primary); white-space: normal; word-break: break-word; cursor: default; }
123
+ & .crisp-datatable-cell-overlay {
124
+ position: absolute; inset-inline-start: 0; top: 0; width: 100%; box-sizing: border-box;
125
+ padding: var(--crisp-space-2) var(--crisp-space-3); background: var(--crisp-bg-surface);
126
+ border: 1px solid var(--crisp-bg-brand-solid); border-radius: 4px;
127
+ font-family: var(--crisp-font-sans); font-size: var(--crisp-text-lg); line-height: 20px; font-weight: var(--crisp-weight-medium);
128
+ color: var(--crisp-fg-primary); white-space: normal; word-break: break-word; cursor: default;
129
+ }
121
130
  /* fixed layout so column widths (and resize) are exact — like RecordsTable */
122
131
  & table { table-layout: fixed; }
123
- /* read-only/computed column marker (#596) -- sits just inside the resize handle, same absolute-positioned-against-the-th approach the handle itself uses, since th has zero padding and the button/inner row fills the whole cell with no room left for a trailing sibling. */
132
+ /* read-only/computed column marker (#596) -- sits just inside the
133
+ resize handle, same absolute-positioned-against-the-th approach the
134
+ handle itself uses, since th has zero padding and the button/inner
135
+ row fills the whole cell with no room left for a trailing sibling. */
124
136
  & .crisp-datatable-readonly { position: absolute; top: 50%; inset-inline-end: 11px; transform: translateY(-50%); color: var(--crisp-fg-muted); pointer-events: none; z-index: 5; }
125
137
  /* column resize grip */
126
138
  & .crisp-datatable-resize { position: absolute; top: 0; inset-inline-end: -3px; width: 9px; height: 100%; cursor: col-resize; z-index: 6; touch-action: none; }
127
139
  & .crisp-datatable-resize::after { content: ""; position: absolute; top: 0; inset-inline-start: 3px; width: 2px; height: 100%; background: var(--crisp-bg-brand-solid); opacity: 0; transition: opacity .12s; }
128
140
  & .crisp-datatable-resize:hover::after, & .crisp-datatable-resize[data-resizing]::after { opacity: 1; }
141
+ /* crisp/#731 -- column drag-to-reorder. Measured live against Attio's own grid (the issue's own comment): the dragged header keeps full
142
+ opacity and the plain `pointer` cursor throughout (Attio draws no
143
+ ghost and no "grabbing" cursor of its own), so this adds nothing to
144
+ `[data-dragging]` itself -- the ONLY new paint is the drop-indicator
145
+ line, a 3px bar in the same measured brand blue the resize handle's own hover state (above) already uses, positioned on whichever edge of the hovered header the pointer is closer to. */
146
+ & th[data-dragging] { cursor: pointer; }
147
+ & th[data-drop-before]::before, & th[data-drop-after]::after { content: ""; position: absolute; top: 0; width: 3px; height: 100%; background: var(--crisp-bg-brand-solid); z-index: 6; pointer-events: none; }
148
+ & th[data-drop-before]::before { inset-inline-start: -1.5px; }
149
+ & th[data-drop-after]::after { inset-inline-end: -1.5px; }
129
150
  /* typed cells — entity (avatar + name), colour-coded tags, numbers, dates */
130
151
  & .crisp-datatable-entity { display: flex; align-items: center; gap: var(--crisp-space-1-5); min-width: 0; color: var(--crisp-fg-primary); font-weight: var(--crisp-weight-medium); }
131
- & .crisp-datatable-entity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
132
- & .crisp-datatable-entity:hover .crisp-datatable-entity-name { text-decoration: underline; }
152
+ /* crisp/#601, G-050: measured LIVE (getComputedStyle on the name text, plain hover vs rest) that Attio's underline is unconditional, not a
153
+ hover reveal -- identical at rest and on hover: text-decoration-color
154
+ is rgba(0,0,0,0.09), a 9% tint, not the name's own full-contrast text colour. The previous :hover-gated, full-contrast rule here was itself unmeasured and wrong in two ways at once. */
155
+ & .crisp-datatable-entity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--crisp-fg-primary) 9%, transparent); }
133
156
  & button.crisp-datatable-entity-name--link { margin: 0; padding: 0; border: none; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-align: start; cursor: pointer; max-width: 100%; }
157
+ /* crisp/#601, G-048: two 20px ghost icons, right-aligned in the primary column, revealed on ROW hover (the issue's own title says "row
158
+ hover", and a live check confirmed hovering well past the name --
159
+ not just the icons' own hit target -- still reveals them) or keyboard focus. Measured live: border-radius 6px, icon colour rgba(0,0,0,0.55) at rest, darkening to the full text colour with a rgba(0,0,0,0.04) background on the icon's OWN hover -- both
160
+ expressed as color-mix against fgPrimary so they stay correct in
161
+ dark mode instead of a literal black that would invert. */
162
+ & .crisp-datatable-entity-actions { display: flex; align-items: center; gap: var(--crisp-space-1-5); margin-inline-start: auto; flex-shrink: 0; opacity: 0; }
163
+ & tr:hover .crisp-datatable-entity-actions, & .crisp-datatable-entity-actions:focus-within { opacity: 1; }
164
+ & .crisp-datatable-entity-action { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin: 0; padding: 0; border: none; border-radius: var(--crisp-radius-sm); background: none; font-family: inherit; color: color-mix(in srgb, var(--crisp-fg-primary) 55%, transparent); cursor: pointer; flex-shrink: 0; }
165
+ & .crisp-datatable-entity-action:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, transparent); color: var(--crisp-fg-primary); }
134
166
  & .crisp-datatable-avatar { width: var(--crisp-size-icon); height: var(--crisp-size-icon); border-radius: var(--crisp-radius-sm); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; line-height: 1; font-weight: var(--crisp-weight-semibold); text-transform: uppercase; color: var(--crisp-fg-on-brand); background: var(--crisp-bg-brand-solid); }
135
- & .crisp-datatable-avatar[data-tone="success"] { background: var(--crisp-bg-success); }
136
- & .crisp-datatable-avatar[data-tone="warning"] { background: var(--crisp-bg-warning); }
137
- & .crisp-datatable-avatar[data-tone="danger"] { background: var(--crisp-bg-danger); }
138
- & .crisp-datatable-avatar[data-tone="purple"] { background: var(--crisp-bg-purple); }
139
- & .crisp-datatable-avatar[data-tone="cyan"] { background: var(--crisp-bg-cyan); }
140
- & .crisp-datatable-avatar[data-tone="orange"] { background: var(--crisp-bg-orange); }
167
+ & .crisp-datatable-avatar[data-tone="success"] { background: var(--crisp-bg-success); } & .crisp-datatable-avatar[data-tone="warning"] { background: var(--crisp-bg-warning); } & .crisp-datatable-avatar[data-tone="danger"] { background: var(--crisp-bg-danger); } & .crisp-datatable-avatar[data-tone="purple"] { background: var(--crisp-bg-purple); } & .crisp-datatable-avatar[data-tone="cyan"] { background: var(--crisp-bg-cyan); } & .crisp-datatable-avatar[data-tone="orange"] { background: var(--crisp-bg-orange); }
141
168
  & .crisp-datatable-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
142
169
  & .crisp-datatable-tags { display: flex; align-items: center; gap: var(--crisp-space-1); overflow: hidden; }
143
170
  & .crisp-datatable-tag { display: inline-flex; align-items: center; height: var(--crisp-size-chip); padding: 0 var(--crisp-space-1); border-radius: var(--crisp-radius-chip); font-size: var(--crisp-text-lg); line-height: 20px; font-weight: var(--crisp-weight-medium); white-space: nowrap; background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); color: color-mix(in srgb, var(--crisp-fg-primary) 82%, transparent); }
@@ -150,20 +177,19 @@
150
177
  & .crisp-datatable-tag[data-tone="orange"] { background: color-mix(in srgb, var(--crisp-bg-orange) 16%, transparent); color: color-mix(in srgb, var(--crisp-bg-orange) 82%, var(--crisp-fg-primary)); }
151
178
  & .crisp-datatable-num { font-variant-numeric: tabular-nums; }
152
179
  & .crisp-datatable-muted { color: var(--crisp-fg-muted); }
153
- /* url/email cell types (#654) -- same measured values as RecordsTable's
154
- own .crisp-recordstable-link, which this mirrors: no underline at
155
- rest, underline on hover, own-colour text rather than a browser-blue
156
- link. */
180
+ /* url/email cell types (#654) -- same measured values as RecordsTable's own .crisp-recordstable-link, which this mirrors: no underline at rest, underline on hover, own-colour text rather than a browser-blue link. */
157
181
  & .crisp-datatable-link { color: var(--crisp-fg-primary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
158
182
  & .crisp-datatable-link:hover { text-decoration: underline; }
159
- /* row drag-to-reorder -- a Settings > Objects > Attributes screen measures
160
- a leading 20px grip column, a 16px grip icon, and the row's own hairline doubling as the drop indicator (it tints toward the brand colour as the active drop target). The affordance + geometry are measured; the drag MECHANISM is crisp's existing house idiom -- HTML5
161
- draggable + dataTransfer, the same one column reorder already uses
162
- (RecordsTable's reorderColumn) -- not a proprietary pointer-events implementation. */
183
+ /* row drag-to-reorder -- a Settings > Objects > Attributes screen measures a leading 20px grip column, a 16px grip icon, and the row's own
184
+ hairline doubling as the drop indicator (it tints toward the brand
185
+ colour as the active drop target). The affordance + geometry are
186
+ measured; the drag MECHANISM is crisp's existing house idiom -- HTML5 draggable + dataTransfer, the same one column reorder already uses (RecordsTable's reorderColumn) -- not a proprietary
187
+ pointer-events implementation. */
163
188
  & .crisp-datatable-col-grip { width: 20px; padding: 0; text-align: center; }
164
189
  & .crisp-datatable-grip { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; margin: 0; border: none; border-radius: 0; background: none; font-family: inherit; color: var(--crisp-fg-muted); cursor: grab; }
165
190
  & .crisp-datatable-grip:active { cursor: grabbing; }
166
191
  & tbody tr[data-drop-target] td, & tbody tr[data-drop-target] th { box-shadow: inset 0 2px 0 0 var(--crisp-bg-brand-solid); transition: box-shadow .12s; }
192
+ [dir="rtl"] & [data-rtl-flip] { transform: scaleX(-1); }
167
193
  }
168
194
 
169
195
  @media (prefers-reduced-motion: reduce) {