untitledui 0.1.5 → 0.1.8
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/config/postcss.config.mjs +6 -0
- package/{templates/default/src → config}/styles/globals.css +2 -33
- package/{templates/default/src → config}/styles/theme.css +31 -33
- package/{templates/default/src → config}/styles/typography.css +24 -24
- package/dist/index.mjs +54 -15
- package/package.json +4 -3
- package/templates/default/.prettierrc +0 -10
- package/templates/default/README.md +0 -36
- package/templates/default/eslint.config.mjs +0 -58
- package/templates/default/next.config.ts +0 -6
- package/templates/default/package.json +0 -56
- package/templates/default/postcss.config.js +0 -5
- package/templates/default/public/favicon.ico +0 -0
- package/templates/default/public/marketing/smiling-girl.png +0 -0
- package/templates/default/public/marketing/spirals.webp +0 -0
- package/templates/default/src/app/home-screen.tsx +0 -108
- package/templates/default/src/app/layout.tsx +0 -34
- package/templates/default/src/app/not-found.tsx +0 -40
- package/templates/default/src/app/page.tsx +0 -3
- package/templates/default/src/components/foundations/dot-icon.tsx +0 -27
- package/templates/default/src/components/foundations/featured-icon/featured-icons.tsx +0 -153
- package/templates/default/src/components/foundations/logo/UntitledLogo.tsx +0 -63
- package/templates/default/src/components/foundations/logo/UntitledLogoMinimal.tsx +0 -164
- package/templates/default/src/components/foundations/payment-icons/amex-icon.tsx +0 -19
- package/templates/default/src/components/foundations/payment-icons/apple-pay-icon.tsx +0 -27
- package/templates/default/src/components/foundations/payment-icons/discover-icon.tsx +0 -34
- package/templates/default/src/components/foundations/payment-icons/index.tsx +0 -10
- package/templates/default/src/components/foundations/payment-icons/mastercard-icon.tsx +0 -39
- package/templates/default/src/components/foundations/payment-icons/paypal-icon.tsx +0 -45
- package/templates/default/src/components/foundations/payment-icons/stripe-icon.tsx +0 -27
- package/templates/default/src/components/foundations/payment-icons/union-pay-icon.tsx +0 -37
- package/templates/default/src/components/foundations/payment-icons/visa-icon.tsx +0 -27
- package/templates/default/src/components/marketing/header-navigation/base-components/nav-menu-item.tsx +0 -41
- package/templates/default/src/components/marketing/header-navigation/components/header.tsx +0 -245
- package/templates/default/src/components/marketing/header-navigation/dropdown-header-navigation.tsx +0 -53
- package/templates/default/src/components/shared/avatar/avatar-label-group.tsx +0 -32
- package/templates/default/src/components/shared/avatar/avatar-profile-photo.tsx +0 -84
- package/templates/default/src/components/shared/avatar/avatar.tsx +0 -131
- package/templates/default/src/components/shared/avatar/base-components/avatar-add-button.tsx +0 -33
- package/templates/default/src/components/shared/avatar/base-components/avatar-company-icon.tsx +0 -26
- package/templates/default/src/components/shared/avatar/base-components/avatar-online-indicator.tsx +0 -31
- package/templates/default/src/components/shared/avatar/base-components/index.ts +0 -4
- package/templates/default/src/components/shared/avatar/base-components/verified-tick.tsx +0 -34
- package/templates/default/src/components/shared/avatar/utils.ts +0 -12
- package/templates/default/src/components/shared/badges/badge-groups.tsx +0 -176
- package/templates/default/src/components/shared/badges/badge-types.ts +0 -264
- package/templates/default/src/components/shared/badges/badges.tsx +0 -479
- package/templates/default/src/components/shared/button-group/button-group.tsx +0 -97
- package/templates/default/src/components/shared/buttons/app-store-buttons-outline.tsx +0 -454
- package/templates/default/src/components/shared/buttons/app-store-buttons.tsx +0 -806
- package/templates/default/src/components/shared/buttons/button-utility.tsx +0 -87
- package/templates/default/src/components/shared/buttons/button.tsx +0 -285
- package/templates/default/src/components/shared/buttons/close-button.tsx +0 -39
- package/templates/default/src/components/shared/buttons/social-button.tsx +0 -135
- package/templates/default/src/components/shared/buttons/social-logos.tsx +0 -115
- package/templates/default/src/components/shared/checkbox/checkbox.tsx +0 -120
- package/templates/default/src/components/shared/dropdown/dropdown.tsx +0 -147
- package/templates/default/src/components/shared/file-upload-trigger/file-upload-trigger.tsx +0 -74
- package/templates/default/src/components/shared/form/form.tsx +0 -10
- package/templates/default/src/components/shared/form/hook-form.tsx +0 -75
- package/templates/default/src/components/shared/input/hint-text.tsx +0 -34
- package/templates/default/src/components/shared/input/index.tsx +0 -189
- package/templates/default/src/components/shared/input/input-payment.tsx +0 -134
- package/templates/default/src/components/shared/input/input-with-button.tsx +0 -69
- package/templates/default/src/components/shared/input/input-with-dropdown.tsx +0 -178
- package/templates/default/src/components/shared/input/input-with-prefix.tsx +0 -74
- package/templates/default/src/components/shared/input/label.tsx +0 -46
- package/templates/default/src/components/shared/progress-indicators/progress-circles.tsx +0 -176
- package/templates/default/src/components/shared/progress-indicators/progress-indicators.tsx +0 -86
- package/templates/default/src/components/shared/progress-indicators/simple-circle.tsx +0 -29
- package/templates/default/src/components/shared/radio-buttons/radio-buttons.tsx +0 -125
- package/templates/default/src/components/shared/radio-groups/radio-group-avatar.tsx +0 -62
- package/templates/default/src/components/shared/radio-groups/radio-group-checkbox.tsx +0 -72
- package/templates/default/src/components/shared/radio-groups/radio-group-icon-card.tsx +0 -95
- package/templates/default/src/components/shared/radio-groups/radio-group-icon-simple.tsx +0 -70
- package/templates/default/src/components/shared/radio-groups/radio-group-payment-icon.tsx +0 -71
- package/templates/default/src/components/shared/radio-groups/radio-group-radio-button.tsx +0 -76
- package/templates/default/src/components/shared/radio-groups/radio-groups.tsx +0 -8
- package/templates/default/src/components/shared/select/combobox.tsx +0 -161
- package/templates/default/src/components/shared/select/multi-select.tsx +0 -373
- package/templates/default/src/components/shared/select/popover.tsx +0 -36
- package/templates/default/src/components/shared/select/select-item.tsx +0 -70
- package/templates/default/src/components/shared/select/select-native.tsx +0 -63
- package/templates/default/src/components/shared/select/select.tsx +0 -143
- package/templates/default/src/components/shared/slider/slider.tsx +0 -76
- package/templates/default/src/components/shared/tags/base-components/tag-checkbox.tsx +0 -47
- package/templates/default/src/components/shared/tags/base-components/tag-close-x.tsx +0 -34
- package/templates/default/src/components/shared/tags/tags.tsx +0 -162
- package/templates/default/src/components/shared/textarea/textarea.tsx +0 -82
- package/templates/default/src/components/shared/toggle/toggle.tsx +0 -140
- package/templates/default/src/components/shared/tooltips/tooltips.tsx +0 -140
- package/templates/default/src/components/utils/index.ts +0 -48
- package/templates/default/src/components/utils/isDeepEqual.ts +0 -31
- package/templates/default/src/components/utils/isReactComponent.ts +0 -22
- package/templates/default/src/components/utils/mergeRefs.ts +0 -19
- package/templates/default/src/components/utils/useBreakpoint.ts +0 -36
- package/templates/default/src/components/utils/uuid.ts +0 -9
- package/templates/default/src/hooks/use-resize-observer.tsx +0 -55
- package/templates/default/src/providers/theme.tsx +0 -11
- package/templates/default/src/styles/text-styles.css +0 -177
- package/templates/default/tsconfig.json +0 -27
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { cx } from "@/components/utils/cx";
|
|
4
|
-
|
|
5
|
-
const sizes = {
|
|
6
|
-
xs: { root: "size-2.5", tick: "size-[4.38px" },
|
|
7
|
-
sm: { root: "size-3", tick: "size-[5.25px]" },
|
|
8
|
-
md: { root: "size-3.5", tick: "size-[6.13px]" },
|
|
9
|
-
lg: { root: "size-4", tick: "size-[7px]" },
|
|
10
|
-
xl: { root: "size-4.5", tick: "size-[7.88px]" },
|
|
11
|
-
"2xl": { root: "size-5", tick: "size-[8.75px]" },
|
|
12
|
-
"3xl": { root: "size-6", tick: "size-[10.5px]" },
|
|
13
|
-
"4xl": { root: "size-8", tick: "size-[14px]" },
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
interface VerifiedTickProps {
|
|
17
|
-
size: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
|
|
18
|
-
className?: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const VerifiedTick = ({ size, className }: VerifiedTickProps) => (
|
|
22
|
-
<svg data-verified className={cx("z-10 text-utility-blue-500", sizes[size].root, className)} viewBox="0 0 10 10" fill="none">
|
|
23
|
-
<path
|
|
24
|
-
d="M7.72237 1.77098C7.81734 2.00068 7.99965 2.18326 8.2292 2.27858L9.03413 2.61199C9.26384 2.70714 9.44635 2.88965 9.5415 3.11936C9.63665 3.34908 9.63665 3.60718 9.5415 3.83689L9.20833 4.64125C9.11313 4.87106 9.113 5.12943 9.20863 5.35913L9.54122 6.16325C9.58839 6.27702 9.61268 6.39897 9.6127 6.52214C9.61272 6.6453 9.58847 6.76726 9.54134 6.88105C9.4942 6.99484 9.42511 7.09823 9.33801 7.18531C9.2509 7.27238 9.14749 7.34144 9.03369 7.38854L8.22934 7.72171C7.99964 7.81669 7.81706 7.99899 7.72174 8.22855L7.38833 9.03348C7.29318 9.26319 7.11067 9.4457 6.88096 9.54085C6.65124 9.636 6.39314 9.636 6.16343 9.54085L5.35907 9.20767C5.12935 9.11276 4.87134 9.11295 4.64177 9.20821L3.83684 9.54115C3.60725 9.63608 3.34937 9.636 3.11984 9.54092C2.89032 9.44585 2.70791 9.26356 2.6127 9.03409L2.27918 8.22892C2.18421 7.99923 2.0019 7.81665 1.77235 7.72133L0.967421 7.38792C0.737807 7.29281 0.555355 7.11041 0.460169 6.88083C0.364983 6.65125 0.364854 6.39327 0.45981 6.16359L0.792984 5.35924C0.8879 5.12952 0.887707 4.87151 0.792445 4.64193L0.459749 3.83642C0.41258 3.72265 0.388291 3.60069 0.388272 3.47753C0.388252 3.35436 0.412501 3.2324 0.459634 3.11861C0.506767 3.00482 0.57586 2.90144 0.662965 2.81436C0.75007 2.72728 0.853479 2.65822 0.967283 2.61113L1.77164 2.27795C2.00113 2.18306 2.1836 2.00099 2.27899 1.7717L2.6124 0.966768C2.70755 0.737054 2.89006 0.554547 3.11978 0.459397C3.34949 0.364246 3.60759 0.364246 3.83731 0.459397L4.64166 0.792571C4.87138 0.887487 5.12939 0.887293 5.35897 0.792031L6.16424 0.459913C6.39392 0.364816 6.65197 0.364836 6.88164 0.459968C7.11131 0.555099 7.29379 0.737554 7.38895 0.967208L7.72247 1.77238L7.72237 1.77098Z"
|
|
25
|
-
className="fill-current"
|
|
26
|
-
/>
|
|
27
|
-
<path
|
|
28
|
-
fillRule="evenodd"
|
|
29
|
-
clipRule="evenodd"
|
|
30
|
-
d="M6.95829 3.68932C7.02509 3.58439 7.04747 3.45723 7.02051 3.3358C6.99356 3.21437 6.91946 3.10862 6.81454 3.04182C6.70961 2.97502 6.58245 2.95264 6.46102 2.97959C6.33959 3.00655 6.23384 3.08064 6.16704 3.18557L4.33141 6.06995L3.49141 5.01995C3.41375 4.92281 3.30069 4.8605 3.17709 4.84673C3.05349 4.83296 2.92949 4.86885 2.83235 4.94651C2.73522 5.02417 2.67291 5.13723 2.65914 5.26083C2.64536 5.38443 2.68125 5.50843 2.75891 5.60557L4.00891 7.16807C4.0555 7.22638 4.11533 7.27271 4.18344 7.30323C4.25154 7.33375 4.32595 7.34757 4.40047 7.34353C4.47499 7.3395 4.54747 7.31773 4.61188 7.28004C4.67629 7.24234 4.73077 7.18981 4.77079 7.12682L6.95829 3.68932Z"
|
|
31
|
-
fill="white"
|
|
32
|
-
/>
|
|
33
|
-
</svg>
|
|
34
|
-
);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extracts the initials from a full name.
|
|
3
|
-
*
|
|
4
|
-
* @param name - The full name from which to extract initials.
|
|
5
|
-
* @returns The initials of the provided name. If the name contains only one word,
|
|
6
|
-
* it returns the first character of that word. If the name contains two words,
|
|
7
|
-
* it returns the first character of each word.
|
|
8
|
-
*/
|
|
9
|
-
export const getInitials = (name: string) => {
|
|
10
|
-
const [firstName, lastName] = name.split(" ");
|
|
11
|
-
return firstName.charAt(0) + (lastName ? lastName.charAt(0) : "");
|
|
12
|
-
};
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import type { FC, ReactNode } from "react";
|
|
4
|
-
import { isValidElement } from "react";
|
|
5
|
-
import { ArrowRight } from "@untitledui/icons";
|
|
6
|
-
import { cx, sortCx } from "@/components/utils/cx";
|
|
7
|
-
import { isReactComponent } from "@/components/utils/isReactComponent";
|
|
8
|
-
|
|
9
|
-
type Size = "md" | "lg";
|
|
10
|
-
type Color = "brand" | "warning" | "error" | "gray" | "success";
|
|
11
|
-
type Theme = "light" | "modern";
|
|
12
|
-
type Align = "leading" | "trailing";
|
|
13
|
-
|
|
14
|
-
const baseClasses: Record<Theme, { root?: string; addon?: string; icon?: string }> = {
|
|
15
|
-
light: {
|
|
16
|
-
root: "rounded-full ring-1 ring-inset",
|
|
17
|
-
addon: "rounded-full ring-1 ring-inset",
|
|
18
|
-
},
|
|
19
|
-
modern: {
|
|
20
|
-
root: "rounded-[10px] bg-primary text-secondary shadow-xs ring-1 ring-inset ring-border-primary hover:bg-secondary",
|
|
21
|
-
addon: "flex items-center rounded-md bg-primary shadow-xs ring-1 ring-inset ring-border-primary",
|
|
22
|
-
icon: "text-utility-gray-500",
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const getSizeClasses = (
|
|
27
|
-
theme?: Theme,
|
|
28
|
-
text?: boolean,
|
|
29
|
-
icon?: boolean,
|
|
30
|
-
): Record<Align, Record<Size, { root?: string; addon?: string; icon?: string; dot?: string }>> => ({
|
|
31
|
-
leading: {
|
|
32
|
-
md: {
|
|
33
|
-
root: cx("py-1 pr-2 pl-1 tt-xs-md", !text && !icon && "pr-1"),
|
|
34
|
-
addon: cx("px-2 py-0.5", theme === "modern" && "gap-1 px-1.5", text && "mr-2"),
|
|
35
|
-
icon: "ml-1 size-4",
|
|
36
|
-
},
|
|
37
|
-
lg: {
|
|
38
|
-
root: cx("py-1 pr-2 pl-1 tt-sm-md", !text && !icon && "pr-1"),
|
|
39
|
-
addon: cx("px-2.5 py-0.5", theme === "modern" && "gap-1.5 px-2", text && "mr-2"),
|
|
40
|
-
icon: "ml-1 size-4",
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
trailing: {
|
|
44
|
-
md: {
|
|
45
|
-
root: cx("py-1 pr-1 pl-3 tt-xs-md", theme === "modern" && "pl-2.5"),
|
|
46
|
-
addon: cx("py-0.5 pr-1.5 pl-2", theme === "modern" && "pr-1.5 pl-2", text && "ml-2"),
|
|
47
|
-
icon: "ml-0.5 size-3 stroke-[3px]",
|
|
48
|
-
dot: "mr-1.5",
|
|
49
|
-
},
|
|
50
|
-
lg: {
|
|
51
|
-
root: "py-1 pr-1 pl-3 tt-sm-md",
|
|
52
|
-
addon: cx("py-0.5 pr-2 pl-2.5", theme === "modern" && "pr-1.5 pl-2", text && "ml-2"),
|
|
53
|
-
icon: "ml-1 size-3 stroke-[3px]",
|
|
54
|
-
dot: "mr-2",
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
const colorClasses: Record<Theme, Record<Color, { root?: string; addon?: string; icon?: string; dot?: string }>> = sortCx({
|
|
60
|
-
light: {
|
|
61
|
-
brand: {
|
|
62
|
-
root: "bg-utility-brand-50 text-utility-brand-700 ring-utility-brand-200 hover:bg-utility-brand-100",
|
|
63
|
-
addon: "bg-primary text-current ring-utility-brand-200",
|
|
64
|
-
icon: "text-utility-brand-500",
|
|
65
|
-
},
|
|
66
|
-
gray: {
|
|
67
|
-
root: "bg-utility-gray-50 text-utility-gray-700 ring-utility-gray-200 hover:bg-utility-gray-100",
|
|
68
|
-
addon: "bg-primary text-current ring-utility-gray-200",
|
|
69
|
-
icon: "text-utility-gray-500",
|
|
70
|
-
},
|
|
71
|
-
error: {
|
|
72
|
-
root: "bg-utility-error-50 text-utility-error-700 ring-utility-error-200 hover:bg-utility-error-100",
|
|
73
|
-
addon: "bg-primary text-current ring-utility-error-200",
|
|
74
|
-
icon: "text-utility-error-500",
|
|
75
|
-
},
|
|
76
|
-
warning: {
|
|
77
|
-
root: "bg-utility-warning-50 text-utility-warning-700 ring-utility-warning-200 hover:bg-utility-warning-100",
|
|
78
|
-
addon: "bg-primary text-current ring-utility-warning-200",
|
|
79
|
-
icon: "text-utility-warning-500",
|
|
80
|
-
},
|
|
81
|
-
success: {
|
|
82
|
-
root: "bg-utility-success-50 text-utility-success-700 ring-utility-success-200 hover:bg-utility-success-100",
|
|
83
|
-
addon: "bg-primary text-current ring-utility-success-200",
|
|
84
|
-
icon: "text-utility-success-500",
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
modern: {
|
|
88
|
-
brand: {
|
|
89
|
-
dot: "bg-utility-brand-500 outline-3 -outline-offset-1 outline-utility-brand-100",
|
|
90
|
-
},
|
|
91
|
-
gray: {
|
|
92
|
-
dot: "bg-utility-gray-500 outline-3 -outline-offset-1 outline-utility-gray-100",
|
|
93
|
-
},
|
|
94
|
-
error: {
|
|
95
|
-
dot: "bg-utility-error-500 outline-3 -outline-offset-1 outline-utility-error-100",
|
|
96
|
-
},
|
|
97
|
-
warning: {
|
|
98
|
-
dot: "bg-utility-warning-500 outline-3 -outline-offset-1 outline-utility-warning-100",
|
|
99
|
-
},
|
|
100
|
-
success: {
|
|
101
|
-
dot: "bg-utility-success-500 outline-3 -outline-offset-1 outline-utility-success-100",
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
interface BadgeGroupProps {
|
|
107
|
-
children?: string | ReactNode;
|
|
108
|
-
addonText: string;
|
|
109
|
-
size?: Size;
|
|
110
|
-
color: Color;
|
|
111
|
-
theme?: Theme;
|
|
112
|
-
/**
|
|
113
|
-
* Alignment of the badge addon element.
|
|
114
|
-
*/
|
|
115
|
-
align?: Align;
|
|
116
|
-
iconTrailing?: FC<{ className?: string }> | ReactNode;
|
|
117
|
-
className?: string;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export const BadgeGroup = ({
|
|
121
|
-
children,
|
|
122
|
-
addonText,
|
|
123
|
-
size = "md",
|
|
124
|
-
color = "brand",
|
|
125
|
-
theme = "light",
|
|
126
|
-
align = "leading",
|
|
127
|
-
className,
|
|
128
|
-
iconTrailing: IconTrailing = ArrowRight,
|
|
129
|
-
}: BadgeGroupProps) => {
|
|
130
|
-
const colors = colorClasses[theme][color];
|
|
131
|
-
const sizes = getSizeClasses(theme, !!children, !!IconTrailing)[align][size];
|
|
132
|
-
|
|
133
|
-
const rootClasses = cx(
|
|
134
|
-
"inline-flex w-max cursor-pointer items-center transition duration-100 ease-linear",
|
|
135
|
-
baseClasses[theme].root,
|
|
136
|
-
sizes.root,
|
|
137
|
-
colors.root,
|
|
138
|
-
className,
|
|
139
|
-
);
|
|
140
|
-
const addonClasses = cx("inline-flex items-center", baseClasses[theme].addon, sizes.addon, colors.addon);
|
|
141
|
-
const dotClasses = cx("inline-block size-2 shrink-0 rounded-full", sizes.dot, colors.dot);
|
|
142
|
-
const iconClasses = cx(baseClasses[theme].icon, sizes.icon, colors.icon);
|
|
143
|
-
|
|
144
|
-
if (align === "trailing") {
|
|
145
|
-
return (
|
|
146
|
-
<div className={rootClasses}>
|
|
147
|
-
{theme === "modern" && <span className={dotClasses} />}
|
|
148
|
-
|
|
149
|
-
{children}
|
|
150
|
-
|
|
151
|
-
<span className={addonClasses}>
|
|
152
|
-
{addonText}
|
|
153
|
-
|
|
154
|
-
{/* Trailing icon */}
|
|
155
|
-
{isReactComponent(IconTrailing) && <IconTrailing className={iconClasses} />}
|
|
156
|
-
{isValidElement(IconTrailing) && IconTrailing}
|
|
157
|
-
</span>
|
|
158
|
-
</div>
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
return (
|
|
163
|
-
<div className={rootClasses}>
|
|
164
|
-
<span className={addonClasses}>
|
|
165
|
-
{theme === "modern" && <span className={dotClasses} />}
|
|
166
|
-
{addonText}
|
|
167
|
-
</span>
|
|
168
|
-
|
|
169
|
-
{children}
|
|
170
|
-
|
|
171
|
-
{/* Trailing icon */}
|
|
172
|
-
{isReactComponent(IconTrailing) && <IconTrailing className={iconClasses} />}
|
|
173
|
-
{isValidElement(IconTrailing) && IconTrailing}
|
|
174
|
-
</div>
|
|
175
|
-
);
|
|
176
|
-
};
|
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
export type IconComponentType = React.FunctionComponent<{ className?: string; strokeWidth?: string | number }>;
|
|
2
|
-
|
|
3
|
-
export type Sizes = "sm" | "md" | "lg";
|
|
4
|
-
|
|
5
|
-
export type BadgeColors = "gray" | "brand" | "error" | "warning" | "success" | "gray-blue" | "blue-light" | "blue" | "indigo" | "purple" | "pink" | "orange";
|
|
6
|
-
|
|
7
|
-
export type FlagTypes =
|
|
8
|
-
| "AD"
|
|
9
|
-
| "AE"
|
|
10
|
-
| "AF"
|
|
11
|
-
| "AG"
|
|
12
|
-
| "AI"
|
|
13
|
-
| "AL"
|
|
14
|
-
| "AM"
|
|
15
|
-
| "AO"
|
|
16
|
-
| "AR"
|
|
17
|
-
| "AS"
|
|
18
|
-
| "AT"
|
|
19
|
-
| "AU"
|
|
20
|
-
| "AW"
|
|
21
|
-
| "AX"
|
|
22
|
-
| "AZ"
|
|
23
|
-
| "BA"
|
|
24
|
-
| "BB"
|
|
25
|
-
| "BD"
|
|
26
|
-
| "BE"
|
|
27
|
-
| "BF"
|
|
28
|
-
| "BG"
|
|
29
|
-
| "BH"
|
|
30
|
-
| "BI"
|
|
31
|
-
| "BJ"
|
|
32
|
-
| "BL"
|
|
33
|
-
| "BM"
|
|
34
|
-
| "BN"
|
|
35
|
-
| "BO"
|
|
36
|
-
| "BQ-1"
|
|
37
|
-
| "BQ-2"
|
|
38
|
-
| "BQ"
|
|
39
|
-
| "BR"
|
|
40
|
-
| "BS"
|
|
41
|
-
| "BT"
|
|
42
|
-
| "BW"
|
|
43
|
-
| "BY"
|
|
44
|
-
| "BZ"
|
|
45
|
-
| "CA"
|
|
46
|
-
| "CC"
|
|
47
|
-
| "CD-1"
|
|
48
|
-
| "CD"
|
|
49
|
-
| "CF"
|
|
50
|
-
| "CH"
|
|
51
|
-
| "CK"
|
|
52
|
-
| "CL"
|
|
53
|
-
| "CM"
|
|
54
|
-
| "CN"
|
|
55
|
-
| "CO"
|
|
56
|
-
| "CR"
|
|
57
|
-
| "CU"
|
|
58
|
-
| "CW"
|
|
59
|
-
| "CX"
|
|
60
|
-
| "CY"
|
|
61
|
-
| "CZ"
|
|
62
|
-
| "DE"
|
|
63
|
-
| "DJ"
|
|
64
|
-
| "DK"
|
|
65
|
-
| "DM"
|
|
66
|
-
| "DO"
|
|
67
|
-
| "DS"
|
|
68
|
-
| "DZ"
|
|
69
|
-
| "earth"
|
|
70
|
-
| "EC"
|
|
71
|
-
| "EE"
|
|
72
|
-
| "EG"
|
|
73
|
-
| "EH"
|
|
74
|
-
| "ER"
|
|
75
|
-
| "ES"
|
|
76
|
-
| "ET"
|
|
77
|
-
| "FI"
|
|
78
|
-
| "FJ"
|
|
79
|
-
| "FK"
|
|
80
|
-
| "FM"
|
|
81
|
-
| "FO"
|
|
82
|
-
| "FR"
|
|
83
|
-
| "GA"
|
|
84
|
-
| "GB-2"
|
|
85
|
-
| "GB"
|
|
86
|
-
| "GD"
|
|
87
|
-
| "GE"
|
|
88
|
-
| "GG"
|
|
89
|
-
| "GH"
|
|
90
|
-
| "GI"
|
|
91
|
-
| "GL"
|
|
92
|
-
| "GM"
|
|
93
|
-
| "GN"
|
|
94
|
-
| "GQ"
|
|
95
|
-
| "GR"
|
|
96
|
-
| "GT"
|
|
97
|
-
| "GU"
|
|
98
|
-
| "GW"
|
|
99
|
-
| "GY"
|
|
100
|
-
| "HK"
|
|
101
|
-
| "HN"
|
|
102
|
-
| "HR"
|
|
103
|
-
| "HT"
|
|
104
|
-
| "HU"
|
|
105
|
-
| "ID"
|
|
106
|
-
| "IE"
|
|
107
|
-
| "IL"
|
|
108
|
-
| "IM"
|
|
109
|
-
| "IN"
|
|
110
|
-
| "IO"
|
|
111
|
-
| "IQ"
|
|
112
|
-
| "IR"
|
|
113
|
-
| "IS"
|
|
114
|
-
| "IT"
|
|
115
|
-
| "JE"
|
|
116
|
-
| "JM"
|
|
117
|
-
| "JO"
|
|
118
|
-
| "JP"
|
|
119
|
-
| "KE"
|
|
120
|
-
| "KG"
|
|
121
|
-
| "KH"
|
|
122
|
-
| "KI"
|
|
123
|
-
| "KM"
|
|
124
|
-
| "KN"
|
|
125
|
-
| "KP"
|
|
126
|
-
| "KR"
|
|
127
|
-
| "KW"
|
|
128
|
-
| "KY"
|
|
129
|
-
| "KZ"
|
|
130
|
-
| "LA"
|
|
131
|
-
| "LB"
|
|
132
|
-
| "LC"
|
|
133
|
-
| "LI"
|
|
134
|
-
| "LK"
|
|
135
|
-
| "LR"
|
|
136
|
-
| "LS"
|
|
137
|
-
| "LT"
|
|
138
|
-
| "LU"
|
|
139
|
-
| "LV"
|
|
140
|
-
| "LY"
|
|
141
|
-
| "MA"
|
|
142
|
-
| "MC"
|
|
143
|
-
| "MD"
|
|
144
|
-
| "ME"
|
|
145
|
-
| "MG"
|
|
146
|
-
| "MH"
|
|
147
|
-
| "MK"
|
|
148
|
-
| "ML"
|
|
149
|
-
| "MM"
|
|
150
|
-
| "MN"
|
|
151
|
-
| "MO"
|
|
152
|
-
| "MP"
|
|
153
|
-
| "MQ"
|
|
154
|
-
| "MR"
|
|
155
|
-
| "MS"
|
|
156
|
-
| "MT"
|
|
157
|
-
| "MU"
|
|
158
|
-
| "MV"
|
|
159
|
-
| "MW"
|
|
160
|
-
| "MX"
|
|
161
|
-
| "MY"
|
|
162
|
-
| "MZ"
|
|
163
|
-
| "NA"
|
|
164
|
-
| "NE"
|
|
165
|
-
| "NF"
|
|
166
|
-
| "NG"
|
|
167
|
-
| "NI"
|
|
168
|
-
| "NL"
|
|
169
|
-
| "NO"
|
|
170
|
-
| "NP"
|
|
171
|
-
| "NR"
|
|
172
|
-
| "NU"
|
|
173
|
-
| "NZ"
|
|
174
|
-
| "OM"
|
|
175
|
-
| "PA"
|
|
176
|
-
| "PE"
|
|
177
|
-
| "PF"
|
|
178
|
-
| "PG"
|
|
179
|
-
| "PH"
|
|
180
|
-
| "PK"
|
|
181
|
-
| "PL"
|
|
182
|
-
| "PM"
|
|
183
|
-
| "PN"
|
|
184
|
-
| "PR"
|
|
185
|
-
| "PT"
|
|
186
|
-
| "PW"
|
|
187
|
-
| "PY"
|
|
188
|
-
| "QA"
|
|
189
|
-
| "RE"
|
|
190
|
-
| "RO"
|
|
191
|
-
| "RS"
|
|
192
|
-
| "RU"
|
|
193
|
-
| "RW"
|
|
194
|
-
| "SA"
|
|
195
|
-
| "SB"
|
|
196
|
-
| "SC"
|
|
197
|
-
| "SD"
|
|
198
|
-
| "SE"
|
|
199
|
-
| "SG"
|
|
200
|
-
| "SH"
|
|
201
|
-
| "SI"
|
|
202
|
-
| "SJ"
|
|
203
|
-
| "SK"
|
|
204
|
-
| "SL"
|
|
205
|
-
| "SM"
|
|
206
|
-
| "SN"
|
|
207
|
-
| "SO"
|
|
208
|
-
| "SR"
|
|
209
|
-
| "SS"
|
|
210
|
-
| "ST"
|
|
211
|
-
| "SV"
|
|
212
|
-
| "SX"
|
|
213
|
-
| "SY"
|
|
214
|
-
| "SZ"
|
|
215
|
-
| "TC"
|
|
216
|
-
| "TD"
|
|
217
|
-
| "TF"
|
|
218
|
-
| "TG"
|
|
219
|
-
| "TH"
|
|
220
|
-
| "TJ"
|
|
221
|
-
| "TK"
|
|
222
|
-
| "TL"
|
|
223
|
-
| "TM"
|
|
224
|
-
| "TN"
|
|
225
|
-
| "TO"
|
|
226
|
-
| "TR"
|
|
227
|
-
| "TT"
|
|
228
|
-
| "TV"
|
|
229
|
-
| "TZ"
|
|
230
|
-
| "UA"
|
|
231
|
-
| "UG"
|
|
232
|
-
| "UM"
|
|
233
|
-
| "US"
|
|
234
|
-
| "UY"
|
|
235
|
-
| "UZ"
|
|
236
|
-
| "VA"
|
|
237
|
-
| "VC"
|
|
238
|
-
| "VE"
|
|
239
|
-
| "VG"
|
|
240
|
-
| "VI"
|
|
241
|
-
| "VN"
|
|
242
|
-
| "VU"
|
|
243
|
-
| "WF"
|
|
244
|
-
| "WS"
|
|
245
|
-
| "YE"
|
|
246
|
-
| "YT"
|
|
247
|
-
| "ZA"
|
|
248
|
-
| "ZM"
|
|
249
|
-
| "ZW";
|
|
250
|
-
|
|
251
|
-
export type ExtractColorKeys<T> = T extends { styles: infer C } ? keyof C : never;
|
|
252
|
-
export type ExtractBadgeKeys<T> = keyof T;
|
|
253
|
-
export type BadgeTypeToColorMap<T> = {
|
|
254
|
-
[K in ExtractBadgeKeys<T>]: ExtractColorKeys<T[K]>;
|
|
255
|
-
};
|
|
256
|
-
export type BadgeTypeColors<T> = ExtractColorKeys<T[keyof T]>;
|
|
257
|
-
|
|
258
|
-
export const badgeTypes = {
|
|
259
|
-
pillColor: "pill-color",
|
|
260
|
-
badgeColor: "color",
|
|
261
|
-
badgeModern: "modern",
|
|
262
|
-
} as const;
|
|
263
|
-
|
|
264
|
-
export type BadgeTypes = (typeof badgeTypes)[keyof typeof badgeTypes];
|