@campminder/ds 0.2.0 → 0.4.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.cjs +1247 -210
- package/dist/index.d.cts +176 -3
- package/dist/index.d.ts +176 -3
- package/dist/index.js +1246 -213
- package/fonts/general-sans/GeneralSans-Bold.woff +0 -0
- package/fonts/general-sans/GeneralSans-Bold.woff2 +0 -0
- package/fonts/general-sans/GeneralSans-BoldItalic.woff +0 -0
- package/fonts/general-sans/GeneralSans-BoldItalic.woff2 +0 -0
- package/fonts/general-sans/GeneralSans-Extralight.woff +0 -0
- package/fonts/general-sans/GeneralSans-Extralight.woff2 +0 -0
- package/fonts/general-sans/GeneralSans-ExtralightItalic.woff +0 -0
- package/fonts/general-sans/GeneralSans-ExtralightItalic.woff2 +0 -0
- package/fonts/general-sans/GeneralSans-Italic.woff +0 -0
- package/fonts/general-sans/GeneralSans-Italic.woff2 +0 -0
- package/fonts/general-sans/GeneralSans-Light.woff +0 -0
- package/fonts/general-sans/GeneralSans-Light.woff2 +0 -0
- package/fonts/general-sans/GeneralSans-LightItalic.woff +0 -0
- package/fonts/general-sans/GeneralSans-LightItalic.woff2 +0 -0
- package/fonts/general-sans/GeneralSans-Medium.woff +0 -0
- package/fonts/general-sans/GeneralSans-Medium.woff2 +0 -0
- package/fonts/general-sans/GeneralSans-MediumItalic.woff +0 -0
- package/fonts/general-sans/GeneralSans-MediumItalic.woff2 +0 -0
- package/fonts/general-sans/GeneralSans-Regular.woff +0 -0
- package/fonts/general-sans/GeneralSans-Regular.woff2 +0 -0
- package/fonts/general-sans/GeneralSans-Semibold.woff +0 -0
- package/fonts/general-sans/GeneralSans-Semibold.woff2 +0 -0
- package/fonts/general-sans/GeneralSans-SemiboldItalic.woff +0 -0
- package/fonts/general-sans/GeneralSans-SemiboldItalic.woff2 +0 -0
- package/fonts/general-sans/GeneralSans-Variable.woff +0 -0
- package/fonts/general-sans/GeneralSans-Variable.woff2 +0 -0
- package/fonts/general-sans/GeneralSans-VariableItalic.woff +0 -0
- package/fonts/general-sans/GeneralSans-VariableItalic.woff2 +0 -0
- package/package.json +3 -2
- package/styles.css +120 -2
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,62 @@ 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
|
+
/**
|
|
305
|
+
* Pin the pagination bar to the bottom of the scroll viewport so it stays
|
|
306
|
+
* reachable without scrolling to the end of a long table. Off by default —
|
|
307
|
+
* only enable when the table is the page's dominant scrolling content (e.g.
|
|
308
|
+
* a full-page list view), not when it sits inside a card among other content.
|
|
309
|
+
*/
|
|
310
|
+
stickyPagination?: boolean;
|
|
311
|
+
page?: number;
|
|
312
|
+
onPageChange?: (page: number) => void;
|
|
313
|
+
toolbar?: ReactNode;
|
|
314
|
+
onRowClick?: (row: T) => void;
|
|
315
|
+
emptyMessage?: ReactNode;
|
|
316
|
+
rowClassName?: (row: T) => string;
|
|
317
|
+
className?: string;
|
|
318
|
+
}
|
|
319
|
+
declare function DataTable<T>({ data, columns, rowKey, selectable, selected: selectedProp, onSelectedChange, bulkActions, sort: sortProp, defaultSort, onSortChange, paginated, pageSize: pageSizeProp, pageSizeOptions, stickyPagination, page: pageProp, onPageChange, toolbar, onRowClick, emptyMessage, rowClassName, className, }: DataTableProps<T>): React$1.JSX.Element;
|
|
320
|
+
|
|
192
321
|
declare function DropdownMenu(props: Menu.Root.Props): React$1.JSX.Element;
|
|
193
322
|
declare function DropdownMenuTrigger({ ...props }: Menu.Trigger.Props): React$1.JSX.Element;
|
|
194
323
|
declare function DropdownMenuGroup(props: Menu.Group.Props): React$1.JSX.Element;
|
|
@@ -230,6 +359,50 @@ declare function FieldError({ className, children, errors, ...props }: React.Com
|
|
|
230
359
|
} | undefined>;
|
|
231
360
|
}): React$1.JSX.Element | null;
|
|
232
361
|
|
|
362
|
+
interface FilterFacet {
|
|
363
|
+
key: string;
|
|
364
|
+
label: string;
|
|
365
|
+
options: {
|
|
366
|
+
value: string;
|
|
367
|
+
label: string;
|
|
368
|
+
}[];
|
|
369
|
+
}
|
|
370
|
+
type FilterValues = Record<string, string[]>;
|
|
371
|
+
interface FilterBarProps {
|
|
372
|
+
/** Controlled search text. */
|
|
373
|
+
search: string;
|
|
374
|
+
onSearchChange: (v: string) => void;
|
|
375
|
+
searchPlaceholder?: string;
|
|
376
|
+
/**
|
|
377
|
+
* Whether the built-in search box renders. Defaults to `true`. Set `false`
|
|
378
|
+
* when the consumer owns search elsewhere (e.g. the page header) and wants
|
|
379
|
+
* the bar to render facets + count only — `search`/`onSearchChange` are then
|
|
380
|
+
* unused but stay required so the controlled contract is unchanged.
|
|
381
|
+
*/
|
|
382
|
+
showSearch?: boolean;
|
|
383
|
+
/** Filterable attributes — one dropdown each (inline) or one drill-in (funnel). */
|
|
384
|
+
facets?: FilterFacet[];
|
|
385
|
+
/** Controlled selected values, keyed by facet key. */
|
|
386
|
+
values?: FilterValues;
|
|
387
|
+
onValuesChange?: (v: FilterValues) => void;
|
|
388
|
+
/** Optional live result count shown on the right. */
|
|
389
|
+
resultCount?: number;
|
|
390
|
+
resultNoun?: string;
|
|
391
|
+
/** How many facets show as inline dropdowns; the rest fold into "More". */
|
|
392
|
+
maxVisibleFacets?: number;
|
|
393
|
+
/** Trailing controls (e.g. a view toggle or column customizer). */
|
|
394
|
+
right?: React.ReactNode;
|
|
395
|
+
/** Leading content (e.g. stage tabs), rendered far-left. */
|
|
396
|
+
left?: React.ReactNode;
|
|
397
|
+
/**
|
|
398
|
+
* "inline" (default) = always-visible facet dropdowns. "funnel" = a single
|
|
399
|
+
* Filter button that opens an "Add filter" drill-in menu.
|
|
400
|
+
*/
|
|
401
|
+
filterVariant?: "inline" | "funnel";
|
|
402
|
+
className?: string;
|
|
403
|
+
}
|
|
404
|
+
declare function FilterBar({ search, onSearchChange, searchPlaceholder, showSearch, facets, values, onValuesChange, resultCount, resultNoun, maxVisibleFacets, right, left, filterVariant, className, }: FilterBarProps): React$1.JSX.Element;
|
|
405
|
+
|
|
233
406
|
declare function Input({ className, type, ...props }: React$1.ComponentProps<"input">): React$1.JSX.Element;
|
|
234
407
|
|
|
235
408
|
declare function InputGroup({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
@@ -679,7 +852,7 @@ declare function Toaster({ ...props }: ToasterProps): React$1.JSX.Element;
|
|
|
679
852
|
*/
|
|
680
853
|
type ActivityStatus = "active" | "draft" | "paused" | "archived";
|
|
681
854
|
declare const statusPillVariants: (props?: ({
|
|
682
|
-
status?: "
|
|
855
|
+
status?: "draft" | "active" | "paused" | "archived" | null | undefined;
|
|
683
856
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
684
857
|
declare const STATUS_LABEL: Record<ActivityStatus, string>;
|
|
685
858
|
declare function StatusPill({ className, status, showDot, children, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof statusPillVariants> & {
|
|
@@ -773,4 +946,4 @@ declare function useIsMobile(): boolean;
|
|
|
773
946
|
|
|
774
947
|
declare function cn(...inputs: ClassValue[]): string;
|
|
775
948
|
|
|
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 };
|
|
949
|
+
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,62 @@ 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
|
+
/**
|
|
305
|
+
* Pin the pagination bar to the bottom of the scroll viewport so it stays
|
|
306
|
+
* reachable without scrolling to the end of a long table. Off by default —
|
|
307
|
+
* only enable when the table is the page's dominant scrolling content (e.g.
|
|
308
|
+
* a full-page list view), not when it sits inside a card among other content.
|
|
309
|
+
*/
|
|
310
|
+
stickyPagination?: boolean;
|
|
311
|
+
page?: number;
|
|
312
|
+
onPageChange?: (page: number) => void;
|
|
313
|
+
toolbar?: ReactNode;
|
|
314
|
+
onRowClick?: (row: T) => void;
|
|
315
|
+
emptyMessage?: ReactNode;
|
|
316
|
+
rowClassName?: (row: T) => string;
|
|
317
|
+
className?: string;
|
|
318
|
+
}
|
|
319
|
+
declare function DataTable<T>({ data, columns, rowKey, selectable, selected: selectedProp, onSelectedChange, bulkActions, sort: sortProp, defaultSort, onSortChange, paginated, pageSize: pageSizeProp, pageSizeOptions, stickyPagination, page: pageProp, onPageChange, toolbar, onRowClick, emptyMessage, rowClassName, className, }: DataTableProps<T>): React$1.JSX.Element;
|
|
320
|
+
|
|
192
321
|
declare function DropdownMenu(props: Menu.Root.Props): React$1.JSX.Element;
|
|
193
322
|
declare function DropdownMenuTrigger({ ...props }: Menu.Trigger.Props): React$1.JSX.Element;
|
|
194
323
|
declare function DropdownMenuGroup(props: Menu.Group.Props): React$1.JSX.Element;
|
|
@@ -230,6 +359,50 @@ declare function FieldError({ className, children, errors, ...props }: React.Com
|
|
|
230
359
|
} | undefined>;
|
|
231
360
|
}): React$1.JSX.Element | null;
|
|
232
361
|
|
|
362
|
+
interface FilterFacet {
|
|
363
|
+
key: string;
|
|
364
|
+
label: string;
|
|
365
|
+
options: {
|
|
366
|
+
value: string;
|
|
367
|
+
label: string;
|
|
368
|
+
}[];
|
|
369
|
+
}
|
|
370
|
+
type FilterValues = Record<string, string[]>;
|
|
371
|
+
interface FilterBarProps {
|
|
372
|
+
/** Controlled search text. */
|
|
373
|
+
search: string;
|
|
374
|
+
onSearchChange: (v: string) => void;
|
|
375
|
+
searchPlaceholder?: string;
|
|
376
|
+
/**
|
|
377
|
+
* Whether the built-in search box renders. Defaults to `true`. Set `false`
|
|
378
|
+
* when the consumer owns search elsewhere (e.g. the page header) and wants
|
|
379
|
+
* the bar to render facets + count only — `search`/`onSearchChange` are then
|
|
380
|
+
* unused but stay required so the controlled contract is unchanged.
|
|
381
|
+
*/
|
|
382
|
+
showSearch?: boolean;
|
|
383
|
+
/** Filterable attributes — one dropdown each (inline) or one drill-in (funnel). */
|
|
384
|
+
facets?: FilterFacet[];
|
|
385
|
+
/** Controlled selected values, keyed by facet key. */
|
|
386
|
+
values?: FilterValues;
|
|
387
|
+
onValuesChange?: (v: FilterValues) => void;
|
|
388
|
+
/** Optional live result count shown on the right. */
|
|
389
|
+
resultCount?: number;
|
|
390
|
+
resultNoun?: string;
|
|
391
|
+
/** How many facets show as inline dropdowns; the rest fold into "More". */
|
|
392
|
+
maxVisibleFacets?: number;
|
|
393
|
+
/** Trailing controls (e.g. a view toggle or column customizer). */
|
|
394
|
+
right?: React.ReactNode;
|
|
395
|
+
/** Leading content (e.g. stage tabs), rendered far-left. */
|
|
396
|
+
left?: React.ReactNode;
|
|
397
|
+
/**
|
|
398
|
+
* "inline" (default) = always-visible facet dropdowns. "funnel" = a single
|
|
399
|
+
* Filter button that opens an "Add filter" drill-in menu.
|
|
400
|
+
*/
|
|
401
|
+
filterVariant?: "inline" | "funnel";
|
|
402
|
+
className?: string;
|
|
403
|
+
}
|
|
404
|
+
declare function FilterBar({ search, onSearchChange, searchPlaceholder, showSearch, facets, values, onValuesChange, resultCount, resultNoun, maxVisibleFacets, right, left, filterVariant, className, }: FilterBarProps): React$1.JSX.Element;
|
|
405
|
+
|
|
233
406
|
declare function Input({ className, type, ...props }: React$1.ComponentProps<"input">): React$1.JSX.Element;
|
|
234
407
|
|
|
235
408
|
declare function InputGroup({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
@@ -679,7 +852,7 @@ declare function Toaster({ ...props }: ToasterProps): React$1.JSX.Element;
|
|
|
679
852
|
*/
|
|
680
853
|
type ActivityStatus = "active" | "draft" | "paused" | "archived";
|
|
681
854
|
declare const statusPillVariants: (props?: ({
|
|
682
|
-
status?: "
|
|
855
|
+
status?: "draft" | "active" | "paused" | "archived" | null | undefined;
|
|
683
856
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
684
857
|
declare const STATUS_LABEL: Record<ActivityStatus, string>;
|
|
685
858
|
declare function StatusPill({ className, status, showDot, children, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof statusPillVariants> & {
|
|
@@ -773,4 +946,4 @@ declare function useIsMobile(): boolean;
|
|
|
773
946
|
|
|
774
947
|
declare function cn(...inputs: ClassValue[]): string;
|
|
775
948
|
|
|
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 };
|
|
949
|
+
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 };
|