@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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/feedback/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type ToastVariant = "success" | "warning" | "error" | "info";
|
|
2
|
+
export interface ToastData {
|
|
3
|
+
id: string;
|
|
4
|
+
variant: ToastVariant;
|
|
5
|
+
title?: string;
|
|
6
|
+
message: string;
|
|
7
|
+
/** Auto-dismiss duration in ms. 0 = persistent. Default: 5000 */
|
|
8
|
+
duration?: number;
|
|
9
|
+
}
|
|
10
|
+
export type AddToastInput = Omit<ToastData, "id">;
|
|
11
|
+
export interface ToastContextValue {
|
|
12
|
+
addToast: (toast: AddToastInput) => string;
|
|
13
|
+
removeToast: (id: string) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const ToastContext: import("react").Context<ToastContextValue | null>;
|
|
16
|
+
export declare function useToast(): ToastContextValue;
|
|
17
|
+
//# sourceMappingURL=toastContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toastContext.d.ts","sourceRoot":"","sources":["../../../src/components/feedback/toastContext.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEpE,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,YAAY,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAElD,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,MAAM,CAAC;IAC3C,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAID,eAAO,MAAM,YAAY,mDAAgD,CAAC;AAE1E,wBAAgB,QAAQ,IAAI,iBAAiB,CAI5C"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { NavCategory, NavSection } from "./types";
|
|
2
|
+
export interface BurgerDrawerProps {
|
|
3
|
+
/** Whether the drawer is open */
|
|
4
|
+
open: boolean;
|
|
5
|
+
/** Called to close the drawer */
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
/** Top-level categories */
|
|
8
|
+
categories?: NavCategory[];
|
|
9
|
+
/** Active category id */
|
|
10
|
+
activeCategoryId?: string;
|
|
11
|
+
/** Called when a category is selected */
|
|
12
|
+
onCategoryChange?: (id: string) => void;
|
|
13
|
+
/** Sections for the active category */
|
|
14
|
+
sections?: NavSection[];
|
|
15
|
+
/** Active link id */
|
|
16
|
+
activeLinkId?: string;
|
|
17
|
+
/** Called when a link is clicked */
|
|
18
|
+
onLinkClick?: (href: string) => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Mobile slide-over drawer that merges TopNav categories and SideNav links.
|
|
22
|
+
* Slides in from the left with a backdrop overlay.
|
|
23
|
+
*/
|
|
24
|
+
export declare function BurgerDrawer({ open, onClose, categories, activeCategoryId, onCategoryChange, sections, activeLinkId, onLinkClick, }: BurgerDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
//# sourceMappingURL=BurgerDrawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BurgerDrawer.d.ts","sourceRoot":"","sources":["../../../src/components/layout/BurgerDrawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IAC9B,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,iCAAiC;IACjC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,WAAW,EAAE,CAAC;IAC3B,yBAAyB;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,uCAAuC;IACvC,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC;IACxB,qBAAqB;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,UAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,QAAa,EACb,YAAY,EACZ,WAAW,GACd,EAAE,iBAAiB,2CAqHnB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { NavCategory, NavSection } from "./types";
|
|
3
|
+
export interface PageShellProps {
|
|
4
|
+
/** Page content */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Custom logo element for TopNav */
|
|
7
|
+
logo?: ReactNode;
|
|
8
|
+
/** Top-level categories */
|
|
9
|
+
categories?: NavCategory[];
|
|
10
|
+
/** Active category id */
|
|
11
|
+
activeCategoryId?: string;
|
|
12
|
+
/** Called when a category tab is clicked */
|
|
13
|
+
onCategoryChange?: (id: string) => void;
|
|
14
|
+
/** Sidebar sections for the active category */
|
|
15
|
+
sections?: NavSection[];
|
|
16
|
+
/** Active link id for sidebar highlight */
|
|
17
|
+
activeLinkId?: string;
|
|
18
|
+
/** Called when a sidebar link is clicked */
|
|
19
|
+
onLinkClick?: (href: string) => void;
|
|
20
|
+
/** Slot for TopNav right-side actions */
|
|
21
|
+
actions?: ReactNode;
|
|
22
|
+
/** Whether the sidebar is collapsed */
|
|
23
|
+
sideNavCollapsed?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Full application shell composing TopNav + SideNav + content area.
|
|
27
|
+
*
|
|
28
|
+
* - Desktop: fixed top bar + sidebar + scrollable main
|
|
29
|
+
* - Mobile: fixed top bar + burger drawer + full-width main
|
|
30
|
+
*/
|
|
31
|
+
export declare function PageShell({ children, logo, categories, activeCategoryId, onCategoryChange, sections, activeLinkId, onLinkClick, actions, sideNavCollapsed, }: PageShellProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
//# sourceMappingURL=PageShell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageShell.d.ts","sourceRoot":"","sources":["../../../src/components/layout/PageShell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIjD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEvD,MAAM,WAAW,cAAc;IAC3B,mBAAmB;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,WAAW,EAAE,CAAC;IAC3B,yBAAyB;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC;IACxB,2CAA2C;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,yCAAyC;IACzC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,uCAAuC;IACvC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACtB,QAAQ,EACR,IAAI,EACJ,UAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,QAAa,EACb,YAAY,EACZ,WAAW,EACX,OAAO,EACP,gBAAwB,GAC3B,EAAE,cAAc,2CAkDhB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { NavSection } from "./types";
|
|
2
|
+
export interface SideNavProps {
|
|
3
|
+
/** Grouped navigation sections for the active category */
|
|
4
|
+
sections?: NavSection[];
|
|
5
|
+
/** Currently active link id (for highlight) */
|
|
6
|
+
activeLinkId?: string;
|
|
7
|
+
/** Called when a link is clicked */
|
|
8
|
+
onLinkClick?: (href: string) => void;
|
|
9
|
+
/** Whether the sidebar is collapsed to icon-only mode */
|
|
10
|
+
collapsed?: boolean;
|
|
11
|
+
/** Called to toggle collapsed state */
|
|
12
|
+
onToggleCollapse?: () => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Sidebar navigation with grouped, collapsible sections.
|
|
16
|
+
*
|
|
17
|
+
* - 256px wide (or 64px collapsed)
|
|
18
|
+
* - Hidden on mobile (content moves into BurgerDrawer)
|
|
19
|
+
* - Fixed height, scrollable when content overflows
|
|
20
|
+
*/
|
|
21
|
+
export declare function SideNav({ sections, activeLinkId, onLinkClick, collapsed, }: SideNavProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=SideNav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SideNav.d.ts","sourceRoot":"","sources":["../../../src/components/layout/SideNav.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,YAAY;IACzB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC;IACxB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uCAAuC;IACvC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CACjC;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,EACpB,QAAa,EACb,YAAY,EACZ,WAAW,EACX,SAAiB,GACpB,EAAE,YAAY,2CAqBd"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { NavCategory } from "./types";
|
|
3
|
+
export interface TopNavProps {
|
|
4
|
+
/** EPFL logo or app name element */
|
|
5
|
+
logo?: ReactNode;
|
|
6
|
+
/** Top-level navigation categories */
|
|
7
|
+
categories?: NavCategory[];
|
|
8
|
+
/** Currently active category id */
|
|
9
|
+
activeCategoryId?: string;
|
|
10
|
+
/** Called when a category tab is clicked */
|
|
11
|
+
onCategoryChange?: (id: string) => void;
|
|
12
|
+
/** Slot for right-side actions (language switcher, theme toggle, avatar) */
|
|
13
|
+
actions?: ReactNode;
|
|
14
|
+
/** Called when the mobile burger button is clicked */
|
|
15
|
+
onBurgerClick?: () => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Fixed top navigation bar.
|
|
19
|
+
*
|
|
20
|
+
* Desktop: Logo + category tabs + actions.
|
|
21
|
+
* Mobile (<lg): Logo + burger + actions.
|
|
22
|
+
*/
|
|
23
|
+
export declare function TopNav({ logo, categories, activeCategoryId, onCategoryChange, actions, onBurgerClick, }: TopNavProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
//# sourceMappingURL=TopNav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TopNav.d.ts","sourceRoot":"","sources":["../../../src/components/layout/TopNav.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,WAAW,WAAW;IACxB,oCAAoC;IACpC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,sCAAsC;IACtC,UAAU,CAAC,EAAE,WAAW,EAAE,CAAC;IAC3B,mCAAmC;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,4EAA4E;IAC5E,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,EACnB,IAAI,EACJ,UAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,OAAO,EACP,aAAa,GAChB,EAAE,WAAW,2CAiDb"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { TopNav } from "./TopNav";
|
|
2
|
+
export type { TopNavProps } from "./TopNav";
|
|
3
|
+
export { SideNav } from "./SideNav";
|
|
4
|
+
export type { SideNavProps } from "./SideNav";
|
|
5
|
+
export { BurgerDrawer } from "./BurgerDrawer";
|
|
6
|
+
export type { BurgerDrawerProps } from "./BurgerDrawer";
|
|
7
|
+
export { PageShell } from "./PageShell";
|
|
8
|
+
export type { PageShellProps } from "./PageShell";
|
|
9
|
+
export type { IconComponent, NavCategory, NavLink, NavSection, NavigationConfig } from "./types";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ComponentType, SVGAttributes } from "react";
|
|
2
|
+
/** Bootstrap-icon component type from react-bootstrap-icons */
|
|
3
|
+
export type IconComponent = ComponentType<SVGAttributes<SVGElement> & {
|
|
4
|
+
size?: number;
|
|
5
|
+
}>;
|
|
6
|
+
/** A top-level category shown in the TopNav */
|
|
7
|
+
export interface NavCategory {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
icon?: IconComponent;
|
|
11
|
+
}
|
|
12
|
+
/** A single navigation link inside a SideNav section */
|
|
13
|
+
export interface NavLink {
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
href: string;
|
|
17
|
+
icon?: IconComponent;
|
|
18
|
+
}
|
|
19
|
+
/** A grouped section of links in the SideNav */
|
|
20
|
+
export interface NavSection {
|
|
21
|
+
id: string;
|
|
22
|
+
title?: string;
|
|
23
|
+
links: NavLink[];
|
|
24
|
+
}
|
|
25
|
+
/** Full navigation config consumed by the layout shell */
|
|
26
|
+
export interface NavigationConfig {
|
|
27
|
+
categories: NavCategory[];
|
|
28
|
+
/** Sections for the currently active category */
|
|
29
|
+
sections: NavSection[];
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/layout/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE1D,+DAA+D;AAC/D,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEzF,+CAA+C;AAC/C,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,wDAAwD;AACxD,MAAM,WAAW,OAAO;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,gDAAgD;AAChD,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,EAAE,CAAC;CACpB;AAED,0DAA0D;AAC1D,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,WAAW,EAAE,CAAC;IAC1B,iDAAiD;IACjD,QAAQ,EAAE,UAAU,EAAE,CAAC;CAC1B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
+
declare const sizeClasses: {
|
|
3
|
+
readonly sm: "size-8 text-caption";
|
|
4
|
+
readonly md: "size-10 text-small";
|
|
5
|
+
readonly lg: "size-14 text-body";
|
|
6
|
+
};
|
|
7
|
+
export type AvatarSize = keyof typeof sizeClasses;
|
|
8
|
+
export interface AvatarProps extends ComponentPropsWithoutRef<"span"> {
|
|
9
|
+
/** Image URL. Falls back to initials when absent or broken. */
|
|
10
|
+
src?: string | null;
|
|
11
|
+
/** Full name used to derive initials. */
|
|
12
|
+
name: string;
|
|
13
|
+
/** Size preset. @default "md" */
|
|
14
|
+
size?: AvatarSize;
|
|
15
|
+
/** Alt text for the image. Defaults to `name`. */
|
|
16
|
+
alt?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* User avatar with an image that falls back to initials.
|
|
20
|
+
*
|
|
21
|
+
* Always renders a circular element. Sizes: `sm` (32 px), `md` (40 px), `lg` (56 px).
|
|
22
|
+
*/
|
|
23
|
+
export declare function Avatar({ src, name, size, alt, className, ...rest }: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAY,MAAM,OAAO,CAAC;AAIhE,QAAA,MAAM,WAAW;;;;CAIP,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,WAAW,CAAC;AAElD,MAAM,WAAW,WAAY,SAAQ,wBAAwB,CAAC,MAAM,CAAC;IACjE,+DAA+D;IAC/D,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,kDAAkD;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAUD;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,IAAW,EAAE,GAAG,EAAE,SAAc,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,2CA6B3F"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
declare const colorClasses: {
|
|
3
|
+
readonly default: "bg-bg-tertiary text-text-primary";
|
|
4
|
+
readonly success: "bg-success-bg text-success";
|
|
5
|
+
readonly warning: "bg-warning-bg text-warning";
|
|
6
|
+
readonly error: "bg-error-bg text-error";
|
|
7
|
+
readonly info: "bg-info-bg text-info";
|
|
8
|
+
};
|
|
9
|
+
export type BadgeColor = keyof typeof colorClasses;
|
|
10
|
+
export interface DotBadgeProps extends ComponentPropsWithoutRef<"span"> {
|
|
11
|
+
/** Semantic color. @default "default" */
|
|
12
|
+
color?: BadgeColor;
|
|
13
|
+
/** Render as a small status dot instead of a text pill. */
|
|
14
|
+
dot: true;
|
|
15
|
+
children?: never;
|
|
16
|
+
}
|
|
17
|
+
export interface TextBadgeProps extends ComponentPropsWithoutRef<"span"> {
|
|
18
|
+
/** Semantic color. @default "default" */
|
|
19
|
+
color?: BadgeColor;
|
|
20
|
+
dot?: false;
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export type BadgeProps = DotBadgeProps | TextBadgeProps;
|
|
24
|
+
/**
|
|
25
|
+
* Status indicator — either a small colored dot or a text pill.
|
|
26
|
+
*
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <Badge color="success" dot /> // status dot
|
|
29
|
+
* <Badge color="error">Failed</Badge> // text pill
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function Badge({ color, dot, className, children, ...rest }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD,QAAA,MAAM,YAAY;;;;;;CAMR,CAAC;AAUX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,YAAY,CAAC;AAInD,MAAM,WAAW,aAAc,SAAQ,wBAAwB,CAAC,MAAM,CAAC;IACnE,yCAAyC;IACzC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,2DAA2D;IAC3D,GAAG,EAAE,IAAI,CAAC;IACV,QAAQ,CAAC,EAAE,KAAK,CAAC;CACpB;AAID,MAAM,WAAW,cAAe,SAAQ,wBAAwB,CAAC,MAAM,CAAC;IACpE,yCAAyC;IACzC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,GAAG,CAAC,EAAE,KAAK,CAAC;IACZ,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,cAAc,CAAC;AAExD;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,EAAE,KAAiB,EAAE,GAAG,EAAE,SAAc,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,UAAU,2CAwB9F"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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: "text-small px-3 py-1 gap-1.5";
|
|
10
|
+
readonly md: "text-body px-4 py-2 gap-2";
|
|
11
|
+
readonly lg: "text-body px-5 py-2.5 gap-2";
|
|
12
|
+
};
|
|
13
|
+
export type ButtonVariant = keyof typeof variantClasses;
|
|
14
|
+
export type ButtonSize = keyof typeof sizeClasses;
|
|
15
|
+
export interface ButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
16
|
+
/** Visual style variant. @default "primary" */
|
|
17
|
+
variant?: ButtonVariant;
|
|
18
|
+
/** Size preset. @default "md" */
|
|
19
|
+
size?: ButtonSize;
|
|
20
|
+
/** Show a spinner and disable interaction. */
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
/** Optional icon before children. */
|
|
23
|
+
iconLeft?: ReactNode;
|
|
24
|
+
/** Optional icon after children. */
|
|
25
|
+
iconRight?: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Primary action element.
|
|
29
|
+
*
|
|
30
|
+
* Supports four variants (`primary`, `secondary`, `ghost`, `danger`),
|
|
31
|
+
* three sizes (`sm`, `md`, `lg`), and a `loading` state.
|
|
32
|
+
*/
|
|
33
|
+
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Button.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;AAQX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,cAAc,CAAC;AACxD,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,WAAW,CAAC;AAElD,MAAM,WAAW,WAAY,SAAQ,wBAAwB,CAAC,QAAQ,CAAC;IACnE,+CAA+C;IAC/C,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,iCAAiC;IACjC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oCAAoC;IACpC,SAAS,CAAC,EAAE,SAAS,CAAC;CACzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,MAAM,2GA2CjB,CAAC"}
|
|
@@ -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,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,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,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,2CA4C3F"}
|
|
@@ -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"}
|