@sia-ui/react-web 0.3.2 → 0.5.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,9 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, ReactElement, RefObject, ImgHTMLAttributes, HTMLAttributes, ButtonHTMLAttributes, InputHTMLAttributes, Key, TextareaHTMLAttributes, ForwardRefExoticComponent, RefAttributes, SVGProps, CSSProperties, PropsWithChildren } from 'react';
3
+ import { ReactNode, ReactElement, HTMLAttributes, RefObject, ImgHTMLAttributes, ButtonHTMLAttributes, InputHTMLAttributes, Key, TextareaHTMLAttributes, ForwardRefExoticComponent, RefAttributes, SVGProps, CSSProperties, PropsWithChildren } from 'react';
4
4
  import { ComponentTone, ComponentSize } from '@sia-ui/tokens';
5
5
  import * as _sia_ui_headless from '@sia-ui/headless';
6
- import { PermissionRule, Placement, SliderValue, FormAdapter, FormValidator, TableQueryStorage, TableQueryState, TableQuery, SessionStore, SessionState, ToastPlacement, ToastId, ToastOptions } from '@sia-ui/headless';
6
+ import { PermissionRule, Placement, SliderValue, FormAdapter, FormValidator, FormSubmitResult, TableQueryStorage, TableQueryState, TableQuery, SessionStore, SessionState, ToastPlacement, ToastId, ToastOptions } from '@sia-ui/headless';
7
7
  export { SliderValue, ToastId, ToastOptions, ToastPlacement, ToastTone, toast, toastStore } from '@sia-ui/headless';
8
8
  import { Rule } from '@sia-ui/utils/validation';
9
9
 
@@ -256,6 +256,34 @@ type AppShellCollapsible = "icon" | "offcanvas" | false;
256
256
  */
257
257
  type AppShellMobileNav = "drawer" | "tabs" | "both";
258
258
  type AppShellContentWidth = "wide" | "narrow" | "full";
259
+ interface AppShellBrandProps extends HTMLAttributes<HTMLDivElement> {
260
+ /** Symbole conservé lorsque la navigation devient un rail. */
261
+ icon: ReactNode;
262
+ /** Nom du produit, masqué automatiquement dans le rail. */
263
+ name: ReactNode;
264
+ /** Ligne secondaire facultative, masquée avec le nom. */
265
+ description?: ReactNode;
266
+ }
267
+ /**
268
+ * Identité de produit adaptée au rail de l'`AppShell`.
269
+ *
270
+ * L'application fournit le symbole et le texte une seule fois. Le composant
271
+ * masque sa copie dès que son parent reçoit `data-collapsed`.
272
+ */
273
+ declare function AppShellBrand({ icon, name, description, className, ...props }: AppShellBrandProps): react_jsx_runtime.JSX.Element;
274
+ interface AppShellRailItemProps extends HTMLAttributes<HTMLElement> {
275
+ /** Élément rendu : contenu simple, action ou lien. */
276
+ as?: "div" | "button" | "a";
277
+ /** Symbole toujours visible dans le rail. */
278
+ icon: ReactNode;
279
+ /** Libellé masqué visuellement dans le rail et conservé comme nom accessible. */
280
+ label: string;
281
+ href?: string;
282
+ type?: "button" | "submit" | "reset";
283
+ disabled?: boolean;
284
+ }
285
+ /** Contenu icône + libellé qui s'adapte automatiquement au rail. */
286
+ declare function AppShellRailItem({ as, icon, label, className, href, type, disabled, ...props }: AppShellRailItemProps): react_jsx_runtime.JSX.Element;
259
287
  interface AppShellProps {
260
288
  nav: SidebarEntry[];
261
289
  children: ReactNode;
@@ -295,8 +323,8 @@ interface AppShellProps {
295
323
  /**
296
324
  * En tête de barre latérale : logo, nom du produit, sélecteur d'entité.
297
325
  *
298
- * Reçoit `data-collapsed` en mode rail, comme `sidebarFooter` : sans quoi
299
- * un nom de produit écrit en toutes lettres déborde des quatre rem du rail.
326
+ * `AppShellBrand` masque son texte automatiquement dans le rail. Un contenu
327
+ * entièrement personnalisé reçoit toujours `data-collapsed` sur son parent.
300
328
  */
301
329
  brand?: ReactNode;
302
330
  /**
@@ -304,8 +332,8 @@ interface AppShellProps {
304
332
  *
305
333
  * C'est la place de la déconnexion et des réglages du compte — ce qui sort
306
334
  * de l'application, par opposition à l'en-tête, réservé à ce qui agit sur
307
- * l'écran courant. Reçoit `data-collapsed` en mode rail, de quoi masquer un
308
- * libellé sans changer de composant.
335
+ * l'écran courant. `AppShellRailItem` masque son libellé automatiquement ;
336
+ * un contenu personnalisé peut encore lire `data-collapsed` sur son parent.
309
337
  */
310
338
  sidebarFooter?: ReactNode;
311
339
  /** La barre du haut : recherche, notifications, avatar de compte. */
@@ -491,6 +519,19 @@ interface SelectProps {
491
519
  invalid?: boolean;
492
520
  required?: boolean;
493
521
  placement?: OverlayPlacement;
522
+ /**
523
+ * Ce que montre le déclencheur. Par défaut, le libellé de l'option.
524
+ *
525
+ * La liste garde ses libellés complets — « 🇨🇲 Cameroun (+237) » — pendant
526
+ * que le champ fermé n'affiche que ce qui tient : « 🇨🇲 +237 ».
527
+ */
528
+ renderValue?: (option: SelectOption | undefined) => ReactNode;
529
+ /**
530
+ * `embedded` retire bordure, fond et largeur pleine du déclencheur : le
531
+ * `Select` se loge alors dans un autre contrôle — l'indicatif d'un
532
+ * `PhoneInput`, la taille de page d'une `Pagination`.
533
+ */
534
+ variant?: "default" | "embedded";
494
535
  className?: string;
495
536
  "aria-label"?: string;
496
537
  "aria-describedby"?: string;
@@ -1080,6 +1121,14 @@ interface DataTableProps<T> {
1080
1121
  searchPlaceholder?: string;
1081
1122
  /** Recherche déléguée. Fournie, le tableau cesse de filtrer lui-même. */
1082
1123
  onSearch?: (query: string) => void;
1124
+ /**
1125
+ * Millisecondes d'inactivité avant d'appeler `onSearch`.
1126
+ *
1127
+ * `0` — le défaut — l'appelle à chaque frappe, ce qui convient à un
1128
+ * filtrage local. Pour une recherche serveur, 300 évite une requête par
1129
+ * lettre ; Entrée et l'effacement déclenchent sans attendre.
1130
+ */
1131
+ searchDelay?: number;
1083
1132
  layout?: "auto" | "fixed";
1084
1133
  /** Hauteur du corps. Sans elle, `stickyHeader` n'a rien où se coller. */
1085
1134
  maxHeight?: string;
@@ -1691,6 +1740,8 @@ interface FormFieldGroup {
1691
1740
  fields: FormFieldConfig[];
1692
1741
  }
1693
1742
  type FormEntry = FormFieldConfig | FormFieldGroup;
1743
+ /** Les noms de champs, groupes aplatis. */
1744
+ declare function formFieldNames(fields: FormEntry[]): string[];
1694
1745
  /**
1695
1746
  * Les valeurs qu'un formulaire déclaratif peut porter.
1696
1747
  *
@@ -1712,7 +1763,14 @@ interface FormProps<TValues extends FormShape = FormShape> {
1712
1763
  defaultValues?: TValues;
1713
1764
  /** La validation. Un schéma Zod s'y branche en cinq lignes. */
1714
1765
  validate?: FormValidator<TValues>;
1715
- onSubmit?: (values: TValues) => void | Promise<void>;
1766
+ /**
1767
+ * L'envoi.
1768
+ *
1769
+ * Rendre des erreurs par champ les pose sous les champs. Lever une erreur
1770
+ * l'affiche dans une alerte en tête des boutons — et une `HttpError` de
1771
+ * `@sia-ui/api` voit en plus ses erreurs de champ posées à leur place.
1772
+ */
1773
+ onSubmit?: (values: TValues) => FormSubmitResult<TValues> | Promise<FormSubmitResult<TValues>>;
1716
1774
  columns?: number;
1717
1775
  submitText?: ReactNode;
1718
1776
  clearText?: ReactNode;
@@ -1958,7 +2016,7 @@ interface CrudDialogsProps<T> {
1958
2016
  mode: "create" | "edit";
1959
2017
  row?: T;
1960
2018
  index?: number;
1961
- }) => void | Promise<void>) | undefined;
2019
+ }) => FormSubmitResult<FormShape> | Promise<FormSubmitResult<FormShape>>) | undefined;
1962
2020
  createDefaults?: FormShape | undefined;
