@crisp-ui-kit/crisp 0.54.10 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/cjs/components/datatable/datatable.js +249 -46
  2. package/dist/cjs/components/datatable/datatable.recipe.js +24 -0
  3. package/dist/cjs/components/resizablepanel/resizablepanel.js +10 -1
  4. package/dist/cjs/components/table/table.js +8 -1
  5. package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +25 -2
  6. package/dist/cjs/components/tabletoolbar/tabletoolbar.js +176 -43
  7. package/dist/cjs/components/tabletoolbar/tabletoolbar.recipe.js +28 -9
  8. package/dist/cjs/index.js +0 -2
  9. package/dist/cjs/product/recordpage/column.js +19 -0
  10. package/dist/cjs/product/recordpage/index.js +6 -1
  11. package/dist/cjs/product/recordpage/recordpage.js +25 -8
  12. package/dist/cjs/product/recordpage/test-fixtures.js +55 -0
  13. package/dist/cjs/product/savedviews/savedviews.recipe.js +13 -11
  14. package/dist/datatable.css +14 -0
  15. package/dist/datatable.layered.css +14 -0
  16. package/dist/esm/components/datatable/datatable.js +250 -47
  17. package/dist/esm/components/datatable/datatable.recipe.js +24 -0
  18. package/dist/esm/components/resizablepanel/resizablepanel.js +10 -1
  19. package/dist/esm/components/table/table.js +8 -1
  20. package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +25 -2
  21. package/dist/esm/components/tabletoolbar/tabletoolbar.js +177 -44
  22. package/dist/esm/components/tabletoolbar/tabletoolbar.recipe.js +28 -9
  23. package/dist/esm/index.js +0 -2
  24. package/dist/esm/product/recordpage/column.js +16 -0
  25. package/dist/esm/product/recordpage/index.js +2 -0
  26. package/dist/esm/product/recordpage/recordpage.js +22 -5
  27. package/dist/esm/product/recordpage/test-fixtures.js +52 -0
  28. package/dist/esm/product/savedviews/savedviews.recipe.js +13 -11
  29. package/dist/savedviews.css +6 -18
  30. package/dist/savedviews.layered.css +6 -18
  31. package/dist/styles.css +43 -276
  32. package/dist/styles.layered.css +43 -276
  33. package/dist/tabletoolbar.css +23 -3
  34. package/dist/tabletoolbar.layered.css +23 -3
  35. package/dist/types/components/datatable/datatable.d.ts +30 -3
  36. package/dist/types/components/table/table.d.ts +14 -0
  37. package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +26 -1
  38. package/dist/types/index.d.ts +0 -2
  39. package/dist/types/product/recordpage/column.d.ts +112 -0
  40. package/dist/types/product/recordpage/index.d.ts +2 -0
  41. package/dist/types/product/recordpage/recordpage.d.ts +1 -1
  42. package/dist/types/product/recordpage/test-fixtures.d.ts +3 -0
  43. package/dist/types/product/recordpanel/recordpanel.d.ts +1 -1
  44. package/package.json +2 -12
  45. package/dist/cjs/product/recordstable/company-logos.js +0 -29
  46. package/dist/cjs/product/recordstable/index.js +0 -13
  47. package/dist/cjs/product/recordstable/recordstable.js +0 -1357
  48. package/dist/cjs/product/recordstable/recordstable.recipe.js +0 -175
  49. package/dist/cjs/product/recordstable/recordstable.tag.js +0 -26
  50. package/dist/cjs/product/taskstable/index.js +0 -7
  51. package/dist/cjs/product/taskstable/taskstable.js +0 -27
  52. package/dist/cjs/product/taskstable/taskstable.recipe.js +0 -56
  53. package/dist/esm/product/recordstable/company-logos.js +0 -26
  54. package/dist/esm/product/recordstable/index.js +0 -3
  55. package/dist/esm/product/recordstable/recordstable.js +0 -1317
  56. package/dist/esm/product/recordstable/recordstable.recipe.js +0 -172
  57. package/dist/esm/product/recordstable/recordstable.tag.js +0 -23
  58. package/dist/esm/product/taskstable/index.js +0 -2
  59. package/dist/esm/product/taskstable/taskstable.js +0 -24
  60. package/dist/esm/product/taskstable/taskstable.recipe.js +0 -53
  61. package/dist/recordstable.css +0 -223
  62. package/dist/recordstable.d.ts +0 -7
  63. package/dist/recordstable.layered.css +0 -225
  64. package/dist/taskstable.css +0 -30
  65. package/dist/taskstable.d.ts +0 -7
  66. package/dist/taskstable.layered.css +0 -32
  67. package/dist/types/product/recordstable/company-logos.d.ts +0 -1
  68. package/dist/types/product/recordstable/index.d.ts +0 -3
  69. package/dist/types/product/recordstable/recordstable.d.ts +0 -289
  70. package/dist/types/product/recordstable/recordstable.recipe.d.ts +0 -5
  71. package/dist/types/product/recordstable/recordstable.tag.d.ts +0 -15
  72. package/dist/types/product/taskstable/index.d.ts +0 -2
  73. package/dist/types/product/taskstable/taskstable.d.ts +0 -54
  74. package/dist/types/product/taskstable/taskstable.recipe.d.ts +0 -3
  75. /package/dist/cjs/product/{recordstable → recordpage}/editable-field.js +0 -0
  76. /package/dist/esm/product/{recordstable → recordpage}/editable-field.js +0 -0
  77. /package/dist/types/product/{recordstable → recordpage}/editable-field.d.ts +0 -0
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.testRows = exports.testColumns = void 0;
4
+ const lucide_react_1 = require("lucide-react");
5
+ // Moved here from product/recordstable/recordstable.tsx's `defaultColumns`/
6
+ // `defaultRows` (crisp#786): RecordsTable is deprecated and its whole
7
+ // directory is being deleted, but RecordPage's own tests (and the shared
8
+ // RTL-keyboard-convention tests that live alongside them) still need a
9
+ // real, 12-column-deep dataset to exercise "a field past the first 5 needs
10
+ // View all values" and similar shape-dependent assertions. Simplified from
11
+ // the original: no baked-in company-logo data URIs (nothing here asserts on
12
+ // avatars), a plain favicon URL instead.
13
+ exports.testColumns = [
14
+ { key: "company", label: "Company", type: "entity", icon: lucide_react_1.Building2 },
15
+ { key: "domain", label: "Domain", type: "url", icon: lucide_react_1.Globe },
16
+ {
17
+ key: "categories",
18
+ label: "Categories",
19
+ type: "tags",
20
+ icon: lucide_react_1.Tag,
21
+ width: 240,
22
+ },
23
+ {
24
+ key: "employees",
25
+ label: "Employees",
26
+ type: "number",
27
+ icon: lucide_react_1.Users,
28
+ width: 120,
29
+ },
30
+ { key: "location", label: "Location", type: "text", icon: lucide_react_1.MapPin },
31
+ { key: "stage", label: "Stage", type: "tags", icon: lucide_react_1.TrendingUp, width: 150 },
32
+ { key: "ceo", label: "CEO", type: "text", icon: lucide_react_1.Briefcase, width: 170 },
33
+ { key: "twitter", label: "Twitter", type: "url", icon: lucide_react_1.AtSign, width: 150 },
34
+ {
35
+ key: "followers",
36
+ label: "Followers",
37
+ type: "number",
38
+ icon: lucide_react_1.Users,
39
+ width: 120,
40
+ },
41
+ { key: "linkedin", label: "LinkedIn", type: "url", icon: lucide_react_1.Globe, width: 180 },
42
+ {
43
+ key: "founded",
44
+ label: "Founded",
45
+ type: "date",
46
+ icon: lucide_react_1.Calendar,
47
+ width: 110,
48
+ },
49
+ { key: "arr", label: "Est. ARR", type: "number", icon: lucide_react_1.Hash, width: 130 },
50
+ ];
51
+ // biome-ignore format: one row per line keeps the wide demo dataset readable
52
+ exports.testRows = [
53
+ { id: "google", company: { name: "Google", avatar: "https://www.google.com/s2/favicons?domain=google.com&sz=64" }, domain: "google.com", categories: ["Search", "Ads", "Cloud", "AI", "Android", "Maps", "Hardware", "Workspace", "Chrome"], employees: 182000, location: "Mountain View, CA", stage: ["Public"], ceo: "Sundar Pichai", twitter: "twitter.com/google", followers: 29800000, linkedin: "linkedin.com/company/google", founded: "1998", arr: 307000000000 },
54
+ { id: "stripe", company: { name: "Stripe", avatar: "https://www.google.com/s2/favicons?domain=stripe.com&sz=64" }, domain: "stripe.com", categories: ["Payments", "Fintech"], employees: 8000, location: "San Francisco, CA", stage: ["Series I"], ceo: "Patrick Collison", twitter: "twitter.com/stripe", followers: 1200000, linkedin: "linkedin.com/company/stripe", founded: "2010", arr: 16000000000 },
55
+ ];
@@ -26,24 +26,26 @@ const config = (0, core_1.defineRecipe)({
26
26
  position: relative; display: inline-flex; font-family: ${tokens_1.contract.font.sans};
27
27
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
28
28
 
29
- /* Trigger fill measured rgb(246,247,247); bgRaised's light value is
30
- #f4f4f5 (244,244,245) — a 2-unit-per-channel difference, inside
31
- screenshot/anti-aliasing noise, not a second real colour. Reusing the
32
- token (Lesson 3 — tokens, not raw px/hex) gets a correct,
33
- already-established dark-mode fill for free instead of a light-only
34
- literal; AUTHORING.md Lesson 29 is the case where that shortcut went
35
- wrong (a flat colour that stayed visible where the reference had
36
- none) — this is the opposite risk (a token that already flips per
37
- theme, applied to the closest measured match). */
29
+ /* crisp/#772 follow-up, re-measured live 2026-09-25 in the trigger's
30
+ actual position (Attio's real view bar, next to View settings --
31
+ fixed there in #766/#768/#778): white (bgSurface, rgb(255,255,255)
32
+ exact) with elevation.field's 3-layer shadow, the same raised
33
+ chrome View settings and Import/Export both carry
34
+ (tabletoolbar.recipe.ts's own --raised, not reused here directly
35
+ since this is a separate recipe/component, but the identical measured
36
+ values). Supersedes the original #555 measurement (rgb(246,247,247),
37
+ reused as bgRaised -- a flat grey fill with no shadow at all), which
38
+ was wrong: this trigger was never re-checked once it moved into its
39
+ real view-bar position. */
38
40
  & .crisp-savedviews-trigger {
39
41
  box-sizing: border-box; display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]};
40
42
  height: ${tokens_1.contract.size.row}; margin: 0; padding: ${tokens_1.contract.space["1"]} ${tokens_1.contract.space["1.5"]};
41
- border: none; border-radius: ${tokens_1.contract.radius.md}; background: ${tokens_1.contract.bgRaised};
43
+ border: none; border-radius: ${tokens_1.contract.radius.md}; background: ${tokens_1.contract.bgSurface}; box-shadow: ${tokens_1.elevation.field};
42
44
  font-family: inherit; font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.medium}; color: ${tokens_1.contract.fgPrimary};
