@appdirect/design-system 0.0.10 → 0.0.12

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.
Files changed (179) hide show
  1. package/README.md +85 -5
  2. package/dist/Buttons/ActionIcon.js +14 -0
  3. package/dist/Buttons/Button.js +66 -0
  4. package/dist/Buttons/CloseButton.js +48 -0
  5. package/dist/Buttons/index.js +13 -0
  6. package/dist/Combobox/AutocompleteClearable.js +36 -0
  7. package/dist/Combobox/Combobox.js +28 -0
  8. package/dist/Combobox/Multiselect.js +31 -0
  9. package/dist/Combobox/SearchableSelect.js +43 -0
  10. package/dist/Combobox/Select.js +72 -0
  11. package/dist/Combobox/index.js +10 -0
  12. package/dist/ComplexComponents/DashboardWidget/DashboardWidget.js +96 -0
  13. package/dist/ComplexComponents/DashboardWidget/index.js +1 -0
  14. package/dist/ComplexComponents/DataTable/CustomBottomToolbar/index.js +82 -0
  15. package/dist/ComplexComponents/DataTable/CustomBottomToolbar/utils.js +23 -0
  16. package/dist/ComplexComponents/DataTable/CustomToolbarAlertBannerContent/index.js +23 -0
  17. package/dist/ComplexComponents/DataTable/CustomTopToolbar/DateRangeSelectorFilter/index.js +230 -0
  18. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterChip.js +30 -0
  19. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/DateRangeFilter.js +12 -0
  20. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/FilterRenderer.js +32 -0
  21. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/FilterSystem.js +90 -0
  22. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/MultiSelectFilter.js +43 -0
  23. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/SingleSelectFilter.js +30 -0
  24. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/index.js +39 -0
  25. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/types.js +9 -0
  26. package/dist/ComplexComponents/DataTable/CustomTopToolbar/ResultCount/index.js +31 -0
  27. package/dist/ComplexComponents/DataTable/CustomTopToolbar/SearchFilter.js +42 -0
  28. package/dist/ComplexComponents/DataTable/CustomTopToolbar/SelectFilter.js +21 -0
  29. package/dist/ComplexComponents/DataTable/CustomTopToolbar/index.js +410 -0
  30. package/dist/ComplexComponents/DataTable/DataTable.js +405 -0
  31. package/dist/ComplexComponents/DataTable/ErrorOverlay/index.js +9 -0
  32. package/dist/ComplexComponents/DataTable/SortableHeaderCell/index.js +27 -0
  33. package/dist/ComplexComponents/DataTable/index.js +1 -0
  34. package/dist/ComplexComponents/DataTable/translations/en.js +99 -0
  35. package/dist/ComplexComponents/DataTable/translations/index.js +17 -0
  36. package/dist/ComplexComponents/KeyInsight/KeyInsights.js +176 -0
  37. package/dist/ComplexComponents/KeyInsight/index.js +1 -0
  38. package/dist/ComplexComponents/NameValue/NameValue.js +94 -0
  39. package/dist/ComplexComponents/NameValue/NameValueItem.js +59 -0
  40. package/dist/ComplexComponents/NameValue/index.js +2 -0
  41. package/dist/ComplexComponents/PageContentHeader/PageContentHeader.js +92 -0
  42. package/dist/ComplexComponents/PageContentHeader/PageContentHeader.tsx +24 -34
  43. package/dist/ComplexComponents/PageContentHeader/index.js +1 -0
  44. package/dist/ComplexComponents/PageContentHeader/index.ts +0 -2
  45. package/dist/ComplexComponents/Placeholder/Placeholder.js +51 -0
  46. package/dist/ComplexComponents/Placeholder/index.js +1 -0
  47. package/dist/ComplexComponents/Slat/Slat.js +53 -0
  48. package/dist/ComplexComponents/Slat/index.js +1 -0
  49. package/dist/ComplexComponents/Utilities/CopyButton.js +45 -0
  50. package/dist/ComplexComponents/Utilities/index.js +1 -0
  51. package/dist/DataDisplay/Alert.js +77 -0
  52. package/dist/DataDisplay/Avatar.js +157 -0
  53. package/dist/DataDisplay/Badge.js +78 -0
  54. package/dist/DataDisplay/Card.js +100 -0
  55. package/dist/DataDisplay/Chip.js +36 -0
  56. package/dist/DataDisplay/Indicator.js +59 -0
  57. package/dist/DataDisplay/List.js +60 -0
  58. package/dist/DataDisplay/Pill.js +81 -0
  59. package/dist/DataDisplay/Progress.js +42 -0
  60. package/dist/DataDisplay/Table.js +38 -0
  61. package/dist/DataDisplay/ThemeIcon.js +31 -0
  62. package/dist/DataDisplay/index.js +18 -0
  63. package/dist/Inputs/Checkbox.js +62 -0
  64. package/dist/Inputs/ColorInput.js +48 -0
  65. package/dist/Inputs/DropZone.js +12 -0
  66. package/dist/Inputs/FileInput.js +77 -0
  67. package/dist/Inputs/NumberInput.js +49 -0
  68. package/dist/Inputs/Radio.js +55 -0
  69. package/dist/Inputs/RadioGroup.js +59 -0
  70. package/dist/Inputs/SegmentedControl.js +50 -0
  71. package/dist/Inputs/Slider.js +50 -0
  72. package/dist/Inputs/SliderWithLabel.js +32 -0
  73. package/dist/Inputs/Switch.js +47 -0
  74. package/dist/Inputs/TextArea.js +50 -0
  75. package/dist/Inputs/TextInput.js +87 -0
  76. package/dist/Inputs/index.js +27 -0
  77. package/dist/Layout/Box.js +39 -0
  78. package/dist/Layout/Center.js +11 -0
  79. package/dist/Layout/Container.js +11 -0
  80. package/dist/Layout/Flex.js +12 -0
  81. package/dist/Layout/Grid.js +13 -0
  82. package/dist/Layout/Group.js +14 -0
  83. package/dist/Layout/Inline.js +46 -0
  84. package/dist/Layout/SimpleGrid.js +14 -0
  85. package/dist/Layout/Stack.js +45 -0
  86. package/dist/Layout/index.js +10 -0
  87. package/dist/Misc/Divider.js +8 -0
  88. package/dist/Misc/Paper.js +24 -0
  89. package/dist/Misc/index.js +10 -0
  90. package/dist/Navigation/Breadcrumb.js +60 -0
  91. package/dist/Navigation/NavLink.js +28 -0
  92. package/dist/Navigation/Stepper.js +8 -0
  93. package/dist/Navigation/Tabs.js +22 -0
  94. package/dist/Navigation/index.js +9 -0
  95. package/dist/Overlays/Drawer.js +63 -0
  96. package/dist/Overlays/Menu.js +85 -0
  97. package/dist/Overlays/Modal.js +61 -0
  98. package/dist/Overlays/Popover.js +118 -0
  99. package/dist/Overlays/Tooltip.js +71 -0
  100. package/dist/Overlays/index.js +12 -0
  101. package/dist/Shell/AppShellLayout.js +13 -0
  102. package/dist/Shell/HeaderBar.js +8 -0
  103. package/dist/Shell/SidebarNav.js +9 -0
  104. package/dist/Shell/SidebarNavLink.js +17 -0
  105. package/dist/Shell/SingleColumnLayout.js +11 -0
  106. package/dist/Shell/TertiaryColumnLayout.js +12 -0
  107. package/dist/Shell/index.js +6 -0
  108. package/dist/Typography/Code.js +8 -0
  109. package/dist/Typography/Kbd.js +58 -0
  110. package/dist/Typography/Text.js +8 -0
  111. package/dist/Typography/Title.js +11 -0
  112. package/dist/Typography/index.js +12 -0
  113. package/dist/config.js +202 -0
  114. package/dist/contracts/PageContentHeader.json +10 -5
  115. package/dist/contracts/index.json +1 -1
  116. package/dist/hooks/useTableHandlers.js +136 -0
  117. package/dist/hooks/useTableRenderFunctions.js +164 -0
  118. package/dist/hooks/useTableState.js +70 -0
  119. package/dist/index.js +162 -0
  120. package/dist/index.ts +3 -4
  121. package/dist/stories/Buttons/ActionIcon.stories.tsx +159 -0
  122. package/dist/stories/Buttons/Button.stories.tsx +145 -0
  123. package/dist/stories/Buttons/CloseButton.stories.tsx +121 -0
  124. package/dist/stories/Combobox/AutocompleteClearable.stories.tsx +554 -0
  125. package/dist/stories/Combobox/Combobox.stories.tsx +106 -0
  126. package/dist/stories/Combobox/Multiselect.stories.tsx +664 -0
  127. package/dist/stories/Combobox/SearchableSelect.stories.tsx +640 -0
  128. package/dist/stories/Combobox/Select.stories.tsx +311 -0
  129. package/dist/stories/ComplexComponents/DashboardWidget/DashboardWidget.stories.tsx +822 -0
  130. package/dist/stories/ComplexComponents/DataTable/DataTable.stories.tsx +502 -0
  131. package/dist/stories/ComplexComponents/KeyInsight/KeyInsights.stories.tsx +386 -0
  132. package/dist/stories/ComplexComponents/NameValue/NameValue.stories.tsx +405 -0
  133. package/dist/stories/ComplexComponents/PageContentHeader/PageContentHeader.stories.tsx +527 -0
  134. package/dist/stories/ComplexComponents/Placeholder/Placeholder.stories.tsx +76 -0
  135. package/dist/stories/ComplexComponents/Slat/Slat.stories.tsx +79 -0
  136. package/dist/stories/ComplexComponents/Utilities/CopyButton.stories.tsx +479 -0
  137. package/dist/stories/DataDisplay/Alert.stories.tsx +296 -0
  138. package/dist/stories/DataDisplay/Avatar.stories.tsx +251 -0
  139. package/dist/stories/DataDisplay/Badge.stories.tsx +176 -0
  140. package/dist/stories/DataDisplay/Card.stories.tsx +406 -0
  141. package/dist/stories/DataDisplay/Chip.stories.tsx +495 -0
  142. package/dist/stories/DataDisplay/Indicator.stories.tsx +571 -0
  143. package/dist/stories/DataDisplay/List.stories.tsx +376 -0
  144. package/dist/stories/DataDisplay/Pill.stories.tsx +506 -0
  145. package/dist/stories/DataDisplay/Progress.stories.tsx +352 -0
  146. package/dist/stories/DataDisplay/Table.stories.tsx +346 -0
  147. package/dist/stories/DataDisplay/ThemeIcon.stories.tsx +125 -0
  148. package/dist/stories/Inputs/Checkbox.stories.tsx +263 -0
  149. package/dist/stories/Inputs/ColorInput.stories.tsx +434 -0
  150. package/dist/stories/Inputs/DropZone.stories.tsx +401 -0
  151. package/dist/stories/Inputs/FileInput.stories.tsx +383 -0
  152. package/dist/stories/Inputs/NumberInput.stories.tsx +342 -0
  153. package/dist/stories/Inputs/Radio.stories.tsx +437 -0
  154. package/dist/stories/Inputs/RadioGroup.stories.tsx +526 -0
  155. package/dist/stories/Inputs/SegmentedControl.stories.tsx +60 -0
  156. package/dist/stories/Inputs/Slider.stories.tsx +22 -0
  157. package/dist/stories/Inputs/SliderWithLabel.stories.tsx +37 -0
  158. package/dist/stories/Inputs/Switch.stories.tsx +361 -0
  159. package/dist/stories/Inputs/TextArea.stories.tsx +355 -0
  160. package/dist/stories/Inputs/TextInput.stories.tsx +266 -0
  161. package/dist/stories/Misc/Divider.stories.tsx +581 -0
  162. package/dist/stories/Misc/Paper.stories.tsx +557 -0
  163. package/dist/stories/Navigation/Breadcrumb.stories.tsx +489 -0
  164. package/dist/stories/Navigation/NavLink.stories.tsx +601 -0
  165. package/dist/stories/Navigation/Stepper.stories.tsx +413 -0
  166. package/dist/stories/Navigation/Tabs.stories.tsx +528 -0
  167. package/dist/stories/Overlays/Drawer.stories.tsx +802 -0
  168. package/dist/stories/Overlays/Menu.stories.tsx +941 -0
  169. package/dist/stories/Overlays/Modal.stories.tsx +249 -0
  170. package/dist/stories/Overlays/Popover.stories.tsx +780 -0
  171. package/dist/stories/Overlays/Tooltip.stories.tsx +52 -0
  172. package/dist/stories/Typography/Code.stories.tsx +368 -0
  173. package/dist/stories/Typography/Kbd.stories.tsx +514 -0
  174. package/dist/stories/Typography/Text.stories.tsx +117 -0
  175. package/dist/stories/Typography/Title.stories.tsx +112 -0
  176. package/dist/stories/index.json +1435 -0
  177. package/dist/types.js +127 -0
  178. package/package.json +12 -7
  179. package/dist/ComplexComponents/PageContentHeader/DescriptionBlock.tsx +0 -65