1963
2021
  toFormValues?: ((row: T) => FormShape) | undefined;
1964
2022
  renderDetail?: ((row: T, index: number) => ReactNode) | undefined;
@@ -2027,12 +2085,17 @@ interface CrudPageBase<T> {
2027
2085
  * propre à cette page, aucune bibliothèque imposée.
2028
2086
  */
2029
2087
  fields?: FormEntry[];
2030
- /** Ce que la page fait d'un formulaire envoyé. */
2088
+ /**
2089
+ * Ce que la page fait d'un formulaire envoyé.
2090
+ *
2091
+ * Rendre des erreurs par champ, ou lever une `HttpError`, garde la boîte
2092
+ * ouverte avec les erreurs affichées ; sinon elle se ferme.
2093
+ */
2031
2094
  onSubmit?: (values: FormShape, context: {
2032
2095
  mode: "create" | "edit";
2033
2096
  row?: T;
2034
2097
  index?: number;
2035
- }) => void | Promise<void>;
2098
+ }) => FormSubmitResult<FormShape> | Promise<FormSubmitResult<FormShape>>;
2036
2099
  /**
2037
2100
  * La validation, sous la même forme que `Form`.
2038
2101
  *
@@ -2082,6 +2145,8 @@ interface CrudPageBase<T> {
2082
2145
  searchKeys?: string[];
2083
2146
  searchPlaceholder?: string;
2084
2147
  onSearch?: (query: string) => void;
2148
+ /** Temporise `onSearch` — voir `DataTable`. 300 pour une recherche serveur. */
2149
+ searchDelay?: number;
2085
2150
  loading?: boolean;
2086
2151
  error?: ReactNode;
2087
2152
  onRetry?: () => void;
