@crisp-ui-kit/crisp 0.52.5 → 0.52.6
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/bulkbar.css +2 -2
- package/dist/bulkbar.layered.css +2 -2
- package/dist/cjs/components/bulkbar/bulkbar.js +1 -1
- package/dist/cjs/components/bulkbar/bulkbar.recipe.js +2 -2
- package/dist/cjs/components/multiselect/multiselect.js +1 -1
- package/dist/cjs/components/multiselect/multiselect.recipe.js +1 -1
- package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +5 -4
- package/dist/cjs/components/tabletoolbar/tabletoolbar.js +1 -1
- package/dist/cjs/components/tooltip/tooltip.recipe.js +13 -4
- package/dist/cjs/product/entitycard/entitycard.recipe.js +20 -4
- package/dist/cjs/product/listpage/listpage.js +1 -1
- package/dist/cjs/product/listpage/listpage.recipe.js +5 -7
- package/dist/entitycard.css +4 -4
- package/dist/entitycard.layered.css +4 -4
- package/dist/esm/components/bulkbar/bulkbar.js +1 -1
- package/dist/esm/components/bulkbar/bulkbar.recipe.js +2 -2
- package/dist/esm/components/multiselect/multiselect.js +1 -1
- package/dist/esm/components/multiselect/multiselect.recipe.js +1 -1
- package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +5 -4
- package/dist/esm/components/tabletoolbar/tabletoolbar.js +1 -1
- package/dist/esm/components/tooltip/tooltip.recipe.js +13 -4
- package/dist/esm/product/entitycard/entitycard.recipe.js +20 -4
- package/dist/esm/product/listpage/listpage.js +2 -2
- package/dist/esm/product/listpage/listpage.recipe.js +5 -7
- package/dist/listpage.css +5 -5
- package/dist/listpage.layered.css +5 -5
- package/dist/multiselect.css +1 -1
- package/dist/multiselect.layered.css +1 -1
- package/dist/recordstable.css +5 -4
- package/dist/recordstable.layered.css +5 -4
- package/dist/styles.css +23 -21
- package/dist/styles.layered.css +23 -21
- package/dist/tabletoolbar.css +5 -4
- package/dist/tabletoolbar.layered.css +5 -4
- package/dist/tooltip.css +1 -1
- package/dist/tooltip.layered.css +1 -1
- package/dist/types/components/bulkbar/bulkbar.d.ts +3 -3
- package/dist/types/components/tooltip/tooltip.recipe.d.ts +2 -2
- package/package.json +1 -1
package/dist/bulkbar.css
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
position: absolute; left: 0; right: 0; bottom: var(--crisp-space-4); display: flex; justify-content: center; pointer-events: none; z-index: 10;
|
|
3
3
|
& .crisp-bulkbar-bar { pointer-events: auto; display: flex; align-items: center; gap: var(--crisp-space-0-5); height: 48px; padding: 0 var(--crisp-space-1) 0 var(--crisp-space-1-5); border-radius: 14px; background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3); color: var(--crisp-fg-primary); transition: opacity .16s ease, transform .16s ease; }
|
|
4
4
|
& .crisp-bulkbar-bar { @starting-style { opacity: 0; transform: translateY(10px); } }
|
|
5
|
-
& .crisp-bulkbar-count { display: inline-flex; align-items: center; gap: var(--crisp-space-1); height: var(--crisp-size-menuRow); margin: 0; padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-
|
|
5
|
+
& .crisp-bulkbar-count { display: inline-flex; align-items: center; gap: var(--crisp-space-1); height: var(--crisp-size-menuRow); margin: 0; padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-lg); background: color-mix(in srgb, var(--crisp-fg-primary) 2%, transparent); font-family: inherit; font-size: var(--crisp-text-md); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); white-space: nowrap; cursor: pointer; transition: background-color .12s; }
|
|
6
6
|
& .crisp-bulkbar-count:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 8%, transparent); color: var(--crisp-fg-primary); }
|
|
7
7
|
& .crisp-bulkbar-count svg { flex-shrink: 0; }
|
|
8
8
|
/* the ", Clear selection" ARIA concatenates onto the pill's name (#324)
|
|
9
9
|
-- read, never drawn. Same technique as Slider's thumblabel. */
|
|
10
10
|
& .crisp-bulkbar-clearlabel { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
|
|
11
|
-
& .crisp-bulkbar-btn { display: inline-flex; align-items: center; gap: var(--crisp-space-1); height: var(--crisp-size-menuRow); padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-
|
|
11
|
+
& .crisp-bulkbar-btn { display: inline-flex; align-items: center; gap: var(--crisp-space-1); height: var(--crisp-size-menuRow); padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-lg); 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); white-space: nowrap; cursor: pointer; transition: background-color .12s; }
|
|
12
12
|
& .crisp-bulkbar-btn:hover { background: var(--crisp-bg-raised); }
|
|
13
13
|
& .crisp-bulkbar-btn--danger { color: var(--crisp-bg-danger); }
|
|
14
14
|
& .crisp-bulkbar-btn--danger:hover { background: color-mix(in srgb, var(--crisp-bg-danger) 10%, transparent); }
|
package/dist/bulkbar.layered.css
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
position: absolute; left: 0; right: 0; bottom: var(--crisp-space-4); display: flex; justify-content: center; pointer-events: none; z-index: 10;
|
|
4
4
|
& .crisp-bulkbar-bar { pointer-events: auto; display: flex; align-items: center; gap: var(--crisp-space-0-5); height: 48px; padding: 0 var(--crisp-space-1) 0 var(--crisp-space-1-5); border-radius: 14px; background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3); color: var(--crisp-fg-primary); transition: opacity .16s ease, transform .16s ease; }
|
|
5
5
|
& .crisp-bulkbar-bar { @starting-style { opacity: 0; transform: translateY(10px); } }
|
|
6
|
-
& .crisp-bulkbar-count { display: inline-flex; align-items: center; gap: var(--crisp-space-1); height: var(--crisp-size-menuRow); margin: 0; padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-
|
|
6
|
+
& .crisp-bulkbar-count { display: inline-flex; align-items: center; gap: var(--crisp-space-1); height: var(--crisp-size-menuRow); margin: 0; padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-lg); background: color-mix(in srgb, var(--crisp-fg-primary) 2%, transparent); font-family: inherit; font-size: var(--crisp-text-md); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); white-space: nowrap; cursor: pointer; transition: background-color .12s; }
|
|
7
7
|
& .crisp-bulkbar-count:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 8%, transparent); color: var(--crisp-fg-primary); }
|
|
8
8
|
& .crisp-bulkbar-count svg { flex-shrink: 0; }
|
|
9
9
|
/* the ", Clear selection" ARIA concatenates onto the pill's name (#324)
|
|
10
10
|
-- read, never drawn. Same technique as Slider's thumblabel. */
|
|
11
11
|
& .crisp-bulkbar-clearlabel { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
|
|
12
|
-
& .crisp-bulkbar-btn { display: inline-flex; align-items: center; gap: var(--crisp-space-1); height: var(--crisp-size-menuRow); padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-
|
|
12
|
+
& .crisp-bulkbar-btn { display: inline-flex; align-items: center; gap: var(--crisp-space-1); height: var(--crisp-size-menuRow); padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-lg); 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); white-space: nowrap; cursor: pointer; transition: background-color .12s; }
|
|
13
13
|
& .crisp-bulkbar-btn:hover { background: var(--crisp-bg-raised); }
|
|
14
14
|
& .crisp-bulkbar-btn--danger { color: var(--crisp-bg-danger); }
|
|
15
15
|
& .crisp-bulkbar-btn--danger:hover { background: color-mix(in srgb, var(--crisp-bg-danger) 10%, transparent); }
|
|
@@ -44,7 +44,7 @@ const bulkbar_recipe_1 = require("./bulkbar.recipe");
|
|
|
44
44
|
* positioned ancestor when a selection is active; render it conditionally
|
|
45
45
|
* (e.g. `count > 0 && <BulkBar …/>`). Measured from a records table.
|
|
46
46
|
*/
|
|
47
|
-
function BulkBar({ count, onClear, countLabel = "
|
|
47
|
+
function BulkBar({ count, onClear, countLabel = "Selected", countText = (count, label) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [count, " ", label] })), children, className, clearLabel = "Clear selection", ...rest }) {
|
|
48
48
|
return ((0, jsx_runtime_1.jsx)("div", { className: (0, bulkbar_recipe_1.bulkbarRecipe)({ className }), ...rest, children: (0, jsx_runtime_1.jsxs)("div", { className: "crisp-bulkbar-bar", children: [count != null && ((0, jsx_runtime_1.jsxs)("button", { type: "button", className: "crisp-bulkbar-count", onClick: onClear, title: clearLabel, children: [countText(count, countLabel), (0, jsx_runtime_1.jsx)("span", { className: "crisp-bulkbar-clearlabel", children: clearLabel }), (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 13, strokeWidth: 2, "aria-hidden": "true" })] })), children] }) }));
|
|
49
49
|
}
|
|
50
50
|
BulkBar.displayName = "BulkBar";
|
|
@@ -15,7 +15,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
15
15
|
base: `position: absolute; left: 0; right: 0; bottom: ${tokens_1.contract.space["4"]}; display: flex; justify-content: center; pointer-events: none; z-index: 10;
|
|
16
16
|
& .crisp-bulkbar-bar { pointer-events: auto; display: flex; align-items: center; gap: ${tokens_1.contract.space["0.5"]}; height: 48px; padding: 0 ${tokens_1.contract.space["1"]} 0 ${tokens_1.contract.space["1.5"]}; border-radius: 14px; background: ${tokens_1.contract.bgSurface}; box-shadow: ${tokens_1.elevation.floating}; color: ${tokens_1.contract.fgPrimary}; transition: opacity .16s ease, transform .16s ease; }
|
|
17
17
|
& .crisp-bulkbar-bar { @starting-style { opacity: 0; transform: translateY(10px); } }
|
|
18
|
-
& .crisp-bulkbar-count { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1"]}; height: ${tokens_1.contract.size.menuRow}; margin: 0; padding: 0 ${tokens_1.contract.space["2"]}; border: none; border-radius: ${tokens_1.contract.radius.
|
|
18
|
+
& .crisp-bulkbar-count { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1"]}; height: ${tokens_1.contract.size.menuRow}; margin: 0; padding: 0 ${tokens_1.contract.space["2"]}; border: none; border-radius: ${tokens_1.contract.radius.lg}; background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 2%, transparent); font-family: inherit; font-size: ${tokens_1.contract.text.md}; font-weight: ${tokens_1.contract.weight.medium}; color: ${tokens_1.contract.fgMuted}; white-space: nowrap; cursor: pointer; transition: background-color .12s; }
|
|
19
19
|
& .crisp-bulkbar-count:hover { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 8%, transparent); color: ${tokens_1.contract.fgPrimary}; }
|
|
20
20
|
& .crisp-bulkbar-count svg { flex-shrink: 0; }
|
|
21
21
|
/* the ", Clear selection" ARIA concatenates onto the pill's name (#324)
|
|
@@ -24,7 +24,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
24
24
|
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
25
25
|
overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
|
|
26
26
|
}
|
|
27
|
-
& .crisp-bulkbar-btn { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1"]}; height: ${tokens_1.contract.size.menuRow}; padding: 0 ${tokens_1.contract.space["2"]}; border: none; border-radius: ${tokens_1.contract.radius.
|
|
27
|
+
& .crisp-bulkbar-btn { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1"]}; height: ${tokens_1.contract.size.menuRow}; padding: 0 ${tokens_1.contract.space["2"]}; border: none; border-radius: ${tokens_1.contract.radius.lg}; background: ${tokens_1.contract.bgSurface}; box-shadow: ${tokens_1.elevation.field}; color: ${tokens_1.contract.fgPrimary}; font-family: inherit; font-size: ${tokens_1.contract.text.md}; font-weight: ${tokens_1.contract.weight.medium}; white-space: nowrap; cursor: pointer; transition: background-color .12s; }
|
|
28
28
|
& .crisp-bulkbar-btn:hover { background: ${tokens_1.contract.bgRaised}; }
|
|
29
29
|
& .crisp-bulkbar-btn--danger { color: ${tokens_1.contract.bgDanger}; }
|
|
30
30
|
& .crisp-bulkbar-btn--danger:hover { background: color-mix(in srgb, ${tokens_1.contract.bgDanger} 10%, transparent); }
|
|
@@ -202,7 +202,7 @@ id, placeholder = "Select…", searchable = true, searchPlaceholder = "Search…
|
|
|
202
202
|
e.preventDefault();
|
|
203
203
|
openMenu();
|
|
204
204
|
}
|
|
205
|
-
}, children: [(0, jsx_runtime_1.jsx)("span", { className: "crisp-multiselect-chips", children: selectedOptions.length === 0 ? ((0, jsx_runtime_1.jsx)("span", { className: "crisp-multiselect-placeholder", children: placeholder })) : (selectedOptions.map((o) => (0, jsx_runtime_1.jsx)(Chip, { opt: o }, o.value))) }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "crisp-multiselect-chevron", size: 16, strokeWidth: 1.75 })] }), open && ((0, jsx_runtime_1.jsx)(core_1.FloatingPortal, { sourceRef: rootRef, children: (0, jsx_runtime_1.jsxs)("div", { ref: listboxRef, id: listboxId, className: "crisp-multiselect-listbox", role: "listbox", "aria-multiselectable": "true", "aria-label": ariaLabel, "data-up": up ? "" : undefined, style: pos, children: [searchable && ((0, jsx_runtime_1.jsxs)("div", { className: "crisp-multiselect-search", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Search, { size:
|
|
205
|
+
}, children: [(0, jsx_runtime_1.jsx)("span", { className: "crisp-multiselect-chips", children: selectedOptions.length === 0 ? ((0, jsx_runtime_1.jsx)("span", { className: "crisp-multiselect-placeholder", children: placeholder })) : (selectedOptions.map((o) => (0, jsx_runtime_1.jsx)(Chip, { opt: o }, o.value))) }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "crisp-multiselect-chevron", size: 16, strokeWidth: 1.75 })] }), open && ((0, jsx_runtime_1.jsx)(core_1.FloatingPortal, { sourceRef: rootRef, children: (0, jsx_runtime_1.jsxs)("div", { ref: listboxRef, id: listboxId, className: "crisp-multiselect-listbox", role: "listbox", "aria-multiselectable": "true", "aria-label": ariaLabel, "data-up": up ? "" : undefined, style: pos, children: [searchable && ((0, jsx_runtime_1.jsxs)("div", { className: "crisp-multiselect-search", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Search, { size: 16, strokeWidth: 1.75 }), (0, jsx_runtime_1.jsx)("input", { ref: searchRef, type: "text", placeholder: searchPlaceholder, "aria-label": searchPlaceholder, "aria-controls": listboxId, "aria-activedescendant": activeId, value: query, onChange: (e) => {
|
|
206
206
|
setQuery(e.target.value);
|
|
207
207
|
setHighlight(0);
|
|
208
208
|
}, onKeyDown: onNavKeys })] })), filtered.length === 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "crisp-multiselect-empty", children: emptyLabel })) : (filtered.map((opt, i) => {
|
|
@@ -65,7 +65,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
65
65
|
}
|
|
66
66
|
.crisp-multiselect-listbox[data-up] { transform-origin: bottom left; }
|
|
67
67
|
.crisp-multiselect-listbox { @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
68
|
-
.crisp-multiselect-search { display: flex; align-items: center; gap: ${tokens_1.contract.space["
|
|
68
|
+
.crisp-multiselect-search { display: flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; height: 36px; flex-shrink: 0; margin: calc(-1 * ${tokens_1.contract.space["1"]}) calc(-1 * ${tokens_1.contract.space["1"]}) ${tokens_1.contract.space["1"]}; padding: ${tokens_1.contract.space["2"]} ${tokens_1.contract.space["3"]}; color: ${tokens_1.contract.fgMuted}; }
|
|
69
69
|
.crisp-multiselect-search svg { flex-shrink: 0; }
|
|
70
70
|
.crisp-multiselect-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: ${tokens_1.contract.text.lg}; color: ${tokens_1.contract.fgPrimary}; }
|
|
71
71
|
.crisp-multiselect-search input::placeholder { color: ${tokens_1.contract.fgMuted}; }
|
|
@@ -17,7 +17,7 @@ const tokens_1 = require("../../tokens");
|
|
|
17
17
|
// block, and those depend on following `.menu` in source order. Keeping the
|
|
18
18
|
// split preserves that cascade exactly, which is what lets the generated CSS
|
|
19
19
|
// stay byte-for-byte identical to what shipped before the extraction.
|
|
20
|
-
const toolbarChromeHead = (p) => ` & .${namespace_1.CLASS_PREFIX}${p}-toolbar { display: flex; align-items: center; gap: ${tokens_1.contract.space["
|
|
20
|
+
const toolbarChromeHead = (p) => ` & .${namespace_1.CLASS_PREFIX}${p}-toolbar { display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; padding: 0 ${tokens_1.contract.space["3"]} ${tokens_1.contract.space["2"]}; }
|
|
21
21
|
& .${namespace_1.CLASS_PREFIX}${p}-toolbar[data-inline] { padding-bottom: 0; }
|
|
22
22
|
& .${namespace_1.CLASS_PREFIX}${p}-search { display: flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; height: ${tokens_1.contract.size.row}; padding: 0 ${tokens_1.contract.space["2.5"]}; border: none; border-radius: ${tokens_1.contract.radius.md}; background: ${tokens_1.contract.bgSurface}; box-shadow: inset 0 0 0 1px ${tokens_1.contract.borderSubtle}; color: ${tokens_1.contract.fgMuted}; }
|
|
23
23
|
& .${namespace_1.CLASS_PREFIX}${p}-search svg { flex-shrink: 0; }
|
|
@@ -30,11 +30,12 @@ const toolbarChromeHead = (p) => ` & .${namespace_1.CLASS_PREFIX}${p}-toolbar
|
|
|
30
30
|
& .${namespace_1.CLASS_PREFIX}${p}-tool--ghost { box-shadow: none; background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 3%, transparent); color: ${tokens_1.contract.fgMuted}; }
|
|
31
31
|
& .${namespace_1.CLASS_PREFIX}${p}-tool--ghost:hover { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 6%, transparent); }
|
|
32
32
|
& .${namespace_1.CLASS_PREFIX}${p}-toolgroup { position: relative; display: inline-flex; }
|
|
33
|
-
& .${namespace_1.CLASS_PREFIX}${p}-
|
|
33
|
+
& .${namespace_1.CLASS_PREFIX}${p}-divider { flex-shrink: 0; width: 1px; height: 20px; background: ${tokens_1.contract.borderSubtle}; }
|
|
34
|
+
& .${namespace_1.CLASS_PREFIX}${p}-menu { position: absolute; top: calc(100% + ${tokens_1.contract.space["1"]}); left: 0; z-index: 30; min-width: 232px; padding: ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius.xl}; background: ${tokens_1.contract.bgPopover}; box-shadow: ${tokens_1.elevation.floating}; display: flex; flex-direction: column; gap: ${tokens_1.contract.space.px}; transform-origin: top; opacity: 1; transform: none; transition: opacity .13s ease, transform .13s ease; }
|
|
34
35
|
& .${namespace_1.CLASS_PREFIX}${p}-menu { @starting-style { opacity: 0; transform: scale(0.96); } }`;
|
|
35
36
|
exports.toolbarChromeHead = toolbarChromeHead;
|
|
36
37
|
const toolbarChromeBody = (p) => ` & .${namespace_1.CLASS_PREFIX}${p}-menu-head { padding: ${tokens_1.contract.space["1"]} ${tokens_1.contract.space["2"]} ${tokens_1.contract.space["0.5"]}; font-size: ${tokens_1.contract.text.sm}; font-weight: ${tokens_1.contract.weight.medium}; color: ${tokens_1.contract.fgMuted}; }
|
|
37
|
-
& .${namespace_1.CLASS_PREFIX}${p}-sortpop { min-width:
|
|
38
|
+
& .${namespace_1.CLASS_PREFIX}${p}-sortpop { min-width: 480px; overflow: visible; padding: ${tokens_1.contract.space["3"]} ${tokens_1.contract.space["1.5"]}; gap: ${tokens_1.contract.space["2"]}; }
|
|
38
39
|
& .${namespace_1.CLASS_PREFIX}${p}-sort-empty { padding: ${tokens_1.contract.space["1"]} ${tokens_1.contract.space["1"]} ${tokens_1.contract.space["2"]}; font-size: ${tokens_1.contract.text.md}; color: ${tokens_1.contract.fgMuted}; }
|
|
39
40
|
& .${namespace_1.CLASS_PREFIX}${p}-sort-row { display: flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; }
|
|
40
41
|
& .${namespace_1.CLASS_PREFIX}${p}-sort-grip { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 28px; flex-shrink: 0; margin-right: calc(-1 * ${tokens_1.contract.space["1"]}); padding: 0; border: none; background: none; color: ${tokens_1.contract.fgMuted}; cursor: grab; }
|
|
@@ -55,7 +56,7 @@ const toolbarChromeBody = (p) => ` & .${namespace_1.CLASS_PREFIX}${p}-menu-he
|
|
|
55
56
|
& .${namespace_1.CLASS_PREFIX}${p}-sort-learn { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; font-size: ${tokens_1.contract.text.lg}; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 63%, transparent); text-decoration: none; }
|
|
56
57
|
& .${namespace_1.CLASS_PREFIX}${p}-sort-learn svg { flex-shrink: 0; }
|
|
57
58
|
& .${namespace_1.CLASS_PREFIX}${p}-sort-learn:hover { color: ${tokens_1.contract.fgPrimary}; }
|
|
58
|
-
& .${namespace_1.CLASS_PREFIX}${p}-menu-item { display: flex; align-items: center; gap: ${tokens_1.contract.space["
|
|
59
|
+
& .${namespace_1.CLASS_PREFIX}${p}-menu-item { display: flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; width: 100%; height: ${tokens_1.contract.size.menuRow}; margin: 0; padding: 0 ${tokens_1.contract.space["2"]}; border: none; background: none; border-radius: ${tokens_1.contract.radius.md}; font-family: inherit; font-size: ${tokens_1.contract.text.lg}; color: ${tokens_1.contract.fgPrimary}; text-align: left; cursor: pointer; }
|
|
59
60
|
& .${namespace_1.CLASS_PREFIX}${p}-menu-item:hover { background: ${tokens_1.contract.bgRaised}; }
|
|
60
61
|
& .${namespace_1.CLASS_PREFIX}${p}-menu-item:disabled { opacity: 0.4; cursor: default; }
|
|
61
62
|
& .${namespace_1.CLASS_PREFIX}${p}-menu-item:disabled:hover { background: none; }
|
|
@@ -273,7 +273,7 @@ function TableToolbar({ columns, sortColumns: sortColumnsProp, filterColumns: fi
|
|
|
273
273
|
label: ((0, jsx_runtime_1.jsxs)("span", { className: "crisp-tabletoolbar-sort-optlabel", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ArrowDownWideNarrow, { size: 15, strokeWidth: 1.75 }), descendingLabel] })),
|
|
274
274
|
keywords: descendingLabel,
|
|
275
275
|
},
|
|
276
|
-
], "aria-label": sortDirectionLabel }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "crisp-tabletoolbar-sort-remove", onClick: () => removeSort(i), "aria-label": removeSortLabel, children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 15, strokeWidth: 1.75 }) })] }, s.key)))), (0, jsx_runtime_1.jsx)("div", { className: "crisp-tabletoolbar-sort-addrow", children: (0, jsx_runtime_1.jsxs)("button", { ref: addSortRef, type: "button", className: "crisp-tabletoolbar-sort-add", onClick: addSort, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: 15, strokeWidth: 1.75 }), addSortLabel] }) }), helpHref && ((0, jsx_runtime_1.jsx)("div", { className: "crisp-tabletoolbar-sort-foot", children: (0, jsx_runtime_1.jsxs)("a", { className: "crisp-tabletoolbar-sort-learn", href: helpHref, target: "_blank", rel: "noreferrer", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.CircleHelp, { size: 14, strokeWidth: 1.75 }), learnSortingLabel] }) }))] }))] }), (0, jsx_runtime_1.jsxs)("span", { className: "crisp-tabletoolbar-toolgroup", children: [(0, jsx_runtime_1.jsxs)("button", { type: "button", className: `crisp-tabletoolbar-tool crisp-tabletoolbar-tool--ghost${activeFilters ? " crisp-tabletoolbar-tool--active" : ""}`, onClick: () => setOpenMenu(openMenu === "filter" ? null : "filter"), "aria-haspopup": "dialog", "aria-expanded": openMenu === "filter", "data-menu-trigger": true, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ListFilter, { size: 14, strokeWidth: 1.75, "aria-hidden": "true" }), filterTriggerLabel
|
|
276
|
+
], "aria-label": sortDirectionLabel }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "crisp-tabletoolbar-sort-remove", onClick: () => removeSort(i), "aria-label": removeSortLabel, children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 15, strokeWidth: 1.75 }) })] }, s.key)))), (0, jsx_runtime_1.jsx)("div", { className: "crisp-tabletoolbar-sort-addrow", children: (0, jsx_runtime_1.jsxs)("button", { ref: addSortRef, type: "button", className: "crisp-tabletoolbar-sort-add", onClick: addSort, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: 15, strokeWidth: 1.75 }), addSortLabel] }) }), helpHref && ((0, jsx_runtime_1.jsx)("div", { className: "crisp-tabletoolbar-sort-foot", children: (0, jsx_runtime_1.jsxs)("a", { className: "crisp-tabletoolbar-sort-learn", href: helpHref, target: "_blank", rel: "noreferrer", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.CircleHelp, { size: 14, strokeWidth: 1.75 }), learnSortingLabel] }) }))] }))] }), (0, jsx_runtime_1.jsx)("span", { className: "crisp-tabletoolbar-divider", "aria-hidden": "true" }), (0, jsx_runtime_1.jsxs)("span", { className: "crisp-tabletoolbar-toolgroup", children: [(0, jsx_runtime_1.jsxs)("button", { type: "button", className: `crisp-tabletoolbar-tool crisp-tabletoolbar-tool--ghost${activeFilters ? " crisp-tabletoolbar-tool--active" : ""}`, onClick: () => setOpenMenu(openMenu === "filter" ? null : "filter"), "aria-haspopup": "dialog", "aria-expanded": openMenu === "filter", "data-menu-trigger": true, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ListFilter, { size: 14, strokeWidth: 1.75, "aria-hidden": "true" }), filterTriggerLabel
|
|
277
277
|
? filterTriggerLabel(activeFilters)
|
|
278
278
|
: activeFilters
|
|
279
279
|
? `Filter · ${activeFilters}`
|
|
@@ -5,6 +5,15 @@ const core_1 = require("../../core");
|
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
6
|
// The floating bubble for a Tooltip — a dark hint chip. Applied to the
|
|
7
7
|
// portaled bubble itself (not a wrapper), so its styles survive the portal.
|
|
8
|
+
//
|
|
9
|
+
// Re-measured live against Attio's own tooltip (crisp#465): background,
|
|
10
|
+
// text colour, vertical padding and radius were all off — #20242c/#fff/4px
|
|
11
|
+
// vertical/6px radius were an earlier, uncorroborated guess (not the same
|
|
12
|
+
// surface Lesson 24 in AUTHORING.md describes for the RichText toolbar,
|
|
13
|
+
// despite the similar wording). The real values are gray900's light hex
|
|
14
|
+
// (#101112, the same "dark pill" ink NavItem's own text uses) and
|
|
15
|
+
// line100's light hex (#eeeff1) — both theme-constant, same as before,
|
|
16
|
+
// just the wrong pair.
|
|
8
17
|
const spec = (0, core_1.defineSpec)({
|
|
9
18
|
name: "tooltip",
|
|
10
19
|
base: {
|
|
@@ -13,10 +22,10 @@ const spec = (0, core_1.defineSpec)({
|
|
|
13
22
|
boxSizing: "border-box",
|
|
14
23
|
pointerEvents: "none",
|
|
15
24
|
maxWidth: "260px",
|
|
16
|
-
padding: `${tokens_1.contract.space["1"]} ${tokens_1.contract.space["2"]}`,
|
|
17
|
-
borderRadius: tokens_1.contract.radius.
|
|
18
|
-
background: "#
|
|
19
|
-
color: "#
|
|
25
|
+
padding: `${tokens_1.contract.space["1.5"]} ${tokens_1.contract.space["2"]}`,
|
|
26
|
+
borderRadius: tokens_1.contract.radius.md,
|
|
27
|
+
background: "#101112",
|
|
28
|
+
color: "#eeeff1",
|
|
20
29
|
fontFamily: tokens_1.contract.font.sans,
|
|
21
30
|
fontSize: tokens_1.contract.text.sm,
|
|
22
31
|
fontWeight: tokens_1.contract.weight.medium,
|
|
@@ -6,6 +6,22 @@ const tokens_1 = require("../../tokens");
|
|
|
6
6
|
// A note / entity card — measured from a Notes grid: a bordered white card
|
|
7
7
|
// with an author row (avatar + name) at the top, a title, a clamped excerpt,
|
|
8
8
|
// and a footer row (avatar + name … date). The whole card is clickable.
|
|
9
|
+
//
|
|
10
|
+
// Re-measured directly against a live note card (#474): the author name
|
|
11
|
+
// renders at fgPrimary/text.sm (12px), not a muted 13px — it reads as
|
|
12
|
+
// regular body text, not a caption. The title is weight.medium (500), not
|
|
13
|
+
// semibold — "my" measured 500 on the live card, and semibold was an
|
|
14
|
+
// unmeasured guess. The excerpt is text.sm (12px)/16px line-height, and
|
|
15
|
+
// both the excerpt body and the footer date share one muted tone that is
|
|
16
|
+
// darker than `fgMuted` (measured `rgba(0,0,0,0.63)` on the excerpt
|
|
17
|
+
// paragraph AND, independently, on the footer date — the same value also
|
|
18
|
+
// turned up on Board's "29d" age pill in the same audit, so it's a real,
|
|
19
|
+
// reused Attio tone and not noise). `fgMuted` (gray400, #71717a) doesn't
|
|
20
|
+
// carry that ring, so this reads it as 63% of `fgPrimary` instead of adding
|
|
21
|
+
// an unmeasured new dark-mode literal (AUTHORING Lesson 47) — `fgPrimary`
|
|
22
|
+
// already flips correctly per theme, so the mix preserves the *relationship*
|
|
23
|
+
// Attio is expressing (a darker secondary text tone) in both themes.
|
|
24
|
+
const secondaryFg = `color-mix(in srgb, ${tokens_1.contract.fgPrimary} 63%, transparent)`;
|
|
9
25
|
const config = (0, core_1.defineRecipe)({
|
|
10
26
|
name: "entitycard",
|
|
11
27
|
base: `display: flex; flex-direction: column; box-sizing: border-box; width: 100%; min-width: 0; text-align: start;
|
|
@@ -17,11 +33,11 @@ const config = (0, core_1.defineRecipe)({
|
|
|
17
33
|
&:hover { box-shadow: inset 0 0 0 1px ${tokens_1.contract.borderDefault}, 0 1px 2px rgba(0,0,0,0.04), 0 6px 16px -6px rgba(28,40,64,0.12); }
|
|
18
34
|
&:focus-visible { outline: 2px solid ${tokens_1.contract.bgBrandSolid}; outline-offset: 2px; }
|
|
19
35
|
|
|
20
|
-
& .crisp-entitycard-author { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; font-size: ${tokens_1.contract.text.
|
|
21
|
-
& .crisp-entitycard-title { margin-top: ${tokens_1.contract.space["2"]}; font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.
|
|
22
|
-
& .crisp-entitycard-excerpt { margin-top: ${tokens_1.contract.space["1"]}; font-size: ${tokens_1.contract.text.
|
|
36
|
+
& .crisp-entitycard-author { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; font-size: ${tokens_1.contract.text.sm}; font-weight: ${tokens_1.contract.weight.medium}; color: ${tokens_1.contract.fgPrimary}; }
|
|
37
|
+
& .crisp-entitycard-title { margin-top: ${tokens_1.contract.space["2"]}; font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.medium}; letter-spacing: -0.1px; color: ${tokens_1.contract.fgPrimary}; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
38
|
+
& .crisp-entitycard-excerpt { margin-top: ${tokens_1.contract.space["1"]}; font-size: ${tokens_1.contract.text.sm}; line-height: 16px; color: ${secondaryFg}; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
23
39
|
& .crisp-entitycard-spacer { flex: 1; min-height: ${tokens_1.contract.space["3"]}; }
|
|
24
|
-
& .crisp-entitycard-foot { display: flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; padding-top: ${tokens_1.contract.space["2.5"]}; margin-top: ${tokens_1.contract.space["1"]}; border-top: 1px solid ${tokens_1.contract.borderSubtle}; font-size: ${tokens_1.contract.text.sm}; color: ${
|
|
40
|
+
& .crisp-entitycard-foot { display: flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; padding-top: ${tokens_1.contract.space["2.5"]}; margin-top: ${tokens_1.contract.space["1"]}; border-top: 1px solid ${tokens_1.contract.borderSubtle}; font-size: ${tokens_1.contract.text.sm}; color: ${secondaryFg}; }
|
|
25
41
|
& .crisp-entitycard-foot-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: ${tokens_1.contract.fgPrimary}; }
|
|
26
42
|
& .crisp-entitycard-date { margin-inline-start: auto; flex-shrink: 0; white-space: nowrap; }`,
|
|
27
43
|
variants: {},
|
|
@@ -20,6 +20,6 @@ function ListRow({ children, onClick, }) {
|
|
|
20
20
|
*/
|
|
21
21
|
function ListPage({ leading, trailing, count, favorites, favoritesLabel = "Favorites", columns, groups, emptyLabel = "Nothing here yet", className, ...rest }) {
|
|
22
22
|
const total = groups?.reduce((s, g) => s + g.rows.length, 0) ?? 0;
|
|
23
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, listpage_recipe_1.listpageRecipe)({ className }), ...rest, children: [(0, jsx_runtime_1.jsxs)("div", { className: "crisp-listpage-toolbar", children: [(0, jsx_runtime_1.jsx)("div", { className: "crisp-listpage-toolbar-lead", children: leading }), count != null && (0, jsx_runtime_1.jsx)("div", { className: "crisp-listpage-count", children: count }), trailing != null && ((0, jsx_runtime_1.jsx)("div", { className: "crisp-listpage-toolbar-trail", children: trailing }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "crisp-listpage-body", children: [favorites != null && ((0, jsx_runtime_1.jsxs)(
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, listpage_recipe_1.listpageRecipe)({ className }), ...rest, children: [(0, jsx_runtime_1.jsxs)("div", { className: "crisp-listpage-toolbar", children: [(0, jsx_runtime_1.jsx)("div", { className: "crisp-listpage-toolbar-lead", children: leading }), count != null && (0, jsx_runtime_1.jsx)("div", { className: "crisp-listpage-count", children: count }), trailing != null && ((0, jsx_runtime_1.jsx)("div", { className: "crisp-listpage-toolbar-trail", children: trailing }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "crisp-listpage-body", children: [favorites != null && ((0, jsx_runtime_1.jsxs)("div", { className: "crisp-listpage-favorites-section", children: [(0, jsx_runtime_1.jsx)("div", { className: "crisp-listpage-section-label", children: favoritesLabel }), (0, jsx_runtime_1.jsx)("div", { className: "crisp-listpage-favorites", children: favorites })] })), columns && columns.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "crisp-listpage-colhead", children: columns.map((col, i) => ((0, jsx_runtime_1.jsxs)("span", { className: "crisp-listpage-colhead-cell", children: [col.icon, col.label] }, i))) })), total === 0 && !groups?.length ? ((0, jsx_runtime_1.jsx)("div", { className: "crisp-listpage-empty", children: emptyLabel })) : (groups?.map((g) => ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "crisp-listpage-group", children: [g.label, g.count != null && ((0, jsx_runtime_1.jsx)("span", { className: "crisp-listpage-group-count", children: g.count }))] }), g.rows] }, g.id))))] })] }));
|
|
24
24
|
}
|
|
25
25
|
ListPage.displayName = "ListPage";
|
|
@@ -12,7 +12,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
12
12
|
base: `display: flex; flex-direction: column; min-height: 0; box-sizing: border-box; font-family: ${tokens_1.contract.font.sans}; color: ${tokens_1.contract.fgPrimary};
|
|
13
13
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
14
14
|
|
|
15
|
-
& .crisp-listpage-toolbar { display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; height:
|
|
15
|
+
& .crisp-listpage-toolbar { display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; height: ${tokens_1.contract.size.header}; flex-shrink: 0; padding: 0 ${tokens_1.contract.space["3"]}; }
|
|
16
16
|
& .crisp-listpage-toolbar-lead { display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; }
|
|
17
17
|
& .crisp-listpage-count { margin-inline-start: auto; font-size: ${tokens_1.contract.text.md}; color: ${tokens_1.contract.fgMuted}; white-space: nowrap; }
|
|
18
18
|
& .crisp-listpage-toolbar-trail { display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; }
|
|
@@ -21,15 +21,13 @@ const config = (0, core_1.defineRecipe)({
|
|
|
21
21
|
& .crisp-listpage-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 ${tokens_1.contract.space["3"]} ${tokens_1.contract.space["3"]}; }
|
|
22
22
|
|
|
23
23
|
& .crisp-listpage-section-label { padding: ${tokens_1.contract.space["2"]} ${tokens_1.contract.space["1"]}; font-size: ${tokens_1.contract.text.sm}; font-weight: ${tokens_1.contract.weight.medium}; color: ${tokens_1.contract.fgMuted}; }
|
|
24
|
-
& .crisp-listpage-favorites {
|
|
25
|
-
|
|
26
|
-
border-box; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${tokens_1.contract.fgPrimary} 8%, transparent); }
|
|
27
|
-
& .crisp-listpage-favorites[data-dashed] { box-shadow: none; border: 1px dashed color-mix(in srgb, ${tokens_1.contract.fgPrimary} 14%, transparent); }
|
|
24
|
+
& .crisp-listpage-favorites-section { background: ${tokens_1.contract.bgSubtle}; box-shadow: inset 0 -1px 0 ${tokens_1.contract.borderSubtle}; }
|
|
25
|
+
& .crisp-listpage-favorites { display: flex; align-items: center; justify-content: center; min-height: 200px; padding: ${tokens_1.contract.space["6"]}; }
|
|
28
26
|
|
|
29
|
-
& .crisp-listpage-colhead { display: flex; align-items: center; gap: ${tokens_1.contract.space["2.5"]}; height:
|
|
27
|
+
& .crisp-listpage-colhead { display: flex; align-items: center; gap: ${tokens_1.contract.space["2.5"]}; height: ${tokens_1.contract.size.menuRow}; padding: 0 ${tokens_1.contract.space["4"]}; box-shadow: inset 0 -1px 0 ${tokens_1.contract.borderSubtle}; font-size: ${tokens_1.contract.text.sm}; color: ${tokens_1.contract.fgMuted}; }
|
|
30
28
|
& .crisp-listpage-colhead-cell { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; }
|
|
31
29
|
|
|
32
|
-
& .crisp-listpage-group { display: flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; height:
|
|
30
|
+
& .crisp-listpage-group { display: flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; height: ${tokens_1.contract.size.menuRow}; padding: ${tokens_1.contract.space["2"]} ${tokens_1.contract.space["4"]}; box-shadow: inset 0 -1px 0 ${tokens_1.contract.borderSubtle}; background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 2%, transparent); font-size: ${tokens_1.contract.text.sm}; font-weight: ${tokens_1.contract.weight.medium}; color: ${tokens_1.contract.fgMuted}; }
|
|
33
31
|
& .crisp-listpage-group-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} 6%, transparent); font-size: ${tokens_1.contract.text.xs}; color: ${tokens_1.contract.fgMuted}; }
|
|
34
32
|
|
|
35
33
|
& .crisp-listpage-row { display: flex; align-items: center; gap: ${tokens_1.contract.space["2.5"]}; width: 100%; height: 52px; padding: 0 ${tokens_1.contract.space["2"]}; margin: 0; border: none; border-top: 1px solid ${tokens_1.contract.borderSubtle}; background: none; font-family: inherit; color: inherit; text-align: start; cursor: pointer; transition: background-color .12s; }
|
package/dist/entitycard.css
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
display: flex; flex-direction: column; box-sizing: border-box; width: 100%; min-width: 0; text-align: start; padding: var(--crisp-space-3) var(--crisp-space-4); margin: 0; border: none; border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-border-subtle); color: var(--crisp-fg-primary); font-family: var(--crisp-font-sans); cursor: pointer; transition: box-shadow .12s ease, background-color .12s ease; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
3
3
|
&:hover { box-shadow: inset 0 0 0 1px var(--crisp-border-default), 0 1px 2px rgba(0,0,0,0.04), 0 6px 16px -6px rgba(28,40,64,0.12); }
|
|
4
4
|
&:focus-visible { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: 2px; }
|
|
5
|
-
& .crisp-entitycard-author { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); font-size: var(--crisp-text-
|
|
6
|
-
& .crisp-entitycard-title { margin-top: var(--crisp-space-2); font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-
|
|
7
|
-
& .crisp-entitycard-excerpt { margin-top: var(--crisp-space-1); font-size: var(--crisp-text-
|
|
5
|
+
& .crisp-entitycard-author { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-primary); }
|
|
6
|
+
& .crisp-entitycard-title { margin-top: var(--crisp-space-2); font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); letter-spacing: -0.1px; color: var(--crisp-fg-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
7
|
+
& .crisp-entitycard-excerpt { margin-top: var(--crisp-space-1); font-size: var(--crisp-text-sm); line-height: 16px; color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
8
8
|
& .crisp-entitycard-spacer { flex: 1; min-height: var(--crisp-space-3); }
|
|
9
|
-
& .crisp-entitycard-foot { display: flex; align-items: center; gap: var(--crisp-space-1-5); padding-top: var(--crisp-space-2-5); margin-top: var(--crisp-space-1); border-top: 1px solid var(--crisp-border-subtle); font-size: var(--crisp-text-sm); color: var(--crisp-fg-
|
|
9
|
+
& .crisp-entitycard-foot { display: flex; align-items: center; gap: var(--crisp-space-1-5); padding-top: var(--crisp-space-2-5); margin-top: var(--crisp-space-1); border-top: 1px solid var(--crisp-border-subtle); font-size: var(--crisp-text-sm); color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); }
|
|
10
10
|
& .crisp-entitycard-foot-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--crisp-fg-primary); }
|
|
11
11
|
& .crisp-entitycard-date { margin-inline-start: auto; flex-shrink: 0; white-space: nowrap; }
|
|
12
12
|
}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
display: flex; flex-direction: column; box-sizing: border-box; width: 100%; min-width: 0; text-align: start; padding: var(--crisp-space-3) var(--crisp-space-4); margin: 0; border: none; border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-border-subtle); color: var(--crisp-fg-primary); font-family: var(--crisp-font-sans); cursor: pointer; transition: box-shadow .12s ease, background-color .12s ease; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
4
4
|
&:hover { box-shadow: inset 0 0 0 1px var(--crisp-border-default), 0 1px 2px rgba(0,0,0,0.04), 0 6px 16px -6px rgba(28,40,64,0.12); }
|
|
5
5
|
&:focus-visible { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: 2px; }
|
|
6
|
-
& .crisp-entitycard-author { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); font-size: var(--crisp-text-
|
|
7
|
-
& .crisp-entitycard-title { margin-top: var(--crisp-space-2); font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-
|
|
8
|
-
& .crisp-entitycard-excerpt { margin-top: var(--crisp-space-1); font-size: var(--crisp-text-
|
|
6
|
+
& .crisp-entitycard-author { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-primary); }
|
|
7
|
+
& .crisp-entitycard-title { margin-top: var(--crisp-space-2); font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); letter-spacing: -0.1px; color: var(--crisp-fg-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
8
|
+
& .crisp-entitycard-excerpt { margin-top: var(--crisp-space-1); font-size: var(--crisp-text-sm); line-height: 16px; color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
9
9
|
& .crisp-entitycard-spacer { flex: 1; min-height: var(--crisp-space-3); }
|
|
10
|
-
& .crisp-entitycard-foot { display: flex; align-items: center; gap: var(--crisp-space-1-5); padding-top: var(--crisp-space-2-5); margin-top: var(--crisp-space-1); border-top: 1px solid var(--crisp-border-subtle); font-size: var(--crisp-text-sm); color: var(--crisp-fg-
|
|
10
|
+
& .crisp-entitycard-foot { display: flex; align-items: center; gap: var(--crisp-space-1-5); padding-top: var(--crisp-space-2-5); margin-top: var(--crisp-space-1); border-top: 1px solid var(--crisp-border-subtle); font-size: var(--crisp-text-sm); color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); }
|
|
11
11
|
& .crisp-entitycard-foot-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--crisp-fg-primary); }
|
|
12
12
|
& .crisp-entitycard-date { margin-inline-start: auto; flex-shrink: 0; white-space: nowrap; }
|
|
13
13
|
}
|
|
@@ -7,7 +7,7 @@ import { bulkbarRecipe } from "./bulkbar.recipe.js";
|
|
|
7
7
|
* positioned ancestor when a selection is active; render it conditionally
|
|
8
8
|
* (e.g. `count > 0 && <BulkBar …/>`). Measured from a records table.
|
|
9
9
|
*/
|
|
10
|
-
export function BulkBar({ count, onClear, countLabel = "
|
|
10
|
+
export function BulkBar({ count, onClear, countLabel = "Selected", countText = (count, label) => (_jsxs(_Fragment, { children: [count, " ", label] })), children, className, clearLabel = "Clear selection", ...rest }) {
|
|
11
11
|
return (_jsx("div", { className: bulkbarRecipe({ className }), ...rest, children: _jsxs("div", { className: "crisp-bulkbar-bar", children: [count != null && (_jsxs("button", { type: "button", className: "crisp-bulkbar-count", onClick: onClear, title: clearLabel, children: [countText(count, countLabel), _jsx("span", { className: "crisp-bulkbar-clearlabel", children: clearLabel }), _jsx(X, { size: 13, strokeWidth: 2, "aria-hidden": "true" })] })), children] }) }));
|
|
12
12
|
}
|
|
13
13
|
BulkBar.displayName = "BulkBar";
|
|
@@ -12,7 +12,7 @@ const config = defineRecipe({
|
|
|
12
12
|
base: `position: absolute; left: 0; right: 0; bottom: ${c.space["4"]}; display: flex; justify-content: center; pointer-events: none; z-index: 10;
|
|
13
13
|
& .crisp-bulkbar-bar { pointer-events: auto; display: flex; align-items: center; gap: ${c.space["0.5"]}; height: 48px; padding: 0 ${c.space["1"]} 0 ${c.space["1.5"]}; border-radius: 14px; background: ${c.bgSurface}; box-shadow: ${e.floating}; color: ${c.fgPrimary}; transition: opacity .16s ease, transform .16s ease; }
|
|
14
14
|
& .crisp-bulkbar-bar { @starting-style { opacity: 0; transform: translateY(10px); } }
|
|
15
|
-
& .crisp-bulkbar-count { display: inline-flex; align-items: center; gap: ${c.space["1"]}; height: ${c.size.menuRow}; margin: 0; padding: 0 ${c.space["2"]}; border: none; border-radius: ${c.radius.
|
|
15
|
+
& .crisp-bulkbar-count { display: inline-flex; align-items: center; gap: ${c.space["1"]}; height: ${c.size.menuRow}; margin: 0; padding: 0 ${c.space["2"]}; border: none; border-radius: ${c.radius.lg}; background: color-mix(in srgb, ${c.fgPrimary} 2%, transparent); font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; white-space: nowrap; cursor: pointer; transition: background-color .12s; }
|
|
16
16
|
& .crisp-bulkbar-count:hover { background: color-mix(in srgb, ${c.fgPrimary} 8%, transparent); color: ${c.fgPrimary}; }
|
|
17
17
|
& .crisp-bulkbar-count svg { flex-shrink: 0; }
|
|
18
18
|
/* the ", Clear selection" ARIA concatenates onto the pill's name (#324)
|
|
@@ -21,7 +21,7 @@ const config = defineRecipe({
|
|
|
21
21
|
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
22
22
|
overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
|
|
23
23
|
}
|
|
24
|
-
& .crisp-bulkbar-btn { display: inline-flex; align-items: center; gap: ${c.space["1"]}; height: ${c.size.menuRow}; padding: 0 ${c.space["2"]}; border: none; border-radius: ${c.radius.
|
|
24
|
+
& .crisp-bulkbar-btn { display: inline-flex; align-items: center; gap: ${c.space["1"]}; height: ${c.size.menuRow}; padding: 0 ${c.space["2"]}; border: none; border-radius: ${c.radius.lg}; background: ${c.bgSurface}; box-shadow: ${e.field}; color: ${c.fgPrimary}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; white-space: nowrap; cursor: pointer; transition: background-color .12s; }
|
|
25
25
|
& .crisp-bulkbar-btn:hover { background: ${c.bgRaised}; }
|
|
26
26
|
& .crisp-bulkbar-btn--danger { color: ${c.bgDanger}; }
|
|
27
27
|
& .crisp-bulkbar-btn--danger:hover { background: color-mix(in srgb, ${c.bgDanger} 10%, transparent); }
|
|
@@ -166,7 +166,7 @@ id, placeholder = "Select…", searchable = true, searchPlaceholder = "Search…
|
|
|
166
166
|
e.preventDefault();
|
|
167
167
|
openMenu();
|
|
168
168
|
}
|
|
169
|
-
}, children: [_jsx("span", { className: "crisp-multiselect-chips", children: selectedOptions.length === 0 ? (_jsx("span", { className: "crisp-multiselect-placeholder", children: placeholder })) : (selectedOptions.map((o) => _jsx(Chip, { opt: o }, o.value))) }), _jsx(ChevronDown, { className: "crisp-multiselect-chevron", size: 16, strokeWidth: 1.75 })] }), open && (_jsx(FloatingPortal, { sourceRef: rootRef, children: _jsxs("div", { ref: listboxRef, id: listboxId, className: "crisp-multiselect-listbox", role: "listbox", "aria-multiselectable": "true", "aria-label": ariaLabel, "data-up": up ? "" : undefined, style: pos, children: [searchable && (_jsxs("div", { className: "crisp-multiselect-search", children: [_jsx(Search, { size:
|
|
169
|
+
}, children: [_jsx("span", { className: "crisp-multiselect-chips", children: selectedOptions.length === 0 ? (_jsx("span", { className: "crisp-multiselect-placeholder", children: placeholder })) : (selectedOptions.map((o) => _jsx(Chip, { opt: o }, o.value))) }), _jsx(ChevronDown, { className: "crisp-multiselect-chevron", size: 16, strokeWidth: 1.75 })] }), open && (_jsx(FloatingPortal, { sourceRef: rootRef, children: _jsxs("div", { ref: listboxRef, id: listboxId, className: "crisp-multiselect-listbox", role: "listbox", "aria-multiselectable": "true", "aria-label": ariaLabel, "data-up": up ? "" : undefined, style: pos, children: [searchable && (_jsxs("div", { className: "crisp-multiselect-search", children: [_jsx(Search, { size: 16, strokeWidth: 1.75 }), _jsx("input", { ref: searchRef, type: "text", placeholder: searchPlaceholder, "aria-label": searchPlaceholder, "aria-controls": listboxId, "aria-activedescendant": activeId, value: query, onChange: (e) => {
|
|
170
170
|
setQuery(e.target.value);
|
|
171
171
|
setHighlight(0);
|
|
172
172
|
}, onKeyDown: onNavKeys })] })), filtered.length === 0 ? (_jsx("div", { className: "crisp-multiselect-empty", children: emptyLabel })) : (filtered.map((opt, i) => {
|
|
@@ -62,7 +62,7 @@ const config = defineRecipe({
|
|
|
62
62
|
}
|
|
63
63
|
.crisp-multiselect-listbox[data-up] { transform-origin: bottom left; }
|
|
64
64
|
.crisp-multiselect-listbox { @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
65
|
-
.crisp-multiselect-search { display: flex; align-items: center; gap: ${c.space["
|
|
65
|
+
.crisp-multiselect-search { display: flex; align-items: center; gap: ${c.space["1.5"]}; height: 36px; flex-shrink: 0; margin: calc(-1 * ${c.space["1"]}) calc(-1 * ${c.space["1"]}) ${c.space["1"]}; padding: ${c.space["2"]} ${c.space["3"]}; color: ${c.fgMuted}; }
|
|
66
66
|
.crisp-multiselect-search svg { flex-shrink: 0; }
|
|
67
67
|
.crisp-multiselect-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; }
|
|
68
68
|
.crisp-multiselect-search input::placeholder { color: ${c.fgMuted}; }
|
|
@@ -14,7 +14,7 @@ import { contract as c, elevation as e } from "../../tokens/index.js";
|
|
|
14
14
|
// block, and those depend on following `.menu` in source order. Keeping the
|
|
15
15
|
// split preserves that cascade exactly, which is what lets the generated CSS
|
|
16
16
|
// stay byte-for-byte identical to what shipped before the extraction.
|
|
17
|
-
export const toolbarChromeHead = (p) => ` & .${CLASS_PREFIX}${p}-toolbar { display: flex; align-items: center; gap: ${c.space["
|
|
17
|
+
export const toolbarChromeHead = (p) => ` & .${CLASS_PREFIX}${p}-toolbar { display: flex; align-items: center; gap: ${c.space["2"]}; padding: 0 ${c.space["3"]} ${c.space["2"]}; }
|
|
18
18
|
& .${CLASS_PREFIX}${p}-toolbar[data-inline] { padding-bottom: 0; }
|
|
19
19
|
& .${CLASS_PREFIX}${p}-search { display: flex; align-items: center; gap: ${c.space["1.5"]}; height: ${c.size.row}; padding: 0 ${c.space["2.5"]}; border: none; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderSubtle}; color: ${c.fgMuted}; }
|
|
20
20
|
& .${CLASS_PREFIX}${p}-search svg { flex-shrink: 0; }
|
|
@@ -27,10 +27,11 @@ export const toolbarChromeHead = (p) => ` & .${CLASS_PREFIX}${p}-toolbar { di
|
|
|
27
27
|
& .${CLASS_PREFIX}${p}-tool--ghost { box-shadow: none; background: color-mix(in srgb, ${c.fgPrimary} 3%, transparent); color: ${c.fgMuted}; }
|
|
28
28
|
& .${CLASS_PREFIX}${p}-tool--ghost:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); }
|
|
29
29
|
& .${CLASS_PREFIX}${p}-toolgroup { position: relative; display: inline-flex; }
|
|
30
|
-
& .${CLASS_PREFIX}${p}-
|
|
30
|
+
& .${CLASS_PREFIX}${p}-divider { flex-shrink: 0; width: 1px; height: 20px; background: ${c.borderSubtle}; }
|
|
31
|
+
& .${CLASS_PREFIX}${p}-menu { position: absolute; top: calc(100% + ${c.space["1"]}); left: 0; z-index: 30; min-width: 232px; padding: ${c.space["1"]}; border-radius: ${c.radius.xl}; background: ${c.bgPopover}; box-shadow: ${e.floating}; display: flex; flex-direction: column; gap: ${c.space.px}; transform-origin: top; opacity: 1; transform: none; transition: opacity .13s ease, transform .13s ease; }
|
|
31
32
|
& .${CLASS_PREFIX}${p}-menu { @starting-style { opacity: 0; transform: scale(0.96); } }`;
|
|
32
33
|
export const toolbarChromeBody = (p) => ` & .${CLASS_PREFIX}${p}-menu-head { padding: ${c.space["1"]} ${c.space["2"]} ${c.space["0.5"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
33
|
-
& .${CLASS_PREFIX}${p}-sortpop { min-width:
|
|
34
|
+
& .${CLASS_PREFIX}${p}-sortpop { min-width: 480px; overflow: visible; padding: ${c.space["3"]} ${c.space["1.5"]}; gap: ${c.space["2"]}; }
|
|
34
35
|
& .${CLASS_PREFIX}${p}-sort-empty { padding: ${c.space["1"]} ${c.space["1"]} ${c.space["2"]}; font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
35
36
|
& .${CLASS_PREFIX}${p}-sort-row { display: flex; align-items: center; gap: ${c.space["1.5"]}; }
|
|
36
37
|
& .${CLASS_PREFIX}${p}-sort-grip { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 28px; flex-shrink: 0; margin-right: calc(-1 * ${c.space["1"]}); padding: 0; border: none; background: none; color: ${c.fgMuted}; cursor: grab; }
|
|
@@ -51,7 +52,7 @@ export const toolbarChromeBody = (p) => ` & .${CLASS_PREFIX}${p}-menu-head {
|
|
|
51
52
|
& .${CLASS_PREFIX}${p}-sort-learn { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; font-size: ${c.text.lg}; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); text-decoration: none; }
|
|
52
53
|
& .${CLASS_PREFIX}${p}-sort-learn svg { flex-shrink: 0; }
|
|
53
54
|
& .${CLASS_PREFIX}${p}-sort-learn:hover { color: ${c.fgPrimary}; }
|
|
54
|
-
& .${CLASS_PREFIX}${p}-menu-item { display: flex; align-items: center; gap: ${c.space["
|
|
55
|
+
& .${CLASS_PREFIX}${p}-menu-item { display: flex; align-items: center; gap: ${c.space["1.5"]}; width: 100%; height: ${c.size.menuRow}; margin: 0; padding: 0 ${c.space["2"]}; border: none; background: none; border-radius: ${c.radius.md}; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; text-align: left; cursor: pointer; }
|
|
55
56
|
& .${CLASS_PREFIX}${p}-menu-item:hover { background: ${c.bgRaised}; }
|
|
56
57
|
& .${CLASS_PREFIX}${p}-menu-item:disabled { opacity: 0.4; cursor: default; }
|
|
57
58
|
& .${CLASS_PREFIX}${p}-menu-item:disabled:hover { background: none; }
|
|
@@ -234,7 +234,7 @@ export function TableToolbar({ columns, sortColumns: sortColumnsProp, filterColu
|
|
|
234
234
|
label: (_jsxs("span", { className: "crisp-tabletoolbar-sort-optlabel", children: [_jsx(ArrowDownWideNarrow, { size: 15, strokeWidth: 1.75 }), descendingLabel] })),
|
|
235
235
|
keywords: descendingLabel,
|
|
236
236
|
},
|
|
237
|
-
], "aria-label": sortDirectionLabel }), _jsx("button", { type: "button", className: "crisp-tabletoolbar-sort-remove", onClick: () => removeSort(i), "aria-label": removeSortLabel, children: _jsx(X, { size: 15, strokeWidth: 1.75 }) })] }, s.key)))), _jsx("div", { className: "crisp-tabletoolbar-sort-addrow", children: _jsxs("button", { ref: addSortRef, type: "button", className: "crisp-tabletoolbar-sort-add", onClick: addSort, children: [_jsx(Plus, { size: 15, strokeWidth: 1.75 }), addSortLabel] }) }), helpHref && (_jsx("div", { className: "crisp-tabletoolbar-sort-foot", children: _jsxs("a", { className: "crisp-tabletoolbar-sort-learn", href: helpHref, target: "_blank", rel: "noreferrer", children: [_jsx(CircleHelp, { size: 14, strokeWidth: 1.75 }), learnSortingLabel] }) }))] }))] }), _jsxs("span", { className: "crisp-tabletoolbar-toolgroup", children: [_jsxs("button", { type: "button", className: `crisp-tabletoolbar-tool crisp-tabletoolbar-tool--ghost${activeFilters ? " crisp-tabletoolbar-tool--active" : ""}`, onClick: () => setOpenMenu(openMenu === "filter" ? null : "filter"), "aria-haspopup": "dialog", "aria-expanded": openMenu === "filter", "data-menu-trigger": true, children: [_jsx(ListFilter, { size: 14, strokeWidth: 1.75, "aria-hidden": "true" }), filterTriggerLabel
|
|
237
|
+
], "aria-label": sortDirectionLabel }), _jsx("button", { type: "button", className: "crisp-tabletoolbar-sort-remove", onClick: () => removeSort(i), "aria-label": removeSortLabel, children: _jsx(X, { size: 15, strokeWidth: 1.75 }) })] }, s.key)))), _jsx("div", { className: "crisp-tabletoolbar-sort-addrow", children: _jsxs("button", { ref: addSortRef, type: "button", className: "crisp-tabletoolbar-sort-add", onClick: addSort, children: [_jsx(Plus, { size: 15, strokeWidth: 1.75 }), addSortLabel] }) }), helpHref && (_jsx("div", { className: "crisp-tabletoolbar-sort-foot", children: _jsxs("a", { className: "crisp-tabletoolbar-sort-learn", href: helpHref, target: "_blank", rel: "noreferrer", children: [_jsx(CircleHelp, { size: 14, strokeWidth: 1.75 }), learnSortingLabel] }) }))] }))] }), _jsx("span", { className: "crisp-tabletoolbar-divider", "aria-hidden": "true" }), _jsxs("span", { className: "crisp-tabletoolbar-toolgroup", children: [_jsxs("button", { type: "button", className: `crisp-tabletoolbar-tool crisp-tabletoolbar-tool--ghost${activeFilters ? " crisp-tabletoolbar-tool--active" : ""}`, onClick: () => setOpenMenu(openMenu === "filter" ? null : "filter"), "aria-haspopup": "dialog", "aria-expanded": openMenu === "filter", "data-menu-trigger": true, children: [_jsx(ListFilter, { size: 14, strokeWidth: 1.75, "aria-hidden": "true" }), filterTriggerLabel
|
|
238
238
|
? filterTriggerLabel(activeFilters)
|
|
239
239
|
: activeFilters
|
|
240
240
|
? `Filter · ${activeFilters}`
|
|
@@ -2,6 +2,15 @@ import { defineSpec, resolveRecipe, specToRecipe } from "../../core/index.js";
|
|
|
2
2
|
import { contract as c } from "../../tokens/index.js";
|
|
3
3
|
// The floating bubble for a Tooltip — a dark hint chip. Applied to the
|
|
4
4
|
// portaled bubble itself (not a wrapper), so its styles survive the portal.
|
|
5
|
+
//
|
|
6
|
+
// Re-measured live against Attio's own tooltip (crisp#465): background,
|
|
7
|
+
// text colour, vertical padding and radius were all off — #20242c/#fff/4px
|
|
8
|
+
// vertical/6px radius were an earlier, uncorroborated guess (not the same
|
|
9
|
+
// surface Lesson 24 in AUTHORING.md describes for the RichText toolbar,
|
|
10
|
+
// despite the similar wording). The real values are gray900's light hex
|
|
11
|
+
// (#101112, the same "dark pill" ink NavItem's own text uses) and
|
|
12
|
+
// line100's light hex (#eeeff1) — both theme-constant, same as before,
|
|
13
|
+
// just the wrong pair.
|
|
5
14
|
const spec = defineSpec({
|
|
6
15
|
name: "tooltip",
|
|
7
16
|
base: {
|
|
@@ -10,10 +19,10 @@ const spec = defineSpec({
|
|
|
10
19
|
boxSizing: "border-box",
|
|
11
20
|
pointerEvents: "none",
|
|
12
21
|
maxWidth: "260px",
|
|
13
|
-
padding: `${c.space["1"]} ${c.space["2"]}`,
|
|
14
|
-
borderRadius: c.radius.
|
|
15
|
-
background: "#
|
|
16
|
-
color: "#
|
|
22
|
+
padding: `${c.space["1.5"]} ${c.space["2"]}`,
|
|
23
|
+
borderRadius: c.radius.md,
|
|
24
|
+
background: "#101112",
|
|
25
|
+
color: "#eeeff1",
|
|
17
26
|
fontFamily: c.font.sans,
|
|
18
27
|
fontSize: c.text.sm,
|
|
19
28
|
fontWeight: c.weight.medium,
|
|
@@ -3,6 +3,22 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
3
3
|
// A note / entity card — measured from a Notes grid: a bordered white card
|
|
4
4
|
// with an author row (avatar + name) at the top, a title, a clamped excerpt,
|
|
5
5
|
// and a footer row (avatar + name … date). The whole card is clickable.
|
|
6
|
+
//
|
|
7
|
+
// Re-measured directly against a live note card (#474): the author name
|
|
8
|
+
// renders at fgPrimary/text.sm (12px), not a muted 13px — it reads as
|
|
9
|
+
// regular body text, not a caption. The title is weight.medium (500), not
|
|
10
|
+
// semibold — "my" measured 500 on the live card, and semibold was an
|
|
11
|
+
// unmeasured guess. The excerpt is text.sm (12px)/16px line-height, and
|
|
12
|
+
// both the excerpt body and the footer date share one muted tone that is
|
|
13
|
+
// darker than `fgMuted` (measured `rgba(0,0,0,0.63)` on the excerpt
|
|
14
|
+
// paragraph AND, independently, on the footer date — the same value also
|
|
15
|
+
// turned up on Board's "29d" age pill in the same audit, so it's a real,
|
|
16
|
+
// reused Attio tone and not noise). `fgMuted` (gray400, #71717a) doesn't
|
|
17
|
+
// carry that ring, so this reads it as 63% of `fgPrimary` instead of adding
|
|
18
|
+
// an unmeasured new dark-mode literal (AUTHORING Lesson 47) — `fgPrimary`
|
|
19
|
+
// already flips correctly per theme, so the mix preserves the *relationship*
|
|
20
|
+
// Attio is expressing (a darker secondary text tone) in both themes.
|
|
21
|
+
const secondaryFg = `color-mix(in srgb, ${c.fgPrimary} 63%, transparent)`;
|
|
6
22
|
const config = defineRecipe({
|
|
7
23
|
name: "entitycard",
|
|
8
24
|
base: `display: flex; flex-direction: column; box-sizing: border-box; width: 100%; min-width: 0; text-align: start;
|
|
@@ -14,11 +30,11 @@ const config = defineRecipe({
|
|
|
14
30
|
&:hover { box-shadow: inset 0 0 0 1px ${c.borderDefault}, 0 1px 2px rgba(0,0,0,0.04), 0 6px 16px -6px rgba(28,40,64,0.12); }
|
|
15
31
|
&:focus-visible { outline: 2px solid ${c.bgBrandSolid}; outline-offset: 2px; }
|
|
16
32
|
|
|
17
|
-
& .crisp-entitycard-author { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; font-size: ${c.text.
|
|
18
|
-
& .crisp-entitycard-title { margin-top: ${c.space["2"]}; font-size: ${c.text.lg}; font-weight: ${c.weight.
|
|
19
|
-
& .crisp-entitycard-excerpt { margin-top: ${c.space["1"]}; font-size: ${c.text.
|
|
33
|
+
& .crisp-entitycard-author { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgPrimary}; }
|
|
34
|
+
& .crisp-entitycard-title { margin-top: ${c.space["2"]}; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; letter-spacing: -0.1px; color: ${c.fgPrimary}; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
35
|
+
& .crisp-entitycard-excerpt { margin-top: ${c.space["1"]}; font-size: ${c.text.sm}; line-height: 16px; color: ${secondaryFg}; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
20
36
|
& .crisp-entitycard-spacer { flex: 1; min-height: ${c.space["3"]}; }
|
|
21
|
-
& .crisp-entitycard-foot { display: flex; align-items: center; gap: ${c.space["1.5"]}; padding-top: ${c.space["2.5"]}; margin-top: ${c.space["1"]}; border-top: 1px solid ${c.borderSubtle}; font-size: ${c.text.sm}; color: ${
|
|
37
|
+
& .crisp-entitycard-foot { display: flex; align-items: center; gap: ${c.space["1.5"]}; padding-top: ${c.space["2.5"]}; margin-top: ${c.space["1"]}; border-top: 1px solid ${c.borderSubtle}; font-size: ${c.text.sm}; color: ${secondaryFg}; }
|
|
22
38
|
& .crisp-entitycard-foot-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: ${c.fgPrimary}; }
|
|
23
39
|
& .crisp-entitycard-date { margin-inline-start: auto; flex-shrink: 0; white-space: nowrap; }`,
|
|
24
40
|
variants: {},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { listpageRecipe } from "./listpage.recipe.js";
|
|
3
3
|
/** A single list row wrapper (52px, hover, top border). Compose cells inside.
|
|
4
4
|
* Renders a real `<button>` when `onClick` is given, else a plain row. */
|
|
@@ -16,6 +16,6 @@ export function ListRow({ children, onClick, }) {
|
|
|
16
16
|
*/
|
|
17
17
|
export function ListPage({ leading, trailing, count, favorites, favoritesLabel = "Favorites", columns, groups, emptyLabel = "Nothing here yet", className, ...rest }) {
|
|
18
18
|
const total = groups?.reduce((s, g) => s + g.rows.length, 0) ?? 0;
|
|
19
|
-
return (_jsxs("div", { className: listpageRecipe({ className }), ...rest, children: [_jsxs("div", { className: "crisp-listpage-toolbar", children: [_jsx("div", { className: "crisp-listpage-toolbar-lead", children: leading }), count != null && _jsx("div", { className: "crisp-listpage-count", children: count }), trailing != null && (_jsx("div", { className: "crisp-listpage-toolbar-trail", children: trailing }))] }), _jsxs("div", { className: "crisp-listpage-body", children: [favorites != null && (_jsxs(
|
|
19
|
+
return (_jsxs("div", { className: listpageRecipe({ className }), ...rest, children: [_jsxs("div", { className: "crisp-listpage-toolbar", children: [_jsx("div", { className: "crisp-listpage-toolbar-lead", children: leading }), count != null && _jsx("div", { className: "crisp-listpage-count", children: count }), trailing != null && (_jsx("div", { className: "crisp-listpage-toolbar-trail", children: trailing }))] }), _jsxs("div", { className: "crisp-listpage-body", children: [favorites != null && (_jsxs("div", { className: "crisp-listpage-favorites-section", children: [_jsx("div", { className: "crisp-listpage-section-label", children: favoritesLabel }), _jsx("div", { className: "crisp-listpage-favorites", children: favorites })] })), columns && columns.length > 0 && (_jsx("div", { className: "crisp-listpage-colhead", children: columns.map((col, i) => (_jsxs("span", { className: "crisp-listpage-colhead-cell", children: [col.icon, col.label] }, i))) })), total === 0 && !groups?.length ? (_jsx("div", { className: "crisp-listpage-empty", children: emptyLabel })) : (groups?.map((g) => (_jsxs("div", { children: [_jsxs("div", { className: "crisp-listpage-group", children: [g.label, g.count != null && (_jsx("span", { className: "crisp-listpage-group-count", children: g.count }))] }), g.rows] }, g.id))))] })] }));
|
|
20
20
|
}
|
|
21
21
|
ListPage.displayName = "ListPage";
|
|
@@ -9,7 +9,7 @@ const config = defineRecipe({
|
|
|
9
9
|
base: `display: flex; flex-direction: column; min-height: 0; box-sizing: border-box; font-family: ${c.font.sans}; color: ${c.fgPrimary};
|
|
10
10
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
11
11
|
|
|
12
|
-
& .crisp-listpage-toolbar { display: flex; align-items: center; gap: ${c.space["2"]}; height:
|
|
12
|
+
& .crisp-listpage-toolbar { display: flex; align-items: center; gap: ${c.space["2"]}; height: ${c.size.header}; flex-shrink: 0; padding: 0 ${c.space["3"]}; }
|
|
13
13
|
& .crisp-listpage-toolbar-lead { display: flex; align-items: center; gap: ${c.space["2"]}; }
|
|
14
14
|
& .crisp-listpage-count { margin-inline-start: auto; font-size: ${c.text.md}; color: ${c.fgMuted}; white-space: nowrap; }
|
|
15
15
|
& .crisp-listpage-toolbar-trail { display: flex; align-items: center; gap: ${c.space["2"]}; }
|
|
@@ -18,15 +18,13 @@ const config = defineRecipe({
|
|
|
18
18
|
& .crisp-listpage-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 ${c.space["3"]} ${c.space["3"]}; }
|
|
19
19
|
|
|
20
20
|
& .crisp-listpage-section-label { padding: ${c.space["2"]} ${c.space["1"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
21
|
-
& .crisp-listpage-favorites {
|
|
22
|
-
|
|
23
|
-
border-box; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 8%, transparent); }
|
|
24
|
-
& .crisp-listpage-favorites[data-dashed] { box-shadow: none; border: 1px dashed color-mix(in srgb, ${c.fgPrimary} 14%, transparent); }
|
|
21
|
+
& .crisp-listpage-favorites-section { background: ${c.bgSubtle}; box-shadow: inset 0 -1px 0 ${c.borderSubtle}; }
|
|
22
|
+
& .crisp-listpage-favorites { display: flex; align-items: center; justify-content: center; min-height: 200px; padding: ${c.space["6"]}; }
|
|
25
23
|
|
|
26
|
-
& .crisp-listpage-colhead { display: flex; align-items: center; gap: ${c.space["2.5"]}; height:
|
|
24
|
+
& .crisp-listpage-colhead { display: flex; align-items: center; gap: ${c.space["2.5"]}; height: ${c.size.menuRow}; padding: 0 ${c.space["4"]}; box-shadow: inset 0 -1px 0 ${c.borderSubtle}; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
27
25
|
& .crisp-listpage-colhead-cell { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; }
|
|
28
26
|
|
|
29
|
-
& .crisp-listpage-group { display: flex; align-items: center; gap: ${c.space["1.5"]}; height:
|
|
27
|
+
& .crisp-listpage-group { display: flex; align-items: center; gap: ${c.space["1.5"]}; height: ${c.size.menuRow}; padding: ${c.space["2"]} ${c.space["4"]}; box-shadow: inset 0 -1px 0 ${c.borderSubtle}; background: color-mix(in srgb, ${c.fgPrimary} 2%, transparent); font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
30
28
|
& .crisp-listpage-group-count { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.sm}; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); font-size: ${c.text.xs}; color: ${c.fgMuted}; }
|
|
31
29
|
|
|
32
30
|
& .crisp-listpage-row { display: flex; align-items: center; gap: ${c.space["2.5"]}; width: 100%; height: 52px; padding: 0 ${c.space["2"]}; margin: 0; border: none; border-top: 1px solid ${c.borderSubtle}; background: none; font-family: inherit; color: inherit; text-align: start; cursor: pointer; transition: background-color .12s; }
|