@mich8060/unified-design-system 0.2.3 → 0.2.5
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/README.md +37 -0
- package/dist/app-shell/AppShell.d.ts +47 -0
- package/dist/app-shell/layout.types.d.ts +15 -0
- package/dist/design-system/components/Accordion/Accordion.d.ts +26 -0
- package/dist/design-system/components/Accordion/Accordion.types.d.ts +5 -0
- package/dist/design-system/components/Accordion/index.d.ts +3 -0
- package/dist/design-system/components/ActionMenu/ActionMenu.d.ts +15 -0
- package/dist/design-system/components/ActionMenu/ActionMenu.types.d.ts +11 -0
- package/dist/design-system/components/ActionMenu/index.d.ts +3 -0
- package/dist/design-system/components/Avatar/Avatar.d.ts +13 -0
- package/dist/design-system/components/Avatar/Avatar.types.d.ts +9 -0
- package/dist/design-system/components/Avatar/index.d.ts +3 -0
- package/dist/design-system/components/Badge/Badge.d.ts +11 -0
- package/dist/design-system/components/Badge/Badge.types.d.ts +7 -0
- package/dist/design-system/components/Badge/index.d.ts +3 -0
- package/dist/design-system/components/Branding/Branding.d.ts +20 -0
- package/dist/design-system/components/Branding/Branding.types.d.ts +8 -0
- package/dist/design-system/components/Branding/index.d.ts +3 -0
- package/dist/design-system/components/Breadcrumb/Breadcrumb.d.ts +8 -0
- package/dist/design-system/components/Breadcrumb/Breadcrumb.types.d.ts +4 -0
- package/dist/design-system/components/Breadcrumb/index.d.ts +3 -0
- package/dist/design-system/components/Button/Button.d.ts +3 -0
- package/dist/design-system/components/Button/Button.types.d.ts +16 -0
- package/dist/design-system/components/Button/index.d.ts +3 -0
- package/dist/design-system/components/Calendar/Calendar.d.ts +20 -0
- package/dist/design-system/components/Calendar/Calendar.types.d.ts +13 -0
- package/dist/design-system/components/Calendar/index.d.ts +3 -0
- package/dist/design-system/components/Card/Card.d.ts +13 -0
- package/dist/design-system/components/Card/Card.types.d.ts +8 -0
- package/dist/design-system/components/Card/index.d.ts +3 -0
- package/dist/design-system/components/Checkbox/Checkbox.d.ts +14 -0
- package/dist/design-system/components/Checkbox/Checkbox.types.d.ts +10 -0
- package/dist/design-system/components/Checkbox/index.d.ts +3 -0
- package/dist/design-system/components/Chip/Chip.d.ts +17 -0
- package/dist/design-system/components/Chip/Chip.types.d.ts +13 -0
- package/dist/design-system/components/Chip/index.d.ts +3 -0
- package/dist/design-system/components/Datepicker/Datepicker.d.ts +17 -0
- package/dist/design-system/components/Datepicker/Datepicker.types.d.ts +13 -0
- package/dist/design-system/components/Datepicker/index.d.ts +3 -0
- package/dist/design-system/components/Dialog/Dialog.d.ts +29 -0
- package/dist/design-system/components/Dialog/Dialog.types.d.ts +20 -0
- package/dist/design-system/components/Dialog/index.d.ts +3 -0
- package/dist/design-system/components/Divider/Divider.d.ts +13 -0
- package/dist/design-system/components/Divider/Divider.types.d.ts +9 -0
- package/dist/design-system/components/Divider/index.d.ts +3 -0
- package/dist/design-system/components/DotStatus/DotStatus.d.ts +12 -0
- package/dist/design-system/components/DotStatus/DotStatus.types.d.ts +7 -0
- package/dist/design-system/components/DotStatus/index.d.ts +3 -0
- package/dist/design-system/components/Dropdown/Dropdown.d.ts +21 -0
- package/dist/design-system/components/Dropdown/Dropdown.types.d.ts +14 -0
- package/dist/design-system/components/Dropdown/index.d.ts +3 -0
- package/dist/design-system/components/EventCard/EventCard.d.ts +20 -0
- package/dist/design-system/components/EventCard/EventCard.types.d.ts +12 -0
- package/dist/design-system/components/EventCard/index.d.ts +3 -0
- package/dist/design-system/components/Field/Field.d.ts +17 -0
- package/dist/design-system/components/Field/Field.types.d.ts +13 -0
- package/dist/design-system/components/Field/index.d.ts +3 -0
- package/dist/design-system/components/FileUpload/FileUpload.d.ts +15 -0
- package/dist/design-system/components/FileUpload/FileUpload.types.d.ts +11 -0
- package/dist/design-system/components/FileUpload/index.d.ts +3 -0
- package/dist/design-system/components/Flex/Flex.d.ts +4 -0
- package/dist/design-system/components/Flex/Flex.types.d.ts +16 -0
- package/dist/design-system/components/Flex/index.d.ts +2 -0
- package/dist/design-system/components/Icon/Icon.d.ts +10 -0
- package/dist/design-system/components/Icon/Icon.types.d.ts +19 -0
- package/dist/design-system/components/Icon/index.d.ts +3 -0
- package/dist/design-system/components/ImageAspect/ImageAspect.d.ts +11 -0
- package/dist/design-system/components/ImageAspect/ImageAspect.types.d.ts +7 -0
- package/dist/design-system/components/ImageAspect/index.d.ts +3 -0
- package/dist/design-system/components/Key/Key.d.ts +10 -0
- package/dist/design-system/components/Key/Key.types.d.ts +6 -0
- package/dist/design-system/components/Key/index.d.ts +3 -0
- package/dist/design-system/components/Menu/Menu.d.ts +34 -0
- package/dist/design-system/components/Menu/Menu.types.d.ts +44 -0
- package/dist/design-system/components/MicroCalendar/MicroCalendar.d.ts +16 -0
- package/dist/design-system/components/MicroCalendar/MicroCalendar.types.d.ts +12 -0
- package/dist/design-system/components/MicroCalendar/index.d.ts +3 -0
- package/dist/design-system/components/Modal/Modal.d.ts +26 -0
- package/dist/design-system/components/Modal/Modal.types.d.ts +16 -0
- package/dist/design-system/components/Modal/index.d.ts +3 -0
- package/dist/design-system/components/Pagination/Pagination.d.ts +12 -0
- package/dist/design-system/components/Pagination/Pagination.types.d.ts +9 -0
- package/dist/design-system/components/Pagination/index.d.ts +3 -0
- package/dist/design-system/components/PillToggle/PillToggle.d.ts +13 -0
- package/dist/design-system/components/PillToggle/PillToggle.types.d.ts +9 -0
- package/dist/design-system/components/PillToggle/index.d.ts +3 -0
- package/dist/design-system/components/Playground/Playground.d.ts +12 -0
- package/dist/design-system/components/Playground/Playground.types.d.ts +7 -0
- package/dist/design-system/components/Playground/index.d.ts +3 -0
- package/dist/design-system/components/ProgressCircle/ProgressCircle.d.ts +15 -0
- package/dist/design-system/components/ProgressCircle/ProgressCircle.types.d.ts +10 -0
- package/dist/design-system/components/ProgressCircle/index.d.ts +3 -0
- package/dist/design-system/components/ProgressIndicator/ProgressIndicator.d.ts +16 -0
- package/dist/design-system/components/ProgressIndicator/ProgressIndicator.types.d.ts +11 -0
- package/dist/design-system/components/ProgressIndicator/index.d.ts +3 -0
- package/dist/design-system/components/Radio/Radio.d.ts +15 -0
- package/dist/design-system/components/Radio/Radio.types.d.ts +11 -0
- package/dist/design-system/components/Radio/index.d.ts +3 -0
- package/dist/design-system/components/Slider/Slider.d.ts +18 -0
- package/dist/design-system/components/Slider/Slider.types.d.ts +12 -0
- package/dist/design-system/components/Slider/index.d.ts +3 -0
- package/dist/design-system/components/Status/Status.d.ts +14 -0
- package/dist/design-system/components/Status/Status.types.d.ts +10 -0
- package/dist/design-system/components/Status/index.d.ts +3 -0
- package/dist/design-system/components/Steps/Steps.d.ts +12 -0
- package/dist/design-system/components/Steps/Steps.types.d.ts +8 -0
- package/dist/design-system/components/Steps/index.d.ts +3 -0
- package/dist/design-system/components/Table/Table.d.ts +29 -0
- package/dist/design-system/components/Table/Table.types.d.ts +6 -0
- package/dist/design-system/components/Table/index.d.ts +3 -0
- package/dist/design-system/components/Tabs/TabItem.d.ts +13 -0
- package/dist/design-system/components/Tabs/Tabs.d.ts +15 -0
- package/dist/design-system/components/Tabs/Tabs.types.d.ts +10 -0
- package/dist/design-system/components/Tabs/index.d.ts +3 -0
- package/dist/design-system/components/Tag/Tag.d.ts +17 -0
- package/dist/design-system/components/Tag/Tag.types.d.ts +12 -0
- package/dist/design-system/components/Tag/index.d.ts +3 -0
- package/dist/design-system/components/Text/Text.d.ts +4 -0
- package/dist/design-system/components/Text/Text.spec.d.ts +2 -0
- package/dist/design-system/components/Text/Text.types.d.ts +12 -0
- package/dist/design-system/components/Text/index.d.ts +2 -0
- package/dist/design-system/components/TextInput/TextInput.d.ts +20 -0
- package/dist/design-system/components/TextInput/TextInput.types.d.ts +39 -0
- package/dist/design-system/components/TextInput/index.d.ts +3 -0
- package/dist/design-system/components/Textarea/Textarea.d.ts +17 -0
- package/dist/design-system/components/Textarea/Textarea.types.d.ts +12 -0
- package/dist/design-system/components/Textarea/index.d.ts +3 -0
- package/dist/design-system/components/Toast/Toast.d.ts +14 -0
- package/dist/design-system/components/Toast/Toast.types.d.ts +10 -0
- package/dist/design-system/components/Toast/index.d.ts +3 -0
- package/dist/design-system/components/Toggle/Toggle.d.ts +15 -0
- package/dist/design-system/components/Toggle/Toggle.types.d.ts +11 -0
- package/dist/design-system/components/Tooltip/Tooltip.d.ts +12 -0
- package/dist/design-system/components/Tooltip/Tooltip.types.d.ts +8 -0
- package/dist/design-system/components/Tooltip/index.d.ts +3 -0
- package/dist/design-system/constants.d.ts +38 -0
- package/dist/design-system/index.d.ts +50 -0
- package/dist/design-system/specs/spec.types.d.ts +18 -0
- package/dist/index.cjs +42 -34
- package/dist/index.js +4603 -1573
- package/dist/unified-design-system.css +1 -1
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -31,3 +31,40 @@ npm run dev
|
|
|
31
31
|
See `/docs` for the full methodology and governance model.
|
|
32
32
|
|
|
33
33
|
- [Claude Rules](docs/claude-rules.md) – conventions and constraints for AI-assisted development in this repo
|
|
34
|
+
|
|
35
|
+
## NPM package quick start
|
|
36
|
+
|
|
37
|
+
Install the package and required peer dependencies:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm i @mich8060/unified-design-system react react-dom react-router-dom @phosphor-icons/react
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Import components and styles:
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import { AppShell, Button, Flex, Menu, Text, TextInput } from "@mich8060/unified-design-system";
|
|
47
|
+
import "@mich8060/unified-design-system/styles.css";
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Common prop pitfalls
|
|
51
|
+
|
|
52
|
+
- `Button` uses `appearance`, not `variant`
|
|
53
|
+
- valid values: `primary`, `soft`, `outline`, `text`, `ghost`, `disabled`, `destructive`
|
|
54
|
+
- `Text` requires a `variant` value such as `heading-32` or `body-16`
|
|
55
|
+
- `TextInput` icon placement uses `iconPosition` with `left` or `right`
|
|
56
|
+
- `Menu` mode uses `light` or `dark`
|
|
57
|
+
|
|
58
|
+
## Exported constants
|
|
59
|
+
|
|
60
|
+
Use exported constants to avoid guessing valid values:
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
import {
|
|
64
|
+
BUTTON_APPEARANCES,
|
|
65
|
+
TEXT_VARIANTS,
|
|
66
|
+
TEXT_WEIGHTS,
|
|
67
|
+
TEXT_INPUT_STATES,
|
|
68
|
+
ICON_APPEARANCES
|
|
69
|
+
} from "@mich8060/unified-design-system";
|
|
70
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ShellLayoutConfig } from "./layout.types";
|
|
3
|
+
import "./shell.scss";
|
|
4
|
+
export interface AppShellSlots {
|
|
5
|
+
Header?: React.ReactNode;
|
|
6
|
+
Sidebar?: React.ReactNode;
|
|
7
|
+
Breadcrumb?: React.ReactNode;
|
|
8
|
+
Footer?: React.ReactNode;
|
|
9
|
+
SubNav?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Public props for the AppShell root component.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <AppShell brand="comphealth" theme="dark">
|
|
17
|
+
* <AppShell.Menu>...</AppShell.Menu>
|
|
18
|
+
* <AppShell.Content>
|
|
19
|
+
* <AppShell.Main>...</AppShell.Main>
|
|
20
|
+
* </AppShell.Content>
|
|
21
|
+
* </AppShell>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export interface AppShellProps {
|
|
25
|
+
layout?: ShellLayoutConfig;
|
|
26
|
+
slots?: AppShellSlots;
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
brand?: string;
|
|
29
|
+
theme?: "light" | "dark";
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
/** Slot wrapper props used by AppShell compound regions. */
|
|
33
|
+
export interface AppShellSectionProps {
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
declare const AppShellMenuSlot: ({ children }: AppShellSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
declare const AppShellContentSlot: ({ children }: AppShellSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
declare const AppShellListviewSlot: ({ children }: AppShellSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
declare const AppShellMainSlot: ({ children }: AppShellSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
type AppShellCompound = React.FC<AppShellProps> & {
|
|
41
|
+
Menu: typeof AppShellMenuSlot;
|
|
42
|
+
Content: typeof AppShellContentSlot;
|
|
43
|
+
Listview: typeof AppShellListviewSlot;
|
|
44
|
+
Main: typeof AppShellMainSlot;
|
|
45
|
+
};
|
|
46
|
+
export declare const AppShell: AppShellCompound;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ContainerMode = "max" | "fluid" | "none";
|
|
2
|
+
export type DensityMode = "compact" | "comfortable";
|
|
3
|
+
export type PaddingMode = "standard" | "none";
|
|
4
|
+
export interface ShellLayoutConfig {
|
|
5
|
+
header?: boolean;
|
|
6
|
+
sidebar?: boolean;
|
|
7
|
+
breadcrumb?: boolean;
|
|
8
|
+
footer?: boolean;
|
|
9
|
+
padding?: PaddingMode;
|
|
10
|
+
container?: ContainerMode;
|
|
11
|
+
subNav?: boolean;
|
|
12
|
+
brandSwitcher?: boolean;
|
|
13
|
+
density?: DensityMode;
|
|
14
|
+
}
|
|
15
|
+
export declare const defaultLayout: Required<ShellLayoutConfig>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import "./_accordion.scss";
|
|
2
|
+
import type { AccordionProps } from "./Accordion.types";
|
|
3
|
+
/**
|
|
4
|
+
* AccordionItem component - individual accordion item
|
|
5
|
+
* @param {string} label - The label text for the accordion item
|
|
6
|
+
* @param {boolean} defaultExpanded - Whether the item is expanded by default
|
|
7
|
+
* @param {React.ReactNode} children - Content to display when expanded
|
|
8
|
+
* @param {string} className - Additional CSS classes
|
|
9
|
+
* @param {function} onToggle - Callback when item is toggled (receives new expanded state)
|
|
10
|
+
* @param {object} props - Additional props to pass to the accordion item
|
|
11
|
+
*/
|
|
12
|
+
export declare function AccordionItem({ label, defaultExpanded, children, className, onToggle, ...props }: {
|
|
13
|
+
[x: string]: any;
|
|
14
|
+
label: any;
|
|
15
|
+
defaultExpanded?: boolean | undefined;
|
|
16
|
+
children: any;
|
|
17
|
+
className?: string | undefined;
|
|
18
|
+
onToggle: any;
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Accordion component - container for accordion items
|
|
22
|
+
* @param {React.ReactNode} children - AccordionItem components
|
|
23
|
+
* @param {string} className - Additional CSS classes
|
|
24
|
+
* @param {object} props - Additional props to pass to the accordion container
|
|
25
|
+
*/
|
|
26
|
+
export default function Accordion({ children, className, ...props }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "./_action-menu.scss";
|
|
2
|
+
import type { ActionMenuProps } from "./ActionMenu.types";
|
|
3
|
+
/**
|
|
4
|
+
* ActionMenu component - A dropdown menu for actions
|
|
5
|
+
* @param {React.ReactNode} trigger - Required trigger element (use Button component)
|
|
6
|
+
* @param {array} items - Array of menu items: { label, icon, onClick, disabled, destructive, divider, items (for submenus) }
|
|
7
|
+
* @param {string} placement - Menu placement: 'bottom-start', 'bottom-end', 'top-start', 'top-end'
|
|
8
|
+
* @param {boolean} fullWidth - When true, the menu matches the trigger width
|
|
9
|
+
* @param {boolean} disabled - Whether the menu is disabled
|
|
10
|
+
* @param {function} onOpenChange - Callback when open state changes: (isOpen: boolean) => void
|
|
11
|
+
* @param {string} className - Additional CSS classes
|
|
12
|
+
* @param {string} menuClassName - Additional CSS classes for the menu panel
|
|
13
|
+
* @param {object} props - Additional props
|
|
14
|
+
*/
|
|
15
|
+
export default function ActionMenu({ trigger, items, placement, fullWidth, disabled, onOpenChange, className, menuClassName, ...props }: ActionMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes } from "react";
|
|
2
|
+
export interface ActionMenuProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
trigger?: unknown;
|
|
4
|
+
items?: unknown[];
|
|
5
|
+
placement?: string;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
onOpenChange?: (...args: unknown[]) => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
menuClassName?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./_avatar.scss";
|
|
2
|
+
import type { AvatarProps } from "./Avatar.types";
|
|
3
|
+
/**
|
|
4
|
+
* Avatar component for displaying user photos or initials
|
|
5
|
+
* @param {string} src - Image source URL for user photo
|
|
6
|
+
* @param {string} initials - Initials to display (e.g., "EB", "JD")
|
|
7
|
+
* @param {boolean} status - Whether to show the status indicator (green dot)
|
|
8
|
+
* @param {string} size - Size of the avatar: 'small', 'default', 'large' (default: 'default')
|
|
9
|
+
* @param {string} className - Additional CSS classes
|
|
10
|
+
* @param {string} alt - Alt text for the image
|
|
11
|
+
* @param {object} props - Additional props to pass to the avatar container
|
|
12
|
+
*/
|
|
13
|
+
export default function Avatar({ src, initials, status, size, className, alt, ...props }: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./_badge.scss";
|
|
2
|
+
import type { BadgeProps } from "./Badge.types";
|
|
3
|
+
/**
|
|
4
|
+
* Badge component for displaying badges
|
|
5
|
+
* @param {number|string} count - The count to display (will be formatted with + if over maxCount)
|
|
6
|
+
* @param {string} variant - Color variant: 'red', 'orange', 'yellow', 'green', 'dark-green', 'blue', 'dark-blue', 'purple', 'pink', 'gray', 'outline'
|
|
7
|
+
* @param {number} maxCount - Maximum count to display before showing "+" (default: 99)
|
|
8
|
+
* @param {string} className - Additional CSS classes
|
|
9
|
+
* @param {object} props - Additional props to pass to the badge element
|
|
10
|
+
*/
|
|
11
|
+
export default function Badge({ count, variant, maxCount, className, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "./_branding.scss";
|
|
2
|
+
import type { BrandingProps } from "./Branding.types";
|
|
3
|
+
/**
|
|
4
|
+
* Branding component — displays a single brand logo as inline SVG.
|
|
5
|
+
* Colors are driven by CSS custom properties (--uds-brands-*) so they
|
|
6
|
+
* can be themed for light / dark mode.
|
|
7
|
+
*
|
|
8
|
+
* Works like <Icon name="House" /> but for brand logos:
|
|
9
|
+
* <Branding brand="connect" />
|
|
10
|
+
*
|
|
11
|
+
* @param {string} brand - Brand key: "design-system" | "connect" | "comphealth" |
|
|
12
|
+
* "weatherby" | "modio" | "locumsmart" | "wireframe"
|
|
13
|
+
* @param {boolean} symbol - When true, renders only the brand symbol/icon instead
|
|
14
|
+
* of the full logo. Defaults to false (full logo).
|
|
15
|
+
* @param {boolean} inherit - When true, ignores `brand` prop and automatically uses
|
|
16
|
+
* the active brand from the `data-brand` attribute on <html>.
|
|
17
|
+
* @param {string} size - Size variant: "small" | "default" | "large"
|
|
18
|
+
* @param {string} className - Additional CSS classes
|
|
19
|
+
*/
|
|
20
|
+
export default function Branding({ brand, symbol, inherit, size, className, ...props }: BrandingProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./_breadcrumb.scss";
|
|
2
|
+
import type { BreadcrumbProps } from "./Breadcrumb.types";
|
|
3
|
+
/**
|
|
4
|
+
* Breadcrumb component for page navigation
|
|
5
|
+
* @param {Array} items - Optional array of breadcrumb items (max 5). Each item should have { label: string, href?: string }
|
|
6
|
+
* If href is provided, the item will be a link. The last item is always the current page (no link).
|
|
7
|
+
*/
|
|
8
|
+
export default function Breadcrumb({ items }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ButtonProps } from "./Button.types";
|
|
2
|
+
import "./_button.scss";
|
|
3
|
+
export default function Button({ label, appearance, layout, size, icon, iconSize, icons, children, tracking, className, onClick, disabled, "aria-label": ariaLabel, ...rest }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type ButtonAppearance = "primary" | "soft" | "outline" | "text" | "ghost" | "disabled" | "destructive";
|
|
3
|
+
export type ButtonLayout = "label-only" | "icon-left" | "icon-right" | "icon-only" | "only";
|
|
4
|
+
export type ButtonSize = "large" | "default" | "small" | "xsmall";
|
|
5
|
+
export type ButtonTracking = string | Record<string, unknown>;
|
|
6
|
+
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
7
|
+
label?: string;
|
|
8
|
+
appearance?: ButtonAppearance;
|
|
9
|
+
layout?: ButtonLayout;
|
|
10
|
+
size?: ButtonSize;
|
|
11
|
+
icon?: string | ReactNode;
|
|
12
|
+
iconSize?: number;
|
|
13
|
+
icons?: ReactNode;
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
tracking?: ButtonTracking;
|
|
16
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "./_calendar.scss";
|
|
2
|
+
import type { CalendarProps } from "./Calendar.types";
|
|
3
|
+
/**
|
|
4
|
+
* Calendar — A full-size calendar component with multi-day spanning events.
|
|
5
|
+
*
|
|
6
|
+
* Events support `startDate` + `endDate` for multi-day spans across
|
|
7
|
+
* days, weeks, and months. Renders lightweight inline event bars.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} view - "month" (default) or "week"
|
|
10
|
+
* @param {Date} defaultDate - Initial date to display (default: today)
|
|
11
|
+
* @param {Date} value - Selected date (controlled)
|
|
12
|
+
* @param {Array} events - Event objects (see docs for shape)
|
|
13
|
+
* @param {function} onDateSelect - (date: Date) => void
|
|
14
|
+
* @param {function} onEventClick - (event, e) => void
|
|
15
|
+
* @param {number} maxEventsPerDay - Max event rows per cell (default: 3)
|
|
16
|
+
* @param {boolean} showWeekNumbers - Show ISO week number column
|
|
17
|
+
* @param {string} size - "default" or "compact"
|
|
18
|
+
* @param {string} className - Additional CSS classes
|
|
19
|
+
*/
|
|
20
|
+
export default function Calendar({ view, defaultDate, value, events, onDateSelect, onEventClick, maxEventsPerDay, showWeekNumbers, size, className, ...rest }: CalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface CalendarProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
view?: string;
|
|
4
|
+
defaultDate?: unknown;
|
|
5
|
+
value?: unknown;
|
|
6
|
+
events?: unknown[];
|
|
7
|
+
onDateSelect?: (...args: unknown[]) => void;
|
|
8
|
+
onEventClick?: (...args: unknown[]) => void;
|
|
9
|
+
maxEventsPerDay?: number;
|
|
10
|
+
showWeekNumbers?: boolean;
|
|
11
|
+
size?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./_card.scss";
|
|
2
|
+
import type { CardProps } from "./Card.types";
|
|
3
|
+
/**
|
|
4
|
+
* Card component for navigation items on the overview page
|
|
5
|
+
*
|
|
6
|
+
* @param {Object} props
|
|
7
|
+
* @param {string} props.to - The route path to navigate to
|
|
8
|
+
* @param {string} props.title - The card title
|
|
9
|
+
* @param {string} props.description - The card description
|
|
10
|
+
* @param {React.ReactNode} props.icon - The SVG icon to display
|
|
11
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
12
|
+
*/
|
|
13
|
+
export default function Card({ to, title, description, icon, className }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./_checkbox.scss";
|
|
2
|
+
import type { CheckboxProps } from "./Checkbox.types";
|
|
3
|
+
/**
|
|
4
|
+
* Checkbox component for form inputs
|
|
5
|
+
* @param {boolean} checked - Whether the checkbox is checked
|
|
6
|
+
* @param {function} onChange - Callback function when checkbox state changes
|
|
7
|
+
* @param {string} id - Unique identifier for the checkbox input
|
|
8
|
+
* @param {string} label - Label text for the checkbox
|
|
9
|
+
* @param {boolean} disabled - Whether the checkbox is disabled
|
|
10
|
+
* @param {boolean} indeterminate - Whether the checkbox is in indeterminate state
|
|
11
|
+
* @param {string} className - Additional CSS classes
|
|
12
|
+
* @param {object} props - Additional props to pass to the checkbox
|
|
13
|
+
*/
|
|
14
|
+
export default function Checkbox({ checked, onChange, id, label, disabled, indeterminate, className, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from "react";
|
|
2
|
+
export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
onChange?: (...args: unknown[]) => void;
|
|
5
|
+
id?: unknown;
|
|
6
|
+
label?: unknown;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
indeterminate?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./_chip.scss";
|
|
2
|
+
import type { ChipProps } from "./Chip.types";
|
|
3
|
+
/**
|
|
4
|
+
* Chip component for displaying labels, tags, or filters
|
|
5
|
+
* @param {string} label - The text content of the chip
|
|
6
|
+
* @param {string} appearance - Visual style variant: 'outline' or 'primary'
|
|
7
|
+
* @param {string} shape - Shape variant: 'pill' (fully rounded) or 'rounded' (slightly rounded)
|
|
8
|
+
* @param {string} iconPlacement - Icon placement: 'both', 'left', 'right', or 'none'
|
|
9
|
+
* @param {string} icon - Icon name to display (when iconPlacement is not 'none')
|
|
10
|
+
* @param {number|string} badge - Badge count to display
|
|
11
|
+
* @param {string} badgeVariant - Badge color variant (default: 'red')
|
|
12
|
+
* @param {string} className - Additional CSS classes
|
|
13
|
+
* @param {function} onClick - Click handler function
|
|
14
|
+
* @param {boolean} disabled - Whether the chip is disabled
|
|
15
|
+
* @param {object} props - Additional props to pass to the chip element
|
|
16
|
+
*/
|
|
17
|
+
export default function Chip({ label, appearance, shape, iconPlacement, icon, badge, badgeVariant, className, onClick, disabled, ...props }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface ChipProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
label?: unknown;
|
|
4
|
+
appearance?: string;
|
|
5
|
+
shape?: string;
|
|
6
|
+
iconPlacement?: string;
|
|
7
|
+
icon?: string | ReactNode;
|
|
8
|
+
badge?: unknown;
|
|
9
|
+
badgeVariant?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
onClick?: (...args: unknown[]) => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./_datepicker.scss";
|
|
2
|
+
import type { DatepickerProps } from "./Datepicker.types";
|
|
3
|
+
/**
|
|
4
|
+
* Datepicker component - A calendar component for date selection with range support
|
|
5
|
+
* @param {Date} value - Selected date (optional)
|
|
6
|
+
* @param {Date} startDate - Start date for range selection (optional)
|
|
7
|
+
* @param {Date} endDate - End date for range selection (optional)
|
|
8
|
+
* @param {Date} month - Month to display (default: current month)
|
|
9
|
+
* @param {function} onDateSelect - Callback when a date is selected: (date: Date) => void
|
|
10
|
+
* @param {array} unavailableDates - Array of dates that are unavailable
|
|
11
|
+
* @param {object} dateData - Object mapping dates to data (travel, onAssignment)
|
|
12
|
+
* @param {string} size - Calendar size: 'desktop' or 'mobile' (default: 'desktop')
|
|
13
|
+
* @param {boolean} showWeekdays - Whether to show weekday header (default: true)
|
|
14
|
+
* @param {string} className - Additional CSS classes
|
|
15
|
+
* @param {object} props - Additional props
|
|
16
|
+
*/
|
|
17
|
+
export default function Datepicker({ value, startDate, endDate, month, onDateSelect, unavailableDates, dateData, size, showWeekdays, className, ...props }: DatepickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes } from "react";
|
|
2
|
+
export interface DatepickerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
value?: unknown;
|
|
4
|
+
startDate?: unknown;
|
|
5
|
+
endDate?: unknown;
|
|
6
|
+
month?: unknown;
|
|
7
|
+
onDateSelect?: (...args: unknown[]) => void;
|
|
8
|
+
unavailableDates?: unknown[];
|
|
9
|
+
dateData?: Record<string, unknown>;
|
|
10
|
+
size?: string;
|
|
11
|
+
showWeekdays?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./_dialog.scss";
|
|
3
|
+
import type { DialogProps } from "./Dialog.types";
|
|
4
|
+
/**
|
|
5
|
+
* Dialog component — Purpose-built confirmation / alert overlay
|
|
6
|
+
*
|
|
7
|
+
* A focused, intent-driven dialog for confirmations, warnings, alerts,
|
|
8
|
+
* and simple prompts. Smaller and more opinionated than Modal.
|
|
9
|
+
*
|
|
10
|
+
* @param {boolean} open Whether the dialog is visible
|
|
11
|
+
* @param {function} onClose Called when the user dismisses the dialog
|
|
12
|
+
* @param {string} intent "info" | "success" | "warning" | "destructive"
|
|
13
|
+
* @param {string} icon Override the default intent icon (Phosphor icon name)
|
|
14
|
+
* @param {string} title Dialog heading
|
|
15
|
+
* @param {string} description Supporting text below the title
|
|
16
|
+
* @param {string} confirmLabel Primary action button label (default "Confirm")
|
|
17
|
+
* @param {string} cancelLabel Secondary action button label (default "Cancel")
|
|
18
|
+
* @param {function} onConfirm Called when the primary action is clicked
|
|
19
|
+
* @param {function} onCancel Called when the secondary action is clicked (defaults to onClose)
|
|
20
|
+
* @param {boolean} showCancel Whether to show the cancel button (default true)
|
|
21
|
+
* @param {boolean} loading Show loading state on the confirm button
|
|
22
|
+
* @param {boolean} closeOnBackdrop Close when clicking the overlay (default true)
|
|
23
|
+
* @param {boolean} closeOnEscape Close on Escape key (default true)
|
|
24
|
+
* @param {HTMLElement} container Portal target (default document.body)
|
|
25
|
+
* @param {string} className Additional CSS classes
|
|
26
|
+
* @param {React.ReactNode} children Optional custom body content below description
|
|
27
|
+
* @param {object} props Additional props spread onto the dialog element
|
|
28
|
+
*/
|
|
29
|
+
export default function Dialog({ open, onClose, intent, icon, title, description, confirmLabel, cancelLabel, onConfirm, onCancel, showCancel, loading, closeOnBackdrop, closeOnEscape, container, className, children, ...props }: DialogProps): React.ReactPortal | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface DialogProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
onClose?: (...args: unknown[]) => void;
|
|
5
|
+
intent?: string;
|
|
6
|
+
icon?: string | ReactNode;
|
|
7
|
+
title?: unknown;
|
|
8
|
+
description?: unknown;
|
|
9
|
+
confirmLabel?: string;
|
|
10
|
+
cancelLabel?: string;
|
|
11
|
+
onConfirm?: (...args: unknown[]) => void;
|
|
12
|
+
onCancel?: (...args: unknown[]) => void;
|
|
13
|
+
showCancel?: boolean;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
closeOnBackdrop?: boolean;
|
|
16
|
+
closeOnEscape?: boolean;
|
|
17
|
+
container?: unknown;
|
|
18
|
+
className?: string;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./_divider.scss";
|
|
2
|
+
import type { DividerProps } from "./Divider.types";
|
|
3
|
+
/**
|
|
4
|
+
* Divider component for separating content sections
|
|
5
|
+
* @param {string} variant - Variant style: 'line' (default) or 'solid' (8px solid box)
|
|
6
|
+
* @param {string} label - Optional text label to display on the divider (only for 'line' variant)
|
|
7
|
+
* @param {string} icon - Optional icon name to display on the divider (only for 'line' variant)
|
|
8
|
+
* @param {string} alignment - Alignment of label/icon: 'left', 'center', or 'right' (only for 'line' variant)
|
|
9
|
+
* @param {boolean} labelWithIcon - Whether to show icon within the label text (e.g., "+ Divider Label") (only for 'line' variant)
|
|
10
|
+
* @param {string} className - Additional CSS classes
|
|
11
|
+
* @param {object} props - Additional props to pass to the divider element
|
|
12
|
+
*/
|
|
13
|
+
export default function Divider({ variant, label, icon, alignment, labelWithIcon, className, ...props }: DividerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
variant?: string;
|
|
4
|
+
label?: unknown;
|
|
5
|
+
icon?: string | ReactNode;
|
|
6
|
+
alignment?: string;
|
|
7
|
+
labelWithIcon?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./_dot-status.scss";
|
|
2
|
+
import type { DotStatusProps } from "./DotStatus.types";
|
|
3
|
+
/**
|
|
4
|
+
* Dot Status component for displaying status indicators
|
|
5
|
+
* @param {string} variant - Color variant
|
|
6
|
+
* @param {string} size - Size variant: 'small', 'medium', or 'large'
|
|
7
|
+
* @param {boolean} outline - Whether to show an outline/border around the dot
|
|
8
|
+
* @param {string} className - Additional CSS classes
|
|
9
|
+
* @param {string} 'aria-label' - Accessible label for screen readers
|
|
10
|
+
* @param {object} props - Additional props to pass to the dot element
|
|
11
|
+
*/
|
|
12
|
+
export default function DotStatus({ variant, size, outline, className, "aria-label": ariaLabel, ...props }: DotStatusProps): import("react/jsx-runtime").JSX.Element;
|