@crisp-ui-kit/crisp 0.54.11 → 0.55.1

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 (63) hide show
  1. package/dist/badge.css +1 -1
  2. package/dist/badge.layered.css +1 -1
  3. package/dist/cjs/components/badge/badge.recipe.js +10 -5
  4. package/dist/cjs/components/datatable/countries.js +73 -0
  5. package/dist/cjs/components/datatable/datatable.js +318 -40
  6. package/dist/cjs/components/datatable/datatable.recipe.js +18 -1
  7. package/dist/cjs/components/resizablepanel/resizablepanel.js +10 -1
  8. package/dist/cjs/components/table/table.js +8 -1
  9. package/dist/cjs/components/tabletoolbar/tabletoolbar.js +110 -27
  10. package/dist/cjs/index.js +0 -2
  11. package/dist/cjs/product/recordpage/index.js +6 -1
  12. package/dist/cjs/product/recordpage/recordpage.js +20 -4
  13. package/dist/datatable.css +141 -102
  14. package/dist/datatable.layered.css +141 -102
  15. package/dist/esm/components/badge/badge.recipe.js +10 -5
  16. package/dist/esm/components/datatable/countries.js +68 -0
  17. package/dist/esm/components/datatable/datatable.js +319 -41
  18. package/dist/esm/components/datatable/datatable.recipe.js +18 -1
  19. package/dist/esm/components/resizablepanel/resizablepanel.js +10 -1
  20. package/dist/esm/components/table/table.js +8 -1
  21. package/dist/esm/components/tabletoolbar/tabletoolbar.js +111 -28
  22. package/dist/esm/index.js +0 -2
  23. package/dist/esm/product/recordpage/index.js +2 -0
  24. package/dist/esm/product/recordpage/recordpage.js +20 -4
  25. package/dist/styles.css +142 -375
  26. package/dist/styles.layered.css +142 -375
  27. package/dist/types/components/badge/badge.recipe.d.ts +3 -1
  28. package/dist/types/components/datatable/countries.d.ts +12 -0
  29. package/dist/types/components/datatable/datatable.d.ts +27 -3
  30. package/dist/types/components/table/table.d.ts +14 -0
  31. package/dist/types/index.d.ts +0 -2
  32. package/dist/types/product/recordpage/index.d.ts +2 -0
  33. package/package.json +2 -12
  34. package/dist/cjs/product/recordstable/company-logos.js +0 -29
  35. package/dist/cjs/product/recordstable/index.js +0 -13
  36. package/dist/cjs/product/recordstable/recordstable.js +0 -1362
  37. package/dist/cjs/product/recordstable/recordstable.recipe.js +0 -175
  38. package/dist/cjs/product/recordstable/recordstable.tag.js +0 -26
  39. package/dist/cjs/product/taskstable/index.js +0 -7
  40. package/dist/cjs/product/taskstable/taskstable.js +0 -32
  41. package/dist/cjs/product/taskstable/taskstable.recipe.js +0 -56
  42. package/dist/esm/product/recordstable/company-logos.js +0 -26
  43. package/dist/esm/product/recordstable/index.js +0 -3
  44. package/dist/esm/product/recordstable/recordstable.js +0 -1322
  45. package/dist/esm/product/recordstable/recordstable.recipe.js +0 -172
  46. package/dist/esm/product/recordstable/recordstable.tag.js +0 -23
  47. package/dist/esm/product/taskstable/index.js +0 -2
  48. package/dist/esm/product/taskstable/taskstable.js +0 -29
  49. package/dist/esm/product/taskstable/taskstable.recipe.js +0 -53
  50. package/dist/recordstable.css +0 -240
  51. package/dist/recordstable.d.ts +0 -7
  52. package/dist/recordstable.layered.css +0 -242
  53. package/dist/taskstable.css +0 -30
  54. package/dist/taskstable.d.ts +0 -7
  55. package/dist/taskstable.layered.css +0 -32
  56. package/dist/types/product/recordstable/company-logos.d.ts +0 -1
  57. package/dist/types/product/recordstable/index.d.ts +0 -3
  58. package/dist/types/product/recordstable/recordstable.d.ts +0 -294
  59. package/dist/types/product/recordstable/recordstable.recipe.d.ts +0 -5
  60. package/dist/types/product/recordstable/recordstable.tag.d.ts +0 -15
  61. package/dist/types/product/taskstable/index.d.ts +0 -2
  62. package/dist/types/product/taskstable/taskstable.d.ts +0 -59
  63. package/dist/types/product/taskstable/taskstable.recipe.d.ts +0 -3
