@crisp-ui-kit/crisp 0.52.4 → 0.52.5
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/board.css +6 -6
- package/dist/board.layered.css +6 -6
- package/dist/cjs/components/datatable/datatable.recipe.js +4 -1
- package/dist/cjs/components/input/input.recipe.js +6 -1
- package/dist/cjs/components/switch/switch.recipe.js +4 -0
- package/dist/cjs/components/table/table.recipe.js +5 -1
- package/dist/cjs/components/textarea/textarea.recipe.js +6 -1
- package/dist/cjs/product/board/board.recipe.js +16 -6
- package/dist/cjs/tokens/elevation.js +17 -2
- package/dist/cjs/tokens/palette.js +17 -0
- package/dist/cjs/tokens/semantic.js +2 -0
- package/dist/datatable.css +30 -24
- package/dist/datatable.layered.css +30 -24
- package/dist/esm/components/datatable/datatable.recipe.js +4 -1
- package/dist/esm/components/input/input.recipe.js +6 -1
- package/dist/esm/components/switch/switch.recipe.js +4 -0
- package/dist/esm/components/table/table.recipe.js +5 -1
- package/dist/esm/components/textarea/textarea.recipe.js +6 -1
- package/dist/esm/product/board/board.recipe.js +16 -6
- package/dist/esm/tokens/elevation.js +17 -2
- package/dist/esm/tokens/palette.js +17 -0
- package/dist/esm/tokens/semantic.js +2 -0
- package/dist/input.css +1 -1
- package/dist/input.layered.css +1 -1
- package/dist/native/tokens.d.ts +1 -1
- package/dist/native/tokens.js +8 -0
- package/dist/styles.css +46 -34
- package/dist/styles.layered.css +46 -34
- package/dist/switch.css +1 -1
- package/dist/switch.layered.css +1 -1
- package/dist/table.css +3 -1
- package/dist/table.layered.css +3 -1
- package/dist/textarea.css +1 -1
- package/dist/textarea.layered.css +1 -1
- package/dist/tokens.css +4 -0
- package/dist/tokens.json +8 -0
- package/dist/types/components/switch/switch.recipe.d.ts +1 -0
- package/dist/types/tokens/contract.d.ts +2 -0
- package/dist/types/tokens/elevation.d.ts +17 -2
- package/dist/types/tokens/palette.d.ts +8 -0
- package/dist/types/tokens/semantic.d.ts +2 -0
- package/package.json +1 -1
package/dist/board.css
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
.crisp-board {
|
|
2
|
-
display: flex; gap: var(--crisp-space-
|
|
3
|
-
& .crisp-board-col { display: flex; flex-direction: column; width:
|
|
2
|
+
display: flex; gap: var(--crisp-space-2); height: 100%; box-sizing: border-box; padding: var(--crisp-space-3); overflow-x: auto; align-items: flex-start; font-family: var(--crisp-font-sans);
|
|
3
|
+
& .crisp-board-col { display: flex; flex-direction: column; width: 268px; flex-shrink: 0; max-height: 100%; box-sizing: border-box; }
|
|
4
4
|
& .crisp-board-col-header { display: flex; align-items: center; gap: var(--crisp-space-2); height: 36px; padding: 0 var(--crisp-space-1); flex-shrink: 0; }
|
|
5
|
-
& .crisp-board-col-dot { width:
|
|
5
|
+
& .crisp-board-col-dot { width: 12px; height: 12px; border-radius: var(--crisp-radius-full); flex-shrink: 0; }
|
|
6
6
|
& .crisp-board-col-title { font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-semibold); color: var(--crisp-fg-primary); }
|
|
7
|
-
& .crisp-board-col-count { font-size: var(--crisp-text-
|
|
8
|
-
& .crisp-board-col-add { display: inline-flex; align-items: center; justify-content: center; width:
|
|
7
|
+
& .crisp-board-col-count { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 var(--crisp-space-1); border-radius: var(--crisp-radius-sm); background: color-mix(in srgb, var(--crisp-fg-primary) 4%, transparent); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); }
|
|
8
|
+
& .crisp-board-col-add { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-inline-start: auto; padding: 0; border: none; border-radius: var(--crisp-radius-sm); background: none; color: var(--crisp-fg-muted); font-family: inherit; cursor: pointer; }
|
|
9
9
|
& .crisp-board-col-add:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); color: var(--crisp-fg-primary); }
|
|
10
10
|
& .crisp-board-col-body { display: flex; flex-direction: column; gap: var(--crisp-space-2); flex: 1; min-height: 48px; padding: var(--crisp-space-1); border-radius: var(--crisp-radius-lg); overflow-y: auto; transition: background 0.12s; }
|
|
11
11
|
& .crisp-board-col[data-over] .crisp-board-col-body { background: color-mix(in srgb, var(--crisp-bg-brand-solid) 7%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-bg-brand-solid) 30%, transparent); }
|
|
12
12
|
& .crisp-board-newcard { display: flex; align-items: center; justify-content: center; gap: var(--crisp-space-1-5); height: 32px; flex-shrink: 0; border: none; border-radius: var(--crisp-radius-md); background: color-mix(in srgb, var(--crisp-fg-primary) 4%, transparent); color: var(--crisp-fg-muted); font-family: inherit; font-size: var(--crisp-text-md); font-weight: var(--crisp-weight-medium); cursor: pointer; }
|
|
13
13
|
& .crisp-board-newcard:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 7%, transparent); color: var(--crisp-fg-primary); }
|
|
14
|
-
& .crisp-board-card { display: flex; flex-direction: column; gap: var(--crisp-space-2); box-sizing: border-box; padding: var(--crisp-space-2-5) var(--crisp-space-3); border-radius: var(--crisp-radius-
|
|
14
|
+
& .crisp-board-card { display: flex; flex-direction: column; gap: var(--crisp-space-2); box-sizing: border-box; padding: var(--crisp-space-2-5) var(--crisp-space-3); border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-border-subtle); cursor: grab; }
|
|
15
15
|
& .crisp-board-card:active { cursor: grabbing; }
|
|
16
16
|
& .crisp-board-card[data-dragging] { opacity: 0.4; }
|
|
17
17
|
& .crisp-board-card:focus { outline: none; }
|
package/dist/board.layered.css
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
@layer crisp-components {
|
|
2
2
|
.crisp-board {
|
|
3
|
-
display: flex; gap: var(--crisp-space-
|
|
4
|
-
& .crisp-board-col { display: flex; flex-direction: column; width:
|
|
3
|
+
display: flex; gap: var(--crisp-space-2); height: 100%; box-sizing: border-box; padding: var(--crisp-space-3); overflow-x: auto; align-items: flex-start; font-family: var(--crisp-font-sans);
|
|
4
|
+
& .crisp-board-col { display: flex; flex-direction: column; width: 268px; flex-shrink: 0; max-height: 100%; box-sizing: border-box; }
|
|
5
5
|
& .crisp-board-col-header { display: flex; align-items: center; gap: var(--crisp-space-2); height: 36px; padding: 0 var(--crisp-space-1); flex-shrink: 0; }
|
|
6
|
-
& .crisp-board-col-dot { width:
|
|
6
|
+
& .crisp-board-col-dot { width: 12px; height: 12px; border-radius: var(--crisp-radius-full); flex-shrink: 0; }
|
|
7
7
|
& .crisp-board-col-title { font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-semibold); color: var(--crisp-fg-primary); }
|
|
8
|
-
& .crisp-board-col-count { font-size: var(--crisp-text-
|
|
9
|
-
& .crisp-board-col-add { display: inline-flex; align-items: center; justify-content: center; width:
|
|
8
|
+
& .crisp-board-col-count { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 var(--crisp-space-1); border-radius: var(--crisp-radius-sm); background: color-mix(in srgb, var(--crisp-fg-primary) 4%, transparent); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); }
|
|
9
|
+
& .crisp-board-col-add { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-inline-start: auto; padding: 0; border: none; border-radius: var(--crisp-radius-sm); background: none; color: var(--crisp-fg-muted); font-family: inherit; cursor: pointer; }
|
|
10
10
|
& .crisp-board-col-add:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); color: var(--crisp-fg-primary); }
|
|
11
11
|
& .crisp-board-col-body { display: flex; flex-direction: column; gap: var(--crisp-space-2); flex: 1; min-height: 48px; padding: var(--crisp-space-1); border-radius: var(--crisp-radius-lg); overflow-y: auto; transition: background 0.12s; }
|
|
12
12
|
& .crisp-board-col[data-over] .crisp-board-col-body { background: color-mix(in srgb, var(--crisp-bg-brand-solid) 7%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-bg-brand-solid) 30%, transparent); }
|
|
13
13
|
& .crisp-board-newcard { display: flex; align-items: center; justify-content: center; gap: var(--crisp-space-1-5); height: 32px; flex-shrink: 0; border: none; border-radius: var(--crisp-radius-md); background: color-mix(in srgb, var(--crisp-fg-primary) 4%, transparent); color: var(--crisp-fg-muted); font-family: inherit; font-size: var(--crisp-text-md); font-weight: var(--crisp-weight-medium); cursor: pointer; }
|
|
14
14
|
& .crisp-board-newcard:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 7%, transparent); color: var(--crisp-fg-primary); }
|
|
15
|
-
& .crisp-board-card { display: flex; flex-direction: column; gap: var(--crisp-space-2); box-sizing: border-box; padding: var(--crisp-space-2-5) var(--crisp-space-3); border-radius: var(--crisp-radius-
|
|
15
|
+
& .crisp-board-card { display: flex; flex-direction: column; gap: var(--crisp-space-2); box-sizing: border-box; padding: var(--crisp-space-2-5) var(--crisp-space-3); border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-border-subtle); cursor: grab; }
|
|
16
16
|
& .crisp-board-card:active { cursor: grabbing; }
|
|
17
17
|
& .crisp-board-card[data-dragging] { opacity: 0.4; }
|
|
18
18
|
& .crisp-board-card:focus { outline: none; }
|
|
@@ -50,7 +50,10 @@ const config = (0, core_1.defineRecipe)({
|
|
|
50
50
|
& .crisp-datatable-th-rename { width: 100%; min-width: 0; height: ${tokens_1.contract.size.row}; margin: 0; padding: 0 ${tokens_1.contract.space["1"]}; border: none; border-radius: ${tokens_1.contract.radius.md}; background: ${tokens_1.contract.bgSurface}; box-shadow: inset 0 0 0 1px ${tokens_1.contract.bgBrandSolid}; font-family: inherit; font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.medium}; color: ${tokens_1.contract.fgPrimary}; outline: none; }
|
|
51
51
|
& .crisp-datatable-th-rename:focus { box-shadow: inset 0 0 0 1px ${tokens_1.contract.bgBrandSolid}; }
|
|
52
52
|
& .crisp-datatable-th-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
|
|
53
|
-
|
|
53
|
+
/* #465: 12px per the comment above (and Attio's measured header cell
|
|
54
|
+
padding: 0 12px) -- was still c.space["2"] (8px), drifted from its
|
|
55
|
+
own documented value. */
|
|
56
|
+
& .crisp-datatable-sort { display: flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; width: 100%; min-width: 0; height: 100%; margin: 0; padding: 0 ${tokens_1.contract.space["3"]}; border: none; background: none; font: inherit; letter-spacing: inherit; color: inherit; text-align: start; cursor: pointer; }
|
|
54
57
|
/* A right-aligned column's header keeps its field-icon + label packed at
|
|
55
58
|
the START, matching its own values only in that the VALUES right-align
|
|
56
59
|
-- Attio's own right-aligned header (measured live: "Twitter follower
|
|
@@ -4,6 +4,11 @@ exports.inputRecipe = void 0;
|
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
6
|
// Geometry is measured: 32/36px tall, r8/r10, 10/12px side padding.
|
|
7
|
+
// The shadow is `elevation.textField` (#466), not `elevation.field` — a real
|
|
8
|
+
// typed field on Attio's own Settings page carries one 1px ring, not
|
|
9
|
+
// `field`'s button-chrome glow/drop-shadow layers too; `field`'s own doc
|
|
10
|
+
// comment had claimed "inputs, textareas" among its consumers, which this
|
|
11
|
+
// corrects.
|
|
7
12
|
// The FOCUS TREATMENT is seed-design's, measured from @seed-design/css: a 2px
|
|
8
13
|
// ring on an ::after overlay that is present-but-transparent at rest, so
|
|
9
14
|
// focusing cannot shift layout the way a width change would, and animates
|
|
@@ -18,7 +23,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
18
23
|
name: "input",
|
|
19
24
|
base: `
|
|
20
25
|
position: relative; box-sizing: border-box; display: inline-flex; align-items: center;
|
|
21
|
-
width: 100%; background: ${tokens_1.contract.bgSurface}; box-shadow: ${tokens_1.elevation.
|
|
26
|
+
width: 100%; background: ${tokens_1.contract.bgSurface}; box-shadow: ${tokens_1.elevation.textField};
|
|
22
27
|
font-family: ${tokens_1.contract.font.sans}; font-size: ${tokens_1.contract.text.lg}; line-height: 20px;
|
|
23
28
|
|
|
24
29
|
&::after {
|
|
@@ -6,6 +6,9 @@ const tokens_1 = require("../../tokens");
|
|
|
6
6
|
// A settings toggle, measured from the live app: a 24×16 pill track that
|
|
7
7
|
// flips from a muted grey to brand blue (#266df0), with a 12px white thumb
|
|
8
8
|
// (2px inset) that slides 8px across. background + transform both animate .2s.
|
|
9
|
+
// The thumb also carries a 1px ring (#463, `rgb(217,218,222)`) — missed in
|
|
10
|
+
// the original measurement pass; without it the white thumb has no defined
|
|
11
|
+
// edge against the track's own light grey.
|
|
9
12
|
const spec = (0, core_1.defineSpec)({
|
|
10
13
|
name: "switch",
|
|
11
14
|
base: {
|
|
@@ -33,6 +36,7 @@ const spec = (0, core_1.defineSpec)({
|
|
|
33
36
|
margin: "0 2px",
|
|
34
37
|
borderRadius: tokens_1.contract.radius.full,
|
|
35
38
|
background: "#fff",
|
|
39
|
+
boxShadow: `0 0 0 1px ${tokens_1.contract.ringSwitch}`,
|
|
36
40
|
transition: "transform .2s ease",
|
|
37
41
|
},
|
|
38
42
|
},
|
|
@@ -13,7 +13,11 @@ const config = (0, core_1.defineRecipe)({
|
|
|
13
13
|
base: `display: block; box-sizing: border-box; background: ${tokens_1.contract.bgSurface};
|
|
14
14
|
& .crisp-table-scroll { overflow-x: auto; }
|
|
15
15
|
& table { width: 100%; border-collapse: separate; border-spacing: 0; font-family: ${tokens_1.contract.font.sans}; font-size: ${tokens_1.contract.text.lg}; color: ${tokens_1.contract.fgPrimary}; }
|
|
16
|
-
|
|
16
|
+
/* #465: 12px, not crisp's old 8px -- measured on a live header cell
|
|
17
|
+
(padding: 0 12px) and independently on a body cell's text inset
|
|
18
|
+
(getBoundingClientRect delta from the cell edge). Matches
|
|
19
|
+
ColumnCalc's own already-correct 12px trigger inset. */
|
|
20
|
+
& th, & td { position: relative; height: ${tokens_1.contract.size.tableRow}; padding: 0 ${tokens_1.contract.space["3"]}; border-bottom: 1px solid ${tokens_1.contract.borderSubtle}; border-inline-end: 1px solid ${tokens_1.contract.borderSubtle}; text-align: start; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
17
21
|
& th { height: ${tokens_1.contract.size.tableHeader}; background: ${tokens_1.contract.bgSurface}; border-top: 1px solid ${tokens_1.contract.borderSubtle}; font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.medium}; letter-spacing: -0.14px; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 63%, transparent); user-select: none; }
|
|
18
22
|
& td { color: ${tokens_1.contract.fgPrimary}; background: ${tokens_1.contract.bgSurface}; }
|
|
19
23
|
& th:last-child, & td:last-child { border-inline-end: none; }
|
|
@@ -7,6 +7,11 @@ const tokens_1 = require("../../tokens");
|
|
|
7
7
|
// optional character counter pinned bottom-right (12px, muted). Focus rings
|
|
8
8
|
// the field brand.
|
|
9
9
|
//
|
|
10
|
+
// The ring is `elevation.textField` (#466), not `elevation.field` — this
|
|
11
|
+
// comment already correctly described "an inset 1px ring", but the code
|
|
12
|
+
// pulled in `field`'s own button-chrome shadow (a ring PLUS a glow and a
|
|
13
|
+
// drop-shadow layer), which live Attio never carries on a real typed field.
|
|
14
|
+
//
|
|
10
15
|
// The inset is seed-design's, not Attio's -- the second deliberate divergence
|
|
11
16
|
// after the focus treatment. seed's text-input sets its inline inset to
|
|
12
17
|
// `$dimension.x3_5`, which rootage/dimension.yaml gives as **14px**, against
|
|
@@ -23,7 +28,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
23
28
|
& .crisp-textarea-field {
|
|
24
29
|
box-sizing: border-box; display: block; width: 100%; min-height: 80px; resize: vertical;
|
|
25
30
|
margin: 0; padding: ${tokens_1.contract.space["2.5"]} 14px; border: none; border-radius: ${tokens_1.contract.radius.md};
|
|
26
|
-
background: ${tokens_1.contract.bgSurface}; box-shadow: ${tokens_1.elevation.
|
|
31
|
+
background: ${tokens_1.contract.bgSurface}; box-shadow: ${tokens_1.elevation.textField};
|
|
27
32
|
font-family: inherit; font-size: ${tokens_1.contract.text.lg}; line-height: 20px; color: ${tokens_1.contract.fgPrimary};
|
|
28
33
|
outline: none; transition: box-shadow .15s ease;
|
|
29
34
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
@@ -6,21 +6,31 @@ const tokens_1 = require("../../tokens");
|
|
|
6
6
|
// A kanban board — measured from a Deals pipeline: horizontally scrolling
|
|
7
7
|
// columns (dot + title + count header, a "New" button, a stack of draggable
|
|
8
8
|
// cards), with the hovered drop column highlighted.
|
|
9
|
+
//
|
|
10
|
+
// Re-measured directly against a live Deals pipeline board (#463): column
|
|
11
|
+
// 268px (was an unmeasured 280), 8px gap between columns (was space[3]/12,
|
|
12
|
+
// measured space[2]), the stage dot 12x12 (was a guessed 9x9), the header's
|
|
13
|
+
// "+" 20x20 at radius.sm (was 24x24 at radius.md), the count as a filled
|
|
14
|
+
// 16px pill rather than bare text, and the card at radius.xl/12px (was
|
|
15
|
+
// radius.lg/9) with a single measured 1px ring and no second shadow layer —
|
|
16
|
+
// the extra `0 1px 2px rgba(0,0,0,0.04)` layer doesn't exist on the
|
|
17
|
+
// reference card at all (see AUTHORING Lesson 22: don't add polish the
|
|
18
|
+
// reference lacks).
|
|
9
19
|
const config = (0, core_1.defineRecipe)({
|
|
10
20
|
name: "board",
|
|
11
|
-
base: `display: flex; gap: ${tokens_1.contract.space["
|
|
12
|
-
& .crisp-board-col { display: flex; flex-direction: column; width:
|
|
21
|
+
base: `display: flex; gap: ${tokens_1.contract.space["2"]}; height: 100%; box-sizing: border-box; padding: ${tokens_1.contract.space["3"]}; overflow-x: auto; align-items: flex-start; font-family: ${tokens_1.contract.font.sans};
|
|
22
|
+
& .crisp-board-col { display: flex; flex-direction: column; width: 268px; flex-shrink: 0; max-height: 100%; box-sizing: border-box; }
|
|
13
23
|
& .crisp-board-col-header { display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; height: 36px; padding: 0 ${tokens_1.contract.space["1"]}; flex-shrink: 0; }
|
|
14
|
-
& .crisp-board-col-dot { width:
|
|
24
|
+
& .crisp-board-col-dot { width: 12px; height: 12px; border-radius: ${tokens_1.contract.radius.full}; flex-shrink: 0; }
|
|
15
25
|
& .crisp-board-col-title { font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.semibold}; color: ${tokens_1.contract.fgPrimary}; }
|
|
16
|
-
& .crisp-board-col-count { font-size: ${tokens_1.contract.text.
|
|
17
|
-
& .crisp-board-col-add { display: inline-flex; align-items: center; justify-content: center; width:
|
|
26
|
+
& .crisp-board-col-count { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius.sm}; background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 4%, transparent); font-size: ${tokens_1.contract.text.sm}; font-weight: ${tokens_1.contract.weight.medium}; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 63%, transparent); }
|
|
27
|
+
& .crisp-board-col-add { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-inline-start: auto; padding: 0; border: none; border-radius: ${tokens_1.contract.radius.sm}; background: none; color: ${tokens_1.contract.fgMuted}; font-family: inherit; cursor: pointer; }
|
|
18
28
|
& .crisp-board-col-add:hover { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 6%, transparent); color: ${tokens_1.contract.fgPrimary}; }
|
|
19
29
|
& .crisp-board-col-body { display: flex; flex-direction: column; gap: ${tokens_1.contract.space["2"]}; flex: 1; min-height: 48px; padding: ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius.lg}; overflow-y: auto; transition: background 0.12s; }
|
|
20
30
|
& .crisp-board-col[data-over] .crisp-board-col-body { background: color-mix(in srgb, ${tokens_1.contract.bgBrandSolid} 7%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${tokens_1.contract.bgBrandSolid} 30%, transparent); }
|
|
21
31
|
& .crisp-board-newcard { display: flex; align-items: center; justify-content: center; gap: ${tokens_1.contract.space["1.5"]}; height: 32px; flex-shrink: 0; border: none; border-radius: ${tokens_1.contract.radius.md}; background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 4%, transparent); color: ${tokens_1.contract.fgMuted}; font-family: inherit; font-size: ${tokens_1.contract.text.md}; font-weight: ${tokens_1.contract.weight.medium}; cursor: pointer; }
|
|
22
32
|
& .crisp-board-newcard:hover { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 7%, transparent); color: ${tokens_1.contract.fgPrimary}; }
|
|
23
|
-
& .crisp-board-card { display: flex; flex-direction: column; gap: ${tokens_1.contract.space["2"]}; box-sizing: border-box; padding: ${tokens_1.contract.space["2.5"]} ${tokens_1.contract.space["3"]}; border-radius: ${tokens_1.contract.radius.
|
|
33
|
+
& .crisp-board-card { display: flex; flex-direction: column; gap: ${tokens_1.contract.space["2"]}; box-sizing: border-box; padding: ${tokens_1.contract.space["2.5"]} ${tokens_1.contract.space["3"]}; border-radius: ${tokens_1.contract.radius.xl}; background: ${tokens_1.contract.bgSurface}; box-shadow: inset 0 0 0 1px ${tokens_1.contract.borderSubtle}; cursor: grab; }
|
|
24
34
|
& .crisp-board-card:active { cursor: grabbing; }
|
|
25
35
|
& .crisp-board-card[data-dragging] { opacity: 0.4; }
|
|
26
36
|
& .crisp-board-card:focus { outline: none; }
|
|
@@ -27,8 +27,16 @@ exports.elevation = {
|
|
|
27
27
|
*/
|
|
28
28
|
modal: `0 8px 28px -6px ${contract_1.contract.shadowOverlay1}, 0 18px 88px -4px ${contract_1.contract.shadowOverlay2}, 0 0 1px ${contract_1.contract.shadowOverlay3}`,
|
|
29
29
|
/**
|
|
30
|
-
* The neutral/outlined
|
|
31
|
-
* sidebar search, record-page
|
|
30
|
+
* The neutral/outlined BUTTON-CHROME shadow — real buttons only: the
|
|
31
|
+
* sidebar search trigger, record-page action buttons, table toolbar
|
|
32
|
+
* buttons. #466 corrects this doc comment's own former claim that it
|
|
33
|
+
* covers "inputs, textareas" too — it doesn't: a live Attio text field
|
|
34
|
+
* (Settings page, a real typed input) measures a single 1px ring, none of
|
|
35
|
+
* this token's glow/drop-shadow layers. Confirmed the other direction
|
|
36
|
+
* too — Attio's own white-filled chrome buttons ("Inbox", "Ask Attio",
|
|
37
|
+
* "All Companies" view chip) match this three-layer value exactly, so the
|
|
38
|
+
* token itself was right; only Input/Textarea's use of it was wrong. See
|
|
39
|
+
* `textField` below for the real field shadow.
|
|
32
40
|
*
|
|
33
41
|
* The two raw values **are** the measured value (Lessons 22 and 29) and
|
|
34
42
|
* must stay raw. `rgba(0,0,0,0.04)` equals `tileActiveShadow`'s light value by
|
|
@@ -36,6 +44,13 @@ exports.elevation = {
|
|
|
36
44
|
* dark mode. Only the ring is theme-aware, via `ringNeutral`.
|
|
37
45
|
*/
|
|
38
46
|
field: `inset 0 0 0 1px ${contract_1.contract.ringNeutral}, 0 0 2px rgba(28,40,64,0.18), 0 1px 3px rgba(0,0,0,0.04)`,
|
|
47
|
+
/**
|
|
48
|
+
* A real text-entry field (Input, Textarea) — measured live on Attio's
|
|
49
|
+
* Settings page: one 1px inset ring, nothing else (#466). Distinct from
|
|
50
|
+
* `field` above, which is button chrome and carries two extra shadow
|
|
51
|
+
* layers a typed field never has.
|
|
52
|
+
*/
|
|
53
|
+
textField: `inset 0 0 0 1px ${contract_1.contract.ringField}`,
|
|
39
54
|
/**
|
|
40
55
|
* The same control shadow **without** the theme-aware ring. Lesson 29 added
|
|
41
56
|
* the ring to the neutral-button family but deliberately left `trialbanner`
|
|
@@ -13,6 +13,23 @@ exports.palette = {
|
|
|
13
13
|
line200: { light: "#e4e4e7", dark: "#212224" },
|
|
14
14
|
line100: { light: "#eeeff1", dark: "#1c1d1f" },
|
|
15
15
|
ringNeutral: { light: "transparent", dark: "#212224" },
|
|
16
|
+
// Text-entry fields (Input, Textarea) — measured live on app.attio.com's
|
|
17
|
+
// Settings page, a real typed field: `inset 0 0 0 1px rgba(0,0,0,.06)`,
|
|
18
|
+
// ONE layer, not `elevation.field`'s button-chrome three (that token's own
|
|
19
|
+
// doc comment claimed "inputs, textareas" among its consumers; #466
|
|
20
|
+
// corrects it — a real field never carried the extra glow/drop-shadow
|
|
21
|
+
// layers, only its own 1px ring). Dark value not independently
|
|
22
|
+
// re-measured (Attio's own theme setting is off-limits to toggle) — reuses
|
|
23
|
+
// `ringNeutral`/`ringPopover`'s existing dark ring (#212224), the same
|
|
24
|
+
// "edge visible against a dark surface" role those already establish,
|
|
25
|
+
// rather than inventing a new value.
|
|
26
|
+
ringField: { light: "rgba(0,0,0,0.06)", dark: "#212224" },
|
|
27
|
+
// Switch's thumb ring (#463) — measured live, `rgb(217,218,222)` on the
|
|
28
|
+
// white thumb. Dark value not independently re-measured (same Attio-theme
|
|
29
|
+
// restriction as ringField above); the thumb itself stays pure white in
|
|
30
|
+
// both themes (Switch's own spec), so this reuses ringField's dark value
|
|
31
|
+
// rather than inventing a third "field-adjacent ring, dark" colour.
|
|
32
|
+
ringSwitch: { light: "#d9dade", dark: "#212224" },
|
|
16
33
|
tileActive: { light: "#ffffff", dark: "#101112" },
|
|
17
34
|
tileActiveShadow: { light: "rgba(0,0,0,0.04)", dark: "rgba(0,0,0,0)" },
|
|
18
35
|
overlayFrost: { light: "#ffffff", dark: "#1c1d1f" },
|
|
@@ -14,6 +14,8 @@ exports.semantic = {
|
|
|
14
14
|
borderDefault: "line200",
|
|
15
15
|
borderSubtle: "line100",
|
|
16
16
|
ringNeutral: "ringNeutral",
|
|
17
|
+
ringField: "ringField",
|
|
18
|
+
ringSwitch: "ringSwitch",
|
|
17
19
|
bgTileActive: "tileActive",
|
|
18
20
|
shadowTileActive: "tileActiveShadow",
|
|
19
21
|
bgOverlayFrost: "overlayFrost",
|
package/dist/datatable.css
CHANGED
|
@@ -31,13 +31,15 @@
|
|
|
31
31
|
& .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; }
|
|
32
32
|
& .crisp-datatable-th-rename:focus { box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); }
|
|
33
33
|
& .crisp-datatable-th-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
/* #465: 12px per the comment above (and Attio's measured header cell
|
|
35
|
+
padding: 0 12px) -- was still c.space["2"] (8px), drifted from its
|
|
36
|
+
own documented value. */
|
|
37
|
+
& .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; }
|
|
38
|
+
/* 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
|
|
39
|
+
count") keeps the icon+label left and only the trailing column-menu
|
|
40
|
+
icon sits pinned to the right edge, independent of the label's width (#406, reversing #393's own justify-content: flex-end here). The
|
|
41
|
+
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
|
|
42
|
+
the trailing icon on Attio too. */
|
|
41
43
|
& .crisp-datatable-chevron { margin-inline-start: auto; flex-shrink: 0; color: var(--crisp-fg-muted); opacity: 0; transition: opacity .12s; }
|
|
42
44
|
& .crisp-datatable-sort:hover .crisp-datatable-chevron { opacity: 0.6; }
|
|
43
45
|
& .crisp-datatable-sort[data-sorted] .crisp-datatable-chevron { opacity: 1; color: var(--crisp-fg-primary); }
|
|
@@ -61,25 +63,23 @@
|
|
|
61
63
|
& .crisp-datatable-editable:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, var(--crisp-bg-surface)); cursor: text; }
|
|
62
64
|
& .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; }
|
|
63
65
|
& .crisp-datatable-edit:focus { box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); }
|
|
64
|
-
/* An async onEdit's in-flight state (#385) -- the field/picker dims and
|
|
65
|
-
stops accepting input rather than disappearing, so the just-typed or
|
|
66
|
-
just-chosen value stays visible while its commit is pending. Same
|
|
67
|
-
treatment Input already gives its own disabled state. */
|
|
66
|
+
/* 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. */
|
|
68
67
|
& .crisp-datatable-edit:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
69
68
|
& .crisp-datatable-edit-pending { flex-shrink: 0; margin-inline-start: var(--crisp-space-1); color: var(--crisp-fg-muted); vertical-align: middle; }
|
|
70
|
-
/* The rejection's message, beside the cell's own content -- a sibling in
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
the row below, so it can never end up clipped by the scroll
|
|
74
|
-
container's overflow the way a position:fixed escape would need guarding against. */
|
|
69
|
+
/* 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
|
|
70
|
+
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
|
|
71
|
+
guarding against. */
|
|
75
72
|
& .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); }
|
|
76
|
-
/* editor: "select"/"switch" -- always live, no separate edit mode, so
|
|
77
|
-
|
|
73
|
+
/* editor: "select"/"switch" -- always live, no separate edit mode, so
|
|
74
|
+
the cell IS the picker: same chromeless-fill treatment as
|
|
75
|
+
RecordsTable's own --picker cells (measured there already; DataTable shares RecordsTable's grid, Golden Rule 0). */
|
|
78
76
|
& .crisp-datatable-td--picker { padding: 0; }
|
|
79
77
|
& .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); }
|
|
80
78
|
& .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; }
|
|
81
79
|
& .crisp-datatable-td--picker .crisp-datatable-edit-error { padding-inline-start: var(--crisp-space-2); }
|
|
82
|
-
/* reference picker: a leading 16px avatar per option, plus a trailing
|
|
80
|
+
/* reference picker: a leading 16px avatar per option, plus a trailing
|
|
81
|
+
"Create X" row when the consumer supplies one (#449) -- same measured
|
|
82
|
+
values as RecordsTable's own .crisp-recordstable-refoption*. */
|
|
83
83
|
& .crisp-datatable-refoption { display: flex; align-items: center; gap: var(--crisp-space-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
84
84
|
& .crisp-datatable-refoption-avatar { flex-shrink: 0; }
|
|
85
85
|
& .crisp-datatable-refoption--create { color: var(--crisp-fg-muted); }
|
|
@@ -94,7 +94,12 @@
|
|
|
94
94
|
& .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); }
|
|
95
95
|
& .crisp-datatable-entity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
96
96
|
& .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); }
|
|
97
|
-
& .crisp-datatable-avatar[data-tone="success"] { background: var(--crisp-bg-success); }
|
|
97
|
+
& .crisp-datatable-avatar[data-tone="success"] { background: var(--crisp-bg-success); }
|
|
98
|
+
& .crisp-datatable-avatar[data-tone="warning"] { background: var(--crisp-bg-warning); }
|
|
99
|
+
& .crisp-datatable-avatar[data-tone="danger"] { background: var(--crisp-bg-danger); }
|
|
100
|
+
& .crisp-datatable-avatar[data-tone="purple"] { background: var(--crisp-bg-purple); }
|
|
101
|
+
& .crisp-datatable-avatar[data-tone="cyan"] { background: var(--crisp-bg-cyan); }
|
|
102
|
+
& .crisp-datatable-avatar[data-tone="orange"] { background: var(--crisp-bg-orange); }
|
|
98
103
|
& .crisp-datatable-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
|
|
99
104
|
& .crisp-datatable-tags { display: flex; align-items: center; gap: var(--crisp-space-1); overflow: hidden; }
|
|
100
105
|
& .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); }
|
|
@@ -107,10 +112,11 @@
|
|
|
107
112
|
& .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)); }
|
|
108
113
|
& .crisp-datatable-num { font-variant-numeric: tabular-nums; }
|
|
109
114
|
& .crisp-datatable-muted { color: var(--crisp-fg-muted); }
|
|
110
|
-
/* row drag-to-reorder -- a Settings > Objects > Attributes screen measures
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
(RecordsTable's reorderColumn) -- not a proprietary
|
|
115
|
+
/* row drag-to-reorder -- a Settings > Objects > Attributes screen measures a leading 20px grip column, a 16px grip icon, and the row's own
|
|
116
|
+
hairline doubling as the drop indicator (it tints toward the brand
|
|
117
|
+
colour as the active drop target). The affordance + geometry are
|
|
118
|
+
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
|
|
119
|
+
pointer-events implementation. */
|
|
114
120
|
& .crisp-datatable-col-grip { width: 20px; padding: 0; text-align: center; }
|
|
115
121
|
& .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; }
|
|
116
122
|
& .crisp-datatable-grip:active { cursor: grabbing; }
|
|
@@ -32,13 +32,15 @@
|
|
|
32
32
|
& .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; }
|
|
33
33
|
& .crisp-datatable-th-rename:focus { box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); }
|
|
34
34
|
& .crisp-datatable-th-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
/* #465: 12px per the comment above (and Attio's measured header cell
|
|
36
|
+
padding: 0 12px) -- was still c.space["2"] (8px), drifted from its
|
|
37
|
+
own documented value. */
|
|
38
|
+
& .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; }
|
|
39
|
+
/* 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
|
|
40
|
+
count") keeps the icon+label left and only the trailing column-menu
|
|
41
|
+
icon sits pinned to the right edge, independent of the label's width (#406, reversing #393's own justify-content: flex-end here). The
|
|
42
|
+
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
|
|
43
|
+
the trailing icon on Attio too. */
|
|
42
44
|
& .crisp-datatable-chevron { margin-inline-start: auto; flex-shrink: 0; color: var(--crisp-fg-muted); opacity: 0; transition: opacity .12s; }
|
|
43
45
|
& .crisp-datatable-sort:hover .crisp-datatable-chevron { opacity: 0.6; }
|
|
44
46
|
& .crisp-datatable-sort[data-sorted] .crisp-datatable-chevron { opacity: 1; color: var(--crisp-fg-primary); }
|
|
@@ -62,25 +64,23 @@
|
|
|
62
64
|
& .crisp-datatable-editable:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, var(--crisp-bg-surface)); cursor: text; }
|
|
63
65
|
& .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; }
|
|
64
66
|
& .crisp-datatable-edit:focus { box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); }
|
|
65
|
-
/* An async onEdit's in-flight state (#385) -- the field/picker dims and
|
|
66
|
-
stops accepting input rather than disappearing, so the just-typed or
|
|
67
|
-
just-chosen value stays visible while its commit is pending. Same
|
|
68
|
-
treatment Input already gives its own disabled state. */
|
|
67
|
+
/* 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. */
|
|
69
68
|
& .crisp-datatable-edit:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
70
69
|
& .crisp-datatable-edit-pending { flex-shrink: 0; margin-inline-start: var(--crisp-space-1); color: var(--crisp-fg-muted); vertical-align: middle; }
|
|
71
|
-
/* The rejection's message, beside the cell's own content -- a sibling in
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
the row below, so it can never end up clipped by the scroll
|
|
75
|
-
container's overflow the way a position:fixed escape would need guarding against. */
|
|
70
|
+
/* 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
|
|
71
|
+
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
|
|
72
|
+
guarding against. */
|
|
76
73
|
& .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); }
|
|
77
|
-
/* editor: "select"/"switch" -- always live, no separate edit mode, so
|
|
78
|
-
|
|
74
|
+
/* editor: "select"/"switch" -- always live, no separate edit mode, so
|
|
75
|
+
the cell IS the picker: same chromeless-fill treatment as
|
|
76
|
+
RecordsTable's own --picker cells (measured there already; DataTable shares RecordsTable's grid, Golden Rule 0). */
|
|
79
77
|
& .crisp-datatable-td--picker { padding: 0; }
|
|
80
78
|
& .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); }
|
|
81
79
|
& .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; }
|
|
82
80
|
& .crisp-datatable-td--picker .crisp-datatable-edit-error { padding-inline-start: var(--crisp-space-2); }
|
|
83
|
-
/* reference picker: a leading 16px avatar per option, plus a trailing
|
|
81
|
+
/* reference picker: a leading 16px avatar per option, plus a trailing
|
|
82
|
+
"Create X" row when the consumer supplies one (#449) -- same measured
|
|
83
|
+
values as RecordsTable's own .crisp-recordstable-refoption*. */
|
|
84
84
|
& .crisp-datatable-refoption { display: flex; align-items: center; gap: var(--crisp-space-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
85
85
|
& .crisp-datatable-refoption-avatar { flex-shrink: 0; }
|
|
86
86
|
& .crisp-datatable-refoption--create { color: var(--crisp-fg-muted); }
|
|
@@ -95,7 +95,12 @@
|
|
|
95
95
|
& .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); }
|
|
96
96
|
& .crisp-datatable-entity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
97
97
|
& .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); }
|
|
98
|
-
& .crisp-datatable-avatar[data-tone="success"] { background: var(--crisp-bg-success); }
|
|
98
|
+
& .crisp-datatable-avatar[data-tone="success"] { background: var(--crisp-bg-success); }
|
|
99
|
+
& .crisp-datatable-avatar[data-tone="warning"] { background: var(--crisp-bg-warning); }
|
|
100
|
+
& .crisp-datatable-avatar[data-tone="danger"] { background: var(--crisp-bg-danger); }
|
|
101
|
+
& .crisp-datatable-avatar[data-tone="purple"] { background: var(--crisp-bg-purple); }
|
|
102
|
+
& .crisp-datatable-avatar[data-tone="cyan"] { background: var(--crisp-bg-cyan); }
|
|
103
|
+
& .crisp-datatable-avatar[data-tone="orange"] { background: var(--crisp-bg-orange); }
|
|
99
104
|
& .crisp-datatable-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
|
|
100
105
|
& .crisp-datatable-tags { display: flex; align-items: center; gap: var(--crisp-space-1); overflow: hidden; }
|
|
101
106
|
& .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); }
|
|
@@ -108,10 +113,11 @@
|
|
|
108
113
|
& .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)); }
|
|
109
114
|
& .crisp-datatable-num { font-variant-numeric: tabular-nums; }
|
|
110
115
|
& .crisp-datatable-muted { color: var(--crisp-fg-muted); }
|
|
111
|
-
/* row drag-to-reorder -- a Settings > Objects > Attributes screen measures
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
(RecordsTable's reorderColumn) -- not a proprietary
|
|
116
|
+
/* row drag-to-reorder -- a Settings > Objects > Attributes screen measures a leading 20px grip column, a 16px grip icon, and the row's own
|
|
117
|
+
hairline doubling as the drop indicator (it tints toward the brand
|
|
118
|
+
colour as the active drop target). The affordance + geometry are
|
|
119
|
+
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
|
|
120
|
+
pointer-events implementation. */
|
|
115
121
|
& .crisp-datatable-col-grip { width: 20px; padding: 0; text-align: center; }
|
|
116
122
|
& .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; }
|
|
117
123
|
& .crisp-datatable-grip:active { cursor: grabbing; }
|
|
@@ -47,7 +47,10 @@ const config = defineRecipe({
|
|
|
47
47
|
& .crisp-datatable-th-rename { width: 100%; min-width: 0; height: ${c.size.row}; margin: 0; padding: 0 ${c.space["1"]}; border: none; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; color: ${c.fgPrimary}; outline: none; }
|
|
48
48
|
& .crisp-datatable-th-rename:focus { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
|
|
49
49
|
& .crisp-datatable-th-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
|
|
50
|
-
|
|
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. */
|
|
53
|
+
& .crisp-datatable-sort { display: flex; align-items: center; gap: ${c.space["1.5"]}; width: 100%; min-width: 0; height: 100%; margin: 0; padding: 0 ${c.space["3"]}; border: none; background: none; font: inherit; letter-spacing: inherit; color: inherit; text-align: start; cursor: pointer; }
|
|
51
54
|
/* A right-aligned column's header keeps its field-icon + label packed at
|
|
52
55
|
the START, matching its own values only in that the VALUES right-align
|
|
53
56
|
-- Attio's own right-aligned header (measured live: "Twitter follower
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { defineRecipe, resolveRecipe } from "../../core/index.js";
|
|
2
2
|
import { contract as c, elevation as e } from "../../tokens/index.js";
|
|
3
3
|
// Geometry is measured: 32/36px tall, r8/r10, 10/12px side padding.
|
|
4
|
+
// The shadow is `elevation.textField` (#466), not `elevation.field` — a real
|
|
5
|
+
// typed field on Attio's own Settings page carries one 1px ring, not
|
|
6
|
+
// `field`'s button-chrome glow/drop-shadow layers too; `field`'s own doc
|
|
7
|
+
// comment had claimed "inputs, textareas" among its consumers, which this
|
|
8
|
+
// corrects.
|
|
4
9
|
// The FOCUS TREATMENT is seed-design's, measured from @seed-design/css: a 2px
|
|
5
10
|
// ring on an ::after overlay that is present-but-transparent at rest, so
|
|
6
11
|
// focusing cannot shift layout the way a width change would, and animates
|
|
@@ -15,7 +20,7 @@ const config = defineRecipe({
|
|
|
15
20
|
name: "input",
|
|
16
21
|
base: `
|
|
17
22
|
position: relative; box-sizing: border-box; display: inline-flex; align-items: center;
|
|
18
|
-
width: 100%; background: ${c.bgSurface}; box-shadow: ${e.
|
|
23
|
+
width: 100%; background: ${c.bgSurface}; box-shadow: ${e.textField};
|
|
19
24
|
font-family: ${c.font.sans}; font-size: ${c.text.lg}; line-height: 20px;
|
|
20
25
|
|
|
21
26
|
&::after {
|
|
@@ -3,6 +3,9 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
3
3
|
// A settings toggle, measured from the live app: a 24×16 pill track that
|
|
4
4
|
// flips from a muted grey to brand blue (#266df0), with a 12px white thumb
|
|
5
5
|
// (2px inset) that slides 8px across. background + transform both animate .2s.
|
|
6
|
+
// The thumb also carries a 1px ring (#463, `rgb(217,218,222)`) — missed in
|
|
7
|
+
// the original measurement pass; without it the white thumb has no defined
|
|
8
|
+
// edge against the track's own light grey.
|
|
6
9
|
const spec = defineSpec({
|
|
7
10
|
name: "switch",
|
|
8
11
|
base: {
|
|
@@ -30,6 +33,7 @@ const spec = defineSpec({
|
|
|
30
33
|
margin: "0 2px",
|
|
31
34
|
borderRadius: c.radius.full,
|
|
32
35
|
background: "#fff",
|
|
36
|
+
boxShadow: `0 0 0 1px ${c.ringSwitch}`,
|
|
33
37
|
transition: "transform .2s ease",
|
|
34
38
|
},
|
|
35
39
|
},
|
|
@@ -10,7 +10,11 @@ const config = defineRecipe({
|
|
|
10
10
|
base: `display: block; box-sizing: border-box; background: ${c.bgSurface};
|
|
11
11
|
& .crisp-table-scroll { overflow-x: auto; }
|
|
12
12
|
& table { width: 100%; border-collapse: separate; border-spacing: 0; font-family: ${c.font.sans}; font-size: ${c.text.lg}; color: ${c.fgPrimary}; }
|
|
13
|
-
|
|
13
|
+
/* #465: 12px, not crisp's old 8px -- measured on a live header cell
|
|
14
|
+
(padding: 0 12px) and independently on a body cell's text inset
|
|
15
|
+
(getBoundingClientRect delta from the cell edge). Matches
|
|
16
|
+
ColumnCalc's own already-correct 12px trigger inset. */
|
|
17
|
+
& th, & td { position: relative; height: ${c.size.tableRow}; padding: 0 ${c.space["3"]}; border-bottom: 1px solid ${c.borderSubtle}; border-inline-end: 1px solid ${c.borderSubtle}; text-align: start; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
14
18
|
& th { height: ${c.size.tableHeader}; background: ${c.bgSurface}; border-top: 1px solid ${c.borderSubtle}; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; letter-spacing: -0.14px; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); user-select: none; }
|
|
15
19
|
& td { color: ${c.fgPrimary}; background: ${c.bgSurface}; }
|
|
16
20
|
& th:last-child, & td:last-child { border-inline-end: none; }
|
|
@@ -4,6 +4,11 @@ import { contract as c, elevation as e } from "../../tokens/index.js";
|
|
|
4
4
|
// optional character counter pinned bottom-right (12px, muted). Focus rings
|
|
5
5
|
// the field brand.
|
|
6
6
|
//
|
|
7
|
+
// The ring is `elevation.textField` (#466), not `elevation.field` — this
|
|
8
|
+
// comment already correctly described "an inset 1px ring", but the code
|
|
9
|
+
// pulled in `field`'s own button-chrome shadow (a ring PLUS a glow and a
|
|
10
|
+
// drop-shadow layer), which live Attio never carries on a real typed field.
|
|
11
|
+
//
|
|
7
12
|
// The inset is seed-design's, not Attio's -- the second deliberate divergence
|
|
8
13
|
// after the focus treatment. seed's text-input sets its inline inset to
|
|
9
14
|
// `$dimension.x3_5`, which rootage/dimension.yaml gives as **14px**, against
|
|
@@ -20,7 +25,7 @@ const config = defineRecipe({
|
|
|
20
25
|
& .crisp-textarea-field {
|
|
21
26
|
box-sizing: border-box; display: block; width: 100%; min-height: 80px; resize: vertical;
|
|
22
27
|
margin: 0; padding: ${c.space["2.5"]} 14px; border: none; border-radius: ${c.radius.md};
|
|
23
|
-
background: ${c.bgSurface}; box-shadow: ${e.
|
|
28
|
+
background: ${c.bgSurface}; box-shadow: ${e.textField};
|
|
24
29
|
font-family: inherit; font-size: ${c.text.lg}; line-height: 20px; color: ${c.fgPrimary};
|
|
25
30
|
outline: none; transition: box-shadow .15s ease;
|
|
26
31
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|