@apcrda/ui 0.5.6 → 0.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/README.md +170 -35
  2. package/dist/components/AlertDialog/AlertDialog.d.ts +22 -3
  3. package/dist/components/AlertDialog/AlertDialog.types.d.ts +14 -12
  4. package/dist/components/AlertDialog/index.d.ts +2 -2
  5. package/dist/components/Button/Button.d.ts +1 -1
  6. package/dist/components/Card/Card.d.ts +4 -2
  7. package/dist/components/Card/Card.types.d.ts +4 -1
  8. package/dist/components/Card/index.d.ts +1 -1
  9. package/dist/components/FormField/FormField.d.ts +1 -1
  10. package/dist/components/FormField/FormField.types.d.ts +4 -1
  11. package/dist/components/FormField/FormFieldContext.d.ts +9 -0
  12. package/dist/components/FormField/index.d.ts +2 -0
  13. package/dist/components/Navbar/Navbar.d.ts +5 -0
  14. package/dist/components/Navbar/Navbar.types.d.ts +10 -0
  15. package/dist/components/Navbar/index.d.ts +2 -0
  16. package/dist/components/Spinner/Spinner.d.ts +2 -0
  17. package/dist/components/Spinner/Spinner.types.d.ts +9 -0
  18. package/dist/components/Spinner/index.d.ts +2 -0
  19. package/dist/components/Stepper/Stepper.d.ts +1 -1
  20. package/dist/components/Stepper/Stepper.types.d.ts +1 -0
  21. package/dist/components/Table/DataTable.d.ts +1 -1
  22. package/dist/components/Table/DataTable.types.d.ts +62 -6
  23. package/dist/components/Table/DataTable.utils.d.ts +7 -0
  24. package/dist/components/Table/index.d.ts +1 -1
  25. package/dist/components/Textarea/Textarea.d.ts +1 -0
  26. package/dist/components/Textarea/Textarea.types.d.ts +1 -0
  27. package/dist/components/index.d.ts +2 -0
  28. package/dist/index.js +6379 -4720
  29. package/dist/xlsx-BNuhnZ8W.js +12387 -0
  30. package/package.json +3 -1
package/README.md CHANGED
@@ -1,20 +1,20 @@
1
1
  # APCRDA UI
2
2
 
3
- APCRDA UI is a production-ready React 19 component library for APCRDA applications. It is published as a single npm package:
3
+ Production-ready React 19 component library for APCRDA applications. 49 components covering forms, data display, navigation, feedback, and layout — all built on Tailwind CSS v4 with full dark-mode and theming support.
4
4
 
5
5
  ```bash
6
6
  npm install @apcrda/ui
7
7
  ```
8
8
 
9
- ## Usage
9
+ ## Quick Start
10
10
 
11
- Import the global stylesheet once in your application entrypoint:
11
+ Import the global stylesheet once in your application entry point:
12
12
 
13
13
  ```tsx
14
14
  import '@apcrda/ui/styles.css'
15
15
  ```
16
16
 
17
- Use components from the package root:
17
+ Wrap your app with `ThemeProvider` and start using components:
18
18
 
19
19
  ```tsx
20
20
  import { Button, Card, CardContent, Input, ThemeProvider } from '@apcrda/ui'
@@ -33,61 +33,196 @@ export default function App() {
33
33
  }
34
34
  ```
35
35
 
