@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,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type TooltipProps = {
|
|
3
|
+
/** The hint text/content shown on hover or focus. */
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
/** The trigger element. */
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/** Preferred side; flips to the other axis end when there's no room. */
|
|
8
|
+
side?: "top" | "bottom";
|
|
9
|
+
/** Delay in ms before showing (default 350). Hides immediately. */
|
|
10
|
+
delay?: number;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A hover/focus tooltip — a dark hint chip measured from Attio. Wraps its
|
|
14
|
+
* trigger in an inline element, shows after `delay` on pointer-enter / focus,
|
|
15
|
+
* and hides on leave / blur / Escape. The bubble is portaled and positioned
|
|
16
|
+
* above the trigger (flipping below near the top edge).
|
|
17
|
+
*/
|
|
18
|
+
export declare function Tooltip({ content, children, side, delay, }: TooltipProps): React.JSX.Element;
|
|
19
|
+
export declare namespace Tooltip {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as cx } from "clsx";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const NODES: readonly ["button", "div", "span", "a", "input", "p"];
|
|
3
|
+
type NodeName = (typeof NODES)[number];
|
|
4
|
+
type PrimitiveProps<E extends NodeName> = React.ComponentPropsWithoutRef<E> & {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type PrimitiveComponents = {
|
|
8
|
+
[E in NodeName]: React.ForwardRefExoticComponent<PrimitiveProps<E> & React.RefAttributes<Element>>;
|
|
9
|
+
};
|
|
10
|
+
export declare const Primitive: PrimitiveComponents;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type CSSVarFunction = `var(--${string})`;
|
|
2
|
+
type Primitive = string | number | boolean | null | undefined;
|
|
3
|
+
export type MapLeafNodes<Obj, LeafType> = {
|
|
4
|
+
[K in keyof Obj]: Obj[K] extends Primitive ? LeafType : Obj[K] extends Record<string | number, unknown> ? MapLeafNodes<Obj[K], LeafType> : never;
|
|
5
|
+
};
|
|
6
|
+
export type StringToBoolean<T> = T extends "true" | "false" ? boolean : T;
|
|
7
|
+
export type RecipeVariantRecord = Record<string, Record<string, string>>;
|
|
8
|
+
export type VariantSelection<V extends RecipeVariantRecord> = {
|
|
9
|
+
[K in keyof V]?: StringToBoolean<keyof V[K]> | null | undefined;
|
|
10
|
+
};
|
|
11
|
+
export type CompoundVariant<V extends RecipeVariantRecord> = {
|
|
12
|
+
[K in keyof V]?: StringToBoolean<keyof V[K]> | StringToBoolean<keyof V[K]>[];
|
|
13
|
+
} & {
|
|
14
|
+
css: string;
|
|
15
|
+
};
|
|
16
|
+
export interface RecipeConfig<V extends RecipeVariantRecord = RecipeVariantRecord> {
|
|
17
|
+
name: string;
|
|
18
|
+
base?: string;
|
|
19
|
+
variants?: V;
|
|
20
|
+
defaultVariants?: {
|
|
21
|
+
[K in keyof V]?: StringToBoolean<keyof V[K]>;
|
|
22
|
+
};
|
|
23
|
+
compoundVariants?: CompoundVariant<V>[];
|
|
24
|
+
/** Raw CSS emitted at build time outside the component rule (e.g. `@keyframes`). */
|
|
25
|
+
globalCss?: string;
|
|
26
|
+
}
|
|
27
|
+
export type ClassProp = {
|
|
28
|
+
class?: string;
|
|
29
|
+
className?: string;
|
|
30
|
+
};
|
|
31
|
+
export type RecipeFn<V extends RecipeVariantRecord> = (props?: VariantSelection<V> & ClassProp) => string;
|
|
32
|
+
export type VariantProps<Fn extends (...a: never[]) => unknown> = Omit<NonNullable<Parameters<Fn>[0]>, "class" | "className">;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export * from "./components/accordion";
|
|
2
|
+
export * from "./components/avatar";
|
|
3
|
+
export * from "./components/avatargroup";
|
|
4
|
+
export * from "./components/badge";
|
|
5
|
+
export * from "./components/barchart";
|
|
6
|
+
export * from "./components/breadcrumb";
|
|
7
|
+
export * from "./components/button";
|
|
8
|
+
export * from "./components/callout";
|
|
9
|
+
export * from "./components/card";
|
|
10
|
+
export * from "./components/checkbox";
|
|
11
|
+
export * from "./components/contextmenu";
|
|
12
|
+
export * from "./components/datepicker";
|
|
13
|
+
export * from "./components/dialog";
|
|
14
|
+
export * from "./components/divider";
|
|
15
|
+
export * from "./components/donutchart";
|
|
16
|
+
export * from "./components/drawer";
|
|
17
|
+
export * from "./components/emptystate";
|
|
18
|
+
export * from "./components/formfield";
|
|
19
|
+
export * from "./components/input";
|
|
20
|
+
export * from "./components/kbd";
|
|
21
|
+
export * from "./components/linechart";
|
|
22
|
+
export * from "./components/menu";
|
|
23
|
+
export * from "./components/multiselect";
|
|
24
|
+
export * from "./components/popover";
|
|
25
|
+
export * from "./components/progress";
|
|
26
|
+
export * from "./components/radiogroup";
|
|
27
|
+
export * from "./components/segmented";
|
|
28
|
+
export * from "./components/select";
|
|
29
|
+
export * from "./components/skeleton";
|
|
30
|
+
export * from "./components/spinner";
|
|
31
|
+
export * from "./components/stagebar";
|
|
32
|
+
export * from "./components/statcard";
|
|
33
|
+
export * from "./components/switch";
|
|
34
|
+
export * from "./components/tabs";
|
|
35
|
+
export * from "./components/textarea";
|
|
36
|
+
export * from "./components/toast";
|
|
37
|
+
export * from "./components/tooltip";
|
|
38
|
+
export * from "./core";
|
|
39
|
+
export * from "./product/appshell";
|
|
40
|
+
export * from "./product/board";
|
|
41
|
+
export * from "./product/command";
|
|
42
|
+
export * from "./product/entitycard";
|
|
43
|
+
export * from "./product/flowcanvas";
|
|
44
|
+
export * from "./product/inbox";
|
|
45
|
+
export * from "./product/listpage";
|
|
46
|
+
export * from "./product/navitem";
|
|
47
|
+
export * from "./product/onboarding";
|
|
48
|
+
export * from "./product/recordpage";
|
|
49
|
+
export * from "./product/recordpanel";
|
|
50
|
+
export * from "./product/recordstable";
|
|
51
|
+
export * from "./product/richtext";
|
|
52
|
+
export * from "./product/settingssection";
|
|
53
|
+
export * from "./product/settingsshell";
|
|
54
|
+
export * from "./product/sidebar";
|
|
55
|
+
export * from "./product/tasklist";
|
|
56
|
+
export * from "./product/trialbanner";
|
|
57
|
+
export * from "./product/viewtoggle";
|
|
58
|
+
export * from "./tokens";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type AppShellProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The sidebar, as a render function receiving a `toggleCollapse` callback to
|
|
5
|
+
* wire to your sidebar's collapse control (e.g. `Sidebar`'s
|
|
6
|
+
* `onToggleCollapse`). Make the sidebar fill its pane (`width: 100%`).
|
|
7
|
+
*/
|
|
8
|
+
sidebar: (toggleCollapse: () => void) => React.ReactNode;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
defaultWidth?: number;
|
|
11
|
+
minWidth?: number;
|
|
12
|
+
maxWidth?: number;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* App-shell layout with a collapsible + resizable sidebar, mirroring Attio's
|
|
17
|
+
* window: drag the sidebar's right edge to resize, press the sidebar's
|
|
18
|
+
* collapse button to slide it away (a floating button brings it back). The
|
|
19
|
+
* sidebar pane clips rather than squishing, so its content never reflows.
|
|
20
|
+
*/
|
|
21
|
+
export declare function AppShell({ sidebar, children, defaultWidth, minWidth, maxWidth, className, }: AppShellProps): React.JSX.Element;
|
|
22
|
+
export declare namespace AppShell {
|
|
23
|
+
var displayName: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type BoardColumn = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
/** CSS colour for the header dot (e.g. a stage colour). */
|
|
6
|
+
accent?: string;
|
|
7
|
+
};
|
|
8
|
+
export type BoardCard = {
|
|
9
|
+
id: string;
|
|
10
|
+
columnId: string;
|
|
11
|
+
};
|
|
12
|
+
export type BoardProps<T extends BoardCard> = {
|
|
13
|
+
columns: BoardColumn[];
|
|
14
|
+
cards: T[];
|
|
15
|
+
/** Called with the next cards after a drag moves one between columns. */
|
|
16
|
+
onCardsChange?: (cards: T[]) => void;
|
|
17
|
+
renderCard: (card: T) => React.ReactNode;
|
|
18
|
+
/** When set, each column shows a "+ {newCardLabel}" button and its header +. */
|
|
19
|
+
onNewCard?: (columnId: string) => void;
|
|
20
|
+
newCardLabel?: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A kanban board with native drag-and-drop between columns. Cards are
|
|
25
|
+
* `draggable`; dropping one on a column reparents it via `onCardsChange`
|
|
26
|
+
* (the parent owns the cards, so the move is a controlled state update).
|
|
27
|
+
* Measured from Attio's Deals pipeline.
|
|
28
|
+
*/
|
|
29
|
+
export declare function Board<T extends BoardCard>({ columns, cards, onCardsChange, renderCard, onNewCard, newCardLabel, className, }: BoardProps<T>): React.JSX.Element;
|
|
30
|
+
export declare namespace Board {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type CommandItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon: React.ComponentType;
|
|
6
|
+
/** Section this item belongs to — items sharing a group render under one label. */
|
|
7
|
+
group?: string;
|
|
8
|
+
/** Extra terms that match this item during filtering, not shown in the UI. */
|
|
9
|
+
keywords?: string[];
|
|
10
|
+
/** Trailing shortcut hint, rendered as one Kbd per key (e.g. ["G", "H"]). */
|
|
11
|
+
shortcut?: string[];
|
|
12
|
+
onSelect?: () => void;
|
|
13
|
+
};
|
|
14
|
+
/** crisp's own generic command set (not copied from any product). */
|
|
15
|
+
export declare const defaultCommandItems: CommandItem[];
|
|
16
|
+
export type CommandProps = {
|
|
17
|
+
/** Controlled open state — the caller owns when the palette is shown. */
|
|
18
|
+
open: boolean;
|
|
19
|
+
onOpenChange: (open: boolean) => void;
|
|
20
|
+
items?: CommandItem[];
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* ⌘K command palette. Composes a Zag dialog machine (modal, focus trap,
|
|
25
|
+
* scroll lock) with a Zag combobox machine (filterable, keyboard-navigable
|
|
26
|
+
* option list) so keyboard/focus correctness comes from the machines, not
|
|
27
|
+
* hand-rolled event handling.
|
|
28
|
+
*/
|
|
29
|
+
export declare function Command({ open, onOpenChange, items, placeholder, }: CommandProps): React.JSX.Element | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const config: import("../..").RecipeConfig<{}>;
|
|
2
|
+
export declare const commandRecipe: import("../..").RecipeFn<{}> & {
|
|
3
|
+
config: import("../..").RecipeConfig<{}>;
|
|
4
|
+
meta: {
|
|
5
|
+
content: {
|
|
6
|
+
maxWidth: string;
|
|
7
|
+
borderRadius: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default config;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type EntityCardProps = {
|
|
3
|
+
/** Author row shown at the top (e.g. avatar + name). */
|
|
4
|
+
author?: React.ReactNode;
|
|
5
|
+
title: React.ReactNode;
|
|
6
|
+
/** Clamped preview text (3 lines). */
|
|
7
|
+
excerpt?: React.ReactNode;
|
|
8
|
+
/** Footer row — e.g. an avatar + name; a `date` is pushed to the right. */
|
|
9
|
+
footer?: React.ReactNode;
|
|
10
|
+
/** Right-aligned date in the footer. */
|
|
11
|
+
date?: React.ReactNode;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
"aria-label"?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* A note / entity card — measured from Attio's Notes grid. A bordered white
|
|
18
|
+
* card with an author row, a title, a clamped excerpt, and a footer row with a
|
|
19
|
+
* right-aligned date. Rendered as a button so the whole card is clickable.
|
|
20
|
+
*/
|
|
21
|
+
export declare function EntityCard({ author, title, excerpt, footer, date, onClick, "aria-label": ariaLabel, className, }: EntityCardProps): React.JSX.Element;
|
|
22
|
+
export declare namespace EntityCard {
|
|
23
|
+
var displayName: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type FlowNode = {
|
|
3
|
+
id: string;
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
};
|
|
7
|
+
export type FlowEdge = {
|
|
8
|
+
from: string;
|
|
9
|
+
to: string;
|
|
10
|
+
};
|
|
11
|
+
export type FlowCanvasProps<T extends FlowNode> = {
|
|
12
|
+
nodes: T[];
|
|
13
|
+
edges: FlowEdge[];
|
|
14
|
+
/** Called with the next nodes after a node is dragged. */
|
|
15
|
+
onNodesChange?: (nodes: T[]) => void;
|
|
16
|
+
renderNode: (node: T) => React.ReactNode;
|
|
17
|
+
/** Node width used to anchor edges on the right/left edge (default 240). */
|
|
18
|
+
nodeWidth?: number;
|
|
19
|
+
/** Node height used to anchor edges at the vertical middle (default 64). */
|
|
20
|
+
nodeHeight?: number;
|
|
21
|
+
"aria-label"?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A pannable, zoomable node canvas with draggable nodes and connecting edges —
|
|
26
|
+
* measured from Attio's Workflows editor. Drag a node to move it (fires
|
|
27
|
+
* `onNodesChange`); drag the background to pan; use the toolbar to zoom.
|
|
28
|
+
*/
|
|
29
|
+
export declare function FlowCanvas<T extends FlowNode>({ nodes, edges, onNodesChange, renderNode, nodeWidth, nodeHeight, "aria-label": ariaLabel, className, }: FlowCanvasProps<T>): React.JSX.Element;
|
|
30
|
+
export declare namespace FlowCanvas {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type InboxNotification = {
|
|
3
|
+
id: string;
|
|
4
|
+
/** Leading avatar or icon. */
|
|
5
|
+
avatar?: React.ReactNode;
|
|
6
|
+
/** The message (use <b> for the actor name). */
|
|
7
|
+
message: React.ReactNode;
|
|
8
|
+
/** Relative time, e.g. "2h". */
|
|
9
|
+
time?: React.ReactNode;
|
|
10
|
+
unread?: boolean;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
};
|
|
13
|
+
export type InboxTab = {
|
|
14
|
+
id: string;
|
|
15
|
+
label: React.ReactNode;
|
|
16
|
+
count?: number;
|
|
17
|
+
};
|
|
18
|
+
export type InboxProps = {
|
|
19
|
+
notifications?: InboxNotification[];
|
|
20
|
+
title?: React.ReactNode;
|
|
21
|
+
/** Tabs (e.g. Notifications / Requests). */
|
|
22
|
+
tabs?: InboxTab[];
|
|
23
|
+
activeTab?: string;
|
|
24
|
+
onTabChange?: (id: string) => void;
|
|
25
|
+
/** Empty-state text (shown when there are no notifications). */
|
|
26
|
+
emptyTitle?: React.ReactNode;
|
|
27
|
+
emptySubtitle?: React.ReactNode;
|
|
28
|
+
/** Optional action under the empty state (e.g. a Settings button). */
|
|
29
|
+
emptyAction?: React.ReactNode;
|
|
30
|
+
className?: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* A notifications inbox panel — measured from Attio's notification flyout. A
|
|
34
|
+
* title, Notifications/Requests tabs with counts, then notification rows
|
|
35
|
+
* (avatar + message + time + unread dot) or a centred empty state. Put it inside
|
|
36
|
+
* a Popover for the flyout.
|
|
37
|
+
*/
|
|
38
|
+
export declare function Inbox({ notifications, title, tabs, activeTab, onTabChange, emptyTitle, emptySubtitle, emptyAction, className, }: InboxProps): React.JSX.Element;
|
|
39
|
+
export declare namespace Inbox {
|
|
40
|
+
var displayName: string;
|
|
41
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type ListColumn = {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
icon?: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export type ListGroup = {
|
|
7
|
+
id: string;
|
|
8
|
+
label: React.ReactNode;
|
|
9
|
+
count?: number;
|
|
10
|
+
/** Pre-composed row nodes (wrap each in <ListRow>). */
|
|
11
|
+
rows: React.ReactNode[];
|
|
12
|
+
};
|
|
13
|
+
export type ListPageProps = {
|
|
14
|
+
/** Left toolbar slot — e.g. Sort + Filter buttons. */
|
|
15
|
+
leading?: React.ReactNode;
|
|
16
|
+
/** Right toolbar slot — e.g. view toggle, View settings, a New button. */
|
|
17
|
+
trailing?: React.ReactNode;
|
|
18
|
+
/** Record count, e.g. "8 records". */
|
|
19
|
+
count?: React.ReactNode;
|
|
20
|
+
/** Renders the dashed "Favorites" region (pass its content, e.g. an EmptyState). */
|
|
21
|
+
favorites?: React.ReactNode;
|
|
22
|
+
favoritesLabel?: React.ReactNode;
|
|
23
|
+
/** Column-header row above the groups. */
|
|
24
|
+
columns?: ListColumn[];
|
|
25
|
+
/** Time-grouped sections. */
|
|
26
|
+
groups?: ListGroup[];
|
|
27
|
+
/** Shown when there are no groups/rows. */
|
|
28
|
+
emptyLabel?: React.ReactNode;
|
|
29
|
+
className?: string;
|
|
30
|
+
};
|
|
31
|
+
/** A single list row wrapper (52px, hover, top border). Compose cells inside.
|
|
32
|
+
* Renders a real `<button>` when `onClick` is given, else a plain row. */
|
|
33
|
+
export declare function ListRow({ children, onClick, }: {
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
onClick?: () => void;
|
|
36
|
+
}): React.JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* The entity-list page shell — measured from Attio's Reports/Sequences/Tasks/
|
|
39
|
+
* Notes list views. A view-bar toolbar (leading/trailing slots + record count),
|
|
40
|
+
* an optional dashed Favorites region, then column headers and time-grouped
|
|
41
|
+
* rows. Rows are composed by the caller (wrap each in <ListRow>).
|
|
42
|
+
*/
|
|
43
|
+
export declare function ListPage({ leading, trailing, count, favorites, favoritesLabel, columns, groups, emptyLabel, className, }: ListPageProps): React.JSX.Element;
|
|
44
|
+
export declare namespace ListPage {
|
|
45
|
+
var displayName: string;
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NavItem, type NavItemProps } from "./navitem";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type NavItemProps = React.ComponentPropsWithoutRef<"a"> & {
|
|
3
|
+
asChild?: boolean;
|
|
4
|
+
active?: boolean;
|
|
5
|
+
/** Leading content (16px icon or Avatar). */
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
/** Right-aligned content (count badge / options). */
|
|
8
|
+
trailing?: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare const NavItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
active?: boolean;
|
|
13
|
+
/** Leading content (16px icon or Avatar). */
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
/** Right-aligned content (count badge / options). */
|
|
16
|
+
trailing?: React.ReactNode;
|
|
17
|
+
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const config: import("../..").RecipeConfig<{}>;
|
|
2
|
+
export declare const navitemRecipe: import("../..").RecipeFn<{}> & {
|
|
3
|
+
config: import("../..").RecipeConfig<{}>;
|
|
4
|
+
meta: {
|
|
5
|
+
row: {
|
|
6
|
+
height: string;
|
|
7
|
+
borderRadius: string;
|
|
8
|
+
fontSize: string;
|
|
9
|
+
fontWeight: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default config;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type OnboardingStep = {
|
|
3
|
+
/** Stable id (returned by onStepClick). */
|
|
4
|
+
id: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
/** Icon shown before the label. */
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
done?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type OnboardingChecklistProps = {
|
|
11
|
+
title?: React.ReactNode;
|
|
12
|
+
steps: OnboardingStep[];
|
|
13
|
+
/** Subtitle after "N/total steps completed" (default "Keep it up!"). */
|
|
14
|
+
encouragement?: React.ReactNode;
|
|
15
|
+
/** Fired when an incomplete step is clicked. */
|
|
16
|
+
onStepClick?: (id: string) => void;
|
|
17
|
+
/** Show the ⋯ menu button (fires onMenu). */
|
|
18
|
+
onMenu?: () => void;
|
|
19
|
+
/** Show the minimize button (fires onMinimize). */
|
|
20
|
+
onMinimize?: () => void;
|
|
21
|
+
className?: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* An onboarding checklist card — measured from Attio's floating "Getting
|
|
25
|
+
* started" widget. Title + optional menu/minimize, a segmented progress bar,
|
|
26
|
+
* and step rows (completed rows strike through with a brand check).
|
|
27
|
+
*/
|
|
28
|
+
export declare function OnboardingChecklist({ title, steps, encouragement, onStepClick, onMenu, onMinimize, className, }: OnboardingChecklistProps): React.JSX.Element;
|
|
29
|
+
export declare namespace OnboardingChecklist {
|
|
30
|
+
var displayName: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type Column, type Row } from "../recordstable";
|
|
3
|
+
export type RecordPageProps = {
|
|
4
|
+
record: Row;
|
|
5
|
+
columns: Column[];
|
|
6
|
+
/** Breadcrumb label + back button target (e.g. "Companies"). */
|
|
7
|
+
collection?: string;
|
|
8
|
+
onBack?: () => void;
|
|
9
|
+
/** When provided, shows a maximise/minimise button in the top bar. */
|
|
10
|
+
onToggleFull?: () => void;
|
|
11
|
+
full?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The full-page company record view — the page Attio opens when you click into a
|
|
16
|
+
* record (as opposed to the peek [RecordPanel]). A top breadcrumb bar with
|
|
17
|
+
* favourite/edit/compose/… actions, a 320px left attribute column, and a tabbed
|
|
18
|
+
* main area: Overview stacks Highlights, an Activity feed, and Notes / Tasks /
|
|
19
|
+
* Emails sections (Notes & Tasks are live — add and check things off). Drop it
|
|
20
|
+
* into the app's main content area.
|
|
21
|
+
*/
|
|
22
|
+
export declare function RecordPage({ record, columns, collection, onBack, onToggleFull, full, className, }: RecordPageProps): React.JSX.Element;
|
|
23
|
+
export declare namespace RecordPage {
|
|
24
|
+
var displayName: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type Column, type Row } from "../recordstable";
|
|
3
|
+
export type RecordPanelProps = {
|
|
4
|
+
/** The record to show; render nothing when null. */
|
|
5
|
+
record: Row | null;
|
|
6
|
+
columns: Column[];
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Right-side record peek panel — shows one record's fields, opened from a
|
|
12
|
+
* RecordsTable row (via `onOpenRecord`). Render it inside a `position:
|
|
13
|
+
* relative` container (e.g. the app main area); it slides in from the right and
|
|
14
|
+
* overlays the content.
|
|
15
|
+
*/
|
|
16
|
+
export declare function RecordPanel({ record, columns, onClose, className, }: RecordPanelProps): React.JSX.Element | null;
|
|
17
|
+
export declare namespace RecordPanel {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|