@ddmetrics/untitled-ui-make-kit 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/ATTRIBUTIONS.md +3 -0
- package/README.md +60 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2054 -0
- package/dist/kit.d.ts +10 -0
- package/dist/untitled-kit/components/base.d.ts +7 -0
- package/dist/untitled-kit/components/foundations.d.ts +5 -0
- package/dist/untitled-kit/components/index.d.ts +3 -0
- package/dist/untitled-kit/components/marketing.d.ts +3 -0
- package/dist/untitled-kit/components/source/base/avatar/avatar.d.ts +64 -0
- package/dist/untitled-kit/components/source/base/avatar/base-components/avatar-add-button.d.ts +8 -0
- package/dist/untitled-kit/components/source/base/avatar/base-components/avatar-company-icon.d.ts +7 -0
- package/dist/untitled-kit/components/source/base/avatar/base-components/avatar-count.d.ts +6 -0
- package/dist/untitled-kit/components/source/base/avatar/base-components/avatar-online-indicator.d.ts +7 -0
- package/dist/untitled-kit/components/source/base/avatar/base-components/index.d.ts +4 -0
- package/dist/untitled-kit/components/source/base/avatar/base-components/verified-tick.d.ts +6 -0
- package/dist/untitled-kit/components/source/base/badges/badge-groups.d.ts +22 -0
- package/dist/untitled-kit/components/source/base/badges/badge-types.d.ts +21 -0
- package/dist/untitled-kit/components/source/base/badges/badges.d.ts +128 -0
- package/dist/untitled-kit/components/source/base/buttons/button.d.ts +102 -0
- package/dist/untitled-kit/components/source/base/form/form.d.ts +6 -0
- package/dist/untitled-kit/components/source/base/input/hint-text.d.ts +14 -0
- package/dist/untitled-kit/components/source/base/input/input.d.ts +58 -0
- package/dist/untitled-kit/components/source/base/input/label.d.ts +15 -0
- package/dist/untitled-kit/components/source/base/tooltip/tooltip.d.ts +29 -0
- package/dist/untitled-kit/components/source/foundations/dot-icon.d.ts +4 -0
- package/dist/untitled-kit/components/source/foundations/featured-icon/featured-icon.d.ts +14 -0
- package/dist/untitled-kit/components/source/foundations/logo/untitledui-logo-minimal.d.ts +2 -0
- package/dist/untitled-kit/components/source/foundations/logo/untitledui-logo.d.ts +2 -0
- package/dist/untitled-kit/components/source/foundations/rating-stars.d.ts +29 -0
- package/dist/untitled-kit/components/source/marketing/features/base-components/feature-text.d.ts +37 -0
- package/dist/untitled-kit/components/source/marketing/header-section/base-components/flow-pattern.d.ts +2 -0
- package/dist/untitled-kit/components/source/marketing/pricing-sections/base-components/pricing-tier-card.d.ts +87 -0
- package/dist/untitled-kit/hooks/use-breakpoint.d.ts +9 -0
- package/dist/untitled-kit/hooks/use-resize-observer.d.ts +24 -0
- package/dist/untitled-kit/index.d.ts +3 -0
- package/dist/untitled-kit/templates/CTANewsletterTemplate.d.ts +8 -0
- package/dist/untitled-kit/templates/ContentSplitImageTemplate.d.ts +2 -0
- package/dist/untitled-kit/templates/FAQAccordionTemplate.d.ts +10 -0
- package/dist/untitled-kit/templates/FeatureGridTemplate.d.ts +8 -0
- package/dist/untitled-kit/templates/FooterTemplate.d.ts +7 -0
- package/dist/untitled-kit/templates/HeaderTemplate.d.ts +8 -0
- package/dist/untitled-kit/templates/HeroSplitImageTemplate.d.ts +10 -0
- package/dist/untitled-kit/templates/PricingSectionTemplate.d.ts +8 -0
- package/dist/untitled-kit/templates/TestimonialSectionTemplate.d.ts +5 -0
- package/dist/untitled-kit/templates/index.d.ts +17 -0
- package/dist/untitled-kit/types/marketing.d.ts +53 -0
- package/dist/untitled-kit/utils/cx.d.ts +11 -0
- package/dist/untitled-kit/utils/is-react-component.d.ts +19 -0
- package/dist/untitled-ui-make-kit.css +1 -0
- package/guidelines/Guidelines.md +96 -0
- package/guidelines/component-inventory.md +40 -0
- package/guidelines/section-mapping.md +131 -0
- package/guidelines/styles.md +87 -0
- package/package.json +59 -0
package/dist/kit.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Untitled UI Make Kit
|
|
3
|
+
*
|
|
4
|
+
* Import everything from "@/kit".
|
|
5
|
+
* - `components`: real Untitled UI source components.
|
|
6
|
+
* - `templates`: exact Untitled UI marketing section structures with editable props.
|
|
7
|
+
*/
|
|
8
|
+
export * from "@/untitled-kit";
|
|
9
|
+
export { cx, sortCx } from "@/untitled-kit/utils/cx";
|
|
10
|
+
export { isClassComponent, isFunctionComponent, isReactComponent } from "@/untitled-kit/utils/is-react-component";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Avatar } from "@/untitled-kit/components/source/base/avatar/avatar";
|
|
2
|
+
export { Badge, BadgeIcon, BadgeWithButton, BadgeWithDot, BadgeWithFlag, BadgeWithIcon, BadgeWithImage } from "@/untitled-kit/components/source/base/badges/badges";
|
|
3
|
+
export { BadgeGroup } from "@/untitled-kit/components/source/base/badges/badge-groups";
|
|
4
|
+
export { Button } from "@/untitled-kit/components/source/base/buttons/button";
|
|
5
|
+
export { Form } from "@/untitled-kit/components/source/base/form/form";
|
|
6
|
+
export { Input, InputBase, TextField } from "@/untitled-kit/components/source/base/input/input";
|
|
7
|
+
export { Tooltip, TooltipTrigger } from "@/untitled-kit/components/source/base/tooltip/tooltip";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Dot } from "@/untitled-kit/components/source/foundations/dot-icon";
|
|
2
|
+
export { FeaturedIcon } from "@/untitled-kit/components/source/foundations/featured-icon/featured-icon";
|
|
3
|
+
export { UntitledLogo } from "@/untitled-kit/components/source/foundations/logo/untitledui-logo";
|
|
4
|
+
export { UntitledLogoMinimal } from "@/untitled-kit/components/source/foundations/logo/untitledui-logo-minimal";
|
|
5
|
+
export { StarIcon } from "@/untitled-kit/components/source/foundations/rating-stars";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { FeatureTextFeaturedIconTopCentered, } from "@/untitled-kit/components/source/marketing/features/base-components/feature-text";
|
|
2
|
+
export { FlowPattern } from "@/untitled-kit/components/source/marketing/header-section/base-components/flow-pattern";
|
|
3
|
+
export { CheckItemText, PricingTierCardIcon, } from "@/untitled-kit/components/source/marketing/pricing-sections/base-components/pricing-tier-card";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type FC, type ReactNode } from "react";
|
|
2
|
+
export interface AvatarProps {
|
|
3
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
4
|
+
className?: string;
|
|
5
|
+
/**
|
|
6
|
+
* The class name for the main child of the avatar.
|
|
7
|
+
*/
|
|
8
|
+
contentClassName?: string;
|
|
9
|
+
src?: string | null;
|
|
10
|
+
alt?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Display an inner contrast border around the avatar image.
|
|
13
|
+
*/
|
|
14
|
+
contrastBorder?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the avatar should be rounded.
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
rounded?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Display an outer border around the avatar.
|
|
22
|
+
*/
|
|
23
|
+
border?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Display a badge (i.e. company logo).
|
|
26
|
+
*/
|
|
27
|
+
badge?: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Display a status indicator.
|
|
30
|
+
*/
|
|
31
|
+
status?: "online" | "offline";
|
|
32
|
+
/**
|
|
33
|
+
* Display a verified tick icon.
|
|
34
|
+
*
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
verified?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Display a count badge.
|
|
40
|
+
*/
|
|
41
|
+
count?: number;
|
|
42
|
+
/**
|
|
43
|
+
* The initials of the user to display if no image is available.
|
|
44
|
+
*/
|
|
45
|
+
initials?: string;
|
|
46
|
+
/**
|
|
47
|
+
* An icon to display if no image is available.
|
|
48
|
+
*/
|
|
49
|
+
placeholderIcon?: FC<{
|
|
50
|
+
className?: string;
|
|
51
|
+
}>;
|
|
52
|
+
/**
|
|
53
|
+
* A placeholder to display if no image is available.
|
|
54
|
+
*/
|
|
55
|
+
placeholder?: ReactNode;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the avatar should show a focus ring when the parent group is in focus.
|
|
58
|
+
* For example, when the avatar is wrapped inside a link.
|
|
59
|
+
*
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
focusable?: boolean;
|
|
63
|
+
}
|
|
64
|
+
export declare const Avatar: ({ size, src, alt, initials, placeholder, placeholderIcon: PlaceholderIcon, border, badge, status, verified, count, focusable, rounded, className, contentClassName, }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/untitled-kit/components/source/base/avatar/base-components/avatar-add-button.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ButtonProps as AriaButtonProps } from "react-aria-components";
|
|
2
|
+
interface AvatarAddButtonProps extends AriaButtonProps {
|
|
3
|
+
size: "xs" | "sm" | "md";
|
|
4
|
+
title?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const AvatarAddButton: ({ size, className, title, ...props }: AvatarAddButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
package/dist/untitled-kit/components/source/base/avatar/base-components/avatar-online-indicator.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface AvatarOnlineIndicatorProps {
|
|
2
|
+
size: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
|
|
3
|
+
status: "online" | "offline";
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const AvatarOnlineIndicator: ({ size, status, className }: AvatarOnlineIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { FC, ReactNode } from "react";
|
|
2
|
+
type Size = "md" | "lg";
|
|
3
|
+
type Color = "brand" | "warning" | "error" | "gray" | "success";
|
|
4
|
+
type Theme = "light" | "modern";
|
|
5
|
+
type Align = "leading" | "trailing";
|
|
6
|
+
interface BadgeGroupProps {
|
|
7
|
+
children?: string | ReactNode;
|
|
8
|
+
addonText: string;
|
|
9
|
+
size?: Size;
|
|
10
|
+
color: Color;
|
|
11
|
+
theme?: Theme;
|
|
12
|
+
/**
|
|
13
|
+
* Alignment of the badge addon element.
|
|
14
|
+
*/
|
|
15
|
+
align?: Align;
|
|
16
|
+
iconTrailing?: FC<{
|
|
17
|
+
className?: string;
|
|
18
|
+
}> | ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const BadgeGroup: ({ children, addonText, size, color, theme, align, className, iconTrailing: IconTrailing, }: BadgeGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type IconComponentType = React.FunctionComponent<{
|
|
2
|
+
className?: string;
|
|
3
|
+
strokeWidth?: string | number;
|
|
4
|
+
}>;
|
|
5
|
+
export type Sizes = "sm" | "md" | "lg";
|
|
6
|
+
export type BadgeColors = "gray" | "brand" | "error" | "warning" | "success" | "slate" | "sky" | "blue" | "indigo" | "purple" | "pink" | "orange";
|
|
7
|
+
export type FlagTypes = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ-1" | "BQ-2" | "BQ" | "BR" | "BS" | "BT" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD-1" | "CD" | "CF" | "CH" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DS" | "DZ" | "earth" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB-2" | "GB" | "GD" | "GE" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GQ" | "GR" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
|
|
8
|
+
export type ExtractColorKeys<T> = T extends {
|
|
9
|
+
styles: infer C;
|
|
10
|
+
} ? keyof C : never;
|
|
11
|
+
export type ExtractBadgeKeys<T> = keyof T;
|
|
12
|
+
export type BadgeTypeToColorMap<T> = {
|
|
13
|
+
[K in ExtractBadgeKeys<T>]: ExtractColorKeys<T[K]>;
|
|
14
|
+
};
|
|
15
|
+
export type BadgeTypeColors<T> = ExtractColorKeys<T[keyof T]>;
|
|
16
|
+
export declare const badgeTypes: {
|
|
17
|
+
readonly pillColor: "pill-color";
|
|
18
|
+
readonly badgeColor: "color";
|
|
19
|
+
readonly badgeModern: "modern";
|
|
20
|
+
};
|
|
21
|
+
export type BadgeTypes = (typeof badgeTypes)[keyof typeof badgeTypes];
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { MouseEventHandler, ReactNode } from "react";
|
|
2
|
+
import type { BadgeColors, BadgeTypeToColorMap, BadgeTypes, FlagTypes, IconComponentType, Sizes } from "./badge-types";
|
|
3
|
+
export declare const filledColors: Record<BadgeColors, {
|
|
4
|
+
root: string;
|
|
5
|
+
addon: string;
|
|
6
|
+
addonButton: string;
|
|
7
|
+
}>;
|
|
8
|
+
declare const withPillTypes: {
|
|
9
|
+
"pill-color": {
|
|
10
|
+
common: string;
|
|
11
|
+
styles: Record<BadgeColors, {
|
|
12
|
+
root: string;
|
|
13
|
+
addon: string;
|
|
14
|
+
addonButton: string;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
color: {
|
|
18
|
+
common: string;
|
|
19
|
+
styles: Record<BadgeColors, {
|
|
20
|
+
root: string;
|
|
21
|
+
addon: string;
|
|
22
|
+
addonButton: string;
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
25
|
+
modern: {
|
|
26
|
+
common: string;
|
|
27
|
+
styles: {
|
|
28
|
+
gray: {
|
|
29
|
+
root: string;
|
|
30
|
+
addon: string;
|
|
31
|
+
addonButton: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
declare const withBadgeTypes: {
|
|
37
|
+
"pill-color": {
|
|
38
|
+
common: string;
|
|
39
|
+
styles: Record<BadgeColors, {
|
|
40
|
+
root: string;
|
|
41
|
+
addon: string;
|
|
42
|
+
addonButton: string;
|
|
43
|
+
}>;
|
|
44
|
+
};
|
|
45
|
+
color: {
|
|
46
|
+
common: string;
|
|
47
|
+
styles: Record<BadgeColors, {
|
|
48
|
+
root: string;
|
|
49
|
+
addon: string;
|
|
50
|
+
addonButton: string;
|
|
51
|
+
}>;
|
|
52
|
+
};
|
|
53
|
+
modern: {
|
|
54
|
+
common: string;
|
|
55
|
+
styles: Record<BadgeColors, {
|
|
56
|
+
root: string;
|
|
57
|
+
addon: string;
|
|
58
|
+
}>;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export type BadgeColor<T extends BadgeTypes> = BadgeTypeToColorMap<typeof withPillTypes>[T];
|
|
62
|
+
interface BadgeProps<T extends BadgeTypes> {
|
|
63
|
+
type?: T;
|
|
64
|
+
size?: Sizes;
|
|
65
|
+
color?: BadgeColor<T>;
|
|
66
|
+
children: ReactNode;
|
|
67
|
+
className?: string;
|
|
68
|
+
}
|
|
69
|
+
export declare const Badge: <T extends BadgeTypes>(props: BadgeProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
interface BadgeWithDotProps<T extends BadgeTypes> {
|
|
71
|
+
type?: T;
|
|
72
|
+
size?: Sizes;
|
|
73
|
+
color?: BadgeTypeToColorMap<typeof withBadgeTypes>[T];
|
|
74
|
+
className?: string;
|
|
75
|
+
children: ReactNode;
|
|
76
|
+
}
|
|
77
|
+
export declare const BadgeWithDot: <T extends BadgeTypes>(props: BadgeWithDotProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
interface BadgeWithIconProps<T extends BadgeTypes> {
|
|
79
|
+
type?: T;
|
|
80
|
+
size?: Sizes;
|
|
81
|
+
color?: BadgeTypeToColorMap<typeof withBadgeTypes>[T];
|
|
82
|
+
iconLeading?: IconComponentType;
|
|
83
|
+
iconTrailing?: IconComponentType;
|
|
84
|
+
children: ReactNode;
|
|
85
|
+
className?: string;
|
|
86
|
+
}
|
|
87
|
+
export declare const BadgeWithIcon: <T extends BadgeTypes>(props: BadgeWithIconProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
88
|
+
interface BadgeWithFlagProps<T extends BadgeTypes> {
|
|
89
|
+
type?: T;
|
|
90
|
+
size?: Sizes;
|
|
91
|
+
flag?: FlagTypes;
|
|
92
|
+
color?: BadgeTypeToColorMap<typeof withPillTypes>[T];
|
|
93
|
+
children: ReactNode;
|
|
94
|
+
}
|
|
95
|
+
export declare const BadgeWithFlag: <T extends BadgeTypes>(props: BadgeWithFlagProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
96
|
+
interface BadgeWithImageProps<T extends BadgeTypes> {
|
|
97
|
+
type?: T;
|
|
98
|
+
size?: Sizes;
|
|
99
|
+
imgSrc: string;
|
|
100
|
+
color?: BadgeTypeToColorMap<typeof withPillTypes>[T];
|
|
101
|
+
children: ReactNode;
|
|
102
|
+
}
|
|
103
|
+
export declare const BadgeWithImage: <T extends BadgeTypes>(props: BadgeWithImageProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
104
|
+
interface BadgeWithButtonProps<T extends BadgeTypes> {
|
|
105
|
+
type?: T;
|
|
106
|
+
size?: Sizes;
|
|
107
|
+
icon?: IconComponentType;
|
|
108
|
+
color?: BadgeTypeToColorMap<typeof withPillTypes>[T];
|
|
109
|
+
children: ReactNode;
|
|
110
|
+
/**
|
|
111
|
+
* The label for the button.
|
|
112
|
+
*/
|
|
113
|
+
buttonLabel?: string;
|
|
114
|
+
/**
|
|
115
|
+
* The click event handler for the button.
|
|
116
|
+
*/
|
|
117
|
+
onButtonClick?: MouseEventHandler<HTMLButtonElement>;
|
|
118
|
+
}
|
|
119
|
+
export declare const BadgeWithButton: <T extends BadgeTypes>(props: BadgeWithButtonProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
120
|
+
interface BadgeIconProps<T extends BadgeTypes> {
|
|
121
|
+
type?: T;
|
|
122
|
+
size?: Sizes;
|
|
123
|
+
icon: IconComponentType;
|
|
124
|
+
color?: BadgeTypeToColorMap<typeof withPillTypes>[T];
|
|
125
|
+
children?: ReactNode;
|
|
126
|
+
}
|
|
127
|
+
export declare const BadgeIcon: <T extends BadgeTypes>(props: BadgeIconProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
128
|
+
export {};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from "react";
|
|
2
|
+
import type { ButtonProps as AriaButtonProps, LinkProps as AriaLinkProps } from "react-aria-components";
|
|
3
|
+
export declare const styles: {
|
|
4
|
+
common: {
|
|
5
|
+
root: string;
|
|
6
|
+
icon: string;
|
|
7
|
+
};
|
|
8
|
+
sizes: {
|
|
9
|
+
xs: {
|
|
10
|
+
root: string;
|
|
11
|
+
linkRoot: string;
|
|
12
|
+
};
|
|
13
|
+
sm: {
|
|
14
|
+
root: string;
|
|
15
|
+
linkRoot: string;
|
|
16
|
+
};
|
|
17
|
+
md: {
|
|
18
|
+
root: string;
|
|
19
|
+
linkRoot: string;
|
|
20
|
+
};
|
|
21
|
+
lg: {
|
|
22
|
+
root: string;
|
|
23
|
+
linkRoot: string;
|
|
24
|
+
};
|
|
25
|
+
xl: {
|
|
26
|
+
root: string;
|
|
27
|
+
linkRoot: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
colors: {
|
|
31
|
+
primary: {
|
|
32
|
+
root: string;
|
|
33
|
+
};
|
|
34
|
+
secondary: {
|
|
35
|
+
root: string;
|
|
36
|
+
};
|
|
37
|
+
tertiary: {
|
|
38
|
+
root: string;
|
|
39
|
+
};
|
|
40
|
+
"link-color": {
|
|
41
|
+
root: string;
|
|
42
|
+
};
|
|
43
|
+
"link-gray": {
|
|
44
|
+
root: string;
|
|
45
|
+
};
|
|
46
|
+
"primary-destructive": {
|
|
47
|
+
root: string;
|
|
48
|
+
};
|
|
49
|
+
"secondary-destructive": {
|
|
50
|
+
root: string;
|
|
51
|
+
};
|
|
52
|
+
"tertiary-destructive": {
|
|
53
|
+
root: string;
|
|
54
|
+
};
|
|
55
|
+
"link-destructive": {
|
|
56
|
+
root: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Common props shared between button and anchor variants
|
|
62
|
+
*/
|
|
63
|
+
export interface CommonProps {
|
|
64
|
+
/** Disables the button and shows a disabled state */
|
|
65
|
+
isDisabled?: boolean;
|
|
66
|
+
/** Shows a loading spinner and disables the button */
|
|
67
|
+
isLoading?: boolean;
|
|
68
|
+
/** The size variant of the button */
|
|
69
|
+
size?: keyof typeof styles.sizes;
|
|
70
|
+
/** The color variant of the button */
|
|
71
|
+
color?: keyof typeof styles.colors;
|
|
72
|
+
/** Icon component or element to show before the text */
|
|
73
|
+
iconLeading?: FC<{
|
|
74
|
+
className?: string;
|
|
75
|
+
}> | ReactNode;
|
|
76
|
+
/** Icon component or element to show after the text */
|
|
77
|
+
iconTrailing?: FC<{
|
|
78
|
+
className?: string;
|
|
79
|
+
}> | ReactNode;
|
|
80
|
+
/** Removes horizontal padding from the text content */
|
|
81
|
+
noTextPadding?: boolean;
|
|
82
|
+
/** When true, keeps the text visible during loading state */
|
|
83
|
+
showTextWhileLoading?: boolean;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Props for the button variant (non-link)
|
|
87
|
+
*/
|
|
88
|
+
export interface ButtonProps extends CommonProps, DetailedHTMLProps<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "color" | "slot">, HTMLButtonElement> {
|
|
89
|
+
/** Slot name for react-aria component */
|
|
90
|
+
slot?: AriaButtonProps["slot"];
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Props for the link variant (anchor tag)
|
|
94
|
+
*/
|
|
95
|
+
interface LinkProps extends CommonProps, DetailedHTMLProps<Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "color">, HTMLAnchorElement> {
|
|
96
|
+
/** Options for the configured client side router. */
|
|
97
|
+
routerOptions?: AriaLinkProps["routerOptions"];
|
|
98
|
+
}
|
|
99
|
+
/** Union type of button and link props */
|
|
100
|
+
export type Props = ButtonProps | LinkProps;
|
|
101
|
+
export declare const Button: ({ size, color, children, className, noTextPadding, iconLeading: IconLeading, iconTrailing: IconTrailing, isDisabled: disabled, isLoading: loading, showTextWhileLoading, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
102
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode, Ref } from "react";
|
|
2
|
+
import type { TextProps as AriaTextProps } from "react-aria-components";
|
|
3
|
+
interface HintTextProps extends AriaTextProps {
|
|
4
|
+
/** Indicates that the hint text is an error message. */
|
|
5
|
+
isInvalid?: boolean;
|
|
6
|
+
ref?: Ref<HTMLElement>;
|
|
7
|
+
size?: "sm" | "md";
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const HintText: {
|
|
11
|
+
({ isInvalid, className, size, ...props }: HintTextProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type ComponentType, type HTMLAttributes, type ReactNode, type Ref } from "react";
|
|
2
|
+
import type { InputProps as AriaInputProps, TextFieldProps as AriaTextFieldProps } from "react-aria-components";
|
|
3
|
+
export interface InputBaseProps extends Omit<AriaInputProps, "size"> {
|
|
4
|
+
/** Tooltip message on hover. */
|
|
5
|
+
tooltip?: string;
|
|
6
|
+
/** Whether the input is invalid. */
|
|
7
|
+
isInvalid?: boolean;
|
|
8
|
+
/** Whether the input is disabled. */
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
/** Whether the input is required. */
|
|
11
|
+
isRequired?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Input size.
|
|
14
|
+
* @default "sm"
|
|
15
|
+
*/
|
|
16
|
+
size?: "sm" | "md" | "lg";
|
|
17
|
+
/** Placeholder text. */
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
/** Class name for the icon. */
|
|
20
|
+
iconClassName?: string;
|
|
21
|
+
/** Class name for the input. */
|
|
22
|
+
inputClassName?: string;
|
|
23
|
+
/** Class name for the input wrapper. */
|
|
24
|
+
wrapperClassName?: string;
|
|
25
|
+
/** Class name for the tooltip. */
|
|
26
|
+
tooltipClassName?: string;
|
|
27
|
+
/** Keyboard shortcut to display. */
|
|
28
|
+
shortcut?: string | boolean;
|
|
29
|
+
ref?: Ref<HTMLInputElement>;
|
|
30
|
+
groupRef?: Ref<HTMLDivElement>;
|
|
31
|
+
/** Icon component to display on the left side of the input. */
|
|
32
|
+
icon?: ComponentType<HTMLAttributes<HTMLOrSVGElement>>;
|
|
33
|
+
}
|
|
34
|
+
export declare const InputBase: {
|
|
35
|
+
({ ref, tooltip, shortcut, groupRef, size, isInvalid, isDisabled, isRequired, icon: Icon, placeholder, wrapperClassName, tooltipClassName, inputClassName, iconClassName, type, ...inputProps }: InputBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
interface TextFieldContextProps extends Partial<Pick<InputBaseProps, "size" | "wrapperClassName" | "inputClassName" | "iconClassName" | "tooltipClassName">> {
|
|
39
|
+
}
|
|
40
|
+
export interface TextFieldProps extends AriaTextFieldProps, TextFieldContextProps {
|
|
41
|
+
}
|
|
42
|
+
export declare const TextField: {
|
|
43
|
+
({ className, size, inputClassName, wrapperClassName, iconClassName, tooltipClassName, ...props }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
displayName: string;
|
|
45
|
+
};
|
|
46
|
+
export interface InputProps extends AriaTextFieldProps, Pick<InputBaseProps, "ref" | "placeholder" | "icon" | "shortcut" | "tooltip" | "groupRef" | "size" | "wrapperClassName" | "inputClassName" | "iconClassName" | "tooltipClassName"> {
|
|
47
|
+
/** Label text for the input */
|
|
48
|
+
label?: string;
|
|
49
|
+
/** Helper text displayed below the input */
|
|
50
|
+
hint?: ReactNode;
|
|
51
|
+
/** Whether to hide required indicator from label */
|
|
52
|
+
hideRequiredIndicator?: boolean;
|
|
53
|
+
}
|
|
54
|
+
export declare const Input: {
|
|
55
|
+
({ size, placeholder, icon: Icon, label, hint, shortcut, hideRequiredIndicator, className, ref, groupRef, tooltip, iconClassName, inputClassName, wrapperClassName, tooltipClassName, type, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
displayName: string;
|
|
57
|
+
};
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode, Ref } from "react";
|
|
2
|
+
import type { LabelProps as AriaLabelProps } from "react-aria-components";
|
|
3
|
+
interface LabelProps extends AriaLabelProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
isInvalid?: boolean;
|
|
6
|
+
isRequired?: boolean;
|
|
7
|
+
tooltip?: string;
|
|
8
|
+
tooltipDescription?: string;
|
|
9
|
+
ref?: Ref<HTMLLabelElement>;
|
|
10
|
+
}
|
|
11
|
+
export declare const Label: {
|
|
12
|
+
({ isInvalid, isRequired, tooltip, tooltipDescription, className, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ButtonProps as AriaButtonProps, TooltipProps as AriaTooltipProps, TooltipTriggerComponentProps as AriaTooltipTriggerComponentProps } from "react-aria-components";
|
|
3
|
+
interface TooltipProps extends AriaTooltipTriggerComponentProps, Omit<AriaTooltipProps, "children"> {
|
|
4
|
+
/**
|
|
5
|
+
* The title of the tooltip.
|
|
6
|
+
*/
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* The description of the tooltip.
|
|
10
|
+
*/
|
|
11
|
+
description?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Whether to show the arrow on the tooltip.
|
|
14
|
+
*
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
arrow?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Delay in milliseconds before the tooltip is shown.
|
|
20
|
+
*
|
|
21
|
+
* @default 300
|
|
22
|
+
*/
|
|
23
|
+
delay?: number;
|
|
24
|
+
}
|
|
25
|
+
export declare const Tooltip: ({ title, description, children, arrow, delay, closeDelay, trigger, isDisabled, isOpen, defaultOpen, offset, crossOffset, placement, onOpenChange, ...tooltipProps }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
interface TooltipTriggerProps extends AriaButtonProps {
|
|
27
|
+
}
|
|
28
|
+
export declare const TooltipTrigger: ({ children, className, ...buttonProps }: TooltipTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FC, ReactNode, Ref } from "react";
|
|
2
|
+
interface FeaturedIconProps {
|
|
3
|
+
ref?: Ref<HTMLDivElement>;
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
icon?: FC<{
|
|
7
|
+
className?: string;
|
|
8
|
+
}> | ReactNode;
|
|
9
|
+
size?: "sm" | "md" | "lg" | "xl";
|
|
10
|
+
color: "brand" | "gray" | "success" | "warning" | "error";
|
|
11
|
+
theme?: "light" | "gradient" | "dark" | "outline" | "modern" | "modern-neue";
|
|
12
|
+
}
|
|
13
|
+
export declare const FeaturedIcon: (props: FeaturedIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { HTMLAttributes, SVGProps } from "react";
|
|
2
|
+
export declare const getStarProgress: (starPosition: number, rating: number, maxRating?: number) => number;
|
|
3
|
+
interface StarIconProps extends SVGProps<SVGSVGElement> {
|
|
4
|
+
/**
|
|
5
|
+
* The progress of the star icon. It should be a number between 0 and 100.
|
|
6
|
+
*
|
|
7
|
+
* @default 100
|
|
8
|
+
*/
|
|
9
|
+
progress?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const StarIcon: ({ progress, ...props }: StarIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
interface RatingStarsProps extends HTMLAttributes<HTMLDivElement> {
|
|
13
|
+
/**
|
|
14
|
+
* The rating to display.
|
|
15
|
+
*
|
|
16
|
+
* @default 5
|
|
17
|
+
*/
|
|
18
|
+
rating?: number;
|
|
19
|
+
/**
|
|
20
|
+
* The number of stars to display.
|
|
21
|
+
*/
|
|
22
|
+
stars?: number;
|
|
23
|
+
/**
|
|
24
|
+
* The class name of the star icon.
|
|
25
|
+
*/
|
|
26
|
+
starClassName?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare const RatingStars: ({ rating, stars, starClassName, ...props }: RatingStarsProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export {};
|