@crisp-ui-kit/crisp 0.1.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.
- package/LICENSE +21 -0
- package/README.md +84 -0
- package/dist/accordion.css +13 -0
- package/dist/accordion.d.ts +7 -0
- package/dist/appshell.css +13 -0
- package/dist/appshell.d.ts +7 -0
- package/dist/avatar.css +39 -0
- package/dist/avatar.d.ts +9 -0
- package/dist/avatargroup.css +5 -0
- package/dist/avatargroup.d.ts +7 -0
- package/dist/badge.css +49 -0
- package/dist/badge.d.ts +9 -0
- package/dist/barchart.css +15 -0
- package/dist/barchart.d.ts +7 -0
- package/dist/board.css +17 -0
- package/dist/board.d.ts +7 -0
- package/dist/breadcrumb.css +9 -0
- package/dist/breadcrumb.d.ts +7 -0
- package/dist/button.css +30 -0
- package/dist/button.d.ts +9 -0
- package/dist/callout.css +16 -0
- package/dist/callout.d.ts +7 -0
- package/dist/card.css +20 -0
- package/dist/card.d.ts +8 -0
- package/dist/checkbox.css +3 -0
- package/dist/checkbox.d.ts +7 -0
- package/dist/command.css +3 -0
- package/dist/command.d.ts +7 -0
- package/dist/contextmenu.css +12 -0
- package/dist/contextmenu.d.ts +7 -0
- package/dist/datepicker.css +21 -0
- package/dist/datepicker.d.ts +7 -0
- package/dist/dialog.css +19 -0
- package/dist/dialog.d.ts +7 -0
- package/dist/divider.css +5 -0
- package/dist/divider.d.ts +7 -0
- package/dist/donutchart.css +16 -0
- package/dist/donutchart.d.ts +7 -0
- package/dist/drawer.css +17 -0
- package/dist/drawer.d.ts +7 -0
- package/dist/emptystate.css +20 -0
- package/dist/emptystate.d.ts +7 -0
- package/dist/entitycard.css +18 -0
- package/dist/entitycard.d.ts +7 -0
- package/dist/flowcanvas.css +15 -0
- package/dist/flowcanvas.d.ts +7 -0
- package/dist/formfield.css +8 -0
- package/dist/formfield.d.ts +7 -0
- package/dist/inbox.css +31 -0
- package/dist/inbox.d.ts +7 -0
- package/dist/index.js +9653 -0
- package/dist/input.css +15 -0
- package/dist/input.d.ts +8 -0
- package/dist/kbd.css +3 -0
- package/dist/kbd.d.ts +7 -0
- package/dist/linechart.css +15 -0
- package/dist/linechart.d.ts +7 -0
- package/dist/listpage.css +31 -0
- package/dist/listpage.d.ts +7 -0
- package/dist/menu.css +38 -0
- package/dist/menu.d.ts +7 -0
- package/dist/multiselect.css +53 -0
- package/dist/multiselect.d.ts +7 -0
- package/dist/navitem.css +3 -0
- package/dist/navitem.d.ts +7 -0
- package/dist/onboarding.css +29 -0
- package/dist/onboarding.d.ts +7 -0
- package/dist/popover.css +6 -0
- package/dist/popover.d.ts +7 -0
- package/dist/progress.css +7 -0
- package/dist/progress.d.ts +7 -0
- package/dist/radiogroup.css +23 -0
- package/dist/radiogroup.d.ts +7 -0
- package/dist/recordpage.css +141 -0
- package/dist/recordpage.d.ts +7 -0
- package/dist/recordpanel.css +38 -0
- package/dist/recordpanel.d.ts +7 -0
- package/dist/recordstable.css +194 -0
- package/dist/recordstable.d.ts +7 -0
- package/dist/richtext.css +28 -0
- package/dist/richtext.d.ts +7 -0
- package/dist/segmented.css +10 -0
- package/dist/segmented.d.ts +7 -0
- package/dist/select.css +56 -0
- package/dist/select.d.ts +7 -0
- package/dist/settingssection.css +9 -0
- package/dist/settingssection.d.ts +7 -0
- package/dist/settingsshell.css +27 -0
- package/dist/settingsshell.d.ts +7 -0
- package/dist/sidebar.css +3 -0
- package/dist/sidebar.d.ts +7 -0
- package/dist/skeleton.css +5 -0
- package/dist/skeleton.d.ts +7 -0
- package/dist/spinner.css +4 -0
- package/dist/spinner.d.ts +7 -0
- package/dist/stagebar.css +4 -0
- package/dist/stagebar.d.ts +7 -0
- package/dist/statcard.css +13 -0
- package/dist/statcard.d.ts +7 -0
- package/dist/styles.css +1421 -0
- package/dist/switch.css +12 -0
- package/dist/switch.d.ts +7 -0
- package/dist/tabs.css +19 -0
- package/dist/tabs.d.ts +7 -0
- package/dist/tasklist.css +24 -0
- package/dist/tasklist.d.ts +7 -0
- package/dist/textarea.css +20 -0
- package/dist/textarea.d.ts +7 -0
- package/dist/toast.css +17 -0
- package/dist/toast.d.ts +7 -0
- package/dist/tokens.css +70 -0
- package/dist/tooltip.css +3 -0
- package/dist/tooltip.d.ts +7 -0
- package/dist/trialbanner.css +18 -0
- package/dist/trialbanner.d.ts +7 -0
- package/dist/types/components/accordion/accordion.d.ts +23 -0
- package/dist/types/components/accordion/accordion.recipe.d.ts +3 -0
- package/dist/types/components/accordion/index.d.ts +2 -0
- package/dist/types/components/avatar/avatar.d.ts +56 -0
- package/dist/types/components/avatar/avatar.recipe.d.ts +69 -0
- package/dist/types/components/avatar/index.d.ts +2 -0
- package/dist/types/components/avatargroup/avatargroup.d.ts +21 -0
- package/dist/types/components/avatargroup/avatargroup.recipe.d.ts +3 -0
- package/dist/types/components/avatargroup/index.d.ts +2 -0
- package/dist/types/components/badge/badge.d.ts +57 -0
- package/dist/types/components/badge/badge.recipe.d.ts +64 -0
- package/dist/types/components/badge/index.d.ts +2 -0
- package/dist/types/components/barchart/barchart.d.ts +30 -0
- package/dist/types/components/barchart/barchart.recipe.d.ts +3 -0
- package/dist/types/components/barchart/index.d.ts +2 -0
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +22 -0
- package/dist/types/components/breadcrumb/breadcrumb.recipe.d.ts +3 -0
- package/dist/types/components/breadcrumb/index.d.ts +2 -0
- package/dist/types/components/button/button.d.ts +57 -0
- package/dist/types/components/button/button.recipe.d.ts +63 -0
- package/dist/types/components/button/index.d.ts +2 -0
- package/dist/types/components/callout/callout.d.ts +20 -0
- package/dist/types/components/callout/callout.recipe.d.ts +3 -0
- package/dist/types/components/callout/index.d.ts +2 -0
- package/dist/types/components/card/card.d.ts +26 -0
- package/dist/types/components/card/card.recipe.d.ts +21 -0
- package/dist/types/components/card/index.d.ts +2 -0
- package/dist/types/components/checkbox/checkbox.d.ts +17 -0
- package/dist/types/components/checkbox/checkbox.recipe.d.ts +11 -0
- package/dist/types/components/checkbox/index.d.ts +2 -0
- package/dist/types/components/contextmenu/contextmenu.d.ts +27 -0
- package/dist/types/components/contextmenu/contextmenu.recipe.d.ts +3 -0
- package/dist/types/components/contextmenu/index.d.ts +2 -0
- package/dist/types/components/datepicker/datepicker.d.ts +22 -0
- package/dist/types/components/datepicker/datepicker.recipe.d.ts +3 -0
- package/dist/types/components/datepicker/index.d.ts +2 -0
- package/dist/types/components/dialog/dialog.d.ts +30 -0
- package/dist/types/components/dialog/dialog.recipe.d.ts +3 -0
- package/dist/types/components/dialog/index.d.ts +2 -0
- package/dist/types/components/divider/divider.d.ts +9 -0
- package/dist/types/components/divider/divider.recipe.d.ts +3 -0
- package/dist/types/components/divider/index.d.ts +2 -0
- package/dist/types/components/donutchart/donutchart.d.ts +32 -0
- package/dist/types/components/donutchart/donutchart.recipe.d.ts +3 -0
- package/dist/types/components/donutchart/index.d.ts +2 -0
- package/dist/types/components/drawer/drawer.d.ts +26 -0
- package/dist/types/components/drawer/drawer.recipe.d.ts +3 -0
- package/dist/types/components/drawer/index.d.ts +2 -0
- package/dist/types/components/emptystate/emptystate.d.ts +19 -0
- package/dist/types/components/emptystate/emptystate.recipe.d.ts +15 -0
- package/dist/types/components/emptystate/index.d.ts +2 -0
- package/dist/types/components/formfield/formfield.d.ts +26 -0
- package/dist/types/components/formfield/formfield.recipe.d.ts +3 -0
- package/dist/types/components/formfield/index.d.ts +2 -0
- package/dist/types/components/input/index.d.ts +2 -0
- package/dist/types/components/input/input.d.ts +32 -0
- package/dist/types/components/input/input.recipe.d.ts +39 -0
- package/dist/types/components/kbd/index.d.ts +2 -0
- package/dist/types/components/kbd/kbd.d.ts +7 -0
- package/dist/types/components/kbd/kbd.recipe.d.ts +12 -0
- package/dist/types/components/linechart/index.d.ts +2 -0
- package/dist/types/components/linechart/linechart.d.ts +35 -0
- package/dist/types/components/linechart/linechart.recipe.d.ts +3 -0
- package/dist/types/components/menu/index.d.ts +2 -0
- package/dist/types/components/menu/menu.d.ts +55 -0
- package/dist/types/components/menu/menu.recipe.d.ts +5 -0
- package/dist/types/components/multiselect/index.d.ts +2 -0
- package/dist/types/components/multiselect/multiselect.d.ts +29 -0
- package/dist/types/components/multiselect/multiselect.recipe.d.ts +5 -0
- package/dist/types/components/popover/index.d.ts +2 -0
- package/dist/types/components/popover/popover.d.ts +23 -0
- package/dist/types/components/popover/popover.recipe.d.ts +3 -0
- package/dist/types/components/progress/index.d.ts +2 -0
- package/dist/types/components/progress/progress.d.ts +19 -0
- package/dist/types/components/progress/progress.recipe.d.ts +3 -0
- package/dist/types/components/radiogroup/index.d.ts +2 -0
- package/dist/types/components/radiogroup/radiogroup.d.ts +35 -0
- package/dist/types/components/radiogroup/radiogroup.recipe.d.ts +5 -0
- package/dist/types/components/segmented/index.d.ts +2 -0
- package/dist/types/components/segmented/segmented.d.ts +27 -0
- package/dist/types/components/segmented/segmented.recipe.d.ts +3 -0
- package/dist/types/components/select/index.d.ts +2 -0
- package/dist/types/components/select/select.d.ts +38 -0
- package/dist/types/components/select/select.recipe.d.ts +20 -0
- package/dist/types/components/skeleton/index.d.ts +2 -0
- package/dist/types/components/skeleton/skeleton.d.ts +13 -0
- package/dist/types/components/skeleton/skeleton.recipe.d.ts +3 -0
- package/dist/types/components/spinner/index.d.ts +2 -0
- package/dist/types/components/spinner/spinner.d.ts +11 -0
- package/dist/types/components/spinner/spinner.recipe.d.ts +3 -0
- package/dist/types/components/stagebar/index.d.ts +2 -0
- package/dist/types/components/stagebar/stagebar.d.ts +20 -0
- package/dist/types/components/stagebar/stagebar.recipe.d.ts +3 -0
- package/dist/types/components/statcard/index.d.ts +2 -0
- package/dist/types/components/statcard/statcard.d.ts +24 -0
- package/dist/types/components/statcard/statcard.recipe.d.ts +3 -0
- package/dist/types/components/switch/index.d.ts +2 -0
- package/dist/types/components/switch/switch.d.ts +19 -0
- package/dist/types/components/switch/switch.recipe.d.ts +14 -0
- package/dist/types/components/tabs/index.d.ts +2 -0
- package/dist/types/components/tabs/tabs.d.ts +33 -0
- package/dist/types/components/tabs/tabs.recipe.d.ts +5 -0
- package/dist/types/components/textarea/index.d.ts +2 -0
- package/dist/types/components/textarea/textarea.d.ts +18 -0
- package/dist/types/components/textarea/textarea.recipe.d.ts +5 -0
- package/dist/types/components/toast/index.d.ts +2 -0
- package/dist/types/components/toast/toast.d.ts +31 -0
- package/dist/types/components/toast/toast.recipe.d.ts +3 -0
- package/dist/types/components/tooltip/index.d.ts +2 -0
- package/dist/types/components/tooltip/tooltip.d.ts +21 -0
- package/dist/types/components/tooltip/tooltip.recipe.d.ts +3 -0
- package/dist/types/core/cx.d.ts +1 -0
- package/dist/types/core/define.d.ts +2 -0
- package/dist/types/core/index.d.ts +5 -0
- package/dist/types/core/primitive.d.ts +11 -0
- package/dist/types/core/resolve.d.ts +2 -0
- package/dist/types/core/types.d.ts +33 -0
- package/dist/types/index.d.ts +58 -0
- package/dist/types/product/appshell/appshell.d.ts +24 -0
- package/dist/types/product/appshell/appshell.recipe.d.ts +10 -0
- package/dist/types/product/appshell/index.d.ts +2 -0
- package/dist/types/product/board/board.d.ts +32 -0
- package/dist/types/product/board/board.recipe.d.ts +3 -0
- package/dist/types/product/board/index.d.ts +2 -0
- package/dist/types/product/command/command.d.ts +29 -0
- package/dist/types/product/command/command.recipe.d.ts +11 -0
- package/dist/types/product/command/index.d.ts +2 -0
- package/dist/types/product/entitycard/entitycard.d.ts +24 -0
- package/dist/types/product/entitycard/entitycard.recipe.d.ts +3 -0
- package/dist/types/product/entitycard/index.d.ts +2 -0
- package/dist/types/product/flowcanvas/flowcanvas.d.ts +32 -0
- package/dist/types/product/flowcanvas/flowcanvas.recipe.d.ts +3 -0
- package/dist/types/product/flowcanvas/index.d.ts +2 -0
- package/dist/types/product/inbox/inbox.d.ts +41 -0
- package/dist/types/product/inbox/inbox.recipe.d.ts +3 -0
- package/dist/types/product/inbox/index.d.ts +2 -0
- package/dist/types/product/listpage/index.d.ts +2 -0
- package/dist/types/product/listpage/listpage.d.ts +46 -0
- package/dist/types/product/listpage/listpage.recipe.d.ts +3 -0
- package/dist/types/product/navitem/index.d.ts +1 -0
- package/dist/types/product/navitem/navitem.d.ts +17 -0
- package/dist/types/product/navitem/navitem.recipe.d.ts +13 -0
- package/dist/types/product/onboarding/index.d.ts +2 -0
- package/dist/types/product/onboarding/onboarding.d.ts +31 -0
- package/dist/types/product/onboarding/onboarding.recipe.d.ts +3 -0
- package/dist/types/product/recordpage/index.d.ts +2 -0
- package/dist/types/product/recordpage/recordpage.d.ts +25 -0
- package/dist/types/product/recordpage/recordpage.recipe.d.ts +5 -0
- package/dist/types/product/recordpanel/index.d.ts +2 -0
- package/dist/types/product/recordpanel/recordpanel.d.ts +19 -0
- package/dist/types/product/recordpanel/recordpanel.recipe.d.ts +10 -0
- package/dist/types/product/recordstable/index.d.ts +2 -0
- package/dist/types/product/recordstable/recordstable.d.ts +63 -0
- package/dist/types/product/recordstable/recordstable.recipe.d.ts +11 -0
- package/dist/types/product/richtext/index.d.ts +2 -0
- package/dist/types/product/richtext/richtext.d.ts +24 -0
- package/dist/types/product/richtext/richtext.recipe.d.ts +3 -0
- package/dist/types/product/settingssection/index.d.ts +2 -0
- package/dist/types/product/settingssection/settingssection.d.ts +18 -0
- package/dist/types/product/settingssection/settingssection.recipe.d.ts +3 -0
- package/dist/types/product/settingsshell/index.d.ts +2 -0
- package/dist/types/product/settingsshell/settingsshell.d.ts +34 -0
- package/dist/types/product/settingsshell/settingsshell.recipe.d.ts +3 -0
- package/dist/types/product/sidebar/index.d.ts +2 -0
- package/dist/types/product/sidebar/sidebar.d.ts +11 -0
- package/dist/types/product/sidebar/sidebar.recipe.d.ts +10 -0
- package/dist/types/product/tasklist/index.d.ts +2 -0
- package/dist/types/product/tasklist/tasklist.d.ts +36 -0
- package/dist/types/product/tasklist/tasklist.recipe.d.ts +3 -0
- package/dist/types/product/trialbanner/index.d.ts +2 -0
- package/dist/types/product/trialbanner/trialbanner.d.ts +21 -0
- package/dist/types/product/trialbanner/trialbanner.recipe.d.ts +3 -0
- package/dist/types/product/viewtoggle/index.d.ts +2 -0
- package/dist/types/product/viewtoggle/viewtoggle.d.ts +24 -0
- package/dist/types/product/viewtoggle/viewtoggle.recipe.d.ts +3 -0
- package/dist/types/tokens/contract.d.ts +27 -0
- package/dist/types/tokens/index.d.ts +5 -0
- package/dist/types/tokens/palette.d.ts +67 -0
- package/dist/types/tokens/scale.d.ts +48 -0
- package/dist/types/tokens/semantic.d.ts +19 -0
- package/dist/viewtoggle.css +13 -0
- package/dist/viewtoggle.d.ts +7 -0
- package/package.json +77 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { VariantProps } from "../../core";
|
|
3
|
+
import { buttonRecipe } from "./button.recipe";
|
|
4
|
+
export type ButtonProps = React.ComponentPropsWithoutRef<"button"> & VariantProps<typeof buttonRecipe> & {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
/** Show a spinner, disable interaction, and set aria-busy. */
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const Button: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & VariantProps<import("../..").RecipeFn<{
|
|
10
|
+
intent: {
|
|
11
|
+
primary: string;
|
|
12
|
+
neutral: string;
|
|
13
|
+
danger: string;
|
|
14
|
+
ghost: string;
|
|
15
|
+
};
|
|
16
|
+
size: {
|
|
17
|
+
sm: string;
|
|
18
|
+
md: string;
|
|
19
|
+
lg: string;
|
|
20
|
+
};
|
|
21
|
+
shape: {
|
|
22
|
+
text: string;
|
|
23
|
+
icon: string;
|
|
24
|
+
};
|
|
25
|
+
}> & {
|
|
26
|
+
config: import("../..").RecipeConfig<{
|
|
27
|
+
intent: {
|
|
28
|
+
primary: string;
|
|
29
|
+
neutral: string;
|
|
30
|
+
danger: string;
|
|
31
|
+
ghost: string;
|
|
32
|
+
};
|
|
33
|
+
size: {
|
|
34
|
+
sm: string;
|
|
35
|
+
md: string;
|
|
36
|
+
lg: string;
|
|
37
|
+
};
|
|
38
|
+
shape: {
|
|
39
|
+
text: string;
|
|
40
|
+
icon: string;
|
|
41
|
+
};
|
|
42
|
+
}>;
|
|
43
|
+
meta: {
|
|
44
|
+
primary: {
|
|
45
|
+
height: string;
|
|
46
|
+
borderRadius: string;
|
|
47
|
+
fontWeight: string;
|
|
48
|
+
fontSize: string;
|
|
49
|
+
background: string;
|
|
50
|
+
color: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
}> & {
|
|
54
|
+
asChild?: boolean;
|
|
55
|
+
/** Show a spinner, disable interaction, and set aria-busy. */
|
|
56
|
+
loading?: boolean;
|
|
57
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
declare const config: import("../..").RecipeConfig<{
|
|
2
|
+
intent: {
|
|
3
|
+
primary: string;
|
|
4
|
+
neutral: string;
|
|
5
|
+
danger: string;
|
|
6
|
+
ghost: string;
|
|
7
|
+
};
|
|
8
|
+
size: {
|
|
9
|
+
sm: string;
|
|
10
|
+
md: string;
|
|
11
|
+
lg: string;
|
|
12
|
+
};
|
|
13
|
+
shape: {
|
|
14
|
+
text: string;
|
|
15
|
+
icon: string;
|
|
16
|
+
};
|
|
17
|
+
}>;
|
|
18
|
+
export declare const buttonRecipe: import("../..").RecipeFn<{
|
|
19
|
+
intent: {
|
|
20
|
+
primary: string;
|
|
21
|
+
neutral: string;
|
|
22
|
+
danger: string;
|
|
23
|
+
ghost: string;
|
|
24
|
+
};
|
|
25
|
+
size: {
|
|
26
|
+
sm: string;
|
|
27
|
+
md: string;
|
|
28
|
+
lg: string;
|
|
29
|
+
};
|
|
30
|
+
shape: {
|
|
31
|
+
text: string;
|
|
32
|
+
icon: string;
|
|
33
|
+
};
|
|
34
|
+
}> & {
|
|
35
|
+
config: import("../..").RecipeConfig<{
|
|
36
|
+
intent: {
|
|
37
|
+
primary: string;
|
|
38
|
+
neutral: string;
|
|
39
|
+
danger: string;
|
|
40
|
+
ghost: string;
|
|
41
|
+
};
|
|
42
|
+
size: {
|
|
43
|
+
sm: string;
|
|
44
|
+
md: string;
|
|
45
|
+
lg: string;
|
|
46
|
+
};
|
|
47
|
+
shape: {
|
|
48
|
+
text: string;
|
|
49
|
+
icon: string;
|
|
50
|
+
};
|
|
51
|
+
}>;
|
|
52
|
+
meta: {
|
|
53
|
+
primary: {
|
|
54
|
+
height: string;
|
|
55
|
+
borderRadius: string;
|
|
56
|
+
fontWeight: string;
|
|
57
|
+
fontSize: string;
|
|
58
|
+
background: string;
|
|
59
|
+
color: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export default config;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type CalloutTone = "neutral" | "info" | "success" | "warning" | "danger";
|
|
3
|
+
export type CalloutProps = {
|
|
4
|
+
tone?: CalloutTone;
|
|
5
|
+
/** Leading icon; defaults to a tone-appropriate one (pass `null` for none). */
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
title?: React.ReactNode;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/** Trailing action (e.g. a Button). */
|
|
10
|
+
action?: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* An inline callout / banner — measured from Attio's info notices. `tone` tints
|
|
15
|
+
* the background and icon; pass a `title` and/or body `children`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function Callout({ tone, icon, title, children, action, className, }: CalloutProps): React.JSX.Element;
|
|
18
|
+
export declare namespace Callout {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type CardProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
3
|
+
/** Add a soft float shadow. */
|
|
4
|
+
raised?: boolean;
|
|
5
|
+
/** Add a hover affordance (for clickable cards). */
|
|
6
|
+
interactive?: boolean;
|
|
7
|
+
};
|
|
8
|
+
/** A bordered surface card. Compose with CardHeader / CardBody / CardFooter. */
|
|
9
|
+
export declare const Card: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
10
|
+
/** Add a soft float shadow. */
|
|
11
|
+
raised?: boolean;
|
|
12
|
+
/** Add a hover affordance (for clickable cards). */
|
|
13
|
+
interactive?: boolean;
|
|
14
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export declare function CardHeader({ children, icon, action, }: {
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
icon?: React.ReactNode;
|
|
18
|
+
action?: React.ReactNode;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
export declare function CardBody({ children, className, }: {
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
}): React.JSX.Element;
|
|
24
|
+
export declare function CardFooter({ children }: {
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const config: import("../..").RecipeConfig<{
|
|
2
|
+
raised: {
|
|
3
|
+
true: string;
|
|
4
|
+
false: string;
|
|
5
|
+
};
|
|
6
|
+
interactive: {
|
|
7
|
+
true: string;
|
|
8
|
+
false: string;
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
export declare const cardRecipe: import("../..").RecipeFn<{
|
|
12
|
+
raised: {
|
|
13
|
+
true: string;
|
|
14
|
+
false: string;
|
|
15
|
+
};
|
|
16
|
+
interactive: {
|
|
17
|
+
true: string;
|
|
18
|
+
false: string;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
export default config;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type CheckboxProps = Omit<React.ComponentPropsWithoutRef<"input">, "type"> & {
|
|
3
|
+
/** Renders the mixed (dash) state — for a select-all that is partially on. */
|
|
4
|
+
indeterminate?: boolean;
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* A native `<input type="checkbox">` styled to Attio's grid checkbox (16px,
|
|
9
|
+
* r6, brand fill + white check). Native on purpose: keyboard, focus, and form
|
|
10
|
+
* semantics come for free. `indeterminate` is a DOM-only property, so it is
|
|
11
|
+
* applied via ref rather than an attribute.
|
|
12
|
+
*/
|
|
13
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type"> & {
|
|
14
|
+
/** Renders the mixed (dash) state — for a select-all that is partially on. */
|
|
15
|
+
indeterminate?: boolean;
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const config: import("../..").RecipeConfig<{}>;
|
|
2
|
+
export declare const checkboxRecipe: import("../..").RecipeFn<{}> & {
|
|
3
|
+
config: import("../..").RecipeConfig<{}>;
|
|
4
|
+
meta: {
|
|
5
|
+
box: {
|
|
6
|
+
size: string;
|
|
7
|
+
borderRadius: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default config;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type ContextMenuOption = {
|
|
3
|
+
separator: true;
|
|
4
|
+
} | {
|
|
5
|
+
separator?: false;
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
shortcut?: string;
|
|
9
|
+
danger?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onSelect?: () => void;
|
|
12
|
+
};
|
|
13
|
+
export type ContextMenuProps = {
|
|
14
|
+
/** The area that opens the menu on right-click. */
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
items: ContextMenuOption[];
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* A right-click context menu — the popover surface positioned at the cursor.
|
|
21
|
+
* Wrap the target; right-clicking it opens the menu (flipping at the viewport
|
|
22
|
+
* edges), closing on select, outside pointer-down, and Escape.
|
|
23
|
+
*/
|
|
24
|
+
export declare function ContextMenu({ children, items, className }: ContextMenuProps): React.JSX.Element;
|
|
25
|
+
export declare namespace ContextMenu {
|
|
26
|
+
var displayName: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type DatePickerProps = {
|
|
3
|
+
/** Controlled value. Omit to let the picker manage it (see defaultValue). */
|
|
4
|
+
value?: Date | null;
|
|
5
|
+
defaultValue?: Date | null;
|
|
6
|
+
onChange?: (date: Date) => void;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
/** `default` = outlined trigger; `ghost` = transparent (for table cells). */
|
|
9
|
+
variant?: "default" | "ghost";
|
|
10
|
+
/** Formats the trigger label (default: e.g. "Jun 3, 2026"). */
|
|
11
|
+
format?: (date: Date) => string;
|
|
12
|
+
"aria-label"?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A date field with a calendar popover — composes [Popover] with a month grid.
|
|
17
|
+
* Controlled via `value`/`onChange` or self-managed from `defaultValue`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function DatePicker({ value, defaultValue, onChange, placeholder, variant, format, "aria-label": ariaLabel, className, }: DatePickerProps): React.JSX.Element;
|
|
20
|
+
export declare namespace DatePicker {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type DialogProps = {
|
|
3
|
+
/** Controlled open state. */
|
|
4
|
+
open: boolean;
|
|
5
|
+
onOpenChange: (open: boolean) => void;
|
|
6
|
+
/** Header title; when set, the header (title + close button) renders. */
|
|
7
|
+
title?: React.ReactNode;
|
|
8
|
+
/** Leading icon shown before the title. */
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
/** Content width in px (clamped to 90vw). */
|
|
11
|
+
width?: number;
|
|
12
|
+
"aria-label"?: string;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A modal dialog — composes Zag's dialog machine (focus trap, scroll lock,
|
|
17
|
+
* Escape / outside-click dismissal) with the measured Attio modal surface.
|
|
18
|
+
* Compose the body with `DialogBody` and actions with `DialogFooter`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function Dialog({ open, onOpenChange, title, icon, width, "aria-label": ariaLabel, children, }: DialogProps): React.JSX.Element | null;
|
|
21
|
+
export declare namespace Dialog {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function DialogBody({ children, className, }: {
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
className?: string;
|
|
27
|
+
}): React.JSX.Element;
|
|
28
|
+
export declare function DialogFooter({ children }: {
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type DividerProps = {
|
|
2
|
+
orientation?: "horizontal" | "vertical";
|
|
3
|
+
className?: string;
|
|
4
|
+
};
|
|
5
|
+
/** A hairline separator over `borderSubtle`, horizontal or vertical. */
|
|
6
|
+
export declare function Divider({ orientation, className, }: DividerProps): import("react").JSX.Element;
|
|
7
|
+
export declare namespace Divider {
|
|
8
|
+
var displayName: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type DonutSlice = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
};
|
|
7
|
+
export type DonutChartProps = {
|
|
8
|
+
data: DonutSlice[];
|
|
9
|
+
/** Ring diameter in px (default 120). */
|
|
10
|
+
size?: number;
|
|
11
|
+
/** Ring thickness in px (default 14). */
|
|
12
|
+
thickness?: number;
|
|
13
|
+
/** Centre big value (default: the total, formatted). */
|
|
14
|
+
centerValue?: React.ReactNode;
|
|
15
|
+
/** Small caption under the centre value. */
|
|
16
|
+
centerCaption?: React.ReactNode;
|
|
17
|
+
/** Show the legend beside the ring (default true). */
|
|
18
|
+
legend?: boolean;
|
|
19
|
+
/** Formats slice + total values. */
|
|
20
|
+
format?: (n: number) => string;
|
|
21
|
+
"aria-label"?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A donut / ring chart — measured from Attio's Reports breakdown reports. SVG
|
|
26
|
+
* ring using the r=15.915 (circumference 100) trick so slices are percentages;
|
|
27
|
+
* a centred total and an optional legend. `role="img"` with a summary.
|
|
28
|
+
*/
|
|
29
|
+
export declare function DonutChart({ data, size, thickness, centerValue, centerCaption, legend, format, "aria-label": ariaLabel, className, }: DonutChartProps): React.JSX.Element;
|
|
30
|
+
export declare namespace DonutChart {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type DrawerProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
/** Which edge the sheet slides in from (default right). */
|
|
6
|
+
side?: "right" | "left";
|
|
7
|
+
title?: React.ReactNode;
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
"aria-label"?: string;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A side sheet — composes Zag's dialog machine (focus trap, scroll lock,
|
|
14
|
+
* Escape / outside-click dismissal) with a panel that slides in from the edge.
|
|
15
|
+
* Compose the body with `DrawerBody` and actions with `DrawerFooter`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function Drawer({ open, onOpenChange, side, title, icon, "aria-label": ariaLabel, children, }: DrawerProps): React.JSX.Element | null;
|
|
18
|
+
export declare namespace Drawer {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function DrawerBody({ children }: {
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
}): React.JSX.Element;
|
|
24
|
+
export declare function DrawerFooter({ children }: {
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type EmptyStateProps = {
|
|
3
|
+
icon?: React.ReactNode;
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
/** A primary action (e.g. a Button) shown below. */
|
|
7
|
+
action?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* `illustrated` shows a large icon on a dotted-grid backdrop; `page` is
|
|
10
|
+
* Attio's full-view empty state (ringed circle icon + 20px heading).
|
|
11
|
+
*/
|
|
12
|
+
variant?: "default" | "illustrated" | "page";
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
/** A centred empty-state panel — icon, title, description, optional action. */
|
|
16
|
+
export declare function EmptyState({ icon, title, description, action, variant, className, }: EmptyStateProps): React.JSX.Element;
|
|
17
|
+
export declare namespace EmptyState {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const config: import("../..").RecipeConfig<{
|
|
2
|
+
variant: {
|
|
3
|
+
default: string;
|
|
4
|
+
illustrated: string;
|
|
5
|
+
page: string;
|
|
6
|
+
};
|
|
7
|
+
}>;
|
|
8
|
+
export declare const emptystateRecipe: import("../..").RecipeFn<{
|
|
9
|
+
variant: {
|
|
10
|
+
default: string;
|
|
11
|
+
illustrated: string;
|
|
12
|
+
page: string;
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
15
|
+
export default config;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type FormFieldProps = {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
/** `id` of the control — wires the label's `htmlFor`. */
|
|
5
|
+
htmlFor?: string;
|
|
6
|
+
/** Marks the field required (red asterisk). */
|
|
7
|
+
required?: boolean;
|
|
8
|
+
/** Shows a muted "(optional)" after the label. */
|
|
9
|
+
optional?: boolean;
|
|
10
|
+
/** Helper text under the control. */
|
|
11
|
+
description?: React.ReactNode;
|
|
12
|
+
/** Error message under the control (replaces description, coloured danger). */
|
|
13
|
+
error?: React.ReactNode;
|
|
14
|
+
/** The control (Input, Select, Textarea…). */
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A labelled form field — measured from Attio's Settings forms. A muted label
|
|
20
|
+
* above any control, with an optional description or error line below. When
|
|
21
|
+
* `error` is set, it replaces the description and gets `aria-describedby` wiring.
|
|
22
|
+
*/
|
|
23
|
+
export declare function FormField({ label, htmlFor, required, optional, description, error, children, className, }: FormFieldProps): React.JSX.Element;
|
|
24
|
+
export declare namespace FormField {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { VariantProps } from "../../core";
|
|
3
|
+
import { inputRecipe } from "./input.recipe";
|
|
4
|
+
export type InputProps = Omit<React.ComponentPropsWithoutRef<"input">, "size"> & VariantProps<typeof inputRecipe>;
|
|
5
|
+
export declare const Input: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "size"> & VariantProps<import("../..").RecipeFn<{
|
|
6
|
+
size: {
|
|
7
|
+
medium: string;
|
|
8
|
+
large: string;
|
|
9
|
+
};
|
|
10
|
+
invalid: {
|
|
11
|
+
true: string;
|
|
12
|
+
false: string;
|
|
13
|
+
};
|
|
14
|
+
}> & {
|
|
15
|
+
config: import("../..").RecipeConfig<{
|
|
16
|
+
size: {
|
|
17
|
+
medium: string;
|
|
18
|
+
large: string;
|
|
19
|
+
};
|
|
20
|
+
invalid: {
|
|
21
|
+
true: string;
|
|
22
|
+
false: string;
|
|
23
|
+
};
|
|
24
|
+
}>;
|
|
25
|
+
meta: {
|
|
26
|
+
medium: {
|
|
27
|
+
height: string;
|
|
28
|
+
borderRadius: string;
|
|
29
|
+
fontSize: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
declare const config: import("../..").RecipeConfig<{
|
|
2
|
+
size: {
|
|
3
|
+
medium: string;
|
|
4
|
+
large: string;
|
|
5
|
+
};
|
|
6
|
+
invalid: {
|
|
7
|
+
true: string;
|
|
8
|
+
false: string;
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
export declare const inputRecipe: import("../..").RecipeFn<{
|
|
12
|
+
size: {
|
|
13
|
+
medium: string;
|
|
14
|
+
large: string;
|
|
15
|
+
};
|
|
16
|
+
invalid: {
|
|
17
|
+
true: string;
|
|
18
|
+
false: string;
|
|
19
|
+
};
|
|
20
|
+
}> & {
|
|
21
|
+
config: import("../..").RecipeConfig<{
|
|
22
|
+
size: {
|
|
23
|
+
medium: string;
|
|
24
|
+
large: string;
|
|
25
|
+
};
|
|
26
|
+
invalid: {
|
|
27
|
+
true: string;
|
|
28
|
+
false: string;
|
|
29
|
+
};
|
|
30
|
+
}>;
|
|
31
|
+
meta: {
|
|
32
|
+
medium: {
|
|
33
|
+
height: string;
|
|
34
|
+
borderRadius: string;
|
|
35
|
+
fontSize: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export default config;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type KbdProps = React.ComponentPropsWithoutRef<"span"> & {
|
|
3
|
+
asChild?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const Kbd: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const config: import("../..").RecipeConfig<{}>;
|
|
2
|
+
export declare const kbdRecipe: import("../..").RecipeFn<{}> & {
|
|
3
|
+
config: import("../..").RecipeConfig<{}>;
|
|
4
|
+
meta: {
|
|
5
|
+
chip: {
|
|
6
|
+
height: string;
|
|
7
|
+
borderRadius: string;
|
|
8
|
+
fontSize: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default config;
|