@nextlyhq/ui 0.0.2-alpha.5 → 0.0.2-alpha.50
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/README.md +98 -23
- package/dist/index.cjs +1118 -1096
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +98 -265
- package/dist/index.d.ts +98 -265
- package/dist/index.mjs +878 -838
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +2 -0
- package/dist/styles.scoped.css +2 -0
- package/dist/tailwind-preset.cjs +98 -0
- package/dist/tailwind-preset.cjs.map +1 -0
- package/dist/tailwind-preset.d.cts +80 -0
- package/dist/tailwind-preset.d.ts +80 -0
- package/dist/tailwind-preset.mjs +93 -0
- package/dist/tailwind-preset.mjs.map +1 -0
- package/dist/theme.css +997 -0
- package/dist/utils.cjs +13 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.cts +17 -0
- package/dist/utils.d.ts +17 -0
- package/dist/utils.mjs +11 -0
- package/dist/utils.mjs.map +1 -0
- package/docs/plugin-ui-authoring.md +228 -0
- package/package.json +56 -15
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { ButtonHTMLAttributes, ComponentProps, TextareaHTMLAttributes, HTMLAttributes,
|
|
3
|
+
import { ButtonHTMLAttributes, ComponentProps, TextareaHTMLAttributes, HTMLAttributes, ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
4
4
|
import * as class_variance_authority from 'class-variance-authority';
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -24,7 +24,6 @@ import { Command as Command$1 } from 'cmdk';
|
|
|
24
24
|
import { LucideProps } from 'lucide-react';
|
|
25
25
|
import { ToasterProps } from 'sonner';
|
|
26
26
|
export { ToasterProps, toast } from 'sonner';
|
|
27
|
-
import { ClassValue } from 'clsx';
|
|
28
27
|
|
|
29
28
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
30
29
|
asChild?: boolean;
|
|
@@ -68,7 +67,7 @@ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAtt
|
|
|
68
67
|
* Design Specs:
|
|
69
68
|
* - Height: sm=32px, default=40px, lg=44px
|
|
70
69
|
* - Padding: Horizontal varies by size (sm=10px, default=12px, lg=16px)
|
|
71
|
-
* - Border radius:
|
|
70
|
+
* - Border radius: `rounded-md`, the control step of the `--radius` scale
|
|
72
71
|
* - Border: 1px solid, changes on focus/error
|
|
73
72
|
* - Transition: 150ms (consistent with design system)
|
|
74
73
|
* - Font size: sm/default=14px (text-sm), lg=16px (text-base)
|
|
@@ -98,6 +97,15 @@ declare const Textarea: react.ForwardRefExoticComponent<TextareaHTMLAttributes<H
|
|
|
98
97
|
|
|
99
98
|
declare function Label({ className, ...props }: ComponentProps<typeof Root>): react_jsx_runtime.JSX.Element;
|
|
100
99
|
|
|
100
|
+
interface FormLabelWithTooltipProps extends react.ComponentPropsWithoutRef<typeof Label> {
|
|
101
|
+
label: react.ReactNode;
|
|
102
|
+
description?: react.ReactNode;
|
|
103
|
+
required?: boolean;
|
|
104
|
+
labelClassName?: string;
|
|
105
|
+
tooltipClassName?: string;
|
|
106
|
+
}
|
|
107
|
+
declare const FormLabelWithTooltip: react.ForwardRefExoticComponent<FormLabelWithTooltipProps & react.RefAttributes<HTMLLabelElement>>;
|
|
108
|
+
|
|
101
109
|
/**
|
|
102
110
|
* Badge Component - Design System Specification
|
|
103
111
|
*
|
|
@@ -124,7 +132,7 @@ declare function Label({ className, ...props }: ComponentProps<typeof Root>): re
|
|
|
124
132
|
* - success: Light green background
|
|
125
133
|
* - warning: Light amber background
|
|
126
134
|
* - destructive: Light red background
|
|
127
|
-
* - outline: Transparent background with border border-
|
|
135
|
+
* - outline: Transparent background with border border-border
|
|
128
136
|
*/
|
|
129
137
|
declare const badgeVariants: (props?: ({
|
|
130
138
|
variant?: "default" | "primary" | "destructive" | "outline" | "success" | "warning" | null | undefined;
|
|
@@ -140,14 +148,14 @@ declare function Badge({ className, variant, ...props }: BadgeProps): react_jsx_
|
|
|
140
148
|
* Cards provide a structured layout with header, content, and footer sections.
|
|
141
149
|
*
|
|
142
150
|
* Design Specs:
|
|
143
|
-
* - Border radius:
|
|
151
|
+
* - Border radius: `rounded-lg`, the container step of the `--radius` scale
|
|
144
152
|
* - Padding: 24px (p-6) for header/content, 16px 24px for footer
|
|
145
153
|
* - Shadow: sm (default), md (hover/elevated)
|
|
146
|
-
* - Border: 1px solid border border-
|
|
154
|
+
* - Border: 1px solid border border-border color
|
|
147
155
|
*
|
|
148
156
|
* Variants:
|
|
149
157
|
* - default: Standard card with subtle shadow
|
|
150
|
-
* - interactive: Hover effects for clickable cards (border border-
|
|
158
|
+
* - interactive: Hover effects for clickable cards (border border-border highlight, shadow increase)
|
|
151
159
|
* ⚠️ IMPORTANT: When using the interactive variant, you MUST add appropriate
|
|
152
160
|
* accessibility attributes:
|
|
153
161
|
* - Add role="button" or use an actual <button> wrapper
|
|
@@ -192,8 +200,8 @@ declare const Card: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElemen
|
|
|
192
200
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & react.RefAttributes<HTMLDivElement>>;
|
|
193
201
|
interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
194
202
|
/**
|
|
195
|
-
* Whether to hide the bottom border border-
|
|
196
|
-
* Default: false (border border-
|
|
203
|
+
* Whether to hide the bottom border border-border separator between header and content.
|
|
204
|
+
* Default: false (border border-border is shown per design spec)
|
|
197
205
|
*/
|
|
198
206
|
noBorder?: boolean;
|
|
199
207
|
}
|
|
@@ -209,6 +217,33 @@ declare const CardContent: react.ForwardRefExoticComponent<CardContentProps & re
|
|
|
209
217
|
type CardFooterProps = HTMLAttributes<HTMLDivElement>;
|
|
210
218
|
declare const CardFooter: react.ForwardRefExoticComponent<CardFooterProps & react.RefAttributes<HTMLDivElement>>;
|
|
211
219
|
|
|
220
|
+
type Gap = 0 | 1 | 2 | 3 | 4 | 6 | 8;
|
|
221
|
+
type Cols = 1 | 2 | 3 | 4 | 6;
|
|
222
|
+
interface StackProps extends HTMLAttributes<HTMLDivElement> {
|
|
223
|
+
/** Main-axis direction. Default `col`. */
|
|
224
|
+
direction?: "col" | "row";
|
|
225
|
+
/** Gap between children (Tailwind spacing step). Default `4`. */
|
|
226
|
+
gap?: Gap;
|
|
227
|
+
}
|
|
228
|
+
/** Flex stack: vertical by default, horizontal with `direction="row"`. */
|
|
229
|
+
declare const Stack: react.ForwardRefExoticComponent<StackProps & react.RefAttributes<HTMLDivElement>>;
|
|
230
|
+
interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
231
|
+
/** Column count. Default `2`. */
|
|
232
|
+
cols?: Cols;
|
|
233
|
+
/** Gap between cells. Default `4`. */
|
|
234
|
+
gap?: Gap;
|
|
235
|
+
}
|
|
236
|
+
/** Simple fixed-column grid. */
|
|
237
|
+
declare const Grid: react.ForwardRefExoticComponent<GridProps & react.RefAttributes<HTMLDivElement>>;
|
|
238
|
+
interface StatProps extends HTMLAttributes<HTMLDivElement> {
|
|
239
|
+
/** Muted label above the value. */
|
|
240
|
+
label: string;
|
|
241
|
+
/** The emphasized value (string or node). */
|
|
242
|
+
value: ReactNode;
|
|
243
|
+
}
|
|
244
|
+
/** Labelled metric block for dashboard-style plugin widgets. */
|
|
245
|
+
declare const Stat: react.ForwardRefExoticComponent<StatProps & react.RefAttributes<HTMLDivElement>>;
|
|
246
|
+
|
|
212
247
|
/**
|
|
213
248
|
* Alert Component - Design System Specification
|
|
214
249
|
*
|
|
@@ -217,7 +252,7 @@ declare const CardFooter: react.ForwardRefExoticComponent<CardFooterProps & reac
|
|
|
217
252
|
*
|
|
218
253
|
* Design Specs:
|
|
219
254
|
* - Padding: 16px (p-4)
|
|
220
|
-
* - Border radius:
|
|
255
|
+
* - Border radius: `rounded-md`, one step tighter than Card's `rounded-lg`
|
|
221
256
|
* for inline/flow content vs. larger container components
|
|
222
257
|
* - Border: 1px solid matching variant color
|
|
223
258
|
* - Shadow: sm (subtle elevation)
|
|
@@ -332,7 +367,7 @@ declare function Separator({ className, orientation, decorative, ...props }: rea
|
|
|
332
367
|
* @design_specs
|
|
333
368
|
* - Background: bg-accent (slate-100 in light mode, slate-800 in dark mode)
|
|
334
369
|
* - Animation: animate-pulse with motion-reduce:animate-none (respects prefers-reduced-motion)
|
|
335
|
-
* - Border-radius:
|
|
370
|
+
* - Border-radius: `rounded-md` by default; override per placeholder shape
|
|
336
371
|
* - Contrast: 3:1 minimum for WCAG 1.4.11 (Non-text Contrast) compliance
|
|
337
372
|
*
|
|
338
373
|
* @accessibility
|
|
@@ -352,13 +387,13 @@ declare function Separator({ className, orientation, decorative, ...props }: rea
|
|
|
352
387
|
*
|
|
353
388
|
* **Avatar Skeleton:**
|
|
354
389
|
* ```tsx
|
|
355
|
-
* <Skeleton className="h-12 w-12 rounded-
|
|
390
|
+
* <Skeleton className="h-12 w-12 rounded-md" />
|
|
356
391
|
* ```
|
|
357
392
|
*
|
|
358
393
|
* **Card Skeleton:**
|
|
359
394
|
* ```tsx
|
|
360
395
|
* <div className="space-y-3">
|
|
361
|
-
* <Skeleton className="h-[125px] w-[250px] rounded-
|
|
396
|
+
* <Skeleton className="h-[125px] w-[250px] rounded-lg" />
|
|
362
397
|
* <div className="space-y-2">
|
|
363
398
|
* <Skeleton className="h-4 w-[250px]" />
|
|
364
399
|
* <Skeleton className="h-4 w-[200px]" />
|
|
@@ -372,7 +407,7 @@ declare function Separator({ className, orientation, decorative, ...props }: rea
|
|
|
372
407
|
* {isLoading ? (
|
|
373
408
|
* <>
|
|
374
409
|
* <span className="sr-only">Loading user profile...</span>
|
|
375
|
-
* <Skeleton className="h-12 w-12 rounded-
|
|
410
|
+
* <Skeleton className="h-12 w-12 rounded-md" />
|
|
376
411
|
* <Skeleton className="h-4 w-[200px]" />
|
|
377
412
|
* </>
|
|
378
413
|
* ) : (
|
|
@@ -433,7 +468,7 @@ type ProgressProps = {
|
|
|
433
468
|
* Visual variant for different states
|
|
434
469
|
*
|
|
435
470
|
* - `default`: Primary blue (bg-primary-500)
|
|
436
|
-
* - `success`: Green (bg-
|
|
471
|
+
* - `success`: Green (bg-success-500)
|
|
437
472
|
* - `error`: Red (bg-destructive)
|
|
438
473
|
*
|
|
439
474
|
* @default "default"
|
|
@@ -500,7 +535,7 @@ declare const Progress: react.ForwardRefExoticComponent<{
|
|
|
500
535
|
* Visual variant for different states
|
|
501
536
|
*
|
|
502
537
|
* - `default`: Primary blue (bg-primary-500)
|
|
503
|
-
* - `success`: Green (bg-
|
|
538
|
+
* - `success`: Green (bg-success-500)
|
|
504
539
|
* - `error`: Red (bg-destructive)
|
|
505
540
|
*
|
|
506
541
|
* @default "default"
|
|
@@ -542,19 +577,27 @@ declare const Checkbox: react.ForwardRefExoticComponent<Omit<CheckboxPrimitive.C
|
|
|
542
577
|
* Design Specs:
|
|
543
578
|
* - Size: 16px (h-4 w-4) - Fixed size matching Checkbox
|
|
544
579
|
* - Border: 1px solid, expands to 5px when checked (visual indicator)
|
|
545
|
-
* - Border radius:
|
|
580
|
+
* - Border radius: `rounded-full`. Round means "pick one" and square means
|
|
581
|
+
* "pick many"; a square radio would announce the wrong behaviour, so the
|
|
582
|
+
* shape is fixed and deliberately outside the `--radius` scale. Checkbox
|
|
583
|
+
* keeps the derived radius for the same reason.
|
|
546
584
|
* - Transition: 150ms (consistent with design system)
|
|
547
585
|
* - Focus ring: 2px ring with 2px offset
|
|
548
586
|
*
|
|
549
587
|
* Implementation Notes:
|
|
550
588
|
* - Uses Radix UI primitives for robust accessibility
|
|
551
|
-
* - Visual "checked" state achieved via border border-
|
|
552
|
-
* - No inner indicator needed - border border-
|
|
553
|
-
* - Hover state changes border border-
|
|
589
|
+
* - Visual "checked" state achieved via border border-border expansion (border-[5px])
|
|
590
|
+
* - No inner indicator needed - border border-border expansion provides clear visual feedback
|
|
591
|
+
* - Hover state changes border border-border color for better interactivity
|
|
554
592
|
*/
|
|
555
593
|
declare const RadioGroup: react.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
556
594
|
declare const RadioGroupItem: react.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
557
595
|
|
|
596
|
+
/**
|
|
597
|
+
* A pill track carrying a circular thumb is how a toggle is recognised, so both
|
|
598
|
+
* parts use `rounded-full` and stay outside the `--radius` scale: at any theme
|
|
599
|
+
* radius the switch must still read as a switch and not as a small checkbox.
|
|
600
|
+
*/
|
|
558
601
|
declare function Switch({ className, ...props }: ComponentProps<typeof Root$1>): react_jsx_runtime.JSX.Element;
|
|
559
602
|
|
|
560
603
|
declare const Collapsible: react.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & react.RefAttributes<HTMLDivElement>>;
|
|
@@ -586,7 +629,7 @@ type AccordionContentProps = ComponentPropsWithoutRef<typeof Content>;
|
|
|
586
629
|
* Built on Radix UI primitives with WAI-ARIA compliance.
|
|
587
630
|
*
|
|
588
631
|
* Design Specs:
|
|
589
|
-
* - AccordionItem border: 1px bottom border border-
|
|
632
|
+
* - AccordionItem border: 1px bottom border border-border (border-b)
|
|
590
633
|
* - AccordionTrigger padding: 16px vertical (py-4)
|
|
591
634
|
* - AccordionTrigger font: font-medium (500 weight)
|
|
592
635
|
* - AccordionContent padding: 16px bottom, 0 top (pb-4 pt-0)
|
|
@@ -677,7 +720,7 @@ declare const Accordion: react.ForwardRefExoticComponent<(AccordionPrimitive.Acc
|
|
|
677
720
|
* AccordionItem - Container for trigger and content
|
|
678
721
|
*
|
|
679
722
|
* Design Specs:
|
|
680
|
-
* - Border: 1px bottom border border-
|
|
723
|
+
* - Border: 1px bottom border border-border (border-b) for visual separation
|
|
681
724
|
* - Each item represents a collapsible section
|
|
682
725
|
*
|
|
683
726
|
* Accessibility:
|
|
@@ -750,7 +793,9 @@ declare const AccordionContent: react.ForwardRefExoticComponent<Omit<AccordionPr
|
|
|
750
793
|
* - 2xl: 80px (h-20 w-20) - For profile headers, large avatars
|
|
751
794
|
*
|
|
752
795
|
* **Design Specs**:
|
|
753
|
-
* - Border radius: rounded-
|
|
796
|
+
* - Border radius: `rounded-full`. A person's avatar is read as a circle, so it
|
|
797
|
+
* sits outside the `--radius` scale and stays circular at any theme radius.
|
|
798
|
+
* Non-identity content (media thumbnails) overrides back to a scale step.
|
|
754
799
|
* - Background: bg-accent (slate-100 light, slate-800 dark)
|
|
755
800
|
* - Text color: text-accent-foreground (slate-900 light, slate-100 dark)
|
|
756
801
|
* - Fallback text scales with avatar size (text-xs to text-2xl)
|
|
@@ -923,8 +968,9 @@ type TabsContentProps = ComponentPropsWithoutRef<typeof Content$1>;
|
|
|
923
968
|
* Built on Radix UI primitives with WAI-ARIA compliance.
|
|
924
969
|
*
|
|
925
970
|
* Design Specs:
|
|
926
|
-
* - TabsList border-radius:
|
|
927
|
-
* - TabsTrigger border-radius:
|
|
971
|
+
* - TabsList border-radius: square, independent of `--radius`
|
|
972
|
+
* - TabsTrigger border-radius: square, independent of `--radius`; the active
|
|
973
|
+
* state is a 2px bottom border that has to stay flush with the tab edges
|
|
928
974
|
* - TabsList height: 40px (h-10)
|
|
929
975
|
* - TabsTrigger padding: 12px 24px (px-3 py-1.5)
|
|
930
976
|
* - Transition duration: 150ms (design system standard)
|
|
@@ -1012,8 +1058,8 @@ declare const TabsList: react.ForwardRefExoticComponent<Omit<_radix_ui_react_tab
|
|
|
1012
1058
|
* - Padding: 6px 16px (px-4 py-2)
|
|
1013
1059
|
* - Font: text-sm (14px), font-medium (500)
|
|
1014
1060
|
* - Transition: 150ms (design system standard)
|
|
1015
|
-
* - Active state: blue text with blue bottom border border-
|
|
1016
|
-
* - Hover: blue text with blue bottom border border-
|
|
1061
|
+
* - Active state: blue text with blue bottom border border-border (2px)
|
|
1062
|
+
* - Hover: blue text with blue bottom border border-border
|
|
1017
1063
|
* - Gmail-inspired clean underline style
|
|
1018
1064
|
*
|
|
1019
1065
|
* Accessibility:
|
|
@@ -1078,7 +1124,7 @@ declare const PopoverContent: react.ForwardRefExoticComponent<Omit<PopoverPrimit
|
|
|
1078
1124
|
* ```
|
|
1079
1125
|
*
|
|
1080
1126
|
* @design-spec
|
|
1081
|
-
* - Border-radius:
|
|
1127
|
+
* - Border-radius: `rounded-lg`, the container step of the `--radius` scale
|
|
1082
1128
|
* - Max-width: 512px (default), responsive sizes available
|
|
1083
1129
|
* - Backdrop: black/80 with blur effect
|
|
1084
1130
|
* - Padding: 24px (p-6)
|
|
@@ -1223,7 +1269,7 @@ declare const AlertDialogCancel: react.ForwardRefExoticComponent<Omit<AlertDialo
|
|
|
1223
1269
|
* Provides context menus, action menus, and navigation menus with full keyboard support.
|
|
1224
1270
|
*
|
|
1225
1271
|
* **Design Specifications**:
|
|
1226
|
-
* - Border-radius:
|
|
1272
|
+
* - Border-radius: `rounded-lg` for the menu surface, `rounded-sm` for items
|
|
1227
1273
|
* - Padding: 4px (p-1) - compact spacing for menu items
|
|
1228
1274
|
* - Shadow: shadow-md - floating element elevation
|
|
1229
1275
|
* - Z-index: z-50 - above most content, below modals
|
|
@@ -1402,7 +1448,7 @@ type DropdownMenuShortcutProps = react.HTMLAttributes<HTMLSpanElement>;
|
|
|
1402
1448
|
* Design Specs:
|
|
1403
1449
|
* - Height: sm=32px, default=40px, lg=44px (matches Input component)
|
|
1404
1450
|
* - Padding: Horizontal 12px, vertical varies by size
|
|
1405
|
-
* - Border radius:
|
|
1451
|
+
* - Border radius: `rounded-md` on the trigger, `rounded-lg` on the panel
|
|
1406
1452
|
* - Border: 1px solid, changes on focus/error
|
|
1407
1453
|
* - Transition: 150ms (consistent with design system)
|
|
1408
1454
|
* - Font size: sm/default=14px (text-sm), lg=16px (text-base)
|
|
@@ -1651,7 +1697,7 @@ type SheetDescriptionRef = React.ElementRef<typeof DialogPrimitive.Description>;
|
|
|
1651
1697
|
* @design-spec
|
|
1652
1698
|
* - Input height: 48px (h-12) - larger for prominence
|
|
1653
1699
|
* - Item height: 36px (h-9) desktop, 44px (h-11) mobile for touch
|
|
1654
|
-
* - Border radius:
|
|
1700
|
+
* - Border radius: `rounded-lg` for the panel, `rounded-sm` for items
|
|
1655
1701
|
* - Max list height: 400px (max-h-[400px])
|
|
1656
1702
|
* - Transition: 150ms per design system
|
|
1657
1703
|
*
|
|
@@ -1771,7 +1817,7 @@ declare const CommandGroup: react.ForwardRefExoticComponent<Omit<{
|
|
|
1771
1817
|
type CommandSeparatorProps = ComponentPropsWithoutRef<typeof Command$1.Separator>;
|
|
1772
1818
|
/**
|
|
1773
1819
|
* CommandSeparator - Visual divider between command groups.
|
|
1774
|
-
* 1px line with border border-
|
|
1820
|
+
* 1px line with border border-border color, 8px margin top/bottom.
|
|
1775
1821
|
*/
|
|
1776
1822
|
declare const CommandSeparator: react.ForwardRefExoticComponent<Omit<Pick<Pick<react.DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<HTMLDivElement>> & {
|
|
1777
1823
|
ref?: React.Ref<HTMLDivElement>;
|
|
@@ -1936,9 +1982,9 @@ declare const Spinner: react.ForwardRefExoticComponent<Omit<SpinnerProps, "ref">
|
|
|
1936
1982
|
*
|
|
1937
1983
|
* Customization:
|
|
1938
1984
|
* All styling uses CSS variables from the design system:
|
|
1939
|
-
* - --normal-bg: Background color (uses --popover with fallback)
|
|
1940
|
-
* - --normal-text: Text color (uses --popover-foreground with fallback)
|
|
1941
|
-
* - --normal-border: Border color (uses --border with fallback)
|
|
1985
|
+
* - --normal-bg: Background color (uses --nx-popover with fallback)
|
|
1986
|
+
* - --normal-text: Text color (uses --nx-popover-foreground with fallback)
|
|
1987
|
+
* - --normal-border: Border color (uses --nx-border with fallback)
|
|
1942
1988
|
* - --border-radius: Border radius (uses --radius with fallback)
|
|
1943
1989
|
*
|
|
1944
1990
|
* Security:
|
|
@@ -2038,6 +2084,22 @@ interface TableEmptyProps {
|
|
|
2038
2084
|
*/
|
|
2039
2085
|
declare function TableEmpty({ message }: TableEmptyProps): react_jsx_runtime.JSX.Element;
|
|
2040
2086
|
|
|
2087
|
+
/**
|
|
2088
|
+
* TableSkeleton Component
|
|
2089
|
+
*
|
|
2090
|
+
* Generic loading skeleton for data tables.
|
|
2091
|
+
* Renders header, body, and footer skeleton bars inside a card.
|
|
2092
|
+
* Unified with EntryTable skeleton pattern for consistency across all tables.
|
|
2093
|
+
*/
|
|
2094
|
+
|
|
2095
|
+
interface TableSkeletonProps {
|
|
2096
|
+
columns?: number;
|
|
2097
|
+
rowCount?: number;
|
|
2098
|
+
hideWrapper?: boolean;
|
|
2099
|
+
hideFooter?: boolean;
|
|
2100
|
+
}
|
|
2101
|
+
declare const TableSkeleton: react.FC<TableSkeletonProps>;
|
|
2102
|
+
|
|
2041
2103
|
interface PaginationMeta {
|
|
2042
2104
|
total: number;
|
|
2043
2105
|
page: number;
|
|
@@ -2079,129 +2141,6 @@ interface ActionCallbacks<TData = unknown> {
|
|
|
2079
2141
|
}
|
|
2080
2142
|
type DataFetcher<TData> = (params: TableParams) => Promise<ListResponse<TData>>;
|
|
2081
2143
|
|
|
2082
|
-
/**
|
|
2083
|
-
* Props for TablePagination component
|
|
2084
|
-
*/
|
|
2085
|
-
interface TablePaginationProps {
|
|
2086
|
-
/** Pagination metadata from server */
|
|
2087
|
-
meta: PaginationMeta;
|
|
2088
|
-
/** Callback when page changes */
|
|
2089
|
-
onPageChange: (page: number) => void;
|
|
2090
|
-
/** Callback when page size changes */
|
|
2091
|
-
onPageSizeChange: (pageSize: number) => void;
|
|
2092
|
-
/** Pagination configuration */
|
|
2093
|
-
config?: Required<PaginationConfig>;
|
|
2094
|
-
/** Whether data is currently loading */
|
|
2095
|
-
isLoading?: boolean;
|
|
2096
|
-
}
|
|
2097
|
-
/**
|
|
2098
|
-
* Pagination controls for tables
|
|
2099
|
-
*/
|
|
2100
|
-
declare function TablePagination({ meta, onPageChange, onPageSizeChange, config, isLoading, }: TablePaginationProps): react_jsx_runtime.JSX.Element;
|
|
2101
|
-
|
|
2102
|
-
/**
|
|
2103
|
-
* TableSkeleton Component
|
|
2104
|
-
*
|
|
2105
|
-
* Generic loading skeleton for data tables.
|
|
2106
|
-
* Renders header, body, and footer skeleton bars inside a card.
|
|
2107
|
-
* Unified with EntryTable skeleton pattern for consistency across all tables.
|
|
2108
|
-
*/
|
|
2109
|
-
|
|
2110
|
-
interface TableSkeletonProps {
|
|
2111
|
-
columns?: number;
|
|
2112
|
-
rowCount?: number;
|
|
2113
|
-
hideWrapper?: boolean;
|
|
2114
|
-
hideFooter?: boolean;
|
|
2115
|
-
}
|
|
2116
|
-
declare const TableSkeleton: react.FC<TableSkeletonProps>;
|
|
2117
|
-
|
|
2118
|
-
/**
|
|
2119
|
-
* Column definition for ResponsiveTable
|
|
2120
|
-
*
|
|
2121
|
-
* Provides type-safe column definitions with proper type narrowing for render functions.
|
|
2122
|
-
*
|
|
2123
|
-
* @template T - The data type of items in the table
|
|
2124
|
-
* @template K - The specific key from T (defaults to any key of T)
|
|
2125
|
-
*
|
|
2126
|
-
* @example
|
|
2127
|
-
* ```tsx
|
|
2128
|
-
* interface User {
|
|
2129
|
-
* id: string;
|
|
2130
|
-
* name: string;
|
|
2131
|
-
* age: number;
|
|
2132
|
-
* }
|
|
2133
|
-
*
|
|
2134
|
-
* // Type-safe column definition with proper inference
|
|
2135
|
-
* const columns: Column<User>[] = [
|
|
2136
|
-
* {
|
|
2137
|
-
* key: "name",
|
|
2138
|
-
* label: "Name",
|
|
2139
|
-
* // value is inferred as string, not string | number
|
|
2140
|
-
* render: (value, user) => <strong>{value}</strong>
|
|
2141
|
-
* },
|
|
2142
|
-
* {
|
|
2143
|
-
* key: "age",
|
|
2144
|
-
* label: "Age",
|
|
2145
|
-
* // value is inferred as number, not string | number
|
|
2146
|
-
* render: (value) => `${value} years old`
|
|
2147
|
-
* }
|
|
2148
|
-
* ];
|
|
2149
|
-
* ```
|
|
2150
|
-
*/
|
|
2151
|
-
type Column<T, K extends keyof T = keyof T> = {
|
|
2152
|
-
/** Unique key for the column (must match a property in T) */
|
|
2153
|
-
key: K;
|
|
2154
|
-
/** Display label for the column header */
|
|
2155
|
-
label: react.ReactNode;
|
|
2156
|
-
/** Optional custom renderer for cell content with type-safe value */
|
|
2157
|
-
render?: (value: T[K], item: T) => react.ReactNode;
|
|
2158
|
-
/** Hide column on mobile card view (optional, default: false) */
|
|
2159
|
-
hideOnMobile?: boolean;
|
|
2160
|
-
/** Hide the label on mobile card view (optional, default: false) */
|
|
2161
|
-
hideLabelOnMobile?: boolean;
|
|
2162
|
-
/** Optional custom className for the table header cell */
|
|
2163
|
-
headerClassName?: string;
|
|
2164
|
-
/** Optional custom className for the table body cell */
|
|
2165
|
-
cellClassName?: string;
|
|
2166
|
-
};
|
|
2167
|
-
/**
|
|
2168
|
-
* Props for ResponsiveTable component
|
|
2169
|
-
*
|
|
2170
|
-
* @template T - The data type of items in the table, must have an 'id' property
|
|
2171
|
-
*/
|
|
2172
|
-
type ResponsiveTableProps<T extends {
|
|
2173
|
-
id: string;
|
|
2174
|
-
}> = {
|
|
2175
|
-
/** Array of data items to display */
|
|
2176
|
-
data: T[];
|
|
2177
|
-
/** Array of column definitions */
|
|
2178
|
-
columns: Column<T>[];
|
|
2179
|
-
/** Optional callback when a row/card is clicked */
|
|
2180
|
-
onRowClick?: (item: T) => void;
|
|
2181
|
-
/** Optional custom renderer for mobile card view */
|
|
2182
|
-
renderMobileCard?: (item: T, columns: Column<T>[]) => react.ReactNode;
|
|
2183
|
-
/** Optional custom className for the container */
|
|
2184
|
-
className?: string;
|
|
2185
|
-
/** Optional empty state message */
|
|
2186
|
-
emptyMessage?: string;
|
|
2187
|
-
/** Optional ARIA label for the table (improves screen reader experience) */
|
|
2188
|
-
ariaLabel?: string;
|
|
2189
|
-
/** Optional custom className for the internal desktop table wrapper */
|
|
2190
|
-
tableWrapperClassName?: string;
|
|
2191
|
-
/** Optional footer content rendered inside the table card (e.g. Pagination) */
|
|
2192
|
-
footer?: react.ReactNode;
|
|
2193
|
-
};
|
|
2194
|
-
/**
|
|
2195
|
-
* Ref type for ResponsiveTable component
|
|
2196
|
-
*/
|
|
2197
|
-
type ResponsiveTableRef = HTMLDivElement;
|
|
2198
|
-
|
|
2199
|
-
declare const ResponsiveTable: <T extends {
|
|
2200
|
-
id: string;
|
|
2201
|
-
}>(props: ResponsiveTableProps<T> & {
|
|
2202
|
-
ref?: react.ForwardedRef<HTMLDivElement>;
|
|
2203
|
-
}) => react.ReactElement;
|
|
2204
|
-
|
|
2205
2144
|
interface PortalProviderProps {
|
|
2206
2145
|
/** The DOM element to portal overlay content into. Defaults to document.body (Radix default). */
|
|
2207
2146
|
container: HTMLElement | null;
|
|
@@ -2210,110 +2149,4 @@ interface PortalProviderProps {
|
|
|
2210
2149
|
declare function PortalProvider({ container, children }: PortalProviderProps): react_jsx_runtime.JSX.Element;
|
|
2211
2150
|
declare function usePortalContainer(): HTMLElement | undefined;
|
|
2212
2151
|
|
|
2213
|
-
|
|
2214
|
-
* Utility function to merge class names with Tailwind CSS support.
|
|
2215
|
-
*
|
|
2216
|
-
* Combines clsx for conditional class names with tailwind-merge
|
|
2217
|
-
* to properly handle Tailwind CSS class conflicts.
|
|
2218
|
-
*
|
|
2219
|
-
* @example
|
|
2220
|
-
* ```typescript
|
|
2221
|
-
* cn('px-2 py-1', 'px-4') // => 'py-1 px-4'
|
|
2222
|
-
* cn('text-red-500', condition && 'text-blue-500')
|
|
2223
|
-
* ```
|
|
2224
|
-
*/
|
|
2225
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
2226
|
-
|
|
2227
|
-
/**
|
|
2228
|
-
* Tailwind CSS preset for @nextlyhq/ui components.
|
|
2229
|
-
*
|
|
2230
|
-
* Defines the CSS custom property contract that all UI components expect.
|
|
2231
|
-
* Consumers must provide the actual CSS variable values in their stylesheets.
|
|
2232
|
-
*
|
|
2233
|
-
* Usage (Tailwind v3):
|
|
2234
|
-
* // tailwind.config.ts
|
|
2235
|
-
* import uiPreset from "@nextlyhq/ui/tailwind-preset";
|
|
2236
|
-
* export default { presets: [uiPreset], ... };
|
|
2237
|
-
*
|
|
2238
|
-
* Usage (Tailwind v4 with @config):
|
|
2239
|
-
* Consumers define the equivalent @theme tokens in their CSS.
|
|
2240
|
-
* This file serves as the reference contract.
|
|
2241
|
-
*/
|
|
2242
|
-
declare const uiPreset: {
|
|
2243
|
-
theme: {
|
|
2244
|
-
extend: {
|
|
2245
|
-
colors: {
|
|
2246
|
-
border: string;
|
|
2247
|
-
input: string;
|
|
2248
|
-
ring: string;
|
|
2249
|
-
background: string;
|
|
2250
|
-
foreground: string;
|
|
2251
|
-
primary: {
|
|
2252
|
-
DEFAULT: string;
|
|
2253
|
-
foreground: string;
|
|
2254
|
-
};
|
|
2255
|
-
secondary: {
|
|
2256
|
-
DEFAULT: string;
|
|
2257
|
-
foreground: string;
|
|
2258
|
-
};
|
|
2259
|
-
destructive: {
|
|
2260
|
-
DEFAULT: string;
|
|
2261
|
-
foreground: string;
|
|
2262
|
-
};
|
|
2263
|
-
success: {
|
|
2264
|
-
DEFAULT: string;
|
|
2265
|
-
foreground: string;
|
|
2266
|
-
};
|
|
2267
|
-
warning: {
|
|
2268
|
-
DEFAULT: string;
|
|
2269
|
-
foreground: string;
|
|
2270
|
-
};
|
|
2271
|
-
muted: {
|
|
2272
|
-
DEFAULT: string;
|
|
2273
|
-
foreground: string;
|
|
2274
|
-
};
|
|
2275
|
-
accent: {
|
|
2276
|
-
DEFAULT: string;
|
|
2277
|
-
foreground: string;
|
|
2278
|
-
};
|
|
2279
|
-
popover: {
|
|
2280
|
-
DEFAULT: string;
|
|
2281
|
-
foreground: string;
|
|
2282
|
-
};
|
|
2283
|
-
card: {
|
|
2284
|
-
DEFAULT: string;
|
|
2285
|
-
foreground: string;
|
|
2286
|
-
};
|
|
2287
|
-
};
|
|
2288
|
-
borderRadius: {
|
|
2289
|
-
lg: string;
|
|
2290
|
-
md: string;
|
|
2291
|
-
sm: string;
|
|
2292
|
-
};
|
|
2293
|
-
keyframes: {
|
|
2294
|
-
"accordion-down": {
|
|
2295
|
-
from: {
|
|
2296
|
-
height: string;
|
|
2297
|
-
};
|
|
2298
|
-
to: {
|
|
2299
|
-
height: string;
|
|
2300
|
-
};
|
|
2301
|
-
};
|
|
2302
|
-
"accordion-up": {
|
|
2303
|
-
from: {
|
|
2304
|
-
height: string;
|
|
2305
|
-
};
|
|
2306
|
-
to: {
|
|
2307
|
-
height: string;
|
|
2308
|
-
};
|
|
2309
|
-
};
|
|
2310
|
-
};
|
|
2311
|
-
animation: {
|
|
2312
|
-
"accordion-down": string;
|
|
2313
|
-
"accordion-up": string;
|
|
2314
|
-
};
|
|
2315
|
-
};
|
|
2316
|
-
};
|
|
2317
|
-
};
|
|
2318
|
-
|
|
2319
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type ActionCallbacks, Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, type AlertDialogOverlayProps, AlertDialogPortal, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTitleProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Card, CardAction, type CardActionProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, CommandShortcut, type CommandShortcutProps, type DataFetcher, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogOverlay, type DialogOverlayProps, DialogPortal, DialogTitle, type DialogTitleProps, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type FilterInfo, Input, type InputProps, Label, type ListResponse, type PaginationConfig, type PaginationMeta, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalProvider, Progress, type ProgressProps, RadioGroup, RadioGroupItem, ResponsiveTable, type ResponsiveTableProps, type ResponsiveTableRef, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, type SheetContentRef, SheetDescription, type SheetDescriptionProps, type SheetDescriptionRef, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, SheetOverlay, type SheetOverlayProps, type SheetOverlayRef, SheetPortal, type SheetProps, SheetTitle, type SheetTitleProps, type SheetTitleRef, SheetTrigger, type SheetTriggerProps, Skeleton, type SkeletonProps, type SortInfo, Spinner, type SpinnerProps, Switch, Table, TableBody, TableCaption, TableCell, TableEmpty, type TableEmptyProps, TableError, type TableErrorProps, TableFooter, TableHead, TableHeader, TableLoading, TablePagination, type TablePaginationProps, type TableParams, TableRow, TableSearch, type TableSearchProps, TableSkeleton, type TableSkeletonProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, alertVariants, avatarVariants, badgeVariants, buttonVariants, cardVariants, cn, dialogContentVariants, inputVariants, progressVariants, selectTriggerVariants, sheetVariants, spinnerVariants, uiPreset, usePortalContainer };
|
|
2152
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type ActionCallbacks, Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, type AlertDialogOverlayProps, AlertDialogPortal, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTitleProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Card, CardAction, type CardActionProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, CommandShortcut, type CommandShortcutProps, type DataFetcher, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogOverlay, type DialogOverlayProps, DialogPortal, DialogTitle, type DialogTitleProps, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type FilterInfo, FormLabelWithTooltip, type FormLabelWithTooltipProps, Grid, type GridProps, Input, type InputProps, Label, type ListResponse, type PaginationConfig, type PaginationMeta, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalProvider, Progress, type ProgressProps, RadioGroup, RadioGroupItem, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, type SheetContentRef, SheetDescription, type SheetDescriptionProps, type SheetDescriptionRef, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, SheetOverlay, type SheetOverlayProps, type SheetOverlayRef, SheetPortal, type SheetProps, SheetTitle, type SheetTitleProps, type SheetTitleRef, SheetTrigger, type SheetTriggerProps, Skeleton, type SkeletonProps, type SortInfo, Spinner, type SpinnerProps, Stack, type StackProps, Stat, type StatProps, Switch, Table, TableBody, TableCaption, TableCell, TableEmpty, type TableEmptyProps, TableError, type TableErrorProps, TableFooter, TableHead, TableHeader, TableLoading, type TableParams, TableRow, TableSearch, type TableSearchProps, TableSkeleton, type TableSkeletonProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, alertVariants, avatarVariants, badgeVariants, buttonVariants, cardVariants, dialogContentVariants, inputVariants, progressVariants, selectTriggerVariants, sheetVariants, spinnerVariants, usePortalContainer };
|