@@ -1,6 +1,9 @@
1
1
  .crisp-datatable {
2
- display: flex; flex-direction: column; gap: var(--crisp-space-2-5); font-family: var(--crisp-font-sans);
3
- & .crisp-datatable-toolbar { display: flex; align-items: center; gap: var(--crisp-space-2); min-height: 49px; border-top: 1px solid var(--crisp-border-subtle); }
2
+ display: flex; flex-direction: column; gap: var(--crisp-space-2-5); font-family: var(--crisp-font-sans); /* The toolbar carried no horizontal inset of its own, so its content (search box, sort/filter chips) sat flush at the table's outer edge
3
+ (x=0) while the header row's own th/td padding (table.recipe.ts, #465) starts every column's text at 12px -- one row down, the SAME
4
+ grid's own header cell already begins at that inset. c.space["3"] here just matches the row directly below it, measured live against Attio (the sort/filter row's search chip lines up with the first
5
+ column header's text, not the grid's raw edge). */
6
+ & .crisp-datatable-toolbar { display: flex; align-items: center; gap: var(--crisp-space-2); min-height: 49px; border-top: 1px solid var(--crisp-border-subtle); padding: 0 var(--crisp-space-3); }
4
7
  & .crisp-datatable-search { position: relative; flex: 1; max-width: 280px; display: inline-flex; align-items: center; }
5
8
  & .crisp-datatable-search svg { position: absolute; inset-inline-start: var(--crisp-space-2); color: var(--crisp-fg-muted); pointer-events: none; }
6
9
  & .crisp-datatable-search input { width: 100%; height: 32px; padding: 0 var(--crisp-space-2) 0 var(--crisp-space-6); border: none; border-radius: var(--crisp-radius-md); background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-ring-neutral), 0 0 2px rgba(28,40,64,0.18), 0 1px 3px rgba(0,0,0,0.04); font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); outline: none; transition: box-shadow .15s; }
@@ -8,72 +11,83 @@
8
11
  & .crisp-datatable-search input:focus { box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); }
9
12
  & .crisp-datatable-count { margin-inline-start: auto; font-size: var(--crisp-text-md); color: var(--crisp-fg-muted); }
10
13
  /* announced, never drawn */
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
- /* 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
+ & .crisp-datatable-live {
14
15
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
15
16
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
16
- resize: none;
17
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). */
18
+ /* crisp/#645: visually-hidden-but-focusable, not visually-hidden-and-
19
+ inert like .crisp-datatable-live above -- same clip-rect shape,
20
+ this one just needs to actually hold DOM focus so a native
21
+ copy/paste event has something to fire on (see its own comment
22
+ in datatable.tsx). resize: none keeps a stray native textarea handle
23
+ from ever being drawable, even though it's clipped to 1px anyway. */
24
+ & .crisp-datatable-clipboard-proxy { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; resize: none; }
25
+ /* single active cell (crisp/#645 follow-up -- this had no styling of its own at all before, a gap against Golden Rule 0: RecordsTable's own
26
+ measured value, .crisp-recordstable-td[data-selected], brought
27
+ across unchanged now that a visible anchor actually matters for the
28
+ Shift+Click range below). */
20
29
  & 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
