@epfl-sti/poesis 0.1.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/LICENSE +217 -0
- package/README.md +204 -0
- 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 +47 -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 +24 -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/PageShell.d.ts +32 -0
- package/dist/components/layout/PageShell.d.ts.map +1 -0
- package/dist/components/layout/SideNav.d.ts +22 -0
- package/dist/components/layout/SideNav.d.ts.map +1 -0
- package/dist/components/layout/TopNav.d.ts +24 -0
- package/dist/components/layout/TopNav.d.ts.map +1 -0
- package/dist/components/layout/index.d.ts +10 -0
- package/dist/components/layout/index.d.ts.map +1 -0
- package/dist/components/layout/types.d.ts +31 -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/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/Popover.d.ts +18 -0
- package/dist/components/ui/Popover.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 +18 -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 +1870 -0
- package/dist/poesis.js.map +1 -0
- 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 +98 -0
|
@@ -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,18 @@
|
|
|
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 { Spinner, type SpinnerProps, type SpinnerSize } from "./Spinner";
|
|
6
|
+
export { Checkbox, type CheckboxProps } from "./Checkbox";
|
|
7
|
+
export { Input, type InputProps } from "./Input";
|
|
8
|
+
export { RadioGroup, type RadioGroupProps, type RadioItemProps } from "./RadioGroup";
|
|
9
|
+
export { Select, type SelectProps } from "./Select";
|
|
10
|
+
export { Switch, type SwitchProps } from "./Switch";
|
|
11
|
+
export { Textarea, type TextareaProps } from "./Textarea";
|
|
12
|
+
export { DropdownDivider, DropdownItem, DropdownMenu, type DropdownItemProps, type DropdownMenuProps, } from "./DropdownMenu";
|
|
13
|
+
export { Popover, type PopoverProps } from "./Popover";
|
|
14
|
+
export { TabPanel, Tabs, type TabItem, type TabPanelProps, type TabsProps } from "./Tabs";
|
|
15
|
+
export { Tooltip, type TooltipPlacement, type TooltipProps } from "./Tooltip";
|
|
16
|
+
export { LanguageSwitcher, type LanguageSwitcherProps } from "./LanguageSwitcher";
|
|
17
|
+
export { ThemeToggle, type ThemeToggleProps } from "./ThemeToggle";
|
|
18
|
+
//# 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,GACzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAGzE,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,GACzB,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"}
|
package/dist/lib.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./index.css";
|
|
2
|
+
export { Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeColor, type BadgeProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Checkbox, type CheckboxProps, DropdownDivider, DropdownItem, type DropdownItemProps, DropdownMenu, type DropdownMenuProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, Input, type InputProps, LanguageSwitcher, type LanguageSwitcherProps, Popover, type PopoverProps, RadioGroup, type RadioGroupProps, type RadioItemProps, Select, type SelectProps, Spinner, type SpinnerProps, type SpinnerSize, Switch, type SwitchProps, TabPanel, type TabItem, type TabPanelProps, Tabs, type TabsProps, Textarea, type TextareaProps, ThemeToggle, type ThemeToggleProps, Tooltip, type TooltipPlacement, type TooltipProps, } from "./components/ui";
|
|
3
|
+
export { BurgerDrawer, type BurgerDrawerProps, PageShell, type PageShellProps, SideNav, type SideNavProps, TopNav, type TopNavProps, type IconComponent, type NavCategory, type NavLink, type NavSection, type NavigationConfig, } from "./components/layout";
|
|
4
|
+
export { Card, type CardProps, DescriptionList, type DescriptionItem, type DescriptionListLayout, type DescriptionListProps, EmptyState, type EmptyStateProps, Table, type SortDirection, type SortState, type TableColumn, type TableProps, } from "./components/data-display";
|
|
5
|
+
export { Alert, type AlertProps, type AlertVariant, ConfirmDialog, type ConfirmDialogProps, Dialog, type DialogProps, type DialogSize, ToastProvider, useToast, type ToastData, type ToastVariant, } from "./components/feedback";
|
|
6
|
+
export { useTheme, initTheme } from "./hooks/useTheme";
|
|
7
|
+
export { useLanguage, type Language } from "./hooks/useLanguage";
|
|
8
|
+
export { useAuth, AuthProvider, type AuthUser, type AuthProviderProps } from "./hooks/useAuth";
|
|
9
|
+
export { epflSelectTheme, epflSelectClassNames } from "./theme/reactSelectStyles";
|
|
10
|
+
export type { AppRole, RouteMeta, AppRoute, CategoryDef } from "./routes/types";
|
|
11
|
+
//# sourceMappingURL=lib.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAKA,OAAO,aAAa,CAAC;AAGrB,OAAO,EACH,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,QAAQ,EACR,KAAK,aAAa,EAClB,eAAe,EACf,YAAY,EACZ,KAAK,iBAAiB,EACtB,YAAY,EACZ,KAAK,iBAAiB,EACtB,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,EACL,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,OAAO,EACP,KAAK,YAAY,EACjB,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,MAAM,EACN,KAAK,WAAW,EAChB,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,MAAM,EACN,KAAK,WAAW,EAChB,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,IAAI,EACJ,KAAK,SAAS,EACd,QAAQ,EACR,KAAK,aAAa,EAClB,WAAW,EACX,KAAK,gBAAgB,EACrB,OAAO,EACP,KAAK,gBAAgB,EACrB,KAAK,YAAY,GACpB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACH,YAAY,EACZ,KAAK,iBAAiB,EACtB,SAAS,EACT,KAAK,cAAc,EACnB,OAAO,EACP,KAAK,YAAY,EACjB,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,gBAAgB,GACxB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACH,IAAI,EACJ,KAAK,SAAS,EACd,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,EACL,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,UAAU,GAClB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACH,KAAK,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,aAAa,EACb,KAAK,kBAAkB,EACvB,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,aAAa,EACb,QAAQ,EACR,KAAK,SAAS,EACd,KAAK,YAAY,GACpB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,QAAQ,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAG/F,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGlF,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|