@crisp-ui-kit/crisp 0.54.2 → 0.54.4

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 (116) hide show
  1. package/dist/board.css +13 -1
  2. package/dist/board.layered.css +13 -1
  3. package/dist/chip.css +7 -1
  4. package/dist/chip.d.ts +2 -1
  5. package/dist/chip.layered.css +7 -1
  6. package/dist/cjs/components/chip/chip.js +3 -2
  7. package/dist/cjs/components/chip/chip.recipe.js +37 -1
  8. package/dist/cjs/components/datatable/datatable.js +489 -111
  9. package/dist/cjs/components/emptystate/emptystate.js +3 -2
  10. package/dist/cjs/components/emptystate/emptystate.recipe.js +26 -1
  11. package/dist/cjs/components/personchip/index.js +17 -0
  12. package/dist/cjs/components/personchip/personchip.js +50 -0
  13. package/dist/cjs/components/table/table.js +2 -2
  14. package/dist/cjs/components/tabletoolbar/tabletoolbar.js +41 -4
  15. package/dist/cjs/components/tabs/tabs.js +2 -2
  16. package/dist/cjs/components/tabs/tabs.recipe.js +30 -3
  17. package/dist/cjs/components/text/index.js +7 -0
  18. package/dist/cjs/components/text/text.js +55 -0
  19. package/dist/cjs/components/text/text.recipe.js +34 -0
  20. package/dist/cjs/index.js +4 -0
  21. package/dist/cjs/product/board/board.js +60 -2
  22. package/dist/cjs/product/board/board.recipe.js +10 -0
  23. package/dist/cjs/product/comments/comments.js +426 -0
  24. package/dist/cjs/product/comments/comments.recipe.js +126 -0
  25. package/dist/cjs/product/comments/index.js +8 -0
  26. package/dist/cjs/product/headerbar/headerbar.recipe.js +9 -1
  27. package/dist/cjs/product/listpage/listpage.recipe.js +10 -1
  28. package/dist/cjs/product/objectsettings/index.js +16 -0
  29. package/dist/cjs/product/objectsettings/objectsettings.js +365 -0
  30. package/dist/cjs/product/objectsettings/objectsettings.recipe.js +65 -0
  31. package/dist/cjs/product/recordpage/recordpage.recipe.js +10 -1
  32. package/dist/cjs/product/recordstable/recordstable.js +89 -6
  33. package/dist/cjs/product/richtext/richtext.recipe.js +26 -1
  34. package/dist/cjs/product/taskstable/taskstable.recipe.js +10 -1
  35. package/dist/comments.css +80 -0
  36. package/dist/comments.d.ts +7 -0
  37. package/dist/comments.layered.css +82 -0
  38. package/dist/emptystate.css +15 -1
  39. package/dist/emptystate.d.ts +2 -2
  40. package/dist/emptystate.layered.css +15 -1
  41. package/dist/esm/components/chip/chip.js +3 -2
  42. package/dist/esm/components/chip/chip.recipe.js +37 -1
  43. package/dist/esm/components/datatable/datatable.js +488 -111
  44. package/dist/esm/components/emptystate/emptystate.js +4 -3
  45. package/dist/esm/components/emptystate/emptystate.recipe.js +26 -1
  46. package/dist/esm/components/emptystate/index.js +1 -1
  47. package/dist/esm/components/personchip/index.js +1 -0
  48. package/dist/esm/components/personchip/personchip.js +47 -0
  49. package/dist/esm/components/table/table.js +2 -2
  50. package/dist/esm/components/tabletoolbar/tabletoolbar.js +43 -6
  51. package/dist/esm/components/tabs/tabs.js +2 -2
  52. package/dist/esm/components/tabs/tabs.recipe.js +30 -3
  53. package/dist/esm/components/text/index.js +2 -0
  54. package/dist/esm/components/text/text.js +19 -0
  55. package/dist/esm/components/text/text.recipe.js +31 -0
  56. package/dist/esm/index.js +4 -0
  57. package/dist/esm/product/board/board.js +61 -3
  58. package/dist/esm/product/board/board.recipe.js +10 -0
  59. package/dist/esm/product/comments/comments.js +388 -0
  60. package/dist/esm/product/comments/comments.recipe.js +123 -0
  61. package/dist/esm/product/comments/index.js +2 -0
  62. package/dist/esm/product/headerbar/headerbar.recipe.js +9 -1
  63. package/dist/esm/product/listpage/listpage.recipe.js +10 -1
  64. package/dist/esm/product/objectsettings/index.js +2 -0
  65. package/dist/esm/product/objectsettings/objectsettings.js +322 -0
  66. package/dist/esm/product/objectsettings/objectsettings.recipe.js +62 -0
  67. package/dist/esm/product/recordpage/recordpage.recipe.js +10 -1
  68. package/dist/esm/product/recordstable/recordstable.js +90 -8
  69. package/dist/esm/product/richtext/richtext.recipe.js +26 -1
  70. package/dist/esm/product/taskstable/taskstable.recipe.js +10 -1
  71. package/dist/headerbar.css +1 -1
  72. package/dist/headerbar.layered.css +1 -1
  73. package/dist/listpage.css +8 -1
  74. package/dist/listpage.layered.css +8 -1
  75. package/dist/objectsettings.css +49 -0
  76. package/dist/objectsettings.d.ts +7 -0
  77. package/dist/objectsettings.layered.css +51 -0
  78. package/dist/recordpage.css +13 -2
  79. package/dist/recordpage.layered.css +13 -2
  80. package/dist/richtext.css +11 -1
  81. package/dist/richtext.layered.css +11 -1
  82. package/dist/styles.css +224 -10
  83. package/dist/styles.layered.css +224 -10
  84. package/dist/tabs.css +7 -1
  85. package/dist/tabs.d.ts +2 -2
  86. package/dist/tabs.layered.css +7 -1
  87. package/dist/taskstable.css +8 -1
  88. package/dist/taskstable.layered.css +8 -1
  89. package/dist/text.css +9 -0
  90. package/dist/text.d.ts +7 -0
  91. package/dist/text.layered.css +11 -0
  92. package/dist/types/components/chip/chip.d.ts +32 -0
  93. package/dist/types/components/chip/chip.recipe.d.ts +31 -0
  94. package/dist/types/components/datatable/datatable.d.ts +28 -4
  95. package/dist/types/components/emptystate/emptystate.d.ts +29 -4
  96. package/dist/types/components/emptystate/emptystate.recipe.d.ts +2 -0
  97. package/dist/types/components/emptystate/index.d.ts +1 -1
  98. package/dist/types/components/personchip/index.d.ts +1 -0
  99. package/dist/types/components/personchip/personchip.d.ts +37 -0
  100. package/dist/types/components/table/table.d.ts +36 -0
  101. package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +8 -2
  102. package/dist/types/components/tabs/tabs.d.ts +4 -2
  103. package/dist/types/components/tabs/tabs.recipe.d.ts +18 -3
  104. package/dist/types/components/text/index.d.ts +2 -0
  105. package/dist/types/components/text/text.d.ts +32 -0
  106. package/dist/types/components/text/text.recipe.d.ts +40 -0
  107. package/dist/types/index.d.ts +4 -0
  108. package/dist/types/product/board/board.d.ts +20 -1
  109. package/dist/types/product/comments/comments.d.ts +192 -0
  110. package/dist/types/product/comments/comments.recipe.d.ts +3 -0
  111. package/dist/types/product/comments/index.d.ts +2 -0
  112. package/dist/types/product/objectsettings/index.d.ts +2 -0
  113. package/dist/types/product/objectsettings/objectsettings.d.ts +261 -0
  114. package/dist/types/product/objectsettings/objectsettings.recipe.d.ts +3 -0
  115. package/dist/types/product/recordstable/recordstable.d.ts +24 -2
  116. package/package.json +21 -1