30
+ /* crisp/#645, G-101: a Shift+Click range -- reuses the row-selection
31
+ tint formula already used twice below (tbody tr[data-selected] td)
32
+ for the same reason a selected group of rows gets one: a selected
33
+ GROUP of cells is the same kind of state, just cell-scoped instead of
34
+ row-scoped. Not independently re-measured against Attio's own range highlight (out of scope this slice -- flagged on crisp#645). */
35
+ & td[data-in-range] { background: color-mix(in srgb, var(--crisp-bg-brand-solid) 10%, var(--crisp-bg-surface)); }
36
+ /* 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
25
37
  own fix live): DataTable's root nests `Table`'s own wrapper, whose
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. */
38
+ `table.recipe.ts` carries `& th, & td { padding: 0 12px }` at the
39
+ SAME specificity (.crisp-table th vs .crisp-datatable th, both one
40
+ class + one element) -- a bare `& th` here only won by source
41
+ order, which flipped the moment table.recipe.ts's own CSS file happened to land after datatable's in the build (alphabetical:
42
+ datatable < table), silently reinstating 12px on every header cell
43
+ 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. */
32
44
  & .crisp-table th { padding: 0; }
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. */
45
+ /* Same wrapper trap as AUTHORING.md Lesson 40 (ColumnCalc's summary trigger):
46
+ Menu wraps its trigger in a flex div that sizes to its content, so a
47
+ long header grew past the column instead of filling it -- with nothing
48
+ 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
49
+ it with no "...". Fill the wrapper, scoped to th so Menu's default (correct everywhere else) is untouched. */
36
50
  & th .crisp-menu { width: 100%; height: 100%; }
37
51
  & .crisp-datatable-th-inner { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); width: 100%; min-width: 0; height: 100%; }
38
52
  & .crisp-datatable-th-inner > svg { flex-shrink: 0; color: var(--crisp-fg-muted); }
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. */
53
+ /* 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
54
+ columnMenu/sortable at all) renders .crisp-datatable-th-inner as a
55
+ DIRECT child of th instead of nested inside a button -- and loses
56
+ the button's own 12px inset, drifting left of the td's 12px base
57
+ 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
58
+ 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
59
+ plain sort `button` both put >=1 more level between `th` and this
60
+ span, so their own 12px (already on the button) isn't doubled. */
45
61
  & th > .crisp-datatable-th-inner { box-sizing: border-box; padding: 0 var(--crisp-space-3); }
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. */
62
+ /* 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. */
49
63
  & tfoot td { padding: 0; }
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; }
64
+ /* Group heading row -- a view is grouped under a subtle label with the
65
+ bucket's count beside it. */
66
+ & .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; }
52
67
  & .crisp-datatable-viewsettings:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, transparent); color: var(--crisp-fg-primary); }
53
68
  & .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); }
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); }
69
+ & .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); }
55
70
  & .crisp-datatable-group-count { margin-inline-start: var(--crisp-space-1-5); color: var(--crisp-fg-muted); font-variant-numeric: tabular-nums; }
56
71
  & .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; }
57
72
  & .crisp-datatable-th-rename:focus { box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); }
58
73
  & .crisp-datatable-th-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
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. */
74
+ /* #465: 12px per the comment above (and Attio's measured header cell
75
+ padding: 0 12px) -- was still c.space["2"] (8px), drifted from its
76
+ own documented value. */
60
77
  & .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; }
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. */
78
+ /* 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
79
+ count") keeps the icon+label left and only the trailing column-menu
80
+ icon sits pinned to the right edge, independent of the label's width (#406, reversing #393's own justify-content: flex-end here). The
81
+ 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
82
+ the trailing icon on Attio too. */
67
83
  & .crisp-datatable-chevron { margin-inline-start: auto; flex-shrink: 0; color: var(--crisp-fg-muted); opacity: 0; transition: opacity .12s; }
68
84
  & .crisp-datatable-sort:hover .crisp-datatable-chevron { opacity: 0.6; }
69
85
  & .crisp-datatable-sort[data-sorted] .crisp-datatable-chevron { opacity: 1; color: var(--crisp-fg-primary); }
70
86
  /* sticky first column(s) + horizontal scroll shadow — RecordsTable's feel */
71
87
  & th[data-sticky], & td[data-sticky] { position: sticky; z-index: 1; background: var(--crisp-bg-surface); }
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. */
88
+ & th[data-sticky] { z-index: 3; }
89
+ /* #554: a footer sticky-column cell sits in the bottom-sticky row (table.recipe.ts's
90
+ `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. */
77
91
  & tfoot td[data-sticky] { z-index: 2; }