36
- ## Scripts
37
-
38
- ```bash
39
- npm run dev
40
- npm run test -- --run
41
- npm run typecheck
42
- npm run build
43
- npm run build:storybook
44
- ```
36
+ ## Requirements
37
+
38
+ | Peer dependency | Version |
39
+ | --------------- | -------- |
40
+ | react | ^19.0.0 |
41
+ | react-dom | ^19.0.0 |
42
+
43
+ ## Components
44
+
45
+ ### Form & Input
46
+ | Component | Description |
47
+ | --- | --- |
48
+ | `Input` | Text input with size variants, icons, loading state |
49
+ | `Textarea` | Multi-line input with auto character count |
50
+ | `PasswordInput` | Password field with show/hide toggle |
51
+ | `NumberInput` | Numeric stepper with min/max/step |
52
+ | `FileUpload` | File picker — button or drag-and-drop dropzone |
53
+ | `Checkbox` | Accessible checkbox with indeterminate state |
54
+ | `RadioGroup` | Controlled radio group |
55
+ | `Switch` | Toggle switch |
56
+ | `Select` | Native-style single select |
57
+ | `MultiSelect` | Multi-value select with chip display |
58
+ | `Combobox` | Searchable single-select dropdown |
59
+ | `Autocomplete` | Free-text input with suggestions |
60
+ | `DatePicker` | Single-date calendar picker |
61
+ | `DateRangePicker` | Date range calendar picker |
62
+ | `FormField` | Label + input + hint + error wrapper |
63
+ | `Label` | Accessible form label |
64
+
65
+ ### Data Display
66
+ | Component | Description |
67
+ | --- | --- |
68
+ | `DataTable` | Full-featured table — sort, filter, paginate, pin, resize, reorder, virtual scroll, export |
69
+ | `StatCard` | KPI metric card with trend indicator |
70
+ | `Calendar` | Standalone calendar for date display |
71
+ | `Timeline` | Vertical event timeline |
72
+ | `ScrollArea` | Styled scrollable container |
73
+ | `Progress` | Linear and indeterminate progress bar |
74
+ | `Skeleton` | Content placeholder while loading |
75
+
76
+ ### Navigation
77
+ | Component | Description |
78
+ | --- | --- |
79
+ | `Navbar` | Top application bar |
80
+ | `Sidebar` | Collapsible side navigation |
81
+ | `Breadcrumb` | Page hierarchy trail |
82
+ | `Tabs` | Horizontal tab panels |
83
+ | `Pagination` | Page navigation controls |
84
+ | `Stepper` | Multi-step workflow indicator |
85
+ | `Accordion` | Expand/collapse sections |
86
+
87
+ ### Feedback & Overlay
88
+ | Component | Description |
89
+ | --- | --- |
90
+ | `Alert` | Inline status message |
91
+ | `AlertDialog` | Confirmation modal |
92
+ | `Dialog` | Generic modal dialog |
93
+ | `Drawer` | Slide-in side panel |
94
+ | `Toast` | Ephemeral notification |
95
+ | `Tooltip` | Hover contextual hint |
96
+ | `Popover` | Anchored floating panel |
97
+ | `NotificationCenter` | Notification feed with read/unread state |
98
+ | `EmptyState` | Zero-data placeholder |
99
+
100
+ ### Layout & Display
101
+ | Component | Description |
102
+ | --- | --- |
103
+ | `Card` | Elevated surface container |
104
+ | `Divider` | Horizontal or vertical separator |
105
+ | `Typography` | Heading and text variants |
106
+ | `Avatar` | User avatar with fallback initials |
107
+ | `Badge` | Status and count indicator |
108
+ | `Tag` | Removable label chip |
109
+ | `Spinner` | Loading indicator |
110
+ | `Skeleton` | Placeholder shimmer |
111
+ | `Kbd` | Keyboard shortcut key display |
112
+
113
+ ### Utility
114
+ | Component | Description |
115
+ | --- | --- |
116
+ | `CommandPalette` | `⌘K` command search overlay |
117
+ | `ContextMenu` | Right-click context menu |
45
118
 
46
119
  ## Theming
47
120
 
48
- APCRDA UI uses CSS variables and `data-theme` attributes:
121
+ APCRDA UI uses CSS custom properties and a `data-theme` attribute. Supported values are `"light"` and `"dark"`:
49
122
 
