@campminder/ds 0.2.0 → 0.3.0

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/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import { ReactNode } from 'react';
2
+ import { ReactElement, ReactNode } from 'react';
3
3
  import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
4
4
  import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
5
5
  import * as class_variance_authority_types from 'class-variance-authority/types';
@@ -158,6 +158,79 @@ declare function CardFooter({ className, ...props }: React$1.ComponentProps<"div
158
158
 
159
159
  declare function Checkbox({ className, ...props }: Checkbox$1.Root.Props): React$1.JSX.Element;
160
160
 
161
+ interface ColumnOption {
162
+ /** Stable identifier — used in `value` and returned from `onApply`. */
163
+ key: string;
164
+ /** Display label. */
165
+ label: string;
166
+ /** Source/group this column belongs to (drives the left rail + tag). */
167
+ group: string;
168
+ }
169
+ interface ColumnCustomizerProps {
170
+ /** Every column the user can choose from. */
171
+ columns: ColumnOption[];
172
+ /** Ordered list of selected column keys — array order is the display order. */
173
+ value: string[];
174
+ /** Called with the next ordered selection when the user clicks Apply. */
175
+ onApply: (next: string[]) => void;
176
+ /** Fix the left-rail group order; defaults to first-seen order in `columns`. */
177
+ groupOrder?: string[];
178
+ /** Heading shown above the search field. */
179
+ title?: string;
180
+ /** Placeholder for the search field. */
181
+ searchPlaceholder?: string;
182
+ /** Label for the "all groups" rail entry. */
183
+ allGroupsLabel?: string;
184
+ /** Popover alignment relative to the trigger. */
185
+ align?: "start" | "center" | "end";
186
+ /** Custom trigger element; defaults to an outline "Columns" button. */
187
+ trigger?: ReactElement;
188
+ }
189
+ /**
190
+ * Staged, 3-pane column customizer — a dropdown for choosing which columns a
191
+ * table shows and in what order. The left rail scopes by source group, the
192
+ * middle pane toggles columns on/off (with a per-group select-all), and the
193
+ * right pane lists the selection to drag-reorder or remove. Edits are held in a
194
+ * local draft and only committed via `onApply` on Apply; Cancel/close discards.
195
+ *
196
+ * Presentational and fully controlled — the consumer owns the column data and
197
+ * the committed selection.
198
+ */
199
+ declare function ColumnCustomizer({ columns, value, onApply, groupOrder, title, searchPlaceholder, allGroupsLabel, align, trigger, }: ColumnCustomizerProps): React$1.JSX.Element;
200
+
201
+ interface ColumnPickerOption {
202
+ /** Stable identifier — used in `value` and returned from `onChange`. */
203
+ key: string;
204
+ /** Display label. */
205
+ label: string;
206
+ }
207
+ interface ColumnPickerProps {
208
+ /** Every column the user can show or hide. */
209
+ columns: ColumnPickerOption[];
210
+ /** Keys of the currently-visible columns. */
211
+ value: string[];
212
+ /** Called with the next set of visible keys whenever a column is toggled. */
213
+ onChange: (next: string[]) => void;
214
+ /** Heading shown at the top of the popover. */
215
+ title?: string;
216
+ /** Placeholder for the search field. */
217
+ searchPlaceholder?: string;
218
+ /** Popover alignment relative to the trigger. */
219
+ align?: "start" | "center" | "end";
220
+ /** Custom trigger element; defaults to an outline "Columns" button. */
221
+ trigger?: ReactElement;
222
+ }
223
+ /**
224
+ * Simple column picker — a dropdown checklist for showing/hiding table columns.
225
+ * A flat, searchable list of checkboxes with a select-all; each toggle commits
226
+ * immediately via `onChange`. No groups, no reorder, no Apply step — for a
227
+ * staged 3-pane picker with reordering, use `ColumnCustomizer` instead.
228
+ *
229
+ * Presentational and fully controlled — the consumer owns the column list and
230
+ * the visible set. Toggling emits the next visible keys in `columns` order.
231
+ */
232
+ declare function ColumnPicker({ columns, value, onChange, title, searchPlaceholder, align, trigger, }: ColumnPickerProps): React$1.JSX.Element;
233
+
161
234
  declare function Dialog({ ...props }: Dialog$1.Root.Props): React$1.JSX.Element;
162
235
  declare function DialogTrigger({ ...props }: Dialog$1.Trigger.Props): React$1.JSX.Element;
163
236
  declare function DialogPortal({ ...props }: Dialog$1.Portal.Props): React$1.JSX.Element;
@@ -189,6 +262,55 @@ declare function CommandSeparator({ className, ...props }: React$1.ComponentProp
189
262
  declare function CommandItem({ className, children, ...props }: React$1.ComponentProps<typeof Command$1.Item>): React$1.JSX.Element;
190
263
  declare function CommandShortcut({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
191
264
 
265
+ interface DataColumn<T> {
266
+ key: string;
267
+ header: ReactNode;
268
+ render: (row: T) => ReactNode;
269
+ sortable?: boolean;
270
+ sortValue?: (row: T) => string | number;
271
+ sticky?: boolean;
272
+ width?: number | string;
273
+ align?: "left" | "right" | "center";
274
+ className?: string;
275
+ headerClassName?: string;
276
+ }
277
+ interface DataTableBulkAction {
278
+ label: string;
279
+ options?: {
280
+ value: string;
281
+ label: string;
282
+ }[];
283
+ onPick?: (value: string) => void;
284
+ onClick?: () => void;
285
+ }
286
+ interface DataTableSort {
287
+ key: string;
288
+ dir: "asc" | "desc";
289
+ }
290
+ interface DataTableProps<T> {
291
+ data: T[];
292
+ columns: DataColumn<T>[];
293
+ rowKey: (row: T) => string;
294
+ selectable?: boolean;
295
+ selected?: Set<string>;
296
+ onSelectedChange?: (next: Set<string>) => void;
297
+ bulkActions?: DataTableBulkAction[];
298
+ sort?: DataTableSort | null;
299
+ defaultSort?: DataTableSort | null;
300
+ onSortChange?: (next: DataTableSort | null) => void;
301
+ paginated?: boolean;
302
+ pageSize?: number;
303
+ pageSizeOptions?: number[];
304
+ page?: number;
305
+ onPageChange?: (page: number) => void;
306
+ toolbar?: ReactNode;
307
+ onRowClick?: (row: T) => void;
308
+ emptyMessage?: ReactNode;
309
+ rowClassName?: (row: T) => string;
310
+ className?: string;
311
+ }
312
+ declare function DataTable<T>({ data, columns, rowKey, selectable, selected: selectedProp, onSelectedChange, bulkActions, sort: sortProp, defaultSort, onSortChange, paginated, pageSize: pageSizeProp, pageSizeOptions, page: pageProp, onPageChange, toolbar, onRowClick, emptyMessage, rowClassName, className, }: DataTableProps<T>): React$1.JSX.Element;
313
+
192
314
  declare function DropdownMenu(props: Menu.Root.Props): React$1.JSX.Element;
193
315
  declare function DropdownMenuTrigger({ ...props }: Menu.Trigger.Props): React$1.JSX.Element;
194
316
  declare function DropdownMenuGroup(props: Menu.Group.Props): React$1.JSX.Element;
@@ -230,6 +352,50 @@ declare function FieldError({ className, children, errors, ...props }: React.Com
230
352
  } | undefined>;
231
353
  }): React$1.JSX.Element | null;
232
354
 
355
+ interface FilterFacet {
356
+ key: string;
357
+ label: string;
358
+ options: {
359
+ value: string;
360
+ label: string;
361
+ }[];
362
+ }
363
+ type FilterValues = Record<string, string[]>;
364
+ interface FilterBarProps {
365
+ /** Controlled search text. */
366
+ search: string;
367
+ onSearchChange: (v: string) => void;
368
+ searchPlaceholder?: string;
369
+ /**
370
+ * Whether the built-in search box renders. Defaults to `true`. Set `false`
371
+ * when the consumer owns search elsewhere (e.g. the page header) and wants
372
+ * the bar to render facets + count only — `search`/`onSearchChange` are then
373
+ * unused but stay required so the controlled contract is unchanged.
374
+ */
375
+ showSearch?: boolean;
376
+ /** Filterable attributes — one dropdown each (inline) or one drill-in (funnel). */
377
+ facets?: FilterFacet[];
378
+ /** Controlled selected values, keyed by facet key. */
379
+ values?: FilterValues;
380
+ onValuesChange?: (v: FilterValues) => void;
381
+ /** Optional live result count shown on the right. */
382
+ resultCount?: number;
383
+ resultNoun?: string;
384
+ /** How many facets show as inline dropdowns; the rest fold into "More". */
385
+ maxVisibleFacets?: number;
386
+ /** Trailing controls (e.g. a view toggle or column customizer). */
387
+ right?: React.ReactNode;
388
+ /** Leading content (e.g. stage tabs), rendered far-left. */
389
+ left?: React.ReactNode;
390
+ /**
391
+ * "inline" (default) = always-visible facet dropdowns. "funnel" = a single
392
+ * Filter button that opens an "Add filter" drill-in menu.
393
+ */
394
+ filterVariant?: "inline" | "funnel";
395
+ className?: string;
396
+ }
397
+ declare function FilterBar({ search, onSearchChange, searchPlaceholder, showSearch, facets, values, onValuesChange, resultCount, resultNoun, maxVisibleFacets, right, left, filterVariant, className, }: FilterBarProps): React$1.JSX.Element;
398
+
233
399
  declare function Input({ className, type, ...props }: React$1.ComponentProps<"input">): React$1.JSX.Element;
234
400
 
235
401
  declare function InputGroup({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
@@ -679,7 +845,7 @@ declare function Toaster({ ...props }: ToasterProps): React$1.JSX.Element;
679
845
  */
680
846
  type ActivityStatus = "active" | "draft" | "paused" | "archived";
681
847
  declare const statusPillVariants: (props?: ({
682
- status?: "active" | "paused" | "draft" | "archived" | null | undefined;
848
+ status?: "draft" | "active" | "paused" | "archived" | null | undefined;
683
849
  } & class_variance_authority_types.ClassProp) | undefined) => string;
684
850
  declare const STATUS_LABEL: Record<ActivityStatus, string>;
685
851
  declare function StatusPill({ className, status, showDot, children, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof statusPillVariants> & {
@@ -773,4 +939,4 @@ declare function useIsMobile(): boolean;
773
939
 
774
940
  declare function cn(...inputs: ClassValue[]): string;
775
941
 
776
- export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, type ActivityStatus, AddonCard, type AddonItem, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, type CampNotice, type CampWeek, CamperForm, type CamperFormConfig, type CamperFormData, type CamperProfile$1 as CamperProfile, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type DepositOptions, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSubmenu, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, type EligibilityOptions, ExpandDesc, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, InlineAddonPicker, InlineSessionPicker, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, type Locale, type MockSession$1 as MockSession, NextStepPeek, type NoticeStep, PackagePicker, type PackageSessionSelection, type PackageTier, type Person$1 as Person, PersonList, PersonSelect, PersonTabs, PhoneInput, PhotoUpload, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, type PricingOptions, Progress, RadioGroup, RadioGroupItem, type RenderCamperFormFn, STATUS_LABEL, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SessionAddon, SessionCard, type SessionCardProfile, type SessionPickerProfile, type SessionProgram$1 as SessionProgram, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, StatusPill, StepBadge, StepCard, StepNotices, Switch, TSHIRT_SIZES, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UpcomingStep, __internal, badgeVariants, buttonVariants, calcAge, cn, computeSessionDeposit, computeSessionPrice, effectivePrice, eligibilityReason, fakeSpotsLeft, formatDOB, makeCamperFormSchema, mandatoryTotal, parseDOB, statusPillVariants, tabsListVariants, useIsMobile, useLocale, useSidebar };
942
+ export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, type ActivityStatus, AddonCard, type AddonItem, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, type CampNotice, type CampWeek, CamperForm, type CamperFormConfig, type CamperFormData, type CamperProfile$1 as CamperProfile, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColumnCustomizer, type ColumnCustomizerProps, type ColumnOption, ColumnPicker, type ColumnPickerOption, type ColumnPickerProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type DataColumn, DataTable, type DataTableBulkAction, type DataTableProps, type DataTableSort, type DepositOptions, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSubmenu, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, type EligibilityOptions, ExpandDesc, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FilterBar, type FilterBarProps, type FilterFacet, type FilterValues, InlineAddonPicker, InlineSessionPicker, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, type Locale, type MockSession$1 as MockSession, NextStepPeek, type NoticeStep, PackagePicker, type PackageSessionSelection, type PackageTier, type Person$1 as Person, PersonList, PersonSelect, PersonTabs, PhoneInput, PhotoUpload, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, type PricingOptions, Progress, RadioGroup, RadioGroupItem, type RenderCamperFormFn, STATUS_LABEL, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SessionAddon, SessionCard, type SessionCardProfile, type SessionPickerProfile, type SessionProgram$1 as SessionProgram, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, StatusPill, StepBadge, StepCard, StepNotices, Switch, TSHIRT_SIZES, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UpcomingStep, __internal, badgeVariants, buttonVariants, calcAge, cn, computeSessionDeposit, computeSessionPrice, effectivePrice, eligibilityReason, fakeSpotsLeft, formatDOB, makeCamperFormSchema, mandatoryTotal, parseDOB, statusPillVariants, tabsListVariants, useIsMobile, useLocale, useSidebar };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import { ReactNode } from 'react';
2
+ import { ReactElement, ReactNode } from 'react';
3
3
  import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
4
4
  import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
5
5
  import * as class_variance_authority_types from 'class-variance-authority/types';
@@ -158,6 +158,79 @@ declare function CardFooter({ className, ...props }: React$1.ComponentProps<"div
158
158
 
159
159
  declare function Checkbox({ className, ...props }: Checkbox$1.Root.Props): React$1.JSX.Element;
160
160
 
161
+ interface ColumnOption {
162
+ /** Stable identifier — used in `value` and returned from `onApply`. */
163
+ key: string;
164
+ /** Display label. */
165
+ label: string;
166
+ /** Source/group this column belongs to (drives the left rail + tag). */
167
+ group: string;
168
+ }
169
+ interface ColumnCustomizerProps {
170
+ /** Every column the user can choose from. */
171
+ columns: ColumnOption[];
172
+ /** Ordered list of selected column keys — array order is the display order. */
173
+ value: string[];
174
+ /** Called with the next ordered selection when the user clicks Apply. */
175
+ onApply: (next: string[]) => void;
176
+ /** Fix the left-rail group order; defaults to first-seen order in `columns`. */
177
+ groupOrder?: string[];
178
+ /** Heading shown above the search field. */
179
+ title?: string;
180
+ /** Placeholder for the search field. */
181
+ searchPlaceholder?: string;
182
+ /** Label for the "all groups" rail entry. */
183
+ allGroupsLabel?: string;
184
+ /** Popover alignment relative to the trigger. */
185
+ align?: "start" | "center" | "end";
186
+ /** Custom trigger element; defaults to an outline "Columns" button. */
187
+ trigger?: ReactElement;
188
+ }
189
+ /**
190
+ * Staged, 3-pane column customizer — a dropdown for choosing which columns a
191
+ * table shows and in what order. The left rail scopes by source group, the
192
+ * middle pane toggles columns on/off (with a per-group select-all), and the
193
+ * right pane lists the selection to drag-reorder or remove. Edits are held in a
194
+ * local draft and only committed via `onApply` on Apply; Cancel/close discards.
195
+ *
196
+ * Presentational and fully controlled — the consumer owns the column data and
197
+ * the committed selection.
198
+ */
199
+ declare function ColumnCustomizer({ columns, value, onApply, groupOrder, title, searchPlaceholder, allGroupsLabel, align, trigger, }: ColumnCustomizerProps): React$1.JSX.Element;
200
+
201
+ interface ColumnPickerOption {
202
+ /** Stable identifier — used in `value` and returned from `onChange`. */
203
+ key: string;
204
+ /** Display label. */
205
+ label: string;
206
+ }
207
+ interface ColumnPickerProps {
208
+ /** Every column the user can show or hide. */
209
+ columns: ColumnPickerOption[];
210
+ /** Keys of the currently-visible columns. */
211
+ value: string[];
212
+ /** Called with the next set of visible keys whenever a column is toggled. */
213
+ onChange: (next: string[]) => void;
214
+ /** Heading shown at the top of the popover. */
215
+ title?: string;
216
+ /** Placeholder for the search field. */
217
+ searchPlaceholder?: string;
218
+ /** Popover alignment relative to the trigger. */
219
+ align?: "start" | "center" | "end";
220
+ /** Custom trigger element; defaults to an outline "Columns" button. */
221
+ trigger?: ReactElement;
222
+ }
223
+ /**
224
+ * Simple column picker — a dropdown checklist for showing/hiding table columns.
225
+ * A flat, searchable list of checkboxes with a select-all; each toggle commits
226
+ * immediately via `onChange`. No groups, no reorder, no Apply step — for a
227
+ * staged 3-pane picker with reordering, use `ColumnCustomizer` instead.
228
+ *
229
+ * Presentational and fully controlled — the consumer owns the column list and
230
+ * the visible set. Toggling emits the next visible keys in `columns` order.
231
+ */
232
+ declare function ColumnPicker({ columns, value, onChange, title, searchPlaceholder, align, trigger, }: ColumnPickerProps): React$1.JSX.Element;
233
+
161
234
  declare function Dialog({ ...props }: Dialog$1.Root.Props): React$1.JSX.Element;
162
235
  declare function DialogTrigger({ ...props }: Dialog$1.Trigger.Props): React$1.JSX.Element;
163
236
  declare function DialogPortal({ ...props }: Dialog$1.Portal.Props): React$1.JSX.Element;
@@ -189,6 +262,55 @@ declare function CommandSeparator({ className, ...props }: React$1.ComponentProp
189
262
  declare function CommandItem({ className, children, ...props }: React$1.ComponentProps<typeof Command$1.Item>): React$1.JSX.Element;
190
263
  declare function CommandShortcut({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
191
264
 
265
+ interface DataColumn<T> {
266
+ key: string;
267
+ header: ReactNode;
268
+ render: (row: T) => ReactNode;
269
+ sortable?: boolean;
270
+ sortValue?: (row: T) => string | number;
271
+ sticky?: boolean;
272
+ width?: number | string;
273
+ align?: "left" | "right" | "center";
274
+ className?: string;
275
+ headerClassName?: string;
276
+ }
277
+ interface DataTableBulkAction {
278
+ label: string;
279
+ options?: {
280
+ value: string;
281
+ label: string;
282
+ }[];
283
+ onPick?: (value: string) => void;
284
+ onClick?: () => void;
285
+ }
286
+ interface DataTableSort {
287
+ key: string;
288
+ dir: "asc" | "desc";
289
+ }
290
+ interface DataTableProps<T> {
291
+ data: T[];
292
+ columns: DataColumn<T>[];
293
+ rowKey: (row: T) => string;
294
+ selectable?: boolean;
295
+ selected?: Set<string>;
296
+ onSelectedChange?: (next: Set<string>) => void;
297
+ bulkActions?: DataTableBulkAction[];
298
+ sort?: DataTableSort | null;
299
+ defaultSort?: DataTableSort | null;
300
+ onSortChange?: (next: DataTableSort | null) => void;
301
+ paginated?: boolean;
302
+ pageSize?: number;
303
+ pageSizeOptions?: number[];
304
+ page?: number;
305
+ onPageChange?: (page: number) => void;
306
+ toolbar?: ReactNode;
307
+ onRowClick?: (row: T) => void;
308
+ emptyMessage?: ReactNode;
309
+ rowClassName?: (row: T) => string;
310
+ className?: string;
311
+ }
312
+ declare function DataTable<T>({ data, columns, rowKey, selectable, selected: selectedProp, onSelectedChange, bulkActions, sort: sortProp, defaultSort, onSortChange, paginated, pageSize: pageSizeProp, pageSizeOptions, page: pageProp, onPageChange, toolbar, onRowClick, emptyMessage, rowClassName, className, }: DataTableProps<T>): React$1.JSX.Element;
313
+
192
314
  declare function DropdownMenu(props: Menu.Root.Props): React$1.JSX.Element;
193
315
  declare function DropdownMenuTrigger({ ...props }: Menu.Trigger.Props): React$1.JSX.Element;
194
316
  declare function DropdownMenuGroup(props: Menu.Group.Props): React$1.JSX.Element;
@@ -230,6 +352,50 @@ declare function FieldError({ className, children, errors, ...props }: React.Com
230
352
  } | undefined>;
231
353
  }): React$1.JSX.Element | null;
232
354
 
355
+ interface FilterFacet {
356
+ key: string;
357
+ label: string;
358
+ options: {
359
+ value: string;
360
+ label: string;
361
+ }[];
362
+ }
363
+ type FilterValues = Record<string, string[]>;
364
+ interface FilterBarProps {
365
+ /** Controlled search text. */
366
+ search: string;
367
+ onSearchChange: (v: string) => void;
368
+ searchPlaceholder?: string;
369
+ /**
370
+ * Whether the built-in search box renders. Defaults to `true`. Set `false`
371
+ * when the consumer owns search elsewhere (e.g. the page header) and wants
372
+ * the bar to render facets + count only — `search`/`onSearchChange` are then
373
+ * unused but stay required so the controlled contract is unchanged.
374
+ */
375
+ showSearch?: boolean;
376
+ /** Filterable attributes — one dropdown each (inline) or one drill-in (funnel). */
377
+ facets?: FilterFacet[];
378
+ /** Controlled selected values, keyed by facet key. */
379
+ values?: FilterValues;
380
+ onValuesChange?: (v: FilterValues) => void;
381
+ /** Optional live result count shown on the right. */
382
+ resultCount?: number;
383
+ resultNoun?: string;
384
+ /** How many facets show as inline dropdowns; the rest fold into "More". */
385
+ maxVisibleFacets?: number;
386
+ /** Trailing controls (e.g. a view toggle or column customizer). */
387
+ right?: React.ReactNode;
388
+ /** Leading content (e.g. stage tabs), rendered far-left. */
389
+ left?: React.ReactNode;
390
+ /**
391
+ * "inline" (default) = always-visible facet dropdowns. "funnel" = a single
392
+ * Filter button that opens an "Add filter" drill-in menu.
393
+ */
394
+ filterVariant?: "inline" | "funnel";
395
+ className?: string;
396
+ }
397
+ declare function FilterBar({ search, onSearchChange, searchPlaceholder, showSearch, facets, values, onValuesChange, resultCount, resultNoun, maxVisibleFacets, right, left, filterVariant, className, }: FilterBarProps): React$1.JSX.Element;
398
+
233
399
  declare function Input({ className, type, ...props }: React$1.ComponentProps<"input">): React$1.JSX.Element;
234
400
 
235
401
  declare function InputGroup({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
@@ -679,7 +845,7 @@ declare function Toaster({ ...props }: ToasterProps): React$1.JSX.Element;
679
845
  */
680
846
  type ActivityStatus = "active" | "draft" | "paused" | "archived";
681
847
  declare const statusPillVariants: (props?: ({
682
- status?: "active" | "paused" | "draft" | "archived" | null | undefined;
848
+ status?: "draft" | "active" | "paused" | "archived" | null | undefined;
683
849
  } & class_variance_authority_types.ClassProp) | undefined) => string;
684
850
  declare const STATUS_LABEL: Record<ActivityStatus, string>;
685
851
  declare function StatusPill({ className, status, showDot, children, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof statusPillVariants> & {
@@ -773,4 +939,4 @@ declare function useIsMobile(): boolean;
773
939
 
774
940
  declare function cn(...inputs: ClassValue[]): string;
775
941
 
776
- export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, type ActivityStatus, AddonCard, type AddonItem, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, type CampNotice, type CampWeek, CamperForm, type CamperFormConfig, type CamperFormData, type CamperProfile$1 as CamperProfile, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type DepositOptions, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSubmenu, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, type EligibilityOptions, ExpandDesc, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, InlineAddonPicker, InlineSessionPicker, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, type Locale, type MockSession$1 as MockSession, NextStepPeek, type NoticeStep, PackagePicker, type PackageSessionSelection, type PackageTier, type Person$1 as Person, PersonList, PersonSelect, PersonTabs, PhoneInput, PhotoUpload, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, type PricingOptions, Progress, RadioGroup, RadioGroupItem, type RenderCamperFormFn, STATUS_LABEL, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SessionAddon, SessionCard, type SessionCardProfile, type SessionPickerProfile, type SessionProgram$1 as SessionProgram, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, StatusPill, StepBadge, StepCard, StepNotices, Switch, TSHIRT_SIZES, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UpcomingStep, __internal, badgeVariants, buttonVariants, calcAge, cn, computeSessionDeposit, computeSessionPrice, effectivePrice, eligibilityReason, fakeSpotsLeft, formatDOB, makeCamperFormSchema, mandatoryTotal, parseDOB, statusPillVariants, tabsListVariants, useIsMobile, useLocale, useSidebar };
942
+ export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, type ActivityStatus, AddonCard, type AddonItem, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, type CampNotice, type CampWeek, CamperForm, type CamperFormConfig, type CamperFormData, type CamperProfile$1 as CamperProfile, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColumnCustomizer, type ColumnCustomizerProps, type ColumnOption, ColumnPicker, type ColumnPickerOption, type ColumnPickerProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type DataColumn, DataTable, type DataTableBulkAction, type DataTableProps, type DataTableSort, type DepositOptions, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSubmenu, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, type EligibilityOptions, ExpandDesc, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FilterBar, type FilterBarProps, type FilterFacet, type FilterValues, InlineAddonPicker, InlineSessionPicker, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, type Locale, type MockSession$1 as MockSession, NextStepPeek, type NoticeStep, PackagePicker, type PackageSessionSelection, type PackageTier, type Person$1 as Person, PersonList, PersonSelect, PersonTabs, PhoneInput, PhotoUpload, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, type PricingOptions, Progress, RadioGroup, RadioGroupItem, type RenderCamperFormFn, STATUS_LABEL, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SessionAddon, SessionCard, type SessionCardProfile, type SessionPickerProfile, type SessionProgram$1 as SessionProgram, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, StatusPill, StepBadge, StepCard, StepNotices, Switch, TSHIRT_SIZES, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UpcomingStep, __internal, badgeVariants, buttonVariants, calcAge, cn, computeSessionDeposit, computeSessionPrice, effectivePrice, eligibilityReason, fakeSpotsLeft, formatDOB, makeCamperFormSchema, mandatoryTotal, parseDOB, statusPillVariants, tabsListVariants, useIsMobile, useLocale, useSidebar };