78
92
  & tbody tr[data-selected] td[data-sticky] { background: color-mix(in srgb, var(--crisp-bg-brand-solid) 10%, var(--crisp-bg-surface)); }
79
93
  & tbody tr:hover td[data-sticky] { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, var(--crisp-bg-surface)); }
@@ -90,88 +104,98 @@
90
104
  & tbody tr[data-selected] td { background: color-mix(in srgb, var(--crisp-bg-brand-solid) 10%, var(--crisp-bg-surface)); }
91
105
  & tbody tr[data-selected]:hover td { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, color-mix(in srgb, var(--crisp-bg-brand-solid) 10%, var(--crisp-bg-surface))); }
92
106
  & .crisp-datatable-editable:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, var(--crisp-bg-surface)); cursor: text; }
93
- /* crisp/#758: AI-enriched column marker, ported from RecordsTable's own already-measured value -- a full-bleed #9b69ff (bgPurple) wash at 4%, composited OVER whatever row-state background the cell already has (hover, selected), which is why it's an ::after overlay and not a
94
- plain background. */
107
+ /* crisp/#758: AI-enriched column marker, ported from RecordsTable's own
108
+ already-measured value -- a full-bleed #9b69ff (bgPurple) wash at 4%,
109
+ composited OVER whatever row-state background the cell already has
110
+ (hover, selected), which is why it's an ::after overlay and not a plain background. */
95
111
  & td[data-enriched]::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: color-mix(in srgb, var(--crisp-bg-purple) 4%, transparent); }
96
112
  & .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; }
97
113
  & .crisp-datatable-edit:focus { box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); }
98
- /* 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. */
114
+ /* An async onEdit's in-flight state (#385) -- the field/picker dims and
115
+ stops accepting input rather than disappearing, so the just-typed or
116
+ just-chosen value stays visible while its commit is pending. Same
117
+ treatment Input already gives its own disabled state. */
99
118
  & .crisp-datatable-edit:disabled { opacity: 0.5; cursor: not-allowed; }
100
119
  & .crisp-datatable-edit-pending { flex-shrink: 0; margin-inline-start: var(--crisp-space-1); color: var(--crisp-fg-muted); vertical-align: middle; }
101
- /* 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
102
- 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
103
- guarding against. */
120
+ /* The rejection's message, beside the cell's own content -- a sibling in
121
+ 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
122
+ it. Block-level: the row grows to fit it rather than floating over
123
+ the row below, so it can never end up clipped by the scroll
124
+ container's overflow the way a position:fixed escape would need guarding against. */
104
125
  & .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); }
105
- /* editor: "select"/"switch" -- always live, no separate edit mode, so
106
- the cell IS the picker: same chromeless-fill treatment as
107
- RecordsTable's own --picker cells (measured there already; DataTable shares RecordsTable's grid, Golden Rule 0). */
126
+ /* 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
127
+ shares RecordsTable's grid, Golden Rule 0). */
108
128
  & .crisp-datatable-td--picker { padding: 0; }
109
129
  & .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); }
110
130
  & .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; }
111
131
  & .crisp-datatable-td--picker .crisp-datatable-edit-error { padding-inline-start: var(--crisp-space-2); }
112
- /* reference picker: a leading 16px avatar per option, plus a trailing
113
- "Create X" row when the consumer supplies one (#449) -- same measured
114
- values as RecordsTable's own .crisp-recordstable-refoption*. */
132
+ /* 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*. */
115
133
  & .crisp-datatable-refoption { display: flex; align-items: center; gap: var(--crisp-space-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
116
134
  & .crisp-datatable-refoption-avatar { flex-shrink: 0; }
117
135
  & .crisp-datatable-refoption--create { color: var(--crisp-fg-muted); }
118
136
  & .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); }