43
45
  cursor: pointer; white-space: nowrap; transition: background-color .12s ease;
44
46
  }
45
47
  & .crisp-savedviews-trigger:hover,
46
- & .crisp-savedviews-trigger[data-open] { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 4%, ${tokens_1.contract.bgRaised}); }
48
+ & .crisp-savedviews-trigger[data-open] { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 4%, ${tokens_1.contract.bgSurface}); }
47
49
  & .crisp-savedviews-trigger-icon { flex-shrink: 0; display: inline-flex; width: ${tokens_1.contract.size.icon}; height: ${tokens_1.contract.size.icon}; }
48
50
  & .crisp-savedviews-trigger-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
49
51
  & .crisp-savedviews-trigger-chevron { flex-shrink: 0; color: ${tokens_1.contract.fgMuted}; }
@@ -152,6 +152,10 @@
152
152
  & th[data-drop-after]::after { inset-inline-end: -1.5px; }
153
153
  /* typed cells — entity (avatar + name), colour-coded tags, numbers, dates */
154
154
  & .crisp-datatable-entity { display: flex; align-items: center; gap: var(--crisp-space-1-5); min-width: 0; color: var(--crisp-fg-primary); font-weight: var(--crisp-weight-medium); }
155
+ /* crisp/#601 supersession follow-up -- the same flex-row shape .crisp-datatable-entity gives its own avatar+name+actions, but structural only (no entity-specific colour/weight): lets onOpenComments/onOpenPreview compose alongside ANY column's own
156
+ content (a custom render, or a non-entity built-in type), not just
157
+ type: "entity"'s own inline rendering. */
158
+ & .crisp-datatable-cell-actions-row { display: flex; align-items: center; gap: var(--crisp-space-1-5); min-width: 0; width: 100%; }
155
159
  /* crisp/#601, G-050: measured LIVE (getComputedStyle on the name text, plain hover vs rest) that Attio's underline is unconditional, not a
156
160
  hover reveal -- identical at rest and on hover: text-decoration-color
157
161
  is rgba(0,0,0,0.09), a 9% tint, not the name's own full-contrast text colour. The previous :hover-gated, full-contrast rule here was itself unmeasured and wrong in two ways at once. */
