@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,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../contracts/ds-component-contract.v1.json",
|
|
3
|
+
"id": "Inline",
|
|
4
|
+
"kind": "wrapper",
|
|
5
|
+
"version": "0.2.6",
|
|
6
|
+
"purpose": "Horizontal layout primitive for new Figma-mapped and prototype code (flex-direction: row).",
|
|
7
|
+
"importFrom": [
|
|
8
|
+
"@appdirect/design-system"
|
|
9
|
+
],
|
|
10
|
+
"mantineCounterpart": "Group",
|
|
11
|
+
"aliasedBy": [
|
|
12
|
+
"Group"
|
|
13
|
+
],
|
|
14
|
+
"api": {
|
|
15
|
+
"props": {
|
|
16
|
+
"gap": {
|
|
17
|
+
"enum": [
|
|
18
|
+
"none",
|
|
19
|
+
"xxs",
|
|
20
|
+
"xs",
|
|
21
|
+
"sm",
|
|
22
|
+
"md",
|
|
23
|
+
"lg",
|
|
24
|
+
"xl",
|
|
25
|
+
"xxl"
|
|
26
|
+
],
|
|
27
|
+
"default": "md"
|
|
28
|
+
},
|
|
29
|
+
"align": {
|
|
30
|
+
"enum": [
|
|
31
|
+
"flex-start",
|
|
32
|
+
"flex-end",
|
|
33
|
+
"center",
|
|
34
|
+
"baseline",
|
|
35
|
+
"stretch"
|
|
36
|
+
],
|
|
37
|
+
"default": "center"
|
|
38
|
+
},
|
|
39
|
+
"justify": {
|
|
40
|
+
"enum": [
|
|
41
|
+
"flex-start",
|
|
42
|
+
"flex-end",
|
|
43
|
+
"center",
|
|
44
|
+
"space-between",
|
|
45
|
+
"space-around",
|
|
46
|
+
"space-evenly"
|
|
47
|
+
],
|
|
48
|
+
"default": "flex-start"
|
|
49
|
+
},
|
|
50
|
+
"wrap": {
|
|
51
|
+
"enum": [
|
|
52
|
+
"nowrap",
|
|
53
|
+
"wrap",
|
|
54
|
+
"wrap-reverse"
|
|
55
|
+
],
|
|
56
|
+
"default": "wrap"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"deprecatedPatterns": [
|
|
61
|
+
"import { Group } from '@mantine/core'",
|
|
62
|
+
"import { Group } from '@appdirect/design-system' in new code (use Inline)"
|
|
63
|
+
],
|
|
64
|
+
"enforcement": {
|
|
65
|
+
"deterministic": [
|
|
66
|
+
"importFrom",
|
|
67
|
+
"api.props.gap.enum"
|
|
68
|
+
],
|
|
69
|
+
"semantic": [
|
|
70
|
+
"purpose"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../contracts/ds-component-contract.v1.json",
|
|
3
|
+
"id": "PageContentHeader",
|
|
4
|
+
"kind": "complex",
|
|
5
|
+
"version": "0.2.6",
|
|
6
|
+
"purpose": "Required page header for prototype pages. AppDirect composition; Mantine has no page-content-header.",
|
|
7
|
+
"importFrom": [
|
|
8
|
+
"@appdirect/design-system"
|
|
9
|
+
],
|
|
10
|
+
"mantineCounterpart": null,
|
|
11
|
+
"anatomy": [
|
|
12
|
+
"card",
|
|
13
|
+
"title",
|
|
14
|
+
"subhead",
|
|
15
|
+
"badge",
|
|
16
|
+
"icon",
|
|
17
|
+
"actions",
|
|
18
|
+
"contentSection"
|
|
19
|
+
],
|
|
20
|
+
"api": {
|
|
21
|
+
"props": {
|
|
22
|
+
"title": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"required": true
|
|
25
|
+
},
|
|
26
|
+
"subhead": {
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
"badge": {
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"icon": {
|
|
33
|
+
"type": "ReactNode"
|
|
34
|
+
},
|
|
35
|
+
"actions": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"item": {
|
|
38
|
+
"label": "string",
|
|
39
|
+
"onClick": "function",
|
|
40
|
+
"variant": {
|
|
41
|
+
"enum": [
|
|
42
|
+
"primary",
|
|
43
|
+
"secondary",
|
|
44
|
+
"default",
|
|
45
|
+
"disabled",
|
|
46
|
+
"link",
|
|
47
|
+
"secret",
|
|
48
|
+
"outline",
|
|
49
|
+
"danger"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"notes": "Actions use DS Button variants, not a Mantine variant map."
|
|
54
|
+
},
|
|
55
|
+
"contentSection": {
|
|
56
|
+
"enum": [
|
|
57
|
+
"insights",
|
|
58
|
+
"description",
|
|
59
|
+
"descriptionBlock",
|
|
60
|
+
"nameValuePairs",
|
|
61
|
+
"drawer"
|
|
62
|
+
],
|
|
63
|
+
"required": true,
|
|
64
|
+
"exclusive": true,
|
|
65
|
+
"notes": "Mutually exclusive content slots. Do not pass more than one section's data as if they compose."
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"composition": {
|
|
70
|
+
"mustUseFor": [
|
|
71
|
+
"prototype page headers"
|
|
72
|
+
],
|
|
73
|
+
"mustNotRebuildFrom": [
|
|
74
|
+
"Card + Title"
|
|
75
|
+
],
|
|
76
|
+
"internalPrimitives": [
|
|
77
|
+
"Card",
|
|
78
|
+
"Title",
|
|
79
|
+
"Button",
|
|
80
|
+
"Badge",
|
|
81
|
+
"ThemeIcon",
|
|
82
|
+
"KeyInsight",
|
|
83
|
+
"NameValue",
|
|
84
|
+
"DescriptionBlock",
|
|
85
|
+
"Inline",
|
|
86
|
+
"Stack"
|
|
87
|
+
],
|
|
88
|
+
"mantineUtilitiesOnly": [
|
|
89
|
+
"Collapse",
|
|
90
|
+
"rem"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"enforcement": {
|
|
94
|
+
"deterministic": [
|
|
95
|
+
"importFrom",
|
|
96
|
+
"kind",
|
|
97
|
+
"mantineCounterpart",
|
|
98
|
+
"api.props.title.required",
|
|
99
|
+
"api.props.contentSection.enum"
|
|
100
|
+
],
|
|
101
|
+
"semantic": [
|
|
102
|
+
"purpose",
|
|
103
|
+
"composition.mustUseFor",
|
|
104
|
+
"composition.mustNotRebuildFrom"
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../contracts/ds-component-contract.v1.json",
|
|
3
|
+
"id": "Stack",
|
|
4
|
+
"kind": "wrapper",
|
|
5
|
+
"version": "0.2.6",
|
|
6
|
+
"purpose": "Vertical layout primitive (flex-direction: column).",
|
|
7
|
+
"importFrom": [
|
|
8
|
+
"@appdirect/design-system"
|
|
9
|
+
],
|
|
10
|
+
"mantineCounterpart": "Stack",
|
|
11
|
+
"api": {
|
|
12
|
+
"props": {
|
|
13
|
+
"gap": {
|
|
14
|
+
"enum": [
|
|
15
|
+
"none",
|
|
16
|
+
"xxs",
|
|
17
|
+
"xs",
|
|
18
|
+
"sm",
|
|
19
|
+
"md",
|
|
20
|
+
"lg",
|
|
21
|
+
"xl",
|
|
22
|
+
"xxl"
|
|
23
|
+
],
|
|
24
|
+
"default": "md",
|
|
25
|
+
"notes": "Mantine Core xs–xl plus none (0), xxs (4), xxl (48). Also accepts string | number passthrough."
|
|
26
|
+
},
|
|
27
|
+
"align": {
|
|
28
|
+
"enum": [
|
|
29
|
+
"stretch",
|
|
30
|
+
"flex-start",
|
|
31
|
+
"flex-end",
|
|
32
|
+
"center",
|
|
33
|
+
"baseline"
|
|
34
|
+
],
|
|
35
|
+
"default": "stretch"
|
|
36
|
+
},
|
|
37
|
+
"justify": {
|
|
38
|
+
"enum": [
|
|
39
|
+
"flex-start",
|
|
40
|
+
"flex-end",
|
|
41
|
+
"center",
|
|
42
|
+
"space-between",
|
|
43
|
+
"space-around",
|
|
44
|
+
"space-evenly"
|
|
45
|
+
],
|
|
46
|
+
"default": "flex-start"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"deprecatedPatterns": [
|
|
51
|
+
"import { Stack } from '@mantine/core'"
|
|
52
|
+
],
|
|
53
|
+
"enforcement": {
|
|
54
|
+
"deterministic": [
|
|
55
|
+
"importFrom",
|
|
56
|
+
"api.props.gap.enum"
|
|
57
|
+
],
|
|
58
|
+
"semantic": [
|
|
59
|
+
"purpose"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://appdirect.local/schemas/ds-component-contract.v1.json",
|
|
3
|
+
"title": "DS component contract v1",
|
|
4
|
+
"description": "Machine-readable definition of component correctness. Wrapper contracts describe a restricted Mantine API. Complex contracts describe AppDirect compositions with no Mantine counterpart. Source of truth is the TSX next to the file, not this schema.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["id", "kind", "version", "importFrom", "enforcement"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": { "type": "string" },
|
|
9
|
+
"kind": { "enum": ["wrapper", "complex"] },
|
|
10
|
+
"version": { "type": "string" },
|
|
11
|
+
"aliasOf": { "type": "string" },
|
|
12
|
+
"mantineCounterpart": { "type": ["string", "null"] },
|
|
13
|
+
"importFrom": { "type": "array", "items": { "type": "string" } },
|
|
14
|
+
"enforcement": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"required": ["deterministic", "semantic"],
|
|
17
|
+
"properties": {
|
|
18
|
+
"deterministic": { "type": "array", "items": { "type": "string" } },
|
|
19
|
+
"semantic": { "type": "array", "items": { "type": "string" } }
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.0.2",
|
|
3
|
+
"contracts": [
|
|
4
|
+
{
|
|
5
|
+
"id": "Alert",
|
|
6
|
+
"kind": "wrapper",
|
|
7
|
+
"source": "DataDisplay/Alert.contract.json"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "Badge",
|
|
11
|
+
"kind": "wrapper",
|
|
12
|
+
"source": "DataDisplay/Badge.contract.json"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "Box",
|
|
16
|
+
"kind": "wrapper",
|
|
17
|
+
"source": "Layout/Box.contract.json"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "Button",
|
|
21
|
+
"kind": "wrapper",
|
|
22
|
+
"source": "Buttons/Button.contract.json"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "DataTable",
|
|
26
|
+
"kind": "complex",
|
|
27
|
+
"source": "ComplexComponents/DataTable/DataTable.contract.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "Grid",
|
|
31
|
+
"kind": "wrapper",
|
|
32
|
+
"source": "Layout/Grid.contract.json"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "Group",
|
|
36
|
+
"kind": "wrapper",
|
|
37
|
+
"source": "Layout/Group.contract.json"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "Inline",
|
|
41
|
+
"kind": "wrapper",
|
|
42
|
+
"source": "Layout/Inline.contract.json"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "PageContentHeader",
|
|
46
|
+
"kind": "complex",
|
|
47
|
+
"source": "ComplexComponents/PageContentHeader/PageContentHeader.contract.json"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "Stack",
|
|
51
|
+
"kind": "wrapper",
|
|
52
|
+
"source": "Layout/Stack.contract.json"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|