@crisp-ui-kit/crisp 0.57.1 → 0.57.2
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 +9 -4
- package/dist/authshell.layered.css +9 -4
- package/dist/badge.css +3 -3
- package/dist/badge.layered.css +3 -3
- package/dist/board.css +28 -8
- package/dist/board.layered.css +28 -8
- package/dist/bottomsheet.css +26 -0
- package/dist/bottomsheet.d.ts +7 -0
- package/dist/bottomsheet.layered.css +28 -0
- package/dist/button.css +7 -6
- package/dist/button.layered.css +7 -6
- package/dist/checkbox.css +7 -3
- package/dist/checkbox.layered.css +7 -3
- package/dist/chip.css +15 -0
- package/dist/chip.d.ts +3 -1
- package/dist/chip.layered.css +15 -0
- package/dist/chipgroup.css +5 -0
- package/dist/chipgroup.d.ts +7 -0
- package/dist/chipgroup.layered.css +7 -0
- package/dist/cjs/components/badge/badge.recipe.js +22 -8
- package/dist/cjs/components/bottomsheet/bottomsheet.js +90 -0
- package/dist/cjs/components/bottomsheet/bottomsheet.recipe.js +77 -0
- package/dist/cjs/components/bottomsheet/index.js +9 -0
- package/dist/cjs/components/button/button.recipe.js +39 -15
- package/dist/cjs/components/checkbox/checkbox.recipe.js +61 -9
- package/dist/cjs/components/chip/chip.js +14 -2
- package/dist/cjs/components/chip/chip.recipe.js +69 -1
- package/dist/cjs/components/chipgroup/chipgroup.js +51 -0
- package/dist/cjs/components/chipgroup/chipgroup.recipe.js +36 -0
- package/dist/cjs/components/chipgroup/index.js +7 -0
- package/dist/cjs/components/datatable/datatable.js +5 -1
- package/dist/cjs/components/datatable/datatable.recipe.js +11 -2
- package/dist/cjs/components/dialog/dialog.recipe.js +21 -10
- package/dist/cjs/components/emptystate/emptystate.recipe.js +7 -2
- package/dist/cjs/components/fileupload/fileupload.js +21 -4
- package/dist/cjs/components/input/index.js +2 -1
- package/dist/cjs/components/input/input.js +31 -1
- package/dist/cjs/components/input/input.recipe.js +16 -9
- package/dist/cjs/components/menu/menu.recipe.js +21 -7
- package/dist/cjs/components/menusheet/index.js +9 -0
- package/dist/cjs/components/menusheet/menusheet.js +133 -0
- package/dist/cjs/components/menusheet/menusheet.recipe.js +103 -0
- package/dist/cjs/components/multiselect/multiselect.js +1 -1
- package/dist/cjs/components/multiselect/multiselect.recipe.js +33 -9
- package/dist/cjs/components/select/select.js +1 -1
- package/dist/cjs/components/select/select.recipe.js +38 -12
- package/dist/cjs/components/snackbar/index.js +8 -0
- package/dist/cjs/components/snackbar/snackbar.js +121 -0
- package/dist/cjs/components/snackbar/snackbar.recipe.js +71 -0
- package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +7 -2
- package/dist/cjs/components/tabletoolbar/tabletoolbar.js +37 -12
- package/dist/cjs/components/tabs/tabs.js +10 -4
- package/dist/cjs/components/tabs/tabs.recipe.js +23 -6
- package/dist/cjs/components/textarea/textarea.recipe.js +11 -8
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/product/authshell/authshell.recipe.js +5 -1
- package/dist/cjs/product/command/command.recipe.js +4 -1
- package/dist/cjs/product/comments/comments.js +7 -2
- package/dist/cjs/product/comments/comments.recipe.js +25 -7
- package/dist/cjs/product/memberssettings/index.js +6 -0
- package/dist/cjs/product/memberssettings/memberssettings.js +99 -0
- package/dist/cjs/product/memberssettings/memberssettings.recipe.js +83 -0
- package/dist/cjs/product/notificationssettings/index.js +5 -0
- package/dist/cjs/product/notificationssettings/notificationssettings.js +19 -0
- package/dist/cjs/product/notificationssettings/notificationssettings.recipe.js +44 -0
- package/dist/cjs/product/recordpage/recordpage.js +57 -6
- package/dist/cjs/product/recordpage/recordpage.recipe.js +43 -6
- package/dist/cjs/product/workspacegeneralsettings/index.js +5 -0
- package/dist/cjs/product/workspacegeneralsettings/workspacegeneralsettings.js +21 -0
- package/dist/cjs/product/workspacegeneralsettings/workspacegeneralsettings.recipe.js +51 -0
- package/dist/cjs/tokens/contract.js +1 -0
- package/dist/cjs/tokens/elevation.js +8 -5
- package/dist/cjs/tokens/palette.js +28 -8
- package/dist/cjs/tokens/scale.js +44 -2
- package/dist/cjs/tokens/semantic.js +2 -0
- package/dist/columncalc.css +15 -7
- package/dist/columncalc.layered.css +15 -7
- package/dist/command.css +23 -19
- package/dist/command.layered.css +23 -19
- package/dist/comments.css +28 -19
- package/dist/comments.d.ts +2 -2
- package/dist/comments.layered.css +28 -19
- package/dist/datatable.css +161 -67
- package/dist/datatable.layered.css +161 -67
- package/dist/datepicker.css +13 -41
- package/dist/datepicker.layered.css +13 -41
- package/dist/datepickerfield.css +4 -1
- package/dist/datepickerfield.layered.css +4 -1
- package/dist/dialog.css +12 -7
- package/dist/dialog.layered.css +12 -7
- package/dist/emptystate.css +5 -3
- package/dist/emptystate.layered.css +5 -3
- package/dist/esm/components/badge/badge.recipe.js +22 -8
- package/dist/esm/components/bottomsheet/bottomsheet.js +52 -0
- package/dist/esm/components/bottomsheet/bottomsheet.recipe.js +74 -0
- package/dist/esm/components/bottomsheet/index.js +2 -0
- package/dist/esm/components/button/button.recipe.js +40 -16
- package/dist/esm/components/checkbox/checkbox.recipe.js +61 -9
- package/dist/esm/components/chip/chip.js +14 -2
- package/dist/esm/components/chip/chip.recipe.js +69 -1
- package/dist/esm/components/chipgroup/chipgroup.js +15 -0
- package/dist/esm/components/chipgroup/chipgroup.recipe.js +33 -0
- package/dist/esm/components/chipgroup/index.js +2 -0
- package/dist/esm/components/datatable/datatable.js +5 -1
- package/dist/esm/components/datatable/datatable.recipe.js +11 -2
- package/dist/esm/components/dialog/dialog.recipe.js +22 -11
- package/dist/esm/components/emptystate/emptystate.recipe.js +7 -2
- package/dist/esm/components/fileupload/fileupload.js +20 -5
- package/dist/esm/components/input/index.js +1 -1
- package/dist/esm/components/input/input.js +30 -0
- package/dist/esm/components/input/input.recipe.js +17 -10
- package/dist/esm/components/menu/menu.recipe.js +21 -7
- package/dist/esm/components/menusheet/index.js +2 -0
- package/dist/esm/components/menusheet/menusheet.js +95 -0
- package/dist/esm/components/menusheet/menusheet.recipe.js +100 -0
- package/dist/esm/components/multiselect/multiselect.js +1 -1
- package/dist/esm/components/multiselect/multiselect.recipe.js +33 -9
- package/dist/esm/components/select/select.js +1 -1
- package/dist/esm/components/select/select.recipe.js +38 -12
- package/dist/esm/components/snackbar/index.js +2 -0
- package/dist/esm/components/snackbar/snackbar.js +84 -0
- package/dist/esm/components/snackbar/snackbar.recipe.js +68 -0
- package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +7 -2
- package/dist/esm/components/tabletoolbar/tabletoolbar.js +37 -12
- package/dist/esm/components/tabs/tabs.js +10 -4
- package/dist/esm/components/tabs/tabs.recipe.js +23 -6
- package/dist/esm/components/textarea/textarea.recipe.js +12 -9
- package/dist/esm/index.js +7 -0
- package/dist/esm/product/authshell/authshell.recipe.js +5 -1
- package/dist/esm/product/command/command.recipe.js +4 -1
- package/dist/esm/product/comments/comments.js +7 -2
- package/dist/esm/product/comments/comments.recipe.js +25 -7
- package/dist/esm/product/memberssettings/index.js +1 -0
- package/dist/esm/product/memberssettings/memberssettings.js +62 -0
- package/dist/esm/product/memberssettings/memberssettings.recipe.js +80 -0
- package/dist/esm/product/notificationssettings/index.js +1 -0
- package/dist/esm/product/notificationssettings/notificationssettings.js +16 -0
- package/dist/esm/product/notificationssettings/notificationssettings.recipe.js +41 -0
- package/dist/esm/product/recordpage/recordpage.js +58 -7
- package/dist/esm/product/recordpage/recordpage.recipe.js +43 -6
- package/dist/esm/product/workspacegeneralsettings/index.js +1 -0
- package/dist/esm/product/workspacegeneralsettings/workspacegeneralsettings.js +18 -0
- package/dist/esm/product/workspacegeneralsettings/workspacegeneralsettings.recipe.js +48 -0
- package/dist/esm/tokens/contract.js +2 -1
- package/dist/esm/tokens/elevation.js +8 -5
- package/dist/esm/tokens/palette.js +28 -8
- package/dist/esm/tokens/scale.js +43 -1
- package/dist/esm/tokens/semantic.js +2 -0
- package/dist/fileupload.css +3 -1
- package/dist/fileupload.layered.css +3 -1
- package/dist/input.css +6 -4
- package/dist/input.layered.css +6 -4
- package/dist/listpage.css +3 -1
- package/dist/listpage.layered.css +3 -1
- package/dist/memberssettings.css +67 -0
- package/dist/memberssettings.d.ts +7 -0
- package/dist/memberssettings.layered.css +69 -0
- package/dist/menu.css +2 -2
- package/dist/menu.layered.css +2 -2
- package/dist/menusheet.css +36 -0
- package/dist/menusheet.d.ts +7 -0
- package/dist/menusheet.layered.css +38 -0
- package/dist/multiselect.css +13 -6
- package/dist/multiselect.layered.css +13 -6
- package/dist/native/tokens.d.ts +2 -1
- package/dist/native/tokens.js +20 -3
- package/dist/notificationssettings.css +22 -0
- package/dist/notificationssettings.d.ts +7 -0
- package/dist/notificationssettings.layered.css +24 -0
- package/dist/objectsettings.css +4 -4
- package/dist/objectsettings.layered.css +4 -4
- package/dist/recordpage.css +67 -23
- package/dist/recordpage.layered.css +67 -23
- package/dist/recordpanel.css +35 -16
- package/dist/recordpanel.layered.css +35 -16
- package/dist/resizablepanel.css +8 -5
- package/dist/resizablepanel.layered.css +8 -5
- package/dist/richtext.css +24 -8
- package/dist/richtext.layered.css +24 -8
- package/dist/savedviews.css +9 -2
- package/dist/savedviews.layered.css +9 -2
- package/dist/select.css +25 -5
- package/dist/select.layered.css +25 -5
- package/dist/settingsshell.css +2 -3
- package/dist/settingsshell.layered.css +2 -3
- package/dist/slider.css +6 -27
- package/dist/slider.layered.css +6 -27
- package/dist/snackbar.css +24 -0
- package/dist/snackbar.d.ts +7 -0
- package/dist/snackbar.layered.css +26 -0
- package/dist/statcard.css +3 -1
- package/dist/statcard.layered.css +3 -1
- package/dist/styles.css +859 -345
- package/dist/styles.layered.css +859 -345
- package/dist/table.css +28 -10
- package/dist/table.layered.css +28 -10
- package/dist/tabletoolbar.css +35 -24
- package/dist/tabletoolbar.layered.css +35 -24
- package/dist/tabs.css +18 -4
- package/dist/tabs.layered.css +18 -4
- package/dist/textarea.css +2 -6
- package/dist/textarea.layered.css +2 -6
- package/dist/themepicker.css +2 -1
- package/dist/themepicker.layered.css +2 -1
- package/dist/tokens.css +13 -2
- package/dist/tokens.json +20 -3
- package/dist/types/components/bottomsheet/bottomsheet.d.ts +35 -0
- package/dist/types/components/bottomsheet/bottomsheet.recipe.d.ts +3 -0
- package/dist/types/components/bottomsheet/index.d.ts +2 -0
- package/dist/types/components/button/button.recipe.d.ts +11 -6
- package/dist/types/components/checkbox/checkbox.recipe.d.ts +28 -5
- package/dist/types/components/chip/chip.d.ts +22 -0
- package/dist/types/components/chip/chip.recipe.d.ts +48 -0
- package/dist/types/components/chipgroup/chipgroup.d.ts +14 -0
- package/dist/types/components/chipgroup/chipgroup.recipe.d.ts +5 -0
- package/dist/types/components/chipgroup/index.d.ts +2 -0
- package/dist/types/components/datatable/datatable.d.ts +19 -0
- package/dist/types/components/fileupload/fileupload.d.ts +26 -0
- package/dist/types/components/input/index.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +72 -0
- package/dist/types/components/menusheet/index.d.ts +2 -0
- package/dist/types/components/menusheet/menusheet.d.ts +42 -0
- package/dist/types/components/menusheet/menusheet.recipe.d.ts +3 -0
- package/dist/types/components/snackbar/index.d.ts +2 -0
- package/dist/types/components/snackbar/snackbar.d.ts +36 -0
- package/dist/types/components/snackbar/snackbar.recipe.d.ts +5 -0
- package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +28 -1
- package/dist/types/components/tabs/tabs.d.ts +11 -1
- package/dist/types/index.d.ts +7 -0
- package/dist/types/product/comments/comments.d.ts +9 -3
- package/dist/types/product/comments/comments.recipe.d.ts +12 -2
- package/dist/types/product/memberssettings/index.d.ts +1 -0
- package/dist/types/product/memberssettings/memberssettings.d.ts +85 -0
- package/dist/types/product/memberssettings/memberssettings.recipe.d.ts +3 -0
- package/dist/types/product/notificationssettings/index.d.ts +1 -0
- package/dist/types/product/notificationssettings/notificationssettings.d.ts +37 -0
- package/dist/types/product/notificationssettings/notificationssettings.recipe.d.ts +3 -0
- package/dist/types/product/recordpage/recordpage.d.ts +53 -2
- package/dist/types/product/workspacegeneralsettings/index.d.ts +1 -0
- package/dist/types/product/workspacegeneralsettings/workspacegeneralsettings.d.ts +48 -0
- package/dist/types/product/workspacegeneralsettings/workspacegeneralsettings.recipe.d.ts +3 -0
- package/dist/types/tokens/contract.d.ts +4 -1
- package/dist/types/tokens/elevation.d.ts +8 -5
- package/dist/types/tokens/palette.d.ts +9 -1
- package/dist/types/tokens/scale.d.ts +11 -1
- package/dist/types/tokens/semantic.d.ts +2 -0
- package/dist/wheelpicker.css +4 -2
- package/dist/wheelpicker.layered.css +4 -2
- package/dist/workspacegeneralsettings.css +30 -0
- package/dist/workspacegeneralsettings.d.ts +7 -0
- package/dist/workspacegeneralsettings.layered.css +32 -0
- package/package.json +36 -1
package/dist/tokens.json
CHANGED
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
"ringSwitch": "#d9dade",
|
|
20
20
|
"bgTileActive": "#ffffff",
|
|
21
21
|
"shadowTileActive": "rgba(0,0,0,0.04)",
|
|
22
|
-
"bgScrim": "rgba(0,0,0,0.
|
|
22
|
+
"bgScrim": "rgba(0,0,0,0.45)",
|
|
23
|
+
"bgOverlayStrong": "#00000074",
|
|
24
|
+
"strokeGroupDivider": "#00000010",
|
|
23
25
|
"fgAlertDescription": "rgba(0,0,0,0.63)",
|
|
24
26
|
"bgOverlayFrost": "#ffffff",
|
|
25
27
|
"shadowOverlay1": "rgba(28,40,64,0.12)",
|
|
@@ -90,6 +92,8 @@
|
|
|
90
92
|
"bgTileActive": "#101112",
|
|
91
93
|
"shadowTileActive": "rgba(0,0,0,0)",
|
|
92
94
|
"bgScrim": "rgba(0,0,0,0.55)",
|
|
95
|
+
"bgOverlayStrong": "#00000074",
|
|
96
|
+
"strokeGroupDivider": "#ffffff17",
|
|
93
97
|
"fgAlertDescription": "rgba(255,255,255,0.6)",
|
|
94
98
|
"bgOverlayFrost": "#1c1d1f",
|
|
95
99
|
"shadowOverlay1": "rgba(0,0,0,0.48)",
|
|
@@ -158,7 +162,9 @@
|
|
|
158
162
|
"ringBrandSoft": "#d6e5ff",
|
|
159
163
|
"tileActive": "#ffffff",
|
|
160
164
|
"tileActiveShadow": "rgba(0,0,0,0.04)",
|
|
161
|
-
"bgScrim": "rgba(0,0,0,0.
|
|
165
|
+
"bgScrim": "rgba(0,0,0,0.45)",
|
|
166
|
+
"bgOverlayStrong": "#00000074",
|
|
167
|
+
"strokeGroupDivider": "#00000010",
|
|
162
168
|
"fgAlertDescription": "rgba(0,0,0,0.63)",
|
|
163
169
|
"overlayFrost": "#ffffff",
|
|
164
170
|
"shadowOverlay1": "rgba(28,40,64,0.12)",
|
|
@@ -225,6 +231,8 @@
|
|
|
225
231
|
"tileActive": "#101112",
|
|
226
232
|
"tileActiveShadow": "rgba(0,0,0,0)",
|
|
227
233
|
"bgScrim": "rgba(0,0,0,0.55)",
|
|
234
|
+
"bgOverlayStrong": "#00000074",
|
|
235
|
+
"strokeGroupDivider": "#ffffff17",
|
|
228
236
|
"fgAlertDescription": "rgba(255,255,255,0.6)",
|
|
229
237
|
"overlayFrost": "#1c1d1f",
|
|
230
238
|
"shadowOverlay1": "rgba(0,0,0,0.48)",
|
|
@@ -291,13 +299,14 @@
|
|
|
291
299
|
},
|
|
292
300
|
"radius": {
|
|
293
301
|
"xs": 4,
|
|
294
|
-
"chip":
|
|
302
|
+
"chip": 999,
|
|
295
303
|
"sm": 6,
|
|
296
304
|
"md": 8,
|
|
297
305
|
"lg": 9,
|
|
298
306
|
"xl": 12,
|
|
299
307
|
"2xl": 16,
|
|
300
308
|
"3xl": 20,
|
|
309
|
+
"4xl": 24,
|
|
301
310
|
"full": 999
|
|
302
311
|
},
|
|
303
312
|
"size": {
|
|
@@ -321,6 +330,14 @@
|
|
|
321
330
|
"lg": 14,
|
|
322
331
|
"xl": 16
|
|
323
332
|
},
|
|
333
|
+
"tracking": {
|
|
334
|
+
"18": -0.36,
|
|
335
|
+
"20": -0.4,
|
|
336
|
+
"24": -0.48,
|
|
337
|
+
"26": -0.52,
|
|
338
|
+
"28": -0.56,
|
|
339
|
+
"32": -0.64
|
|
340
|
+
},
|
|
324
341
|
"font": {
|
|
325
342
|
"sans": "\"VK Sans Display\", \"Inter\", system-ui, -apple-system, \"Segoe UI\", sans-serif"
|
|
326
343
|
},
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Root props land on the SHEET SURFACE — the element carrying `role="dialog"`
|
|
4
|
+
* — same reasoning as Dialog/Drawer (#223).
|
|
5
|
+
*/
|
|
6
|
+
export type BottomSheetProps = Omit<React.ComponentPropsWithoutRef<"div">, "title" | "children"> & {
|
|
7
|
+
open: boolean;
|
|
8
|
+
onOpenChange: (open: boolean) => void;
|
|
9
|
+
title?: React.ReactNode;
|
|
10
|
+
description?: React.ReactNode;
|
|
11
|
+
/** Title alignment (default "left"). seed's own two header layouts. */
|
|
12
|
+
headerAlign?: "left" | "center";
|
|
13
|
+
/** Show the corner close button (default true when `title` is set). */
|
|
14
|
+
showCloseButton?: boolean;
|
|
15
|
+
"aria-label"?: string;
|
|
16
|
+
/** aria-label on the close button (default "Close"). */
|
|
17
|
+
closeLabel?: string;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A mobile bottom sheet — composes Zag's dialog machine (focus trap, scroll
|
|
22
|
+
* lock, Escape / outside-click dismissal) with a panel that slides up from
|
|
23
|
+
* the bottom edge. Compose the body with `BottomSheetBody` and actions with
|
|
24
|
+
* `BottomSheetFooter`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function BottomSheet({ open, onOpenChange, title, description, headerAlign, showCloseButton, "aria-label": ariaLabel, closeLabel: closeLabelProp, children, className, "aria-describedby": describedBy, ...rest }: BottomSheetProps): React.JSX.Element | null;
|
|
27
|
+
export declare namespace BottomSheet {
|
|
28
|
+
var displayName: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function BottomSheetBody({ children }: {
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
}): React.JSX.Element;
|
|
33
|
+
export declare function BottomSheetFooter({ children, }: {
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
}): React.JSX.Element;
|
|
@@ -20,6 +20,11 @@ declare const spec: {
|
|
|
20
20
|
readonly opacity: 0.5;
|
|
21
21
|
readonly cursor: "not-allowed";
|
|
22
22
|
};
|
|
23
|
+
}, {
|
|
24
|
+
readonly selector: "&:active";
|
|
25
|
+
readonly decls: {
|
|
26
|
+
readonly transform: "scale(0.98)";
|
|
27
|
+
};
|
|
23
28
|
}];
|
|
24
29
|
readonly variants: {
|
|
25
30
|
readonly intent: {
|
|
@@ -27,7 +32,7 @@ declare const spec: {
|
|
|
27
32
|
readonly decls: {
|
|
28
33
|
readonly background: `var(--${string})`;
|
|
29
34
|
readonly color: `var(--${string})`;
|
|
30
|
-
readonly boxShadow: "
|
|
35
|
+
readonly boxShadow: "none";
|
|
31
36
|
};
|
|
32
37
|
readonly parts: [{
|
|
33
38
|
readonly selector: "&:hover";
|
|
@@ -43,9 +48,9 @@ declare const spec: {
|
|
|
43
48
|
};
|
|
44
49
|
readonly neutral: {
|
|
45
50
|
readonly decls: {
|
|
46
|
-
background: `var(--${string})`;
|
|
47
|
-
color: `var(--${string})`;
|
|
48
|
-
boxShadow:
|
|
51
|
+
readonly background: `var(--${string})`;
|
|
52
|
+
readonly color: `var(--${string})`;
|
|
53
|
+
readonly boxShadow: "none";
|
|
49
54
|
};
|
|
50
55
|
readonly parts: [{
|
|
51
56
|
readonly selector: "&:hover";
|
|
@@ -58,7 +63,7 @@ declare const spec: {
|
|
|
58
63
|
readonly decls: {
|
|
59
64
|
readonly background: `var(--${string})`;
|
|
60
65
|
readonly color: `var(--${string})`;
|
|
61
|
-
readonly boxShadow: "
|
|
66
|
+
readonly boxShadow: "none";
|
|
62
67
|
};
|
|
63
68
|
readonly parts: [{
|
|
64
69
|
readonly selector: "&:hover";
|
|
@@ -117,7 +122,7 @@ declare const spec: {
|
|
|
117
122
|
readonly height: "40px";
|
|
118
123
|
readonly paddingInline: "14px";
|
|
119
124
|
readonly fontSize: `var(--${string})`;
|
|
120
|
-
readonly borderRadius:
|
|
125
|
+
readonly borderRadius: `var(--${string})`;
|
|
121
126
|
};
|
|
122
127
|
};
|
|
123
128
|
readonly shape: {
|
|
@@ -8,23 +8,22 @@ declare const spec: {
|
|
|
8
8
|
readonly margin: 0;
|
|
9
9
|
readonly width: "16px";
|
|
10
10
|
readonly height: "16px";
|
|
11
|
-
readonly border:
|
|
11
|
+
readonly border: `1px solid var(--${string})`;
|
|
12
12
|
readonly borderRadius: `var(--${string})`;
|
|
13
13
|
readonly background: `var(--${string})`;
|
|
14
|
-
readonly boxShadow: `inset 0 0 0 1px color-mix(in srgb, var(--${string}) 9%, transparent)`;
|
|
15
14
|
readonly cursor: "pointer";
|
|
16
|
-
readonly transition: "background-color .12s,
|
|
15
|
+
readonly transition: "background-color .12s, border-color .12s";
|
|
17
16
|
};
|
|
18
17
|
readonly parts: [{
|
|
19
18
|
readonly selector: "&:hover";
|
|
20
19
|
readonly decls: {
|
|
21
|
-
readonly
|
|
20
|
+
readonly borderColor: `color-mix(in srgb, var(--${string}) 30%, transparent)`;
|
|
22
21
|
};
|
|
23
22
|
}, {
|
|
24
23
|
readonly selector: "&:checked, &:indeterminate";
|
|
25
24
|
readonly decls: {
|
|
26
25
|
readonly background: `var(--${string}) center / 10px no-repeat`;
|
|
27
|
-
readonly
|
|
26
|
+
readonly borderColor: "transparent";
|
|
28
27
|
};
|
|
29
28
|
}, {
|
|
30
29
|
readonly selector: "&:checked";
|
|
@@ -43,6 +42,30 @@ declare const spec: {
|
|
|
43
42
|
readonly outline: `2px solid var(--${string})`;
|
|
44
43
|
readonly outlineOffset: "1px";
|
|
45
44
|
};
|
|
45
|
+
}, {
|
|
46
|
+
readonly selector: "&:disabled";
|
|
47
|
+
readonly decls: {
|
|
48
|
+
readonly background: `var(--${string})`;
|
|
49
|
+
readonly borderColor: `var(--${string})`;
|
|
50
|
+
readonly cursor: "not-allowed";
|
|
51
|
+
};
|
|
52
|
+
}, {
|
|
53
|
+
readonly selector: "&:checked:disabled, &:indeterminate:disabled";
|
|
54
|
+
readonly decls: {
|
|
55
|
+
readonly background: `var(--${string}) center / 10px no-repeat`;
|
|
56
|
+
readonly borderColor: `var(--${string})`;
|
|
57
|
+
};
|
|
58
|
+
}, {
|
|
59
|
+
readonly selector: "&:checked:disabled";
|
|
60
|
+
readonly decls: {
|
|
61
|
+
backgroundImage: "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.5 5 9l4.5-5'/%3E%3C/svg%3E\")";
|
|
62
|
+
};
|
|
63
|
+
}, {
|
|
64
|
+
readonly selector: "&:indeterminate:disabled";
|
|
65
|
+
readonly decls: {
|
|
66
|
+
readonly backgroundImage: `linear-gradient(var(--${string}), var(--${string}))`;
|
|
67
|
+
readonly backgroundSize: "8px 2px";
|
|
68
|
+
};
|
|
46
69
|
}];
|
|
47
70
|
};
|
|
48
71
|
declare const config: import("../..").RecipeConfig<Record<string, Record<string, string>>>;
|
|
@@ -29,6 +29,12 @@ export type ChipProps = React.ComponentPropsWithoutRef<"span"> & VariantProps<ty
|
|
|
29
29
|
* an inline ×) — so `Chip` has no `onRemove`/remove button yet. Add one once
|
|
30
30
|
* that surface can be measured; don't guess the icon, its hit target, or its
|
|
31
31
|
* spacing from the label.
|
|
32
|
+
*
|
|
33
|
+
* `appearance` (`"filled"` default | `"outline"`) and `selected` separate
|
|
34
|
+
* three visual roles crisp/#907's study found conflated: a filled chip reads
|
|
35
|
+
* as a status/value (not clickable), an outline chip reads as actionable (a
|
|
36
|
+
* tag or filter you can tap), and `selected` overrides either to a dark fill
|
|
37
|
+
* once tapped — see `chip.recipe.ts` for the structural reference.
|
|
32
38
|
*/
|
|
33
39
|
export declare const Chip: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & VariantProps<import("../..").RecipeFn<{
|
|
34
40
|
readonly truncate: {
|
|
@@ -45,6 +51,14 @@ export declare const Chip: React.ForwardRefExoticComponent<Omit<React.DetailedHT
|
|
|
45
51
|
readonly cyan: string;
|
|
46
52
|
readonly orange: string;
|
|
47
53
|
};
|
|
54
|
+
readonly appearance: {
|
|
55
|
+
readonly filled: string;
|
|
56
|
+
readonly outline: string;
|
|
57
|
+
};
|
|
58
|
+
readonly selected: {
|
|
59
|
+
readonly true: string;
|
|
60
|
+
readonly false: string;
|
|
61
|
+
};
|
|
48
62
|
}> & {
|
|
49
63
|
config: import("../..").RecipeConfig<{
|
|
50
64
|
readonly truncate: {
|
|
@@ -61,6 +75,14 @@ export declare const Chip: React.ForwardRefExoticComponent<Omit<React.DetailedHT
|
|
|
61
75
|
readonly cyan: string;
|
|
62
76
|
readonly orange: string;
|
|
63
77
|
};
|
|
78
|
+
readonly appearance: {
|
|
79
|
+
readonly filled: string;
|
|
80
|
+
readonly outline: string;
|
|
81
|
+
};
|
|
82
|
+
readonly selected: {
|
|
83
|
+
readonly true: string;
|
|
84
|
+
readonly false: string;
|
|
85
|
+
};
|
|
64
86
|
}>;
|
|
65
87
|
}> & {
|
|
66
88
|
asChild?: boolean;
|
|
@@ -73,10 +73,34 @@ declare const spec: {
|
|
|
73
73
|
boxShadow: string;
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
|
+
readonly appearance: {
|
|
77
|
+
readonly filled: {};
|
|
78
|
+
readonly outline: {
|
|
79
|
+
readonly background: "transparent";
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
readonly selected: {
|
|
83
|
+
readonly true: {
|
|
84
|
+
readonly background: `var(--${string})`;
|
|
85
|
+
readonly color: `var(--${string})`;
|
|
86
|
+
readonly boxShadow: "none";
|
|
87
|
+
};
|
|
88
|
+
readonly false: {};
|
|
89
|
+
};
|
|
76
90
|
};
|
|
91
|
+
readonly compoundVariants: [{
|
|
92
|
+
readonly tone: "neutral";
|
|
93
|
+
readonly appearance: "outline";
|
|
94
|
+
readonly selected: false;
|
|
95
|
+
readonly decls: {
|
|
96
|
+
readonly boxShadow: `inset 0 0 0 1px var(--${string})`;
|
|
97
|
+
};
|
|
98
|
+
}];
|
|
77
99
|
readonly defaultVariants: {
|
|
78
100
|
readonly tone: "neutral";
|
|
79
101
|
readonly truncate: false;
|
|
102
|
+
readonly appearance: "filled";
|
|
103
|
+
readonly selected: false;
|
|
80
104
|
};
|
|
81
105
|
};
|
|
82
106
|
declare const config: import("../..").RecipeConfig<{
|
|
@@ -94,6 +118,14 @@ declare const config: import("../..").RecipeConfig<{
|
|
|
94
118
|
readonly cyan: string;
|
|
95
119
|
readonly orange: string;
|
|
96
120
|
};
|
|
121
|
+
readonly appearance: {
|
|
122
|
+
readonly filled: string;
|
|
123
|
+
readonly outline: string;
|
|
124
|
+
};
|
|
125
|
+
readonly selected: {
|
|
126
|
+
readonly true: string;
|
|
127
|
+
readonly false: string;
|
|
128
|
+
};
|
|
97
129
|
}>;
|
|
98
130
|
export declare const chipRecipe: import("../..").RecipeFn<{
|
|
99
131
|
readonly truncate: {
|
|
@@ -110,6 +142,14 @@ export declare const chipRecipe: import("../..").RecipeFn<{
|
|
|
110
142
|
readonly cyan: string;
|
|
111
143
|
readonly orange: string;
|
|
112
144
|
};
|
|
145
|
+
readonly appearance: {
|
|
146
|
+
readonly filled: string;
|
|
147
|
+
readonly outline: string;
|
|
148
|
+
};
|
|
149
|
+
readonly selected: {
|
|
150
|
+
readonly true: string;
|
|
151
|
+
readonly false: string;
|
|
152
|
+
};
|
|
113
153
|
}> & {
|
|
114
154
|
config: import("../..").RecipeConfig<{
|
|
115
155
|
readonly truncate: {
|
|
@@ -126,6 +166,14 @@ export declare const chipRecipe: import("../..").RecipeFn<{
|
|
|
126
166
|
readonly cyan: string;
|
|
127
167
|
readonly orange: string;
|
|
128
168
|
};
|
|
169
|
+
readonly appearance: {
|
|
170
|
+
readonly filled: string;
|
|
171
|
+
readonly outline: string;
|
|
172
|
+
};
|
|
173
|
+
readonly selected: {
|
|
174
|
+
readonly true: string;
|
|
175
|
+
readonly false: string;
|
|
176
|
+
};
|
|
129
177
|
}>;
|
|
130
178
|
};
|
|
131
179
|
export { spec };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type ChipGroupProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
3
|
+
asChild?: boolean;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* A single-line, horizontally-scrolling row of `Chip`s (or anything else),
|
|
7
|
+
* with scroll-snap — for a filter/status row that would otherwise wrap onto
|
|
8
|
+
* a second line once it runs out of width (crisp#908). Every child snaps to
|
|
9
|
+
* the row's start edge and never shrinks, so scrolling always lands a chip
|
|
10
|
+
* flush against the left edge rather than mid-chip.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ChipGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -267,6 +267,25 @@ export type DataTableColumn<T> = {
|
|
|
267
267
|
* row's own record — that's what `onRowClick` is for. Ignored on any
|
|
268
268
|
* other `type`. */
|
|
269
269
|
onEntityClick?: (row: T) => void;
|
|
270
|
+
/** `type: "entity"` only (#893) — a column-scoped link to the ROW'S OWN
|
|
271
|
+
* record, rendered as a real `<a href>` (matching Attio's own measured
|
|
272
|
+
* markup exactly — its entity cell name is a genuine anchor, confirmed
|
|
273
|
+
* via `outerHTML`, not a button with a click handler). Distinct from
|
|
274
|
+
* `onEntityClick` above (a DIFFERENT record than the row) and from the
|
|
275
|
+
* table-level `onRowClick` (fires for a click on any non-editable cell
|
|
276
|
+
* in the row, not just this column) — a consumer whose other columns
|
|
277
|
+
* select-on-click can't wire `onRowClick` for this without turning every
|
|
278
|
+
* cell in the row into a navigation trigger too. Set at most one of
|
|
279
|
+
* `href`/`onEntityClick` per column; `href` wins if both are given. */
|
|
280
|
+
href?: (row: T) => string;
|
|
281
|
+
/** `type: "entity"` only (#892) — the avatar's corner shape: Attio's own
|
|
282
|
+
* measured default (a company/object logo, `border-radius: 30%`, already
|
|
283
|
+
* `Avatar`'s own `shape="rounded"` value) or `"circle"` (`Avatar`'s own
|
|
284
|
+
* `shape="circle"`, `border-radius: 50%`) for a person entity — measured
|
|
285
|
+
* live on a real Attio People avatar. Naming matches `Avatar`'s own
|
|
286
|
+
* `shape` prop values exactly. Default `"rounded"`, so every existing
|
|
287
|
+
* entity column (Companies-style) is unaffected. */
|
|
288
|
+
avatarShape?: "rounded" | "circle";
|
|
270
289
|
/** `type: "entity"` only (crisp/#601, checklist G-048) — a right-aligned
|
|
271
290
|
* "Open preview" icon that appears on row hover (or keyboard focus),
|
|
272
291
|
* alongside `onOpenComments` below. Matches Attio's own measured pair
|
|
@@ -9,12 +9,38 @@ export type FileUploadLabels = {
|
|
|
9
9
|
errors: Record<string, string>;
|
|
10
10
|
};
|
|
11
11
|
export declare const fileUploadLabels: FileUploadLabels;
|
|
12
|
+
export type FileUploadItemProps = {
|
|
13
|
+
name: string;
|
|
14
|
+
/** Bytes. Omit for a caller with no size to report. */
|
|
15
|
+
size?: number;
|
|
16
|
+
status?: FileEntry["status"];
|
|
17
|
+
/** 0-100. Only drawn while `status === "uploading"`. */
|
|
18
|
+
progress?: number;
|
|
19
|
+
/** Omit to render a non-removable row. */
|
|
20
|
+
onRemove?: () => void;
|
|
21
|
+
/** Required whenever `onRemove` is passed — the remove button's accessible name. */
|
|
22
|
+
removeLabel?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* One row of `FileUpload`'s own accepted-file list (crisp#965) — icon-free
|
|
27
|
+
* name + trailing size + remove, `min-height: size.tableRow` on `bgRaised`
|
|
28
|
+
* (measured from a data-grid row, see `fileupload.recipe.ts`). Exported on
|
|
29
|
+
* its own because `FileUpload` internally only lists `File` objects from the
|
|
30
|
+
* current browser session; a caller with already-persisted attachments
|
|
31
|
+
* (fetched from a server, never a real `File`) has no `acceptedFileEntries`
|
|
32
|
+
* to hand it and needs the identical row for its own list instead of
|
|
33
|
+
* hand-rolling one.
|
|
34
|
+
*/
|
|
35
|
+
export declare function FileUploadItem({ name, size, status, progress, onRemove, removeLabel, className, }: FileUploadItemProps): React.JSX.Element;
|
|
12
36
|
export type FileUploadProps = UseFileUploadProps & Omit<React.ComponentPropsWithoutRef<"div">, keyof UseFileUploadProps | "children"> & {
|
|
13
37
|
/** PARTIAL override of the chrome strings; anything omitted keeps its default. */
|
|
14
38
|
labels?: Partial<Omit<FileUploadLabels, "errors">> & {
|
|
15
39
|
errors?: Record<string, string>;
|
|
16
40
|
};
|
|
17
41
|
};
|
|
42
|
+
/** 1000-based, matching how every file manager reports size. */
|
|
43
|
+
export declare function formatSize(bytes: number): string;
|
|
18
44
|
/**
|
|
19
45
|
* A file dropzone with an accepted-file list, driven by seed-design's headless
|
|
20
46
|
* engine so the behaviour — drag state, accept/reject, per-file upload status —
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Input, type InputProps } from "./input";
|
|
1
|
+
export { Input, type InputProps, InputShell, type InputShellProps, } from "./input";
|
|
2
2
|
export { inputRecipe } from "./input.recipe";
|
|
@@ -43,3 +43,75 @@ export declare const Input: React.ForwardRefExoticComponent<Omit<Omit<React.Deta
|
|
|
43
43
|
*/
|
|
44
44
|
suffix?: React.ReactNode;
|
|
45
45
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
46
|
+
export type InputShellProps = React.ComponentPropsWithoutRef<"div"> & VariantProps<typeof inputRecipe> & {
|
|
47
|
+
/**
|
|
48
|
+
* Tints the shell to match `Input`'s own read-only fill (crisp#634).
|
|
49
|
+
* `Input` derives this from the native `readOnly` attribute already on
|
|
50
|
+
* its `<input>`; `InputShell`'s children aren't necessarily a real
|
|
51
|
+
* form control (a CodeMirror instance, say), so there's no DOM
|
|
52
|
+
* attribute to read it off — an explicit prop instead.
|
|
53
|
+
*/
|
|
54
|
+
readOnly?: boolean;
|
|
55
|
+
suffix?: React.ReactNode;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* crisp#917: the same field chrome `Input` draws (border, focus ring,
|
|
59
|
+
* radius, size, invalid/read-only states) around arbitrary children instead
|
|
60
|
+
* of a hardcoded `<input>` — for a third-party editor (CodeMirror, a
|
|
61
|
+
* rich-text widget, a masked-input library) that needs to mount into a
|
|
62
|
+
* plain element rather than a native `<input>`.
|
|
63
|
+
*
|
|
64
|
+
* Deliberately NOT `asChild` (crisp's usual `Primitive`/`Slot` pattern, used
|
|
65
|
+
* by `Button`/`Chip`/`Avatar`/etc. elsewhere): those merge the shell's own
|
|
66
|
+
* props onto ONE child, replacing it outright — correct when the shell
|
|
67
|
+
* and the interactive surface are the same element. `Input`'s real shape is
|
|
68
|
+
* TWO parts, an outer shell hosting the `::after` focus ring plus an inner
|
|
69
|
+
* value that carries the actual text/interaction; a rich editor mounts its
|
|
70
|
+
* own DOM subtree inside a container div, which is exactly what `children`
|
|
71
|
+
* gives it, not what replacing a single node would.
|
|
72
|
+
*
|
|
73
|
+
* Only draws the OUTER shell (`inputRecipe`'s own class — border, ring,
|
|
74
|
+
* radius, size-driven height, background, `data-readonly` tint) around
|
|
75
|
+
* `children` unchanged, the same granularity GRC's own pre-existing
|
|
76
|
+
* workaround (internal/grc#159, reaching into `.crisp-input`/
|
|
77
|
+
* `.crisp-input--size_medium` by hand) already used — NOT `.crisp-input-
|
|
78
|
+
* value`'s own text-field resets (`border: none`, `padding-inline`, `font:
|
|
79
|
+
* inherit`, …), which assume a real `<input>` and would fight a rich
|
|
80
|
+
* editor's own internal layout. A child that wants to fill the shell the
|
|
81
|
+
* way `Input`'s own `<input>` does should set its own sizing (e.g. `flex: 1
|
|
82
|
+
* 1 auto; min-width: 0; width: 100%; height: 100%`), same as any block
|
|
83
|
+
* content dropped into an `inline-flex` container.
|
|
84
|
+
*/
|
|
85
|
+
export declare const InputShell: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & VariantProps<import("../..").RecipeFn<{
|
|
86
|
+
size: {
|
|
87
|
+
sm: string;
|
|
88
|
+
medium: string;
|
|
89
|
+
large: string;
|
|
90
|
+
};
|
|
91
|
+
invalid: {
|
|
92
|
+
true: string;
|
|
93
|
+
false: string;
|
|
94
|
+
};
|
|
95
|
+
}> & {
|
|
96
|
+
config: import("../..").RecipeConfig<{
|
|
97
|
+
size: {
|
|
98
|
+
sm: string;
|
|
99
|
+
medium: string;
|
|
100
|
+
large: string;
|
|
101
|
+
};
|
|
102
|
+
invalid: {
|
|
103
|
+
true: string;
|
|
104
|
+
false: string;
|
|
105
|
+
};
|
|
106
|
+
}>;
|
|
107
|
+
}> & {
|
|
108
|
+
/**
|
|
109
|
+
* Tints the shell to match `Input`'s own read-only fill (crisp#634).
|
|
110
|
+
* `Input` derives this from the native `readOnly` attribute already on
|
|
111
|
+
* its `<input>`; `InputShell`'s children aren't necessarily a real
|
|
112
|
+
* form control (a CodeMirror instance, say), so there's no DOM
|
|
113
|
+
* attribute to read it off — an explicit prop instead.
|
|
114
|
+
*/
|
|
115
|
+
readOnly?: boolean;
|
|
116
|
+
suffix?: React.ReactNode;
|
|
117
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type MenuSheetProps = Omit<React.ComponentPropsWithoutRef<"div">, "title" | "children"> & {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
footer?: React.ReactNode;
|
|
8
|
+
"aria-label"?: string;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A mobile menu sheet -- a focus-trapped bottom sheet (same Zag dialog
|
|
13
|
+
* machine as BottomSheet) whose body is a role=menu list, with the identical
|
|
14
|
+
* keyboard model Menu already uses: arrow keys move, Home/End jump,
|
|
15
|
+
* typeahead, Enter/Space select, Escape closes. Compose items with
|
|
16
|
+
* MenuSheetItem, and group a run of them in one rounded card with
|
|
17
|
+
* MenuSheetGroup.
|
|
18
|
+
*/
|
|
19
|
+
export declare function MenuSheet({ open, onOpenChange, title, description, footer, "aria-label": ariaLabel, children, className, "aria-describedby": describedBy, ...rest }: MenuSheetProps): React.JSX.Element | null;
|
|
20
|
+
export declare namespace MenuSheet {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function MenuSheetGroup({ children }: {
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
}): React.JSX.Element;
|
|
26
|
+
export declare namespace MenuSheetGroup {
|
|
27
|
+
var displayName: string;
|
|
28
|
+
}
|
|
29
|
+
export type MenuSheetItemProps = {
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
icon?: React.ReactNode;
|
|
32
|
+
description?: React.ReactNode;
|
|
33
|
+
tone?: "neutral" | "critical";
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
onSelect?: () => void;
|
|
36
|
+
/** Keep the sheet open after selecting (default closes). */
|
|
37
|
+
closeOnSelect?: boolean;
|
|
38
|
+
};
|
|
39
|
+
export declare function MenuSheetItem({ children, icon, description, tone, disabled, onSelect, closeOnSelect, }: MenuSheetItemProps): React.JSX.Element;
|
|
40
|
+
export declare namespace MenuSheetItem {
|
|
41
|
+
var displayName: string;
|
|
42
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type SnackbarVariant = "default" | "positive" | "critical";
|
|
3
|
+
export type SnackbarOptions = {
|
|
4
|
+
message: React.ReactNode;
|
|
5
|
+
variant?: SnackbarVariant;
|
|
6
|
+
/** Auto-dismiss after this many ms (0 = sticky). Defaults to the provider's. */
|
|
7
|
+
duration?: number;
|
|
8
|
+
action?: {
|
|
9
|
+
label: string;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type SnackbarApi = {
|
|
14
|
+
show: (o: SnackbarOptions) => number;
|
|
15
|
+
dismiss: (id: number) => void;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Wrap your app in a `SnackbarProvider`, then call `useSnackbar().show({...})`
|
|
19
|
+
* from anywhere to queue a bottom-anchored snackbar. Only one shows at a time
|
|
20
|
+
* (seed-design's mobile pattern, crisp#911) -- a second call queues behind the
|
|
21
|
+
* first and shows once it dismisses. Auto-dismisses after `duration` (default
|
|
22
|
+
* 4s; 0 keeps it until `dismiss()` or its action fires -- there is no close
|
|
23
|
+
* button, matching seed's own anatomy, which has none).
|
|
24
|
+
*/
|
|
25
|
+
export declare function SnackbarProvider({ children, duration, regionLabel: regionLabelProp, }: {
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
duration?: number;
|
|
28
|
+
/** aria-label on the always-mounted notifications region (default
|
|
29
|
+
* "Notifications"). */
|
|
30
|
+
regionLabel?: string;
|
|
31
|
+
}): React.JSX.Element;
|
|
32
|
+
export declare namespace SnackbarProvider {
|
|
33
|
+
var displayName: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function useSnackbar(): SnackbarApi;
|
|
36
|
+
export {};
|