119
- /* #579: click-to-expand overlay for a truncated cell -- a read-only, full-value card, settled live as click (not Attio's usual
120
- 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
121
- 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
122
- visible viewport, same as the edit-error comment above already
123
- notes for any position:absolute escape -- unmeasured against Attio
124
- for this exact case, flagged rather than guessed. */
137
+ /* #579: click-to-expand overlay for a truncated cell -- a read-only,
138
+ full-value card, settled live as click (not Attio's usual hover-expand) and measured position: absolute, unlike this file's
139
+ floating chrome (Menu/Select popovers) which portals and escapes the
140
+ scroll container. Deliberately NOT the edit-error pattern above
141
+ (grow the row, block-level, never clipped): a virtualized grid
142
+ assumes a fixed row height for its scroll math (owned by the grid
143
+ core, not this cell), so growing a row here would fight it. Anchored
144
+ to the SAME column width the cell itself renders at (measured:
145
+ Attio's own overlay came out only slightly wider than the triggering cell's clientWidth -- the overshoot is this padding),
146
+ wrapping onto as many lines as the value needs; it CAN be clipped by
147
+ `.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. */
125
148
  & td[data-cell-expanded] { overflow: visible; z-index: 7; }
126
- & .crisp-datatable-cell-overlay {
127
- position: absolute; inset-inline-start: 0; top: 0; width: 100%; box-sizing: border-box;
128
- padding: var(--crisp-space-2) var(--crisp-space-3); background: var(--crisp-bg-surface);
129
- border: 1px solid var(--crisp-bg-brand-solid); border-radius: 4px;
130
- font-family: var(--crisp-font-sans); font-size: var(--crisp-text-lg); line-height: 20px; font-weight: var(--crisp-weight-medium);
131
- color: var(--crisp-fg-primary); white-space: normal; word-break: break-word; cursor: default;
132
- }
149
+ & .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; }
133
150
  /* fixed layout so column widths (and resize) are exact — like RecordsTable */
134
151
  & table { table-layout: fixed; }
135
- /* read-only/computed column marker (#596) -- sits just inside the
136
- resize handle, same absolute-positioned-against-the-th approach the
137
- handle itself uses, since th has zero padding and the button/inner
138
- row fills the whole cell with no room left for a trailing sibling. */
152
+ /* 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. */
139
153
  & .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; }
140
154
  /* column resize grip */
141
155
  & .crisp-datatable-resize { position: absolute; top: 0; inset-inline-end: -3px; width: 9px; height: 100%; cursor: col-resize; z-index: 6; touch-action: none; }
142
156
  & .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; }
143
157
  & .crisp-datatable-resize:hover::after, & .crisp-datatable-resize[data-resizing]::after { opacity: 1; }
144
- /* crisp/#731 -- column drag-to-reorder. Measured live against Attio's own grid (the issue's own comment): the dragged header keeps full
145
- opacity and the plain `pointer` cursor throughout (Attio draws no
146
- ghost and no "grabbing" cursor of its own), so this adds nothing to
147
- `[data-dragging]` itself -- the ONLY new paint is the drop-indicator
148
- 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. */
158
+ /* crisp/#731 -- column drag-to-reorder. Measured live against Attio's
159
+ own grid (the issue's own comment): the dragged header keeps full opacity and the plain `pointer` cursor throughout (Attio draws no ghost and no "grabbing" cursor of its own), so this adds nothing to `[data-dragging]` itself -- the ONLY new paint is the drop-indicator line, a 3px bar in the same measured brand blue the resize handle's
160
+ own hover state (above) already uses, positioned on whichever edge of
161
+ the hovered header the pointer is closer to. */
149
162
  & th[data-dragging] { cursor: pointer; }
150
- & 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; }
163
+ & th[data-drop-before]::before, & th[data-drop-after]::after {
164
+ content: ""; position: absolute; top: 0; width: 3px; height: 100%;
165
+ background: var(--crisp-bg-brand-solid); z-index: 6; pointer-events: none;
166
+ }
151
167
  & th[data-drop-before]::before { inset-inline-start: -1.5px; }
152
168
  & th[data-drop-after]::after { inset-inline-end: -1.5px; }
153
169
  /* typed cells — entity (avatar + name), colour-coded tags, numbers, dates */
154
170
  & .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); }
