@epfl-sti/poesis 0.1.9 → 0.2.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/components/data-display/Card.d.ts +20 -0
- package/dist/components/data-display/Card.d.ts.map +1 -0
- package/dist/components/data-display/DescriptionList.d.ts +23 -0
- package/dist/components/data-display/DescriptionList.d.ts.map +1 -0
- package/dist/components/data-display/EmptyState.d.ts +18 -0
- package/dist/components/data-display/EmptyState.d.ts.map +1 -0
- package/dist/components/data-display/Table.d.ts +53 -0
- package/dist/components/data-display/Table.d.ts.map +1 -0
- package/dist/components/data-display/index.d.ts +5 -0
- package/dist/components/data-display/index.d.ts.map +1 -0
- package/dist/components/feedback/Alert.d.ts +18 -0
- package/dist/components/feedback/Alert.d.ts.map +1 -0
- package/dist/components/feedback/ConfirmDialog.d.ts +26 -0
- package/dist/components/feedback/ConfirmDialog.d.ts.map +1 -0
- package/dist/components/feedback/Dialog.d.ts +20 -0
- package/dist/components/feedback/Dialog.d.ts.map +1 -0
- package/dist/components/feedback/Toast.d.ts +5 -0
- package/dist/components/feedback/Toast.d.ts.map +1 -0
- package/dist/components/feedback/index.d.ts +6 -0
- package/dist/components/feedback/index.d.ts.map +1 -0
- package/dist/components/feedback/toastContext.d.ts +17 -0
- package/dist/components/feedback/toastContext.d.ts.map +1 -0
- package/dist/components/layout/BurgerDrawer.d.ts +25 -0
- package/dist/components/layout/BurgerDrawer.d.ts.map +1 -0
- package/dist/components/layout/Footer.d.ts +2 -0
- package/dist/components/layout/Footer.d.ts.map +1 -0
- package/dist/components/layout/PageShell.d.ts +41 -0
- package/dist/components/layout/PageShell.d.ts.map +1 -0
- package/dist/components/layout/SideNav.d.ts +31 -0
- package/dist/components/layout/SideNav.d.ts.map +1 -0
- package/dist/components/layout/TopNav.d.ts +26 -0
- package/dist/components/layout/TopNav.d.ts.map +1 -0
- package/dist/components/layout/UserMenu.d.ts +14 -0
- package/dist/components/layout/UserMenu.d.ts.map +1 -0
- package/dist/components/layout/index.d.ts +15 -0
- package/dist/components/layout/index.d.ts.map +1 -0
- package/dist/components/layout/types.d.ts +33 -0
- package/dist/components/layout/types.d.ts.map +1 -0
- package/dist/components/ui/Avatar.d.ts +25 -0
- package/dist/components/ui/Avatar.d.ts.map +1 -0
- package/dist/components/ui/Badge.d.ts +34 -0
- package/dist/components/ui/Badge.d.ts.map +1 -0
- package/dist/components/ui/Button.d.ts +35 -0
- package/dist/components/ui/Button.d.ts.map +1 -0
- package/dist/components/ui/Checkbox.d.ts +16 -0
- package/dist/components/ui/Checkbox.d.ts.map +1 -0
- package/dist/components/ui/DropdownMenu.d.ts +30 -0
- package/dist/components/ui/DropdownMenu.d.ts.map +1 -0
- package/dist/components/ui/FileUpload.d.ts +27 -0
- package/dist/components/ui/FileUpload.d.ts.map +1 -0
- package/dist/components/ui/IconButton.d.ts +34 -0
- package/dist/components/ui/IconButton.d.ts.map +1 -0
- package/dist/components/ui/Input.d.ts +21 -0
- package/dist/components/ui/Input.d.ts.map +1 -0
- package/dist/components/ui/LanguageSwitcher.d.ts +11 -0
- package/dist/components/ui/LanguageSwitcher.d.ts.map +1 -0
- package/dist/components/ui/Pagination.d.ts +36 -0
- package/dist/components/ui/Pagination.d.ts.map +1 -0
- package/dist/components/ui/Popover.d.ts +18 -0
- package/dist/components/ui/Popover.d.ts.map +1 -0
- package/dist/components/ui/ProgressBar.d.ts +30 -0
- package/dist/components/ui/ProgressBar.d.ts.map +1 -0
- package/dist/components/ui/RadioGroup.d.ts +45 -0
- package/dist/components/ui/RadioGroup.d.ts.map +1 -0
- package/dist/components/ui/Select.d.ts +15 -0
- package/dist/components/ui/Select.d.ts.map +1 -0
- package/dist/components/ui/Spinner.d.ts +19 -0
- package/dist/components/ui/Spinner.d.ts.map +1 -0
- package/dist/components/ui/Switch.d.ts +12 -0
- package/dist/components/ui/Switch.d.ts.map +1 -0
- package/dist/components/ui/Tabs.d.ts +36 -0
- package/dist/components/ui/Tabs.d.ts.map +1 -0
- package/dist/components/ui/Textarea.d.ts +18 -0
- package/dist/components/ui/Textarea.d.ts.map +1 -0
- package/dist/components/ui/ThemeToggle.d.ts +16 -0
- package/dist/components/ui/ThemeToggle.d.ts.map +1 -0
- package/dist/components/ui/Tooltip.d.ts +16 -0
- package/dist/components/ui/Tooltip.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +21 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/hooks/useAuth.d.ts +33 -0
- package/dist/hooks/useAuth.d.ts.map +1 -0
- package/dist/hooks/useLanguage.d.ts +14 -0
- package/dist/hooks/useLanguage.d.ts.map +1 -0
- package/dist/hooks/useTheme.d.ts +21 -0
- package/dist/hooks/useTheme.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +3 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/lib.d.ts +11 -0
- package/dist/lib.d.ts.map +1 -0
- package/dist/poesis.js +477 -278
- package/dist/poesis.js.map +1 -1
- package/dist/routes/types.d.ts +39 -0
- package/dist/routes/types.d.ts.map +1 -0
- package/dist/theme/reactSelectStyles.d.ts +12 -0
- package/dist/theme/reactSelectStyles.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
|
+
export interface CheckboxProps extends Omit<ComponentPropsWithoutRef<"input">, "type"> {
|
|
3
|
+
/** Label displayed next to the checkbox. */
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
/** Put the checkbox in an indeterminate state. */
|
|
6
|
+
indeterminate?: boolean;
|
|
7
|
+
/** Helper text below the label. */
|
|
8
|
+
helperText?: string;
|
|
9
|
+
/** Error message — replaces helper text and triggers error styling. */
|
|
10
|
+
error?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Custom-styled checkbox with indeterminate support.
|
|
14
|
+
*/
|
|
15
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
16
|
+
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAMH,KAAK,wBAAwB,EAC7B,KAAK,SAAS,EACjB,MAAM,OAAO,CAAC;AAEf,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAClF,4CAA4C;IAC5C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kDAAkD;IAClD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,4GAmFnB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type Placement } from "@floating-ui/react";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
export interface DropdownMenuProps {
|
|
4
|
+
/** The trigger element that opens the menu. */
|
|
5
|
+
trigger: ReactNode;
|
|
6
|
+
/** Menu items. Use `DropdownItem` and `DropdownDivider`. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/** Preferred placement of the floating menu. @default "bottom-start" */
|
|
9
|
+
placement?: Placement;
|
|
10
|
+
/** Additional CSS classes on the menu panel. */
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DropdownItemProps {
|
|
14
|
+
/** Item label or content. */
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
/** Optional icon rendered before the label. */
|
|
17
|
+
icon?: ReactNode;
|
|
18
|
+
/** Danger / destructive styling. */
|
|
19
|
+
danger?: boolean;
|
|
20
|
+
/** Whether the item is disabled. */
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/** Click handler. */
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
/** Additional CSS classes. */
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function DropdownDivider(): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const DropdownItem: import("react").ForwardRefExoticComponent<DropdownItemProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
29
|
+
export declare function DropdownMenu({ trigger, children, placement, className, }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=DropdownMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAMH,KAAK,SAAS,EAQjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGH,KAAK,SAAS,EAKjB,MAAM,OAAO,CAAC;AAIf,MAAM,WAAW,iBAAiB;IAC9B,+CAA+C;IAC/C,OAAO,EAAE,SAAS,CAAC;IACnB,4DAA4D;IAC5D,QAAQ,EAAE,SAAS,CAAC;IACpB,wEAAwE;IACxE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAC9B,6BAA6B;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oCAAoC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAkBD,wBAAgB,eAAe,4CAE9B;AAID,eAAO,MAAM,YAAY,iHAoCvB,CAAC;AAIH,wBAAgB,YAAY,CAAC,EACzB,OAAO,EACP,QAAQ,EACR,SAA0B,EAC1B,SAAc,GACjB,EAAE,iBAAiB,2CAgEnB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface FileUploadProps {
|
|
3
|
+
/** Accepted file types (e.g. `"image/*,.pdf"`). Maps to the `<input accept>` attribute. */
|
|
4
|
+
accept?: string;
|
|
5
|
+
/** Allow selecting multiple files. */
|
|
6
|
+
multiple?: boolean;
|
|
7
|
+
/** Maximum file size in bytes. Files exceeding this are rejected silently via `onReject`. */
|
|
8
|
+
maxSize?: number;
|
|
9
|
+
/** Callback fired with accepted files after drop or selection. */
|
|
10
|
+
onFilesSelected?: (files: File[]) => void;
|
|
11
|
+
/** Callback fired with rejected files (wrong type or over `maxSize`). */
|
|
12
|
+
onReject?: (files: File[]) => void;
|
|
13
|
+
/** Disable the dropzone. */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Label text shown inside the dropzone. */
|
|
16
|
+
label?: string;
|
|
17
|
+
/** Helper text shown below the label (e.g. "PDF, PNG, up to 10 MB"). */
|
|
18
|
+
helperText?: string;
|
|
19
|
+
/** Error message. When set, the border turns red. */
|
|
20
|
+
error?: string;
|
|
21
|
+
/** Custom illustration / icon rendered above the label. */
|
|
22
|
+
illustration?: ReactNode;
|
|
23
|
+
/** Additional class names on the outer wrapper. */
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function FileUpload({ accept, multiple, maxSize, onFilesSelected, onReject, disabled, label, helperText, error, illustration, className, }: FileUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=FileUpload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../../src/components/ui/FileUpload.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,KAAK,SAAS,EAIjB,MAAM,OAAO,CAAC;AAGf,MAAM,WAAW,eAAe;IAC5B,2FAA2F;IAC3F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6FAA6F;IAC7F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IAC1C,yEAAyE;IACzE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACnC,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAQD,wBAAgB,UAAU,CAAC,EACvB,MAAM,EACN,QAAgB,EAChB,OAAO,EACP,eAAe,EACf,QAAQ,EACR,QAAgB,EAChB,KAA4C,EAC5C,UAAU,EACV,KAAK,EACL,YAAY,EACZ,SAAc,GACjB,EAAE,eAAe,2CAyLjB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
|
+
declare const variantClasses: {
|
|
3
|
+
readonly primary: "bg-primary text-white hover:bg-primary-hover focus-visible:ring-primary";
|
|
4
|
+
readonly secondary: "border border-border text-text-primary bg-bg-primary hover:bg-bg-tertiary focus-visible:ring-primary";
|
|
5
|
+
readonly ghost: "text-text-primary hover:bg-bg-tertiary focus-visible:ring-primary";
|
|
6
|
+
readonly danger: "bg-error text-white hover:opacity-90 focus-visible:ring-error";
|
|
7
|
+
};
|
|
8
|
+
declare const sizeClasses: {
|
|
9
|
+
readonly sm: "size-7 text-small";
|
|
10
|
+
readonly md: "size-9 text-body";
|
|
11
|
+
readonly lg: "size-11 text-body";
|
|
12
|
+
};
|
|
13
|
+
export type IconButtonVariant = keyof typeof variantClasses;
|
|
14
|
+
export type IconButtonSize = keyof typeof sizeClasses;
|
|
15
|
+
export interface IconButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
16
|
+
/** Visual style variant. @default "ghost" */
|
|
17
|
+
variant?: IconButtonVariant;
|
|
18
|
+
/** Size preset. @default "md" */
|
|
19
|
+
size?: IconButtonSize;
|
|
20
|
+
/** Show a spinner and disable interaction. */
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
/** The icon element to render. */
|
|
23
|
+
icon: ReactNode;
|
|
24
|
+
/** Accessible label (required since there's no visible text). */
|
|
25
|
+
"aria-label": string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Square icon-only button for toolbar actions.
|
|
29
|
+
*
|
|
30
|
+
* `aria-label` is required to ensure accessibility.
|
|
31
|
+
*/
|
|
32
|
+
export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/components/ui/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAKlF,QAAA,MAAM,cAAc;;;;;CAMV,CAAC;AAEX,QAAA,MAAM,WAAW;;;;CAIP,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,cAAc,CAAC;AAC5D,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,WAAW,CAAC;AAEtD,MAAM,WAAW,eAAgB,SAAQ,wBAAwB,CAAC,QAAQ,CAAC;IACvE,6CAA6C;IAC7C,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,iCAAiC;IACjC,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kCAAkC;IAClC,IAAI,EAAE,SAAS,CAAC;IAChB,iEAAiE;IACjE,YAAY,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,+GA+BrB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
|
+
export interface InputProps extends Omit<ComponentPropsWithoutRef<"input">, "size"> {
|
|
3
|
+
/** Visible label above the input. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Helper text shown below the input. */
|
|
6
|
+
helperText?: string;
|
|
7
|
+
/** Error message — replaces helper text and triggers error styling. */
|
|
8
|
+
error?: string;
|
|
9
|
+
/** Icon or element rendered inside the input on the left. */
|
|
10
|
+
leftIcon?: ReactNode;
|
|
11
|
+
/** Icon or element rendered inside the input on the right. */
|
|
12
|
+
rightIcon?: ReactNode;
|
|
13
|
+
/** Input size variant. */
|
|
14
|
+
inputSize?: "sm" | "md" | "lg";
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Text input with label, helper text, error state, and icon slots.
|
|
18
|
+
* Supports text, email, password, and search types.
|
|
19
|
+
*/
|
|
20
|
+
export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
21
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzF,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC/E,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAClC;AA0BD;;;GAGG;AACH,eAAO,MAAM,KAAK,yGA+EhB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface LanguageSwitcherProps {
|
|
2
|
+
/** Additional CSS classes. */
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Pill-style toggle for switching between EN and FR.
|
|
7
|
+
*
|
|
8
|
+
* Designed to sit inside the TopNav `actions` slot.
|
|
9
|
+
*/
|
|
10
|
+
export declare function LanguageSwitcher({ className }: LanguageSwitcherProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=LanguageSwitcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LanguageSwitcher.d.ts","sourceRoot":"","sources":["../../../src/components/ui/LanguageSwitcher.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,qBAAqB;IAClC,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAOD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,SAAc,EAAE,EAAE,qBAAqB,2CAoCzE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
+
declare const sizeClasses: {
|
|
3
|
+
readonly sm: "h-7 min-w-7 px-1.5 text-small";
|
|
4
|
+
readonly md: "h-9 min-w-9 px-2 text-body";
|
|
5
|
+
readonly lg: "h-11 min-w-11 px-3 text-body";
|
|
6
|
+
};
|
|
7
|
+
export type PaginationSize = keyof typeof sizeClasses;
|
|
8
|
+
export interface PaginationProps extends Omit<ComponentPropsWithoutRef<"nav">, "onChange" | "children"> {
|
|
9
|
+
/** Total number of pages (≥ 1). */
|
|
10
|
+
totalPages: number;
|
|
11
|
+
/** Current page (controlled). 1-based. */
|
|
12
|
+
page?: number;
|
|
13
|
+
/** Default page (uncontrolled). 1-based. @default 1 */
|
|
14
|
+
defaultPage?: number;
|
|
15
|
+
/** Callback when page changes. */
|
|
16
|
+
onChange?: (page: number) => void;
|
|
17
|
+
/** Number of pages to show on each side of current page. @default 1 */
|
|
18
|
+
siblingCount?: number;
|
|
19
|
+
/** Number of pages always shown at start and end. @default 1 */
|
|
20
|
+
boundaryCount?: number;
|
|
21
|
+
/** Show first/last page jump buttons. @default false */
|
|
22
|
+
showFirstLast?: boolean;
|
|
23
|
+
/** Size preset. @default "md" */
|
|
24
|
+
size?: PaginationSize;
|
|
25
|
+
/** Disable all interaction. */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Page navigation with ellipsis truncation, prev/next buttons,
|
|
30
|
+
* and optional first/last jump buttons.
|
|
31
|
+
*
|
|
32
|
+
* Supports controlled (`page`/`onChange`) and uncontrolled (`defaultPage`) usage.
|
|
33
|
+
*/
|
|
34
|
+
export declare const Pagination: import("react").ForwardRefExoticComponent<PaginationProps & import("react").RefAttributes<HTMLElement>>;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=Pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAqC,MAAM,OAAO,CAAC;AAWzF,QAAA,MAAM,WAAW;;;;CAIP,CAAC;AAIX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,WAAW,CAAC;AAItD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IACnG,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iCAAiC;IACjC,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAkED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,yGAiKrB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Placement } from "@floating-ui/react";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
export interface PopoverProps {
|
|
4
|
+
/** The trigger element that toggles the popover. */
|
|
5
|
+
trigger: ReactNode;
|
|
6
|
+
/** Popover body content. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/** Preferred placement. @default "bottom" */
|
|
9
|
+
placement?: Placement;
|
|
10
|
+
/** Whether the popover is controlled externally. */
|
|
11
|
+
open?: boolean;
|
|
12
|
+
/** Callback when open state changes (controlled mode). */
|
|
13
|
+
onOpenChange?: (open: boolean) => void;
|
|
14
|
+
/** Additional CSS classes on the popover panel. */
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function Popover({ trigger, children, placement, open: controlledOpen, onOpenChange, className, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=Popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAMH,KAAK,SAAS,EAOjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAIjD,MAAM,WAAW,YAAY;IACzB,oDAAoD;IACpD,OAAO,EAAE,SAAS,CAAC;IACnB,4BAA4B;IAC5B,QAAQ,EAAE,SAAS,CAAC;IACpB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0DAA0D;IAC1D,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAID,wBAAgB,OAAO,CAAC,EACpB,OAAO,EACP,QAAQ,EACR,SAAoB,EACpB,IAAI,EAAE,cAAc,EACpB,YAAY,EACZ,SAAc,GACjB,EAAE,YAAY,2CAiDd"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
+
declare const sizeClasses: {
|
|
3
|
+
readonly sm: "h-1.5";
|
|
4
|
+
readonly md: "h-2.5";
|
|
5
|
+
readonly lg: "h-4";
|
|
6
|
+
};
|
|
7
|
+
declare const variantClasses: {
|
|
8
|
+
readonly primary: "bg-primary";
|
|
9
|
+
readonly success: "bg-success";
|
|
10
|
+
readonly warning: "bg-warning";
|
|
11
|
+
readonly error: "bg-error";
|
|
12
|
+
readonly info: "bg-info";
|
|
13
|
+
};
|
|
14
|
+
export type ProgressBarSize = keyof typeof sizeClasses;
|
|
15
|
+
export type ProgressBarVariant = keyof typeof variantClasses;
|
|
16
|
+
export interface ProgressBarProps extends Omit<ComponentPropsWithoutRef<"div">, "role"> {
|
|
17
|
+
/** Current progress value (0–100). Clamped internally. */
|
|
18
|
+
value: number;
|
|
19
|
+
/** Visual color variant. */
|
|
20
|
+
variant?: ProgressBarVariant;
|
|
21
|
+
/** Height of the bar. */
|
|
22
|
+
size?: ProgressBarSize;
|
|
23
|
+
/** Show the percentage label next to the bar. */
|
|
24
|
+
showLabel?: boolean;
|
|
25
|
+
/** Override the label text. Receives the clamped value. */
|
|
26
|
+
formatLabel?: (value: number) => string;
|
|
27
|
+
}
|
|
28
|
+
export declare const ProgressBar: import("react").ForwardRefExoticComponent<ProgressBarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=ProgressBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAc,MAAM,OAAO,CAAC;AAElE,QAAA,MAAM,WAAW;;;;CAIP,CAAC;AAEX,QAAA,MAAM,cAAc;;;;;;CAMV,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,WAAW,CAAC;AACvD,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,cAAc,CAAC;AAE7D,MAAM,WAAW,gBACb,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACrD,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,yBAAyB;IACzB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC3C;AAED,eAAO,MAAM,WAAW,6GAgDvB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface RadioGroupProps {
|
|
3
|
+
/** Group name for all radio inputs. */
|
|
4
|
+
name?: string;
|
|
5
|
+
/** Currently selected value (controlled). */
|
|
6
|
+
value?: string;
|
|
7
|
+
/** Default selected value (uncontrolled). */
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
/** Called when the selected value changes. */
|
|
10
|
+
onChange?: (value: string) => void;
|
|
11
|
+
/** Visible label for the group. */
|
|
12
|
+
label?: string;
|
|
13
|
+
/** Helper text below the group. */
|
|
14
|
+
helperText?: string;
|
|
15
|
+
/** Error message — replaces helper text and triggers error styling. */
|
|
16
|
+
error?: string;
|
|
17
|
+
/** Layout direction. */
|
|
18
|
+
orientation?: "vertical" | "horizontal";
|
|
19
|
+
/** Disable all options. */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Radio items. */
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Radio group with vertical or horizontal layout.
|
|
27
|
+
* Use `RadioGroup.Item` for individual options.
|
|
28
|
+
*/
|
|
29
|
+
export declare function RadioGroup({ name: nameProp, value, onChange, label, helperText, error, orientation, disabled, children, className, }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare namespace RadioGroup {
|
|
31
|
+
var Item: typeof RadioItem;
|
|
32
|
+
}
|
|
33
|
+
export interface RadioItemProps {
|
|
34
|
+
/** Value for this option. */
|
|
35
|
+
value: string;
|
|
36
|
+
/** Label displayed next to the radio. */
|
|
37
|
+
label: ReactNode;
|
|
38
|
+
/** Description shown below the label. */
|
|
39
|
+
description?: string;
|
|
40
|
+
/** Disable only this option. */
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
}
|
|
43
|
+
declare function RadioItem({ value, label, description, disabled: itemDisabled }: RadioItemProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=RadioGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/ui/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAsBzE,MAAM,WAAW,eAAe;IAC5B,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EACvB,IAAI,EAAE,QAAQ,EACd,KAAK,EACL,QAAQ,EACR,KAAK,EACL,UAAU,EACV,KAAK,EACL,WAAwB,EACxB,QAAgB,EAChB,QAAQ,EACR,SAAc,GACjB,EAAE,eAAe,2CAsCjB;yBAjDe,UAAU;;;AAqD1B,MAAM,WAAW,cAAc;IAC3B,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,KAAK,EAAE,SAAS,CAAC;IACjB,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,iBAAS,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,cAAc,2CA6CvF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type GroupBase, type Props } from "react-select";
|
|
2
|
+
export interface SelectProps<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> extends Props<Option, IsMulti, Group> {
|
|
3
|
+
/** Visible label above the select. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Helper text shown below the select. */
|
|
6
|
+
helperText?: string;
|
|
7
|
+
/** Error message — replaces helper text and triggers error styling. */
|
|
8
|
+
error?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Wrapper around react-select pre-configured with the EPFL design system theme.
|
|
12
|
+
* Accepts all react-select props plus label, helperText, and error.
|
|
13
|
+
*/
|
|
14
|
+
export declare function Select<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ label, helperText, error, className, ...rest }: SelectProps<Option, IsMulti, Group>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Select.tsx"],"names":[],"mappings":"AACA,OAAoB,EAAyB,KAAK,SAAS,EAAE,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAG9F,MAAM,WAAW,WAAW,CACxB,MAAM,GAAG,OAAO,EAChB,OAAO,SAAS,OAAO,GAAG,KAAK,EAC/B,KAAK,SAAS,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,CACrD,SAAQ,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;IACnC,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAClB,MAAM,GAAG,OAAO,EAChB,OAAO,SAAS,OAAO,GAAG,KAAK,EAC/B,KAAK,SAAS,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,EACrD,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAc,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,2CAiD3F"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
declare const sizeMap: {
|
|
3
|
+
readonly sm: "size-4";
|
|
4
|
+
readonly md: "size-6";
|
|
5
|
+
readonly lg: "size-8";
|
|
6
|
+
};
|
|
7
|
+
export type SpinnerSize = keyof typeof sizeMap;
|
|
8
|
+
export interface SpinnerProps extends ComponentPropsWithoutRef<"svg"> {
|
|
9
|
+
/** Visual size of the spinner. @default "md" */
|
|
10
|
+
size?: SpinnerSize;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Animated loading indicator.
|
|
14
|
+
*
|
|
15
|
+
* Inherits `currentColor` so it adapts to its parent's text color.
|
|
16
|
+
*/
|
|
17
|
+
export declare function Spinner({ size, className, ...rest }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAEtD,QAAA,MAAM,OAAO;;;;CAIH,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,OAAO,CAAC;AAE/C,MAAM,WAAW,YAAa,SAAQ,wBAAwB,CAAC,KAAK,CAAC;IACjE,gDAAgD;IAChD,IAAI,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,EAAE,IAAW,EAAE,SAAc,EAAE,GAAG,IAAI,EAAE,EAAE,YAAY,2CA0B7E"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
|
+
export interface SwitchProps extends Omit<ComponentPropsWithoutRef<"input">, "type"> {
|
|
3
|
+
/** Label displayed next to the switch. */
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
/** Helper text below the switch. */
|
|
6
|
+
helperText?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Toggle switch with label. Uses a hidden checkbox for accessibility.
|
|
10
|
+
*/
|
|
11
|
+
export declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
12
|
+
//# sourceMappingURL=Switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzF,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAChF,0CAA0C;IAC1C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,oCAAoC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,0GA4DjB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface TabItem {
|
|
3
|
+
/** Unique key for the tab. */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Label displayed in the tab button. */
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
/** Optional icon before the label. */
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
/** Whether the tab is disabled. */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface TabsProps {
|
|
13
|
+
/** Tab definitions. */
|
|
14
|
+
items: TabItem[];
|
|
15
|
+
/** The currently active tab value (controlled). */
|
|
16
|
+
value?: string;
|
|
17
|
+
/** Default active tab (uncontrolled). */
|
|
18
|
+
defaultValue?: string;
|
|
19
|
+
/** Callback when the active tab changes. */
|
|
20
|
+
onChange?: (value: string) => void;
|
|
21
|
+
/** Tab panel content — keyed by tab value. */
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
/** Additional CSS classes on the root. */
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface TabPanelProps {
|
|
27
|
+
/** Must match a `TabItem.value`. */
|
|
28
|
+
value: string;
|
|
29
|
+
/** Panel content. */
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
/** Additional CSS classes. */
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function TabPanel({ value, children, className }: TabPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare function Tabs({ items, value: controlledValue, defaultValue, onChange, children, className, }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
//# sourceMappingURL=Tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,KAAK,SAAS,EAMjB,MAAM,OAAO,CAAC;AAIf,MAAM,WAAW,OAAO;IACpB,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,KAAK,EAAE,SAAS,CAAC;IACjB,sCAAsC;IACtC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACtB,uBAAuB;IACvB,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC1B,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAWD,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAc,EAAE,EAAE,aAAa,2CAgB1E;AAID,wBAAgB,IAAI,CAAC,EACjB,KAAK,EACL,KAAK,EAAE,eAAe,EACtB,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,SAAc,GACjB,EAAE,SAAS,2CA6GX"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
+
export interface TextareaProps extends ComponentPropsWithoutRef<"textarea"> {
|
|
3
|
+
/** Visible label above the textarea. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Helper text shown below the textarea. */
|
|
6
|
+
helperText?: string;
|
|
7
|
+
/** Error message — replaces helper text and triggers error styling. */
|
|
8
|
+
error?: string;
|
|
9
|
+
/** Automatically grow height to fit content. */
|
|
10
|
+
autoGrow?: boolean;
|
|
11
|
+
/** Minimum number of visible rows (default: 3). */
|
|
12
|
+
minRows?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Textarea with label, helper text, error state, and optional auto-grow.
|
|
16
|
+
*/
|
|
17
|
+
export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
18
|
+
//# sourceMappingURL=Textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAMH,KAAK,wBAAwB,EAChC,MAAM,OAAO,CAAC;AAEf,MAAM,WAAW,aAAc,SAAQ,wBAAwB,CAAC,UAAU,CAAC;IACvE,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,+GAuFnB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type IconButtonSize, type IconButtonVariant } from "./IconButton";
|
|
2
|
+
export interface ThemeToggleProps {
|
|
3
|
+
/** Visual style. @default "ghost" */
|
|
4
|
+
variant?: IconButtonVariant;
|
|
5
|
+
/** Size preset. @default "md" */
|
|
6
|
+
size?: IconButtonSize;
|
|
7
|
+
/** Additional CSS classes. */
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Sun/moon icon button that toggles between light and dark mode.
|
|
12
|
+
*
|
|
13
|
+
* Designed to sit inside the TopNav `actions` slot.
|
|
14
|
+
*/
|
|
15
|
+
export declare function ThemeToggle({ variant, size, className }: ThemeToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=ThemeToggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeToggle.d.ts","sourceRoot":"","sources":["../../../src/components/ui/ThemeToggle.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEvF,MAAM,WAAW,gBAAgB;IAC7B,qCAAqC;IACrC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,iCAAiC;IACjC,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAiB,EAAE,IAAW,EAAE,SAAS,EAAE,EAAE,gBAAgB,2CAc1F"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type TooltipPlacement = "top" | "bottom" | "left" | "right";
|
|
3
|
+
export interface TooltipProps {
|
|
4
|
+
/** The element the tooltip is anchored to. */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Tooltip text. */
|
|
7
|
+
content: ReactNode;
|
|
8
|
+
/** Placement relative to the trigger. @default "top" */
|
|
9
|
+
placement?: TooltipPlacement;
|
|
10
|
+
/** Delay in ms before showing. @default 200 */
|
|
11
|
+
delay?: number;
|
|
12
|
+
/** Additional CSS classes on the tooltip. */
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function Tooltip({ children, content, placement, delay, className, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Tooltip.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,OAAO,CAAC;AAIzD,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnE,MAAM,WAAW,YAAY;IACzB,8CAA8C;IAC9C,QAAQ,EAAE,SAAS,CAAC;IACpB,oBAAoB;IACpB,OAAO,EAAE,SAAS,CAAC;IACnB,wDAAwD;IACxD,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAaD,wBAAgB,OAAO,CAAC,EACpB,QAAQ,EACR,OAAO,EACP,SAAiB,EACjB,KAAW,EACX,SAAc,GACjB,EAAE,YAAY,2CA2Ed"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { Avatar, type AvatarProps, type AvatarSize } from "./Avatar";
|
|
2
|
+
export { Badge, type BadgeColor, type BadgeProps } from "./Badge";
|
|
3
|
+
export { Button, type ButtonProps, type ButtonSize, type ButtonVariant } from "./Button";
|
|
4
|
+
export { IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant } from "./IconButton";
|
|
5
|
+
export { Pagination, type PaginationProps, type PaginationSize } from "./Pagination";
|
|
6
|
+
export { Spinner, type SpinnerProps, type SpinnerSize } from "./Spinner";
|
|
7
|
+
export { FileUpload, type FileUploadProps } from "./FileUpload";
|
|
8
|
+
export { ProgressBar, type ProgressBarProps, type ProgressBarSize, type ProgressBarVariant } from "./ProgressBar";
|
|
9
|
+
export { Checkbox, type CheckboxProps } from "./Checkbox";
|
|
10
|
+
export { Input, type InputProps } from "./Input";
|
|
11
|
+
export { RadioGroup, type RadioGroupProps, type RadioItemProps } from "./RadioGroup";
|
|
12
|
+
export { Select, type SelectProps } from "./Select";
|
|
13
|
+
export { Switch, type SwitchProps } from "./Switch";
|
|
14
|
+
export { Textarea, type TextareaProps } from "./Textarea";
|
|
15
|
+
export { DropdownDivider, DropdownItem, DropdownMenu, type DropdownItemProps, type DropdownMenuProps } from "./DropdownMenu";
|
|
16
|
+
export { Popover, type PopoverProps } from "./Popover";
|
|
17
|
+
export { TabPanel, Tabs, type TabItem, type TabPanelProps, type TabsProps } from "./Tabs";
|
|
18
|
+
export { Tooltip, type TooltipPlacement, type TooltipProps } from "./Tooltip";
|
|
19
|
+
export { LanguageSwitcher, type LanguageSwitcherProps } from "./LanguageSwitcher";
|
|
20
|
+
export { ThemeToggle, type ThemeToggleProps } from "./ThemeToggle";
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AACzF,OAAO,EACH,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AACrF,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EACH,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EAC1B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAG1D,OAAO,EACH,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9E,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { AppRole } from "../routes/types";
|
|
3
|
+
export interface AuthUser {
|
|
4
|
+
name: string;
|
|
5
|
+
email: string;
|
|
6
|
+
role: AppRole;
|
|
7
|
+
avatarUrl?: string;
|
|
8
|
+
}
|
|
9
|
+
interface AuthContextValue {
|
|
10
|
+
user: AuthUser;
|
|
11
|
+
setRole: (role: AppRole) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface AuthProviderProps {
|
|
14
|
+
/** Override initial user (useful for stories). */
|
|
15
|
+
initialUser?: AuthUser;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Mock auth provider — supplies a user with a switchable role.
|
|
20
|
+
*
|
|
21
|
+
* In production this would be replaced by a real auth layer.
|
|
22
|
+
*/
|
|
23
|
+
export declare function AuthProvider({ initialUser, children }: AuthProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* Access the current authenticated user and role setter.
|
|
26
|
+
*
|
|
27
|
+
* ```tsx
|
|
28
|
+
* const { user, setRole } = useAuth();
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function useAuth(): AuthContextValue;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=useAuth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../src/hooks/useAuth.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAI/C,MAAM,WAAW,QAAQ;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAID,UAAU,gBAAgB;IACtB,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC;AAYD,MAAM,WAAW,iBAAiB;IAC9B,kDAAkD;IAClD,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,WAA0B,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAQvF;AAID;;;;;;GAMG;AACH,wBAAgB,OAAO,IAAI,gBAAgB,CAI1C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type Language = "en" | "fr";
|
|
2
|
+
/**
|
|
3
|
+
* Hook providing the current language and a toggle / setter.
|
|
4
|
+
*
|
|
5
|
+
* ```tsx
|
|
6
|
+
* const { language, toggleLanguage, setLanguage } = useLanguage();
|
|
7
|
+
* ```
|
|
8
|
+
*/
|
|
9
|
+
export declare function useLanguage(): {
|
|
10
|
+
readonly language: Language;
|
|
11
|
+
readonly toggleLanguage: () => void;
|
|
12
|
+
readonly setLanguage: (lng: Language) => void;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useLanguage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLanguage.d.ts","sourceRoot":"","sources":["../../src/hooks/useLanguage.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnC;;;;;;GAMG;AACH,wBAAgB,WAAW;;;gCAMb,QAAQ;EAWrB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type Theme = "light" | "dark";
|
|
2
|
+
/**
|
|
3
|
+
* Initialise theme from localStorage or system preference.
|
|
4
|
+
* Call once at app startup (e.g. in main.tsx or a top-level effect).
|
|
5
|
+
*/
|
|
6
|
+
export declare function initTheme(): void;
|
|
7
|
+
/**
|
|
8
|
+
* Hook providing the current theme and a toggle function.
|
|
9
|
+
*
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const { theme, toggleTheme } = useTheme();
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare function useTheme(): {
|
|
15
|
+
readonly theme: Theme;
|
|
16
|
+
readonly toggleTheme: () => void;
|
|
17
|
+
readonly setTheme: (t: Theme) => void;
|
|
18
|
+
readonly isDark: boolean;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=useTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.ts"],"names":[],"mappings":"AAGA,KAAK,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC;AAmC9B;;;GAGG;AACH,wBAAgB,SAAS,SAQxB;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ;;;2BAmBa,KAAK;;EAKzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,SAAS,CAAC;AA8B3B,eAAe,IAAI,CAAC"}
|