@jerry-fd/ui 0.3.1 → 0.3.3

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,12 +1,13 @@
1
- import React$1 from 'react';
1
+ import * as React$1 from 'react';
2
+ import React__default from 'react';
2
3
  import * as tailwind_variants from 'tailwind-variants';
3
4
  import { VariantProps } from 'tailwind-variants';
4
5
  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';
6
+ import { Avatar as Avatar$1, Popover as Popover$1, Tabs as Tabs$1, DropdownMenu as DropdownMenu$2 } from 'radix-ui';
9
7
  import { Command as Command$1 } from 'cmdk';
8
+ export { B as Button, b as baseButtonStyle, a as buttonVariants } from './button-mRGhVhV8.js';
9
+ import { I as IconType } from './icon-BmaneZ4I.js';
10
+ import * as tailwind_merge from 'tailwind-merge';
10
11
 
11
12
  type UILocale = (typeof SUPPORTED_LOCALES)[number];
12
13
  declare const SUPPORTED_LOCALES: readonly ["en-US", "zh-CN"];
@@ -14,11 +15,11 @@ declare const SUPPORTED_LOCALES: readonly ["en-US", "zh-CN"];
14
15
  interface UIState {
15
16
  tableUiStorageKey?: string;
16
17
  }
17
- type UIProviderProps = React$1.PropsWithChildren<UIState & {
18
+ type UIProviderProps = React__default.PropsWithChildren<UIState & {
18
19
  locale?: UILocale;
19
20
  onChange?: (state: UIState) => void;
20
21
  }>;
21
- declare const UIProvider: React$1.FC<UIProviderProps>;
22
+ declare const UIProvider: React__default.FC<UIProviderProps>;
22
23
 
23
24
  declare const dateUtils: {
24
25
  readonly presets: {
@@ -100,17 +101,323 @@ declare const cardVariants: tailwind_variants.TVReturnType<{
100
101
  accent: string;
101
102
  };
102
103
  }, 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;
104
+ declare function Card({ className, variant, ...props }: React__default.HTMLAttributes<HTMLDivElement> & VariantProps<typeof cardVariants>): react_jsx_runtime.JSX.Element;
105
+ declare function CardHeader({ className, ...props }: React__default.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
106
+ declare function CardContent({ className, ...props }: React__default.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
107
+ declare function CardExtra({ className, ...props }: React__default.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
108
+ declare function CardTable({ className, ...props }: React__default.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
109
+ declare function CardFooter({ className, ...props }: React__default.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
110
+ declare function CardHeading({ className, ...props }: React__default.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
111
+ declare function CardToolbar({ className, ...props }: React__default.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
112
+ declare function CardTitle({ className, ...props }: React__default.HTMLAttributes<HTMLHeadingElement>): react_jsx_runtime.JSX.Element;
113
+ declare function CardIcon({ className, ...props }: React__default.HTMLAttributes<HTMLHeadingElement>): react_jsx_runtime.JSX.Element;
114
+ declare function CardDescription({ className, ...props }: React__default.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
115
+
116
+ declare const card_Card: typeof Card;
117
+ declare const card_CardContent: typeof CardContent;
118
+ declare const card_CardDescription: typeof CardDescription;
119
+ declare const card_CardExtra: typeof CardExtra;
120
+ declare const card_CardFooter: typeof CardFooter;
121
+ declare const card_CardHeader: typeof CardHeader;
122
+ declare const card_CardHeading: typeof CardHeading;
123
+ declare const card_CardIcon: typeof CardIcon;
124
+ declare const card_CardTable: typeof CardTable;
125
+ declare const card_CardTitle: typeof CardTitle;
126
+ declare const card_CardToolbar: typeof CardToolbar;
127
+ declare namespace card {
128
+ export { card_Card as Card, card_CardContent as CardContent, card_CardDescription as CardDescription, card_CardExtra as CardExtra, card_CardFooter as CardFooter, card_CardHeader as CardHeader, card_CardHeading as CardHeading, card_CardIcon as CardIcon, card_CardTable as CardTable, card_CardTitle as CardTitle, card_CardToolbar as CardToolbar, Card as Root };
129
+ }
130
+
131
+ interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
132
+ asChild?: boolean;
133
+ dotClassName?: string;
134
+ disabled?: boolean;
135
+ }
136
+ interface BadgeButtonProps extends React$1.ButtonHTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeButtonVariants> {
137
+ asChild?: boolean;
138
+ }
139
+ type BadgeDotProps = React$1.HTMLAttributes<HTMLSpanElement>;
140
+ declare const badgeVariants: tailwind_variants.TVReturnType<{
141
+ variant: {
142
+ primary: string;
143
+ secondary: string;
144
+ success: string;
145
+ warning: string;
146
+ info: string;
147
+ outline: string;
148
+ error: string;
149
+ };
150
+ appearance: {
151
+ default: string;
152
+ light: string;
153
+ outline: string;
154
+ ghost: string;
155
+ };
156
+ disabled: {
157
+ true: string;
158
+ };
159
+ size: {
160
+ large: string;
161
+ medium: string;
162
+ small: string;
163
+ xsmall: string;
164
+ };
165
+ shape: {
166
+ default: string;
167
+ circle: string;
168
+ };
169
+ }, undefined, string[], {
170
+ variant: {
171
+ primary: string;
172
+ secondary: string;
173
+ success: string;
174
+ warning: string;
175
+ info: string;
176
+ outline: string;
177
+ error: string;
178
+ };
179
+ appearance: {
180
+ default: string;
181
+ light: string;
182
+ outline: string;
183
+ ghost: string;
184
+ };
185
+ disabled: {
186
+ true: string;
187
+ };
188
+ size: {
189
+ large: string;
190
+ medium: string;
191
+ small: string;
192
+ xsmall: string;
193
+ };
194
+ shape: {
195
+ default: string;
196
+ circle: string;
197
+ };
198
+ }, undefined, tailwind_variants.TVReturnType<{
199
+ variant: {
200
+ primary: string;
201
+ secondary: string;
202
+ success: string;
203
+ warning: string;
204
+ info: string;
205
+ outline: string;
206
+ error: string;
207
+ };
208
+ appearance: {
209
+ default: string;
210
+ light: string;
211
+ outline: string;
212
+ ghost: string;
213
+ };
214
+ disabled: {
215
+ true: string;
216
+ };
217
+ size: {
218
+ large: string;
219
+ medium: string;
220
+ small: string;
221
+ xsmall: string;
222
+ };
223
+ shape: {
224
+ default: string;
225
+ circle: string;
226
+ };
227
+ }, undefined, string[], unknown, unknown, undefined>>;
228
+ declare const badgeButtonVariants: tailwind_variants.TVReturnType<{
229
+ variant: {
230
+ default: string;
231
+ };
232
+ }, undefined, "-me-2 inline-flex size-14 cursor-pointer items-center justify-center rounded-md p-0 leading-none opacity-60 transition-all hover:opacity-100 [&>svg]:size-14! [&>svg]:opacity-100!", {
233
+ variant: {
234
+ default: string;
235
+ };
236
+ }, undefined, tailwind_variants.TVReturnType<{
237
+ variant: {
238
+ default: string;
239
+ };
240
+ }, undefined, "-me-2 inline-flex size-14 cursor-pointer items-center justify-center rounded-md p-0 leading-none opacity-60 transition-all hover:opacity-100 [&>svg]:size-14! [&>svg]:opacity-100!", unknown, unknown, undefined>>;
241
+ declare function Badge({ className, variant, size, appearance, shape, asChild, disabled, ...props }: React$1.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
242
+ asChild?: boolean;
243
+ }): react_jsx_runtime.JSX.Element;
244
+ declare function BadgeButton({ className, variant, asChild, ...props }: React$1.ComponentProps<'button'> & VariantProps<typeof badgeButtonVariants> & {
245
+ asChild?: boolean;
246
+ }): react_jsx_runtime.JSX.Element;
247
+ declare function BadgeDot({ className, ...props }: React$1.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
248
+
249
+ declare const badge_Badge: typeof Badge;
250
+ declare const badge_BadgeButton: typeof BadgeButton;
251
+ type badge_BadgeButtonProps = BadgeButtonProps;
252
+ declare const badge_BadgeDot: typeof BadgeDot;
253
+ type badge_BadgeDotProps = BadgeDotProps;
254
+ type badge_BadgeProps = BadgeProps;
255
+ declare const badge_badgeVariants: typeof badgeVariants;
256
+ declare namespace badge {
257
+ export { badge_Badge as Badge, badge_BadgeButton as BadgeButton, type badge_BadgeButtonProps as BadgeButtonProps, badge_BadgeDot as BadgeDot, type badge_BadgeDotProps as BadgeDotProps, type badge_BadgeProps as BadgeProps, Badge as Root, badge_badgeVariants as badgeVariants };
258
+ }
259
+
260
+ declare const avatarStatusVariants: tailwind_variants.TVReturnType<{
261
+ variant: {
262
+ online: string;
263
+ offline: string;
264
+ busy: string;
265
+ away: string;
266
+ };
267
+ }, undefined, "border-background flex size-2 items-center rounded-full border-2", {
268
+ variant: {
269
+ online: string;
270
+ offline: string;
271
+ busy: string;
272
+ away: string;
273
+ };
274
+ }, undefined, tailwind_variants.TVReturnType<{
275
+ variant: {
276
+ online: string;
277
+ offline: string;
278
+ busy: string;
279
+ away: string;
280
+ };
281
+ }, undefined, "border-background flex size-2 items-center rounded-full border-2", unknown, unknown, undefined>>;
282
+ declare function Avatar({ className, ...props }: React$1.ComponentProps<typeof Avatar$1.Root>): react_jsx_runtime.JSX.Element;
283
+ declare function AvatarImage({ className, ...props }: React$1.ComponentProps<typeof Avatar$1.Image>): react_jsx_runtime.JSX.Element;
284
+ declare function AvatarFallback({ className, ...props }: React$1.ComponentProps<typeof Avatar$1.Fallback>): react_jsx_runtime.JSX.Element;
285
+ declare function AvatarIndicator({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
286
+ declare function AvatarStatus({ className, variant, ...props }: React$1.HTMLAttributes<HTMLDivElement> & VariantProps<typeof avatarStatusVariants>): react_jsx_runtime.JSX.Element;
287
+
288
+ declare const avatar_Avatar: typeof Avatar;
289
+ declare const avatar_AvatarFallback: typeof AvatarFallback;
290
+ declare const avatar_AvatarImage: typeof AvatarImage;
291
+ declare const avatar_AvatarIndicator: typeof AvatarIndicator;
292
+ declare const avatar_AvatarStatus: typeof AvatarStatus;
293
+ declare const avatar_avatarStatusVariants: typeof avatarStatusVariants;
294
+ declare namespace avatar {
295
+ export { avatar_Avatar as Avatar, avatar_AvatarFallback as AvatarFallback, avatar_AvatarImage as AvatarImage, avatar_AvatarIndicator as AvatarIndicator, avatar_AvatarStatus as AvatarStatus, Avatar as Root, avatar_avatarStatusVariants as avatarStatusVariants };
296
+ }
297
+
298
+ declare const Popover: React__default.FC<Popover$1.PopoverProps>;
299
+ declare const PopoverTrigger: React__default.ForwardRefExoticComponent<Popover$1.PopoverTriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
300
+ declare const PopoverContent: React__default.ForwardRefExoticComponent<Omit<Popover$1.PopoverContentProps & React__default.RefAttributes<HTMLDivElement>, "ref"> & {
301
+ arrow?: boolean;
302
+ unstyled?: boolean;
303
+ } & React__default.RefAttributes<HTMLDivElement>>;
304
+ declare const PopoverClose: React__default.ForwardRefExoticComponent<Omit<Popover$1.PopoverCloseProps & React__default.RefAttributes<HTMLButtonElement>, "ref"> & {
305
+ unstyled?: boolean;
306
+ } & React__default.RefAttributes<HTMLButtonElement>>;
307
+ declare function PopoverAnchor({ ...props }: React__default.ComponentProps<typeof Popover$1.Anchor>): react_jsx_runtime.JSX.Element;
308
+
309
+ declare const popover_Popover: typeof Popover;
310
+ declare const popover_PopoverAnchor: typeof PopoverAnchor;
311
+ declare const popover_PopoverClose: typeof PopoverClose;
312
+ declare const popover_PopoverContent: typeof PopoverContent;
313
+ declare const popover_PopoverTrigger: typeof PopoverTrigger;
314
+ declare namespace popover {
315
+ export { popover_Popover as Popover, popover_PopoverAnchor as PopoverAnchor, popover_PopoverClose as PopoverClose, popover_PopoverContent as PopoverContent, popover_PopoverTrigger as PopoverTrigger, Popover as Root };
316
+ }
317
+
318
+ declare function Command({ className, ...props }: React__default.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
319
+ declare function CommandInput({ className, ...props }: React__default.ComponentProps<typeof Command$1.Input>): react_jsx_runtime.JSX.Element;
320
+ declare function CommandList({ className, ...props }: React__default.ComponentProps<typeof Command$1.List>): react_jsx_runtime.JSX.Element;
321
+ declare function CommandEmpty({ ...props }: React__default.ComponentProps<typeof Command$1.Empty>): react_jsx_runtime.JSX.Element;
322
+ declare function CommandGroup({ className, ...props }: React__default.ComponentProps<typeof Command$1.Group>): react_jsx_runtime.JSX.Element;
323
+ declare function CommandSeparator({ className, ...props }: React__default.ComponentProps<typeof Command$1.Separator>): react_jsx_runtime.JSX.Element;
324
+ declare function CommandItem({ className, ...props }: React__default.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
325
+ declare function CommandShortcut({ className, ...props }: React__default.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
326
+
327
+ declare const command_Command: typeof Command;
328
+ declare const command_CommandEmpty: typeof CommandEmpty;
329
+ declare const command_CommandGroup: typeof CommandGroup;
330
+ declare const command_CommandInput: typeof CommandInput;
331
+ declare const command_CommandItem: typeof CommandItem;
332
+ declare const command_CommandList: typeof CommandList;
333
+ declare const command_CommandSeparator: typeof CommandSeparator;
334
+ declare const command_CommandShortcut: typeof CommandShortcut;
335
+ declare namespace command {
336
+ export { command_Command as Command, command_CommandEmpty as CommandEmpty, command_CommandGroup as CommandGroup, command_CommandInput as CommandInput, command_CommandItem as CommandItem, command_CommandList as CommandList, command_CommandSeparator as CommandSeparator, command_CommandShortcut as CommandShortcut, Command as Root };
337
+ }
338
+
339
+ declare const tabsListVariants: tailwind_variants.TVReturnType<{
340
+ variant: {
341
+ default: string;
342
+ button: string;
343
+ line: string;
344
+ };
345
+ shape: {
346
+ default: string;
347
+ pill: string;
348
+ };
349
+ size: {
350
+ large: string;
351
+ medium: string;
352
+ small: string;
353
+ xsmall: string;
354
+ };
355
+ }, undefined, "flex w-fit shrink-0 items-center", {
356
+ variant: {
357
+ default: string;
358
+ button: string;
359
+ line: string;
360
+ };
361
+ shape: {
362
+ default: string;
363
+ pill: string;
364
+ };
365
+ size: {
366
+ large: string;
367
+ medium: string;
368
+ small: string;
369
+ xsmall: string;
370
+ };
371
+ }, undefined, tailwind_variants.TVReturnType<{
372
+ variant: {
373
+ default: string;
374
+ button: string;
375
+ line: string;
376
+ };
377
+ shape: {
378
+ default: string;
379
+ pill: string;
380
+ };
381
+ size: {
382
+ large: string;
383
+ medium: string;
384
+ small: string;
385
+ xsmall: string;
386
+ };
387
+ }, undefined, "flex w-fit shrink-0 items-center", unknown, unknown, undefined>>;
388
+ declare const tabsContentVariants: tailwind_variants.TVReturnType<{
389
+ variant: {
390
+ default: string;
391
+ };
392
+ }, undefined, "focus-visible:ring-ring mt-10 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden", {
393
+ variant: {
394
+ default: string;
395
+ };
396
+ }, undefined, tailwind_variants.TVReturnType<{
397
+ variant: {
398
+ default: string;
399
+ };
400
+ }, undefined, "focus-visible:ring-ring mt-10 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden", unknown, unknown, undefined>>;
401
+ declare function Tabs({ className, ...props }: React__default.ComponentProps<typeof Tabs$1.Root>): react_jsx_runtime.JSX.Element;
402
+ declare function TabsList({ className, variant, shape, size, ...props }: React__default.ComponentProps<typeof Tabs$1.List> & VariantProps<typeof tabsListVariants>): react_jsx_runtime.JSX.Element;
403
+ declare function TabsTrigger({ className, ...props }: React__default.ComponentProps<typeof Tabs$1.Trigger>): react_jsx_runtime.JSX.Element;
404
+ declare function TabsContent({ className, variant, ...props }: React__default.ComponentProps<typeof Tabs$1.Content> & VariantProps<typeof tabsContentVariants>): react_jsx_runtime.JSX.Element;
405
+
406
+ declare const tabs_Tabs: typeof Tabs;
407
+ declare const tabs_TabsContent: typeof TabsContent;
408
+ declare const tabs_TabsList: typeof TabsList;
409
+ declare const tabs_TabsTrigger: typeof TabsTrigger;
410
+ declare namespace tabs {
411
+ export { Tabs as Root, tabs_Tabs as Tabs, tabs_TabsContent as TabsContent, tabs_TabsList as TabsList, tabs_TabsTrigger as TabsTrigger };
412
+ }
413
+
414
+ declare function Skeleton({ className, ...props }: React__default.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
415
+
416
+ type OwnProps = {
417
+ stroke?: number | string;
418
+ className?: string;
419
+ };
420
+ declare function Spinner({ stroke, className }: OwnProps): react_jsx_runtime.JSX.Element;
114
421
 
115
422
  type IValue = string | number;
116
423
  interface IOptionItem {
@@ -121,15 +428,15 @@ interface IOptionItem {
121
428
  disabled?: boolean;
122
429
  }
123
430
 
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>>;
431
+ declare const DropdownMenu$1: React__default.FC<DropdownMenu$2.DropdownMenuProps>;
432
+ declare const DropdownMenuContent: React__default.FC<React__default.ComponentPropsWithRef<typeof DropdownMenu$2.Content>>;
126
433
 
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);
434
+ type DropdownMenuContentProps = React__default.ComponentProps<typeof DropdownMenuContent>;
435
+ type DropdownMenuPrimitiveProps = React__default.ComponentProps<typeof DropdownMenu$1>;
436
+ type SetValue<T> = React__default.Dispatch<React__default.SetStateAction<T>> | ((data: T) => void);
130
437
  interface BaseMenuItem {
131
- key?: React$1.Key;
132
- label?: string | React$1.ReactNode;
438
+ key?: React__default.Key;
439
+ label?: string | React__default.ReactNode;
133
440
  icon?: IconType;
134
441
  to?: string;
135
442
  separator?: boolean;
@@ -161,16 +468,16 @@ interface NormalMenuItem extends BaseMenuItem {
161
468
  }
162
469
  type DropdownMenuItemProps = RadioMenuItem | CheckboxMenuItem | NormalMenuItem;
163
470
  interface MenuPropBase {
164
- menuLabel?: React$1.ReactNode;
471
+ menuLabel?: React__default.ReactNode;
165
472
  items?: DropdownMenuItemProps[];
166
473
  disabled?: boolean;
167
474
  className?: string;
168
- renderItem?: (item: DropdownMenuItemProps, index: number, onAction: MenuPropBase['onAction']) => React$1.ReactNode;
169
- onAction?: (item: DropdownMenuItemProps, event: React$1.MouseEvent<HTMLDivElement>) => void;
475
+ renderItem?: (item: DropdownMenuItemProps, index: number, onAction: MenuPropBase['onAction']) => React__default.ReactNode;
476
+ onAction?: (item: DropdownMenuItemProps, event: React__default.MouseEvent<HTMLDivElement>) => void;
170
477
  }
171
478
  interface DropdownMenuProps extends DropdownMenuPrimitiveProps, DropdownMenuContentProps, MenuPropBase {
172
479
  }
173
- declare const DropdownMenu: React$1.FC<DropdownMenuProps>;
480
+ declare const DropdownMenu: React__default.FC<DropdownMenuProps>;
174
481
 
175
482
  declare const menu: tailwind_variants.TVReturnType<{
176
483
  inset: {
@@ -330,20 +637,11 @@ declare const dropdownMenuStyles: {
330
637
  } & {};
331
638
  type DropdownMenuVariants = VariantProps<typeof menu>;
332
639
 
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
640
  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'> & {
641
+ type ColorPanelProps = React__default.ComponentProps<'div'> & {
344
642
  asChild?: boolean;
345
643
  variant?: Variant;
346
644
  };
347
645
  declare function ColorPanel({ asChild, children, className, variant, ...props }: ColorPanelProps): react_jsx_runtime.JSX.Element;
348
646
 
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 };
647
+ export { avatar as Avatar, badge as Badge, card as Card, ColorPanel, command as Command, DropdownMenu, type DropdownMenuItemProps, type DropdownMenuProps, type DropdownMenuVariants, type MenuPropBase, popover as Popover, Skeleton, Spinner, tabs as Tabs, UIProvider, cn, dateUtils, dropdownMenuStyles, formatCurrency, formatIntegerCompact, formatNumber, getFirstLetters, tv, twMergeConfig };
package/index.js CHANGED
@@ -1 +1 @@
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};
1
+ export{g as DropdownMenu,e as Skeleton,d as Tabs,f as dropdownMenuStyles}from'./chunk-MQJGKS3C.js';import {e,f,a as a$1}from'./chunk-BJHN7W7I.js';export{M as Button,q as Card,I as Command,u as Popover,J as Spinner,K as baseButtonStyle,L as buttonVariants,f as cn,c as dateUtils,e as tv,d as twMergeConfig}from'./chunk-BJHN7W7I.js';import {a}from'./chunk-WOT6VMZA.js';import {LazyMotion}from'motion/react';import c from'react';import {jsx}from'react/jsx-runtime';import {Slot,Avatar}from'radix-ui';var M=()=>import('./motion-features-NSSC2G6R.js').then(e=>e.default),d=Symbol.for("@@jerry-fe/ui/UIProviderContext");function B(){if(!globalThis[d]){let e=c.createContext(null);globalThis[d]=e;}return globalThis[d]}var F=B(),h=({children:e,locale:t="zh-CN",tableUiStorageKey:a="APP_UI_TABLE_CONFIG",onChange:o})=>{let[r,s]=c.useState(()=>({tableUiStorageKey:a})),m=c.useCallback(l=>{s(U=>{let v=typeof l=="function"?l(U):l;return o?.(v),v});},[o]);c.useEffect(()=>{s({tableUiStorageKey:a});},[a]);let u=c.useMemo(()=>({state:r,setState:m}),[r,m]);return jsx(LazyMotion,{features:M,strict:true,children:jsx(F.Provider,{value:u,children:jsx(a$1,{locale:t,children:e})})})};h.displayName="UIProvider";var C=new WeakMap;function N(e){return((...t)=>{let a=C.get(e),o=t.map(String).join("_");if(a){let s=a.get(o);if(s)return s}else a=new Map,C.set(e,a);let r=e(...t);return a.set(o,r),r})}function ce(e,t,a="zh-CN"){return new Intl.NumberFormat(a,t).format(e)}function me(e,t,a="zh-CN"){return new Intl.NumberFormat(a,{style:"currency",...t}).format(e)}function ue(e,t="en-US"){return new Intl.NumberFormat(t,{notation:"compact",compactDisplay:"short"}).format(e)}var de=N((e,t=2)=>e.replace(/[.,!@#$%^&*()_+=\-`~[\]/\\{}:"|<>?]+/gi,"").trim().split(/\s+/).slice(0,t).map(a=>{if(!a.length)return "";if(/\s+/.test(e))return a.match(/./u)?.[0].toUpperCase();let o=new RegExp(".".repeat(t),"u"),r=a.match(o)?.[0];return r?r.charAt(0).toUpperCase()+r.slice(1):e.charAt(0).toUpperCase()+e.slice(1,2)}).join(""));var I={};a(I,{Badge:()=>E,BadgeButton:()=>H,BadgeDot:()=>D,Root:()=>E,badgeVariants:()=>w});var w=e({base:["inline-flex items-center justify-center border border-transparent font-medium whitespace-nowrap select-none [&_svg]:-ms-px [&_svg]:shrink-0","focus:ring-2 focus:ring-primary-base focus:ring-offset-2 focus:outline-hidden"],variants:{variant:{primary:"bg-primary-base text-static-white",secondary:"bg-gray-200 text-gray-700",success:"bg-green-500 text-static-white",warning:"bg-yellow-500 text-static-white",info:"bg-violet-500 text-static-white",outline:"border border-stroke-soft bg-transparent text-text-sub",error:"bg-red-600 text-static-white"},appearance:{default:"",light:"",outline:"border-stroke-sub",ghost:"border-transparent bg-transparent"},disabled:{true:"pointer-events-none opacity-50"},size:{large:"h-28 min-w-28 gap-6 rounded-lg px-8 text-[14px] [&_svg]:size-14",medium:"h-24 min-w-24 gap-5 rounded-lg px-[7.2px] text-[14px] [&_svg]:size-14",small:"h-20 min-w-20 gap-4 rounded-md px-[5.2px] text-[12px] leading-14 [&_svg]:size-12",xsmall:"h-16 min-w-16 gap-4 rounded-md px-4 text-[10px] leading-12 [&_svg]:size-12"},shape:{default:"",circle:"rounded-full"}},compoundVariants:[{variant:"primary",appearance:"light",className:"bg-primary-base text-static-white"},{variant:"secondary",appearance:"light",className:"bg-gray-200"},{variant:"success",appearance:"light",className:"bg-green-50 text-green-700"},{variant:"warning",appearance:"light",className:"bg-yellow-50 text-yellow-700"},{variant:"info",appearance:"light",className:"bg-violet-50 text-violet-700"},{variant:"error",appearance:"light",className:"bg-red-50 text-red-700"},{variant:"primary",appearance:"outline",className:"border-blue-100 bg-blue-50 text-blue-700"},{variant:"success",appearance:"outline",className:"border-green-100 bg-green-50 text-green-700"},{variant:"warning",appearance:"outline",className:"border-yellow-100 bg-yellow-50 text-yellow-700"},{variant:"info",appearance:"outline",className:"border-violet-100 bg-violet-50 text-violet-700"},{variant:"error",appearance:"outline",className:"border-red-100 bg-red-50 text-red-700"},{variant:"primary",appearance:"ghost",className:"text-primary-base"},{variant:"secondary",appearance:"ghost",className:"text-gray-700"},{variant:"success",appearance:"ghost",className:"text-green-500"},{variant:"warning",appearance:"ghost",className:"text-yellow-500"},{variant:"info",appearance:"ghost",className:"text-violet-500"},{variant:"error",appearance:"ghost",className:"text-error-base"},{size:"large",appearance:"ghost",className:"px-0"},{size:"medium",appearance:"ghost",className:"px-0"},{size:"small",appearance:"ghost",className:"px-0"},{size:"xsmall",appearance:"ghost",className:"px-0"}],defaultVariants:{variant:"primary",appearance:"default",size:"medium"}}),_=e({base:"-me-2 inline-flex size-14 cursor-pointer items-center justify-center rounded-md p-0 leading-none opacity-60 transition-all hover:opacity-100 [&>svg]:size-14! [&>svg]:opacity-100!",variants:{variant:{default:""}},defaultVariants:{variant:"default"}});function E({className:e,variant:t,size:a,appearance:o,shape:r,asChild:s=false,disabled:m,...u}){let l=s?Slot.Slot:"span";return jsx(l,{"data-slot":"badge",className:f(w({variant:t,size:a,appearance:o,shape:r,disabled:m}),e),...u})}function H({className:e,variant:t,asChild:a=false,...o}){let r=a?Slot.Slot:"span";return jsx(r,{"data-slot":"badge-button",className:f(_({variant:t,className:e})),role:"button",...o})}function D({className:e,...t}){return jsx("span",{"data-slot":"badge-dot",className:f("size-6 rounded-full bg-[currentColor] opacity-75",e),...t})}var T={};a(T,{Avatar:()=>O,AvatarFallback:()=>W,AvatarImage:()=>j,AvatarIndicator:()=>$,AvatarStatus:()=>q,Root:()=>O,avatarStatusVariants:()=>S});var S=e({base:"border-background flex size-2 items-center rounded-full border-2",variants:{variant:{online:"bg-green-600",offline:"bg-zinc-400 dark:bg-zinc-500",busy:"bg-yellow-600",away:"bg-blue-600"}},defaultVariants:{variant:"online"}});function O({className:e,...t}){return jsx(Avatar.Root,{"data-slot":"avatar",className:f("relative flex size-40 shrink-0",e),...t})}function j({className:e,...t}){return jsx("div",{className:f("relative overflow-hidden rounded-full",e),children:jsx(Avatar.Image,{"data-slot":"avatar-image",className:f("aspect-square h-full w-full"),...t})})}function W({className:e,...t}){return jsx(Avatar.Fallback,{"data-slot":"avatar-fallback",className:f("flex h-full w-full items-center justify-center rounded-full border border-stroke-soft bg-bg-weak text-[13px] text-text-sub",e),...t})}function $({className:e,...t}){return jsx("div",{"data-slot":"avatar-indicator",className:f("absolute flex size-24 items-center justify-center",e),...t})}function q({className:e,variant:t,...a}){return jsx("div",{"data-slot":"avatar-status",className:f(S({variant:t}),e),...a})}function Ie({asChild:e,children:t,className:a,variant:o="slate",...r}){let s=e?Slot.Root:"div";return jsx(s,{className:f(`flex shrink-0 items-center justify-center rounded-xl border ui-badge-${o}`,a),...r,children:t})}export{T as Avatar,I as Badge,Ie as ColorPanel,h as UIProvider,me as formatCurrency,ue as formatIntegerCompact,ce as formatNumber,de as getFirstLetters};
@@ -0,0 +1 @@
1
+ import'./chunk-WOT6VMZA.js';import {domMax}from'motion/react';var r=domMax;export{r as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jerry-fd/ui",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "UI component library based on Ant Design (Client-side only)",
5
5
  "type": "module",
6
6
  "sideEffects": ["index.js", "*.css"],
@@ -1,4 +1,4 @@
1
- import { I as IconType } from './icon-Byr-7UQX.js';
1
+ import { I as IconType } from './icon-BmaneZ4I.js';
2
2
  import { Dayjs } from 'dayjs';
3
3
 
4
4
  interface FilterColumnOption {