155
- /* crisp/#601 supersession follow-up -- the same flex-row shape .crisp-datatable-entity gives its own avatar+name+actions, but structural only (no entity-specific colour/weight): lets onOpenComments/onOpenPreview compose alongside ANY column's own
156
- content (a custom render, or a non-entity built-in type), not just
157
- type: "entity"'s own inline rendering. */
171
+ /* crisp/#601 supersession follow-up -- the same flex-row shape
172
+ .crisp-datatable-entity gives its own avatar+name+actions, but
173
+ structural only (no entity-specific colour/weight): lets
174
+ onOpenComments/onOpenPreview compose alongside ANY column's own content (a custom render, or a non-entity built-in type), not just type: "entity"'s own inline rendering. */
158
175
  & .crisp-datatable-cell-actions-row { display: flex; align-items: center; gap: var(--crisp-space-1-5); min-width: 0; width: 100%; }
159
- /* crisp/#601, G-050: measured LIVE (getComputedStyle on the name text, plain hover vs rest) that Attio's underline is unconditional, not a
160
- hover reveal -- identical at rest and on hover: text-decoration-color
161
- 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. */
176
+ /* crisp/#601, G-050: measured LIVE (getComputedStyle on the name text,
177
+ plain hover vs rest) that Attio's underline is unconditional, not a hover reveal -- identical at rest and on hover: text-decoration-color is rgba(0,0,0,0.09), a 9% tint, not the name's own full-contrast text
178
+ colour. The previous :hover-gated, full-contrast rule here was itself
179
+ unmeasured and wrong in two ways at once. */
162
180
  & .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); }
163
181
  & 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%; }
164
- /* 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
165
- hover", and a live check confirmed hovering well past the name --
166
- 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
167
- expressed as color-mix against fgPrimary so they stay correct in
168
- dark mode instead of a literal black that would invert. */
182
+ /* crisp/#601, G-048: two 20px ghost icons, right-aligned in the primary
183
+ column, revealed on ROW hover (the issue's own title says "row
184
+ hover", and a live check confirmed hovering well past the name -- not just the icons' own hit target -- still reveals them) or
185
+ keyboard focus. Measured live: border-radius 6px, icon colour
186
+ rgba(0,0,0,0.55) at rest, darkening to the full text colour with a
187
+ rgba(0,0,0,0.04) background on the icon's OWN hover -- both expressed as color-mix against fgPrimary so they stay correct in dark mode instead of a literal black that would invert. */
169
188
  & .crisp-datatable-entity-actions { display: flex; align-items: center; gap: var(--crisp-space-1-5); margin-inline-start: auto; flex-shrink: 0; opacity: 0; }
170
189
  & tr:hover .crisp-datatable-entity-actions, & .crisp-datatable-entity-actions:focus-within { opacity: 1; }
171
190
  & .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; }
172
191
  & .crisp-datatable-entity-action:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, transparent); color: var(--crisp-fg-primary); }
173
192
  & .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); }
174
- & .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); }
193
+ & .crisp-datatable-avatar[data-tone="success"] { background: var(--crisp-bg-success); }
194
+ & .crisp-datatable-avatar[data-tone="warning"] { background: var(--crisp-bg-warning); }
195
+ & .crisp-datatable-avatar[data-tone="danger"] { background: var(--crisp-bg-danger); }
196
+ & .crisp-datatable-avatar[data-tone="purple"] { background: var(--crisp-bg-purple); }
197
+ & .crisp-datatable-avatar[data-tone="cyan"] { background: var(--crisp-bg-cyan); }
198
+ & .crisp-datatable-avatar[data-tone="orange"] { background: var(--crisp-bg-orange); }
175
199
  & .crisp-datatable-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
176
200
  & .crisp-datatable-tags { display: flex; align-items: center; gap: var(--crisp-space-1); overflow: hidden; }
177
201
  & .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); }
@@ -184,24 +208,39 @@
184
208
  & .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)); }
185
209
  & .crisp-datatable-num { font-variant-numeric: tabular-nums; }
186
210
  & .crisp-datatable-muted { color: var(--crisp-fg-muted); }
