@jerry-fd/ui 0.2.0 → 0.3.1

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/index.d.ts CHANGED
@@ -1,11 +1,24 @@
1
- import React from 'react';
1
+ import React$1 from 'react';
2
+ import * as tailwind_variants from 'tailwind-variants';
3
+ import { VariantProps } from 'tailwind-variants';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ export { B as Button, b as baseButtonStyle, a as buttonVariants } from './button-nn_s6In3.js';
6
+ import { I as IconType } from './icon-Byr-7UQX.js';
7
+ import { DropdownMenu as DropdownMenu$2 } from 'radix-ui';
8
+ import * as tailwind_merge from 'tailwind-merge';
9
+ import { Command as Command$1 } from 'cmdk';
2
10
 
3
11
  type UILocale = (typeof SUPPORTED_LOCALES)[number];
4
12
  declare const SUPPORTED_LOCALES: readonly ["en-US", "zh-CN"];
5
13
 
6
- declare const UIProvider: React.FC<React.PropsWithChildren & {
14
+ interface UIState {
15
+ tableUiStorageKey?: string;
16
+ }
17
+ type UIProviderProps = React$1.PropsWithChildren<UIState & {
7
18
  locale?: UILocale;
19
+ onChange?: (state: UIState) => void;
8
20
  }>;
21
+ declare const UIProvider: React$1.FC<UIProviderProps>;
9
22
 
10
23
  declare const dateUtils: {
11
24
  readonly presets: {
@@ -28,4 +41,309 @@ declare const dateUtils: {
28
41
  };
29
42
  };
30
43
 
31
- export { UIProvider, dateUtils };
44
+ type InputValue = number | bigint | Intl.StringNumericLiteral;
45
+ /**
46
+ * 格式化整数,添加千位分隔符
47
+ * @example formatNumber(12345678) => "12,345,678"
48
+ */
49
+ declare function formatNumber(value: InputValue, options?: Intl.NumberFormatOptions, locale?: string): string;
50
+ /**
51
+ * 格式化货币
52
+ * @example formatCurrency(1234.5, { currency: 'CNY' }) => "¥1,234.50"
53
+ * @example formatCurrency(1234.5, { currency: 'USD' }, 'en-US') => "$1,234.50"
54
+ */
55
+ declare function formatCurrency(value: InputValue, options?: Omit<Intl.NumberFormatOptions, 'style'>, locale?: string): string;
56
+ /**
57
+ * 格式化整数为紧凑形式(K/M 后缀)
58
+ * @example formatIntegerCompact(1234) => "1,2K"
59
+ * @example formatIntegerCompact(1234567) => "1,2M"
60
+ */
61
+ declare function formatIntegerCompact(value: InputValue, locale?: string): string;
62
+ /**
63
+ * 获取短语的首字母缩写
64
+ * @example getFirstLetters("Hello World") => "HW"
65
+ * @example getFirstLetters("GitHub Copilot", 2) => "GC"
66
+ */
67
+ declare const getFirstLetters: (phrase: string, count?: number) => string;
68
+
69
+ declare const twMergeConfig: {
70
+ extend: {
71
+ classGroups: {
72
+ 'font-size': {
73
+ text: string[];
74
+ }[];
75
+ 'ui-badge': {
76
+ ui: string[];
77
+ }[];
78
+ };
79
+ conflictingClassGroups: {
80
+ 'ui-badge': readonly ["bg-color", "text-color", "border-color"];
81
+ };
82
+ };
83
+ };
84
+ declare const tv: tailwind_variants.TV;
85
+ declare const cn: (...classes: ClassNameArray) => string;
86
+
87
+ declare const cardVariants: tailwind_variants.TVReturnType<{
88
+ variant: {
89
+ default: string;
90
+ accent: string;
91
+ };
92
+ }, undefined, "flex flex-col items-stretch rounded-xl text-paragraph-sm", {
93
+ variant: {
94
+ default: string;
95
+ accent: string;
96
+ };
97
+ }, undefined, tailwind_variants.TVReturnType<{
98
+ variant: {
99
+ default: string;
100
+ accent: string;
101
+ };
102
+ }, undefined, "flex flex-col items-stretch rounded-xl text-paragraph-sm", unknown, unknown, undefined>>;
103
+ declare function Card({ className, variant, ...props }: React$1.HTMLAttributes<HTMLDivElement> & VariantProps<typeof cardVariants>): react_jsx_runtime.JSX.Element;
104
+ declare function CardHeader({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
105
+ declare function CardContent({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
106
+ declare function CardExtra({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
107
+ declare function CardTable({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
108
+ declare function CardFooter({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
109
+ declare function CardHeading({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
110
+ declare function CardToolbar({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
111
+ declare function CardTitle({ className, ...props }: React$1.HTMLAttributes<HTMLHeadingElement>): react_jsx_runtime.JSX.Element;
112
+ declare function CardIcon({ className, ...props }: React$1.HTMLAttributes<HTMLHeadingElement>): react_jsx_runtime.JSX.Element;
113
+ declare function CardDescription({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
114
+
115
+ type IValue = string | number;
116
+ interface IOptionItem {
117
+ key?: React.Key;
118
+ label: string;
119
+ icon?: React.ReactNode;
120
+ value: IValue;
121
+ disabled?: boolean;
122
+ }
123
+
124
+ declare const DropdownMenu$1: React$1.FC<DropdownMenu$2.DropdownMenuProps>;
125
+ declare const DropdownMenuContent: React$1.FC<React$1.ComponentPropsWithRef<typeof DropdownMenu$2.Content>>;
126
+
127
+ type DropdownMenuContentProps = React$1.ComponentProps<typeof DropdownMenuContent>;
128
+ type DropdownMenuPrimitiveProps = React$1.ComponentProps<typeof DropdownMenu$1>;
129
+ type SetValue<T> = React$1.Dispatch<React$1.SetStateAction<T>> | ((data: T) => void);
130
+ interface BaseMenuItem {
131
+ key?: React$1.Key;
132
+ label?: string | React$1.ReactNode;
133
+ icon?: IconType;
134
+ to?: string;
135
+ separator?: boolean;
136
+ className?: string;
137
+ shortcut?: string;
138
+ disabled?: boolean;
139
+ inset?: boolean;
140
+ destructive?: boolean;
141
+ items?: DropdownMenuItemProps[];
142
+ }
143
+ interface RadioMenuItem extends BaseMenuItem {
144
+ groupType: 'radio';
145
+ value?: IValue;
146
+ options: IOptionItem[];
147
+ items?: never;
148
+ onValueChange?: SetValue<IValue>;
149
+ }
150
+ interface CheckboxMenuItem extends BaseMenuItem {
151
+ groupType: 'checkbox';
152
+ value?: IValue[];
153
+ options: IOptionItem[];
154
+ items?: never;
155
+ onValueChange?: SetValue<IValue[]>;
156
+ }
157
+ interface NormalMenuItem extends BaseMenuItem {
158
+ groupType?: 'item' | undefined;
159
+ value?: never;
160
+ onValueChange?: never;
161
+ }
162
+ type DropdownMenuItemProps = RadioMenuItem | CheckboxMenuItem | NormalMenuItem;
163
+ interface MenuPropBase {
164
+ menuLabel?: React$1.ReactNode;
165
+ items?: DropdownMenuItemProps[];
166
+ disabled?: boolean;
167
+ className?: string;
168
+ renderItem?: (item: DropdownMenuItemProps, index: number, onAction: MenuPropBase['onAction']) => React$1.ReactNode;
169
+ onAction?: (item: DropdownMenuItemProps, event: React$1.MouseEvent<HTMLDivElement>) => void;
170
+ }
171
+ interface DropdownMenuProps extends DropdownMenuPrimitiveProps, DropdownMenuContentProps, MenuPropBase {
172
+ }
173
+ declare const DropdownMenu: React$1.FC<DropdownMenuProps>;
174
+
175
+ declare const menu: tailwind_variants.TVReturnType<{
176
+ inset: {
177
+ true: {
178
+ trigger: string;
179
+ item: string;
180
+ label: string;
181
+ };
182
+ };
183
+ destructive: {
184
+ true: {
185
+ item: string;
186
+ };
187
+ };
188
+ }, {
189
+ content: string[];
190
+ trigger: string[];
191
+ item: string[];
192
+ checkbox: string[];
193
+ label: string;
194
+ separator: string;
195
+ shortcut: string;
196
+ arrow: string;
197
+ icon: string;
198
+ check: string;
199
+ }, undefined, {
200
+ inset: {
201
+ true: {
202
+ trigger: string;
203
+ item: string;
204
+ label: string;
205
+ };
206
+ };
207
+ destructive: {
208
+ true: {
209
+ item: string;
210
+ };
211
+ };
212
+ }, {
213
+ content: string[];
214
+ trigger: string[];
215
+ item: string[];
216
+ checkbox: string[];
217
+ label: string;
218
+ separator: string;
219
+ shortcut: string;
220
+ arrow: string;
221
+ icon: string;
222
+ check: string;
223
+ }, tailwind_variants.TVReturnType<{
224
+ inset: {
225
+ true: {
226
+ trigger: string;
227
+ item: string;
228
+ label: string;
229
+ };
230
+ };
231
+ destructive: {
232
+ true: {
233
+ item: string;
234
+ };
235
+ };
236
+ }, {
237
+ content: string[];
238
+ trigger: string[];
239
+ item: string[];
240
+ checkbox: string[];
241
+ label: string;
242
+ separator: string;
243
+ shortcut: string;
244
+ arrow: string;
245
+ icon: string;
246
+ check: string;
247
+ }, undefined, unknown, unknown, undefined>>;
248
+ declare const dropdownMenuStyles: {
249
+ content: (slotProps?: ({
250
+ inset?: boolean | undefined;
251
+ destructive?: boolean | undefined;
252
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
253
+ trigger: (slotProps?: ({
254
+ inset?: boolean | undefined;
255
+ destructive?: boolean | undefined;
256
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
257
+ item: (slotProps?: ({
258
+ inset?: boolean | undefined;
259
+ destructive?: boolean | undefined;
260
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
261
+ checkbox: (slotProps?: ({
262
+ inset?: boolean | undefined;
263
+ destructive?: boolean | undefined;
264
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
265
+ label: (slotProps?: ({
266
+ inset?: boolean | undefined;
267
+ destructive?: boolean | undefined;
268
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
269
+ separator: (slotProps?: ({
270
+ inset?: boolean | undefined;
271
+ destructive?: boolean | undefined;
272
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
273
+ shortcut: (slotProps?: ({
274
+ inset?: boolean | undefined;
275
+ destructive?: boolean | undefined;
276
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
277
+ arrow: (slotProps?: ({
278
+ inset?: boolean | undefined;
279
+ destructive?: boolean | undefined;
280
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
281
+ icon: (slotProps?: ({
282
+ inset?: boolean | undefined;
283
+ destructive?: boolean | undefined;
284
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
285
+ check: (slotProps?: ({
286
+ inset?: boolean | undefined;
287
+ destructive?: boolean | undefined;
288
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
289
+ } & {
290
+ content: (slotProps?: ({
291
+ inset?: boolean | undefined;
292
+ destructive?: boolean | undefined;
293
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
294
+ trigger: (slotProps?: ({
295
+ inset?: boolean | undefined;
296
+ destructive?: boolean | undefined;
297
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
298
+ item: (slotProps?: ({
299
+ inset?: boolean | undefined;
300
+ destructive?: boolean | undefined;
301
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
302
+ checkbox: (slotProps?: ({
303
+ inset?: boolean | undefined;
304
+ destructive?: boolean | undefined;
305
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
306
+ label: (slotProps?: ({
307
+ inset?: boolean | undefined;
308
+ destructive?: boolean | undefined;
309
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
310
+ separator: (slotProps?: ({
311
+ inset?: boolean | undefined;
312
+ destructive?: boolean | undefined;
313
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
314
+ shortcut: (slotProps?: ({
315
+ inset?: boolean | undefined;
316
+ destructive?: boolean | undefined;
317
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
318
+ arrow: (slotProps?: ({
319
+ inset?: boolean | undefined;
320
+ destructive?: boolean | undefined;
321
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
322
+ icon: (slotProps?: ({
323
+ inset?: boolean | undefined;
324
+ destructive?: boolean | undefined;
325
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
326
+ check: (slotProps?: ({
327
+ inset?: boolean | undefined;
328
+ destructive?: boolean | undefined;
329
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
330
+ } & {};
331
+ type DropdownMenuVariants = VariantProps<typeof menu>;
332
+
333
+ declare function Command({ className, ...props }: React$1.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
334
+ declare function CommandInput({ className, ...props }: React$1.ComponentProps<typeof Command$1.Input>): react_jsx_runtime.JSX.Element;
335
+ declare function CommandList({ className, ...props }: React$1.ComponentProps<typeof Command$1.List>): react_jsx_runtime.JSX.Element;
336
+ declare function CommandEmpty({ ...props }: React$1.ComponentProps<typeof Command$1.Empty>): react_jsx_runtime.JSX.Element;
337
+ declare function CommandGroup({ className, ...props }: React$1.ComponentProps<typeof Command$1.Group>): react_jsx_runtime.JSX.Element;
338
+ declare function CommandSeparator({ className, ...props }: React$1.ComponentProps<typeof Command$1.Separator>): react_jsx_runtime.JSX.Element;
339
+ declare function CommandItem({ className, ...props }: React$1.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
340
+ declare function CommandShortcut({ className, ...props }: React$1.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
341
+
342
+ type Variant = 'slate' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose';
343
+ type ColorPanelProps = React$1.ComponentProps<'div'> & {
344
+ asChild?: boolean;
345
+ variant?: Variant;
346
+ };
347
+ declare function ColorPanel({ asChild, children, className, variant, ...props }: ColorPanelProps): react_jsx_runtime.JSX.Element;
348
+
349
+ export { Card, CardContent, CardDescription, CardExtra, CardFooter, CardHeader, CardHeading, CardIcon, CardTable, CardTitle, CardToolbar, ColorPanel, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DropdownMenu, type DropdownMenuItemProps, type DropdownMenuProps, type DropdownMenuVariants, type MenuPropBase, Card as Root, UIProvider, cn, dateUtils, dropdownMenuStyles, formatCurrency, formatIntegerCompact, formatNumber, getFirstLetters, tv, twMergeConfig };
package/index.js CHANGED
@@ -1 +1 @@
1
- import {a}from'./chunk-75LTHX75.js';export{c as dateUtils}from'./chunk-75LTHX75.js';import {LazyMotion}from'motion/react';import {jsx}from'react/jsx-runtime';var c=()=>import('./motion-features-PPUUMXEA.js').then(o=>o.default),t=({children:o,locale:a$1="zh-CN"})=>jsx(LazyMotion,{features:c,strict:true,children:jsx(a,{locale:a$1,children:o})});t.displayName="UIProvider";export{t as UIProvider};
1
+ export{b as DropdownMenu,a as dropdownMenuStyles}from'./chunk-TQSM6RF4.js';import {a,f}from'./chunk-TYGCMNMU.js';export{t as Button,g as Card,i as CardContent,q as CardDescription,j as CardExtra,l as CardFooter,h as CardHeader,m as CardHeading,p as CardIcon,k as CardTable,o as CardTitle,n as CardToolbar,B as Command,E as CommandEmpty,F as CommandGroup,C as CommandInput,H as CommandItem,D as CommandList,G as CommandSeparator,I as CommandShortcut,g as Root,r as baseButtonStyle,s as buttonVariants,f as cn,c as dateUtils,e as tv,d as twMergeConfig}from'./chunk-TYGCMNMU.js';import {LazyMotion}from'motion/react';import i from'react';import {jsx}from'react/jsx-runtime';import {Slot}from'radix-ui';var v=()=>import('./motion-features-PPUUMXEA.js').then(t=>t.default),c=Symbol.for("@@jerry-fe/ui/UIProviderContext");function P(){if(!globalThis[c]){let t=i.createContext(null);globalThis[c]=t;}return globalThis[c]}var S=P(),x=({children:t,locale:r="zh-CN",tableUiStorageKey:e="APP_UI_TABLE_CONFIG",onChange:n})=>{let[o,a$1]=i.useState(()=>({tableUiStorageKey:e})),l=i.useCallback(s=>{a$1(U=>{let u=typeof s=="function"?s(U):s;return n?.(u),u});},[n]);i.useEffect(()=>{a$1({tableUiStorageKey:e});},[e]);let d=i.useMemo(()=>({state:o,setState:l}),[o,l]);return jsx(LazyMotion,{features:v,strict:true,children:jsx(S.Provider,{value:d,children:jsx(a,{locale:r,children:t})})})};x.displayName="UIProvider";var C=new WeakMap;function I(t){return((...r)=>{let e=C.get(t),n=r.map(String).join("_");if(e){let a=e.get(n);if(a)return a}else e=new Map,C.set(t,e);let o=t(...r);return e.set(n,o),o})}function at(t,r,e="zh-CN"){return new Intl.NumberFormat(e,r).format(t)}function it(t,r,e="zh-CN"){return new Intl.NumberFormat(e,{style:"currency",...r}).format(t)}function st(t,r="en-US"){return new Intl.NumberFormat(r,{notation:"compact",compactDisplay:"short"}).format(t)}var ct=I((t,r=2)=>t.replace(/[.,!@#$%^&*()_+=\-`~[\]/\\{}:"|<>?]+/gi,"").trim().split(/\s+/).slice(0,r).map(e=>{if(!e.length)return "";if(/\s+/.test(t))return e.match(/./u)?.[0].toUpperCase();let n=new RegExp(".".repeat(r),"u"),o=e.match(n)?.[0];return o?o.charAt(0).toUpperCase()+o.slice(1):t.charAt(0).toUpperCase()+t.slice(1,2)}).join(""));function xt({asChild:t,children:r,className:e,variant:n="slate",...o}){let a=t?Slot.Root:"div";return jsx(a,{className:f(`flex shrink-0 items-center justify-center rounded-xl border ui-badge-${n}`,e),...o,children:r})}export{xt as ColorPanel,x as UIProvider,it as formatCurrency,st as formatIntegerCompact,at as formatNumber,ct as getFirstLetters};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jerry-fd/ui",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "description": "UI component library based on Ant Design (Client-side only)",
5
5
  "type": "module",
6
6
  "sideEffects": ["index.js", "*.css"],
@@ -18,9 +18,14 @@
18
18
  "./antd-data-table": {
19
19
  "types": "./antd-data-table.d.ts",
20
20
  "import": "./antd-data-table.js"
21
- }
21
+ },
22
+ "./theme": "./theme/index.css",
23
+ "./theme/colors": "./theme/colors.css",
24
+ "./theme/typography": "./theme/typography.css",
25
+ "./theme/shadows": "./theme/shadows.css",
26
+ "./theme/badge": "./theme/badge.css"
22
27
  },
23
- "files": ["*.js", "*.d.ts", "*.d.cts", "*.css"],
28
+ "files": ["*.js", "*.d.ts", "*.d.cts", "*.css", "theme/**/*.css"],
24
29
  "keywords": ["react", "antd", "filter", "data-filter", "table-filter", "client-side"],
25
30
  "author": "jerry.fd",
26
31
  "license": "MIT",
@@ -29,7 +34,10 @@
29
34
  "react-dom": ">=18",
30
35
  "antd": ">=5.0.0",
31
36
  "dayjs": ">=1.11.0",
32
- "tailwindcss": ">=4.1.18"
37
+ "tailwindcss": ">=4.1.18",
38
+ "zustand": "^5.0.11",
39
+ "lucide-react": "^0.563.0",
40
+ "immer": "^11.1.3"
33
41
  },
34
42
  "dependencies": {
35
43
  "cmdk": "^1.1.1",
@@ -37,6 +45,7 @@
37
45
  "radix-ui": "^1.4.3",
38
46
  "react-use-measure": "^2.1.7",
39
47
  "tailwind-merge": "^3.4.0",
40
- "tailwind-variants": "^3.2.2"
48
+ "tailwind-variants": "^3.2.2",
49
+ "tw-animate-css": "^1.4.0"
41
50
  }
42
51
  }
@@ -0,0 +1,215 @@
1
+ /**
2
+ * Badge Color Preset
3
+ *
4
+ * Usage:
5
+ * @import '@jerry-fd/ui/preset/badge';
6
+ *
7
+ * Naming convention:
8
+ * - Variables: --badge-{color}-bg, --badge-{color}-border, --badge-{color}-text
9
+ * - Utilities: ui-badge-{color}
10
+ *
11
+ * Color mapping (from shadcn/ui):
12
+ * - background: {color}-50
13
+ * - border: {color}-200
14
+ * - text: {color}-500
15
+ */
16
+
17
+ @theme {
18
+ /* Slate Badge */
19
+ --badge-slate-bg: hsl(210deg, 40%, 98%);
20
+ --badge-slate-border: hsl(214.3deg, 31.8%, 91.4%);
21
+ --badge-slate-text: hsl(215.4deg, 16.3%, 46.9%);
22
+
23
+ /* Red Badge */
24
+ --badge-red-bg: hsl(0deg, 85.7%, 97.3%);
25
+ --badge-red-border: hsl(0deg, 96.3%, 89.4%);
26
+ --badge-red-text: hsl(0deg, 84.2%, 60.2%);
27
+
28
+ /* Orange Badge */
29
+ --badge-orange-bg: hsl(33.3deg, 100%, 96.5%);
30
+ --badge-orange-border: hsl(32.1deg, 97.7%, 83.1%);
31
+ --badge-orange-text: hsl(24.6deg, 95%, 53.1%);
32
+
33
+ /* Amber Badge */
34
+ --badge-amber-bg: hsl(48deg, 100%, 96.1%);
35
+ --badge-amber-border: hsl(48deg, 96.6%, 76.7%);
36
+ --badge-amber-text: hsl(37.7deg, 92.1%, 50.2%);
37
+
38
+ /* Yellow Badge */
39
+ --badge-yellow-bg: hsl(54.5deg, 91.7%, 95.3%);
40
+ --badge-yellow-border: hsl(52.8deg, 98.3%, 76.9%);
41
+ --badge-yellow-text: hsl(45.4deg, 93.4%, 47.5%);
42
+
43
+ /* Lime Badge */
44
+ --badge-lime-bg: hsl(78.3deg, 92%, 95.1%);
45
+ --badge-lime-border: hsl(80.9deg, 88.5%, 79.6%);
46
+ --badge-lime-text: hsl(83.7deg, 80.5%, 44.3%);
47
+
48
+ /* Green Badge */
49
+ --badge-green-bg: hsl(138.5deg, 76.5%, 96.7%);
50
+ --badge-green-border: hsl(141deg, 78.9%, 85.1%);
51
+ --badge-green-text: hsl(142.1deg, 70.6%, 45.3%);
52
+
53
+ /* Emerald Badge */
54
+ --badge-emerald-bg: hsl(151.8deg, 81%, 95.9%);
55
+ --badge-emerald-border: hsl(152.4deg, 76%, 80.4%);
56
+ --badge-emerald-text: hsl(160.1deg, 84.1%, 39.4%);
57
+
58
+ /* Teal Badge */
59
+ --badge-teal-bg: hsl(166.2deg, 76.5%, 96.7%);
60
+ --badge-teal-border: hsl(168.4deg, 83.8%, 78.2%);
61
+ --badge-teal-text: hsl(173.4deg, 80.4%, 40%);
62
+
63
+ /* Cyan Badge */
64
+ --badge-cyan-bg: hsl(183.2deg, 100%, 96.3%);
65
+ --badge-cyan-border: hsl(186.2deg, 93.5%, 81.8%);
66
+ --badge-cyan-text: hsl(188.7deg, 94.5%, 42.7%);
67
+
68
+ /* Sky Badge */
69
+ --badge-sky-bg: hsl(204deg, 100%, 97.1%);
70
+ --badge-sky-border: hsl(200.6deg, 94.4%, 86.1%);
71
+ --badge-sky-text: hsl(198.6deg, 88.7%, 48.4%);
72
+
73
+ /* Blue Badge */
74
+ --badge-blue-bg: hsl(213.8deg, 100%, 96.9%);
75
+ --badge-blue-border: hsl(213.3deg, 96.9%, 87.3%);
76
+ --badge-blue-text: hsl(217.2deg, 91.2%, 59.8%);
77
+
78
+ /* Indigo Badge */
79
+ --badge-indigo-bg: hsl(225.9deg, 100%, 96.7%);
80
+ --badge-indigo-border: hsl(228deg, 96.5%, 88.8%);
81
+ --badge-indigo-text: hsl(238.7deg, 83.5%, 66.7%);
82
+
83
+ /* Violet Badge */
84
+ --badge-violet-bg: hsl(250deg, 100%, 97.6%);
85
+ --badge-violet-border: hsl(250.5deg, 95.2%, 91.8%);
86
+ --badge-violet-text: hsl(258.3deg, 89.5%, 66.3%);
87
+
88
+ /* Purple Badge */
89
+ --badge-purple-bg: hsl(270deg, 100%, 98%);
90
+ --badge-purple-border: hsl(268.6deg, 100%, 91.8%);
91
+ --badge-purple-text: hsl(270.7deg, 91%, 65.1%);
92
+
93
+ /* Fuchsia Badge */
94
+ --badge-fuchsia-bg: hsl(289.1deg, 100%, 97.8%);
95
+ --badge-fuchsia-border: hsl(288.3deg, 95.8%, 90.6%);
96
+ --badge-fuchsia-text: hsl(292.2deg, 84.1%, 60.6%);
97
+
98
+ /* Pink Badge */
99
+ --badge-pink-bg: hsl(327.3deg, 73.3%, 97.1%);
100
+ --badge-pink-border: hsl(325.9deg, 84.6%, 89.8%);
101
+ --badge-pink-text: hsl(330.4deg, 81.2%, 60.4%);
102
+
103
+ /* Rose Badge */
104
+ --badge-rose-bg: hsl(355.7deg, 100%, 97.3%);
105
+ --badge-rose-border: hsl(352.7deg, 96.1%, 90%);
106
+ --badge-rose-text: hsl(349.7deg, 89.2%, 60.2%);
107
+ }
108
+
109
+ @utility ui-badge-slate {
110
+ color: var(--badge-slate-text);
111
+ border-color: var(--badge-slate-border);
112
+ background-color: var(--badge-slate-bg);
113
+ }
114
+
115
+ @utility ui-badge-red {
116
+ color: var(--badge-red-text);
117
+ border-color: var(--badge-red-border);
118
+ background-color: var(--badge-red-bg);
119
+ }
120
+
121
+ @utility ui-badge-orange {
122
+ color: var(--badge-orange-text);
123
+ border-color: var(--badge-orange-border);
124
+ background-color: var(--badge-orange-bg);
125
+ }
126
+
127
+ @utility ui-badge-amber {
128
+ color: var(--badge-amber-text);
129
+ border-color: var(--badge-amber-border);
130
+ background-color: var(--badge-amber-bg);
131
+ }
132
+
133
+ @utility ui-badge-yellow {
134
+ color: var(--badge-yellow-text);
135
+ border-color: var(--badge-yellow-border);
136
+ background-color: var(--badge-yellow-bg);
137
+ }
138
+
139
+ @utility ui-badge-lime {
140
+ color: var(--badge-lime-text);
141
+ border-color: var(--badge-lime-border);
142
+ background-color: var(--badge-lime-bg);
143
+ }
144
+
145
+ @utility ui-badge-green {
146
+ color: var(--badge-green-text);
147
+ border-color: var(--badge-green-border);
148
+ background-color: var(--badge-green-bg);
149
+ }
150
+
151
+ @utility ui-badge-emerald {
152
+ color: var(--badge-emerald-text);
153
+ border-color: var(--badge-emerald-border);
154
+ background-color: var(--badge-emerald-bg);
155
+ }
156
+
157
+ @utility ui-badge-teal {
158
+ color: var(--badge-teal-text);
159
+ border-color: var(--badge-teal-border);
160
+ background-color: var(--badge-teal-bg);
161
+ }
162
+
163
+ @utility ui-badge-cyan {
164
+ color: var(--badge-cyan-text);
165
+ border-color: var(--badge-cyan-border);
166
+ background-color: var(--badge-cyan-bg);
167
+ }
168
+
169
+ @utility ui-badge-sky {
170
+ color: var(--badge-sky-text);
171
+ border-color: var(--badge-sky-border);
172
+ background-color: var(--badge-sky-bg);
173
+ }
174
+
175
+ @utility ui-badge-blue {
176
+ color: var(--badge-blue-text);
177
+ border-color: var(--badge-blue-border);
178
+ background-color: var(--badge-blue-bg);
179
+ }
180
+
181
+ @utility ui-badge-indigo {
182
+ color: var(--badge-indigo-text);
183
+ border-color: var(--badge-indigo-border);
184
+ background-color: var(--badge-indigo-bg);
185
+ }
186
+
187
+ @utility ui-badge-violet {
188
+ color: var(--badge-violet-text);
189
+ border-color: var(--badge-violet-border);
190
+ background-color: var(--badge-violet-bg);
191
+ }
192
+
193
+ @utility ui-badge-purple {
194
+ color: var(--badge-purple-text);
195
+ border-color: var(--badge-purple-border);
196
+ background-color: var(--badge-purple-bg);
197
+ }
198
+
199
+ @utility ui-badge-fuchsia {
200
+ color: var(--badge-fuchsia-text);
201
+ border-color: var(--badge-fuchsia-border);
202
+ background-color: var(--badge-fuchsia-bg);
203
+ }
204
+
205
+ @utility ui-badge-pink {
206
+ color: var(--badge-pink-text);
207
+ border-color: var(--badge-pink-border);
208
+ background-color: var(--badge-pink-bg);
209
+ }
210
+
211
+ @utility ui-badge-rose {
212
+ color: var(--badge-rose-text);
213
+ border-color: var(--badge-rose-border);
214
+ background-color: var(--badge-rose-bg);
215
+ }