50
123
  ```html
51
- <html data-theme="light"></html>
52
- <html data-theme="dark"></html>
124
+ <html data-theme="light">…</html>
125
+ <html data-theme="dark">…</html>
126
+ ```
127
+
128
+ `ThemeProvider` manages the attribute automatically and persists the user's preference to `localStorage`.
129
+
130
+ ### Tailwind plugin
131
+
132
+ If you use Tailwind CSS in your consuming app, add the APCRDA design tokens as a plugin so your own classes can reference the same variables:
133
+
134
+ ```ts
135
+ // tailwind.config.ts
136
+ import apcrdaPlugin from '@apcrda/ui/plugin.css'
137
+
138
+ export default {
139
+ plugins: [apcrdaPlugin],
140
+ }
141
+ ```
142
+
143
+ ### Custom tokens
144
+
145
+ Override any design token by redefining the CSS variable after importing the stylesheet:
146
+
147
+ ```css
148
+ @import '@apcrda/ui/styles.css';
149
+
150
+ :root {
151
+ --apcrda-color-primary: #0052cc;
152
+ --apcrda-radius-md: 0.25rem;
153
+ }
53
154
  ```
54
155
 
55
- `ThemeProvider` manages the attribute and persists the selected theme by default.
156
+ ## FormField integration
157
+
158
+ `Input`, `Textarea`, and other form controls connect to `FormField` automatically via context — no manual prop threading needed:
159
+
160
+ ```tsx
161
+ import { FormField, Input, Button } from '@apcrda/ui'
162
+
163
+ <FormField label="Aadhaar Number" hint="12-digit number" required>
164
+ <Input placeholder="XXXX XXXX XXXX" />
165
+ </FormField>
166
+ ```
167
+
168
+ Error messages and ARIA attributes are wired up for you.
169
+
170
+ ## DataTable
171
+
172
+ ```tsx
173
+ import { DataTable } from '@apcrda/ui'
174
+ import type { ColumnDef } from '@apcrda/ui'
175
+
176
+ const columns: ColumnDef<Application>[] = [
177
+ { accessorKey: 'id', header: 'Application ID' },
178
+ { accessorKey: 'name', header: 'Applicant Name' },
179
+ ]
180
+
181
+ <DataTable
182
+ data={applications}
183
+ columns={columns}
184
+ pagination
185
+ selectable
186
+ exportCsv
187
+ stickyHeader
188
+ />
189
+ ```
190
+
191
+ Key capabilities: multi-column sort, global search, per-column filters (text / select / range / date), column visibility, pinning, resize, reorder, row grouping, row expand, virtual scroll (1 000+ rows), CSV / Excel / print export, bulk actions, row actions menu, density toggle.
192
+
193
+ ## Scripts
194
+
195
+ ```bash
196
+ npm run dev # Storybook dev server on :6006
197
+ npm run build # Library build (ESM + type declarations)
198
+ npm run build:storybook # Static Storybook build
199
+ npm run test -- --run # Run unit tests once
200
+ npm run typecheck # TypeScript check without emit
201
+ npm run lint # ESLint
202
+ ```
56
203
 
57
204
  ## Publishing
58
205
 
59
- Build before publishing:
206
+ Build the library before publishing:
60
207
 
61
208
  ```bash
62
209
  npm run build
63
210
  npm publish
64
211
  ```
65
212
 
66
- For GitLab Package Registry in CI:
213
+ ### GitLab Package Registry (CI)
67
214
 
68
215
  ```bash
69
216
  npm run publish:gitlab
70
217
  ```
71
218
 
72
- Use an `.npmrc` similar to:
219
+ Configure `.npmrc`:
73
220
 
74
221
  ```ini
75
222
  @apcrda:registry=https://gitlab.com/api/v4/projects/<project_id>/packages/npm/
76
223
  //gitlab.com/api/v4/projects/<project_id>/packages/npm/:_authToken=${NPM_TOKEN}
77
224
  ```
78
225
 