187
- /* 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. */
211
+ /* url/email cell types (#654) -- same measured values as RecordsTable's
212
+ own .crisp-recordstable-link, which this mirrors: no underline at
213
+ rest, underline on hover, own-colour text rather than a browser-blue
214
+ link. */
188
215
  & .crisp-datatable-link { color: var(--crisp-fg-primary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
189
216
  & .crisp-datatable-link:hover { text-decoration: underline; }
190
- /* rating cell type/editor (#760) -- measured live: 16px stars on an 18px pitch (a 2px gap), an empty star at rgba(0,0,0,0.1), a committed/filled star at brand600 (--crisp-bg-brand-solid, an exact match to the measured #266df0), and a distinct hover-preview colour -- rgb(33,91,196) -- that's close to but NOT brand700/bgBrandSolidPressed
191
- (#1f5fd6); kept as its own literal rather than forced onto that token,
192
- since the two were measured stable and different. The read-only svg
193
- and the editable button's own inner svg both carry the crisp-datatable-rating-star class on the svg itself (not the button), so one set of fill rules covers both -- the button only adds its own reset + cursor via a separate -btn class. */
217
+ /* phone cell type/editor (#765) -- measured live: the dial-code prefix
218
+ is a muted rgba(0,0,0,0.63) at 14px, matching every other muted-text
219
+ value already measured elsewhere in this file. */
220
+ & .crisp-datatable-phone { display: inline-flex; align-items: center; gap: var(--crisp-space-1); }
221
+ & .crisp-datatable-phone-dial { color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); }
222
+ & .crisp-datatable-phone-editor { display: flex; align-items: center; gap: var(--crisp-space-1); height: var(--crisp-size-tableRow); padding: 0 var(--crisp-space-2); }
223
+ & .crisp-datatable-phone-editor input { flex: 1; min-width: 0; }
224
+ /* datetime cell editor (#762) -- DatePickerField + TimePicker side by side. */
225
+ & .crisp-datatable-datetime-editor { display: flex; align-items: center; gap: var(--crisp-space-1); height: var(--crisp-size-tableRow); padding: 0 var(--crisp-space-2); }
226
+ /* rating cell type/editor (#760) -- measured live: 16px stars on an
227
+ 18px pitch (a 2px gap), an empty star at rgba(0,0,0,0.1), a
228
+ committed/filled star at brand600 (--crisp-bg-brand-solid, an exact
229
+ match to the measured #266df0), and a distinct hover-preview colour
230
+ -- rgb(33,91,196) -- that's close to but NOT brand700/bgBrandSolidPressed (#1f5fd6); kept as its own literal rather than forced onto that token, since the two were measured stable and different. The read-only svg and the editable button's own inner svg both carry the
231
+ crisp-datatable-rating-star class on the svg itself (not the
232
+ button), so one set of fill rules covers both -- the button only
233
+ adds its own reset + cursor via a separate -btn class. */
194
234
  & .crisp-datatable-rating { display: inline-flex; align-items: center; gap: 2px; }
195
235
  & .crisp-datatable-rating-star { display: block; }
196
236
  & .crisp-datatable-rating-star path { fill: rgba(0, 0, 0, 0.1); }
197
237
  & .crisp-datatable-rating-star[data-filled] path { fill: var(--crisp-bg-brand-solid); }
198
238
  & .crisp-datatable-rating-star[data-hovering] path { fill: #215bc4; }
199
239
  & .crisp-datatable-rating-star-btn { display: inline-flex; padding: 0; margin: 0; border: none; background: none; font-family: inherit; cursor: pointer; }
200
- /* row drag-to-reorder -- a Settings > Objects > Attributes screen measures a leading 20px grip column, a 16px grip icon, and the row's own
201
- hairline doubling as the drop indicator (it tints toward the brand
202
- colour as the active drop target). The affordance + geometry are
203
- 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
204
- pointer-events implementation. */
240
+ /* row drag-to-reorder -- a Settings > Objects > Attributes screen measures
241
+ 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
242
+ draggable + dataTransfer, the same one column reorder already uses
243
+ (RecordsTable's reorderColumn) -- not a proprietary pointer-events implementation. */
205
244
  & .crisp-datatable-col-grip { width: 20px; padding: 0; text-align: center; }
206
245
  & .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; }
207
246
  & .crisp-datatable-grip:active { cursor: grabbing; }