@crisp-ui-kit/crisp 0.55.6 → 0.57.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 (112) hide show
  1. package/dist/callout.css +6 -0
  2. package/dist/callout.d.ts +2 -2
  3. package/dist/callout.layered.css +6 -0
  4. package/dist/cjs/components/callout/callout.js +2 -2
  5. package/dist/cjs/components/callout/callout.recipe.js +15 -2
  6. package/dist/cjs/components/input/input.recipe.js +6 -0
  7. package/dist/cjs/components/menu/menu.js +2 -2
  8. package/dist/cjs/components/menu/menu.recipe.js +8 -0
  9. package/dist/cjs/components/multiselect/multiselect.js +23 -10
  10. package/dist/cjs/components/multiselect/multiselect.recipe.js +95 -65
  11. package/dist/cjs/components/select/listbox-keyboard.js +7 -1
  12. package/dist/cjs/components/select/select.js +24 -11
  13. package/dist/cjs/components/select/select.recipe.js +150 -78
  14. package/dist/cjs/components/statusdot/index.js +7 -0
  15. package/dist/cjs/components/statusdot/statusdot.js +15 -0
  16. package/dist/cjs/components/statusdot/statusdot.recipe.js +34 -0
  17. package/dist/cjs/components/tabletoolbar/tabletoolbar.js +3 -3
  18. package/dist/cjs/components/tabletoolbar/tabletoolbar.recipe.js +26 -1
  19. package/dist/cjs/components/tabs/tabs.js +63 -4
  20. package/dist/cjs/components/tabs/tabs.recipe.js +13 -0
  21. package/dist/cjs/components/text/text.recipe.js +10 -0
  22. package/dist/cjs/components/textlink/textlink.js +2 -2
  23. package/dist/cjs/components/textlink/textlink.recipe.js +18 -0
  24. package/dist/cjs/index.js +1 -0
  25. package/dist/cjs/product/recordpage/recordpage.js +17 -4
  26. package/dist/cjs/tokens/elevation.js +7 -0
  27. package/dist/cjs/tokens/palette.js +41 -0
  28. package/dist/cjs/tokens/scale.js +16 -1
  29. package/dist/cjs/tokens/semantic.js +18 -0
  30. package/dist/esm/components/callout/callout.js +2 -2
  31. package/dist/esm/components/callout/callout.recipe.js +15 -2
  32. package/dist/esm/components/input/input.recipe.js +6 -0
  33. package/dist/esm/components/menu/menu.js +2 -2
  34. package/dist/esm/components/menu/menu.recipe.js +8 -0
  35. package/dist/esm/components/multiselect/multiselect.js +23 -10
  36. package/dist/esm/components/multiselect/multiselect.recipe.js +95 -65
  37. package/dist/esm/components/select/listbox-keyboard.js +7 -1
  38. package/dist/esm/components/select/select.js +24 -11
  39. package/dist/esm/components/select/select.recipe.js +150 -78
  40. package/dist/esm/components/statusdot/index.js +2 -0
  41. package/dist/esm/components/statusdot/statusdot.js +12 -0
  42. package/dist/esm/components/statusdot/statusdot.recipe.js +31 -0
  43. package/dist/esm/components/tabletoolbar/tabletoolbar.js +3 -3
  44. package/dist/esm/components/tabletoolbar/tabletoolbar.recipe.js +26 -1
  45. package/dist/esm/components/tabs/tabs.js +63 -4
  46. package/dist/esm/components/tabs/tabs.recipe.js +13 -0
  47. package/dist/esm/components/text/text.recipe.js +10 -0
  48. package/dist/esm/components/textlink/textlink.js +2 -2
  49. package/dist/esm/components/textlink/textlink.recipe.js +18 -0
  50. package/dist/esm/index.js +1 -0
  51. package/dist/esm/product/recordpage/recordpage.js +18 -5
  52. package/dist/esm/tokens/elevation.js +7 -0
  53. package/dist/esm/tokens/palette.js +41 -0
  54. package/dist/esm/tokens/scale.js +16 -1
  55. package/dist/esm/tokens/semantic.js +18 -0
  56. package/dist/input.css +4 -0
  57. package/dist/input.d.ts +2 -2
  58. package/dist/input.layered.css +4 -0
  59. package/dist/menu.css +8 -0
  60. package/dist/menu.layered.css +8 -0
  61. package/dist/multiselect.css +53 -29
  62. package/dist/multiselect.d.ts +3 -1
  63. package/dist/multiselect.layered.css +53 -29
  64. package/dist/native/tokens.d.ts +1 -1
  65. package/dist/native/tokens.js +50 -7
  66. package/dist/select.css +80 -42
  67. package/dist/select.d.ts +3 -2
  68. package/dist/select.layered.css +80 -42
  69. package/dist/statusdot.css +3 -0
  70. package/dist/statusdot.d.ts +7 -0
  71. package/dist/statusdot.layered.css +5 -0
  72. package/dist/styles.css +238 -73
  73. package/dist/styles.layered.css +238 -73
  74. package/dist/tabletoolbar.css +8 -1
  75. package/dist/tabletoolbar.layered.css +8 -1
  76. package/dist/tabs.css +6 -0
  77. package/dist/tabs.layered.css +6 -0
  78. package/dist/text.css +6 -0
  79. package/dist/text.d.ts +2 -2
  80. package/dist/text.layered.css +6 -0
  81. package/dist/textlink.css +9 -0
  82. package/dist/textlink.d.ts +2 -1
  83. package/dist/textlink.layered.css +9 -0
  84. package/dist/tokens.css +54 -1
  85. package/dist/tokens.json +50 -7
  86. package/dist/types/components/callout/callout.d.ts +9 -1
  87. package/dist/types/components/callout/callout.recipe.d.ts +12 -2
  88. package/dist/types/components/input/input.d.ts +2 -0
  89. package/dist/types/components/input/input.recipe.d.ts +3 -0
  90. package/dist/types/components/menu/menu.d.ts +7 -1
  91. package/dist/types/components/multiselect/multiselect.d.ts +24 -6
  92. package/dist/types/components/multiselect/multiselect.recipe.d.ts +24 -0
  93. package/dist/types/components/select/listbox-keyboard.d.ts +10 -1
  94. package/dist/types/components/select/select.d.ts +28 -6
  95. package/dist/types/components/select/select.recipe.d.ts +22 -10
  96. package/dist/types/components/statusdot/index.d.ts +2 -0
  97. package/dist/types/components/statusdot/statusdot.d.ts +21 -0
  98. package/dist/types/components/statusdot/statusdot.recipe.d.ts +15 -0
  99. package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +14 -0
  100. package/dist/types/components/tabs/tabs.d.ts +9 -1
  101. package/dist/types/components/text/text.d.ts +4 -0
  102. package/dist/types/components/text/text.recipe.d.ts +12 -0
  103. package/dist/types/components/textlink/textlink.d.ts +8 -1
  104. package/dist/types/components/textlink/textlink.recipe.d.ts +10 -0
  105. package/dist/types/index.d.ts +1 -0
  106. package/dist/types/product/recordpage/recordpage.d.ts +25 -1
  107. package/dist/types/tokens/contract.d.ts +13 -3
  108. package/dist/types/tokens/elevation.d.ts +7 -0
  109. package/dist/types/tokens/palette.d.ts +36 -0
  110. package/dist/types/tokens/scale.d.ts +6 -1
  111. package/dist/types/tokens/semantic.d.ts +18 -0
  112. package/package.json +6 -1
