@crisp-ui-kit/crisp 0.54.8 → 0.54.10

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 (59) hide show
  1. package/dist/board.css +32 -8
  2. package/dist/board.layered.css +32 -8
  3. package/dist/cjs/components/contextmenu/contextmenu.js +2 -2
  4. package/dist/cjs/components/contextmenu/contextmenu.recipe.js +24 -0
  5. package/dist/cjs/components/datatable/datatable.js +593 -51
  6. package/dist/cjs/components/datatable/datatable.recipe.js +67 -3
  7. package/dist/cjs/components/dialog/dialog.js +65 -1
  8. package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +37 -2
  9. package/dist/cjs/components/tabletoolbar/tabletoolbar.js +218 -39
  10. package/dist/cjs/components/tabletoolbar/tabletoolbar.recipe.js +48 -1
  11. package/dist/cjs/components/text/text.recipe.js +17 -7
  12. package/dist/cjs/product/board/board.js +62 -28
  13. package/dist/cjs/product/board/board.recipe.js +42 -2
  14. package/dist/cjs/product/comments/comments.js +11 -2
  15. package/dist/cjs/product/comments/comments.recipe.js +14 -4
  16. package/dist/cjs/product/recordstable/recordstable.js +1 -17
  17. package/dist/cjs/product/savedviews/savedviews.js +55 -24
  18. package/dist/cjs/product/savedviews/savedviews.recipe.js +27 -0
  19. package/dist/comments.css +14 -4
  20. package/dist/comments.layered.css +14 -4
  21. package/dist/contextmenu.css +24 -0
  22. package/dist/contextmenu.layered.css +24 -0
  23. package/dist/datatable.css +106 -77
  24. package/dist/datatable.layered.css +106 -77
  25. package/dist/esm/components/contextmenu/contextmenu.js +2 -2
  26. package/dist/esm/components/contextmenu/contextmenu.recipe.js +24 -0
  27. package/dist/esm/components/datatable/datatable.js +593 -52
  28. package/dist/esm/components/datatable/datatable.recipe.js +68 -4
  29. package/dist/esm/components/dialog/dialog.js +65 -1
  30. package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +37 -2
  31. package/dist/esm/components/tabletoolbar/tabletoolbar.js +219 -40
  32. package/dist/esm/components/tabletoolbar/tabletoolbar.recipe.js +50 -3
  33. package/dist/esm/components/text/text.recipe.js +17 -7
  34. package/dist/esm/product/board/board.js +63 -29
  35. package/dist/esm/product/board/board.recipe.js +42 -2
  36. package/dist/esm/product/comments/comments.js +12 -3
  37. package/dist/esm/product/comments/comments.recipe.js +14 -4
  38. package/dist/esm/product/recordstable/recordstable.js +2 -18
  39. package/dist/esm/product/savedviews/savedviews.js +57 -26
  40. package/dist/esm/product/savedviews/savedviews.recipe.js +27 -0
  41. package/dist/recordstable.css +33 -31
  42. package/dist/recordstable.layered.css +33 -31
  43. package/dist/savedviews.css +27 -0
  44. package/dist/savedviews.layered.css +27 -0
  45. package/dist/styles.css +282 -125
  46. package/dist/styles.layered.css +282 -125
  47. package/dist/tabletoolbar.css +45 -4
  48. package/dist/tabletoolbar.layered.css +45 -4
  49. package/dist/text.css +1 -1
  50. package/dist/text.layered.css +1 -1
  51. package/dist/types/components/contextmenu/contextmenu.d.ts +8 -1
  52. package/dist/types/components/datatable/datatable.d.ts +98 -2
  53. package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +72 -2
  54. package/dist/types/components/text/text.recipe.d.ts +1 -1
  55. package/dist/types/product/board/board.d.ts +48 -2
  56. package/dist/types/product/comments/comments.d.ts +6 -1
  57. package/dist/types/product/recordstable/recordstable.d.ts +0 -1
  58. package/dist/types/product/savedviews/savedviews.d.ts +45 -8
  59. package/package.json +1 -1
@@ -6,6 +6,27 @@ export type SavedView = {
6
6
  icon?: React.ReactNode;
7
7
  /** Renders a small shared-view indicator next to the name. */
8
8
  shared?: boolean;
9
+ /**
10
+ * Text matched against the switcher's own search box (#618) when `name`
11
+ * isn't a plain string — same fallback `Select`'s own `keywords` already
12
+ * gives a non-string `label`. Falls back to `id` when `name` is also
13
+ * non-string and this is omitted, the same way `Select`'s own
14
+ * `optionText` falls back to `value` — a view with a rich, non-string
15
+ * name and no `keywords` still matches SOME query (its own id) rather
16
+ * than becoming permanently unfindable by search.
17
+ */
18
+ keywords?: string;
19
+ /**
20
+ * "Created by …" — the first line of the kebab menu's own footer row
21
+ * (#618, measured live: "Created by Attio system" / "26th Aug 2026
22
+ * 12:20 PM", two stacked lines). Renders only the line(s) actually
23
+ * given — omit both for a view with no author/date metadata and the
24
+ * footer (and its divider) don't render at all.
25
+ */
26
+ createdBy?: React.ReactNode;
27
+ /** The footer's second line — a pre-formatted date/time, since crisp
28
+ * doesn't own locale formatting. See `createdBy`. */
29
+ createdAt?: React.ReactNode;
9
30
  };
