@crisp-ui-kit/crisp 0.55.0 → 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.
- package/dist/badge.css +1 -1
- package/dist/badge.layered.css +1 -1
- package/dist/cjs/components/badge/badge.recipe.js +10 -5
- package/dist/cjs/components/datatable/countries.js +73 -0
- package/dist/cjs/components/datatable/datatable.js +194 -8
- package/dist/cjs/components/datatable/datatable.recipe.js +18 -1
- package/dist/datatable.css +141 -102
- package/dist/datatable.layered.css +141 -102
- package/dist/esm/components/badge/badge.recipe.js +10 -5
- package/dist/esm/components/datatable/countries.js +68 -0
- package/dist/esm/components/datatable/datatable.js +194 -8
- package/dist/esm/components/datatable/datatable.recipe.js +18 -1
- package/dist/styles.css +142 -103
- package/dist/styles.layered.css +142 -103
- package/dist/types/components/badge/badge.recipe.d.ts +3 -1
- package/dist/types/components/datatable/countries.d.ts +12 -0
- package/dist/types/components/datatable/datatable.d.ts +27 -3
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
height: 20px; padding-inline: var(--crisp-space-1); font-size: var(--crisp-text-sm); line-height: 16px; gap: 3px; border-radius: var(--crisp-radius-sm);
|
|
253
253
|
}
|
|
254
254
|
.crisp-badge--size_large {
|
|
255
|
-
height: var(--crisp-size-chip); padding-inline:
|
|
255
|
+
height: var(--crisp-size-chip); padding-block: var(--crisp-space-px); padding-inline-start: var(--crisp-space-1); padding-inline-end: var(--crisp-space-1-5); font-size: var(--crisp-text-lg); letter-spacing: -0.1px; border-radius: var(--crisp-radius-lg);
|
|
256
256
|
}
|
|
257
257
|
.crisp-badge--variant_soft {
|
|
258
258
|
|
|
@@ -598,8 +598,11 @@
|
|
|
598
598
|
}
|
|
599
599
|
|
|
600
600
|
.crisp-datatable {
|
|
601
|
-
display: flex; flex-direction: column; gap: var(--crisp-space-2-5); font-family: var(--crisp-font-sans);
|
|
602
|
-
|
|
601
|
+
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
|
|
602
|
+
(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
|
|
603
|
+
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
|
|
604
|
+
column header's text, not the grid's raw edge). */
|
|
605
|
+
& .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); }
|
|
603
606
|
& .crisp-datatable-search { position: relative; flex: 1; max-width: 280px; display: inline-flex; align-items: center; }
|
|
604
607
|
& .crisp-datatable-search svg { position: absolute; inset-inline-start: var(--crisp-space-2); color: var(--crisp-fg-muted); pointer-events: none; }
|
|
605
608
|
& .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; }
|
|
@@ -607,72 +610,83 @@
|
|
|
607
610
|
& .crisp-datatable-search input:focus { box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); }
|
|
608
611
|
& .crisp-datatable-count { margin-inline-start: auto; font-size: var(--crisp-text-md); color: var(--crisp-fg-muted); }
|
|
609
612
|
/* announced, never drawn */
|
|
610
|
-
& .crisp-datatable-live {
|
|
611
|
-
/* 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. */
|
|
612
|
-
& .crisp-datatable-clipboard-proxy {
|
|
613
|
+
& .crisp-datatable-live {
|
|
613
614
|
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
614
615
|
overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
|
|
615
|
-
resize: none;
|
|
616
616
|
}
|
|
617
|
-
/*
|
|
618
|
-
|
|
617
|
+
/* crisp/#645: visually-hidden-but-focusable, not visually-hidden-and-
|
|
618
|
+
inert like .crisp-datatable-live above -- same clip-rect shape,
|
|
619
|
+
this one just needs to actually hold DOM focus so a native
|
|
620
|
+
copy/paste event has something to fire on (see its own comment
|
|
621
|
+
in datatable.tsx). resize: none keeps a stray native textarea handle
|
|
622
|
+
from ever being drawable, even though it's clipped to 1px anyway. */
|
|
623
|
+
& .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; }
|
|
624
|
+
/* 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
|
|
625
|
+
measured value, .crisp-recordstable-td[data-selected], brought
|
|
626
|
+
across unchanged now that a visible anchor actually matters for the
|
|
627
|
+
Shift+Click range below). */
|
|
619
628
|
& td[data-selected] { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: -2px; border-radius: var(--crisp-radius-sm); z-index: 3; }
|
|
620
|
-
/* crisp/#645, G-101: a Shift+Click range -- reuses the row-selection
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
629
|
+
/* crisp/#645, G-101: a Shift+Click range -- reuses the row-selection
|
|
630
|
+
tint formula already used twice below (tbody tr[data-selected] td)
|
|
631
|
+
for the same reason a selected group of rows gets one: a selected
|
|
632
|
+
GROUP of cells is the same kind of state, just cell-scoped instead of
|
|
633
|
+
row-scoped. Not independently re-measured against Attio's own range highlight (out of scope this slice -- flagged on crisp#645). */
|
|
634
|
+
& td[data-in-range] { background: color-mix(in srgb, var(--crisp-bg-brand-solid) 10%, var(--crisp-bg-surface)); }
|
|
635
|
+
/* 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
|
|
624
636
|
own fix live): DataTable's root nests `Table`'s own wrapper, whose
|
|
625
|
-
`table.recipe.ts` carries `& th, & td { padding: 0 12px }
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
specificity tie to source order again. */
|
|
637
|
+
`table.recipe.ts` carries `& th, & td { padding: 0 12px }` at the
|
|
638
|
+
SAME specificity (.crisp-table th vs .crisp-datatable th, both one
|
|
639
|
+
class + one element) -- a bare `& th` here only won by source
|
|
640
|
+
order, which flipped the moment table.recipe.ts's own CSS file happened to land after datatable's in the build (alphabetical:
|
|
641
|
+
datatable < table), silently reinstating 12px on every header cell
|
|
642
|
+
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. */
|
|
631
643
|
& .crisp-table th { padding: 0; }
|
|
632
|
-
/* Same wrapper trap as AUTHORING.md Lesson 40 (ColumnCalc's summary trigger):
|
|
633
|
-
|
|
634
|
-
|
|
644
|
+
/* Same wrapper trap as AUTHORING.md Lesson 40 (ColumnCalc's summary trigger):
|
|
645
|
+
Menu wraps its trigger in a flex div that sizes to its content, so a
|
|
646
|
+
long header grew past the column instead of filling it -- with nothing
|
|
647
|
+
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
|
|
648
|
+
it with no "...". Fill the wrapper, scoped to th so Menu's default (correct everywhere else) is untouched. */
|
|
635
649
|
& th .crisp-menu { width: 100%; height: 100%; }
|
|
636
650
|
& .crisp-datatable-th-inner { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); width: 100%; min-width: 0; height: 100%; }
|
|
637
651
|
& .crisp-datatable-th-inner > svg { flex-shrink: 0; color: var(--crisp-fg-muted); }
|
|
638
|
-
/* crisp/#605 follow-up: a header with neither a Menu nor a sort button
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
652
|
+
/* 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
|
|
653
|
+
columnMenu/sortable at all) renders .crisp-datatable-th-inner as a
|
|
654
|
+
DIRECT child of th instead of nested inside a button -- and loses
|
|
655
|
+
the button's own 12px inset, drifting left of the td's 12px base
|
|
656
|
+
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
|
|
657
|
+
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
|
|
658
|
+
plain sort `button` both put >=1 more level between `th` and this
|
|
659
|
+
span, so their own 12px (already on the button) isn't doubled. */
|
|
644
660
|
& th > .crisp-datatable-th-inner { box-sizing: border-box; padding: 0 var(--crisp-space-3); }
|
|
645
|
-
/* The summary cell has NO padding of its own -- the calculation trigger
|
|
646
|
-
owns the whole 246x37 area so a click anywhere in the cell opens the
|
|
647
|
-
menu. Zero the cell's inset and let ColumnCalc supply the 12px. */
|
|
661
|
+
/* 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. */
|
|
648
662
|
& tfoot td { padding: 0; }
|
|
649
|
-
|
|
650
|
-
|
|
663
|
+
/* Group heading row -- a view is grouped under a subtle label with the
|
|
664
|
+
bucket's count beside it. */
|
|
665
|
+
& .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; }
|
|
651
666
|
& .crisp-datatable-viewsettings:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, transparent); color: var(--crisp-fg-primary); }
|
|
652
667
|
& .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); }
|
|
653
|
-
|
|
668
|
+
& .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); }
|
|
654
669
|
& .crisp-datatable-group-count { margin-inline-start: var(--crisp-space-1-5); color: var(--crisp-fg-muted); font-variant-numeric: tabular-nums; }
|
|
655
670
|
& .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; }
|
|
656
671
|
& .crisp-datatable-th-rename:focus { box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); }
|
|
657
672
|
& .crisp-datatable-th-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
|
|
658
|
-
/* #465: 12px per the comment above (and Attio's measured header cell
|
|
673
|
+
/* #465: 12px per the comment above (and Attio's measured header cell
|
|
674
|
+
padding: 0 12px) -- was still c.space["2"] (8px), drifted from its
|
|
675
|
+
own documented value. */
|
|
659
676
|
& .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; }
|
|
660
|
-
/* A right-aligned column's header keeps its field-icon + label packed at
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
end of a flex-start row with no override needed -- that's what pins the trailing icon on Attio too. */
|
|
677
|
+
/* 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
|
|
678
|
+
count") keeps the icon+label left and only the trailing column-menu
|
|
679
|
+
icon sits pinned to the right edge, independent of the label's width (#406, reversing #393's own justify-content: flex-end here). The
|
|
680
|
+
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
|
|
681
|
+
the trailing icon on Attio too. */
|
|
666
682
|
& .crisp-datatable-chevron { margin-inline-start: auto; flex-shrink: 0; color: var(--crisp-fg-muted); opacity: 0; transition: opacity .12s; }
|
|
667
683
|
& .crisp-datatable-sort:hover .crisp-datatable-chevron { opacity: 0.6; }
|
|
668
684
|
& .crisp-datatable-sort[data-sorted] .crisp-datatable-chevron { opacity: 1; color: var(--crisp-fg-primary); }
|
|
669
685
|
/* sticky first column(s) + horizontal scroll shadow — RecordsTable's feel */
|
|
670
686
|
& th[data-sticky], & td[data-sticky] { position: sticky; z-index: 1; background: var(--crisp-bg-surface); }
|
|
671
|
-
& th[data-sticky] { z-index: 3;
|
|
672
|
-
|
|
673
|
-
`tfoot td { z-index: 2 }
|
|
674
|
-
`), which `td[data-sticky]`'s own higher-specificity
|
|
675
|
-
`z-index: 1` would otherwise undercut -- keep it level with the row it's in. */
|
|
687
|
+
& th[data-sticky] { z-index: 3; }
|
|
688
|
+
/* #554: a footer sticky-column cell sits in the bottom-sticky row (table.recipe.ts's
|
|
689
|
+
`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. */
|
|
676
690
|
& tfoot td[data-sticky] { z-index: 2; }
|
|
677
691
|
& tbody tr[data-selected] td[data-sticky] { background: color-mix(in srgb, var(--crisp-bg-brand-solid) 10%, var(--crisp-bg-surface)); }
|
|
678
692
|
& tbody tr:hover td[data-sticky] { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, var(--crisp-bg-surface)); }
|
|
@@ -689,88 +703,98 @@
|
|
|
689
703
|
& tbody tr[data-selected] td { background: color-mix(in srgb, var(--crisp-bg-brand-solid) 10%, var(--crisp-bg-surface)); }
|
|
690
704
|
& 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))); }
|
|
691
705
|
& .crisp-datatable-editable:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, var(--crisp-bg-surface)); cursor: text; }
|
|
692
|
-
/* crisp/#758: AI-enriched column marker, ported from RecordsTable's own
|
|
693
|
-
|
|
706
|
+
/* crisp/#758: AI-enriched column marker, ported from RecordsTable's own
|
|
707
|
+
already-measured value -- a full-bleed #9b69ff (bgPurple) wash at 4%,
|
|
708
|
+
composited OVER whatever row-state background the cell already has
|
|
709
|
+
(hover, selected), which is why it's an ::after overlay and not a plain background. */
|
|
694
710
|
& td[data-enriched]::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: color-mix(in srgb, var(--crisp-bg-purple) 4%, transparent); }
|
|
695
711
|
& .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; }
|
|
696
712
|
& .crisp-datatable-edit:focus { box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); }
|
|
697
|
-
/* An async onEdit's in-flight state (#385) -- the field/picker dims and
|
|
713
|
+
/* An async onEdit's in-flight state (#385) -- the field/picker dims and
|
|
714
|
+
stops accepting input rather than disappearing, so the just-typed or
|
|
715
|
+
just-chosen value stays visible while its commit is pending. Same
|
|
716
|
+
treatment Input already gives its own disabled state. */
|
|
698
717
|
& .crisp-datatable-edit:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
699
718
|
& .crisp-datatable-edit-pending { flex-shrink: 0; margin-inline-start: var(--crisp-space-1); color: var(--crisp-fg-muted); vertical-align: middle; }
|
|
700
|
-
/* The rejection's message, beside the cell's own content -- a sibling in
|
|
701
|
-
hover-only wrapper (a Tooltip, say) around a custom render can't hide
|
|
702
|
-
|
|
719
|
+
/* The rejection's message, beside the cell's own content -- a sibling in
|
|
720
|
+
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
|
|
721
|
+
it. Block-level: the row grows to fit it rather than floating over
|
|
722
|
+
the row below, so it can never end up clipped by the scroll
|
|
723
|
+
container's overflow the way a position:fixed escape would need guarding against. */
|
|
703
724
|
& .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); }
|
|
704
|
-
/* editor: "select"/"switch" -- always live, no separate edit mode, so
|
|
705
|
-
|
|
706
|
-
RecordsTable's own --picker cells (measured there already; DataTable shares RecordsTable's grid, Golden Rule 0). */
|
|
725
|
+
/* 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
|
|
726
|
+
shares RecordsTable's grid, Golden Rule 0). */
|
|
707
727
|
& .crisp-datatable-td--picker { padding: 0; }
|
|
708
728
|
& .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); }
|
|
709
729
|
& .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; }
|
|
710
730
|
& .crisp-datatable-td--picker .crisp-datatable-edit-error { padding-inline-start: var(--crisp-space-2); }
|
|
711
|
-
/* reference picker: a leading 16px avatar per option, plus a trailing
|
|
712
|
-
"Create X" row when the consumer supplies one (#449) -- same measured
|
|
713
|
-
values as RecordsTable's own .crisp-recordstable-refoption*. */
|
|
731
|
+
/* 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*. */
|
|
714
732
|
& .crisp-datatable-refoption { display: flex; align-items: center; gap: var(--crisp-space-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
715
733
|
& .crisp-datatable-refoption-avatar { flex-shrink: 0; }
|
|
716
734
|
& .crisp-datatable-refoption--create { color: var(--crisp-fg-muted); }
|
|
717
735
|
& .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); }
|
|
718
|
-
/* #579: click-to-expand overlay for a truncated cell -- a read-only,
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
for
|
|
736
|
+
/* #579: click-to-expand overlay for a truncated cell -- a read-only,
|
|
737
|
+
full-value card, settled live as click (not Attio's usual hover-expand) and measured position: absolute, unlike this file's
|
|
738
|
+
floating chrome (Menu/Select popovers) which portals and escapes the
|
|
739
|
+
scroll container. Deliberately NOT the edit-error pattern above
|
|
740
|
+
(grow the row, block-level, never clipped): a virtualized grid
|
|
741
|
+
assumes a fixed row height for its scroll math (owned by the grid
|
|
742
|
+
core, not this cell), so growing a row here would fight it. Anchored
|
|
743
|
+
to the SAME column width the cell itself renders at (measured:
|
|
744
|
+
Attio's own overlay came out only slightly wider than the triggering cell's clientWidth -- the overshoot is this padding),
|
|
745
|
+
wrapping onto as many lines as the value needs; it CAN be clipped by
|
|
746
|
+
`.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. */
|
|
724
747
|
& td[data-cell-expanded] { overflow: visible; z-index: 7; }
|
|
725
|
-
& .crisp-datatable-cell-overlay {
|
|
726
|
-
position: absolute; inset-inline-start: 0; top: 0; width: 100%; box-sizing: border-box;
|
|
727
|
-
padding: var(--crisp-space-2) var(--crisp-space-3); background: var(--crisp-bg-surface);
|
|
728
|
-
border: 1px solid var(--crisp-bg-brand-solid); border-radius: 4px;
|
|
729
|
-
font-family: var(--crisp-font-sans); font-size: var(--crisp-text-lg); line-height: 20px; font-weight: var(--crisp-weight-medium);
|
|
730
|
-
color: var(--crisp-fg-primary); white-space: normal; word-break: break-word; cursor: default;
|
|
731
|
-
}
|
|
748
|
+
& .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; }
|
|
732
749
|
/* fixed layout so column widths (and resize) are exact — like RecordsTable */
|
|
733
750
|
& table { table-layout: fixed; }
|
|
734
|
-
/* read-only/computed column marker (#596) -- sits just inside the
|
|
735
|
-
resize handle, same absolute-positioned-against-the-th approach the
|
|
736
|
-
handle itself uses, since th has zero padding and the button/inner
|
|
737
|
-
row fills the whole cell with no room left for a trailing sibling. */
|
|
751
|
+
/* 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. */
|
|
738
752
|
& .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; }
|
|
739
753
|
/* column resize grip */
|
|
740
754
|
& .crisp-datatable-resize { position: absolute; top: 0; inset-inline-end: -3px; width: 9px; height: 100%; cursor: col-resize; z-index: 6; touch-action: none; }
|
|
741
755
|
& .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; }
|
|
742
756
|
& .crisp-datatable-resize:hover::after, & .crisp-datatable-resize[data-resizing]::after { opacity: 1; }
|
|
743
|
-
/* crisp/#731 -- column drag-to-reorder. Measured live against Attio's
|
|
744
|
-
opacity and the plain `pointer` cursor throughout (Attio draws no
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
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. */
|
|
757
|
+
/* crisp/#731 -- column drag-to-reorder. Measured live against Attio's
|
|
758
|
+
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
|
|
759
|
+
own hover state (above) already uses, positioned on whichever edge of
|
|
760
|
+
the hovered header the pointer is closer to. */
|
|
748
761
|
& th[data-dragging] { cursor: pointer; }
|
|
749
|
-
& th[data-drop-before]::before, & th[data-drop-after]::after {
|
|
762
|
+
& th[data-drop-before]::before, & th[data-drop-after]::after {
|
|
763
|
+
content: ""; position: absolute; top: 0; width: 3px; height: 100%;
|
|
764
|
+
background: var(--crisp-bg-brand-solid); z-index: 6; pointer-events: none;
|
|
765
|
+
}
|
|
750
766
|
& th[data-drop-before]::before { inset-inline-start: -1.5px; }
|
|
751
767
|
& th[data-drop-after]::after { inset-inline-end: -1.5px; }
|
|
752
768
|
/* typed cells — entity (avatar + name), colour-coded tags, numbers, dates */
|
|
753
769
|
& .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); }
|
|
754
|
-
/* crisp/#601 supersession follow-up -- the same flex-row shape
|
|
755
|
-
|
|
756
|
-
|
|
770
|
+
/* crisp/#601 supersession follow-up -- the same flex-row shape
|
|
771
|
+
.crisp-datatable-entity gives its own avatar+name+actions, but
|
|
772
|
+
structural only (no entity-specific colour/weight): lets
|
|
773
|
+
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. */
|
|
757
774
|
& .crisp-datatable-cell-actions-row { display: flex; align-items: center; gap: var(--crisp-space-1-5); min-width: 0; width: 100%; }
|
|
758
|
-
/* crisp/#601, G-050: measured LIVE (getComputedStyle on the name text,
|
|
759
|
-
hover reveal -- identical at rest and on hover: text-decoration-color
|
|
760
|
-
|
|
775
|
+
/* crisp/#601, G-050: measured LIVE (getComputedStyle on the name text,
|
|
776
|
+
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
|
|
777
|
+
colour. The previous :hover-gated, full-contrast rule here was itself
|
|
778
|
+
unmeasured and wrong in two ways at once. */
|
|
761
779
|
& .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); }
|
|
762
780
|
& 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%; }
|
|
763
|
-
/* crisp/#601, G-048: two 20px ghost icons, right-aligned in the primary
|
|
764
|
-
|
|
765
|
-
not just the icons' own hit target -- still reveals them) or
|
|
766
|
-
|
|
767
|
-
|
|
781
|
+
/* crisp/#601, G-048: two 20px ghost icons, right-aligned in the primary
|
|
782
|
+
column, revealed on ROW hover (the issue's own title says "row
|
|
783
|
+
hover", and a live check confirmed hovering well past the name -- not just the icons' own hit target -- still reveals them) or
|
|
784
|
+
keyboard focus. Measured live: border-radius 6px, icon colour
|
|
785
|
+
rgba(0,0,0,0.55) at rest, darkening to the full text colour with a
|
|
786
|
+
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. */
|
|
768
787
|
& .crisp-datatable-entity-actions { display: flex; align-items: center; gap: var(--crisp-space-1-5); margin-inline-start: auto; flex-shrink: 0; opacity: 0; }
|
|
769
788
|
& tr:hover .crisp-datatable-entity-actions, & .crisp-datatable-entity-actions:focus-within { opacity: 1; }
|
|
770
789
|
& .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; }
|
|
771
790
|
& .crisp-datatable-entity-action:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, transparent); color: var(--crisp-fg-primary); }
|
|
772
791
|
& .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); }
|
|
773
|
-
& .crisp-datatable-avatar[data-tone="success"] { background: var(--crisp-bg-success); }
|
|
792
|
+
& .crisp-datatable-avatar[data-tone="success"] { background: var(--crisp-bg-success); }
|
|
793
|
+
& .crisp-datatable-avatar[data-tone="warning"] { background: var(--crisp-bg-warning); }
|
|
794
|
+
& .crisp-datatable-avatar[data-tone="danger"] { background: var(--crisp-bg-danger); }
|
|
795
|
+
& .crisp-datatable-avatar[data-tone="purple"] { background: var(--crisp-bg-purple); }
|
|
796
|
+
& .crisp-datatable-avatar[data-tone="cyan"] { background: var(--crisp-bg-cyan); }
|
|
797
|
+
& .crisp-datatable-avatar[data-tone="orange"] { background: var(--crisp-bg-orange); }
|
|
774
798
|
& .crisp-datatable-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
|
|
775
799
|
& .crisp-datatable-tags { display: flex; align-items: center; gap: var(--crisp-space-1); overflow: hidden; }
|
|
776
800
|
& .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); }
|
|
@@ -783,24 +807,39 @@
|
|
|
783
807
|
& .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)); }
|
|
784
808
|
& .crisp-datatable-num { font-variant-numeric: tabular-nums; }
|
|
785
809
|
& .crisp-datatable-muted { color: var(--crisp-fg-muted); }
|
|
786
|
-
/* url/email cell types (#654) -- same measured values as RecordsTable's
|
|
810
|
+
/* url/email cell types (#654) -- same measured values as RecordsTable's
|
|
811
|
+
own .crisp-recordstable-link, which this mirrors: no underline at
|
|
812
|
+
rest, underline on hover, own-colour text rather than a browser-blue
|
|
813
|
+
link. */
|
|
787
814
|
& .crisp-datatable-link { color: var(--crisp-fg-primary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
|
|
788
815
|
& .crisp-datatable-link:hover { text-decoration: underline; }
|
|
789
|
-
/*
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
816
|
+
/* phone cell type/editor (#765) -- measured live: the dial-code prefix
|
|
817
|
+
is a muted rgba(0,0,0,0.63) at 14px, matching every other muted-text
|
|
818
|
+
value already measured elsewhere in this file. */
|
|
819
|
+
& .crisp-datatable-phone { display: inline-flex; align-items: center; gap: var(--crisp-space-1); }
|
|
820
|
+
& .crisp-datatable-phone-dial { color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); }
|
|
821
|
+
& .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); }
|
|
822
|
+
& .crisp-datatable-phone-editor input { flex: 1; min-width: 0; }
|
|
823
|
+
/* datetime cell editor (#762) -- DatePickerField + TimePicker side by side. */
|
|
824
|
+
& .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); }
|
|
825
|
+
/* rating cell type/editor (#760) -- measured live: 16px stars on an
|
|
826
|
+
18px pitch (a 2px gap), an empty star at rgba(0,0,0,0.1), a
|
|
827
|
+
committed/filled star at brand600 (--crisp-bg-brand-solid, an exact
|
|
828
|
+
match to the measured #266df0), and a distinct hover-preview colour
|
|
829
|
+
-- 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
|
|
830
|
+
crisp-datatable-rating-star class on the svg itself (not the
|
|
831
|
+
button), so one set of fill rules covers both -- the button only
|
|
832
|
+
adds its own reset + cursor via a separate -btn class. */
|
|
793
833
|
& .crisp-datatable-rating { display: inline-flex; align-items: center; gap: 2px; }
|
|
794
834
|
& .crisp-datatable-rating-star { display: block; }
|
|
795
835
|
& .crisp-datatable-rating-star path { fill: rgba(0, 0, 0, 0.1); }
|
|
796
836
|
& .crisp-datatable-rating-star[data-filled] path { fill: var(--crisp-bg-brand-solid); }
|
|
797
837
|
& .crisp-datatable-rating-star[data-hovering] path { fill: #215bc4; }
|
|
798
838
|
& .crisp-datatable-rating-star-btn { display: inline-flex; padding: 0; margin: 0; border: none; background: none; font-family: inherit; cursor: pointer; }
|
|
799
|
-
/* row drag-to-reorder -- a Settings > Objects > Attributes screen measures
|
|
800
|
-
hairline doubling as the drop indicator (it tints toward the brand
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
pointer-events implementation. */
|
|
839
|
+
/* row drag-to-reorder -- a Settings > Objects > Attributes screen measures
|
|
840
|
+
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
|
|
841
|
+
draggable + dataTransfer, the same one column reorder already uses
|
|
842
|
+
(RecordsTable's reorderColumn) -- not a proprietary pointer-events implementation. */
|
|
804
843
|
& .crisp-datatable-col-grip { width: 20px; padding: 0; text-align: center; }
|
|
805
844
|
& .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; }
|
|
806
845
|
& .crisp-datatable-grip:active { cursor: grabbing; }
|