@@ -2089,6 +2154,11 @@ interface CrudPageBase<T> {
2089
2154
  page?: number;
2090
2155
  totalPages?: number;
2091
2156
  onPageChange?: (page: number) => void;
2157
+ /** Avec `onPageSizeChange`, ajoute le choix du nombre de lignes par page. */
2158
+ pageSize?: number;
2159
+ onPageSizeChange?: (pageSize: number) => void;
2160
+ /** Les tailles proposées — voir `Pagination`. */
2161
+ pageSizeOptions?: number[];
2092
2162
  /**
2093
2163
  * Ce qui n'a pas de raccourci ici passe au tableau tel quel — densité,
2094
2164
  * mode cartes, tri, colonnes figées.
@@ -2130,7 +2200,7 @@ type CrudPageProps<T> = CrudPageBase<T> & ({
2130
2200
  *
2131
2201
  * Ici, fournir le gestionnaire suffit. Ne pas le fournir retire l'action.
2132
2202
  */
2133
- declare function CrudPage<T>({ resource, title, description, eyebrow, columns: colonnesFournies, data, getRowKey: cleFournie, onCreate, onView, onEdit, onDelete, fields: champsFournis, onSubmit, validate: validationFournie, createDefaults, toFormValues, detail, dialog, operations, extraRowActions, onBulkDelete, can, headerActions, toolbar, searchKeys: clesDeRecherche, searchPlaceholder, onSearch, loading, error, onRetry, empty, page, totalPages, onPageChange, table, children, className, }: CrudPageProps<T>): react_jsx_runtime.JSX.Element;
2203
+ declare function CrudPage<T>({ resource, title, description, eyebrow, columns: colonnesFournies, data, getRowKey: cleFournie, onCreate, onView, onEdit, onDelete, fields: champsFournis, onSubmit, validate: validationFournie, createDefaults, toFormValues, detail, dialog, operations, extraRowActions, onBulkDelete, can, headerActions, toolbar, searchKeys: clesDeRecherche, searchPlaceholder, onSearch, searchDelay, loading, error, onRetry, empty, page, totalPages, onPageChange, pageSize, onPageSizeChange, pageSizeOptions, table, children, className, }: CrudPageProps<T>): react_jsx_runtime.JSX.Element;
2134
2204
 
2135
2205
  /**
2136
2206
  * L'état du tableau dans la barre d'adresse.
@@ -2168,7 +2238,7 @@ declare function useDataTableQuery(options?: UseDataTableQueryOptions): TableQue
2168
2238
  * elle filtre les lignes déjà chargées — ce qui suffit tant que tout tient
2169
2239
  * sur une page.
2170
2240
  */
2171
- declare function DataTable<T>({ columns, data, getRowKey, title, description, toolbar, actions, searchKeys, searchPlaceholder, onSearch, layout, maxHeight, stickyHeader, density, striped, bordered, rowActions, inlineActionsLimit, actionsHeader, actionsDisplay, can, view: viewProp, defaultView, onViewChange, showViewToggle, responsive, cardsBreakpoint, renderCard, loading, skeletonRows, error, onRetry, empty, selectable, selectedKeys: selectedProp, defaultSelectedKeys, onSelectionChange, isRowSelectable, selectionActions, sort, onSortChange, onRowClick, rowClassName, caption, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
2241
+ declare function DataTable<T>({ columns, data, getRowKey, title, description, toolbar, actions, searchKeys, searchPlaceholder, onSearch, searchDelay, layout, maxHeight, stickyHeader, density, striped, bordered, rowActions, inlineActionsLimit, actionsHeader, actionsDisplay, can, view: viewProp, defaultView, onViewChange, showViewToggle, responsive, cardsBreakpoint, renderCard, loading, skeletonRows, error, onRetry, empty, selectable, selectedKeys: selectedProp, defaultSelectedKeys, onSelectionChange, isRowSelectable, selectionActions, sort, onSortChange, onRowClick, rowClassName, caption, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
2172
2242
 
2173
2243
  type DateRangeValue = CalendarRangeValue;
2174
2244
  interface DateRangePickerProps extends Pick<CalendarProps, "locale" | "firstDayOfWeek" | "disabledDate" | "cellRender" | "showWeek"> {
@@ -2550,6 +2620,7 @@ declare function TrashIcon(props: IconProps): react_jsx_runtime.JSX.Element;
2550
2620
  declare function UploadIcon(props: IconProps): react_jsx_runtime.JSX.Element;
2551
2621
  declare function AlertCircleIcon(props: IconProps): react_jsx_runtime.JSX.Element;
2552
2622
  declare function InfoIcon(props: IconProps): react_jsx_runtime.JSX.Element;
2623
+ declare function SettingsIcon(props: IconProps): react_jsx_runtime.JSX.Element;
2553
2624
  declare function EyeIcon(props: IconProps): react_jsx_runtime.JSX.Element;
2554
2625
  declare function EyeOffIcon(props: IconProps): react_jsx_runtime.JSX.Element;
2555
2626
 
@@ -2685,16 +2756,46 @@ interface PaginationProps {
2685
2756
  showTotal?: boolean;
2686
2757
  /** Masque les libellés et ne garde que les flèches. */
2687
2758
  compact?: boolean;
2759
+ /** Le nombre de lignes par page en vigueur. */
2760
+ pageSize?: number;
2761
+ /**
2762
+ * Fourni avec `pageSize`, ajoute le choix du nombre de lignes par page.
2763
+ *
2764
+ * Seul le nouveau nombre est remonté : revenir en page 1 est l'affaire de
2765
+ * qui tient l'état — `setPerPage` de `useTableQuery` le fait déjà.
2766
+ */
2767
+ onPageSizeChange?: (pageSize: number) => void;
2768
+ /**
2769
+ * Les tailles proposées. Par défaut `10, 20, 50, 100`. Une taille en
2770
+ * vigueur absente de la liste y est ajoutée, pour que le champ ne paraisse
2771
+ * jamais vide.
2772
+ */
2773
+ pageSizeOptions?: number[];
2774
+ /** Le libellé du choix. Par défaut `locale.perPage` — « Par page ». */
2775
+ pageSizeLabel?: string;
2776
+ /**
2777
+ * Remplace entièrement le contrôle — des boutons segmentés, un champ libre.
2778
+ * Le choix des tailles et leur tri sont déjà faits.
2779
+ */
2780
+ renderPageSize?: (context: PageSizeContext) => ReactNode;
2688
2781
  ariaLabel?: string;
2689
2782
  className?: string;
2690
2783
  }
2784
+ /** Ce que reçoit `renderPageSize`. */
2785
+ interface PageSizeContext {
2786
+ pageSize: number;
2787
+ options: number[];
2788
+ onChange: (pageSize: number) => void;
2789
+ label: string;
2790
+ }
2791
+ declare const DEFAULT_PAGE_SIZE_OPTIONS: number[];
2691
2792
  /**
2692
2793
  * La navigation entre les pages.
2693
2794
  *
2694
2795
  * Le calcul des numéros et des ellipses vient de `@sia-ui/headless` :
2695
2796
  * `usePagination` et ce composant appliquent la même règle, écrite une fois.
2696
2797
  */
2697
- declare function Pagination({ page, totalPages, onPageChange, siblingCount, previousLabel: previousLabelProp, nextLabel: nextLabelProp, jumpTo, showTotal, compact, ariaLabel, className, }: PaginationProps): react_jsx_runtime.JSX.Element | null;
2798
+ declare function Pagination({ page, totalPages, onPageChange, siblingCount, previousLabel: previousLabelProp, nextLabel: nextLabelProp, jumpTo, showTotal, compact, pageSize, onPageSizeChange, pageSizeOptions, pageSizeLabel, renderPageSize, ariaLabel, className, }: PaginationProps): react_jsx_runtime.JSX.Element | null;
2698
2799
 
2699
2800
  interface PasswordStrength {
2700
2801
  /** De 0 à 4. */
@@ -3397,4 +3498,4 @@ interface YearPickerProps {
3397
3498
  */
3398
3499
  declare function YearPicker({ value, defaultValue, min, max, onValueChange, className }: YearPickerProps): react_jsx_runtime.JSX.Element;
3399
3500
 
3400
- export { Accordion, type AccordionItem, type AccordionProps, Alert, AlertCircleIcon, type AlertProps, AmountDisplay, type AmountDisplayProps, AppShell, type AppShellCollapsible, type AppShellContentWidth, type AppShellMobileNav, type AppShellProps, ArrowRightIcon, AspectRatio, type AspectRatioProps, AsyncState, type AsyncStateProps, type AuditEvent, AuditMeta, type AuditMetaProps, AuthLayout, type AuthLayoutProps, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, type AvatarTint, type AvatarVariant, Badge, type BadgeProps, BottomTabs, type BottomTabsProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Calendar, type CalendarDay, type CalendarEvent, CalendarIcon, type CalendarMode, type CalendarProps, type CalendarRangeValue, Can, type CanProps, Card, CardBody, CardFooter, CardHeader, Chart, type ChartProps, type ChartSeries, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ClockIcon, Collapse, type CollapseProps, ColorPicker, type ColorPickerProps, type ColumnCardRole, type CommandItem, CommandPalette, type CommandPaletteProps, ConfirmDialog, type ConfirmDialogProps, Container, ContextMenu, type ContextMenuProps, Countdown, type CountdownProps, type CrudActionOptions, type CrudCreateOptions, type CrudDialogOptions, type CrudDialogState, CrudDialogs, CrudPage, type CrudPageProps, CurrencyInput, type CurrencyInputProps, DEFAULT_COUNTRIES, DataTable, type DataTableColumn, type DataTableProps, type DataTableView, DatePicker, type DatePickerProps, DateRangeFilter, type DateRangeFilterProps, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DateRangeValue, DateTimePicker, type DateTimePickerProps, type DateTimeValue, type DescriptionItem, Descriptions, type DescriptionsProps, Divider, type DividerProps, Drawer, DrawerBody, DrawerClose, type DrawerComponent, DrawerFooter, DrawerHeader, type DrawerPosition, type DrawerProps, type DrawerRef, type DrawerSize, DrawerTitle, DropdownMenu, type DropdownMenuProps, DurationDisplay, type DurationDisplayProps, EmptyState, type EmptyStateProps, EntityMeta, type EntityMetaProps, ErrorState, type ErrorStateProps, EventCalendar, type EventCalendarProps, EyeIcon, EyeOffIcon, Field, type FieldBindingLike, type FieldProps, type FieldStatus, type FieldType, type FieldValue, FileUpload, type FileUploadProps, FiltersBar, type FiltersBarProps, Form, type FormEntry, Field as FormField, type FormFieldConfig, type FormFieldGroup, type FieldProps as FormFieldProps, type FormProps, type FormShape, Heading, type HeadingProps, HoverCard, type HoverCardProps, type IDrawerProps, type ILabelProps, type ITooltipProps, type ITooltipVariant, IconButton, type IconButtonProps, ImageUpload, type ImageUploadProps, InfoIcon, InlineCode, Input, InputNumber, type InputNumberProps, type InputProps, JsonEditor, type JsonEditorProps, KpiGrid, type KpiGridProps, Label, type LabelProps, MarkdownEditor, type MarkdownEditorProps, type MenuEntry, type MenuItem, type MenuLabel, MenuList, type MenuListProps, type MenuSeparator, MiniCalendar, MinusIcon, Modal, type ModalProps, MonthPicker, type MonthPickerProps, MoreHorizontalIcon, MultiSelect, type MultiSelectProps, OtpInput, type OtpInputProps, Overlay, type OverlayPlacement, type OverlayProps, PageHeader, type PageHeaderProps, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, type PasswordStrength, PermissionGate, type PermissionGateProps, type PhoneCountry, PhoneInput, type PhoneInputProps, PlusIcon, Popover, type PopoverProps, Progress, type ProgressProps, QRCode, type QRCodeProps, Radio, RadioButton, type RadioButtonProps, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type ReferenceOption, ReferenceSelect, type ReferenceSelectProps, RelativeTime, type RelativeTimeProps, RequireSession, type RequireSessionProps, ResizablePanel, type ResizablePanelProps, type ResourceDefinition, type ResourceField, RichTextEditor, type RichTextEditorProps, type RowAction, ScrollArea, type ScrollAreaProps, SearchIcon, SearchInput, type SearchInputProps, Select, type SelectOption, type SelectProps, Sidebar, type SidebarEntry, type SidebarItem, type SidebarProps, type SidebarRenderLink, type SidebarSection, type SidebarState, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderRangeValue, Sparkline, type SparklineProps, Spinner, type SpinnerProps, Stack, StarIcon, StatCard, type StatCardProps, Statistic, type StatisticProps, type StepItem, type StepStatus, Steps, type StepsProps, Switch, type SwitchProps, Tabs, TabsContent, TabsList, type TabsProps, TabsTrigger, TagsInput, type TagsInputProps, Text, type TextProps, Textarea, type TextareaProps, type TimeParts, TimePicker, type TimePickerProps, TimeRangePicker, type TimeRangePickerProps, type TimeRangeValue, Timeline, type TimelineItem, type TimelineProps, Timer, type TimerProps, ToastProvider, type ToastProviderProps, Toaster, type ToasterProps, Toggle, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleProps, Tooltip, type TooltipProps, type TooltipVariant, Tour, type TourProps, type TourStep, Transfer, type TransferItem, type TransferProps, TrashIcon, Tree, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, UnsavedChangesGuard, type UnsavedChangesGuardProps, UploadIcon, type UseDataTableQueryOptions, WeekPicker, type WeekPickerProps, XIcon, YearPicker, type YearPickerProps, confirmUnsavedNavigation, createUrlTableStorage, defineResource, formatDuration, formatTimeValue, initialsOf, parseTimeValue, resourceColumns, resourceDefaults, resourceDetailColumns, resourceFormFields, resourcePermissions, resourceRowKey, resourceSearchKeys, resourceValidator, tintForName, useDataTableQuery, useToast };
3501
+ export { Accordion, type AccordionItem, type AccordionProps, Alert, AlertCircleIcon, type AlertProps, AmountDisplay, type AmountDisplayProps, AppShell, AppShellBrand, type AppShellBrandProps, type AppShellCollapsible, type AppShellContentWidth, type AppShellMobileNav, type AppShellProps, AppShellRailItem, type AppShellRailItemProps, ArrowRightIcon, AspectRatio, type AspectRatioProps, AsyncState, type AsyncStateProps, type AuditEvent, AuditMeta, type AuditMetaProps, AuthLayout, type AuthLayoutProps, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, type AvatarTint, type AvatarVariant, Badge, type BadgeProps, BottomTabs, type BottomTabsProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Calendar, type CalendarDay, type CalendarEvent, CalendarIcon, type CalendarMode, type CalendarProps, type CalendarRangeValue, Can, type CanProps, Card, CardBody, CardFooter, CardHeader, Chart, type ChartProps, type ChartSeries, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ClockIcon, Collapse, type CollapseProps, ColorPicker, type ColorPickerProps, type ColumnCardRole, type CommandItem, CommandPalette, type CommandPaletteProps, ConfirmDialog, type ConfirmDialogProps, Container, ContextMenu, type ContextMenuProps, Countdown, type CountdownProps, type CrudActionOptions, type CrudCreateOptions, type CrudDialogOptions, type CrudDialogState, CrudDialogs, CrudPage, type CrudPageProps, CurrencyInput, type CurrencyInputProps, DEFAULT_COUNTRIES, DEFAULT_PAGE_SIZE_OPTIONS, DataTable, type DataTableColumn, type DataTableProps, type DataTableView, DatePicker, type DatePickerProps, DateRangeFilter, type DateRangeFilterProps, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DateRangeValue, DateTimePicker, type DateTimePickerProps, type DateTimeValue, type DescriptionItem, Descriptions, type DescriptionsProps, Divider, type DividerProps, Drawer, DrawerBody, DrawerClose, type DrawerComponent, DrawerFooter, DrawerHeader, type DrawerPosition, type DrawerProps, type DrawerRef, type DrawerSize, DrawerTitle, DropdownMenu, type DropdownMenuProps, DurationDisplay, type DurationDisplayProps, EmptyState, type EmptyStateProps, EntityMeta, type EntityMetaProps, ErrorState, type ErrorStateProps, EventCalendar, type EventCalendarProps, EyeIcon, EyeOffIcon, Field, type FieldBindingLike, type FieldProps, type FieldStatus, type FieldType, type FieldValue, FileUpload, type FileUploadProps, FiltersBar, type FiltersBarProps, Form, type FormEntry, Field as FormField, type FormFieldConfig, type FormFieldGroup, type FieldProps as FormFieldProps, type FormProps, type FormShape, Heading, type HeadingProps, HoverCard, type HoverCardProps, type IDrawerProps, type ILabelProps, type ITooltipProps, type ITooltipVariant, IconButton, type IconButtonProps, ImageUpload, type ImageUploadProps, InfoIcon, InlineCode, Input, InputNumber, type InputNumberProps, type InputProps, JsonEditor, type JsonEditorProps, KpiGrid, type KpiGridProps, Label, type LabelProps, MarkdownEditor, type MarkdownEditorProps, type MenuEntry, type MenuItem, type MenuLabel, MenuList, type MenuListProps, type MenuSeparator, MiniCalendar, MinusIcon, Modal, type ModalProps, MonthPicker, type MonthPickerProps, MoreHorizontalIcon, MultiSelect, type MultiSelectProps, OtpInput, type OtpInputProps, Overlay, type OverlayPlacement, type OverlayProps, PageHeader, type PageHeaderProps, type PageSizeContext, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, type PasswordStrength, PermissionGate, type PermissionGateProps, type PhoneCountry, PhoneInput, type PhoneInputProps, PlusIcon, Popover, type PopoverProps, Progress, type ProgressProps, QRCode, type QRCodeProps, Radio, RadioButton, type RadioButtonProps, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type ReferenceOption, ReferenceSelect, type ReferenceSelectProps, RelativeTime, type RelativeTimeProps, RequireSession, type RequireSessionProps, ResizablePanel, type ResizablePanelProps, type ResourceDefinition, type ResourceField, RichTextEditor, type RichTextEditorProps, type RowAction, ScrollArea, type ScrollAreaProps, SearchIcon, SearchInput, type SearchInputProps, Select, type SelectOption, type SelectProps, SettingsIcon, Sidebar, type SidebarEntry, type SidebarItem, type SidebarProps, type SidebarRenderLink, type SidebarSection, type SidebarState, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderRangeValue, Sparkline, type SparklineProps, Spinner, type SpinnerProps, Stack, StarIcon, StatCard, type StatCardProps, Statistic, type StatisticProps, type StepItem, type StepStatus, Steps, type StepsProps, Switch, type SwitchProps, Tabs, TabsContent, TabsList, type TabsProps, TabsTrigger, TagsInput, type TagsInputProps, Text, type TextProps, Textarea, type TextareaProps, type TimeParts, TimePicker, type TimePickerProps, TimeRangePicker, type TimeRangePickerProps, type TimeRangeValue, Timeline, type TimelineItem, type TimelineProps, Timer, type TimerProps, ToastProvider, type ToastProviderProps, Toaster, type ToasterProps, Toggle, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleProps, Tooltip, type TooltipProps, type TooltipVariant, Tour, type TourProps, type TourStep, Transfer, type TransferItem, type TransferProps, TrashIcon, Tree, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, UnsavedChangesGuard, type UnsavedChangesGuardProps, UploadIcon, type UseDataTableQueryOptions, WeekPicker, type WeekPickerProps, XIcon, YearPicker, type YearPickerProps, confirmUnsavedNavigation, createUrlTableStorage, defineResource, formFieldNames, formatDuration, formatTimeValue, initialsOf, parseTimeValue, resourceColumns, resourceDefaults, resourceDetailColumns, resourceFormFields, resourcePermissions, resourceRowKey, resourceSearchKeys, resourceValidator, tintForName, useDataTableQuery, useToast };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, ReactElement, RefObject, ImgHTMLAttributes, HTMLAttributes, ButtonHTMLAttributes, InputHTMLAttributes, Key, TextareaHTMLAttributes, ForwardRefExoticComponent, RefAttributes, SVGProps, CSSProperties, PropsWithChildren } from 'react';
3
+ import { ReactNode, ReactElement, HTMLAttributes, RefObject, ImgHTMLAttributes, ButtonHTMLAttributes, InputHTMLAttributes, Key, TextareaHTMLAttributes, ForwardRefExoticComponent, RefAttributes, SVGProps, CSSProperties, PropsWithChildren } from 'react';
4
4
  import { ComponentTone, ComponentSize } from '@sia-ui/tokens';
5
5
  import * as _sia_ui_headless from '@sia-ui/headless';
6
- import { PermissionRule, Placement, SliderValue, FormAdapter, FormValidator, TableQueryStorage, TableQueryState, TableQuery, SessionStore, SessionState, ToastPlacement, ToastId, ToastOptions } from '@sia-ui/headless';
6
+ import { PermissionRule, Placement, SliderValue, FormAdapter, FormValidator, FormSubmitResult, TableQueryStorage, TableQueryState, TableQuery, SessionStore, SessionState, ToastPlacement, ToastId, ToastOptions } from '@sia-ui/headless';
7
7
  export { SliderValue, ToastId, ToastOptions, ToastPlacement, ToastTone, toast, toastStore } from '@sia-ui/headless';
8
8
  import { Rule } from '@sia-ui/utils/validation';
9
9
 
@@ -256,6 +256,34 @@ type AppShellCollapsible = "icon" | "offcanvas" | false;
256
256
  */
257
257
  type AppShellMobileNav = "drawer" | "tabs" | "both";
258
258
  type AppShellContentWidth = "wide" | "narrow" | "full";
259
+ interface AppShellBrandProps extends HTMLAttributes<HTMLDivElement> {
260
+ /** Symbole conservé lorsque la navigation devient un rail. */
261
+ icon: ReactNode;
262
+ /** Nom du produit, masqué automatiquement dans le rail. */
263
+ name: ReactNode;
264
+ /** Ligne secondaire facultative, masquée avec le nom. */
265
+ description?: ReactNode;
266
+ }
267
+ /**
268
+ * Identité de produit adaptée au rail de l'`AppShell`.
269
+ *
270
+ * L'application fournit le symbole et le texte une seule fois. Le composant
271
+ * masque sa copie dès que son parent reçoit `data-collapsed`.
272
+ */
273
+ declare function AppShellBrand({ icon, name, description, className, ...props }: AppShellBrandProps): react_jsx_runtime.JSX.Element;
274
+ interface AppShellRailItemProps extends HTMLAttributes<HTMLElement> {
275
+ /** Élément rendu : contenu simple, action ou lien. */
276
+ as?: "div" | "button" | "a";
277
+ /** Symbole toujours visible dans le rail. */
278
+ icon: ReactNode;
279
+ /** Libellé masqué visuellement dans le rail et conservé comme nom accessible. */
280
+ label: string;
281
+ href?: string;
282
+ type?: "button" | "submit" | "reset";
283
+ disabled?: boolean;
284
+ }
285
+ /** Contenu icône + libellé qui s'adapte automatiquement au rail. */
286
+ declare function AppShellRailItem({ as, icon, label, className, href, type, disabled, ...props }: AppShellRailItemProps): react_jsx_runtime.JSX.Element;
259
287
  interface AppShellProps {
260
288
  nav: SidebarEntry[];
261
289
  children: ReactNode;
@@ -295,8 +323,8 @@ interface AppShellProps {
295
323
  /**
296
324
  * En tête de barre latérale : logo, nom du produit, sélecteur d'entité.
297
325
  *
298
- * Reçoit `data-collapsed` en mode rail, comme `sidebarFooter` : sans quoi
299
- * un nom de produit écrit en toutes lettres déborde des quatre rem du rail.
326
+ * `AppShellBrand` masque son texte automatiquement dans le rail. Un contenu
327
+ * entièrement personnalisé reçoit toujours `data-collapsed` sur son parent.
300
328
  */
301
329
  brand?: ReactNode;
302
330
  /**
@@ -304,8 +332,8 @@ interface AppShellProps {
304
332
  *
305
333
  * C'est la place de la déconnexion et des réglages du compte — ce qui sort
306
334
  * de l'application, par opposition à l'en-tête, réservé à ce qui agit sur
307
- * l'écran courant. Reçoit `data-collapsed` en mode rail, de quoi masquer un
308
- * libellé sans changer de composant.
335
+ * l'écran courant. `AppShellRailItem` masque son libellé automatiquement ;
336
+ * un contenu personnalisé peut encore lire `data-collapsed` sur son parent.
309
337
  */
310
338
  sidebarFooter?: ReactNode;
311
339
  /** La barre du haut : recherche, notifications, avatar de compte. */
@@ -491,6 +519,19 @@ interface SelectProps {
491
519
  invalid?: boolean;
492
520
  required?: boolean;
493
521
  placement?: OverlayPlacement;
522
+ /**
523
+ * Ce que montre le déclencheur. Par défaut, le libellé de l'option.
524
+ *
525
+ * La liste garde ses libellés complets — « 🇨🇲 Cameroun (+237) » — pendant
526
+ * que le champ fermé n'affiche que ce qui tient : « 🇨🇲 +237 ».
527
+ */
528
+ renderValue?: (option: SelectOption | undefined) => ReactNode;
529
+ /**
530
+ * `embedded` retire bordure, fond et largeur pleine du déclencheur : le
531
+ * `Select` se loge alors dans un autre contrôle — l'indicatif d'un
532
+ * `PhoneInput`, la taille de page d'une `Pagination`.
533
+ */
534
+ variant?: "default" | "embedded";
494
535
  className?: string;
495
536
  "aria-label"?: string;
496
537
  "aria-describedby"?: string;
@@ -1080,6 +1121,14 @@ interface DataTableProps<T> {
1080
1121
  searchPlaceholder?: string;
1081
1122
  /** Recherche déléguée. Fournie, le tableau cesse de filtrer lui-même. */
1082
1123
  onSearch?: (query: string) => void;
1124
+ /**
1125
+ * Millisecondes d'inactivité avant d'appeler `onSearch`.
1126
+ *
1127
+ * `0` — le défaut — l'appelle à chaque frappe, ce qui convient à un
1128
+ * filtrage local. Pour une recherche serveur, 300 évite une requête par
1129
+ * lettre ; Entrée et l'effacement déclenchent sans attendre.
1130
+ */
1131
+ searchDelay?: number;
1083
1132
  layout?: "auto" | "fixed";
1084
1133
  /** Hauteur du corps. Sans elle, `stickyHeader` n'a rien où se coller. */
1085
1134
  maxHeight?: string;
@@ -1691,6 +1740,8 @@ interface FormFieldGroup {
1691
1740
  fields: FormFieldConfig[];
1692
1741
  }
1693
1742
  type FormEntry = FormFieldConfig | FormFieldGroup;
1743
+ /** Les noms de champs, groupes aplatis. */
1744
+ declare function formFieldNames(fields: FormEntry[]): string[];
1694
1745
  /**
1695
1746
  * Les valeurs qu'un formulaire déclaratif peut porter.
1696
1747
  *
@@ -1712,7 +1763,14 @@ interface FormProps<TValues extends FormShape = FormShape> {
1712
1763
  defaultValues?: TValues;
1713
1764
  /** La validation. Un schéma Zod s'y branche en cinq lignes. */
1714
1765
  validate?: FormValidator<TValues>;
1715
- onSubmit?: (values: TValues) => void | Promise<void>;
1766
+ /**
1767
+ * L'envoi.
1768
+ *
1769
+ * Rendre des erreurs par champ les pose sous les champs. Lever une erreur
1770
+ * l'affiche dans une alerte en tête des boutons — et une `HttpError` de
1771
+ * `@sia-ui/api` voit en plus ses erreurs de champ posées à leur place.
1772
+ */
1773
+ onSubmit?: (values: TValues) => FormSubmitResult<TValues> | Promise<FormSubmitResult<TValues>>;
1716
1774
  columns?: number;
1717
1775
  submitText?: ReactNode;
1718
1776
  clearText?: ReactNode;
@@ -1958,7 +2016,7 @@ interface CrudDialogsProps<T> {
1958
2016
  mode: "create" | "edit";
1959
2017
  row?: T;
1960
2018
  index?: number;
1961
- }) => void | Promise<void>) | undefined;
2019
+ }) => FormSubmitResult<FormShape> | Promise<FormSubmitResult<FormShape>>) | undefined;
1962
2020
  createDefaults?: FormShape | undefined;
1963
2021
  toFormValues?: ((row: T) => FormShape) | undefined;
1964
2022
  renderDetail?: ((row: T, index: number) => ReactNode) | undefined;
@@ -2027,12 +2085,17 @@ interface CrudPageBase<T> {
2027
2085
  * propre à cette page, aucune bibliothèque imposée.
2028
2086
  */
2029
2087
  fields?: FormEntry[];
2030
- /** Ce que la page fait d'un formulaire envoyé. */
2088
+ /**
2089
+ * Ce que la page fait d'un formulaire envoyé.
2090
+ *
2091
+ * Rendre des erreurs par champ, ou lever une `HttpError`, garde la boîte
2092
+ * ouverte avec les erreurs affichées ; sinon elle se ferme.
2093
+ */
2031
2094
  onSubmit?: (values: FormShape, context: {
2032
2095
  mode: "create" | "edit";
2033
2096
  row?: T;
2034
2097
  index?: number;
2035
- }) => void | Promise<void>;
2098
+ }) => FormSubmitResult<FormShape> | Promise<FormSubmitResult<FormShape>>;
2036
2099
  /**
2037
2100
  * La validation, sous la même forme que `Form`.
2038
2101
  *
@@ -2082,6 +2145,8 @@ interface CrudPageBase<T> {
2082
2145
  searchKeys?: string[];
2083
2146
  searchPlaceholder?: string;
2084
2147
  onSearch?: (query: string) => void;
2148
+ /** Temporise `onSearch` — voir `DataTable`. 300 pour une recherche serveur. */
2149
+ searchDelay?: number;
2085
2150
  loading?: boolean;
2086
2151
  error?: ReactNode;
2087
2152
  onRetry?: () => void;
@@ -2089,6 +2154,11 @@ interface CrudPageBase<T> {
2089
2154
  page?: number;
2090
2155
  totalPages?: number;
2091
2156
  onPageChange?: (page: number) => void;
2157
+ /** Avec `onPageSizeChange`, ajoute le choix du nombre de lignes par page. */
2158
+ pageSize?: number;
2159
+ onPageSizeChange?: (pageSize: number) => void;
2160
+ /** Les tailles proposées — voir `Pagination`. */
2161
+ pageSizeOptions?: number[];
2092
2162
  /**
2093
2163
  * Ce qui n'a pas de raccourci ici passe au tableau tel quel — densité,
2094
2164
  * mode cartes, tri, colonnes figées.
@@ -2130,7 +2200,7 @@ type CrudPageProps<T> = CrudPageBase<T> & ({
2130
2200
  *
2131
2201
  * Ici, fournir le gestionnaire suffit. Ne pas le fournir retire l'action.
2132
2202
  */
2133
- declare function CrudPage<T>({ resource, title, description, eyebrow, columns: colonnesFournies, data, getRowKey: cleFournie, onCreate, onView, onEdit, onDelete, fields: champsFournis, onSubmit, validate: validationFournie, createDefaults, toFormValues, detail, dialog, operations, extraRowActions, onBulkDelete, can, headerActions, toolbar, searchKeys: clesDeRecherche, searchPlaceholder, onSearch, loading, error, onRetry, empty, page, totalPages, onPageChange, table, children, className, }: CrudPageProps<T>): react_jsx_runtime.JSX.Element;
2203
+ declare function CrudPage<T>({ resource, title, description, eyebrow, columns: colonnesFournies, data, getRowKey: cleFournie, onCreate, onView, onEdit, onDelete, fields: champsFournis, onSubmit, validate: validationFournie, createDefaults, toFormValues, detail, dialog, operations, extraRowActions, onBulkDelete, can, headerActions, toolbar, searchKeys: clesDeRecherche, searchPlaceholder, onSearch, searchDelay, loading, error, onRetry, empty, page, totalPages, onPageChange, pageSize, onPageSizeChange, pageSizeOptions, table, children, className, }: CrudPageProps<T>): react_jsx_runtime.JSX.Element;
2134
2204
 
2135
2205
  /**
2136
2206
  * L'état du tableau dans la barre d'adresse.
@@ -2168,7 +2238,7 @@ declare function useDataTableQuery(options?: UseDataTableQueryOptions): TableQue
2168
2238
  * elle filtre les lignes déjà chargées — ce qui suffit tant que tout tient
2169
2239
  * sur une page.
2170
2240
  */
2171
- declare function DataTable<T>({ columns, data, getRowKey, title, description, toolbar, actions, searchKeys, searchPlaceholder, onSearch, layout, maxHeight, stickyHeader, density, striped, bordered, rowActions, inlineActionsLimit, actionsHeader, actionsDisplay, can, view: viewProp, defaultView, onViewChange, showViewToggle, responsive, cardsBreakpoint, renderCard, loading, skeletonRows, error, onRetry, empty, selectable, selectedKeys: selectedProp, defaultSelectedKeys, onSelectionChange, isRowSelectable, selectionActions, sort, onSortChange, onRowClick, rowClassName, caption, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
2241
+ declare function DataTable<T>({ columns, data, getRowKey, title, description, toolbar, actions, searchKeys, searchPlaceholder, onSearch, searchDelay, layout, maxHeight, stickyHeader, density, striped, bordered, rowActions, inlineActionsLimit, actionsHeader, actionsDisplay, can, view: viewProp, defaultView, onViewChange, showViewToggle, responsive, cardsBreakpoint, renderCard, loading, skeletonRows, error, onRetry, empty, selectable, selectedKeys: selectedProp, defaultSelectedKeys, onSelectionChange, isRowSelectable, selectionActions, sort, onSortChange, onRowClick, rowClassName, caption, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
2172
2242
 
2173
2243
  type DateRangeValue = CalendarRangeValue;
2174
2244
  interface DateRangePickerProps extends Pick<CalendarProps, "locale" | "firstDayOfWeek" | "disabledDate" | "cellRender" | "showWeek"> {
@@ -2550,6 +2620,7 @@ declare function TrashIcon(props: IconProps): react_jsx_runtime.JSX.Element;
2550
2620
  declare function UploadIcon(props: IconProps): react_jsx_runtime.JSX.Element;
2551
2621
  declare function AlertCircleIcon(props: IconProps): react_jsx_runtime.JSX.Element;
2552
2622
  declare function InfoIcon(props: IconProps): react_jsx_runtime.JSX.Element;
2623
+ declare function SettingsIcon(props: IconProps): react_jsx_runtime.JSX.Element;
2553
2624
  declare function EyeIcon(props: IconProps): react_jsx_runtime.JSX.Element;
2554
2625
  declare function EyeOffIcon(props: IconProps): react_jsx_runtime.JSX.Element;
2555
2626
 
@@ -2685,16 +2756,46 @@ interface PaginationProps {
2685
2756
  showTotal?: boolean;
2686
2757
  /** Masque les libellés et ne garde que les flèches. */
2687
2758
  compact?: boolean;
2759
+ /** Le nombre de lignes par page en vigueur. */
2760
+ pageSize?: number;
2761
+ /**
2762
+ * Fourni avec `pageSize`, ajoute le choix du nombre de lignes par page.
2763
+ *
2764
+ * Seul le nouveau nombre est remonté : revenir en page 1 est l'affaire de
2765
+ * qui tient l'état — `setPerPage` de `useTableQuery` le fait déjà.
2766
+ */
2767
+ onPageSizeChange?: (pageSize: number) => void;
2768
+ /**
2769
+ * Les tailles proposées. Par défaut `10, 20, 50, 100`. Une taille en
2770
+ * vigueur absente de la liste y est ajoutée, pour que le champ ne paraisse
2771
+ * jamais vide.
2772
+ */
2773
+ pageSizeOptions?: number[];
2774
+ /** Le libellé du choix. Par défaut `locale.perPage` — « Par page ». */
2775
+ pageSizeLabel?: string;
2776
+ /**
2777
+ * Remplace entièrement le contrôle — des boutons segmentés, un champ libre.
2778
+ * Le choix des tailles et leur tri sont déjà faits.
2779
+ */
2780
+ renderPageSize?: (context: PageSizeContext) => ReactNode;
2688
2781
  ariaLabel?: string;
2689
2782
  className?: string;
2690
2783
  }
2784
+ /** Ce que reçoit `renderPageSize`. */
2785
+ interface PageSizeContext {
2786
+ pageSize: number;
2787
+ options: number[];
2788
+ onChange: (pageSize: number) => void;
2789
+ label: string;
2790
+ }
2791
+ declare const DEFAULT_PAGE_SIZE_OPTIONS: number[];
2691
2792
  /**
2692
2793
  * La navigation entre les pages.
2693
2794
  *
2694
2795
  * Le calcul des numéros et des ellipses vient de `@sia-ui/headless` :
2695
2796
  * `usePagination` et ce composant appliquent la même règle, écrite une fois.
2696
2797
  */
2697
- declare function Pagination({ page, totalPages, onPageChange, siblingCount, previousLabel: previousLabelProp, nextLabel: nextLabelProp, jumpTo, showTotal, compact, ariaLabel, className, }: PaginationProps): react_jsx_runtime.JSX.Element | null;
2798
+ declare function Pagination({ page, totalPages, onPageChange, siblingCount, previousLabel: previousLabelProp, nextLabel: nextLabelProp, jumpTo, showTotal, compact, pageSize, onPageSizeChange, pageSizeOptions, pageSizeLabel, renderPageSize, ariaLabel, className, }: PaginationProps): react_jsx_runtime.JSX.Element | null;
2698
2799
 
2699
2800
  interface PasswordStrength {
2700
2801
  /** De 0 à 4. */
@@ -3397,4 +3498,4 @@ interface YearPickerProps {
3397
3498
  */
3398
3499
  declare function YearPicker({ value, defaultValue, min, max, onValueChange, className }: YearPickerProps): react_jsx_runtime.JSX.Element;
3399
3500
 
3400
- export { Accordion, type AccordionItem, type AccordionProps, Alert, AlertCircleIcon, type AlertProps, AmountDisplay, type AmountDisplayProps, AppShell, type AppShellCollapsible, type AppShellContentWidth, type AppShellMobileNav, type AppShellProps, ArrowRightIcon, AspectRatio, type AspectRatioProps, AsyncState, type AsyncStateProps, type AuditEvent, AuditMeta, type AuditMetaProps, AuthLayout, type AuthLayoutProps, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, type AvatarTint, type AvatarVariant, Badge, type BadgeProps, BottomTabs, type BottomTabsProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Calendar, type CalendarDay, type CalendarEvent, CalendarIcon, type CalendarMode, type CalendarProps, type CalendarRangeValue, Can, type CanProps, Card, CardBody, CardFooter, CardHeader, Chart, type ChartProps, type ChartSeries, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ClockIcon, Collapse, type CollapseProps, ColorPicker, type ColorPickerProps, type ColumnCardRole, type CommandItem, CommandPalette, type CommandPaletteProps, ConfirmDialog, type ConfirmDialogProps, Container, ContextMenu, type ContextMenuProps, Countdown, type CountdownProps, type CrudActionOptions, type CrudCreateOptions, type CrudDialogOptions, type CrudDialogState, CrudDialogs, CrudPage, type CrudPageProps, CurrencyInput, type CurrencyInputProps, DEFAULT_COUNTRIES, DataTable, type DataTableColumn, type DataTableProps, type DataTableView, DatePicker, type DatePickerProps, DateRangeFilter, type DateRangeFilterProps, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DateRangeValue, DateTimePicker, type DateTimePickerProps, type DateTimeValue, type DescriptionItem, Descriptions, type DescriptionsProps, Divider, type DividerProps, Drawer, DrawerBody, DrawerClose, type DrawerComponent, DrawerFooter, DrawerHeader, type DrawerPosition, type DrawerProps, type DrawerRef, type DrawerSize, DrawerTitle, DropdownMenu, type DropdownMenuProps, DurationDisplay, type DurationDisplayProps, EmptyState, type EmptyStateProps, EntityMeta, type EntityMetaProps, ErrorState, type ErrorStateProps, EventCalendar, type EventCalendarProps, EyeIcon, EyeOffIcon, Field, type FieldBindingLike, type FieldProps, type FieldStatus, type FieldType, type FieldValue, FileUpload, type FileUploadProps, FiltersBar, type FiltersBarProps, Form, type FormEntry, Field as FormField, type FormFieldConfig, type FormFieldGroup, type FieldProps as FormFieldProps, type FormProps, type FormShape, Heading, type HeadingProps, HoverCard, type HoverCardProps, type IDrawerProps, type ILabelProps, type ITooltipProps, type ITooltipVariant, IconButton, type IconButtonProps, ImageUpload, type ImageUploadProps, InfoIcon, InlineCode, Input, InputNumber, type InputNumberProps, type InputProps, JsonEditor, type JsonEditorProps, KpiGrid, type KpiGridProps, Label, type LabelProps, MarkdownEditor, type MarkdownEditorProps, type MenuEntry, type MenuItem, type MenuLabel, MenuList, type MenuListProps, type MenuSeparator, MiniCalendar, MinusIcon, Modal, type ModalProps, MonthPicker, type MonthPickerProps, MoreHorizontalIcon, MultiSelect, type MultiSelectProps, OtpInput, type OtpInputProps, Overlay, type OverlayPlacement, type OverlayProps, PageHeader, type PageHeaderProps, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, type PasswordStrength, PermissionGate, type PermissionGateProps, type PhoneCountry, PhoneInput, type PhoneInputProps, PlusIcon, Popover, type PopoverProps, Progress, type ProgressProps, QRCode, type QRCodeProps, Radio, RadioButton, type RadioButtonProps, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type ReferenceOption, ReferenceSelect, type ReferenceSelectProps, RelativeTime, type RelativeTimeProps, RequireSession, type RequireSessionProps, ResizablePanel, type ResizablePanelProps, type ResourceDefinition, type ResourceField, RichTextEditor, type RichTextEditorProps, type RowAction, ScrollArea, type ScrollAreaProps, SearchIcon, SearchInput, type SearchInputProps, Select, type SelectOption, type SelectProps, Sidebar, type SidebarEntry, type SidebarItem, type SidebarProps, type SidebarRenderLink, type SidebarSection, type SidebarState, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderRangeValue, Sparkline, type SparklineProps, Spinner, type SpinnerProps, Stack, StarIcon, StatCard, type StatCardProps, Statistic, type StatisticProps, type StepItem, type StepStatus, Steps, type StepsProps, Switch, type SwitchProps, Tabs, TabsContent, TabsList, type TabsProps, TabsTrigger, TagsInput, type TagsInputProps, Text, type TextProps, Textarea, type TextareaProps, type TimeParts, TimePicker, type TimePickerProps, TimeRangePicker, type TimeRangePickerProps, type TimeRangeValue, Timeline, type TimelineItem, type TimelineProps, Timer, type TimerProps, ToastProvider, type ToastProviderProps, Toaster, type ToasterProps, Toggle, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleProps, Tooltip, type TooltipProps, type TooltipVariant, Tour, type TourProps, type TourStep, Transfer, type TransferItem, type TransferProps, TrashIcon, Tree, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, UnsavedChangesGuard, type UnsavedChangesGuardProps, UploadIcon, type UseDataTableQueryOptions, WeekPicker, type WeekPickerProps, XIcon, YearPicker, type YearPickerProps, confirmUnsavedNavigation, createUrlTableStorage, defineResource, formatDuration, formatTimeValue, initialsOf, parseTimeValue, resourceColumns, resourceDefaults, resourceDetailColumns, resourceFormFields, resourcePermissions, resourceRowKey, resourceSearchKeys, resourceValidator, tintForName, useDataTableQuery, useToast };
3501
+ export { Accordion, type AccordionItem, type AccordionProps, Alert, AlertCircleIcon, type AlertProps, AmountDisplay, type AmountDisplayProps, AppShell, AppShellBrand, type AppShellBrandProps, type AppShellCollapsible, type AppShellContentWidth, type AppShellMobileNav, type AppShellProps, AppShellRailItem, type AppShellRailItemProps, ArrowRightIcon, AspectRatio, type AspectRatioProps, AsyncState, type AsyncStateProps, type AuditEvent, AuditMeta, type AuditMetaProps, AuthLayout, type AuthLayoutProps, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, type AvatarTint, type AvatarVariant, Badge, type BadgeProps, BottomTabs, type BottomTabsProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Calendar, type CalendarDay, type CalendarEvent, CalendarIcon, type CalendarMode, type CalendarProps, type CalendarRangeValue, Can, type CanProps, Card, CardBody, CardFooter, CardHeader, Chart, type ChartProps, type ChartSeries, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ClockIcon, Collapse, type CollapseProps, ColorPicker, type ColorPickerProps, type ColumnCardRole, type CommandItem, CommandPalette, type CommandPaletteProps, ConfirmDialog, type ConfirmDialogProps, Container, ContextMenu, type ContextMenuProps, Countdown, type CountdownProps, type CrudActionOptions, type CrudCreateOptions, type CrudDialogOptions, type CrudDialogState, CrudDialogs, CrudPage, type CrudPageProps, CurrencyInput, type CurrencyInputProps, DEFAULT_COUNTRIES, DEFAULT_PAGE_SIZE_OPTIONS, DataTable, type DataTableColumn, type DataTableProps, type DataTableView, DatePicker, type DatePickerProps, DateRangeFilter, type DateRangeFilterProps, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DateRangeValue, DateTimePicker, type DateTimePickerProps, type DateTimeValue, type DescriptionItem, Descriptions, type DescriptionsProps, Divider, type DividerProps, Drawer, DrawerBody, DrawerClose, type DrawerComponent, DrawerFooter, DrawerHeader, type DrawerPosition, type DrawerProps, type DrawerRef, type DrawerSize, DrawerTitle, DropdownMenu, type DropdownMenuProps, DurationDisplay, type DurationDisplayProps, EmptyState, type EmptyStateProps, EntityMeta, type EntityMetaProps, ErrorState, type ErrorStateProps, EventCalendar, type EventCalendarProps, EyeIcon, EyeOffIcon, Field, type FieldBindingLike, type FieldProps, type FieldStatus, type FieldType, type FieldValue, FileUpload, type FileUploadProps, FiltersBar, type FiltersBarProps, Form, type FormEntry, Field as FormField, type FormFieldConfig, type FormFieldGroup, type FieldProps as FormFieldProps, type FormProps, type FormShape, Heading, type HeadingProps, HoverCard, type HoverCardProps, type IDrawerProps, type ILabelProps, type ITooltipProps, type ITooltipVariant, IconButton, type IconButtonProps, ImageUpload, type ImageUploadProps, InfoIcon, InlineCode, Input, InputNumber, type InputNumberProps, type InputProps, JsonEditor, type JsonEditorProps, KpiGrid, type KpiGridProps, Label, type LabelProps, MarkdownEditor, type MarkdownEditorProps, type MenuEntry, type MenuItem, type MenuLabel, MenuList, type MenuListProps, type MenuSeparator, MiniCalendar, MinusIcon, Modal, type ModalProps, MonthPicker, type MonthPickerProps, MoreHorizontalIcon, MultiSelect, type MultiSelectProps, OtpInput, type OtpInputProps, Overlay, type OverlayPlacement, type OverlayProps, PageHeader, type PageHeaderProps, type PageSizeContext, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, type PasswordStrength, PermissionGate, type PermissionGateProps, type PhoneCountry, PhoneInput, type PhoneInputProps, PlusIcon, Popover, type PopoverProps, Progress, type ProgressProps, QRCode, type QRCodeProps, Radio, RadioButton, type RadioButtonProps, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type ReferenceOption, ReferenceSelect, type ReferenceSelectProps, RelativeTime, type RelativeTimeProps, RequireSession, type RequireSessionProps, ResizablePanel, type ResizablePanelProps, type ResourceDefinition, type ResourceField, RichTextEditor, type RichTextEditorProps, type RowAction, ScrollArea, type ScrollAreaProps, SearchIcon, SearchInput, type SearchInputProps, Select, type SelectOption, type SelectProps, SettingsIcon, Sidebar, type SidebarEntry, type SidebarItem, type SidebarProps, type SidebarRenderLink, type SidebarSection, type SidebarState, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderRangeValue, Sparkline, type SparklineProps, Spinner, type SpinnerProps, Stack, StarIcon, StatCard, type StatCardProps, Statistic, type StatisticProps, type StepItem, type StepStatus, Steps, type StepsProps, Switch, type SwitchProps, Tabs, TabsContent, TabsList, type TabsProps, TabsTrigger, TagsInput, type TagsInputProps, Text, type TextProps, Textarea, type TextareaProps, type TimeParts, TimePicker, type TimePickerProps, TimeRangePicker, type TimeRangePickerProps, type TimeRangeValue, Timeline, type TimelineItem, type TimelineProps, Timer, type TimerProps, ToastProvider, type ToastProviderProps, Toaster, type ToasterProps, Toggle, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleProps, Tooltip, type TooltipProps, type TooltipVariant, Tour, type TourProps, type TourStep, Transfer, type TransferItem, type TransferProps, TrashIcon, Tree, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, UnsavedChangesGuard, type UnsavedChangesGuardProps, UploadIcon, type UseDataTableQueryOptions, WeekPicker, type WeekPickerProps, XIcon, YearPicker, type YearPickerProps, confirmUnsavedNavigation, createUrlTableStorage, defineResource, formFieldNames, formatDuration, formatTimeValue, initialsOf, parseTimeValue, resourceColumns, resourceDefaults, resourceDetailColumns, resourceFormFields, resourcePermissions, resourceRowKey, resourceSearchKeys, resourceValidator, tintForName, useDataTableQuery, useToast };