@crisp-ui-kit/crisp 0.52.1 → 0.52.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/product/recordpage/recordpage.js +86 -7
- package/dist/cjs/product/recordpage/recordpage.recipe.js +7 -0
- package/dist/cjs/product/recordpanel/recordpanel.js +65 -2
- package/dist/cjs/product/recordpanel/recordpanel.recipe.js +37 -0
- package/dist/esm/product/recordpage/recordpage.js +86 -7
- package/dist/esm/product/recordpage/recordpage.recipe.js +7 -0
- package/dist/esm/product/recordpanel/recordpanel.js +66 -3
- package/dist/esm/product/recordpanel/recordpanel.recipe.js +37 -0
- package/dist/recordpage.css +18 -1
- package/dist/recordpage.layered.css +18 -1
- package/dist/recordpanel.css +35 -14
- package/dist/recordpanel.layered.css +35 -14
- package/dist/styles.css +53 -15
- package/dist/styles.layered.css +53 -15
- package/dist/types/product/recordpanel/recordpanel.d.ts +49 -1
- package/package.json +1 -1
package/dist/styles.layered.css
CHANGED
|
@@ -2164,23 +2164,33 @@
|
|
|
2164
2164
|
& .crisp-recordpage-edit:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
2165
2165
|
& .crisp-recordpage-edit-pending { flex-shrink: 0; color: var(--crisp-fg-muted); }
|
|
2166
2166
|
& .crisp-recordpage-edit-error { flex-basis: 100%; margin-top: var(--crisp-space-0-5); font-size: var(--crisp-text-sm); color: var(--crisp-bg-danger); }
|
|
2167
|
+
/* #457: an `editor: "select"` field's at-rest chip -- same shape as
|
|
2168
|
+
RecordsTable's own `.crisp-recordstable-status[-dot]` (already measured against Attio there), but its own classes: that pair is scoped under `.crisp-recordstable`'s own recipe root, so reusing the
|
|
2169
|
+
classnames verbatim here would resolve to nothing. */
|
|
2170
|
+
& .crisp-recordpage-status { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); min-width: 0; }
|
|
2171
|
+
& .crisp-recordpage-status-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: var(--crisp-radius-full); }
|
|
2167
2172
|
& .crisp-recordpage-edit-picker { display: flex; align-items: center; gap: var(--crisp-space-1); width: 100%; }
|
|
2168
2173
|
& .crisp-recordpage-edit-picker .crisp-select-trigger { flex: 1; min-width: 0; }
|
|
2169
2174
|
& .crisp-recordpage-link { color: var(--crisp-fg-primary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
|
|
2170
2175
|
& .crisp-recordpage-link:hover { text-decoration: underline; }
|
|
2171
2176
|
& .crisp-recordpage-emptystate { padding: var(--crisp-space-2) var(--crisp-space-1); font-size: var(--crisp-text-md); color: var(--crisp-fg-muted); }
|
|
2177
|
+
|
|
2172
2178
|
& .crisp-recordpage-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: var(--crisp-space-3) var(--crisp-space-5); }
|
|
2179
|
+
|
|
2173
2180
|
& .crisp-recordpage-panel { padding-top: var(--crisp-space-4); display: flex; flex-direction: column; gap: var(--crisp-space-4); }
|
|
2174
2181
|
& .crisp-recordpage-card { border: 1px solid var(--crisp-border-subtle); border-radius: var(--crisp-radius-2xl); background: var(--crisp-bg-surface); overflow: hidden; }
|
|
2175
2182
|
& .crisp-recordpage-card-title { font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-semibold); letter-spacing: -0.14px; color: var(--crisp-fg-primary); padding: var(--crisp-space-3) var(--crisp-space-3) var(--crisp-space-2); }
|
|
2176
2183
|
& .crisp-recordpage-hl-card { border: 1px solid var(--crisp-border-subtle); border-radius: var(--crisp-radius-2xl); overflow: hidden; }
|
|
2177
|
-
/* gap-as-gridlines: a 1px gap over the border colour draws dividers at any
|
|
2184
|
+
/* gap-as-gridlines: a 1px gap over the border colour draws dividers at any
|
|
2185
|
+
column count, so the grid stays responsive (auto-fit) without per-cell
|
|
2186
|
+
nth-child border hacks that break when the column count changes. */
|
|
2178
2187
|
& .crisp-recordpage-hl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--crisp-border-subtle); }
|
|
2179
2188
|
& .crisp-recordpage-hl-cell { position: relative; min-height: 84px; padding: var(--crisp-space-2-5) var(--crisp-space-3); background: var(--crisp-bg-surface); }
|
|
2180
2189
|
& .crisp-recordpage-hl-icon { position: absolute; top: var(--crisp-space-2-5); inset-inline-end: var(--crisp-space-3); color: var(--crisp-fg-muted); }
|
|
2181
2190
|
& .crisp-recordpage-hl-label { font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); margin-bottom: var(--crisp-space-2-5); padding-inline-end: var(--crisp-space-4); }
|
|
2182
2191
|
& .crisp-recordpage-hl-value { display: flex; flex-wrap: wrap; align-items: center; gap: var(--crisp-space-1); font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-primary); }
|
|
2183
2192
|
& .crisp-recordpage-hl-value--empty { color: var(--crisp-fg-muted); font-weight: var(--crisp-weight-regular); }
|
|
2193
|
+
|
|
2184
2194
|
& .crisp-recordpage-feed { display: flex; flex-direction: column; }
|
|
2185
2195
|
& .crisp-recordpage-feed-item { display: flex; align-items: flex-start; gap: var(--crisp-space-2-5); padding: var(--crisp-space-2) 0; }
|
|
2186
2196
|
& .crisp-recordpage-feed-dot { position: relative; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: var(--crisp-radius-full); background: var(--crisp-bg-raised); color: var(--crisp-fg-muted); }
|
|
@@ -2189,6 +2199,7 @@
|
|
|
2189
2199
|
& .crisp-recordpage-feed-time { font-size: var(--crisp-text-sm); color: var(--crisp-fg-muted); margin-top: 2px; }
|
|
2190
2200
|
& .crisp-recordpage-feed-more { align-self: flex-start; margin-top: var(--crisp-space-1); border: none; background: none; padding: var(--crisp-space-1) 0; color: var(--crisp-bg-brand-solid); font-family: inherit; font-size: var(--crisp-text-md); font-weight: var(--crisp-weight-medium); cursor: pointer; }
|
|
2191
2201
|
& .crisp-recordpage-feed-more:hover { text-decoration: underline; }
|
|
2202
|
+
|
|
2192
2203
|
& .crisp-recordpage-section-head { display: flex; align-items: center; gap: var(--crisp-space-1-5); padding: var(--crisp-space-1); }
|
|
2193
2204
|
& .crisp-recordpage-section-head .crisp-recordpage-section-title { padding: 0; }
|
|
2194
2205
|
& .crisp-recordpage-section-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) 6%, transparent); font-size: var(--crisp-text-xs); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
|
|
@@ -2196,6 +2207,7 @@
|
|
|
2196
2207
|
& .crisp-recordpage-addbtn { display: inline-flex; align-items: center; gap: var(--crisp-space-1); height: 26px; padding: 0 var(--crisp-space-1-5); margin: 0; 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); color: var(--crisp-fg-primary); font-family: inherit; font-size: var(--crisp-text-md); font-weight: var(--crisp-weight-medium); cursor: pointer; }
|
|
2197
2208
|
& .crisp-recordpage-addbtn:hover { background: var(--crisp-bg-raised); }
|
|
2198
2209
|
& .crisp-recordpage-addbtn svg { flex-shrink: 0; }
|
|
2210
|
+
|
|
2199
2211
|
& .crisp-recordpage-composer { display: flex; flex-direction: column; gap: var(--crisp-space-2); padding: var(--crisp-space-2); border: 1px solid var(--crisp-border-default); border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-surface); margin-bottom: var(--crisp-space-2); }
|
|
2200
2212
|
& .crisp-recordpage-composer textarea { width: 100%; min-height: 56px; resize: vertical; border: none; outline: none; background: none; font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); }
|
|
2201
2213
|
& .crisp-recordpage-composer textarea:focus { box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); border-radius: var(--crisp-radius-md); }
|
|
@@ -2205,18 +2217,23 @@
|
|
|
2205
2217
|
& .crisp-recordpage-btn:hover { background: var(--crisp-bg-raised); }
|
|
2206
2218
|
& .crisp-recordpage-btn--primary { box-shadow: none; background: var(--crisp-bg-brand-solid); color: var(--crisp-fg-on-brand); }
|
|
2207
2219
|
& .crisp-recordpage-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
2220
|
+
|
|
2208
2221
|
& .crisp-recordpage-note { display: flex; gap: var(--crisp-space-2-5); padding: var(--crisp-space-2-5) 0; border-top: 1px solid var(--crisp-border-subtle); }
|
|
2209
2222
|
& .crisp-recordpage-note-body { flex: 1; min-width: 0; }
|
|
2210
2223
|
& .crisp-recordpage-note-head { display: flex; align-items: center; gap: var(--crisp-space-1-5); margin-bottom: var(--crisp-space-0-5); }
|
|
2211
2224
|
& .crisp-recordpage-note-author { font-size: var(--crisp-text-md); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-primary); }
|
|
2212
2225
|
& .crisp-recordpage-note-time { font-size: var(--crisp-text-sm); color: var(--crisp-fg-muted); }
|
|
2213
2226
|
& .crisp-recordpage-note-text { font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); white-space: pre-wrap; word-break: break-word; }
|
|
2227
|
+
|
|
2214
2228
|
& .crisp-recordpage-task { display: flex; align-items: flex-start; gap: var(--crisp-space-2); padding: var(--crisp-space-1-5) 0; border-top: 1px solid var(--crisp-border-subtle); }
|
|
2215
2229
|
& .crisp-recordpage-task-text { flex: 1; min-width: 0; font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); padding-top: 1px; }
|
|
2216
2230
|
& .crisp-recordpage-task[data-done] .crisp-recordpage-task-text { text-decoration: line-through; color: var(--crisp-fg-muted); }
|
|
2231
|
+
|
|
2217
2232
|
& .crisp-recordpage-emptycard { display: flex; flex-direction: column; align-items: center; gap: var(--crisp-space-1-5); padding: var(--crisp-space-6) var(--crisp-space-3); border: 1px dashed var(--crisp-border-default); border-radius: var(--crisp-radius-xl); color: var(--crisp-fg-muted); font-size: var(--crisp-text-md); text-align: center; }
|
|
2218
2233
|
& .crisp-recordpage-emptycard svg { color: var(--crisp-fg-muted); opacity: 0.7; }
|
|
2234
|
+
|
|
2219
2235
|
& .crisp-recordpage-action[data-active] svg { color: #f5b83d; fill: #f5b83d; }
|
|
2236
|
+
|
|
2220
2237
|
& .crisp-recordstable-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); }
|
|
2221
2238
|
& .crisp-recordstable-tag[data-tone="brand"] { background: color-mix(in srgb, var(--crisp-bg-brand-solid) 14%, transparent); color: color-mix(in srgb, var(--crisp-bg-brand-solid) 82%, var(--crisp-fg-primary)); }
|
|
2222
2239
|
& .crisp-recordstable-tag[data-tone="success"] { background: color-mix(in srgb, var(--crisp-bg-success) 16%, transparent); color: color-mix(in srgb, var(--crisp-bg-success) 78%, var(--crisp-fg-primary)); }
|
|
@@ -2249,41 +2266,62 @@
|
|
|
2249
2266
|
& .crisp-recordpanel-toolbar { display: flex; align-items: center; height: 49px; flex-shrink: 0; padding: var(--crisp-space-2) var(--crisp-space-2-5); border-bottom: 1px solid var(--crisp-border-subtle); }
|
|
2250
2267
|
& .crisp-recordpanel-toolbar-spacer { flex: 1; }
|
|
2251
2268
|
& .crisp-recordpanel-pager { display: flex; align-items: center; gap: var(--crisp-space-1-5); margin-inline-start: var(--crisp-space-3); }
|
|
2269
|
+
/* #413: "2 of 37 in All Companies" -- measured live, same toolbar row, right after Prev/Next. 12px/500, the same 63%-of-fgPrimary mix every other muted heading in this panel already uses. */
|
|
2270
|
+
& .crisp-recordpanel-counter { margin-inline-start: var(--crisp-space-3); font-size: 12px; font-weight: var(--crisp-weight-medium); color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
2252
2271
|
& .crisp-recordpanel-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; padding: 0; border: none; border-radius: var(--crisp-radius-md); background: transparent; color: color-mix(in srgb, var(--crisp-fg-primary) 55%, transparent); font-family: inherit; cursor: pointer; transition: background-color .12s; }
|
|
2253
2272
|
& .crisp-recordpanel-iconbtn:hover { background: var(--crisp-bg-raised); color: var(--crisp-fg-primary); }
|
|
2254
2273
|
& .crisp-recordpanel-navbtn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; padding: 0; 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); color: var(--crisp-fg-primary); font-family: inherit; cursor: pointer; }
|
|
2255
2274
|
& .crisp-recordpanel-navbtn:hover:not(:disabled) { background: var(--crisp-bg-raised); }
|
|
2256
2275
|
& .crisp-recordpanel-navbtn:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
2276
|
+
/* #413: measured live -- a 10px strip at the panel's own left edge,
|
|
2277
|
+
cursor: col-resize (the issue's own repro calls it "ew-resize"; the actual computed value read off the live DOM is col-resize, the same cursor family under a different keyword). Kept fully inside the panel's own box, not extending past inset-inline-start: 0, so the
|
|
2278
|
+
panel's own overflow: hidden (there for its rounded corners) never clips it. touch-action: none stops a touchscreen's own pan gesture
|
|
2279
|
+
from fighting the drag. */
|
|
2280
|
+
& .crisp-recordpanel-resize-handle { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: 10px; cursor: col-resize; z-index: 1; touch-action: none; }
|
|
2281
|
+
& .crisp-recordpanel-resize-handle:hover, & .crisp-recordpanel-resize-handle:active { background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); }
|
|
2282
|
+
|
|
2257
2283
|
& .crisp-recordpanel-header { display: flex; align-items: center; gap: var(--crisp-space-2); height: 52px; flex-shrink: 0; padding: 0 var(--crisp-space-3); }
|
|
2258
2284
|
& .crisp-recordpanel-fav { width: 22px; height: var(--crisp-size-chip); border-radius: var(--crisp-radius-sm); flex-shrink: 0; object-fit: cover; background: var(--crisp-bg-raised); }
|
|
2259
2285
|
& .crisp-recordpanel-title { flex: 1; min-width: 0; font-size: var(--crisp-text-xl); font-weight: var(--crisp-weight-semibold); letter-spacing: -0.2px; color: var(--crisp-fg-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2286
|
+
|
|
2260
2287
|
& .crisp-recordpanel-body { flex: 1; min-height: 0; overflow-y: auto; padding: var(--crisp-space-2) var(--crisp-space-3); }
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
Highlights and Activity: 14px/500, the same 63%-of-fgPrimary mix
|
|
2264
|
-
RecordPage's own field-label already uses (product/recordpage's
|
|
2265
|
-
.crisp-recordpage-field-label) -- one more surface landing on the
|
|
2266
|
-
same measured "muted section heading" colour. */
|
|
2288
|
+
|
|
2289
|
+
/* #448: measured live on app.attio.com's peek (hover a Companies row, click "Open preview"). Section label reads identically for both Highlights and Activity: 14px/500, the same 63%-of-fgPrimary mix RecordPage's own field-label already uses (product/recordpage's .crisp-recordpage-field-label) -- one more surface landing on the same measured "muted section heading" colour. */
|
|
2267
2290
|
& .crisp-recordpanel-section { padding: var(--crisp-space-2) var(--crisp-space-1) 0; }
|
|
2268
2291
|
& .crisp-recordpanel-section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--crisp-space-2); height: 20px; margin-bottom: var(--crisp-space-2); }
|
|
2269
2292
|
& .crisp-recordpanel-section-label { font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); }
|
|
2270
|
-
/* "View all" -- measured 10px/400, a lighter mix than the section label
|
|
2271
|
-
(55%, not 63%) -- its own distinct, honestly-measured value, not a
|
|
2272
|
-
reuse of a nearby one that happened to be close. */
|
|
2293
|
+
/* "View all" -- measured 10px/400, a lighter mix than the section label (55%, not 63%) -- its own distinct, honestly-measured value, not a reuse of a nearby one that happened to be close. */
|
|
2273
2294
|
& .crisp-recordpanel-section-action { border: none; background: none; padding: 0; font-family: inherit; font-size: 10px; font-weight: var(--crisp-weight-regular); color: color-mix(in srgb, var(--crisp-fg-primary) 55%, transparent); cursor: pointer; }
|
|
2274
2295
|
& .crisp-recordpanel-section-action:hover { color: var(--crisp-fg-primary); }
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
the live DOM: every highlight's computed style is fully transparent). 8px row/column gap; two rows measured "233x86" inside 473px content width is exactly (473 - 8) / 2. */
|
|
2296
|
+
/* Highlights: a 2-column grid of label+icon+value cards, no card chrome at all (no border/background/radius/shadow -- confirmed on the live DOM: every highlight's computed style is fully transparent).
|
|
2297
|
+
8px row/column gap; two rows measured "233x86" inside 473px content
|
|
2298
|
+
width is exactly (473 - 8) / 2. */
|
|
2279
2299
|
& .crisp-recordpanel-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: var(--crisp-space-2); }
|
|
2280
2300
|
& .crisp-recordpanel-highlight { display: flex; flex-direction: column; gap: var(--crisp-space-1-5); min-width: 0; }
|
|
2281
2301
|
& .crisp-recordpanel-highlight-label { display: flex; align-items: center; gap: var(--crisp-space-1); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); }
|
|
2282
2302
|
& .crisp-recordpanel-highlight-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2283
2303
|
& .crisp-recordpanel-highlight-label svg { flex-shrink: 0; color: var(--crisp-fg-muted); }
|
|
2284
2304
|
& .crisp-recordpanel-highlight-value { font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-primary); overflow: hidden; text-overflow: ellipsis; }
|
|
2285
|
-
|
|
2305
|
+
|
|
2306
|
+
/* Activity is a consumer-supplied slot (crisp has no activity-feed
|
|
2307
|
+
model of its own to render) -- this only wraps it with the measured
|
|
2308
|
+
section heading above. */
|
|
2286
2309
|
& .crisp-recordpanel-activity { font-size: var(--crisp-text-lg); }
|
|
2310
|
+
|
|
2311
|
+
/* #413: collapsed Emails/Notes/Tasks below Activity -- measured live: a
|
|
2312
|
+
473px-wide row (the panel's own content width, 497 minus its 12px/8px side insets), 20px tall, 14px/500 solid fgPrimary label (NOT the 63% mix Highlights/Activity headings use -- this is body text, not a muted heading), a trailing count. padding "0 8px 0 12px" measured on the row itself; reproduced here as the trigger's own padding, since
|
|
2313
|
+
the trigger IS the row (a plain div, not a button, when there's no content to expand into -- matches the empty ("Emails 0") row measured live, which has no expand affordance at all). */
|
|
2314
|
+
& .crisp-recordpanel-sections { display: flex; flex-direction: column; padding-top: var(--crisp-space-2); }
|
|
2315
|
+
& .crisp-recordpanel-section-trigger { display: flex; align-items: center; gap: var(--crisp-space-1); width: 100%; height: 20px; padding: 0 var(--crisp-space-2) 0 var(--crisp-space-3); border: none; background: none; font-family: inherit; text-align: start; cursor: pointer; }
|
|
2316
|
+
& .crisp-recordpanel-section-trigger-inert { cursor: default; }
|
|
2317
|
+
& .crisp-recordpanel-section-row-label { font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-primary); }
|
|
2318
|
+
/* The count wasn't captured with its own background/pill chrome in the
|
|
2319
|
+
live measurement (only its text: 14px, a "tertiary" internal variant
|
|
2320
|
+
name that doesn't map to anything crisp defines) -- muted text next to the label, not an invented badge shape. */
|
|
2321
|
+
& .crisp-recordpanel-section-row-count { font-size: var(--crisp-text-lg); color: var(--crisp-fg-muted); }
|
|
2322
|
+
& .crisp-recordpanel-section-chevron { margin-inline-start: auto; flex-shrink: 0; color: var(--crisp-fg-muted); transition: transform .15s ease; }
|
|
2323
|
+
& .crisp-recordpanel-section-chevron[data-open] { transform: rotate(180deg); }
|
|
2324
|
+
& .crisp-recordpanel-section-content { padding: var(--crisp-space-2) var(--crisp-space-2) var(--crisp-space-2) var(--crisp-space-3); }
|
|
2287
2325
|
/* #329: an optional slot for record actions (e.g. Edit). Reuses the header's own measured values rather than inventing new ones -- the
|
|
2288
2326
|
same horizontal inset (space.3), the same hairline border token
|
|
2289
2327
|
(borderSubtle, flipped to border-top since this sits at the opposite
|
|
@@ -5,6 +5,20 @@ type IconType = React.ComponentType<{
|
|
|
5
5
|
size?: number;
|
|
6
6
|
strokeWidth?: number;
|
|
7
7
|
}>;
|
|
8
|
+
/** One collapsed section below Activity (#413) — Attio's own peek shows
|
|
9
|
+
* Emails/Notes/Tasks this way, each a label + a count, expanding into the
|
|
10
|
+
* consumer's own content when clicked. crisp has no data model for any of
|
|
11
|
+
* these (no fixed "what is an email/note/task" shape), so both the count
|
|
12
|
+
* and the expanded content are fully consumer-supplied. Omitting `content`
|
|
13
|
+
* renders the row but not as a button — matches the live DOM measured on an
|
|
14
|
+
* empty section (Emails, count 0): no chevron, no click handler, nothing to
|
|
15
|
+
* expand into yet. */
|
|
16
|
+
export type RecordPanelSection = {
|
|
17
|
+
key: string;
|
|
18
|
+
label: string;
|
|
19
|
+
count: number;
|
|
20
|
+
content?: React.ReactNode;
|
|
21
|
+
};
|
|
8
22
|
/** One Highlights card — label, value and an optional icon, laid out the
|
|
9
23
|
* way Attio's peek panel lays its own out (measured live, #448): a 2-column
|
|
10
24
|
* grid, no card chrome (no border/background/shadow), a muted label row
|
|
@@ -34,6 +48,31 @@ export type RecordPanelProps = Omit<React.ComponentPropsWithoutRef<"div">, "chil
|
|
|
34
48
|
previousRecordLabel?: string;
|
|
35
49
|
onNext?: () => void;
|
|
36
50
|
nextRecordLabel?: string;
|
|
51
|
+
/**
|
|
52
|
+
* "2 of 37 in All Companies" (#413) — measured live in the same toolbar
|
|
53
|
+
* row as Prev/Next, right after them. A single pre-formatted string: crisp
|
|
54
|
+
* has no concept of "the current view" a consumer's own table is showing
|
|
55
|
+
* (GRC's own filtered/sorted row order, say), so the index/total/scope-name
|
|
56
|
+
* composition is entirely the consumer's. Omit for no counter at all.
|
|
57
|
+
*/
|
|
58
|
+
counterLabel?: React.ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* Lets a person drag the panel wider or narrower from its left edge
|
|
61
|
+
* (#413 — measured live: a 10px `cursor: col-resize` strip at the panel's
|
|
62
|
+
* own left edge). Uncontrolled by default (the panel keeps its own width
|
|
63
|
+
* in state, starting from `defaultWidth`); pass `width`/`onWidthChange`
|
|
64
|
+
* together to own it instead — same controlled/uncontrolled split as
|
|
65
|
+
* every other stateful crisp prop. `minWidth`/`maxWidth` bound the drag;
|
|
66
|
+
* Attio's own bounds weren't captured (dragging live in a read-only
|
|
67
|
+
* measurement pass isn't something this drag should do to someone else's
|
|
68
|
+
* workspace), so these are a judgement call, not a measured value.
|
|
69
|
+
*/
|
|
70
|
+
resizable?: boolean;
|
|
71
|
+
width?: number;
|
|
72
|
+
defaultWidth?: number;
|
|
73
|
+
onWidthChange?: (width: number) => void;
|
|
74
|
+
minWidth?: number;
|
|
75
|
+
maxWidth?: number;
|
|
37
76
|
/**
|
|
38
77
|
* The panel's heading, and so its accessible name (via `aria-labelledby`,
|
|
39
78
|
* not a stringified `aria-label` — it also drives the visible title, which
|
|
@@ -77,6 +116,15 @@ export type RecordPanelProps = Omit<React.ComponentPropsWithoutRef<"div">, "chil
|
|
|
77
116
|
* for no Activity section at all.
|
|
78
117
|
*/
|
|
79
118
|
activity?: React.ReactNode;
|
|
119
|
+
/**
|
|
120
|
+
* Collapsed sections below Activity (#413) — Attio's own peek shows
|
|
121
|
+
* Emails/Notes/Tasks this way, each a label + count that expands into its
|
|
122
|
+
* own content on click. crisp has no data model for any of these (an
|
|
123
|
+
* email/note/task has no fixed shape crisp could render generically), so
|
|
124
|
+
* this is fully consumer-supplied — GRC's own equivalent is its Notes and
|
|
125
|
+
* Tasks tabs; it has no Emails. Omit for no sections at all.
|
|
126
|
+
*/
|
|
127
|
+
sections?: RecordPanelSection[];
|
|
80
128
|
/** Rendered below the panel's content, e.g. an Edit button. Omit for no footer. */
|
|
81
129
|
footer?: React.ReactNode;
|
|
82
130
|
onClose: () => void;
|
|
@@ -92,7 +140,7 @@ export type RecordPanelProps = Omit<React.ComponentPropsWithoutRef<"div">, "chil
|
|
|
92
140
|
* place). Render it inside a `position: relative` container (e.g. the app
|
|
93
141
|
* main area); it slides in from the right and overlays the content.
|
|
94
142
|
*/
|
|
95
|
-
export declare function RecordPanel({ record, onClose, className, closeLabel, onOpenRecord, openRecordLabel, onPrevious, previousRecordLabel, onNext, nextRecordLabel, title, avatar, avatarTone, highlightsLabel, highlights, activityLabel, viewAllActivityLabel, onViewAllActivity, activity, footer, ...rest }: RecordPanelProps): React.JSX.Element | null;
|
|
143
|
+
export declare function RecordPanel({ record, onClose, className, closeLabel, onOpenRecord, openRecordLabel, onPrevious, previousRecordLabel, onNext, nextRecordLabel, title, avatar, avatarTone, highlightsLabel, highlights, counterLabel, resizable, width: controlledWidth, defaultWidth, onWidthChange, minWidth, maxWidth, activityLabel, viewAllActivityLabel, onViewAllActivity, activity, sections, footer, ...rest }: RecordPanelProps): React.JSX.Element | null;
|
|
96
144
|
export declare namespace RecordPanel {
|
|
97
145
|
var displayName: string;
|
|
98
146
|
}
|