@@ -3,7 +3,9 @@ declare const spec: {
3
3
  readonly base: {
4
4
  readonly display: "inline-flex";
5
5
  readonly alignItems: "center";
6
+ readonly gap: "3px";
6
7
  readonly height: `var(--${string})`;
8
+ readonly minWidth: 0;
7
9
  readonly paddingInline: `var(--${string})`;
8
10
  readonly borderRadius: `var(--${string})`;
9
11
  readonly fontSize: `var(--${string})`;
@@ -12,6 +14,22 @@ declare const spec: {
12
14
  readonly whiteSpace: "nowrap";
13
15
  };
14
16
  readonly variants: {
17
+ readonly truncate: {
18
+ readonly true: {
19
+ readonly decls: {};
20
+ readonly parts: [{
21
+ readonly selector: "& .crisp-chip-label";
22
+ readonly decls: {
23
+ readonly minWidth: 0;
24
+ readonly overflow: "hidden";
25
+ readonly textOverflow: "ellipsis";
26
+ readonly whiteSpace: "nowrap";
27
+ readonly display: "block";
28
+ };
29
+ }];
30
+ };
31
+ readonly false: {};
32
+ };
15
33
  readonly tone: {
16
34
  readonly neutral: {
17
35
  readonly background: string;
@@ -57,9 +75,14 @@ declare const spec: {
57
75
  };
58
76
  readonly defaultVariants: {
59
77
  readonly tone: "neutral";
78
+ readonly truncate: false;
60
79
  };
61
80
  };
62
81
  declare const config: import("../..").RecipeConfig<{
82
+ readonly truncate: {
83
+ readonly true: string;
84
+ readonly false: string;
85
+ };
63
86
  readonly tone: {
64
87
  readonly neutral: string;
65
88
  readonly brand: string;
@@ -72,6 +95,10 @@ declare const config: import("../..").RecipeConfig<{
72
95
  };
73
96
  }>;
74
97
  export declare const chipRecipe: import("../..").RecipeFn<{
98
+ readonly truncate: {
99
+ readonly true: string;
100
+ readonly false: string;
101
+ };
75
102
  readonly tone: {
76
103
  readonly neutral: string;
77
104
  readonly brand: string;
@@ -84,6 +111,10 @@ export declare const chipRecipe: import("../..").RecipeFn<{
84
111
  };
85
112
  }> & {
86
113
  config: import("../..").RecipeConfig<{
114
+ readonly truncate: {
115
+ readonly true: string;
116
+ readonly false: string;
117
+ };
87
118
  readonly tone: {
88
119
  readonly neutral: string;
89
120
  readonly brand: string;
@@ -3,6 +3,10 @@ type IconType = React.ComponentType<{
3
3
  size?: number;
4
4
  strokeWidth?: number;
5
5
  }>;
6
+ export declare function isLabelTruncated(el: {
7
+ scrollWidth: number;
8
+ clientWidth: number;
9
+ }): boolean;
6
10
  export type EntityValue = {
7
11
  name: string;
8
12
  avatar?: string;
@@ -21,9 +25,10 @@ export type DataEditableOption = {
21
25
  export type DataCellType = "text" | "entity" | "tags" | "status" | "date" | "datetime" | "number" | "currency";
22
26
  export type DataTableColumn<T> = {
23
27
  key: string;
24
- /** Truncates with an ellipsis when it's wider than the
25
- * column. The full text stays in the DOM, so assistive tech and copy/paste
26
- * get all of it; there is deliberately no `title` tooltip — see the recipe. */
28
+ /** Truncates with an ellipsis when it's wider than the column (#534: a
29
+ * `Tooltip` with the full text appears on hover/focus once it actually
30
+ * overflows — see `ThLabel` below). The full text stays in the DOM
31
+ * regardless, so assistive tech and copy/paste get all of it either way. */
27
32
  header: React.ReactNode;
28
33
  /** Built-in rich renderer: entity (avatar+name), tags (colour pills), status
29
34
  * (dot), date, number, currency. Overridden by `render`. */
@@ -261,11 +266,30 @@ export type DataTableProps<T extends {
261
266
  countLabel?: (shown: number, total: number) => React.ReactNode;
262
267
  /** Extra toolbar content (e.g. buttons) on the right of the toolbar. */
263
268
  toolbar?: React.ReactNode;
269
+ /**
270
+ * Bounds the grid's body to a fixed viewport height and makes it scroll
271
+ * internally (the way Attio's own grid does), which is also what turns on
272
+ * ROW virtualization (#577) -- only rows inside that viewport (plus a
273
+ * small overscan) render; rows outside it collapse into two spacer `<tr>`s
274
+ * so the scrollbar still reflects the true row count. A number is pixels;
275
+ * a string is any CSS length ("100%", "60vh") -- the first paint
276
+ * (including SSR) windows to an assumed viewport before the real size is
277
+ * measured on mount, so a plain number gets a pixel-accurate first window
278
+ * and a string gets an approximate one that corrects itself right after
279
+ * hydration.
280
+ *
281
+ * Omitted (the default): the grid grows to fit every row, exactly as
282
+ * before -- there is no internal scroll position for row windowing to mean
283
+ * anything, so this is the opt-in half of virtualization. COLUMN
284
+ * virtualization (below) is the other half and does NOT need this prop --
285
+ * the grid already has a determinate horizontal scroll container.
286
+ */
287
+ height?: number | string;
264
288
  className?: string;
265
289
  };
266
290
  export declare function DataTable<T extends {
267
291
  id: string;
268
- }>({ columns: columnsProp, data, selectable, selectedIds, onSelectionChange, selectAllLabel: selectAllLabelProp, selectRowLabel, selectionAnnouncement, columnMenu, onColumnsChange, groupBy, onRowsReorder, error, sort: sortProp, defaultSort, onSortChange, filterable, searchPlaceholder: searchPlaceholderProp, searchLabel: searchLabelProp, onEdit, stickyFirst, stickyLast, scrollProps, locale: localeProp, avatarTone, surface, interactive, onRowClick, onAddRow, addRowLabel: addRowLabelProp, empty: emptyProp, showCount, countLabel, toolbar, className, reorderRowLabel: reorderRowLabelProp, sortAscendingLabel: sortAscendingLabelProp, sortDescendingLabel: sortDescendingLabelProp, moveColumnLeftLabel: moveColumnLeftLabelProp, moveColumnRightLabel: moveColumnRightLabelProp, editColumnLabel: editColumnLabelProp, hideColumnLabel: hideColumnLabelProp, renameColumnLabel: renameColumnLabelProp, viewSettingsLabel: viewSettingsLabelProp, columnsGroupLabel: columnsGroupLabelProp, ...rest }: DataTableProps<T>): React.JSX.Element;
292
+ }>({ columns: columnsProp, data, selectable, selectedIds, onSelectionChange, selectAllLabel: selectAllLabelProp, selectRowLabel, selectionAnnouncement, columnMenu, onColumnsChange, groupBy, onRowsReorder, error, sort: sortProp, defaultSort, onSortChange, filterable, searchPlaceholder: searchPlaceholderProp, searchLabel: searchLabelProp, onEdit, stickyFirst, stickyLast, scrollProps, locale: localeProp, avatarTone, surface, interactive, onRowClick, onAddRow, addRowLabel: addRowLabelProp, empty: emptyProp, showCount, countLabel, toolbar, height, className, reorderRowLabel: reorderRowLabelProp, sortAscendingLabel: sortAscendingLabelProp, sortDescendingLabel: sortDescendingLabelProp, moveColumnLeftLabel: moveColumnLeftLabelProp, moveColumnRightLabel: moveColumnRightLabelProp, editColumnLabel: editColumnLabelProp, hideColumnLabel: hideColumnLabelProp, renameColumnLabel: renameColumnLabelProp, viewSettingsLabel: viewSettingsLabelProp, columnsGroupLabel: columnsGroupLabelProp, ...rest }: DataTableProps<T>): React.JSX.Element;
269
293
  export declare namespace DataTable {
270
294
  var displayName: string;
271
295
  }
@@ -1,19 +1,44 @@
1
1
  import type * as React from "react";
2
+ /**
3
+ * #603: Attio's zero-*records* state (Users/Workspaces with nothing
4
+ * imported yet) pairs a "Learn more" label with a clickable card — an
5
+ * icon tile plus a title, e.g. "Learn more" / "Understanding records".
6
+ * Rendered as an `<a>` when `href` is given (matches Attio's own
7
+ * "Import CSV"/card being real links), a `<button>` otherwise.
8
+ */
9
+ export type EmptyStateLearnMore = {
10
+ icon: React.ReactNode;
11
+ /** Defaults to "Learn more". */
12
+ label?: React.ReactNode;
13
+ title: React.ReactNode;
14
+ href?: string;
15
+ onClick?: () => void;
16
+ };
2
17
  export type EmptyStateProps = Omit<React.ComponentPropsWithoutRef<"div">, "title"> & {
3
18
  icon?: React.ReactNode;
4
19
  title: React.ReactNode;
5
20
  description?: React.ReactNode;
6
- /** A primary action (e.g. a Button) shown below. */
21
+ /**
22
+ * A primary action (e.g. a Button) shown below. Pass more than one
23
+ * (a Fragment of Buttons) for a multi-CTA state (#603, measured:
24
+ * Attio's zero-records "Import CSV" + "Connect data source" pair,
25
+ * 8px gap) -- the container lays them out in a row automatically.
26
+ */
7
27
  action?: React.ReactNode;
28
+ /** A "Learn more" card below the action(s) (#603). */
29
+ learnMore?: EmptyStateLearnMore;
8
30
  /**
9
31
  * `illustrated` shows a large icon on a dotted-grid backdrop; `page` is
10
- * the full-view empty state (ringed circle icon + 20px heading).
32
+ * the full-view empty state (ringed circle icon + 20px heading);
33
+ * `records` is the larger (138px) dotted-grid tile Attio's zero-records
34
+ * table state uses (#603) -- same backdrop idiom as `illustrated`, a
35
+ * different measured size because it's a different surface.
11
36
  */
12
- variant?: "default" | "illustrated" | "page";
37
+ variant?: "default" | "illustrated" | "page" | "records";
13
38
  className?: string;
14
39
  };
15
40
  /** A centred empty-state panel — icon, title, description, optional action. */
16
- export declare function EmptyState({ icon, title, description, action, variant, className, ...rest }: EmptyStateProps): React.JSX.Element;
41
+ export declare function EmptyState({ icon, title, description, action, learnMore, variant, className, ...rest }: EmptyStateProps): React.JSX.Element;
17
42
  export declare namespace EmptyState {
18
43
  var displayName: string;
19
44
  }
@@ -3,6 +3,7 @@ declare const config: import("../..").RecipeConfig<{
3
3
  default: string;
4
4
  illustrated: string;
5
5
  page: string;
6
+ records: string;
6
7
  };
7
8
  }>;
8
9
  export declare const emptystateRecipe: import("../..").RecipeFn<{
@@ -10,6 +11,7 @@ export declare const emptystateRecipe: import("../..").RecipeFn<{
10
11
  default: string;
11
12
  illustrated: string;
12
13
  page: string;
14
+ records: string;
13
15
  };
14
16
  }>;
15
17
  export default config;
@@ -1,2 +1,2 @@
1
- export { EmptyState, type EmptyStateProps } from "./emptystate";
1
+ export { EmptyState, type EmptyStateLearnMore, type EmptyStateProps, } from "./emptystate";
2
2
  export { emptystateRecipe } from "./emptystate.recipe";
@@ -0,0 +1 @@
1
+ export * from "./personchip";
@@ -0,0 +1,37 @@
1
+ import type * as React from "react";
2
+ export type PersonChipProps = Omit<React.ComponentPropsWithoutRef<"span">, "children"> & {
3
+ /** The person's display name — also the avatar's initials fallback. */
4
+ name: string;
5
+ /** A photo URL. Omitted (no populated photo field was reachable to
6
+ * measure this round), the avatar falls back to a per-name hashed-colour
7
+ * initials tile. */
8
+ avatar?: string;
9
+ /** De-emphasises the name (e.g. a departed person, a system actor) —
10
+ * `fgNeutralMuted`, the same token `Text`'s own `tone="muted"` uses.
11
+ * Applied to the name only; the avatar keeps its full-strength tone so
12
+ * the chip still reads as a distinct person, not a disabled control. */
13
+ muted?: boolean;
14
+ className?: string;
15
+ };
16
+ /**
17
+ * A person, as a chip: a small avatar (a photo, or hashed-colour initials)
18
+ * plus their name, truncating with an ellipsis when it doesn't fit — Attio's
19
+ * own actor chip (measured live on `techpartners`, Tasks page, "Assigned to"
20
+ * column): a 16px circular avatar in a neutral `Chip`, `gap: 3px` between
21
+ * avatar and name (now `Chip`'s own base — every multi-child `Chip` gets
22
+ * it). Every other value — the pill's height, padding, radius, ring and text
23
+ * — is already `Chip`'s, unchanged; `PersonChip` adds no recipe of its own.
24
+ *
25
+ * Ellipsis only, no `Tooltip` on hover (#623 — no Attio reference for one;
26
+ * a truncated cell there is revealed by its own click-to-expand, #579, a
27
+ * different, DataTable-specific interaction).
28
+ *
29
+ * Composes `Chip`'s `truncate` CSS directly rather than its string-only
30
+ * auto-wrap (children here is an avatar plus a name, not a single string),
31
+ * so the name gets its own `.crisp-chip-label` span while the avatar stays
32
+ * fixed-size.
33
+ */
34
+ export declare function PersonChip({ name, avatar, muted, className, ...props }: PersonChipProps): React.JSX.Element;
35
+ export declare namespace PersonChip {
36
+ var displayName: string;
37
+ }
@@ -8,6 +8,24 @@ export type TableProps = React.ComponentPropsWithoutRef<"table"> & VariantProps<
8
8
  scrollProps?: React.ComponentPropsWithoutRef<"div"> & {
9
9
  ref?: React.Ref<HTMLDivElement>;
10
10
  };
11
+ /**
12
+ * Style applied to the `<table>` element itself, as opposed to `style`
13
+ * (below), which sizes the OUTER bordered wrapper -- crisp/#581.
14
+ * `DataTable` uses this for its `min-width: <sum of column widths>`,
15
+ * which forces `<table>` to its true content width and lets
16
+ * `.crisp-table-scroll`'s existing `overflow-x: auto` scroll it
17
+ * internally. Putting that same min-width on the outer wrapper
18
+ * (`style`) instead, as this component used to require, forces the
19
+ * WRAPPER itself that wide -- a plain block box's width is normally set
20
+ * by its own container regardless of a child's min-width, so the only
21
+ * element that should ever be forced wider than its container is the
22
+ * scrollable one, never an ancestor of it. Getting this backwards is
23
+ * exactly what made a `DataTable` widen its own page instead of
24
+ * scrolling in place (internal/grc#117), forcing GRC to hand-build its
25
+ * own `overflow: hidden` clipping wrapper around it -- which the
26
+ * crisp-only rule forbids and which this makes unnecessary.
27
+ */
28
+ tableStyle?: React.CSSProperties;
11
29
  };
12
30
  /**
13
31
  * A composable data table. Wraps `<table>` in a horizontally scrollable
@@ -32,6 +50,24 @@ export declare const Table: React.ForwardRefExoticComponent<Omit<React.DetailedH
32
50
  scrollProps?: React.ComponentPropsWithoutRef<"div"> & {
33
51
  ref?: React.Ref<HTMLDivElement>;
34
52
  };
53
+ /**
54
+ * Style applied to the `<table>` element itself, as opposed to `style`
55
+ * (below), which sizes the OUTER bordered wrapper -- crisp/#581.
56
+ * `DataTable` uses this for its `min-width: <sum of column widths>`,
57
+ * which forces `<table>` to its true content width and lets
58
+ * `.crisp-table-scroll`'s existing `overflow-x: auto` scroll it
59
+ * internally. Putting that same min-width on the outer wrapper
60
+ * (`style`) instead, as this component used to require, forces the
61
+ * WRAPPER itself that wide -- a plain block box's width is normally set
62
+ * by its own container regardless of a child's min-width, so the only
63
+ * element that should ever be forced wider than its container is the
64
+ * scrollable one, never an ancestor of it. Getting this backwards is
65
+ * exactly what made a `DataTable` widen its own page instead of
66
+ * scrolling in place (internal/grc#117), forcing GRC to hand-build its
67
+ * own `overflow: hidden` clipping wrapper around it -- which the
68
+ * crisp-only rule forbids and which this makes unnecessary.
69
+ */
70
+ tableStyle?: React.CSSProperties;
35
71
  } & React.RefAttributes<HTMLTableElement>>;
36
72
  export declare const TableHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
37
73
  export declare const TableBody: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
@@ -8,7 +8,7 @@ export type ToolbarSort = {
8
8
  key: string;
9
9
  dir: SortDir;
10
10
  };
11
- export type ToolbarFilterOp = "contains" | "is" | "isnot" | "isanyof" | "empty" | "notempty";
11
+ export type ToolbarFilterOp = "contains" | "doesnotcontain" | "startswith" | "endswith" | "is" | "isnot" | "isanyof" | "empty" | "notempty";
12
12
  export type ToolbarFilter = {
13
13
  id: string;
14
14
  key: string;
@@ -92,6 +92,12 @@ export type TableToolbarProps = Omit<React.ComponentPropsWithoutRef<"div">, "chi
92
92
  filterFieldPlaceholder?: string;
93
93
  /** Placeholder in a filter row's value input (default "Value…"). */
94
94
  filterValuePlaceholder?: string;
95
+ /** aria-label on a filter chip's "⋮" kebab (default "Filter options"). */
96
+ filterOptionsLabel?: string;
97
+ /** Label on the filter chip kebab's "Delete filter" action (default
98
+ * "Delete filter") — Attio's own chip kebab (#594) has exactly this one
99
+ * item. */
100
+ deleteFilterLabel?: string;
95
101
  /** Label on the "ascending" sort-direction option (default "Ascending"). */
96
102
  ascendingLabel?: string;
97
103
  /** Label on the "descending" sort-direction option (default "Descending"). */
@@ -139,7 +145,7 @@ export declare function applySorts<T>(rows: T[], sorts: ToolbarSort[], get?: (ro
139
145
  * this (Sort: Due date/Assignee/Creation date; Filter: Assignee/Record/
140
146
  * Created by), which one shared list can't reproduce.
141
147
  */
142
- export declare function TableToolbar({ columns, sortColumns: sortColumnsProp, filterColumns: filterColumnsProp, sorts: sortsProp, defaultSorts, onSortsChange, filters: filtersProp, defaultFilters, onFiltersChange, count, children, helpHref, className, sortLabel: sortLabelProp, filterLabel: filterLabelProp, reorderSortLabel: reorderSortLabelProp, noSortsLabel: noSortsLabelProp, addSortLabel: addSortLabelProp, learnSortingLabel: learnSortingLabelProp, selectConditionLabel: selectConditionLabelProp, sortFieldLabel: sortFieldLabelProp, sortDirectionLabel: sortDirectionLabelProp, removeSortLabel: removeSortLabelProp, filterFieldLabel: filterFieldLabelProp, filterFieldPlaceholder: filterFieldPlaceholderProp, filterValuePlaceholder: filterValuePlaceholderProp, ascendingLabel: ascendingLabelProp, descendingLabel: descendingLabelProp, sortTriggerLabel, filterTriggerLabel, inline, ...rest }: TableToolbarProps): React.JSX.Element;
148
+ export declare function TableToolbar({ columns, sortColumns: sortColumnsProp, filterColumns: filterColumnsProp, sorts: sortsProp, defaultSorts, onSortsChange, filters: filtersProp, defaultFilters, onFiltersChange, count, children, helpHref, className, sortLabel: sortLabelProp, filterLabel: filterLabelProp, reorderSortLabel: reorderSortLabelProp, noSortsLabel: noSortsLabelProp, addSortLabel: addSortLabelProp, learnSortingLabel: learnSortingLabelProp, selectConditionLabel: selectConditionLabelProp, sortFieldLabel: sortFieldLabelProp, sortDirectionLabel: sortDirectionLabelProp, removeSortLabel: removeSortLabelProp, filterFieldLabel: filterFieldLabelProp, filterFieldPlaceholder: filterFieldPlaceholderProp, filterValuePlaceholder: filterValuePlaceholderProp, filterOptionsLabel: filterOptionsLabelProp, deleteFilterLabel: deleteFilterLabelProp, ascendingLabel: ascendingLabelProp, descendingLabel: descendingLabelProp, sortTriggerLabel, filterTriggerLabel, inline, ...rest }: TableToolbarProps): React.JSX.Element;
143
149
  export type ToolbarToolProps = React.ComponentPropsWithoutRef<"button"> & {
144
150
  /** Drawn the way Sort/Filter are once a condition is set (#399). */
145
151
  active?: boolean;
@@ -1,4 +1,6 @@
1
1
  import * as React from "react";
2
+ import type { VariantProps } from "../../core";
3
+ import { tabsRecipe } from "./tabs.recipe";
2
4
  export type TabItem = {
3
5
  value: string;
4
6
  label: React.ReactNode;
@@ -8,7 +10,7 @@ export type TabItem = {
8
10
  badge?: React.ReactNode;
9
11
  disabled?: boolean;
10
12
  };
11
- export type TabsProps = Omit<React.ComponentPropsWithoutRef<"div">, "value" | "defaultValue" | "children"> & {
13
+ export type TabsProps = Omit<React.ComponentPropsWithoutRef<"div">, "value" | "defaultValue" | "children"> & VariantProps<typeof tabsRecipe> & {
12
14
  tabs: TabItem[];
13
15
  /** Controlled active value. Omit to let Tabs manage it (see defaultValue). */
14
16
  value?: string;
@@ -27,7 +29,7 @@ export type TabsProps = Omit<React.ComponentPropsWithoutRef<"div">, "value" | "d
27
29
  * Home/End jump); activation follows focus. Controlled via
28
30
  * `value`/`onValueChange`, or uncontrolled from `defaultValue`.
29
31
  */
30
- export declare function Tabs({ tabs, value, defaultValue, onValueChange, leading, children, className, "aria-label": ariaLabel, ...rest }: TabsProps): React.JSX.Element;
32
+ export declare function Tabs({ tabs, value, defaultValue, onValueChange, leading, children, className, fill, "aria-label": ariaLabel, ...rest }: TabsProps): React.JSX.Element;
31
33
  export declare namespace Tabs {
32
34
  var displayName: string;
33
35
  }
@@ -1,5 +1,20 @@
1
- declare const config: import("../..").RecipeConfig<{}>;
2
- export declare const tabsRecipe: import("../..").RecipeFn<{}> & {
3
- config: import("../..").RecipeConfig<{}>;
1
+ declare const config: import("../..").RecipeConfig<{
2
+ fill: {
3
+ true: string;
4
+ false: string;
5
+ };
6
+ }>;
7
+ export declare const tabsRecipe: import("../..").RecipeFn<{
8
+ fill: {
9
+ true: string;
10
+ false: string;
11
+ };
12
+ }> & {
13
+ config: import("../..").RecipeConfig<{
14
+ fill: {
15
+ true: string;
16
+ false: string;
17
+ };
18
+ }>;
4
19
  };
5
20
  export default config;
@@ -0,0 +1,2 @@
1
+ export { Text, type TextProps } from "./text";
2
+ export { textRecipe } from "./text.recipe";
@@ -0,0 +1,32 @@
1
+ import * as React from "react";
2
+ import type { VariantProps } from "../../core";
3
+ import { textRecipe } from "./text.recipe";
4
+ export type TextProps = React.ComponentPropsWithoutRef<"span"> & VariantProps<typeof textRecipe> & {
5
+ asChild?: boolean;
6
+ };
7
+ /**
8
+ * Plain coloured text — `tone="default"` (the app's primary text colour) or
9
+ * `"muted"` — for the runs of text that aren't a Badge, a Chip, a link, or
10
+ * any of crisp's other typed things: a cell's own yes/no, an empty-state
11
+ * caption, a secondary line under a heading. One component so every such
12
+ * spot reaches for crisp's own tokens instead of each hand-writing its own
13
+ * colour utility for the same two values.
14
+ *
15
+ * Renders a `<span>` (inherits its size/weight/line-height from context —
16
+ * see `text.recipe.ts`'s doc for why `Text` sets none of those itself).
17
+ */
18
+ export declare const Text: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & VariantProps<import("../..").RecipeFn<{
19
+ readonly tone: {
20
+ readonly default: string;
21
+ readonly muted: string;
22
+ };
23
+ }> & {
24
+ config: import("../..").RecipeConfig<{
25
+ readonly tone: {
26
+ readonly default: string;
27
+ readonly muted: string;
28
+ };
29
+ }>;
30
+ }> & {
31
+ asChild?: boolean;
32
+ } & React.RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,40 @@
1
+ declare const spec: {
2
+ readonly name: "text";
3
+ readonly base: {
4
+ readonly display: "inline";
5
+ };
6
+ readonly variants: {
7
+ tone: {
8
+ default: {
9
+ color: `var(--${string})`;
10
+ };
11
+ muted: {
12
+ color: `var(--${string})`;
13
+ };
14
+ };
15
+ };
16
+ readonly defaultVariants: {
17
+ readonly tone: "default";
18
+ };
19
+ };
20
+ declare const config: import("../..").RecipeConfig<{
21
+ readonly tone: {
22
+ readonly default: string;
23
+ readonly muted: string;
24
+ };
25
+ }>;
26
+ export declare const textRecipe: import("../..").RecipeFn<{
27
+ readonly tone: {
28
+ readonly default: string;
29
+ readonly muted: string;
30
+ };
31
+ }> & {
32
+ config: import("../..").RecipeConfig<{
33
+ readonly tone: {
34
+ readonly default: string;
35
+ readonly muted: string;
36
+ };
37
+ }>;
38
+ };
39
+ export { spec };
40
+ export default config;
@@ -33,6 +33,7 @@ export * from "./components/mentionchip";
33
33
  export * from "./components/menu";
34
34
  export * from "./components/middletruncate";
35
35
  export * from "./components/multiselect";
36
+ export * from "./components/personchip";
36
37
  export * from "./components/popover";
37
38
  export * from "./components/progress";
38
39
  export * from "./components/quantitypicker";
@@ -50,6 +51,7 @@ export * from "./components/switch";
50
51
  export * from "./components/table";
51
52
  export * from "./components/tabletoolbar";
52
53
  export * from "./components/tabs";
54
+ export * from "./components/text";
53
55
  export * from "./components/textarea";
54
56
  export * from "./components/textlink";
55
57
  export * from "./components/timepicker";
@@ -63,6 +65,7 @@ export * from "./product/appshell";
63
65
  export * from "./product/authshell";
64
66
  export * from "./product/board";
65
67
  export * from "./product/command";
68
+ export * from "./product/comments";
66
69
  export * from "./product/entitycard";
67
70
  export * from "./product/flowcanvas";
68
71
  export * from "./product/formdialog";
@@ -71,6 +74,7 @@ export * from "./product/importdialog";
71
74
  export * from "./product/inbox";
72
75
  export * from "./product/listpage";
73
76
  export * from "./product/navitem";
77
+ export * from "./product/objectsettings";
74
78
  export * from "./product/onboarding";
75
79
  export * from "./product/recordpage";
76
80
  export * from "./product/recordpanel";
@@ -9,6 +9,16 @@ export type BoardCard = {
9
9
  id: string;
10
10
  columnId: string;
11
11
  };
12
+ /**
13
+ * #604: the eight aggregations Attio's own per-column board calc footer
14
+ * offers (measured live, Deals pipeline) -- a different set from the
15
+ * table's own calc footer (`count`/`filled`/`sum`/`avg`/`min`/`max`,
16
+ * `product/recordstable`): Board additionally splits "not empty" into a
17
+ * count AND a percent, and does the same for "empty". Not reconciled with
18
+ * the table's vocabulary -- these are two different Attio surfaces with
19
+ * two different measured menus, not one concept with two names.
20
+ */
21
+ export type BoardAgg = "countEmpty" | "countFilled" | "percentEmpty" | "percentFilled" | "sum" | "average" | "max" | "min";
12
22
  export type BoardProps<T extends BoardCard> = Omit<React.ComponentPropsWithoutRef<"div">, "children"> & {
13
23
  columns: BoardColumn[];
14
24
  cards: T[];
@@ -26,6 +36,15 @@ export type BoardProps<T extends BoardCard> = Omit<React.ComponentPropsWithoutRe
26
36
  getCardLabel?: (card: T) => string;
27
37
  /** What a screen reader hears after a keyboard move. */
28
38
  announceMove?: (columnTitle: string, cardLabel?: string) => string;
39
+ /**
40
+ * A per-column calc footer (#604), mirroring the table's. Omit to skip
41
+ * it entirely -- Board has no footer by default. `getValue` reads the
42
+ * number to aggregate off a card (e.g. a deal's value); return
43
+ * null/undefined for a card with nothing set there ("empty").
44
+ */
45
+ calc?: {
46
+ getValue: (card: T) => number | null | undefined;
47
+ };
29
48
  className?: string;
30
49
  };
31
50
  /**
@@ -34,7 +53,7 @@ export type BoardProps<T extends BoardCard> = Omit<React.ComponentPropsWithoutRe
34
53
  * (the parent owns the cards, so the move is a controlled state update).
35
54
  * Measured from a deals pipeline.
36
55
  */
37
- export declare function Board<T extends BoardCard>({ columns, cards, onCardsChange, renderCard, onNewCard, newCardLabel: newCardLabelProp, getCardLabel, announceMove: announceMoveProp, className, ...rest }: BoardProps<T>): React.JSX.Element;
56
+ export declare function Board<T extends BoardCard>({ columns, cards, onCardsChange, renderCard, onNewCard, newCardLabel: newCardLabelProp, getCardLabel, announceMove: announceMoveProp, calc, className, ...rest }: BoardProps<T>): React.JSX.Element;
38
57
  export declare namespace Board {
39
58
  var displayName: string;
40
59
  }