@appdirect/design-system 0.0.0-stage → 0.0.2
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 +12 -2
- package/dist/Buttons/ActionIcon.tsx +37 -0
- package/dist/Buttons/Button.module.css +5 -0
- package/dist/Buttons/Button.tsx +124 -0
- package/dist/Buttons/CloseButton.tsx +83 -0
- package/dist/Buttons/index.ts +20 -0
- package/dist/Combobox/AutocompleteClearable.tsx +128 -0
- package/dist/Combobox/Combobox.tsx +37 -0
- package/dist/Combobox/Multiselect.tsx +158 -0
- package/dist/Combobox/SearchableSelect.tsx +131 -0
- package/dist/Combobox/Select.tsx +154 -0
- package/dist/Combobox/index.ts +20 -0
- package/dist/ComplexComponents/DashboardWidget/DashboardWidget.tsx +313 -0
- package/dist/ComplexComponents/DashboardWidget/index.ts +2 -0
- package/dist/ComplexComponents/DataTable/CustomBottomToolbar/index.tsx +177 -0
- package/dist/ComplexComponents/DataTable/CustomBottomToolbar/utils.ts +35 -0
- package/dist/ComplexComponents/DataTable/CustomToolbarAlertBannerContent/index.tsx +74 -0
- package/dist/ComplexComponents/DataTable/CustomTopToolbar/DateRangeSelectorFilter/index.tsx +358 -0
- package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterChip.tsx +48 -0
- package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/DateRangeFilter.tsx +26 -0
- package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/FilterRenderer.tsx +71 -0
- package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/FilterSystem.tsx +158 -0
- package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/MultiSelectFilter.tsx +79 -0
- package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/SingleSelectFilter.tsx +65 -0
- package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/index.ts +70 -0
- package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/types.ts +140 -0
- package/dist/ComplexComponents/DataTable/CustomTopToolbar/ResultCount/index.tsx +76 -0
- package/dist/ComplexComponents/DataTable/CustomTopToolbar/SearchFilter.tsx +73 -0
- package/dist/ComplexComponents/DataTable/CustomTopToolbar/SelectFilter.tsx +50 -0
- package/dist/ComplexComponents/DataTable/CustomTopToolbar/index.tsx +788 -0
- package/dist/ComplexComponents/DataTable/DataTable.tsx +582 -0
- package/dist/ComplexComponents/DataTable/ErrorOverlay/index.tsx +29 -0
- package/dist/ComplexComponents/DataTable/SortableHeaderCell/index.tsx +57 -0
- package/dist/ComplexComponents/DataTable/index.ts +2 -0
- package/dist/ComplexComponents/DataTable/translations/en.ts +115 -0
- package/dist/ComplexComponents/DataTable/translations/index.ts +23 -0
- package/dist/ComplexComponents/KeyInsight/KeyInsights.tsx +221 -0
- package/dist/ComplexComponents/KeyInsight/index.ts +2 -0
- package/dist/ComplexComponents/NameValue/NameValue.tsx +175 -0
- package/dist/ComplexComponents/NameValue/NameValueItem.tsx +100 -0
- package/dist/ComplexComponents/NameValue/index.ts +4 -0
- package/dist/ComplexComponents/PageContentHeader/DescriptionBlock.tsx +65 -0
- package/dist/ComplexComponents/PageContentHeader/PageContentHeader.tsx +383 -0
- package/dist/ComplexComponents/PageContentHeader/index.ts +4 -0
- package/dist/ComplexComponents/Utilities/CopyButton.tsx +82 -0
- package/dist/ComplexComponents/Utilities/index.ts +2 -0
- package/dist/DataDisplay/Alert.tsx +130 -0
- package/dist/DataDisplay/Avatar.tsx +216 -0
- package/dist/DataDisplay/Badge.tsx +119 -0
- package/dist/DataDisplay/Card.module.css +26 -0
- package/dist/DataDisplay/Card.tsx +163 -0
- package/dist/DataDisplay/Chip.tsx +66 -0
- package/dist/DataDisplay/Indicator.tsx +122 -0
- package/dist/DataDisplay/List.tsx +90 -0
- package/dist/DataDisplay/Pill.tsx +125 -0
- package/dist/DataDisplay/Progress.tsx +77 -0
- package/dist/DataDisplay/Table.tsx +57 -0
- package/dist/DataDisplay/ThemeIcon.tsx +67 -0
- package/dist/DataDisplay/index.ts +41 -0
- package/dist/Inputs/Checkbox.tsx +94 -0
- package/dist/Inputs/ColorInput.tsx +124 -0
- package/dist/Inputs/DropZone.tsx +78 -0
- package/dist/Inputs/FileInput.tsx +120 -0
- package/dist/Inputs/NumberInput.tsx +125 -0
- package/dist/Inputs/Radio.tsx +86 -0
- package/dist/Inputs/RadioGroup.tsx +90 -0
- package/dist/Inputs/SegmentedControl.tsx +64 -0
- package/dist/Inputs/Slider.tsx +69 -0
- package/dist/Inputs/Switch.tsx +67 -0
- package/dist/Inputs/TextArea.tsx +126 -0
- package/dist/Inputs/TextInput.tsx +167 -0
- package/dist/Inputs/index.ts +51 -0
- package/dist/Layout/Box.tsx +82 -0
- package/dist/Layout/Center.tsx +17 -0
- package/dist/Layout/Container.tsx +17 -0
- package/dist/Layout/Flex.tsx +18 -0
- package/dist/Layout/Grid.tsx +31 -0
- package/dist/Layout/Group.tsx +54 -0
- package/dist/Layout/Inline.tsx +86 -0
- package/dist/Layout/SimpleGrid.tsx +50 -0
- package/dist/Layout/Stack.tsx +86 -0
- package/dist/Layout/index.ts +29 -0
- package/dist/Misc/Divider.tsx +27 -0
- package/dist/Misc/Paper.tsx +47 -0
- package/dist/Misc/index.ts +15 -0
- package/dist/Navigation/Breadcrumb.tsx +138 -0
- package/dist/Navigation/NavLink.tsx +37 -0
- package/dist/Navigation/Stepper.tsx +17 -0
- package/dist/Navigation/Tabs.tsx +29 -0
- package/dist/Navigation/index.ts +17 -0
- package/dist/Overlays/Drawer.tsx +123 -0
- package/dist/Overlays/Menu.tsx +192 -0
- package/dist/Overlays/Modal.tsx +159 -0
- package/dist/Overlays/Popover.tsx +319 -0
- package/dist/Overlays/Tooltip.tsx +131 -0
- package/dist/Overlays/index.ts +19 -0
- package/dist/Shell/AppShellLayout.tsx +56 -0
- package/dist/Shell/HeaderBar.tsx +26 -0
- package/dist/Shell/SidebarNav.tsx +47 -0
- package/dist/Shell/SidebarNavLink.tsx +50 -0
- package/dist/Shell/SingleColumnLayout.tsx +22 -0
- package/dist/Shell/TertiaryColumnLayout.tsx +32 -0
- package/dist/Shell/index.ts +17 -0
- package/dist/Typography/Code.tsx +27 -0
- package/dist/Typography/Kbd.tsx +87 -0
- package/dist/Typography/Text.tsx +27 -0
- package/dist/Typography/Title.tsx +34 -0
- package/dist/Typography/index.ts +21 -0
- package/dist/bin/ds-audit.js +521 -0
- package/dist/config.ts +226 -0
- package/dist/contracts/Alert.json +80 -0
- package/dist/contracts/Badge.json +78 -0
- package/dist/contracts/Box.json +52 -0
- package/dist/contracts/Button.json +111 -0
- package/dist/contracts/DataTable.json +68 -0
- package/dist/contracts/Grid.json +35 -0
- package/dist/contracts/Group.json +44 -0
- package/dist/contracts/Inline.json +73 -0
- package/dist/contracts/PageContentHeader.json +107 -0
- package/dist/contracts/Stack.json +62 -0
- package/dist/contracts/ds-component-contract.v1.json +23 -0
- package/dist/contracts/index.json +55 -0
- package/dist/css/foundations.css +703 -0
- package/dist/css/mantine.css +1777 -0
- package/dist/hooks/useTableHandlers.ts +179 -0
- package/dist/hooks/useTableRenderFunctions.tsx +283 -0
- package/dist/hooks/useTableState.ts +81 -0
- package/dist/index.ts +210 -0
- package/dist/types.ts +202 -0
- package/package.json +56 -4
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { AppShellLayout } from './AppShellLayout';
|
|
2
|
+
export type { DSAppShellLayoutProps } from './AppShellLayout';
|
|
3
|
+
|
|
4
|
+
export { HeaderBar } from './HeaderBar';
|
|
5
|
+
export type { DSHeaderBarProps } from './HeaderBar';
|
|
6
|
+
|
|
7
|
+
export { SidebarNav } from './SidebarNav';
|
|
8
|
+
export type { DSSidebarNavProps, NavItem } from './SidebarNav';
|
|
9
|
+
|
|
10
|
+
export { SidebarNavLink } from './SidebarNavLink';
|
|
11
|
+
export type { DSSidebarNavLinkProps } from './SidebarNavLink';
|
|
12
|
+
|
|
13
|
+
export { SingleColumnLayout } from './SingleColumnLayout';
|
|
14
|
+
export type { DSSingleColumnLayoutProps } from './SingleColumnLayout';
|
|
15
|
+
|
|
16
|
+
export { TertiaryColumnLayout } from './TertiaryColumnLayout';
|
|
17
|
+
export type { DSTertiaryColumnLayoutProps } from './TertiaryColumnLayout';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Code as MantineCode, CodeProps as MantineCodeProps } from '@mantine/core';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
|
|
6
|
+
export interface DSCodeProps extends MantineCodeProps {
|
|
7
|
+
/** Code content */
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
/** Size of the code text - supports Mantine t-shirt sizes */
|
|
10
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const Code = forwardRef<HTMLElement, DSCodeProps>(
|
|
14
|
+
({ children, size = 'sm', fz, ...props }, ref) => {
|
|
15
|
+
return (
|
|
16
|
+
<MantineCode
|
|
17
|
+
ref={ref}
|
|
18
|
+
fz={fz || size}
|
|
19
|
+
{...props}
|
|
20
|
+
>
|
|
21
|
+
{children}
|
|
22
|
+
</MantineCode>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
Code.displayName = 'Code';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
4
|
+
import { Kbd as MantineKbd, KbdProps as MantineKbdProps } from '@mantine/core';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Enhanced Kbd props extending Mantine's KbdProps
|
|
8
|
+
*/
|
|
9
|
+
export interface DSKbdProps extends Omit<MantineKbdProps, 'children'> {
|
|
10
|
+
/** Keyboard key or combination to display */
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
/** Size of the keyboard key */
|
|
13
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* AppDirect Design System Kbd Component
|
|
18
|
+
*
|
|
19
|
+
* A keyboard key component built on top of Mantine's Kbd with
|
|
20
|
+
* consistent design system styling for displaying keyboard shortcuts.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* // Basic usage
|
|
25
|
+
* <Kbd>⌘K</Kbd>
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* // With different sizes
|
|
31
|
+
* <Inline gap="sm">
|
|
32
|
+
* <Kbd size="xs">Esc</Kbd>
|
|
33
|
+
* <Kbd size="sm">⌘K</Kbd>
|
|
34
|
+
* <Kbd size="md">Ctrl+C</Kbd>
|
|
35
|
+
* <Kbd size="lg">Enter</Kbd>
|
|
36
|
+
* </Inline>
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* // Common keyboard shortcuts
|
|
42
|
+
* <Inline gap="sm">
|
|
43
|
+
* <Kbd>⌘</Kbd>
|
|
44
|
+
* <Kbd>⌘K</Kbd>
|
|
45
|
+
* <Kbd>⌘⇧P</Kbd>
|
|
46
|
+
* <Kbd>Ctrl+C</Kbd>
|
|
47
|
+
* <Kbd>Ctrl+V</Kbd>
|
|
48
|
+
* <Kbd>Enter</Kbd>
|
|
49
|
+
* <Kbd>Esc</Kbd>
|
|
50
|
+
* <Kbd>Tab</Kbd>
|
|
51
|
+
* <Kbd>Space</Kbd>
|
|
52
|
+
* </Inline>
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```tsx
|
|
57
|
+
* // In Menu items
|
|
58
|
+
* <Menu.Item
|
|
59
|
+
* leftSection={<RiSearchLine size={14} />}
|
|
60
|
+
* rightSection={<Kbd>⌘K</Kbd>}
|
|
61
|
+
* >
|
|
62
|
+
* Search
|
|
63
|
+
* </Menu.Item>
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export const Kbd = forwardRef<HTMLElement, DSKbdProps>(
|
|
67
|
+
(
|
|
68
|
+
{
|
|
69
|
+
children,
|
|
70
|
+
size = 'sm',
|
|
71
|
+
...props
|
|
72
|
+
},
|
|
73
|
+
ref
|
|
74
|
+
) => {
|
|
75
|
+
return (
|
|
76
|
+
<MantineKbd
|
|
77
|
+
ref={ref}
|
|
78
|
+
size={size}
|
|
79
|
+
{...props}
|
|
80
|
+
>
|
|
81
|
+
{children}
|
|
82
|
+
</MantineKbd>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
Kbd.displayName = 'Kbd';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Text as MantineText, TextProps as MantineTextProps } from '@mantine/core';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
|
|
6
|
+
export interface DSTextProps extends MantineTextProps {
|
|
7
|
+
/** Text content */
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
/** Size of the text - supports Mantine t-shirt sizes */
|
|
10
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const Text = forwardRef<HTMLParagraphElement, DSTextProps>(
|
|
14
|
+
({ children, size = 'sm', fz, ...props }, ref) => {
|
|
15
|
+
return (
|
|
16
|
+
<MantineText
|
|
17
|
+
ref={ref}
|
|
18
|
+
fz={fz || size}
|
|
19
|
+
{...props}
|
|
20
|
+
>
|
|
21
|
+
{children}
|
|
22
|
+
</MantineText>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
Text.displayName = 'Text';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Title as MantineTitle, TitleProps as MantineTitleProps } from '@mantine/core';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
|
|
6
|
+
export interface DSTitleProps extends Omit<MantineTitleProps, 'size'> {
|
|
7
|
+
/** Title content */
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
/** Size of the title - supports Mantine t-shirt sizes. Only used when fz is not provided. */
|
|
10
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
11
|
+
/** HTML heading level (h1-h6) - automatically determines font size unless overridden */
|
|
12
|
+
order?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const Title = forwardRef<HTMLHeadingElement, DSTitleProps>(
|
|
16
|
+
({ children, size, order = 2, fz, ...props }, ref) => {
|
|
17
|
+
// Only override font size if explicitly provided via fz or size
|
|
18
|
+
// Otherwise, let Mantine handle the semantic sizing based on order
|
|
19
|
+
const fontSize = fz || size;
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<MantineTitle
|
|
23
|
+
ref={ref}
|
|
24
|
+
order={order}
|
|
25
|
+
fz={fontSize}
|
|
26
|
+
{...props}
|
|
27
|
+
>
|
|
28
|
+
{children}
|
|
29
|
+
</MantineTitle>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
Title.displayName = 'Title';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typography Components
|
|
3
|
+
*
|
|
4
|
+
* Components for displaying text, keyboard shortcuts, and typographic elements
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export { Kbd } from './Kbd';
|
|
8
|
+
export type { DSKbdProps } from './Kbd';
|
|
9
|
+
|
|
10
|
+
export { Code } from './Code';
|
|
11
|
+
export type { DSCodeProps } from './Code';
|
|
12
|
+
|
|
13
|
+
export { Text } from './Text';
|
|
14
|
+
export type { DSTextProps } from './Text';
|
|
15
|
+
|
|
16
|
+
export { Title } from './Title';
|
|
17
|
+
export type { DSTitleProps } from './Title';
|
|
18
|
+
|
|
19
|
+
// Future typography component exports will go here:
|
|
20
|
+
// export { Text } from './Text';
|
|
21
|
+
// export { Title } from './Title';
|