@@ -0,0 +1,8 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import React, { forwardRef } from 'react';
4
+ import { Stepper as MantineStepper, } from '@mantine/core';
5
+ export const Stepper = forwardRef(({ ...props }, ref) => _jsx(MantineStepper, { ref: ref, ...props }));
6
+ Stepper.displayName = 'Stepper';
7
+ Stepper.Step = MantineStepper.Step;
8
+ Stepper.Completed = MantineStepper.Completed;
@@ -0,0 +1,22 @@
1
+ 'use client';
2
+ import { Tabs as MantineTabs } from '@mantine/core';
3
+ // ========================== COMPONENT ==========================
4
+ /**
5
+ * Tabs Component
6
+ *
7
+ * Thin wrapper around Mantine's Tabs compound component.
8
+ * Use Tabs.List, Tabs.Tab, and Tabs.Panel for composition.
9
+ *
10
+ * @example
11
+ * <Tabs defaultValue="overview">
12
+ * <Tabs.List>
13
+ * <Tabs.Tab value="overview" leftSection={<RiDashboardLine size={14} />}>
14
+ * Overview
15
+ * </Tabs.Tab>
16
+ * <Tabs.Tab value="analytics">Analytics</Tabs.Tab>
17
+ * </Tabs.List>
18
+ * <Tabs.Panel value="overview">Overview content</Tabs.Panel>
19
+ * <Tabs.Panel value="analytics">Analytics content</Tabs.Panel>
20
+ * </Tabs>
21
+ */
22
+ export const Tabs = MantineTabs;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Navigation Components
3
+ *
4
+ * This module exports navigation-related components including breadcrumbs and nav links.
5
+ */
6
+ export { Breadcrumb, BackBreadcrumb } from './Breadcrumb.js';
7
+ export { NavLink } from './NavLink.js';
8
+ export { Stepper } from './Stepper.js';
9
+ export { Tabs } from './Tabs.js';
@@ -0,0 +1,63 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import React, { forwardRef } from 'react';
4
+ import { Drawer as MantineDrawer } from '@mantine/core';
5
+ /**
6
+ * AppDirect Design System Drawer Component
7
+ *
8
+ * A sliding overlay component built on top of Mantine's Drawer with
9
+ * consistent design system styling for right-side drawer layouts.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * // Basic usage
14
+ * <Drawer
15
+ * opened={opened}
16
+ * onClose={() => setOpened(false)}
17
+ * title="Settings"
18
+ * >
19
+ * <p>Drawer content goes here</p>
20
+ * </Drawer>
21
+ * ```
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * // Different sizes
26
+ * <Drawer
27
+ * opened={opened}
28
+ * onClose={close}
29
+ * title="Navigation"
30
+ * size="sm"
31
+ * >
32
+ * <Navigation />
33
+ * </Drawer>
34
+ *
35
+ * <Drawer
36
+ * opened={opened}
37
+ * onClose={close}
38
+ * title="Details"
39
+ * size="lg"
40
+ * >
41
+ * <Details />
42
+ * </Drawer>
43
+ * ```
44
+ *
45
+ * @example
46
+ * ```tsx
47
+ * // Custom behavior
48
+ * <Drawer
49
+ * opened={opened}
50
+ * onClose={close}
51
+ * title="Modal Dialog"
52
+ * closeOnClickOutside={false}
53
+ * closeOnEscape={false}
54
+ * withCloseButton={true}
55
+ * >
56
+ * <Form />
57
+ * </Drawer>
58
+ * ```
59
+ */
60
+ export const Drawer = forwardRef(({ opened, onClose, title, children, size = 'md', position = 'right', withCloseButton = true, closeOnClickOutside = true, closeOnEscape = true, ...props }, ref) => {
61
+ return (_jsx(MantineDrawer, { ref: ref, opened: opened, onClose: onClose, title: title, size: size, position: position, withCloseButton: withCloseButton, closeOnClickOutside: closeOnClickOutside, closeOnEscape: closeOnEscape, radius: 0, shadow: "lg", ...props, children: children }));
62
+ });
63
+ Drawer.displayName = 'Drawer';
@@ -0,0 +1,85 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import React, { forwardRef } from 'react';
4
+ import { Menu as MantineMenu } from '@mantine/core';
5
+ const isLegacyMenuProps = (props) => 'trigger' in props && 'sections' in props;
6
+ /**
7
+ * AppDirect Design System Menu Component
8
+ *
9
+ * A dropdown menu component built on top of Mantine's Menu with
10
+ * consistent design system styling.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * // Mantine-aligned composition
15
+ * <Menu shadow="md" width={220}>
16
+ * <Menu.Target>
17
+ * <Button>Actions</Button>
18
+ * </Menu.Target>
19
+ *
20
+ * <Menu.Dropdown>
21
+ * <Menu.Item>Edit</Menu.Item>
22
+ * <Menu.Item>Duplicate</Menu.Item>
23
+ * <Menu.Divider />
24
+ * <Menu.Label>Danger zone</Menu.Label>
25
+ * <Menu.Item color="red">Delete</Menu.Item>
26
+ * </Menu.Dropdown>
27
+ * </Menu>
28
+ * ```
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * // Legacy structured API still supported during migration
33
+ * <Menu
34
+ * trigger={<Button>Menu</Button>}
35
+ * sections={[
36
+ * {
37
+ * title: "Application",
38
+ * items: [
39
+ * {
40
+ * id: "settings",
41
+ * label: "Settings",
42
+ * leftSection: <RiSettingsLine size={14} />,
43
+ * onClick: () => console.log('Settings')
44
+ * },
45
+ * {
46
+ * id: "search",
47
+ * label: "Search",
48
+ * leftSection: <RiSearchLine size={14} />,
49
+ * rightSection: "⌘K",
50
+ * onClick: () => console.log('Search')
51
+ * }
52
+ * ]
53
+ * },
54
+ * {
55
+ * title: "Danger Zone",
56
+ * items: [
57
+ * {
58
+ * id: "delete-account",
59
+ * label: "Delete Account",
60
+ * leftSection: <RiDeleteBinLine size={14} />,
61
+ * color: "red",
62
+ * onClick: () => console.log('Delete Account')
63
+ * }
64
+ * ]
65
+ * }
66
+ * ]}
67
+ * />
68
+ * ```
69
+ */
70
+ const MenuRoot = forwardRef((props, _ref) => {
71
+ if (isLegacyMenuProps(props)) {
72
+ const { trigger, sections, shadow = 'md', radius = 'sm', ...menuProps } = props;
73
+ return (_jsxs(MantineMenu, { shadow: shadow, radius: radius, ...menuProps, children: [_jsx(MantineMenu.Target, { children: trigger }), _jsx(MantineMenu.Dropdown, { children: sections.map((section, sectionIndex) => (_jsxs(React.Fragment, { children: [sectionIndex > 0 && _jsx(MantineMenu.Divider, {}), section.title && (_jsx(MantineMenu.Label, { children: section.title })), section.items.map((item) => (_jsx(MantineMenu.Item, { leftSection: item.leftSection, rightSection: item.rightSection, onClick: item.onClick, disabled: item.disabled, color: item.color, children: item.label }, item.id)))] }, sectionIndex))) })] }));
74
+ }
75
+ const { shadow = 'md', radius = 'sm', ...menuProps } = props;
76
+ return (_jsx(MantineMenu, { shadow: shadow, radius: radius, ...menuProps }));
77
+ });
78
+ MenuRoot.displayName = 'Menu';
79
+ export const Menu = Object.assign(MenuRoot, {
80
+ Target: MantineMenu.Target,
81
+ Dropdown: MantineMenu.Dropdown,
82
+ Item: MantineMenu.Item,
83
+ Label: MantineMenu.Label,
84
+ Divider: MantineMenu.Divider,
85
+ });
@@ -0,0 +1,61 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import React, { forwardRef } from 'react';
4
+ import { Modal as MantineModal, Stack } from '@mantine/core';
5
+ import { Inline } from '../index.js';
6
+ import { Button } from '../Buttons/index.js';
7
+ /**
8
+ * AppDirect Design System Modal Component
9
+ *
10
+ * A modal dialog component built on top of Mantine's Modal with
11
+ * consistent design system styling.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * // Simple content modal
16
+ * <Modal
17
+ * opened={infoOpened}
18
+ * onClose={() => setInfoOpened(false)}
19
+ * title="Information"
20
+ * size="sm"
21
+ * >
22
+ * <Text>This is some information content.</Text>
23
+ * </Modal>
24
+ * ```
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * // Confirmation buttons composed inside children
29
+ * <Modal
30
+ * opened={confirmOpened}
31
+ * onClose={() => setConfirmOpened(false)}
32
+ * title="Confirm Action"
33
+ * >
34
+ * <Stack gap="md">
35
+ * <Text>Are you sure you want to perform this action?</Text>
36
+ * <Inline justify="flex-end" gap="sm">
37
+ * <Button variant="outline">Cancel</Button>
38
+ * <Button variant="primary">Confirm</Button>
39
+ * </Inline>
40
+ * </Stack>
41
+ * </Modal>
42
+ * ```
43
+ */
44
+ export const Modal = forwardRef(({ title, size = 'md', withCloseButton = true, closeOnClickOutside = true, closeOnEscape = true, padding = 'md', centered = true, ...props }, ref) => {
45
+ return (_jsx(MantineModal, { ref: ref, title: title, size: size, withCloseButton: withCloseButton, closeOnClickOutside: closeOnClickOutside, closeOnEscape: closeOnEscape, padding: padding, centered: centered, radius: "sm", ...props }));
46
+ });
47
+ Modal.displayName = 'Modal';
48
+ export const ConfirmationModal = forwardRef(({ confirmLabel = 'Confirm', cancelLabel = 'Cancel', confirmVariant = 'primary', onConfirm, onCancel, confirmLoading = false, onClose, children, ...props }, ref) => {
49
+ const handleCancel = () => {
50
+ onCancel?.();
51
+ onClose();
52
+ };
53
+ const handleConfirm = () => {
54
+ onConfirm?.();
55
+ if (!confirmLoading) {
56
+ onClose();
57
+ }
58
+ };
59
+ return (_jsx(Modal, { ref: ref, onClose: onClose, ...props, children: _jsxs(Stack, { gap: "md", children: [children, _jsxs(Inline, { justify: "flex-end", gap: "sm", children: [_jsx(Button, { variant: "outline", onClick: handleCancel, children: cancelLabel }), _jsx(Button, { variant: confirmVariant, onClick: handleConfirm, loading: confirmLoading, children: confirmLabel })] })] }) }));
60
+ });
61
+ ConfirmationModal.displayName = 'ConfirmationModal';
@@ -0,0 +1,118 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import React, { forwardRef } from 'react';
4
+ import { Popover as MantinePopover, Stack, Text } from '@mantine/core';
5
+ import { Inline } from '../index.js';
6
+ import { Button } from '../Buttons/index.js';
7
+ /**
8
+ * AppDirect Design System Popover Component
9
+ *
10
+ * A popover component built on top of Mantine's Popover with
11
+ * consistent design system styling and flexible content support.
12
+ * Arrow size is set to 10 and arrow radius to 0 by default.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * // Simple text popover
17
+ * <Popover
18
+ * trigger={<Button>Show Info</Button>}
19
+ * title="Information"
20
+ * position="top"
21
+ * >
22
+ * <Text>This is some helpful information.</Text>
23
+ * </Popover>
24
+ * ```
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * // Popover with actions
29
+ * <Popover
30
+ * trigger={<Button>Actions</Button>}
31
+ * title="Quick Actions"
32
+ * position="bottom"
33
+ * actions={[
34
+ * {
35
+ * id: "save",
36
+ * label: "Save",
37
+ * variant: "primary",
38
+ * onClick: handleSave,
39
+ * closeOnClick: true
40
+ * },
41
+ * {
42
+ * id: "cancel",
43
+ * label: "Cancel",
44
+ * variant: "outline",
45
+ * closeOnClick: true
46
+ * }
47
+ * ]}
48
+ * tertiaryActions={[
49
+ * {
50
+ * id: "help",
51
+ * label: "Help",
52
+ * variant: "default",
53
+ * onClick: showHelp
54
+ * }
55
+ * ]}
56
+ * >
57
+ * <Text>Are you sure you want to continue?</Text>
58
+ * </Popover>
59
+ * ```
60
+ *
61
+ * @example
62
+ * ```tsx
63
+ * // Form popover
64
+ * <Popover
65
+ * trigger={<ActionIcon><RiSettingsLine /></ActionIcon>}
66
+ * title="Quick Settings"
67
+ * position="left"
68
+ * width={300}
69
+ * actions={[
70
+ * {
71
+ * id: "apply",
72
+ * label: "Apply",
73
+ * variant: "primary",
74
+ * onClick: applySettings
75
+ * }
76
+ * ]}
77
+ * >
78
+ * <Stack gap="sm">
79
+ * <Switch label="Enable notifications" />
80
+ * <Select label="Theme" data={themes} />
81
+ * </Stack>
82
+ * </Popover>
83
+ * ```
84
+ */
85
+ export const Popover = forwardRef(({ trigger, title, children, actions = [], tertiaryActions = [], position = 'bottom', opened, onChange, onClose, width = 'auto', withArrow = true, arrowSize = 10, arrowRadius = 0, closeOnClickOutside = true, closeOnEscape = true, ...props }, ref) => {
86
+ const handleActionClick = (action) => {
87
+ if (action.onClick) {
88
+ action.onClick();
89
+ }
90
+ if (action.closeOnClick && onClose) {
91
+ onClose();
92
+ }
93
+ };
94
+ const hasActions = actions.length > 0 || tertiaryActions.length > 0;
95
+ return (_jsxs(MantinePopover, { opened: opened, onChange: onChange, position: position, width: width, withArrow: withArrow, arrowSize: arrowSize, arrowRadius: arrowRadius, closeOnClickOutside: closeOnClickOutside, closeOnEscape: closeOnEscape, shadow: "md", ...props, children: [_jsx(MantinePopover.Target, { children: trigger }), _jsx(MantinePopover.Dropdown, { children: _jsxs(Stack, { gap: "sm", children: [_jsxs("div", { children: [title && (_jsx(Text, { fw: 600, size: "sm", mb: "xs", children: title })), children] }), hasActions && (_jsxs(Inline, { justify: "space-between", gap: "sm", children: [_jsx(Inline, { gap: "sm", children: actions.map((action) => (_jsx(Button, { variant: action.variant || 'outline', onClick: () => handleActionClick(action), disabled: action.disabled, loading: action.loading, size: "xs", children: action.label }, action.id))) }), _jsx(Inline, { gap: "sm", children: tertiaryActions.map((action) => (_jsx(Button, { variant: action.variant || 'outline', onClick: () => handleActionClick(action), disabled: action.disabled, loading: action.loading, size: "xs", children: action.label }, action.id))) })] }))] }) })] }));
96
+ });
97
+ Popover.displayName = 'Popover';
98
+ export const ConfirmationPopover = forwardRef(({ confirmLabel = 'Confirm', cancelLabel = 'Cancel', confirmVariant = 'primary', onConfirm, onCancel, confirmLoading = false, tertiaryActions = [], onClose, ...props }, ref) => {
99
+ const actions = [
100
+ {
101
+ id: 'confirm',
102
+ label: confirmLabel,
103
+ variant: confirmVariant,
104
+ onClick: onConfirm,
105
+ loading: confirmLoading,
106
+ closeOnClick: !confirmLoading,
107
+ },
108
+ {
109
+ id: 'cancel',
110
+ label: cancelLabel,
111
+ variant: 'outline',
112
+ onClick: onCancel,
113
+ closeOnClick: true,
114
+ },
115
+ ];
116
+ return (_jsx(Popover, { ref: ref, actions: actions, tertiaryActions: tertiaryActions, onClose: onClose, ...props }));
117
+ });
118
+ ConfirmationPopover.displayName = 'ConfirmationPopover';
@@ -0,0 +1,71 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import React, { forwardRef } from 'react';
4
+ import { Tooltip as MantineTooltip } from '@mantine/core';
5
+ // ========================== COMPONENT ==========================
6
+ /**
7
+ * Tooltip Component
8
+ *
9
+ * Built on top of Mantine's Tooltip component with design system styling.
10
+ * Uses consistent dark background with white text and arrow pointer.
11
+ *
12
+ * @example
13
+ * // Basic tooltip
14
+ * <Tooltip label="This is a tooltip! Rejoice!">
15
+ * <Button>Hover me</Button>
16
+ * </Tooltip>
17
+ *
18
+ * @example
19
+ * // Different positions
20
+ * <Tooltip label="Top tooltip" position="top">
21
+ * <Button>Top</Button>
22
+ * </Tooltip>
23
+ *
24
+ * @example
25
+ * // Custom width and multiline
26
+ * <Tooltip
27
+ * label="This is a longer tooltip that can span multiple lines"
28
+ * width={200}
29
+ * position="bottom"
30
+ * >
31
+ * <Button>Long tooltip</Button>
32
+ * </Tooltip>
33
+ *
34
+ * @example
35
+ * // With delays
36
+ * <Tooltip
37
+ * label="Delayed tooltip"
38
+ * openDelay={500}
39
+ * closeDelay={200}
40
+ * >
41
+ * <Button>Delayed</Button>
42
+ * </Tooltip>
43
+ */
44
+ export const Tooltip = forwardRef(({ label, children, position = 'top', disabled = false, openDelay = 0, closeDelay = 0, keepMounted = false, width = 'auto', withArrow = true, arrowSize = 6, ...props }, ref) => {
45
+ return (_jsx(MantineTooltip, { ref: ref, label: label, position: position, disabled: disabled, openDelay: openDelay, closeDelay: closeDelay, keepMounted: keepMounted, withArrow: withArrow, arrowSize: arrowSize,
46
+ // Design system styling from Figma
47
+ color: "dark", radius: "sm",
48
+ // Custom styles to match Figma design exactly
49
+ styles: {
50
+ tooltip: {
51
+ backgroundColor: '#212529',
52
+ color: '#ffffff',
53
+ fontFamily: 'Inter, sans-serif',
54
+ fontSize: '14px',
55
+ fontWeight: 400,
56
+ lineHeight: 1.55,
57
+ padding: '5px 8px',
58
+ borderRadius: '4px',
59
+ border: 'none',
60
+ width: width !== 'auto' ? width : undefined,
61
+ maxWidth: width === 'auto' ? '300px' : undefined,
62
+ },
63
+ arrow: {
64
+ backgroundColor: '#212529',
65
+ borderColor: '#212529',
66
+ }
67
+ }, ...props, children: children }));
68
+ });
69
+ Tooltip.displayName = 'Tooltip';
70
+ // Default export for convenience
71
+ export default Tooltip;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Overlays Components
3
+ *
4
+ * Components that appear on top of other content like modals, drawers, and popovers.
5
+ */
6
+ export { Drawer } from './Drawer.js';
7
+ export { Menu } from './Menu.js';
8
+ export { Modal, ConfirmationModal } from './Modal.js';
9
+ export { Popover, ConfirmationPopover } from './Popover.js';
10
+ export { Tooltip } from './Tooltip.js';
11
+ // Future overlay component exports will go here:
12
+ // export { HoverCard } from './HoverCard';
@@ -0,0 +1,13 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import React from 'react';
4
+ import { AppShell } from '@mantine/core';
5
+ import { Stack } from '../Layout/Stack.js';
6
+ import { HeaderBar } from './HeaderBar.js';
7
+ import { SidebarNav } from './SidebarNav.js';
8
+ const APP_DIRECT_NAVY = '#011B58';
9
+ export function AppShellLayout({ children, title, navItems = [], hideNav = false, }) {
10
+ const showNav = !hideNav && navItems.length > 0;
11
+ return (_jsxs(AppShell, { header: { height: 68 }, navbar: showNav ? { width: 300, breakpoint: 'sm', collapsed: { mobile: false } } : undefined, padding: "lg", children: [_jsx(AppShell.Header, { style: { background: APP_DIRECT_NAVY }, children: _jsx(HeaderBar, { title: title }) }), showNav && (_jsx(AppShell.Navbar, { pt: 0, pb: "md", pl: "md", pr: 0, children: _jsx(SidebarNav, { navItems: navItems, title: title ?? 'Navigation' }) })), _jsx(AppShell.Main, { children: _jsx(Stack, { gap: "xl", children: children }) })] }));
12
+ }
13
+ AppShellLayout.displayName = 'AppShellLayout';
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { ThemeIcon, Title } from '@mantine/core';
4
+ import { Inline } from '../Layout/Inline.js';
5
+ export function HeaderBar({ title = 'Prototype' }) {
6
+ return (_jsxs(Inline, { h: "100%", px: "xl", gap: "lg", children: [_jsx(ThemeIcon, { variant: "transparent", size: "lg", color: "white", children: _jsx("i", { className: "ri-grid-fill", style: { fontSize: 28 } }) }), _jsx(ThemeIcon, { variant: "transparent", p: "xs", size: 48, children: _jsx("img", { src: "/assets/AppDirect-Mark_White.svg", alt: "Logo", width: 38, height: 38 }) }), _jsx(Title, { order: 1, c: "white", fw: 300, fz: 22, ml: 12, children: title })] }));
7
+ }
8
+ HeaderBar.displayName = 'HeaderBar';
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { ThemeIcon, Divider, Title } from '@mantine/core';
4
+ import { Inline } from '../Layout/Inline.js';
5
+ import { SidebarNavLink } from './SidebarNavLink.js';
6
+ export function SidebarNav({ navItems, title }) {
7
+ return (_jsxs("nav", { "aria-label": "Sidebar Navigation", children: [_jsxs(Inline, { align: "center", gap: "sm", mb: 0, h: 66, pl: "xs", children: [_jsx(ThemeIcon, { variant: "transparent", size: "lg", color: "dark", children: _jsx("i", { className: "ri-group-line", style: { fontSize: 28 } }) }), _jsx(Title, { order: 5, fw: 700, m: 0, children: title })] }), _jsx(Divider, { mb: "md" }), navItems.map((item) => (_jsx(SidebarNavLink, { label: item.label, icon: item.icon, href: item.href, active: item.active, color: item.color, rightSection: item.rightSection }, item.label)))] }));
8
+ }
9
+ SidebarNav.displayName = 'SidebarNav';
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { NavLink as MantineNavLink, ThemeIcon } from '@mantine/core';
4
+ const navLinkStyles = {
5
+ root: {
6
+ height: 44,
7
+ paddingLeft: 'var(--mantine-spacing-xs)',
8
+ borderTopLeftRadius: 'var(--mantine-radius-sm)',
9
+ borderBottomLeftRadius: 'var(--mantine-radius-sm)',
10
+ borderTopRightRadius: 0,
11
+ borderBottomRightRadius: 0,
12
+ },
13
+ };
14
+ export function SidebarNavLink({ label, icon, href, active, color = 'dark', rightSection, }) {
15
+ return (_jsx(MantineNavLink, { component: "a", href: href ?? '#', label: label, leftSection: _jsx(ThemeIcon, { variant: "transparent", size: "md", color: color, children: _jsx("i", { className: icon, style: { fontSize: 20 } }) }), rightSection: rightSection, active: active, "aria-current": active ? 'page' : undefined, styles: navLinkStyles }));
16
+ }
17
+ SidebarNavLink.displayName = 'SidebarNavLink';
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { Stack } from '../Layout/Stack.js';
4
+ /**
5
+ * Full-width single-column content layout.
6
+ * Use inside AppShellLayout for standard page content.
7
+ */
8
+ export function SingleColumnLayout({ children, gap = 'lg' }) {
9
+ return (_jsx(Stack, { gap: gap, children: children }));
10
+ }
11
+ SingleColumnLayout.displayName = 'SingleColumnLayout';
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { Grid } from '../Layout/Grid.js';
4
+ /**
5
+ * Two-column content layout with a primary area and a narrower aside.
6
+ * Use inside AppShellLayout for pages that need a side panel.
7
+ */
8
+ export function TertiaryColumnLayout({ main, aside, mainSpan = 8, }) {
9
+ const asideSpan = 12 - mainSpan;
10
+ return (_jsxs(Grid, { gap: "lg", children: [_jsx(Grid.Col, { span: mainSpan, children: main }), _jsx(Grid.Col, { span: asideSpan, children: aside })] }));
11
+ }
12
+ TertiaryColumnLayout.displayName = 'TertiaryColumnLayout';
@@ -0,0 +1,6 @@
1
+ export { AppShellLayout } from './AppShellLayout.js';
2
+ export { HeaderBar } from './HeaderBar.js';
3
+ export { SidebarNav } from './SidebarNav.js';
4
+ export { SidebarNavLink } from './SidebarNavLink.js';
5
+ export { SingleColumnLayout } from './SingleColumnLayout.js';
6
+ export { TertiaryColumnLayout } from './TertiaryColumnLayout.js';
@@ -0,0 +1,8 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Code as MantineCode } from '@mantine/core';
4
+ import { forwardRef } from 'react';
5
+ export const Code = forwardRef(({ children, size = 'sm', fz, ...props }, ref) => {
6
+ return (_jsx(MantineCode, { ref: ref, fz: fz || size, ...props, children: children }));
7
+ });
8
+ Code.displayName = 'Code';
@@ -0,0 +1,58 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import React, { forwardRef } from 'react';
4
+ import { Kbd as MantineKbd } from '@mantine/core';
5
+ /**
6
+ * AppDirect Design System Kbd Component
7
+ *
8
+ * A keyboard key component built on top of Mantine's Kbd with
9
+ * consistent design system styling for displaying keyboard shortcuts.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * // Basic usage
14
+ * <Kbd>⌘K</Kbd>
15
+ * ```
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * // With different sizes
20
+ * <Inline gap="sm">
21
+ * <Kbd size="xs">Esc</Kbd>
22
+ * <Kbd size="sm">⌘K</Kbd>
23
+ * <Kbd size="md">Ctrl+C</Kbd>
24
+ * <Kbd size="lg">Enter</Kbd>
25
+ * </Inline>
26
+ * ```
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * // Common keyboard shortcuts
31
+ * <Inline gap="sm">
32
+ * <Kbd>⌘</Kbd>
33
+ * <Kbd>⌘K</Kbd>
34
+ * <Kbd>⌘⇧P</Kbd>
35
+ * <Kbd>Ctrl+C</Kbd>
36
+ * <Kbd>Ctrl+V</Kbd>
37
+ * <Kbd>Enter</Kbd>
38
+ * <Kbd>Esc</Kbd>
39
+ * <Kbd>Tab</Kbd>
40
+ * <Kbd>Space</Kbd>
41
+ * </Inline>
42
+ * ```
43
+ *
44
+ * @example
45
+ * ```tsx
46
+ * // In Menu items
47
+ * <Menu.Item
48
+ * leftSection={<RiSearchLine size={14} />}
49
+ * rightSection={<Kbd>⌘K</Kbd>}
50
+ * >
51
+ * Search
52
+ * </Menu.Item>
53
+ * ```
54
+ */
55
+ export const Kbd = forwardRef(({ children, size = 'sm', ...props }, ref) => {
56
+ return (_jsx(MantineKbd, { ref: ref, size: size, ...props, children: children }));
57
+ });
58
+ Kbd.displayName = 'Kbd';
@@ -0,0 +1,8 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Text as MantineText } from '@mantine/core';
4
+ import { forwardRef } from 'react';
5
+ export const Text = forwardRef(({ children, size = 'sm', fz, ...props }, ref) => {
6
+ return (_jsx(MantineText, { ref: ref, fz: fz || size, ...props, children: children }));
7
+ });
8
+ Text.displayName = 'Text';
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Title as MantineTitle } from '@mantine/core';
4
+ import { forwardRef } from 'react';
5
+ export const Title = forwardRef(({ children, size, order = 2, fz, ...props }, ref) => {
6
+ // Only override font size if explicitly provided via fz or size
7
+ // Otherwise, let Mantine handle the semantic sizing based on order
8
+ const fontSize = fz || size;
9
+ return (_jsx(MantineTitle, { ref: ref, order: order, fz: fontSize, ...props, children: children }));
10
+ });
11
+ Title.displayName = 'Title';
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Typography Components
3
+ *
4
+ * Components for displaying text, keyboard shortcuts, and typographic elements
5
+ */
6
+ export { Kbd } from './Kbd.js';
7
+ export { Code } from './Code.js';
8
+ export { Text } from './Text.js';
9
+ export { Title } from './Title.js';
10
+ // Future typography component exports will go here:
11
+ // export { Text } from './Text.js';
12
+ // export { Title } from './Title.js';