@crisp-ui-kit/crisp 0.54.4 → 0.54.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/authshell.css +4 -0
- package/dist/authshell.layered.css +4 -0
- package/dist/chip.css +1 -1
- package/dist/chip.layered.css +1 -1
- package/dist/cjs/components/chip/chip.recipe.js +12 -0
- package/dist/cjs/components/datatable/datatable.js +28 -5
- package/dist/cjs/components/datatable/datatable.recipe.js +6 -0
- package/dist/cjs/components/personchip/personchip.js +13 -3
- package/dist/cjs/components/tabletoolbar/tabletoolbar.js +75 -2
- package/dist/cjs/components/tooltip/tooltip.js +2 -2
- package/dist/cjs/components/tooltip/tooltip.recipe.js +37 -0
- package/dist/cjs/product/authshell/authshell.js +1 -1
- package/dist/cjs/product/authshell/authshell.recipe.js +18 -0
- package/dist/cjs/product/comments/comments.js +13 -21
- package/dist/cjs/product/comments/comments.recipe.js +29 -14
- package/dist/cjs/product/recordstable/recordstable.js +12 -3
- package/dist/cjs/product/richtext/richtext.js +31 -4
- package/dist/comments.css +21 -15
- package/dist/comments.layered.css +21 -15
- package/dist/datatable.css +8 -4
- package/dist/datatable.layered.css +8 -4
- package/dist/esm/components/chip/chip.recipe.js +12 -0
- package/dist/esm/components/datatable/datatable.js +28 -5
- package/dist/esm/components/datatable/datatable.recipe.js +6 -0
- package/dist/esm/components/personchip/personchip.js +13 -3
- package/dist/esm/components/tabletoolbar/tabletoolbar.js +76 -3
- package/dist/esm/components/tooltip/tooltip.js +2 -2
- package/dist/esm/components/tooltip/tooltip.recipe.js +37 -0
- package/dist/esm/product/authshell/authshell.js +1 -1
- package/dist/esm/product/authshell/authshell.recipe.js +18 -0
- package/dist/esm/product/comments/comments.js +13 -21
- package/dist/esm/product/comments/comments.recipe.js +29 -14
- package/dist/esm/product/recordstable/recordstable.js +12 -3
- package/dist/esm/product/richtext/richtext.js +31 -4
- package/dist/styles.css +41 -20
- package/dist/styles.layered.css +41 -20
- package/dist/tooltip.css +7 -0
- package/dist/tooltip.d.ts +2 -2
- package/dist/tooltip.layered.css +7 -0
- package/dist/types/components/chip/chip.recipe.d.ts +1 -0
- package/dist/types/components/datatable/datatable.d.ts +50 -11
- package/dist/types/components/personchip/personchip.d.ts +14 -2
- package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +32 -1
- package/dist/types/components/tooltip/tooltip.d.ts +16 -0
- package/dist/types/components/tooltip/tooltip.recipe.d.ts +30 -2
- package/dist/types/product/authshell/authshell.d.ts +4 -1
- package/dist/types/product/comments/comments.d.ts +1 -2
- package/dist/types/product/recordstable/recordstable.d.ts +12 -0
- package/package.json +1 -1
package/dist/styles.layered.css
CHANGED
|
@@ -448,7 +448,7 @@
|
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
.crisp-chip {
|
|
451
|
-
display: inline-flex; align-items: center; gap: 3px; height: var(--crisp-size-chip); min-width: 0; padding-inline: var(--crisp-space-1); border-radius: var(--crisp-radius-chip); font-size: var(--crisp-text-lg); line-height: 20px; font-weight: var(--crisp-weight-medium); white-space: nowrap;
|
|
451
|
+
display: inline-flex; align-items: center; gap: 3px; height: var(--crisp-size-chip); min-width: 0; max-width: 100%; padding-inline: var(--crisp-space-1); border-radius: var(--crisp-radius-chip); font-size: var(--crisp-text-lg); line-height: 20px; font-weight: var(--crisp-weight-medium); white-space: nowrap;
|
|
452
452
|
}
|
|
453
453
|
.crisp-chip--truncate_true {
|
|
454
454
|
& .crisp-chip-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
|
|
@@ -680,10 +680,14 @@
|
|
|
680
680
|
& .crisp-datatable-tag[data-tone="orange"] { background: color-mix(in srgb, var(--crisp-bg-orange) 16%, transparent); color: color-mix(in srgb, var(--crisp-bg-orange) 82%, var(--crisp-fg-primary)); }
|
|
681
681
|
& .crisp-datatable-num { font-variant-numeric: tabular-nums; }
|
|
682
682
|
& .crisp-datatable-muted { color: var(--crisp-fg-muted); }
|
|
683
|
-
/*
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
683
|
+
/* 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. */
|
|
684
|
+
& .crisp-datatable-link { color: var(--crisp-fg-primary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
|
|
685
|
+
& .crisp-datatable-link:hover { text-decoration: underline; }
|
|
686
|
+
/* row drag-to-reorder -- a Settings > Objects > Attributes screen measures a leading 20px grip column, a 16px grip icon, and the row's own
|
|
687
|
+
hairline doubling as the drop indicator (it tints toward the brand
|
|
688
|
+
colour as the active drop target). The affordance + geometry are
|
|
689
|
+
measured; the drag MECHANISM is crisp's existing house idiom -- HTML5 draggable + dataTransfer, the same one column reorder already uses (RecordsTable's reorderColumn) -- not a proprietary
|
|
690
|
+
pointer-events implementation. */
|
|
687
691
|
& .crisp-datatable-col-grip { width: 20px; padding: 0; text-align: center; }
|
|
688
692
|
& .crisp-datatable-grip { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; margin: 0; border: none; border-radius: 0; background: none; font-family: inherit; color: var(--crisp-fg-muted); cursor: grab; }
|
|
689
693
|
& .crisp-datatable-grip:active { cursor: grabbing; }
|
|
@@ -1893,6 +1897,13 @@
|
|
|
1893
1897
|
.crisp-tooltip {
|
|
1894
1898
|
position: fixed; z-index: 70; box-sizing: border-box; pointer-events: none; max-width: 260px; padding: var(--crisp-space-1-5) var(--crisp-space-2); border-radius: var(--crisp-radius-md); background: #101112; color: #eeeff1; font-family: var(--crisp-font-sans); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); line-height: 1.45; box-shadow: 0 4px 14px -2px rgba(28,40,64,0.28), 0 0 0 1px rgba(255,255,255,0.04); opacity: 1; transition: opacity 0.12s ease;
|
|
1895
1899
|
@starting-style { opacity: 0; }
|
|
1900
|
+
& .crisp-tooltip-reference-row { display: inline-flex; align-items: center; gap: var(--crisp-space-1); }
|
|
1901
|
+
}
|
|
1902
|
+
.crisp-tooltip--variant_plain {
|
|
1903
|
+
|
|
1904
|
+
}
|
|
1905
|
+
.crisp-tooltip--variant_reference {
|
|
1906
|
+
box-shadow: rgba(0,0,0,0) 0 0 0 1px inset, rgba(28,40,64,0.18) 0 0 2px 0, rgba(0,0,0,0.04) 0 1px 3px 0;
|
|
1896
1907
|
}
|
|
1897
1908
|
|
|
1898
1909
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1967,14 +1978,18 @@
|
|
|
1967
1978
|
|
|
1968
1979
|
.crisp-authshell {
|
|
1969
1980
|
min-height: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; position: relative; background: var(--crisp-bg-surface); font-family: var(--crisp-font-sans); font-size: var(--crisp-text-lg); line-height: 20px; color: var(--crisp-fg-primary); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
1981
|
+
&[data-single-pane] { justify-content: center; }
|
|
1970
1982
|
& .crisp-authshell-progress { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--crisp-border-default); }
|
|
1971
1983
|
& .crisp-authshell-progress-fill { height: 2px; background: var(--crisp-fg-primary); border-radius: 4px; transition: width .2s; }
|
|
1972
1984
|
& .crisp-authshell-logo { margin-top: var(--crisp-space-8); height: 24px; display: flex; align-items: center; }
|
|
1973
1985
|
& .crisp-authshell-card { margin-top: var(--crisp-space-6); display: flex; height: 692px; border-radius: 20px; border: 1px solid var(--crisp-border-subtle); overflow: hidden; }
|
|
1986
|
+
&[data-single-pane] .crisp-authshell-card { height: auto; border: none; border-radius: 0; overflow: visible; }
|
|
1974
1987
|
& .crisp-authshell-pane { flex: 0 0 564px; padding: 72px; display: flex; flex-direction: column; box-sizing: border-box; }
|
|
1988
|
+
&[data-single-pane] .crisp-authshell-pane { flex: 0 0 auto; padding: 0; }
|
|
1975
1989
|
& .crisp-authshell-preview { flex: 0 0 564px; padding: 96px 64px; background: var(--crisp-bg-subtle); border-inline-start: 1px solid color-mix(in srgb, var(--crisp-fg-primary) 5%, transparent); position: relative; overflow: hidden; box-sizing: border-box; }
|
|
1976
1990
|
& .crisp-authshell-preview::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(color-mix(in srgb, var(--crisp-bg-subtle) 0%, transparent) 0%, var(--crisp-bg-subtle) 100%); pointer-events: none; }
|
|
1977
1991
|
& .crisp-authshell-body { width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--crisp-space-8); align-items: center; }
|
|
1992
|
+
&[data-single-pane] .crisp-authshell-body { width: 360px; }
|
|
1978
1993
|
& .crisp-authshell-title { font-size: 20px; line-height: 24px; font-weight: var(--crisp-weight-semibold); letter-spacing: -0.4px; color: var(--crisp-fg-primary); align-self: stretch; }
|
|
1979
1994
|
& .crisp-authshell-form { align-self: stretch; display: flex; flex-direction: column; gap: 28px; }
|
|
1980
1995
|
& .crisp-authshell-footer { margin-top: var(--crisp-space-6); display: flex; align-items: center; gap: var(--crisp-space-1); font-size: var(--crisp-text-sm); line-height: 16px; color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); }
|
|
@@ -2091,6 +2106,27 @@
|
|
|
2091
2106
|
}
|
|
2092
2107
|
}
|
|
2093
2108
|
|
|
2109
|
+
|
|
2110
|
+
/* Reaction picker -- see `ReactionPicker`'s own doc comment: the exact
|
|
2111
|
+
chrome wasn't independently pixel-measured this pass (screenshot
|
|
2112
|
+
capture broke mid-session), so this reuses Menu's already-measured
|
|
2113
|
+
floating-popover shell rather than a new value. */
|
|
2114
|
+
.crisp-comments-reactionpicker { font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; box-sizing: border-box; width: 240px; padding: var(--crisp-space-2); border-radius: var(--crisp-radius-xl); 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); }
|
|
2115
|
+
.crisp-comments-reactionpicker-search { box-sizing: border-box; width: 100%; height: 28px; margin-bottom: var(--crisp-space-2); padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-md); background: var(--crisp-bg-raised); font-family: inherit; font-size: var(--crisp-text-md); color: var(--crisp-fg-primary); }
|
|
2116
|
+
.crisp-comments-reactionpicker-search::placeholder { color: color-mix(in srgb, var(--crisp-fg-primary) 40%, transparent); }
|
|
2117
|
+
.crisp-comments-reactionpicker-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: var(--crisp-space-0-5); max-height: 160px; overflow-y: auto; }
|
|
2118
|
+
.crisp-comments-reactionpicker-item { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: none; border-radius: var(--crisp-radius-sm); background: none; font-family: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
|
|
2119
|
+
.crisp-comments-reactionpicker-item:hover { background: var(--crisp-bg-raised); }
|
|
2120
|
+
|
|
2121
|
+
/* Row badge (CommentCountBadge) -- lives in its own class family so the
|
|
2122
|
+
grid lanes can drop it into a cell without pulling in the panel's
|
|
2123
|
+
CSS. Persistent state: a 6px grey dot. Hover state: a 12px comment
|
|
2124
|
+
icon + 12px count text, both at 55% ink, replacing the dot. */
|
|
2125
|
+
.crisp-comments-badge { box-sizing: border-box; font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; display: inline-flex; align-items: center; gap: var(--crisp-space-1); border: none; background: none; padding: 0; margin: 0; cursor: pointer; color: color-mix(in srgb, var(--crisp-fg-primary) 55%, transparent); }
|
|
2126
|
+
.crisp-comments-badge-dot { box-sizing: border-box; width: 6px; height: 6px; border-radius: var(--crisp-radius-full); background: color-mix(in srgb, var(--crisp-fg-primary) 38%, transparent); }
|
|
2127
|
+
.crisp-comments-badge-count { font-size: 12px; line-height: 16px; }
|
|
2128
|
+
[dir="rtl"] .crisp-comments-badge [data-rtl-flip] { transform: scaleX(-1); }
|
|
2129
|
+
|
|
2094
2130
|
.crisp-comments {
|
|
2095
2131
|
display: flex; flex-direction: column; box-sizing: border-box; width: 320px; height: 100%; background: var(--crisp-bg-surface); border-inline-start: 1px solid var(--crisp-border-subtle); font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
2096
2132
|
& * { box-sizing: border-box; }
|
|
@@ -2146,21 +2182,6 @@
|
|
|
2146
2182
|
/* An inserted "@mention" chip in the composer -- same shape as
|
|
2147
2183
|
RichTextEditor's own `.crisp-rte-mention` (crisp#428), reused here rather than re-derived since it's the same atomic-chip affordance. */
|
|
2148
2184
|
& .crisp-comments-mention { display: inline; padding: 0 2px; border-radius: 4px; background: color-mix(in srgb, var(--crisp-bg-brand-solid) 12%, transparent); color: var(--crisp-bg-brand-solid); font-weight: var(--crisp-weight-medium); user-select: none; }
|
|
2149
|
-
|
|
2150
|
-
/* Reaction picker -- see `ReactionPicker`'s own doc comment: the exact chrome wasn't independently pixel-measured this pass (screenshot
|
|
2151
|
-
capture broke mid-session), so this reuses Menu's already-measured floating-popover shell rather than a new value. */
|
|
2152
|
-
& .crisp-comments-reactionpicker { width: 240px; padding: var(--crisp-space-2); border-radius: var(--crisp-radius-xl); 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); }
|
|
2153
|
-
& .crisp-comments-reactionpicker-search { box-sizing: border-box; width: 100%; height: 28px; margin-bottom: var(--crisp-space-2); padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-md); background: var(--crisp-bg-raised); font-family: inherit; font-size: var(--crisp-text-md); color: var(--crisp-fg-primary); }
|
|
2154
|
-
& .crisp-comments-reactionpicker-search::placeholder { color: color-mix(in srgb, var(--crisp-fg-primary) 40%, transparent); }
|
|
2155
|
-
& .crisp-comments-reactionpicker-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: var(--crisp-space-0-5); max-height: 160px; overflow-y: auto; }
|
|
2156
|
-
& .crisp-comments-reactionpicker-item { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: none; border-radius: var(--crisp-radius-sm); background: none; font-family: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
|
|
2157
|
-
& .crisp-comments-reactionpicker-item:hover { background: var(--crisp-bg-raised); }
|
|
2158
|
-
/* Row badge (CommentCountBadge) -- lives in its own class family so the grid lanes can drop it into a cell without pulling in the panel's
|
|
2159
|
-
CSS. Persistent state: a 6px grey dot. Hover state: a 12px comment
|
|
2160
|
-
icon + 12px count text, both at 55% ink, replacing the dot. */
|
|
2161
|
-
& .crisp-comments-badge { display: inline-flex; align-items: center; gap: var(--crisp-space-1); border: none; background: none; padding: 0; margin: 0; font-family: inherit; cursor: pointer; color: color-mix(in srgb, var(--crisp-fg-primary) 55%, transparent); }
|
|
2162
|
-
& .crisp-comments-badge-dot { width: 6px; height: 6px; border-radius: var(--crisp-radius-full); background: color-mix(in srgb, var(--crisp-fg-primary) 38%, transparent); }
|
|
2163
|
-
& .crisp-comments-badge-count { font-size: 12px; line-height: 16px; }
|
|
2164
2185
|
[dir="rtl"] & [data-rtl-flip] { transform: scaleX(-1); }
|
|
2165
2186
|
}
|
|
2166
2187
|
|
package/dist/tooltip.css
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
.crisp-tooltip {
|
|
2
2
|
position: fixed; z-index: 70; box-sizing: border-box; pointer-events: none; max-width: 260px; padding: var(--crisp-space-1-5) var(--crisp-space-2); border-radius: var(--crisp-radius-md); background: #101112; color: #eeeff1; font-family: var(--crisp-font-sans); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); line-height: 1.45; box-shadow: 0 4px 14px -2px rgba(28,40,64,0.28), 0 0 0 1px rgba(255,255,255,0.04); opacity: 1; transition: opacity 0.12s ease;
|
|
3
3
|
@starting-style { opacity: 0; }
|
|
4
|
+
& .crisp-tooltip-reference-row { display: inline-flex; align-items: center; gap: var(--crisp-space-1); }
|
|
5
|
+
}
|
|
6
|
+
.crisp-tooltip--variant_plain {
|
|
7
|
+
|
|
8
|
+
}
|
|
9
|
+
.crisp-tooltip--variant_reference {
|
|
10
|
+
box-shadow: rgba(0,0,0,0) 0 0 0 1px inset, rgba(28,40,64,0.18) 0 0 2px 0, rgba(0,0,0,0.04) 0 1px 3px 0;
|
|
4
11
|
}
|
|
5
12
|
|
|
6
13
|
@media (prefers-reduced-motion: reduce) {
|
package/dist/tooltip.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RecipeFn } from "../core/types";
|
|
2
2
|
|
|
3
3
|
export interface TooltipVariants {
|
|
4
|
-
|
|
4
|
+
variant?: "plain" | "reference";
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export declare const tooltipRecipe: RecipeFn<{
|
|
7
|
+
export declare const tooltipRecipe: RecipeFn<{ variant: { plain: string; reference: string } }>;
|
package/dist/tooltip.layered.css
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
.crisp-tooltip {
|
|
3
3
|
position: fixed; z-index: 70; box-sizing: border-box; pointer-events: none; max-width: 260px; padding: var(--crisp-space-1-5) var(--crisp-space-2); border-radius: var(--crisp-radius-md); background: #101112; color: #eeeff1; font-family: var(--crisp-font-sans); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); line-height: 1.45; box-shadow: 0 4px 14px -2px rgba(28,40,64,0.28), 0 0 0 1px rgba(255,255,255,0.04); opacity: 1; transition: opacity 0.12s ease;
|
|
4
4
|
@starting-style { opacity: 0; }
|
|
5
|
+
& .crisp-tooltip-reference-row { display: inline-flex; align-items: center; gap: var(--crisp-space-1); }
|
|
6
|
+
}
|
|
7
|
+
.crisp-tooltip--variant_plain {
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
.crisp-tooltip--variant_reference {
|
|
11
|
+
box-shadow: rgba(0,0,0,0) 0 0 0 1px inset, rgba(28,40,64,0.18) 0 0 2px 0, rgba(0,0,0,0.04) 0 1px 3px 0;
|
|
5
12
|
}
|
|
6
13
|
|
|
7
14
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -6,6 +6,7 @@ declare const spec: {
|
|
|
6
6
|
readonly gap: "3px";
|
|
7
7
|
readonly height: `var(--${string})`;
|
|
8
8
|
readonly minWidth: 0;
|
|
9
|
+
readonly maxWidth: "100%";
|
|
9
10
|
readonly paddingInline: `var(--${string})`;
|
|
10
11
|
readonly borderRadius: `var(--${string})`;
|
|
11
12
|
readonly fontSize: `var(--${string})`;
|
|
@@ -22,7 +22,20 @@ export type DataEditableOption = {
|
|
|
22
22
|
* `editor: "select"`. */
|
|
23
23
|
avatar?: string;
|
|
24
24
|
};
|
|
25
|
-
export type DataCellType = "text" | "entity" | "tags" | "status" | "date" | "datetime" | "number" | "currency"
|
|
25
|
+
export type DataCellType = "text" | "entity" | "tags" | "status" | "date" | "datetime" | "number" | "currency"
|
|
26
|
+
/** Opens `https://{value}` in a new tab -- matches RecordsTable's own
|
|
27
|
+
* `url` type exactly (crisp/#654): `color: fgPrimary`, no underline at
|
|
28
|
+
* rest, underline on hover. A click stops propagation, same as an
|
|
29
|
+
* `entity` column's `onEntityClick` link, so it doesn't also fire the
|
|
30
|
+
* row's own `onRowClick`. */
|
|
31
|
+
| "url"
|
|
32
|
+
/** Opens `mailto:{value}`, same link styling as `url`. Attio confirms
|
|
33
|
+
* this is a distinct column type ("Primary email address", checklist
|
|
34
|
+
* G-042), but its editor was never opened live in the measured
|
|
35
|
+
* workspace -- this type is display-only for now; editing still falls
|
|
36
|
+
* through to the plain-text editor every other non-number/date type
|
|
37
|
+
* gets, not a dedicated one (see #597 for when that's measured). */
|
|
38
|
+
| "email";
|
|
26
39
|
export type DataTableColumn<T> = {
|
|
27
40
|
key: string;
|
|
28
41
|
/** Truncates with an ellipsis when it's wider than the column (#534: a
|
|
@@ -35,6 +48,17 @@ export type DataTableColumn<T> = {
|
|
|
35
48
|
type?: DataCellType;
|
|
36
49
|
/** A leading field-type icon in the header (matches RecordsTable). */
|
|
37
50
|
icon?: IconType;
|
|
51
|
+
/** This column's values reference another type of record (e.g. a
|
|
52
|
+
* "Primary location" column of Country records). When the header
|
|
53
|
+
* overflows, its `Tooltip` appends this type's icon and name after the
|
|
54
|
+
* label and switches to Attio's second, reference-column tooltip chrome
|
|
55
|
+
* (crisp#580) — distinct from `icon` above, which is the column's own
|
|
56
|
+
* field-type glyph shown in the header row itself, not inside the
|
|
57
|
+
* tooltip. Omit for a plain column; the tooltip stays label-only (#534). */
|
|
58
|
+
referencedType?: {
|
|
59
|
+
icon: IconType;
|
|
60
|
+
label: string;
|
|
61
|
+
};
|
|
38
62
|
/** Currency symbol for `currency` columns (default "$"). */
|
|
39
63
|
symbol?: string;
|
|
40
64
|
/** Allow drag-to-resize on this column (default true). */
|
|
@@ -51,17 +75,25 @@ export type DataTableColumn<T> = {
|
|
|
51
75
|
editable?: boolean;
|
|
52
76
|
/** The inline editor an `editable` column opens. Omitted: a plain field
|
|
53
77
|
* inferred from `type` (number/date/datetime/text). `"select"`/
|
|
54
|
-
* `"reference"` render crisp's own `Select` the same way — at
|
|
55
|
-
* cell shows the column's `render`/formatted value like every
|
|
56
|
-
* editable type (#453), and double-click (or Enter on the selected
|
|
78
|
+
* `"reference"`/`"actor"` render crisp's own `Select` the same way — at
|
|
79
|
+
* rest the cell shows the column's `render`/formatted value like every
|
|
80
|
+
* other editable type (#453), and double-click (or Enter on the selected
|
|
57
81
|
* cell) opens the picker; choosing a value commits and closes it,
|
|
58
|
-
* Escape cancels. `select` reads `options`; `reference`
|
|
59
|
-
* `refOptions` and
|
|
82
|
+
* Escape cancels. `select` reads `options`; `reference`/`actor` both
|
|
83
|
+
* read `refOptions` and are search-enabled, the same searchable-`Select`
|
|
60
84
|
* shape as `RecordsTable`'s own `ReferenceCell`. `"switch"` is the one
|
|
61
85
|
* exception — ALWAYS its own live widget, no double-click gate, since
|
|
62
86
|
* flipping the toggle IS the commit gesture and there's no meaningfully
|
|
63
|
-
* different "rest" display for a boolean.
|
|
64
|
-
|
|
87
|
+
* different "rest" display for a boolean.
|
|
88
|
+
*
|
|
89
|
+
* `"actor"` (crisp/#654, checklist G-039) is `"reference"` with Attio's
|
|
90
|
+
* own measured person-picker copy as the default instead of a generic
|
|
91
|
+
* one: `refSearchPlaceholder` defaults to "Search people…" and the
|
|
92
|
+
* empty-search state reads "No users" rather than `Select`'s own
|
|
93
|
+
* generic "No results" — both still overridable the normal way.
|
|
94
|
+
* Otherwise identical to `reference`: same `refOptions` shape, same
|
|
95
|
+
* `onCreateReference`/`createLabel` "Create X" row. */
|
|
96
|
+
editor?: "select" | "switch" | "reference" | "actor";
|
|
65
97
|
/** Options for `editor: "select"` (value/label, an optional `color` a
|
|
66
98
|
* caller's own `render` can read) — same shape as RecordsTable's
|
|
67
99
|
* `Column.options` for its `status` picker. */
|
|
@@ -72,10 +104,17 @@ export type DataTableColumn<T> = {
|
|
|
72
104
|
* RecordsTable's own `ReferenceCell`, which this picker mirrors. */
|
|
73
105
|
refOptions?: DataEditableOption[];
|
|
74
106
|
/** Placeholder for `editor: "reference"`'s search input. Defaults to
|
|
75
|
-
* `Select`'s own generic "Search…" — a generic primitive
|
|
76
|
-
* Attio's own copy ("Search records..."), which is
|
|
77
|
-
* text, not a crisp-measured value.
|
|
107
|
+
* `Select`'s own generic "Search…" for `reference` — a generic primitive
|
|
108
|
+
* doesn't hardcode Attio's own copy ("Search records..."), which is
|
|
109
|
+
* workspace/object text, not a crisp-measured value. `editor: "actor"`
|
|
110
|
+
* defaults this to the measured "Search people…" instead (still
|
|
111
|
+
* overridable here). */
|
|
78
112
|
refSearchPlaceholder?: string;
|
|
113
|
+
/** `editor: "reference"`/`"actor"`'s empty-search-results text. Defaults
|
|
114
|
+
* to `Select`'s own generic "No results" for `reference`; `"actor"`
|
|
115
|
+
* defaults this to the measured "No users" (checklist G-039 — a real
|
|
116
|
+
* empty-search state on an empty query, not an error). */
|
|
117
|
+
refEmptyLabel?: string;
|
|
79
118
|
/** Adds a trailing "Create {createLabel}" row to `editor: "reference"`'s
|
|
80
119
|
* picker (Attio's own always has one, #449) — rendered only when this is
|
|
81
120
|
* provided. Picking it hands back the picker's current search text, e.g.
|
|
@@ -11,6 +11,14 @@ export type PersonChipProps = Omit<React.ComponentPropsWithoutRef<"span">, "chil
|
|
|
11
11
|
* Applied to the name only; the avatar keeps its full-strength tone so
|
|
12
12
|
* the chip still reads as a distinct person, not a disabled control. */
|
|
13
13
|
muted?: boolean;
|
|
14
|
+
/** One more thing after the name that must never shrink or wrap out of
|
|
15
|
+
* view (an icon, a small badge) — a consumer needing this used to wrap
|
|
16
|
+
* `PersonChip` in its own flex row for it, which needed `min-width: 0`
|
|
17
|
+
* of its own to keep shrinking correctly and, missing that, overflowed
|
|
18
|
+
* its container the same way #668 did before that fix (#683). Rendered
|
|
19
|
+
* inside the chip, after the name, so it shares `Chip`'s own flex/
|
|
20
|
+
* shrink layout instead of wrapping it in a second, unconstrained one. */
|
|
21
|
+
trailing?: React.ReactNode;
|
|
14
22
|
className?: string;
|
|
15
23
|
};
|
|
16
24
|
/**
|
|
@@ -29,9 +37,13 @@ export type PersonChipProps = Omit<React.ComponentPropsWithoutRef<"span">, "chil
|
|
|
29
37
|
* Composes `Chip`'s `truncate` CSS directly rather than its string-only
|
|
30
38
|
* auto-wrap (children here is an avatar plus a name, not a single string),
|
|
31
39
|
* so the name gets its own `.crisp-chip-label` span while the avatar stays
|
|
32
|
-
* fixed-size.
|
|
40
|
+
* fixed-size. `trailing` (#683) is the same idea for a consumer's own
|
|
41
|
+
* icon/badge after the name — inside the chip's own flex row rather than a
|
|
42
|
+
* second one a consumer would otherwise wrap this in, which needs its own
|
|
43
|
+
* `min-width: 0` to keep shrinking correctly and, missing that, overflows
|
|
44
|
+
* its container the same way #668 did before `Chip` itself was fixed.
|
|
33
45
|
*/
|
|
34
|
-
export declare function PersonChip({ name, avatar, muted, className, ...props }: PersonChipProps): React.JSX.Element;
|
|
46
|
+
export declare function PersonChip({ name, avatar, muted, trailing, className, ...props }: PersonChipProps): React.JSX.Element;
|
|
35
47
|
export declare namespace PersonChip {
|
|
36
48
|
var displayName: string;
|
|
37
49
|
}
|
|
@@ -119,6 +119,37 @@ export type TableToolbarProps = Omit<React.ComponentPropsWithoutRef<"div">, "chi
|
|
|
119
119
|
*/
|
|
120
120
|
inline?: boolean;
|
|
121
121
|
className?: string;
|
|
122
|
+
/**
|
|
123
|
+
* The full set of attributes View settings offers — every attribute on
|
|
124
|
+
* the object, shown or not. Defaults to `columns`. Omit both, along with
|
|
125
|
+
* `shownKeys`, and the trigger still renders but the popover has nothing
|
|
126
|
+
* to list, the same "still renders, empty popover" contract `columns`
|
|
127
|
+
* already documents for Sort/Filter.
|
|
128
|
+
*/
|
|
129
|
+
viewColumns?: TableToolbarColumn[];
|
|
130
|
+
/**
|
|
131
|
+
* Ordered keys of the attributes currently shown in the view — what
|
|
132
|
+
* the popover's draggable list reflects and reorders. Omit for internal
|
|
133
|
+
* state, seeded from `defaultShownKeys` or (failing that) every key in
|
|
134
|
+
* `viewColumns`/`columns`, in their given order — i.e. "everything shown"
|
|
135
|
+
* unless told otherwise.
|
|
136
|
+
*/
|
|
137
|
+
shownKeys?: string[];
|
|
138
|
+
defaultShownKeys?: string[];
|
|
139
|
+
onShownKeysChange?: (keys: string[]) => void;
|
|
140
|
+
/** Text on the View settings trigger (default "View settings"). */
|
|
141
|
+
viewSettingsLabel?: string;
|
|
142
|
+
/** aria-label on a shown attribute's drag grip (default "Reorder attribute"). */
|
|
143
|
+
reorderAttributeLabel?: string;
|
|
144
|
+
/** aria-label on a shown attribute's hide control — receives the
|
|
145
|
+
* attribute's label (default `Hide ${label} from view`). */
|
|
146
|
+
hideAttributeLabel?: (label: string) => string;
|
|
147
|
+
/** Label on the popover's footer action that opens the add-attribute
|
|
148
|
+
* search screen (default "Add attribute to view"), and the heading of
|
|
149
|
+
* that screen once open. */
|
|
150
|
+
addAttributeToViewLabel?: string;
|
|
151
|
+
/** Placeholder in the add-attribute search box (default "Search attributes…"). */
|
|
152
|
+
searchAttributesPlaceholder?: string;
|
|
122
153
|
};
|
|
123
154
|
/**
|
|
124
155
|
* Applies a toolbar's filter conditions to any row array. Reads the raw value
|
|
@@ -145,7 +176,7 @@ export declare function applySorts<T>(rows: T[], sorts: ToolbarSort[], get?: (ro
|
|
|
145
176
|
* this (Sort: Due date/Assignee/Creation date; Filter: Assignee/Record/
|
|
146
177
|
* Created by), which one shared list can't reproduce.
|
|
147
178
|
*/
|
|
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;
|
|
179
|
+
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, viewColumns: viewColumnsProp, shownKeys: shownKeysProp, defaultShownKeys, onShownKeysChange, viewSettingsLabel: viewSettingsLabelProp, reorderAttributeLabel: reorderAttributeLabelProp, hideAttributeLabel, addAttributeToViewLabel: addAttributeToViewLabelProp, searchAttributesPlaceholder: searchAttributesPlaceholderProp, ...rest }: TableToolbarProps): React.JSX.Element;
|
|
149
180
|
export type ToolbarToolProps = React.ComponentPropsWithoutRef<"button"> & {
|
|
150
181
|
/** Drawn the way Sort/Filter are once a condition is set (#399). */
|
|
151
182
|
active?: boolean;
|
|
@@ -33,6 +33,14 @@ export type TooltipProps = Omit<React.ComponentPropsWithoutRef<"span">, "content
|
|
|
33
33
|
* `ContextMenu`'s.
|
|
34
34
|
*/
|
|
35
35
|
asChild?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Which of Attio's two measured tooltip shadows to use (crisp#580) —
|
|
38
|
+
* background/colour/radius/padding/font are identical between them, only
|
|
39
|
+
* the `box-shadow` differs. `"reference"` is for a reference-column
|
|
40
|
+
* header's tooltip (icon + the referenced type's name); every other
|
|
41
|
+
* tooltip in crisp is `"plain"`, the default.
|
|
42
|
+
*/
|
|
43
|
+
variant?: "plain" | "reference";
|
|
36
44
|
};
|
|
37
45
|
/**
|
|
38
46
|
* A hover/focus tooltip — a dark hint chip measured live. Wraps its
|
|
@@ -85,4 +93,12 @@ export declare const Tooltip: React.ForwardRefExoticComponent<Omit<Omit<React.De
|
|
|
85
93
|
* `ContextMenu`'s.
|
|
86
94
|
*/
|
|
87
95
|
asChild?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Which of Attio's two measured tooltip shadows to use (crisp#580) —
|
|
98
|
+
* background/colour/radius/padding/font are identical between them, only
|
|
99
|
+
* the `box-shadow` differs. `"reference"` is for a reference-column
|
|
100
|
+
* header's tooltip (icon + the referenced type's name); every other
|
|
101
|
+
* tooltip in crisp is `"plain"`, the default.
|
|
102
|
+
*/
|
|
103
|
+
variant?: "plain" | "reference";
|
|
88
104
|
} & React.RefAttributes<HTMLElement>>;
|
|
@@ -23,9 +23,37 @@ declare const spec: {
|
|
|
23
23
|
readonly decls: {
|
|
24
24
|
readonly opacity: 0;
|
|
25
25
|
};
|
|
26
|
+
}, {
|
|
27
|
+
readonly selector: "& .crisp-tooltip-reference-row";
|
|
28
|
+
readonly decls: {
|
|
29
|
+
readonly display: "inline-flex";
|
|
30
|
+
readonly alignItems: "center";
|
|
31
|
+
readonly gap: `var(--${string})`;
|
|
32
|
+
};
|
|
26
33
|
}];
|
|
34
|
+
readonly variants: {
|
|
35
|
+
readonly variant: {
|
|
36
|
+
readonly plain: {};
|
|
37
|
+
readonly reference: {
|
|
38
|
+
readonly boxShadow: "rgba(0,0,0,0) 0 0 0 1px inset, rgba(28,40,64,0.18) 0 0 2px 0, rgba(0,0,0,0.04) 0 1px 3px 0";
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
readonly defaultVariants: {
|
|
43
|
+
readonly variant: "plain";
|
|
44
|
+
};
|
|
27
45
|
};
|
|
28
|
-
declare const config: import("../..").RecipeConfig<
|
|
29
|
-
|
|
46
|
+
declare const config: import("../..").RecipeConfig<{
|
|
47
|
+
readonly variant: {
|
|
48
|
+
readonly plain: string;
|
|
49
|
+
readonly reference: string;
|
|
50
|
+
};
|
|
51
|
+
}>;
|
|
52
|
+
export declare const tooltipRecipe: import("../..").RecipeFn<{
|
|
53
|
+
readonly variant: {
|
|
54
|
+
readonly plain: string;
|
|
55
|
+
readonly reference: string;
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
30
58
|
export { spec };
|
|
31
59
|
export default config;
|
|
@@ -8,7 +8,10 @@ export type AuthShellProps = Omit<React.ComponentPropsWithoutRef<"div">, "title"
|
|
|
8
8
|
title?: React.ReactNode;
|
|
9
9
|
/** The form / body content. */
|
|
10
10
|
children: React.ReactNode;
|
|
11
|
-
/** Right-hand product preview. Hidden under 1200px; omit for a single-pane
|
|
11
|
+
/** Right-hand product preview. Hidden under 1200px; omit for a single-pane
|
|
12
|
+
* layout — no card chrome (border/shadow/fixed height), a narrower
|
|
13
|
+
* 360px content column, and the whole shell vertically centred, matching
|
|
14
|
+
* the real single-pane sign-in screen (crisp#653). */
|
|
12
15
|
preview?: React.ReactNode;
|
|
13
16
|
/** Legal / support links under the card. */
|
|
14
17
|
footer?: React.ReactNode;
|
|
@@ -144,7 +144,6 @@ export type CommentsPanelProps = Omit<React.ComponentPropsWithoutRef<"div">, "ch
|
|
|
144
144
|
deleteConfirmBody?: string;
|
|
145
145
|
deleteConfirmActionLabel?: string;
|
|
146
146
|
cancelLabel?: string;
|
|
147
|
-
composerReplyToolLabel?: string;
|
|
148
147
|
composerMentionToolLabel?: string;
|
|
149
148
|
className?: string;
|
|
150
149
|
};
|
|
@@ -157,7 +156,7 @@ export type CommentsPanelProps = Omit<React.ComponentPropsWithoutRef<"div">, "ch
|
|
|
157
156
|
* separate row affordance (P-051) — deliberately NOT part of this
|
|
158
157
|
* component, since it lives in a table cell this component doesn't own.
|
|
159
158
|
*/
|
|
160
|
-
export declare function CommentsPanel({ threads, currentUserId, subject, subjectIcon, showResolved, onShowResolvedChange, onlyMine, onOnlyMineChange, activeThreadId: activeThreadIdProp, onActiveThreadChange, onPost, onReact, onResolve, onDelete, onCopyLink, emojiOptions, mentionTrigger, renderMentionPicker, onClose, closeLabel: closeLabelProp, backLabel: backLabelProp, title: titleProp, threadTitle: threadTitleProp, breadcrumbPrefix: breadcrumbPrefixProp, composerPlaceholder: composerPlaceholderProp, replyPlaceholder: replyPlaceholderProp, postLabel: postLabelProp, replyPostLabel: replyPostLabelProp, emptyLabel, filterLabel: filterLabelProp, showResolvedLabel: showResolvedLabelProp, onlyMineLabel: onlyMineLabelProp, replyActionLabel: replyActionLabelProp, reactActionLabel: reactActionLabelProp, resolveActionLabel: resolveActionLabelProp, resolvedByYouLabel: resolvedByYouLabelProp, resolvedByLabel, moreActionsLabel: moreActionsLabelProp, copyLinkLabel: copyLinkLabelProp, deleteLabel: deleteLabelProp, addReactionLabel: addReactionLabelProp, reactionSearchLabel: reactionSearchLabelProp, deleteConfirmTitle: deleteConfirmTitleProp, deleteConfirmBody: deleteConfirmBodyProp, deleteConfirmActionLabel: deleteConfirmActionLabelProp, cancelLabel: cancelLabelProp,
|
|
159
|
+
export declare function CommentsPanel({ threads, currentUserId, subject, subjectIcon, showResolved, onShowResolvedChange, onlyMine, onOnlyMineChange, activeThreadId: activeThreadIdProp, onActiveThreadChange, onPost, onReact, onResolve, onDelete, onCopyLink, emojiOptions, mentionTrigger, renderMentionPicker, onClose, closeLabel: closeLabelProp, backLabel: backLabelProp, title: titleProp, threadTitle: threadTitleProp, breadcrumbPrefix: breadcrumbPrefixProp, composerPlaceholder: composerPlaceholderProp, replyPlaceholder: replyPlaceholderProp, postLabel: postLabelProp, replyPostLabel: replyPostLabelProp, emptyLabel, filterLabel: filterLabelProp, showResolvedLabel: showResolvedLabelProp, onlyMineLabel: onlyMineLabelProp, replyActionLabel: replyActionLabelProp, reactActionLabel: reactActionLabelProp, resolveActionLabel: resolveActionLabelProp, resolvedByYouLabel: resolvedByYouLabelProp, resolvedByLabel, moreActionsLabel: moreActionsLabelProp, copyLinkLabel: copyLinkLabelProp, deleteLabel: deleteLabelProp, addReactionLabel: addReactionLabelProp, reactionSearchLabel: reactionSearchLabelProp, deleteConfirmTitle: deleteConfirmTitleProp, deleteConfirmBody: deleteConfirmBodyProp, deleteConfirmActionLabel: deleteConfirmActionLabelProp, cancelLabel: cancelLabelProp, composerMentionToolLabel: composerMentionToolLabelProp, className, ...rest }: CommentsPanelProps): React.JSX.Element;
|
|
161
160
|
export declare namespace CommentsPanel {
|
|
162
161
|
var displayName: string;
|
|
163
162
|
}
|
|
@@ -28,6 +28,18 @@ export type Column = {
|
|
|
28
28
|
* enriched values are washed (#9b69ff at 4%). */
|
|
29
29
|
enriched?: boolean;
|
|
30
30
|
icon?: IconType;
|
|
31
|
+
/** This column's values reference another type of record (e.g. a
|
|
32
|
+
* "Primary location" column of Country records). When the header
|
|
33
|
+
* overflows, its `Tooltip` appends this type's icon and name after the
|
|
34
|
+
* label and switches to Attio's second, reference-column tooltip chrome
|
|
35
|
+
* (crisp#580) — distinct from `icon` above (the column's own field-type
|
|
36
|
+
* glyph shown in the header row) and from `refOptions` (the picker's
|
|
37
|
+
* selectable values). Omit for a plain column; the tooltip stays
|
|
38
|
+
* label-only (#534). */
|
|
39
|
+
referencedType?: {
|
|
40
|
+
icon: IconType;
|
|
41
|
+
label: string;
|
|
42
|
+
};
|
|
31
43
|
width?: number;
|
|
32
44
|
/** Currency symbol for `currency` columns (default "$"). */
|
|
33
45
|
symbol?: string;
|