@@ -19,12 +19,16 @@ export declare const Text: React.ForwardRefExoticComponent<Omit<React.DetailedHT
19
19
  readonly tone: {
20
20
  readonly default: string;
21
21
  readonly muted: string;
22
+ readonly brand: string;
23
+ readonly danger: string;
22
24
  };
23
25
  }> & {
24
26
  config: import("../..").RecipeConfig<{
25
27
  readonly tone: {
26
28
  readonly default: string;
27
29
  readonly muted: string;
30
+ readonly brand: string;
31
+ readonly danger: string;
28
32
  };
29
33
  }>;
30
34
  }> & {
@@ -11,6 +11,12 @@ declare const spec: {
11
11
  muted: {
12
12
  color: `var(--${string})`;
13
13
  };
14
+ brand: {
15
+ color: `var(--${string})`;
16
+ };
17
+ danger: {
18
+ color: `var(--${string})`;
19
+ };
14
20
  };
15
21
  };
16
22
  readonly defaultVariants: {
@@ -21,18 +27,24 @@ declare const config: import("../..").RecipeConfig<{
21
27
  readonly tone: {
22
28
  readonly default: string;
23
29
  readonly muted: string;
30
+ readonly brand: string;
31
+ readonly danger: string;
24
32
  };
25
33
  }>;
26
34
  export declare const textRecipe: import("../..").RecipeFn<{
27
35
  readonly tone: {
28
36
  readonly default: string;
29
37
  readonly muted: string;
38
+ readonly brand: string;
39
+ readonly danger: string;
30
40
  };
31
41
  }> & {
32
42
  config: import("../..").RecipeConfig<{
33
43
  readonly tone: {
34
44
  readonly default: string;
35
45
  readonly muted: string;
46
+ readonly brand: string;
47
+ readonly danger: string;
36
48
  };
37
49
  }>;
38
50
  };
@@ -4,6 +4,13 @@ export type TextLinkProps = React.ComponentPropsWithoutRef<"a"> & {
4
4
  * `"muted"` (default) — quiet until hover, then brand-coloured (an
5
5
  * in-context reference link, e.g. a sample record under a finding). */
6
6
  tone?: "brand" | "muted";
7
+ /**
8
+ * Overrides the tone's own font-size only (colour/weight/hover stay
9
+ * whatever `tone` gives). Omit it and each tone keeps its existing size
10
+ * unchanged — `brand`'s 12px, `muted`'s 13px. `"lg"` (14px) matches a
11
+ * `DataTable` primary-column's own ambient size (crisp#874).
12
+ */
13
+ size?: "sm" | "md" | "lg";
7
14
  className?: string;
8
15
  };
9
16
  /**
@@ -13,7 +20,7 @@ export type TextLinkProps = React.ComponentPropsWithoutRef<"a"> & {
13
20
  * `event.preventDefault()` pairs it with client-side routing (e.g.
14
21
  * react-router's own `Link`).
15
22
  */
16
- export declare function TextLink({ tone, className, ...rest }: TextLinkProps): React.JSX.Element;
23
+ export declare function TextLink({ tone, size, className, ...rest }: TextLinkProps): React.JSX.Element;
17
24
  export declare namespace TextLink {
18
25
  var displayName: string;
19
26
  }
@@ -3,11 +3,21 @@ declare const config: import("../..").RecipeConfig<{
3
3
  brand: string;
4
4
  muted: string;
5
5
  };
6
+ size: {
7
+ sm: string;
8
+ md: string;
9
+ lg: string;
10
+ };
6
11
  }>;