@@ -183,6 +187,16 @@
183
187
  /* url/email cell types (#654) -- same measured values as RecordsTable's own .crisp-recordstable-link, which this mirrors: no underline at rest, underline on hover, own-colour text rather than a browser-blue link. */
184
188
  & .crisp-datatable-link { color: var(--crisp-fg-primary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
185
189
  & .crisp-datatable-link:hover { text-decoration: underline; }
190
+ /* rating cell type/editor (#760) -- measured live: 16px stars on an 18px pitch (a 2px gap), an empty star at rgba(0,0,0,0.1), a committed/filled star at brand600 (--crisp-bg-brand-solid, an exact match to the measured #266df0), and a distinct hover-preview colour -- rgb(33,91,196) -- that's close to but NOT brand700/bgBrandSolidPressed
191
+ (#1f5fd6); kept as its own literal rather than forced onto that token,
192
+ since the two were measured stable and different. The read-only svg
193
+ and the editable button's own inner svg both carry the crisp-datatable-rating-star class on the svg itself (not the button), so one set of fill rules covers both -- the button only adds its own reset + cursor via a separate -btn class. */
194
+ & .crisp-datatable-rating { display: inline-flex; align-items: center; gap: 2px; }
195
+ & .crisp-datatable-rating-star { display: block; }
196
+ & .crisp-datatable-rating-star path { fill: rgba(0, 0, 0, 0.1); }
197
+ & .crisp-datatable-rating-star[data-filled] path { fill: var(--crisp-bg-brand-solid); }
198
+ & .crisp-datatable-rating-star[data-hovering] path { fill: #215bc4; }
199
+ & .crisp-datatable-rating-star-btn { display: inline-flex; padding: 0; margin: 0; border: none; background: none; font-family: inherit; cursor: pointer; }
186
200
  /* row drag-to-reorder -- a Settings > Objects > Attributes screen measures a leading 20px grip column, a 16px grip icon, and the row's own
187
201
  hairline doubling as the drop indicator (it tints toward the brand
188
202
  colour as the active drop target). The affordance + geometry are
@@ -153,6 +153,10 @@
153
153
  & th[data-drop-after]::after { inset-inline-end: -1.5px; }
154
154
  /* typed cells — entity (avatar + name), colour-coded tags, numbers, dates */
155
155
  & .crisp-datatable-entity { display: flex; align-items: center; gap: var(--crisp-space-1-5); min-width: 0; color: var(--crisp-fg-primary); font-weight: var(--crisp-weight-medium); }
156
+ /* crisp/#601 supersession follow-up -- the same flex-row shape .crisp-datatable-entity gives its own avatar+name+actions, but structural only (no entity-specific colour/weight): lets onOpenComments/onOpenPreview compose alongside ANY column's own
157
+ content (a custom render, or a non-entity built-in type), not just
158
+ type: "entity"'s own inline rendering. */
159
+ & .crisp-datatable-cell-actions-row { display: flex; align-items: center; gap: var(--crisp-space-1-5); min-width: 0; width: 100%; }
156
160
  /* crisp/#601, G-050: measured LIVE (getComputedStyle on the name text, plain hover vs rest) that Attio's underline is unconditional, not a
157
161
  hover reveal -- identical at rest and on hover: text-decoration-color
158
162
  is rgba(0,0,0,0.09), a 9% tint, not the name's own full-contrast text colour. The previous :hover-gated, full-contrast rule here was itself unmeasured and wrong in two ways at once. */
@@ -184,6 +188,16 @@
184
188
  /* url/email cell types (#654) -- same measured values as RecordsTable's own .crisp-recordstable-link, which this mirrors: no underline at rest, underline on hover, own-colour text rather than a browser-blue link. */
185
189
  & .crisp-datatable-link { color: var(--crisp-fg-primary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
186
190
  & .crisp-datatable-link:hover { text-decoration: underline; }
191
+ /* rating cell type/editor (#760) -- measured live: 16px stars on an 18px pitch (a 2px gap), an empty star at rgba(0,0,0,0.1), a committed/filled star at brand600 (--crisp-bg-brand-solid, an exact match to the measured #266df0), and a distinct hover-preview colour -- rgb(33,91,196) -- that's close to but NOT brand700/bgBrandSolidPressed
192
+ (#1f5fd6); kept as its own literal rather than forced onto that token,
193
+ since the two were measured stable and different. The read-only svg
194
+ and the editable button's own inner svg both carry the crisp-datatable-rating-star class on the svg itself (not the button), so one set of fill rules covers both -- the button only adds its own reset + cursor via a separate -btn class. */
195
+ & .crisp-datatable-rating { display: inline-flex; align-items: center; gap: 2px; }
196
+ & .crisp-datatable-rating-star { display: block; }
197
+ & .crisp-datatable-rating-star path { fill: rgba(0, 0, 0, 0.1); }
198
+ & .crisp-datatable-rating-star[data-filled] path { fill: var(--crisp-bg-brand-solid); }
199
+ & .crisp-datatable-rating-star[data-hovering] path { fill: #215bc4; }
200
+ & .crisp-datatable-rating-star-btn { display: inline-flex; padding: 0; margin: 0; border: none; background: none; font-family: inherit; cursor: pointer; }
187
201
  /* row drag-to-reorder -- a Settings > Objects > Attributes screen measures a leading 20px grip column, a 16px grip icon, and the row's own
188
202
  hairline doubling as the drop indicator (it tints toward the brand
189
203
  colour as the active drop target). The affordance + geometry are