@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
package/dist/config.ts ADDED
@@ -0,0 +1,226 @@
1
+ /**
2
+ * Design System Configuration
3
+ *
4
+ * This file contains the core configuration for the design system,
5
+ * including design tokens, component variants, and shared styling.
6
+ */
7
+
8
+ import { MantineColorsTuple } from '@mantine/core';
9
+
10
+ // ========================== DESIGN TOKENS ==========================
11
+
12
+ /**
13
+ * Design system color palette
14
+ * Extends Mantine's default colors with custom brand colors
15
+ */
16
+ export const designSystemColors = {
17
+ // Custom brand colors
18
+ primary: [
19
+ '#e8f4fd',
20
+ '#d0e7fb',
21
+ '#9fccf4',
22
+ '#6badee',
23
+ '#4394e9',
24
+ '#2d87e6',
25
+ '#2080e6',
26
+ '#1b6fd0',
27
+ '#1864bc',
28
+ '#1357a7'
29
+ ] as MantineColorsTuple,
30
+
31
+ secondary: [
32
+ '#f0f9ff',
33
+ '#e0f2fe',
34
+ '#bae6fd',
35
+ '#7dd3fc',
36
+ '#38bdf8',
37
+ '#0ea5e9',
38
+ '#0284c7',
39
+ '#0369a1',
40
+ '#075985',
41
+ '#0c4a6e'
42
+ ] as MantineColorsTuple,
43
+ };
44
+
45
+ /**
46
+ * Pixel lookup for the layout spacing scale (not a second runtime scale).
47
+ * Mantine Core `xs–xl` plus added `none` / `xxs` / `xxl`. Layout primitives
48
+ * pass `gap` through to Mantine; `styles/theme.ts` adds the extra keys.
49
+ */
50
+ export const spacing = {
51
+ none: '0px',
52
+ xxs: '4px',
53
+ xs: '10px',
54
+ sm: '12px',
55
+ md: '16px',
56
+ lg: '20px',
57
+ xl: '32px',
58
+ xxl: '48px',
59
+ } as const;
60
+
61
+
62
+
63
+ /**
64
+ * Design system typography scale
65
+ * Font sizes, weights, and line heights
66
+ */
67
+ export const typography = {
68
+ fontSizes: {
69
+ xs: '12px',
70
+ sm: '14px',
71
+ md: '16px',
72
+ lg: '18px',
73
+ xl: '20px',
74
+ xxl: '24px',
75
+ },
76
+ fontWeights: {
77
+ normal: 400,
78
+ medium: 500,
79
+ semibold: 600,
80
+ bold: 700,
81
+ },
82
+ lineHeights: {
83
+ tight: 1.2,
84
+ normal: 1.5,
85
+ loose: 1.8,
86
+ },
87
+ } as const;
88
+
89
+ /**
90
+ * Design system border radius values
91
+ * Consistent border radius for components
92
+ */
93
+ export const borderRadius = {
94
+ none: '0px',
95
+ sm: '4px',
96
+ md: '8px',
97
+ lg: '12px',
98
+ xl: '16px',
99
+ full: '9999px',
100
+ } as const;
101
+
102
+ /**
103
+ * Design system shadows
104
+ * Box shadow definitions for elevation
105
+ */
106
+ export const shadows = {
107
+ none: 'none',
108
+ sm: '0 1px 2px 0 rgb(0 0 0 / 0.05)',
109
+ md: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)',
110
+ lg: '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',
111
+ xl: '0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)',
112
+ } as const;
113
+
114
+ // ========================== COMPONENT VARIANTS ==========================
115
+
116
+ /**
117
+ * Button component variants
118
+ * Consistent button styling across the design system
119
+ */
120
+ export const buttonVariants = {
121
+ primary: {
122
+ backgroundColor: '#326fde',
123
+ color: '#ffffff',
124
+ borderRadius: '4px',
125
+ fontFamily: 'Inter, sans-serif',
126
+ fontWeight: 600,
127
+ '&:hover': {
128
+ backgroundColor: '#2a5dc4',
129
+ },
130
+ },
131
+ secondary: {
132
+ backgroundColor: 'var(--mantine-color-gray-1)',
133
+ color: 'var(--mantine-color-gray-8)',
134
+ border: '1px solid var(--mantine-color-gray-3)',
135
+ '&:hover': {
136
+ backgroundColor: 'var(--mantine-color-gray-2)',
137
+ },
138
+ },
139
+ ghost: {
140
+ backgroundColor: 'transparent',
141
+ color: 'var(--mantine-color-gray-7)',
142
+ '&:hover': {
143
+ backgroundColor: 'var(--mantine-color-gray-1)',
144
+ },
145
+ },
146
+ } as const;
147
+
148
+ /**
149
+ * Input component variants
150
+ * Consistent input styling across the design system
151
+ */
152
+ export const inputVariants = {
153
+ default: {
154
+ borderColor: 'var(--mantine-color-gray-3)',
155
+ '&:focus': {
156
+ borderColor: 'var(--mantine-color-primary-6)',
157
+ },
158
+ },
159
+ error: {
160
+ borderColor: 'var(--mantine-color-red-6)',
161
+ '&:focus': {
162
+ borderColor: 'var(--mantine-color-red-6)',
163
+ },
164
+ },
165
+ success: {
166
+ borderColor: 'var(--mantine-color-green-6)',
167
+ '&:focus': {
168
+ borderColor: 'var(--mantine-color-green-6)',
169
+ },
170
+ },
171
+ } as const;
172
+
173
+ // ========================== COMMON PROPS ==========================
174
+ // Size tokens are canonically defined in types.ts (DS_SIZES / DSSize).
175
+ // Re-exported here for backward compatibility with existing component imports.
176
+
177
+ export { DS_SIZES as componentSizes } from './types';
178
+ export type { DSSize as ComponentSize } from './types';
179
+
180
+ /**
181
+ * Mantine color palette names accepted by components that pass through
182
+ * to Mantine's color prop. Distinct from semantic colors in types.ts.
183
+ */
184
+ export const componentColors = [
185
+ 'primary',
186
+ 'secondary',
187
+ 'gray',
188
+ 'red',
189
+ 'pink',
190
+ 'grape',
191
+ 'violet',
192
+ 'indigo',
193
+ 'blue',
194
+ 'cyan',
195
+ 'teal',
196
+ 'green',
197
+ 'lime',
198
+ 'yellow',
199
+ 'orange',
200
+ ] as const;
201
+ export type ComponentColor = typeof componentColors[number];
202
+
203
+ // ========================== DESIGN SYSTEM UTILITIES ==========================
204
+
205
+ /**
206
+ * Get consistent spacing value
207
+ */
208
+ export const getSpacing = (size: keyof typeof spacing) => spacing[size];
209
+
210
+ /**
211
+ * Get consistent border radius value
212
+ */
213
+ export const getBorderRadius = (size: keyof typeof borderRadius) => borderRadius[size];
214
+
215
+ /**
216
+ * Get consistent shadow value
217
+ */
218
+ export const getShadow = (size: keyof typeof shadows) => shadows[size];
219
+
220
+ /**
221
+ * Generate component class names with AppDirect Design System prefix
222
+ */
223
+ export const addsClassName = (component: string, modifier?: string) => {
224
+ const base = `adds-${component}`;
225
+ return modifier ? `${base}--${modifier}` : base;
226
+ };
@@ -0,0 +1,80 @@
1
+ {
2
+ "$schema": "../contracts/ds-component-contract.v1.json",
3
+ "id": "Alert",
4
+ "kind": "wrapper",
5
+ "version": "0.2.6",
6
+ "purpose": "Inline status message. Use pending, not warning.",
7
+ "importFrom": [
8
+ "@appdirect/design-system"
9
+ ],
10
+ "mantineCounterpart": "Alert",
11
+ "anatomy": [
12
+ "root",
13
+ "icon",
14
+ "title",
15
+ "children",
16
+ "closeButton"
17
+ ],
18
+ "api": {
19
+ "props": {
20
+ "color": {
21
+ "enum": [
22
+ "info",
23
+ "success",
24
+ "danger",
25
+ "pending",
26
+ "default"
27
+ ],
28
+ "default": "default",
29
+ "notes": "No warning. Use pending for caution/in-progress."
30
+ },
31
+ "type": {
32
+ "enum": [
33
+ "info",
34
+ "success",
35
+ "danger",
36
+ "pending",
37
+ "default"
38
+ ],
39
+ "deprecated": true,
40
+ "replacement": "color"
41
+ },
42
+ "variant": {
43
+ "fixed": "light",
44
+ "consumerOverride": false
45
+ },
46
+ "radius": {
47
+ "fixed": "sm",
48
+ "consumerOverride": false
49
+ },
50
+ "title": {
51
+ "type": "string"
52
+ },
53
+ "withCloseButton": {
54
+ "type": "boolean",
55
+ "default": false
56
+ },
57
+ "icon": {
58
+ "type": "ReactNode",
59
+ "notes": "Overrides the semantic default icon"
60
+ }
61
+ }
62
+ },
63
+ "deprecatedPatterns": [
64
+ "import { Alert } from '@mantine/core'",
65
+ "color=\"warning\"",
66
+ "type=\"warning\""
67
+ ],
68
+ "enforcement": {
69
+ "deterministic": [
70
+ "importFrom",
71
+ "api.props.color.enum",
72
+ "api.props.type.deprecated",
73
+ "api.props.variant.fixed",
74
+ "api.props.radius.fixed"
75
+ ],
76
+ "semantic": [
77
+ "purpose"
78
+ ]
79
+ }
80
+ }
@@ -0,0 +1,78 @@
1
+ {
2
+ "$schema": "../contracts/ds-component-contract.v1.json",
3
+ "id": "Badge",
4
+ "kind": "wrapper",
5
+ "version": "0.2.6",
6
+ "purpose": "Compact status or category label. Not a button.",
7
+ "importFrom": [
8
+ "@appdirect/design-system"
9
+ ],
10
+ "mantineCounterpart": "Badge",
11
+ "anatomy": [
12
+ "root",
13
+ "children"
14
+ ],
15
+ "api": {
16
+ "props": {
17
+ "variant": {
18
+ "enum": [
19
+ "filled",
20
+ "outline",
21
+ "info",
22
+ "success",
23
+ "danger",
24
+ "pending",
25
+ "default",
26
+ "warning"
27
+ ],
28
+ "default": "filled",
29
+ "notes": "Semantic names (info/success/danger/pending/warning/default) also act as color shortcuts when color is default. Only filled and outline map to Mantine variants."
30
+ },
31
+ "color": {
32
+ "enum": [
33
+ "info",
34
+ "success",
35
+ "danger",
36
+ "pending",
37
+ "default",
38
+ "warning",
39
+ "blue",
40
+ "green",
41
+ "red",
42
+ "yellow",
43
+ "gray"
44
+ ],
45
+ "default": "default"
46
+ },
47
+ "size": {
48
+ "enum": [
49
+ "xs",
50
+ "sm",
51
+ "md",
52
+ "lg",
53
+ "xl"
54
+ ],
55
+ "default": "md"
56
+ },
57
+ "radius": {
58
+ "fixed": "sm",
59
+ "consumerOverride": false
60
+ }
61
+ }
62
+ },
63
+ "deprecatedPatterns": [
64
+ "import { Badge } from '@mantine/core'"
65
+ ],
66
+ "enforcement": {
67
+ "deterministic": [
68
+ "importFrom",
69
+ "api.props.variant.enum",
70
+ "api.props.color.enum",
71
+ "api.props.size.enum",
72
+ "api.props.radius.fixed"
73
+ ],
74
+ "semantic": [
75
+ "purpose"
76
+ ]
77
+ }
78
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "../contracts/ds-component-contract.v1.json",
3
+ "id": "Box",
4
+ "kind": "wrapper",
5
+ "version": "0.2.6",
6
+ "purpose": "Flexible container primitive for spacing and color tokens when Stack/Inline/Grid do not apply.",
7
+ "importFrom": [
8
+ "@appdirect/design-system"
9
+ ],
10
+ "mantineCounterpart": "Box",
11
+ "api": {
12
+ "props": {
13
+ "p": {
14
+ "enum": [
15
+ "none",
16
+ "xxs",
17
+ "xs",
18
+ "sm",
19
+ "md",
20
+ "lg",
21
+ "xl",
22
+ "xxl"
23
+ ],
24
+ "notes": "Also accepts string | number passthrough."
25
+ },
26
+ "m": {
27
+ "enum": [
28
+ "none",
29
+ "xxs",
30
+ "xs",
31
+ "sm",
32
+ "md",
33
+ "lg",
34
+ "xl",
35
+ "xxl"
36
+ ]
37
+ }
38
+ }
39
+ },
40
+ "deprecatedPatterns": [
41
+ "import { Box } from '@mantine/core'"
42
+ ],
43
+ "enforcement": {
44
+ "deterministic": [
45
+ "importFrom",
46
+ "api.props.p.enum"
47
+ ],
48
+ "semantic": [
49
+ "purpose"
50
+ ]
51
+ }
52
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "$schema": "../contracts/ds-component-contract.v1.json",
3
+ "id": "Button",
4
+ "kind": "wrapper",
5
+ "version": "0.2.6",
6
+ "purpose": "Submit or trigger an action. Not for navigation or icon-only controls.",
7
+ "importFrom": [
8
+ "@appdirect/design-system"
9
+ ],
10
+ "mantineCounterpart": "Button",
11
+ "anatomy": [
12
+ "root",
13
+ "children",
14
+ "leftSection",
15
+ "rightSection"
16
+ ],
17
+ "api": {
18
+ "props": {
19
+ "variant": {
20
+ "enum": [
21
+ "primary",
22
+ "secondary",
23
+ "default",
24
+ "disabled",
25
+ "link",
26
+ "secret",
27
+ "outline",
28
+ "danger"
29
+ ],
30
+ "default": "default",
31
+ "notes": "disabled is a state alias: maps to Mantine default + disabled={true}"
32
+ },
33
+ "size": {
34
+ "enum": [
35
+ "xs",
36
+ "sm",
37
+ "md",
38
+ "lg",
39
+ "xl"
40
+ ],
41
+ "default": "sm"
42
+ },
43
+ "radius": {
44
+ "fixed": "sm",
45
+ "consumerOverride": false
46
+ },
47
+ "color": {
48
+ "deprecated": true,
49
+ "ignored": true
50
+ },
51
+ "loading": {
52
+ "type": "boolean"
53
+ },
54
+ "disabled": {
55
+ "type": "boolean"
56
+ },
57
+ "fullWidth": {
58
+ "type": "boolean"
59
+ },
60
+ "leftSection": {
61
+ "type": "ReactNode"
62
+ },
63
+ "rightSection": {
64
+ "type": "ReactNode"
65
+ },
66
+ "children": {
67
+ "required": true,
68
+ "type": "ReactNode"
69
+ }
70
+ }
71
+ },
72
+ "states": [
73
+ "enabled",
74
+ "hover",
75
+ "active",
76
+ "disabled",
77
+ "loading"
78
+ ],
79
+ "composition": {
80
+ "preferInstead": {
81
+ "iconOnly": "ActionIcon",
82
+ "navigation": "NavLink or Anchor/Text link variant"
83
+ }
84
+ },
85
+ "content": {
86
+ "maxPrimaryPerView": 1
87
+ },
88
+ "deprecatedPatterns": [
89
+ "import { Button } from '@mantine/core'",
90
+ "variant=\"disabled\"",
91
+ "color=\"blue\"",
92
+ "radius=\"xl\""
93
+ ],
94
+ "exceptions": {
95
+ "producerCssModule": "components/DesignSystem/Buttons/Button.module.css is allowed in the kit, not in prototypes"
96
+ },
97
+ "enforcement": {
98
+ "deterministic": [
99
+ "importFrom",
100
+ "api.props.variant.enum",
101
+ "api.props.size.enum",
102
+ "api.props.radius.fixed",
103
+ "api.props.color.deprecated"
104
+ ],
105
+ "semantic": [
106
+ "purpose",
107
+ "composition",
108
+ "content.maxPrimaryPerView"
109
+ ]
110
+ }
111
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "$schema": "../../contracts/ds-component-contract.v1.json",
3
+ "id": "DataTable",
4
+ "kind": "complex",
5
+ "version": "0.2.6",
6
+ "purpose": "Sortable, filterable, paginated record table. AppDirect composition over mantine-react-table-open, not a Mantine Table wrapper.",
7
+ "importFrom": [
8
+ "@appdirect/design-system"
9
+ ],
10
+ "mantineCounterpart": null,
11
+ "anatomy": [
12
+ "paper",
13
+ "toolbar",
14
+ "table",
15
+ "pagination"
16
+ ],
17
+ "api": {
18
+ "props": {
19
+ "data": {
20
+ "type": "array",
21
+ "required": true
22
+ },
23
+ "columns": {
24
+ "type": "array",
25
+ "required": true
26
+ },
27
+ "totalCount": {
28
+ "type": "number"
29
+ },
30
+ "isLoading": {
31
+ "type": "boolean"
32
+ },
33
+ "isError": {
34
+ "type": "boolean"
35
+ },
36
+ "showFilters": {
37
+ "type": "boolean"
38
+ },
39
+ "showSearch": {
40
+ "type": "boolean"
41
+ }
42
+ }
43
+ },
44
+ "composition": {
45
+ "mustUseFor": [
46
+ "sortable/filterable/paginated record lists"
47
+ ],
48
+ "preferInstead": {
49
+ "staticMarkup": "Table",
50
+ "handmadeRecordList": "DataTable or Table, not stacked Card/Inline rows of records"
51
+ },
52
+ "notes": "Static dummy lists may use Table, not DataTable."
53
+ },
54
+ "enforcement": {
55
+ "deterministic": [
56
+ "importFrom",
57
+ "kind",
58
+ "mantineCounterpart",
59
+ "api.props.data.required",
60
+ "api.props.columns.required"
61
+ ],
62
+ "semantic": [
63
+ "purpose",
64
+ "composition.mustUseFor",
65
+ "composition.preferInstead.staticMarkup"
66
+ ]
67
+ }
68
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "../contracts/ds-component-contract.v1.json",
3
+ "id": "Grid",
4
+ "kind": "wrapper",
5
+ "version": "0.2.6",
6
+ "purpose": "Responsive 12-column grid. Use Grid.Col for explicit spans.",
7
+ "importFrom": [
8
+ "@appdirect/design-system"
9
+ ],
10
+ "mantineCounterpart": "Grid",
11
+ "anatomy": [
12
+ "root",
13
+ "Col"
14
+ ],
15
+ "api": {
16
+ "props": {
17
+ "columns": {
18
+ "type": "number",
19
+ "notes": "Mantine 12-column grid"
20
+ }
21
+ }
22
+ },
23
+ "deprecatedPatterns": [
24
+ "import { Grid } from '@mantine/core'",
25
+ "import { SimpleGrid } from '@mantine/core'"
26
+ ],
27
+ "enforcement": {
28
+ "deterministic": [
29
+ "importFrom"
30
+ ],
31
+ "semantic": [
32
+ "purpose"
33
+ ]
34
+ }
35
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "$schema": "../contracts/ds-component-contract.v1.json",
3
+ "id": "Group",
4
+ "kind": "wrapper",
5
+ "version": "0.2.6",
6
+ "purpose": "Mantine-named alias of Inline. Prefer Inline for new Figma-mapped and prototype code.",
7
+ "importFrom": [
8
+ "@appdirect/design-system"
9
+ ],
10
+ "mantineCounterpart": "Group",
11
+ "aliasOf": "Inline",
12
+ "api": {
13
+ "props": {
14
+ "gap": {
15
+ "enum": [
16
+ "none",
17
+ "xxs",
18
+ "xs",
19
+ "sm",
20
+ "md",
21
+ "lg",
22
+ "xl",
23
+ "xxl"
24
+ ],
25
+ "default": "md"
26
+ }
27
+ }
28
+ },
29
+ "composition": {
30
+ "preferInstead": {
31
+ "newCode": "Inline"
32
+ }
33
+ },
34
+ "enforcement": {
35
+ "deterministic": [
36
+ "importFrom",
37
+ "api.props.gap.enum",
38
+ "aliasOf"
39
+ ],
40
+ "semantic": [
41
+ "composition.preferInstead.newCode"
42
+ ]
43
+ }
44
+ }