@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,35 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type LinePoint = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: number;
|
|
5
|
+
};
|
|
6
|
+
export type LineChartProps = {
|
|
7
|
+
data: LinePoint[];
|
|
8
|
+
/** Overall height in px (default 240). */
|
|
9
|
+
height?: number;
|
|
10
|
+
/** Force the axis maximum; otherwise a "nice" max is derived. */
|
|
11
|
+
max?: number;
|
|
12
|
+
/** Number of value gridlines/ticks (default 5, includes 0). */
|
|
13
|
+
ticks?: number;
|
|
14
|
+
/** Line colour (default brand). */
|
|
15
|
+
color?: string;
|
|
16
|
+
/** Fill the area under the line (default true). */
|
|
17
|
+
area?: boolean;
|
|
18
|
+
/** Draw a dot at each point (default true). */
|
|
19
|
+
dots?: boolean;
|
|
20
|
+
/** Formats axis ticks and point values. */
|
|
21
|
+
format?: (n: number) => string;
|
|
22
|
+
/** Category-axis title, shown centred below the labels. */
|
|
23
|
+
xAxisTitle?: React.ReactNode;
|
|
24
|
+
"aria-label"?: string;
|
|
25
|
+
className?: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* A responsive line chart — measured from Attio's Reports historical charts.
|
|
29
|
+
* A stretched SVG line/area (non-scaling stroke keeps it crisp) over dashed
|
|
30
|
+
* gridlines; dots are HTML so they stay round. `role="img"` with a summary.
|
|
31
|
+
*/
|
|
32
|
+
export declare function LineChart({ data, height, max, ticks, color, area, dots, format, xAxisTitle, "aria-label": ariaLabel, className, }: LineChartProps): React.JSX.Element;
|
|
33
|
+
export declare namespace LineChart {
|
|
34
|
+
var displayName: string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type MenuProps = {
|
|
3
|
+
/** The element that opens the menu (an icon button, etc.). */
|
|
4
|
+
trigger: React.ReactElement;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** Align the menu to the start (left) or end (right) of the trigger. */
|
|
7
|
+
align?: "start" | "end";
|
|
8
|
+
className?: string;
|
|
9
|
+
"aria-label"?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A dropdown menu — the ⋯ / sort / filter menu surface, on Attio's measured
|
|
13
|
+
* popover. Give it a `trigger` element and Menu items as children. Opens on
|
|
14
|
+
* click / ↓ / Enter; roving-focus keyboard model (↑/↓ move, Home/End jump,
|
|
15
|
+
* typeahead, Enter/Space select, Esc closes and returns focus to the trigger);
|
|
16
|
+
* closes on outside click. Flips up / right-aligns when space is tight.
|
|
17
|
+
*/
|
|
18
|
+
export declare function Menu({ trigger, children, align, className, "aria-label": ariaLabel, }: MenuProps): React.JSX.Element;
|
|
19
|
+
export declare namespace Menu {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
22
|
+
export type MenuItemProps = {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
icon?: React.ReactNode;
|
|
25
|
+
shortcut?: string;
|
|
26
|
+
danger?: boolean;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
onSelect?: () => void;
|
|
29
|
+
/** Keep the menu open after selecting (default closes). */
|
|
30
|
+
closeOnSelect?: boolean;
|
|
31
|
+
};
|
|
32
|
+
export declare function MenuItem({ children, icon, shortcut, danger, disabled, onSelect, closeOnSelect, }: MenuItemProps): React.JSX.Element;
|
|
33
|
+
export declare namespace MenuItem {
|
|
34
|
+
var displayName: string;
|
|
35
|
+
}
|
|
36
|
+
export type MenuCheckboxItemProps = {
|
|
37
|
+
children: React.ReactNode;
|
|
38
|
+
checked?: boolean;
|
|
39
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
};
|
|
42
|
+
export declare function MenuCheckboxItem({ children, checked, onCheckedChange, disabled, }: MenuCheckboxItemProps): React.JSX.Element;
|
|
43
|
+
export declare namespace MenuCheckboxItem {
|
|
44
|
+
var displayName: string;
|
|
45
|
+
}
|
|
46
|
+
export declare function MenuSeparator(): React.JSX.Element;
|
|
47
|
+
export declare namespace MenuSeparator {
|
|
48
|
+
var displayName: string;
|
|
49
|
+
}
|
|
50
|
+
export declare function MenuLabel({ children }: {
|
|
51
|
+
children: React.ReactNode;
|
|
52
|
+
}): React.JSX.Element;
|
|
53
|
+
export declare namespace MenuLabel {
|
|
54
|
+
var displayName: string;
|
|
55
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type MultiSelectOption = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** Chip colour tone; falls back to a deterministic pastel per value. */
|
|
6
|
+
tone?: string;
|
|
7
|
+
};
|
|
8
|
+
export type MultiSelectProps = {
|
|
9
|
+
options: MultiSelectOption[];
|
|
10
|
+
value: string[];
|
|
11
|
+
onValueChange: (value: string[]) => void;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
/** Show a filter field at the top of the list (default true). */
|
|
14
|
+
searchable?: boolean;
|
|
15
|
+
searchPlaceholder?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
"aria-label"?: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A multi-select / tag editor — measured from Attio's cell tag picker. The
|
|
22
|
+
* outlined trigger shows the selected values as coloured chips; it opens a
|
|
23
|
+
* popover with a search field over rows of "[chip] … [checkbox]" that toggle on
|
|
24
|
+
* click (the menu stays open). Keyboard: ↑/↓ move, Enter toggles, Esc closes.
|
|
25
|
+
*/
|
|
26
|
+
export declare function MultiSelect({ options, value, onValueChange, placeholder, searchable, searchPlaceholder, disabled, className, "aria-label": ariaLabel, }: MultiSelectProps): React.JSX.Element;
|
|
27
|
+
export declare namespace MultiSelect {
|
|
28
|
+
var displayName: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type PopoverProps = {
|
|
3
|
+
/** The element that toggles the popover (gets aria + click wiring). */
|
|
4
|
+
trigger: React.ReactElement;
|
|
5
|
+
/** Popover body. */
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/** Align the popover to the trigger's left (`start`) or right (`end`) edge. */
|
|
8
|
+
align?: "start" | "end";
|
|
9
|
+
/** Controlled open state. Omit to let the popover manage it. */
|
|
10
|
+
open?: boolean;
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
12
|
+
"aria-label"?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A generic anchored popover — the Menu/Select surface holding arbitrary
|
|
17
|
+
* content. Opens below the trigger (flipping up when there's no room),
|
|
18
|
+
* closes on outside pointer-down and Escape. Controlled or self-managed.
|
|
19
|
+
*/
|
|
20
|
+
export declare function Popover({ trigger, children, align, open: openProp, onOpenChange, "aria-label": ariaLabel, className, }: PopoverProps): React.JSX.Element;
|
|
21
|
+
export declare namespace Popover {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type ProgressProps = {
|
|
2
|
+
/** Current value. */
|
|
3
|
+
value: number;
|
|
4
|
+
/** Maximum value (default 100). */
|
|
5
|
+
max?: number;
|
|
6
|
+
/** Render as N discrete segments (Attio's step bar) instead of a continuous fill. */
|
|
7
|
+
segments?: number;
|
|
8
|
+
"aria-label"?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A progress bar — a continuous brand fill, or a segmented row of pills when
|
|
13
|
+
* `segments` is set (the "Getting started 3/6" pattern). Reports its state via
|
|
14
|
+
* `role="progressbar"` and the ARIA value attributes.
|
|
15
|
+
*/
|
|
16
|
+
export declare function Progress({ value, max, segments, "aria-label": ariaLabel, className, }: ProgressProps): import("react").JSX.Element;
|
|
17
|
+
export declare namespace Progress {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type RadioGroupProps = {
|
|
3
|
+
/** Controlled value. Omit to let the group manage it (see defaultValue). */
|
|
4
|
+
value?: string;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
onValueChange?: (value: string) => void;
|
|
7
|
+
/** `default` = rows (dot + label); `card` = bordered preview cards. */
|
|
8
|
+
variant?: "default" | "card";
|
|
9
|
+
name?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
"aria-label"?: string;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A radio group — measured from Attio's settings. `default` renders rows (a ring
|
|
16
|
+
* that fills brand when selected + a label); `card` renders a row of bordered
|
|
17
|
+
* preview cards whose border turns brand when picked (the Theme picker). Arrow
|
|
18
|
+
* keys move between options (roving focus). Controlled or uncontrolled.
|
|
19
|
+
*/
|
|
20
|
+
export declare function RadioGroup({ value, defaultValue, onValueChange, variant, name, className, "aria-label": ariaLabel, children, }: RadioGroupProps): React.JSX.Element;
|
|
21
|
+
export declare namespace RadioGroup {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
24
|
+
export type RadioProps = {
|
|
25
|
+
value: string;
|
|
26
|
+
label?: React.ReactNode;
|
|
27
|
+
/** Preview content for the `card` variant (shown above the label). */
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
className?: string;
|
|
31
|
+
};
|
|
32
|
+
export declare function Radio({ value, label, children, disabled }: RadioProps): React.JSX.Element;
|
|
33
|
+
export declare namespace Radio {
|
|
34
|
+
var displayName: string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type SegmentedOption = {
|
|
3
|
+
value: string;
|
|
4
|
+
/** Visible label. Omit for an icon-only segment (pass `icon` + `aria-label`). */
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
"aria-label"?: string;
|
|
9
|
+
};
|
|
10
|
+
export type SegmentedProps = {
|
|
11
|
+
options: SegmentedOption[];
|
|
12
|
+
/** Controlled value. Omit to let the control manage it (see defaultValue). */
|
|
13
|
+
value?: string;
|
|
14
|
+
defaultValue?: string;
|
|
15
|
+
onValueChange?: (value: string) => void;
|
|
16
|
+
"aria-label"?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* A segmented control (single-choice toggle) — measured from Attio's view
|
|
21
|
+
* switcher. `role="radiogroup"` over `role="radio"` buttons with roving
|
|
22
|
+
* tabindex and ←/→ (Home/End) keyboard selection.
|
|
23
|
+
*/
|
|
24
|
+
export declare function Segmented({ options, value, defaultValue, onValueChange, "aria-label": ariaLabel, className, }: SegmentedProps): React.JSX.Element;
|
|
25
|
+
export declare namespace Segmented {
|
|
26
|
+
var displayName: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type SelectOption = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
/** Text used for filtering when `searchable` (falls back to a string label). */
|
|
6
|
+
keywords?: string;
|
|
7
|
+
/** A status colour dot shown before the label (Attio status/select fields). */
|
|
8
|
+
color?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type SelectProps = {
|
|
12
|
+
options: SelectOption[];
|
|
13
|
+
/** Controlled value. Omit to let Select manage it (see defaultValue). */
|
|
14
|
+
value?: string;
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
onValueChange?: (value: string) => void;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
/** `ghost` is borderless until hover — for inline selects (e.g. sort rows). */
|
|
19
|
+
variant?: "default" | "ghost";
|
|
20
|
+
/** Show a search field at the top of the list that filters options (Linear/cmdk style). */
|
|
21
|
+
searchable?: boolean;
|
|
22
|
+
searchPlaceholder?: string;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
"aria-label"?: string;
|
|
26
|
+
id?: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* A select / dropdown — the settings control, measured from Attio, with an
|
|
30
|
+
* optional Linear-style search. A `role="combobox"` trigger opens a
|
|
31
|
+
* `role="listbox"`; pass `searchable` to add a filter field at the top (with a
|
|
32
|
+
* "No results" empty state). Full keyboard model — ↑/↓ move, Enter/Space pick,
|
|
33
|
+
* Esc close, Home/End jump, opens upward when tight. Controlled or uncontrolled.
|
|
34
|
+
*/
|
|
35
|
+
export declare function Select({ options, value, defaultValue, onValueChange, placeholder, variant, searchable, searchPlaceholder, disabled, className, "aria-label": ariaLabel, id, }: SelectProps): React.JSX.Element;
|
|
36
|
+
export declare namespace Select {
|
|
37
|
+
var displayName: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const config: import("../..").RecipeConfig<{
|
|
2
|
+
variant: {
|
|
3
|
+
default: string;
|
|
4
|
+
ghost: string;
|
|
5
|
+
};
|
|
6
|
+
}>;
|
|
7
|
+
export declare const selectRecipe: import("../..").RecipeFn<{
|
|
8
|
+
variant: {
|
|
9
|
+
default: string;
|
|
10
|
+
ghost: string;
|
|
11
|
+
};
|
|
12
|
+
}> & {
|
|
13
|
+
config: import("../..").RecipeConfig<{
|
|
14
|
+
variant: {
|
|
15
|
+
default: string;
|
|
16
|
+
ghost: string;
|
|
17
|
+
};
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
export default config;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type SkeletonProps = {
|
|
2
|
+
width?: number | string;
|
|
3
|
+
height?: number | string;
|
|
4
|
+
/** Render as a circle (avatar placeholder). */
|
|
5
|
+
circle?: boolean;
|
|
6
|
+
radius?: number | string;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
/** A pulsing placeholder block sized to the content it stands in for. */
|
|
10
|
+
export declare function Skeleton({ width, height, circle, radius, className, }: SkeletonProps): import("react").JSX.Element;
|
|
11
|
+
export declare namespace Skeleton {
|
|
12
|
+
var displayName: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type SpinnerProps = {
|
|
2
|
+
/** Diameter in px (default 16). Border scales with it. */
|
|
3
|
+
size?: number;
|
|
4
|
+
"aria-label"?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
/** A spinning ring indicator. Reports `role="status"` for assistive tech. */
|
|
8
|
+
export declare function Spinner({ size, "aria-label": ariaLabel, className, }: SpinnerProps): import("react").JSX.Element;
|
|
9
|
+
export declare namespace Spinner {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type Stage = {
|
|
2
|
+
label: string;
|
|
3
|
+
/** Stage colour (CSS). Defaults to the brand colour. */
|
|
4
|
+
color?: string;
|
|
5
|
+
};
|
|
6
|
+
export type StageBarProps = {
|
|
7
|
+
stages: Stage[];
|
|
8
|
+
/** The current stage, by index or by matching `label`. */
|
|
9
|
+
current: number | string;
|
|
10
|
+
"aria-label"?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A pipeline stage bar — measured from Attio's Deal-stage Highlight. Each stage
|
|
15
|
+
* is a segment tinted with its colour; the current stage is at full strength.
|
|
16
|
+
*/
|
|
17
|
+
export declare function StageBar({ stages, current, "aria-label": ariaLabel, className, }: StageBarProps): import("react").JSX.Element;
|
|
18
|
+
export declare namespace StageBar {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type StatCardProps = {
|
|
3
|
+
/** Small muted metric name. */
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
/** Optional icon shown before the label. */
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
/** The headline value (already formatted). */
|
|
8
|
+
value: React.ReactNode;
|
|
9
|
+
/** Signed delta rendered as a coloured pill (e.g. `12` → "▲ 12%"). */
|
|
10
|
+
delta?: number;
|
|
11
|
+
/** Suffix for the delta pill (default "%"). */
|
|
12
|
+
deltaSuffix?: string;
|
|
13
|
+
/** Caption after the delta (e.g. "vs last month"). */
|
|
14
|
+
caption?: React.ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* A single-metric KPI tile — measured from Attio's Reports number/insight cards.
|
|
19
|
+
* Label, a large value, and an optional up/down delta pill with a caption.
|
|
20
|
+
*/
|
|
21
|
+
export declare function StatCard({ label, icon, value, delta, deltaSuffix, caption, className, }: StatCardProps): React.JSX.Element;
|
|
22
|
+
export declare namespace StatCard {
|
|
23
|
+
var displayName: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type SwitchProps = Omit<React.ComponentPropsWithoutRef<"button">, "onChange" | "type"> & {
|
|
3
|
+
/** Controlled on/off. Omit to let Switch manage it (see defaultChecked). */
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
defaultChecked?: boolean;
|
|
6
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* An on/off toggle — the settings switch, measured from Attio. Renders a
|
|
10
|
+
* `role="switch"` button (a native checkbox's semantics without its box), so
|
|
11
|
+
* label association and keyboard (Space/Enter) come for free. Controlled via
|
|
12
|
+
* `checked`/`onCheckedChange`, or uncontrolled from `defaultChecked`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const Switch: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "onChange" | "type"> & {
|
|
15
|
+
/** Controlled on/off. Omit to let Switch manage it (see defaultChecked). */
|
|
16
|
+
checked?: boolean;
|
|
17
|
+
defaultChecked?: boolean;
|
|
18
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
19
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const config: import("../..").RecipeConfig<{}>;
|
|
2
|
+
export declare const switchRecipe: import("../..").RecipeFn<{}> & {
|
|
3
|
+
config: import("../..").RecipeConfig<{}>;
|
|
4
|
+
meta: {
|
|
5
|
+
track: {
|
|
6
|
+
width: string;
|
|
7
|
+
height: string;
|
|
8
|
+
};
|
|
9
|
+
thumb: {
|
|
10
|
+
size: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default config;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type TabItem = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
/** Leading icon (e.g. a 16px Lucide element) shown before the label. */
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
/** Optional count/badge shown after the label (e.g. Emails · 0). */
|
|
8
|
+
badge?: React.ReactNode;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type TabsProps = {
|
|
12
|
+
tabs: TabItem[];
|
|
13
|
+
/** Controlled active value. Omit to let Tabs manage it (see defaultValue). */
|
|
14
|
+
value?: string;
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
onValueChange?: (value: string) => void;
|
|
17
|
+
/** Non-tab content pinned to the start of the bar (e.g. a favourite star). */
|
|
18
|
+
leading?: React.ReactNode;
|
|
19
|
+
/** Rendered for the active tab. Receives the active value. */
|
|
20
|
+
children?: (value: string) => React.ReactNode;
|
|
21
|
+
className?: string;
|
|
22
|
+
"aria-label"?: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A row of text tabs over a sliding ink underline — the record-view tab bar,
|
|
26
|
+
* measured from Attio. Roving-tabindex keyboard model (←/→ move + activate,
|
|
27
|
+
* Home/End jump); activation follows focus, matching Attio. Controlled via
|
|
28
|
+
* `value`/`onValueChange`, or uncontrolled from `defaultValue`.
|
|
29
|
+
*/
|
|
30
|
+
export declare function Tabs({ tabs, value, defaultValue, onValueChange, leading, children, className, "aria-label": ariaLabel, }: TabsProps): React.JSX.Element;
|
|
31
|
+
export declare namespace Tabs {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type TextareaProps = React.ComponentPropsWithoutRef<"textarea"> & {
|
|
3
|
+
/** Show a "N / maxLength" counter bottom-right (also caps input at maxLength). */
|
|
4
|
+
showCount?: boolean;
|
|
5
|
+
/** Extra class on the wrapper. */
|
|
6
|
+
wrapperClassName?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* A multiline text field — measured from Attio's settings. Forwards every native
|
|
10
|
+
* `<textarea>` prop; pass `showCount` with `maxLength` to render a live
|
|
11
|
+
* character counter (which turns red if the value exceeds the limit).
|
|
12
|
+
*/
|
|
13
|
+
export declare const Textarea: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & {
|
|
14
|
+
/** Show a "N / maxLength" counter bottom-right (also caps input at maxLength). */
|
|
15
|
+
showCount?: boolean;
|
|
16
|
+
/** Extra class on the wrapper. */
|
|
17
|
+
wrapperClassName?: string;
|
|
18
|
+
} & React.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type ToastTone = "info" | "success" | "warning" | "danger";
|
|
3
|
+
export type ToastOptions = {
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
tone?: ToastTone;
|
|
7
|
+
/** Auto-dismiss after this many ms (0 = sticky). Defaults to the provider's. */
|
|
8
|
+
duration?: number;
|
|
9
|
+
action?: {
|
|
10
|
+
label: string;
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
type ToastApi = {
|
|
15
|
+
toast: (o: ToastOptions) => number;
|
|
16
|
+
dismiss: (id: number) => void;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Wrap your app in a `ToastProvider`, then call `useToast().toast({...})` from
|
|
20
|
+
* anywhere to push a notification. Toasts stack bottom-right and auto-dismiss
|
|
21
|
+
* after `duration` (default 4s; 0 keeps them until dismissed).
|
|
22
|
+
*/
|
|
23
|
+
export declare function ToastProvider({ children, duration, }: {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
duration?: number;
|
|
26
|
+
}): React.JSX.Element;
|
|
27
|
+
export declare namespace ToastProvider {
|
|
28
|
+
var displayName: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function useToast(): ToastApi;
|
|
31
|
+
export {};
|