@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.
Files changed (130) hide show
  1. package/README.md +12 -2
  2. package/dist/Buttons/ActionIcon.tsx +37 -0
  3. package/dist/Buttons/Button.module.css +5 -0
  4. package/dist/Buttons/Button.tsx +124 -0
  5. package/dist/Buttons/CloseButton.tsx +83 -0
  6. package/dist/Buttons/index.ts +20 -0
  7. package/dist/Combobox/AutocompleteClearable.tsx +128 -0
  8. package/dist/Combobox/Combobox.tsx +37 -0
  9. package/dist/Combobox/Multiselect.tsx +158 -0
  10. package/dist/Combobox/SearchableSelect.tsx +131 -0
  11. package/dist/Combobox/Select.tsx +154 -0
  12. package/dist/Combobox/index.ts +20 -0
  13. package/dist/ComplexComponents/DashboardWidget/DashboardWidget.tsx +313 -0
  14. package/dist/ComplexComponents/DashboardWidget/index.ts +2 -0
  15. package/dist/ComplexComponents/DataTable/CustomBottomToolbar/index.tsx +177 -0
  16. package/dist/ComplexComponents/DataTable/CustomBottomToolbar/utils.ts +35 -0
  17. package/dist/ComplexComponents/DataTable/CustomToolbarAlertBannerContent/index.tsx +74 -0
  18. package/dist/ComplexComponents/DataTable/CustomTopToolbar/DateRangeSelectorFilter/index.tsx +358 -0
  19. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterChip.tsx +48 -0
  20. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/DateRangeFilter.tsx +26 -0
  21. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/FilterRenderer.tsx +71 -0
  22. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/FilterSystem.tsx +158 -0
  23. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/MultiSelectFilter.tsx +79 -0
  24. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/SingleSelectFilter.tsx +65 -0
  25. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/index.ts +70 -0
  26. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/types.ts +140 -0
  27. package/dist/ComplexComponents/DataTable/CustomTopToolbar/ResultCount/index.tsx +76 -0
  28. package/dist/ComplexComponents/DataTable/CustomTopToolbar/SearchFilter.tsx +73 -0
  29. package/dist/ComplexComponents/DataTable/CustomTopToolbar/SelectFilter.tsx +50 -0
  30. package/dist/ComplexComponents/DataTable/CustomTopToolbar/index.tsx +788 -0
  31. package/dist/ComplexComponents/DataTable/DataTable.tsx +582 -0
  32. package/dist/ComplexComponents/DataTable/ErrorOverlay/index.tsx +29 -0
  33. package/dist/ComplexComponents/DataTable/SortableHeaderCell/index.tsx +57 -0
  34. package/dist/ComplexComponents/DataTable/index.ts +2 -0
  35. package/dist/ComplexComponents/DataTable/translations/en.ts +115 -0
  36. package/dist/ComplexComponents/DataTable/translations/index.ts +23 -0
  37. package/dist/ComplexComponents/KeyInsight/KeyInsights.tsx +221 -0
  38. package/dist/ComplexComponents/KeyInsight/index.ts +2 -0
  39. package/dist/ComplexComponents/NameValue/NameValue.tsx +175 -0
  40. package/dist/ComplexComponents/NameValue/NameValueItem.tsx +100 -0
  41. package/dist/ComplexComponents/NameValue/index.ts +4 -0
  42. package/dist/ComplexComponents/PageContentHeader/DescriptionBlock.tsx +65 -0
  43. package/dist/ComplexComponents/PageContentHeader/PageContentHeader.tsx +383 -0
  44. package/dist/ComplexComponents/PageContentHeader/index.ts +4 -0
  45. package/dist/ComplexComponents/Utilities/CopyButton.tsx +82 -0
  46. package/dist/ComplexComponents/Utilities/index.ts +2 -0
  47. package/dist/DataDisplay/Alert.tsx +130 -0
  48. package/dist/DataDisplay/Avatar.tsx +216 -0
  49. package/dist/DataDisplay/Badge.tsx +119 -0
  50. package/dist/DataDisplay/Card.module.css +26 -0
  51. package/dist/DataDisplay/Card.tsx +163 -0
  52. package/dist/DataDisplay/Chip.tsx +66 -0
  53. package/dist/DataDisplay/Indicator.tsx +122 -0
  54. package/dist/DataDisplay/List.tsx +90 -0
  55. package/dist/DataDisplay/Pill.tsx +125 -0
  56. package/dist/DataDisplay/Progress.tsx +77 -0
  57. package/dist/DataDisplay/Table.tsx +57 -0
  58. package/dist/DataDisplay/ThemeIcon.tsx +67 -0
  59. package/dist/DataDisplay/index.ts +41 -0
  60. package/dist/Inputs/Checkbox.tsx +94 -0
  61. package/dist/Inputs/ColorInput.tsx +124 -0
  62. package/dist/Inputs/DropZone.tsx +78 -0
  63. package/dist/Inputs/FileInput.tsx +120 -0
  64. package/dist/Inputs/NumberInput.tsx +125 -0
  65. package/dist/Inputs/Radio.tsx +86 -0
  66. package/dist/Inputs/RadioGroup.tsx +90 -0
  67. package/dist/Inputs/SegmentedControl.tsx +64 -0
  68. package/dist/Inputs/Slider.tsx +69 -0
  69. package/dist/Inputs/Switch.tsx +67 -0
  70. package/dist/Inputs/TextArea.tsx +126 -0
  71. package/dist/Inputs/TextInput.tsx +167 -0
  72. package/dist/Inputs/index.ts +51 -0
  73. package/dist/Layout/Box.tsx +82 -0
  74. package/dist/Layout/Center.tsx +17 -0
  75. package/dist/Layout/Container.tsx +17 -0
  76. package/dist/Layout/Flex.tsx +18 -0
  77. package/dist/Layout/Grid.tsx +31 -0
  78. package/dist/Layout/Group.tsx +54 -0
  79. package/dist/Layout/Inline.tsx +86 -0
  80. package/dist/Layout/SimpleGrid.tsx +50 -0
  81. package/dist/Layout/Stack.tsx +86 -0
  82. package/dist/Layout/index.ts +29 -0
  83. package/dist/Misc/Divider.tsx +27 -0
  84. package/dist/Misc/Paper.tsx +47 -0
  85. package/dist/Misc/index.ts +15 -0
  86. package/dist/Navigation/Breadcrumb.tsx +138 -0
  87. package/dist/Navigation/NavLink.tsx +37 -0
  88. package/dist/Navigation/Stepper.tsx +17 -0
  89. package/dist/Navigation/Tabs.tsx +29 -0
  90. package/dist/Navigation/index.ts +17 -0
  91. package/dist/Overlays/Drawer.tsx +123 -0
  92. package/dist/Overlays/Menu.tsx +192 -0
  93. package/dist/Overlays/Modal.tsx +159 -0
  94. package/dist/Overlays/Popover.tsx +319 -0
  95. package/dist/Overlays/Tooltip.tsx +131 -0
  96. package/dist/Overlays/index.ts +19 -0
  97. package/dist/Shell/AppShellLayout.tsx +56 -0
  98. package/dist/Shell/HeaderBar.tsx +26 -0
  99. package/dist/Shell/SidebarNav.tsx +47 -0
  100. package/dist/Shell/SidebarNavLink.tsx +50 -0
  101. package/dist/Shell/SingleColumnLayout.tsx +22 -0
  102. package/dist/Shell/TertiaryColumnLayout.tsx +32 -0
  103. package/dist/Shell/index.ts +17 -0
  104. package/dist/Typography/Code.tsx +27 -0
  105. package/dist/Typography/Kbd.tsx +87 -0
  106. package/dist/Typography/Text.tsx +27 -0
  107. package/dist/Typography/Title.tsx +34 -0
  108. package/dist/Typography/index.ts +21 -0
  109. package/dist/bin/ds-audit.js +521 -0
  110. package/dist/config.ts +226 -0
  111. package/dist/contracts/Alert.json +80 -0
  112. package/dist/contracts/Badge.json +78 -0
  113. package/dist/contracts/Box.json +52 -0
  114. package/dist/contracts/Button.json +111 -0
  115. package/dist/contracts/DataTable.json +68 -0
  116. package/dist/contracts/Grid.json +35 -0
  117. package/dist/contracts/Group.json +44 -0
  118. package/dist/contracts/Inline.json +73 -0
  119. package/dist/contracts/PageContentHeader.json +107 -0
  120. package/dist/contracts/Stack.json +62 -0
  121. package/dist/contracts/ds-component-contract.v1.json +23 -0
  122. package/dist/contracts/index.json +55 -0
  123. package/dist/css/foundations.css +703 -0
  124. package/dist/css/mantine.css +1777 -0
  125. package/dist/hooks/useTableHandlers.ts +179 -0
  126. package/dist/hooks/useTableRenderFunctions.tsx +283 -0
  127. package/dist/hooks/useTableState.ts +81 -0
  128. package/dist/index.ts +210 -0
  129. package/dist/types.ts +202 -0
  130. 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';