10
31
  export type SavedViewsProps = Omit<React.ComponentPropsWithoutRef<"div">, "children" | "onSelect"> & {
11
32
  /** The trigger's label when no view is active (Attio's "All Companies"). */
@@ -32,6 +53,18 @@ export type SavedViewsProps = Omit<React.ComponentPropsWithoutRef<"div">, "child
32
53
  viewOptionsLabel?: string;
33
54
  /** aria-label for the panel itself (defaults to the resolved trigger label). */
34
55
  "aria-label"?: string;
56
+ /** Placeholder on the panel's own search box (default "Search views..." —
57
+ * Attio's own text, measured live: 3 literal dots, not an ellipsis
58
+ * glyph). */
59
+ searchPlaceholder?: string;
60
+ /** aria-label on the search box (default "Filter views" — Attio's own
61
+ * measured aria-label, distinct from its placeholder text). */
62
+ searchLabel?: string;
63
+ /** Shown in place of the view list when a search matches nothing (default
64
+ * "No results" — the same text and contract `Select`'s own `searchable`
65
+ * empty state already uses). The "Create new view" row still renders
66
+ * below it either way. */
67
+ emptyLabel?: string;
35
68
  className?: string;
36
69
  };
37
70
  /**
@@ -40,16 +73,20 @@ export type SavedViewsProps = Omit<React.ComponentPropsWithoutRef<"div">, "child
40
73
  * row (leading coloured icon, name, a hover-revealed kebab of
41
74
  * rename/duplicate/delete), plus a trailing "Create new view" row. The
42
75
  * active view is marked `aria-selected`/`aria-current="page"` and mirrored
43
- * onto the trigger's own icon/label.
76
+ * onto the trigger's own icon/label. The panel opens on a "Search views..."
77
+ * box (#618, P-007) — real DOM focus moves there (`requestAnimationFrame`,
78
+ * same race `Select`'s own `searchable` variant already guards against),
79
+ * not virtual focus on the trigger.
44
80
  *
45
- * Keyboard: while the trigger has focus and the panel is open, ↑/↓ move a
46
- * virtual highlight (`aria-activedescendant`, the same "focus stays on the
47
- * trigger" model `Select`/`MultiSelect` use without a search field), Enter
48
- * chooses the highlighted row, Escape closes — deferring to a still-open
49
- * kebab submenu first (`hasOpenFloatingLayer`), so Escape closes one layer
50
- * at a time.
81
+ * Keyboard: while the panel is open, focus lives on the search input — ↑/↓
82
+ * move a virtual highlight (`aria-activedescendant`) over the (possibly
83
+ * filtered) view list, Enter chooses the highlighted row, Escape closes,
84
+ * deferring to a still-open kebab submenu first (`hasOpenFloatingLayer`),
85
+ * so Escape closes one layer at a time — the same split `Select`'s own
86
+ * `searchable` variant already uses between its trigger and its own search
87
+ * input.
51
88
  */
52
- export declare function SavedViews({ label, icon, views, activeId, onSelect, onCreate, onRename, onDuplicate, onDelete, onToggleFavorite, createLabel: createLabelProp, renameLabel: renameLabelProp, duplicateLabel: duplicateLabelProp, deleteLabel: deleteLabelProp, favoriteLabel: favoriteLabelProp, viewOptionsLabel: viewOptionsLabelProp, className, "aria-label": ariaLabel, ...rest }: SavedViewsProps): React.JSX.Element;
89
+ export declare function SavedViews({ label, icon, views, activeId, onSelect, onCreate, onRename, onDuplicate, onDelete, onToggleFavorite, createLabel: createLabelProp, renameLabel: renameLabelProp, duplicateLabel: duplicateLabelProp, deleteLabel: deleteLabelProp, favoriteLabel: favoriteLabelProp, viewOptionsLabel: viewOptionsLabelProp, searchPlaceholder: searchPlaceholderProp, searchLabel: searchLabelProp, emptyLabel: emptyLabelProp, className, "aria-label": ariaLabel, ...rest }: SavedViewsProps): React.JSX.Element;
53
90
  export declare namespace SavedViews {
54
91
  var displayName: string;
55
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crisp-ui-kit/crisp",
3
- "version": "0.54.8",
3
+ "version": "0.54.10",
4
4
  "description": "A lean React design system, measured pixel-for-pixel from Attio.",
5
5
  "license": "MIT",
6
6
  "type": "module",