7
12
  export declare const textlinkRecipe: import("../..").RecipeFn<{
8
13
  tone: {
9
14
  brand: string;
10
15
  muted: string;
11
16
  };
17
+ size: {
18
+ sm: string;
19
+ md: string;
20
+ lg: string;
21
+ };
12
22
  }>;
13
23
  export default config;
@@ -47,6 +47,7 @@ export * from "./components/slider";
47
47
  export * from "./components/spinner";
48
48
  export * from "./components/stagebar";
49
49
  export * from "./components/statcard";
50
+ export * from "./components/statusdot";
50
51
  export * from "./components/switch";
51
52
  export * from "./components/table";
52
53
  export * from "./components/tabletoolbar";
@@ -57,6 +57,17 @@ export type RecordPageHighlight = {
57
57
  value: React.ReactNode | null;
58
58
  empty?: React.ReactNode;
59
59
  };
60
+ /**
61
+ * One icon button in the quick-action row (#865) — "New note"/"Run
62
+ * workflow"/"New task" in the built-in CRM set. `label` doubles as the
63
+ * button's `aria-label`, since these render icon-only (measured live: no
64
+ * visible text next to any of the three, only a native-title tooltip).
65
+ */
66
+ export type RecordPageQuickAction = {
67
+ label: string;
68
+ icon: LucideIcon;
69
+ onSelect?: () => void;
70
+ };
60
71
  export type RecordPageProps = Omit<React.ComponentPropsWithoutRef<"div">, "children"> & {
61
72
  record: Row;
62
73
  columns: Column[];
@@ -90,6 +101,18 @@ export type RecordPageProps = Omit<React.ComponentPropsWithoutRef<"div">, "child
90
101
  tabs?: RecordPageTab[];
91
102
  /** Active tab id on first render, when `tabs` is supplied. Defaults to the first tab. Ignored for the built-in tab set (Overview is always first there). */
92
103
  defaultTab?: string;
104
+ /**
105
+ * Replaces the quick-action row's icon buttons (New note / Run workflow /
106
+ * New task) — the same "caller's own list, not a merge" choice `tabs`
107
+ * (#379) and `highlights` (#528) already make. Confirmed live this set
108
+ * varies by object type (#865): a Person record carries a 4th,
109
+ * unidentified icon that Company and Deal records don't, so a consumer
110
+ * targeting a non-CRM object supplies its own icons rather than crisp
111
+ * guessing at a superset. The row's two text buttons ("Compose email",
112
+ * "Add to list") aren't part of this override — discovery found no
113
+ * variance there, only in the icon set. Omit to keep the built-in three.
114
+ */
115
+ quickActions?: RecordPageQuickAction[];
93
116
  /**
94
117
  * Controlled Notes: when supplied (even as `[]`), RecordPage renders
95
118
  * this list instead of managing its own, and the composer calls
@@ -142,6 +165,7 @@ export type RecordPageLabels = {
142
165
  linkRecords: string;
143
166
  logANote: string;
144
167
  createATask: string;
168
+ runWorkflow: string;
145
169
  fullScreen: string;
146
170
  exitFullScreen: string;
147
171
  resizeDetails: string;
@@ -244,7 +268,7 @@ export declare namespace RecordDetails {
244
268
  * Emails sections (Notes & Tasks are live — add and check things off). Drop it
245
269
  * into the app's main content area.
246
270
  */
247
- export declare function RecordPage({ record, columns, collection, labels, onBack, onToggleFull, full, className, onEdit, tabs: tabsProp, defaultTab, notes: notesProp, onAddNote, tasks: tasksProp, onAddTask, onToggleTask, sections, highlights: highlightsProp, ...rest }: RecordPageProps): React.JSX.Element;
271
+ export declare function RecordPage({ record, columns, collection, labels, onBack, onToggleFull, full, className, onEdit, tabs: tabsProp, defaultTab, notes: notesProp, onAddNote, tasks: tasksProp, onAddTask, onToggleTask, sections, highlights: highlightsProp, quickActions: quickActionsProp, ...rest }: RecordPageProps): React.JSX.Element;
248
272
  export declare namespace RecordPage {
249
273
  var displayName: string;
250
274
  }
@@ -56,10 +56,20 @@ export declare const contract: MapLeafNodes<{
56
56
  bgPurpleSoft: "purpleTint";
57
57
  fgPurpleSoft: "softPurpleText";
58
58
  ringPurpleSoft: "purpleRing";
59
+ ringBrandSoft: "ringBrandSoft";
60
+ fgSelectNeutral: "fieldFocus";
61
+ bgSelectListbox: "selectListboxBg";
62
+ strokeSelectTrigger: "selectTriggerStroke";
63
+ bgSelectPressed: "selectPressedTint";
64
+ bgSelectDisabled: "selectDisabledBg";
65
+ strokeSelectInvalid: "selectInvalidStroke";
66
+ strokeSelectDivider: "selectDivider";
67
+ fgSelectPlaceholder: "selectPlaceholder";
68
+ shadowSelect: "selectShadow";
59
69
  }, `var(--${string})`> & {
60
- space: Record<"0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "4" | "5" | "6" | "8" | "px", `var(--${string})`>;
61
- radius: Record<"2xl" | "chip" | "full" | "lg" | "md" | "sm" | "xl", `var(--${string})`>;
62
- size: Record<"calendarCell" | "calendarPill" | "chip" | "header" | "icon" | "menuRow" | "row" | "tableHeader" | "tableRow", `var(--${string})`>;
70
+ space: Record<"0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "5" | "6" | "8" | "px", `var(--${string})`>;
71
+ radius: Record<"2xl" | "3xl" | "chip" | "full" | "lg" | "md" | "sm" | "xl", `var(--${string})`>;
72
+ size: Record<"calendarCell" | "calendarPill" | "chip" | "header" | "icon" | "menuRow" | "row" | "selectIconLg" | "selectTriggerLg" | "selectTriggerMd" | "tableHeader" | "tableRow", `var(--${string})`>;
63
73
  font: Record<"sans", `var(--${string})`>;
64
74
  text: Record<"lg" | "md" | "sm" | "xl" | "xs", `var(--${string})`>;
65
75
  weight: Record<"bold" | "medium" | "regular" | "semibold", `var(--${string})`>;
@@ -55,5 +55,12 @@ export declare const elevation: {
55
55
  * nobody measured for them.
56
56
  */
57
57
  readonly fieldNoRing: `0 0 2px rgba(28,40,64,0.18), 0 1px 3px rgba(0,0,0,0.04)`;
58
+ /**
59
+ * Select's own listbox shadow (crisp/#867) — seed-design's `$shadow.s3`, a
60
+ * single layer, NOT `floating` above. This component follows seed, not
61
+ * Attio, for the same reason `DatePicker` follows seed's calendar
62
+ * structure: an explicit owner request to match seed-design exactly.
63
+ */
64
+ readonly selectFloating: `0 4px 16px var(--${string})`;
58
65
  };
59
66
  export type ElevationKey = keyof typeof elevation;
@@ -47,6 +47,10 @@ export declare const palette: {
47
47
  readonly light: "#d9dade";
48
48
  readonly dark: "#212224";
49
49
  };
50
+ readonly ringBrandSoft: {
51
+ readonly light: "#d6e5ff";
52
+ readonly dark: "#212224";
53
+ };
50
54
  readonly tileActive: {
51
55
  readonly light: "#ffffff";
52
56
  readonly dark: "#101112";
@@ -211,5 +215,37 @@ export declare const palette: {
211
215
  readonly light: "#e8ddfe";
212
216
  readonly dark: "#45297d";
213
217
  };
218
+ readonly selectListboxBg: {
219
+ readonly light: "#ffffff";
220
+ readonly dark: "#1d2025";
221
+ };
222
+ readonly selectTriggerStroke: {
223
+ readonly light: "#dcdee3";
224
+ readonly dark: "#393d46";
225
+ };
226
+ readonly selectPressedTint: {
227
+ readonly light: "#00000007";
228
+ readonly dark: "#ffffff0d";
229
+ };
230
+ readonly selectDisabledBg: {
231
+ readonly light: "#f3f4f5";
232
+ readonly dark: "#2b2e35";
233
+ };
234
+ readonly selectInvalidStroke: {
235
+ readonly light: "#fa342c";
236
+ readonly dark: "#ff6e60";
237
+ };
238
+ readonly selectDivider: {
239
+ readonly light: "#00000010";
240
+ readonly dark: "#ffffff17";
241
+ };
242
+ readonly selectPlaceholder: {
243
+ readonly light: "#b0b3ba";
244
+ readonly dark: "#868b94";
245
+ };
246
+ readonly selectShadow: {
247
+ readonly light: "#0000001f";
248
+ readonly dark: "#000000cc";
249
+ };
214
250
  };
215
251
  export type PaletteKey = keyof typeof palette;
@@ -6,6 +6,7 @@ export declare const space: {
6
6
  readonly "2": "8px";
7
7
  readonly "2.5": "10px";
8
8
  readonly "3": "12px";
9
+ readonly "3.5": "14px";
9
10
  readonly "4": "16px";
10
11
  readonly "5": "20px";
11
12
  readonly "6": "24px";
@@ -18,6 +19,7 @@ export declare const radius: {
18
19
  readonly lg: "9px";
19
20
  readonly xl: "12px";
20
21
  readonly "2xl": "16px";
22
+ readonly "3xl": "20px";
21
23
  readonly full: "999px";
22
24
  };
23
25
  export declare const size: {
@@ -30,9 +32,12 @@ export declare const size: {
30
32
  readonly header: "48px";
31
33
  readonly calendarCell: "34px";
32
34
  readonly calendarPill: "32px";
35
+ readonly selectTriggerMd: "40px";
36
+ readonly selectTriggerLg: "52px";
37
+ readonly selectIconLg: "20px";
33
38
  };
34
39
  export declare const font: {
35
- readonly sans: '"Inter", system-ui, -apple-system, "Segoe UI", sans-serif';
40
+ readonly sans: '"VK Sans Display", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif';
36
41
  };
37
42
  export declare const text: {
38
43
  readonly xs: "11px";
@@ -77,5 +77,23 @@ export declare const semantic: {
77
77
  bgPurpleSoft: "purpleTint";
78
78
  fgPurpleSoft: "softPurpleText";
79
79
  ringPurpleSoft: "purpleRing";
80
+ /** Callout's bordered/banner look (crisp#869) — an opaque measured ring,
81
+ * not a `color-mix` tint of `bgBrandSolid` (see palette.ts's own comment). */
82
+ ringBrandSoft: "ringBrandSoft";
83
+ /** Select rebuilt to seed-design parity (crisp/#867) — see palette.ts's
84
+ * comment above `selectListboxBg` for why these are their own tokens
85
+ * rather than a reuse of an Attio-measured one. */
86
+ /** Seed's neutral ink (gray-1000) used as TEXT/icon colour — same palette
87
+ * entry as `strokeFieldFocus` (a ring), aliased separately because the
88
+ * role here is content colour, not a focus ring. */
89
+ fgSelectNeutral: "fieldFocus";
90
+ bgSelectListbox: "selectListboxBg";
91
+ strokeSelectTrigger: "selectTriggerStroke";
92
+ bgSelectPressed: "selectPressedTint";
93
+ bgSelectDisabled: "selectDisabledBg";
94
+ strokeSelectInvalid: "selectInvalidStroke";
95
+ strokeSelectDivider: "selectDivider";
96
+ fgSelectPlaceholder: "selectPlaceholder";
97
+ shadowSelect: "selectShadow";
80
98
  };
81
99
  export type Tokens = typeof semantic;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crisp-ui-kit/crisp",
3
- "version": "0.55.6",
3
+ "version": "0.57.0",
4
4
  "description": "A lean React design system, measured pixel-for-pixel from Attio.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -278,6 +278,11 @@
278
278
  "import": "./dist/esm/components/statcard/index.js",
279
279
  "require": "./dist/cjs/components/statcard/index.js"
280
280
  },
281
+ "./statusdot": {
282
+ "types": "./dist/types/components/statusdot/index.d.ts",
283
+ "import": "./dist/esm/components/statusdot/index.js",
284
+ "require": "./dist/cjs/components/statusdot/index.js"
285
+ },
281
286
  "./switch": {
282
287
  "types": "./dist/types/components/switch/index.d.ts",
283
288
  "import": "./dist/esm/components/switch/index.js",