79
- ## Phase 1 Components
80
-
81
- - Button
82
- - Input
83
- - Textarea
84
- - Checkbox
85
- - RadioGroup
86
- - Switch
87
- - Badge
88
- - Avatar
89
- - Card
90
- - Divider
91
- - Label
92
-
93
- Advanced application components such as DataTable, DatePicker, Modal, Drawer, Charts, GIS components, and dashboard widgets are intentionally out of scope for Phase 1.
226
+ ## License
227
+
228
+ MIT — © APCRDA
@@ -1,5 +1,24 @@
1
- import type { AlertDialogProps } from './AlertDialog.types';
2
- export declare function AlertDialog({ open, defaultOpen, onOpenChange, title, description, confirmLabel, cancelLabel, onConfirm, onCancel, variant, loading, children, }: AlertDialogProps): import("react").JSX.Element;
3
- export declare namespace AlertDialog {
1
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
2
+ import type { AlertDialogFooterProps, AlertDialogHeaderProps } from './AlertDialog.types';
3
+ export declare const AlertDialog: import("react").FC<AlertDialogPrimitive.AlertDialogProps>;
4
+ export declare const AlertDialogTrigger: import("react").ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
5
+ export declare const AlertDialogPortal: import("react").FC<AlertDialogPrimitive.AlertDialogPortalProps>;
6
+ export declare const AlertDialogOverlay: import("react").ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
7
+ export declare const AlertDialogContent: import("react").ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
8
+ readonly closeOnOverlayClick?: boolean;
9
+ } & import("react").RefAttributes<HTMLDivElement>>;
10
+ export declare function AlertDialogHeader({ className, ...props }: AlertDialogHeaderProps): import("react").JSX.Element;
11
+ export declare namespace AlertDialogHeader {
4
12
  var displayName: string;
5
13
  }
14
+ export declare function AlertDialogFooter({ className, ...props }: AlertDialogFooterProps): import("react").JSX.Element;
15
+ export declare namespace AlertDialogFooter {
16
+ var displayName: string;
17
+ }
18
+ export declare const AlertDialogTitle: import("react").ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
19
+ export declare const AlertDialogDescription: import("react").ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
20
+ export declare const AlertDialogAction: import("react").ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & {
21
+ readonly variant?: import("./AlertDialog.types").AlertDialogVariant;
22
+ readonly loading?: boolean;
23
+ } & import("react").RefAttributes<HTMLButtonElement>>;
24
+ export declare const AlertDialogCancel: import("react").ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,15 +1,17 @@
1
- export type AlertDialogVariant = 'destructive' | 'warning' | 'info';
2
- export type AlertDialogProps = {
3
- readonly open?: boolean;
4
- readonly defaultOpen?: boolean;
5
- readonly onOpenChange?: (open: boolean) => void;
6
- readonly title: string;
7
- readonly description: string;
8
- readonly confirmLabel?: string;
9
- readonly cancelLabel?: string;
10
- readonly onConfirm?: () => void;
11
- readonly onCancel?: () => void;
1
+ import type * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
2
+ import type { ComponentPropsWithoutRef, HTMLAttributes } from 'react';
3
+ import type { ButtonVariant } from '../Button/Button.types';
4
+ export type AlertDialogVariant = Extract<ButtonVariant, 'destructive' | 'primary' | 'success'>;
5
+ export type AlertDialogOverlayProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>;
6
+ export type AlertDialogTitleProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>;
7
+ export type AlertDialogDescriptionProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>;
8
+ export type AlertDialogHeaderProps = HTMLAttributes<HTMLDivElement>;
9
+ export type AlertDialogFooterProps = HTMLAttributes<HTMLDivElement>;
10
+ export type AlertDialogContentProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> & {
11
+ readonly closeOnOverlayClick?: boolean;
12
+ };
13
+ export type AlertDialogActionProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> & {
12
14
  readonly variant?: AlertDialogVariant;
13
15
  readonly loading?: boolean;
14
- readonly children?: React.ReactNode;
15
16
  };
17
+ export type AlertDialogCancelProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>;
@@ -1,2 +1,2 @@
1
- export { AlertDialog } from './AlertDialog';
2
- export type { AlertDialogProps, AlertDialogVariant } from './AlertDialog.types';
1
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, } from './AlertDialog';
2
+ export type { AlertDialogActionProps, AlertDialogCancelProps, AlertDialogContentProps, AlertDialogDescriptionProps, AlertDialogFooterProps, AlertDialogHeaderProps, AlertDialogOverlayProps, AlertDialogTitleProps, AlertDialogVariant, } from './AlertDialog.types';
@@ -1,5 +1,5 @@
1
1
  export declare const buttonVariants: (props?: ({
2
- variant?: "success" | "destructive" | "primary" | "secondary" | "outline" | "ghost" | null | undefined;
2
+ variant?: "success" | "primary" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
3
3
  size?: "icon" | "sm" | "md" | "lg" | null | undefined;
4
4
  fullWidth?: boolean | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -1,4 +1,4 @@
1
- import type { CardDescriptionProps, CardSectionProps, CardTitleProps } from './Card.types';
1
+ import type { CardDescriptionProps, CardSectionProps } from './Card.types';
2
2
  export declare const cardVariants: (props?: ({
3
3
  variant?: "elevated" | "outlined" | "filled" | null | undefined;
4
4
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -7,7 +7,9 @@ export declare const Card: import("react").ForwardRefExoticComponent<import("rea
7
7
  readonly loading?: boolean;
8
8
  } & import("react").RefAttributes<HTMLDivElement>>;
9
9
  export declare const CardHeader: import("react").ForwardRefExoticComponent<CardSectionProps & import("react").RefAttributes<HTMLDivElement>>;
10
- export declare const CardTitle: import("react").ForwardRefExoticComponent<CardTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
10
+ export declare const CardTitle: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLHeadingElement> & {
11
+ readonly as?: import("./Card.types").CardTitleLevel;
12
+ } & import("react").RefAttributes<HTMLHeadingElement>>;
11
13
  export declare const CardDescription: import("react").ForwardRefExoticComponent<CardDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
12
14
  export declare const CardContent: import("react").ForwardRefExoticComponent<CardSectionProps & import("react").RefAttributes<HTMLDivElement>>;
13
15
  export declare const CardFooter: import("react").ForwardRefExoticComponent<CardSectionProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,9 +1,12 @@
1
1
  import type { HTMLAttributes } from 'react';
2
2
  export type CardVariant = 'elevated' | 'outlined' | 'filled';
3
+ export type CardTitleLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
3
4
  export type CardProps = HTMLAttributes<HTMLDivElement> & {
4
5
  readonly variant?: CardVariant;
5
6
  readonly loading?: boolean;
6
7
  };
7
8
  export type CardSectionProps = HTMLAttributes<HTMLDivElement>;
8
- export type CardTitleProps = HTMLAttributes<HTMLHeadingElement>;
9
+ export type CardTitleProps = HTMLAttributes<HTMLHeadingElement> & {
10
+ readonly as?: CardTitleLevel;
11
+ };
9
12
  export type CardDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
@@ -1,2 +1,2 @@
1
1
  export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cardVariants, } from './Card';
2
- export type { CardDescriptionProps, CardProps, CardSectionProps, CardTitleProps, CardVariant } from './Card.types';
2
+ export type { CardDescriptionProps, CardProps, CardSectionProps, CardTitleLevel, CardTitleProps, CardVariant } from './Card.types';
@@ -1,5 +1,5 @@
1
1
  import type { FormFieldProps } from './FormField.types';
2
- export declare function FormField({ label, htmlFor, required, hint, error, className, children, ...props }: FormFieldProps): import("react").JSX.Element;
2
+ export declare function FormField({ id: idProp, label, htmlFor, required, hint, error, className, children, ...props }: FormFieldProps): import("react").JSX.Element;
3
3
  export declare namespace FormField {
4
4
  var displayName: string;
5
5
  }
@@ -1,7 +1,10 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
2
  export interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {
3
- readonly label?: string;
3
+ /** Shared id used for label `htmlFor`, input `id`, and `aria-describedby` wiring. */
4
+ readonly id?: string;
5
+ /** Explicit label-for override. Defaults to `id` when omitted. */
4
6
  readonly htmlFor?: string;
7
+ readonly label?: string;
5
8
  readonly required?: boolean;
6
9
  readonly hint?: string;
7
10
  readonly error?: string;
@@ -0,0 +1,9 @@
1
+ export interface FormFieldContextValue {
2
+ readonly id: string | undefined;
3
+ readonly errorId: string | undefined;
4
+ readonly hintId: string | undefined;
5
+ readonly error: string | undefined;
6
+ readonly required: boolean;
7
+ }
8
+ export declare const FormFieldContext: import("react").Context<FormFieldContextValue>;
9
+ export declare function useFormField(): FormFieldContextValue;
@@ -1,2 +1,4 @@
1
1
  export { FormField } from './FormField';
2
+ export { useFormField } from './FormFieldContext';
3
+ export type { FormFieldContextValue } from './FormFieldContext';
2
4
  export type { FormFieldProps } from './FormField.types';
@@ -0,0 +1,5 @@
1
+ import type { NavbarActionsProps, NavbarBrandProps, NavbarContentProps, NavbarProps } from './Navbar.types';
2
+ export declare const Navbar: import("react").ForwardRefExoticComponent<NavbarProps & import("react").RefAttributes<HTMLElement>>;
3
+ export declare const NavbarBrand: import("react").ForwardRefExoticComponent<NavbarBrandProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ export declare const NavbarContent: import("react").ForwardRefExoticComponent<NavbarContentProps & import("react").RefAttributes<HTMLDivElement>>;
5
+ export declare const NavbarActions: import("react").ForwardRefExoticComponent<NavbarActionsProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ export interface NavbarProps extends HTMLAttributes<HTMLElement> {
3
+ /** Stick to top of viewport. Defaults to true. */
4
+ readonly sticky?: boolean;
5
+ /** Add a bottom border. Defaults to true. */
6
+ readonly bordered?: boolean;
7
+ }
8
+ export type NavbarBrandProps = HTMLAttributes<HTMLDivElement>;
9
+ export type NavbarContentProps = HTMLAttributes<HTMLDivElement>;
10
+ export type NavbarActionsProps = HTMLAttributes<HTMLDivElement>;
@@ -0,0 +1,2 @@
1
+ export { Navbar, NavbarActions, NavbarBrand, NavbarContent } from './Navbar';
2
+ export type { NavbarActionsProps, NavbarBrandProps, NavbarContentProps, NavbarProps } from './Navbar.types';
@@ -0,0 +1,2 @@
1
+ import type { SpinnerProps } from './Spinner.types';
2
+ export declare const Spinner: import("react").ForwardRefExoticComponent<SpinnerProps & import("react").RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,9 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ export type SpinnerSize = 'sm' | 'md' | 'lg' | 'xl';
3
+ export type SpinnerVariant = 'default' | 'muted' | 'white' | 'current';
4
+ export interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {
5
+ readonly size?: SpinnerSize;
6
+ readonly variant?: SpinnerVariant;
7
+ /** Accessible label announced to screen readers. Set to empty string when spinner is decorative. */
8
+ readonly label?: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ export { Spinner } from './Spinner';
2
+ export type { SpinnerProps, SpinnerSize, SpinnerVariant } from './Spinner.types';
@@ -1,5 +1,5 @@
1
1
  import type { StepperProps } from './Stepper.types';
2
- export declare function Stepper({ steps, activeStep, orientation, completedSteps, errorSteps, className, ...props }: StepperProps): import("react").JSX.Element;
2
+ export declare function Stepper({ steps, activeStep, orientation, completedSteps, errorSteps, onStepClick, className, ...props }: StepperProps): import("react").JSX.Element;
3
3
  export declare namespace Stepper {
4
4
  var displayName: string;
5
5
  }
@@ -11,4 +11,5 @@ export interface StepperProps extends HTMLAttributes<HTMLDivElement> {
11
11
  readonly orientation?: 'horizontal' | 'vertical';
12
12
  readonly completedSteps?: number[];
13
13
  readonly errorSteps?: number[];
14
+ readonly onStepClick?: (index: number) => void;
14
15
  }
@@ -1,5 +1,5 @@
1
1
  import type { DataTableProps } from './DataTable.types';
2
- export declare function DataTable<TData>({ data, columns, loading, loadingRows, emptyMessage, emptyDescription, pageSize: initialPageSize, pageSizeOptions, pagination, selectable, columnVisibility: enableColumnVisibility, exportCsv, exportFilename, getRowCanExpand, renderSubRow, onSelectionChange, onRowClick, className, }: DataTableProps<TData>): import("react").JSX.Element;
2
+ export declare function DataTable<TData>({ data, columns, loading, loadingRows, emptyMessage, emptyDescription, pageSize: initialPageSize, pageSizeOptions, pagination, serverPagination, infiniteScroll, multiSort, columnFilters: enableColumnFilters, columnVisibility: enableColumnVisibility, columnResize, columnPinning: enableColumnPinning, columnReorder, selectable, onSelectionChange, getRowCanExpand, renderSubRow, getSubRows, grouping: enableGrouping, defaultGrouping, density: enableDensity, defaultDensity, stickyHeader, striped, virtualize, estimatedRowHeight, rowActions, bulkActions, exportCsv, exportExcel, exportFilename, print: enablePrint, copy: enableCopy, showFooter, onRowClick, className, }: DataTableProps<TData>): import("react").JSX.Element;
3
3
  export declare namespace DataTable {
4
4
  var displayName: string;
5
5
  }
@@ -1,23 +1,79 @@
1
1
  import type { ColumnDef, Row } from '@tanstack/react-table';
2
2
  import type { ReactNode } from 'react';
3
3
  export type { ColumnDef };
4
+ export type DataTableDensity = 'compact' | 'normal' | 'spacious';
5
+ export type DataTableFilterType = 'text' | 'select' | 'range' | 'date';
6
+ export interface DataTableRowAction<TData> {
7
+ readonly label: string;
8
+ readonly icon?: ReactNode;
9
+ readonly onClick: (row: TData) => void;
10
+ readonly variant?: 'default' | 'destructive';
11
+ readonly disabled?: (row: TData) => boolean;
12
+ }
13
+ export interface DataTableBulkAction<TData> {
14
+ readonly label: string;
15
+ readonly icon?: ReactNode;
16
+ readonly onClick: (rows: TData[]) => void;
17
+ readonly variant?: 'default' | 'destructive';
18
+ }
19
+ export interface DataTableServerPagination {
20
+ readonly total: number;
21
+ readonly onPaginationChange: (pageIndex: number, pageSize: number) => void;
22
+ }
23
+ export interface DataTableInfiniteScroll {
24
+ readonly onLoadMore: () => void;
25
+ readonly hasMore: boolean;
26
+ readonly isLoadingMore?: boolean;
27
+ }
4
28
  export interface DataTableProps<TData> {
5
29
  data: TData[];
6
30
  columns: ColumnDef<TData, any>[];
31
+ className?: string;
7
32
  loading?: boolean;
8
33
  loadingRows?: number;
9
34
  emptyMessage?: string;
10
35
  emptyDescription?: string;
36
+ pagination?: boolean;
11
37
  pageSize?: number;
12
38
  pageSizeOptions?: number[];
13
- pagination?: boolean;
14
- selectable?: boolean;
39
+ serverPagination?: DataTableServerPagination;
40
+ infiniteScroll?: DataTableInfiniteScroll;
41
+ multiSort?: boolean;
42
+ columnFilters?: boolean;
15
43
  columnVisibility?: boolean;
16
- exportCsv?: boolean;
17
- exportFilename?: string;
44
+ columnResize?: boolean;
45
+ columnPinning?: boolean;
46
+ columnReorder?: boolean;
47
+ selectable?: boolean;
48
+ onSelectionChange?: (rows: TData[]) => void;
18
49
  getRowCanExpand?: (row: Row<TData>) => boolean;
19
50
  renderSubRow?: (row: Row<TData>) => ReactNode;
20
- onSelectionChange?: (rows: TData[]) => void;
51
+ getSubRows?: (row: TData) => TData[] | undefined;
52
+ grouping?: boolean;
53
+ defaultGrouping?: string[];
54
+ density?: boolean;
55
+ defaultDensity?: DataTableDensity;
56
+ stickyHeader?: boolean;
57
+ striped?: boolean;
58
+ virtualize?: boolean;
59
+ estimatedRowHeight?: number;
60
+ rowActions?: DataTableRowAction<TData>[];
61
+ bulkActions?: DataTableBulkAction<TData>[];
62
+ exportCsv?: boolean;
63
+ exportExcel?: boolean;
64
+ exportFilename?: string;
65
+ print?: boolean;
66
+ copy?: boolean;
67
+ showFooter?: boolean;
21
68
  onRowClick?: (row: TData) => void;
22
- className?: string;
69
+ }
70
+ declare module '@tanstack/table-core' {
71
+ interface ColumnMeta<TData extends unknown | object | any[], TValue> {
72
+ filterType?: DataTableFilterType;
73
+ filterOptions?: {
74
+ label: string;
75
+ value: string;
76
+ }[];
77
+ align?: 'left' | 'center' | 'right';
78
+ }
23
79
  }
@@ -0,0 +1,7 @@
1
+ import type { FilterFn, Table } from '@tanstack/react-table';
2
+ export declare const numberRangeFilterFn: FilterFn<any>;
3
+ export declare const dateRangeFilterFn: FilterFn<any>;
4
+ export declare function exportToCsv<TData>(filename: string, table: Table<TData>): void;
5
+ export declare function exportToExcel<TData>(filename: string, table: Table<TData>): Promise<void>;
6
+ export declare function printTable<TData>(filename: string, table: Table<TData>): void;
7
+ export declare function copyToClipboard<TData>(table: Table<TData>, selectedOnly?: boolean): void;
@@ -1,3 +1,3 @@
1
1
  export { DataTable } from './DataTable';
2
- export type { ColumnDef, DataTableProps } from './DataTable.types';
2
+ export type { ColumnDef, DataTableBulkAction, DataTableDensity, DataTableFilterType, DataTableInfiniteScroll, DataTableProps, DataTableRowAction, DataTableServerPagination, } from './DataTable.types';
3
3
  export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from './Table';
@@ -6,4 +6,5 @@ export declare const Textarea: import("react").ForwardRefExoticComponent<import(
6
6
  readonly textareaSize?: import("./Textarea.types").TextareaSize;
7
7
  readonly error?: boolean;
8
8
  readonly loading?: boolean;
9
+ readonly showCount?: boolean;
9
10
  } & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -4,4 +4,5 @@ export type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {
4
4
  readonly textareaSize?: TextareaSize;
5
5
  readonly error?: boolean;
6
6
  readonly loading?: boolean;
7
+ readonly showCount?: boolean;
7
8
  };
@@ -24,6 +24,7 @@ export * from './Input';
24
24
  export * from './Kbd';
25
25
  export * from './Label';
26
26
  export * from './MultiSelect';
27
+ export * from './Navbar';
27
28
  export * from './NotificationCenter';
28
29
  export * from './NumberInput';
29
30
  export * from './Pagination';
@@ -34,6 +35,7 @@ export * from './RadioGroup';
34
35
  export * from './ScrollArea';
35
36
  export * from './Select';
36
37
  export * from './Sidebar';
38
+ export * from './Spinner';
37
39
  export * from './Skeleton';
38
40
  export * from './StatCard';
39
41
  export * from './Stepper';