@appdirect/ds-enforce 0.0.17 → 0.0.19

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.
@@ -0,0 +1,91 @@
1
+ {
2
+ "id": "DashboardWidget",
3
+ "kind": "complex",
4
+ "version": "0.1.0",
5
+ "purpose": "Dashboard card with a title row, optional header controls, a flexible content slot, and a footer that stays in flow so equal-height rows align.",
6
+ "importFrom": [
7
+ "@appdirect/design-system"
8
+ ],
9
+ "mantineCounterpart": null,
10
+ "anatomy": [
11
+ "card",
12
+ "header",
13
+ "title",
14
+ "content",
15
+ "footer"
16
+ ],
17
+ "api": {
18
+ "props": {
19
+ "title": {
20
+ "type": "string",
21
+ "required": true
22
+ },
23
+ "children": {
24
+ "type": "ReactNode",
25
+ "required": true
26
+ },
27
+ "editable": {
28
+ "type": "boolean"
29
+ },
30
+ "panelNotification": {
31
+ "type": "boolean"
32
+ },
33
+ "headerSelect": {
34
+ "type": "object"
35
+ },
36
+ "footerLinks": {
37
+ "type": "array"
38
+ },
39
+ "spacing": {
40
+ "enum": [
41
+ "xs",
42
+ "sm",
43
+ "md",
44
+ "lg",
45
+ "xl"
46
+ ],
47
+ "default": "lg"
48
+ },
49
+ "interactive": {
50
+ "type": "boolean",
51
+ "default": false
52
+ },
53
+ "selected": {
54
+ "type": "boolean",
55
+ "default": false
56
+ }
57
+ }
58
+ },
59
+ "composition": {
60
+ "mustUseFor": [
61
+ "dashboard metric and summary cards"
62
+ ],
63
+ "mustNotRebuildFrom": [
64
+ "Card + Title + Select"
65
+ ],
66
+ "internalPrimitives": [
67
+ "Card",
68
+ "Title",
69
+ "Text",
70
+ "Switch",
71
+ "Select",
72
+ "Menu",
73
+ "ActionIcon",
74
+ "Alert"
75
+ ]
76
+ },
77
+ "enforcement": {
78
+ "deterministic": [
79
+ "importFrom",
80
+ "kind",
81
+ "mantineCounterpart",
82
+ "api.props.title.required",
83
+ "api.props.children.required"
84
+ ],
85
+ "semantic": [
86
+ "purpose",
87
+ "composition.mustUseFor",
88
+ "composition.mustNotRebuildFrom"
89
+ ]
90
+ }
91
+ }
@@ -2,7 +2,7 @@
2
2
  "id": "DataTable",
3
3
  "kind": "complex",
4
4
  "version": "0.2.6",
5
- "purpose": "Sortable, filterable, paginated record table. AppDirect composition over mantine-react-table-open, not a Mantine Table wrapper.",
5
+ "purpose": "Sortable, filterable, paginated record table. Controlled composition of the micro-ui-ts table pieces on TanStack Table v9 (consumer owns all state), not a Mantine Table wrapper.",
6
6
  "importFrom": [
7
7
  "@appdirect/design-system"
8
8
  ],
@@ -24,19 +24,96 @@
24
24
  "required": true
25
25
  },
26
26
  "totalCount": {
27
- "type": "number"
27
+ "type": "number",
28
+ "required": true
29
+ },
30
+ "getRowId": {
31
+ "type": "function"
28
32
  },
29
33
  "isLoading": {
30
34
  "type": "boolean"
31
35
  },
36
+ "isFetching": {
37
+ "type": "boolean"
38
+ },
32
39
  "isError": {
33
40
  "type": "boolean"
34
41
  },
42
+ "onRetry": {
43
+ "type": "function"
44
+ },
45
+ "pagination": {
46
+ "type": "object",
47
+ "required": true
48
+ },
49
+ "pageInfo": {
50
+ "type": "object"
51
+ },
52
+ "onPreviousPage": {
53
+ "type": "function",
54
+ "required": true
55
+ },
56
+ "onNextPage": {
57
+ "type": "function",
58
+ "required": true
59
+ },
60
+ "onPageSizeChange": {
61
+ "type": "function",
62
+ "required": true
63
+ },
64
+ "rowSelection": {
65
+ "type": "object",
66
+ "required": true
67
+ },
68
+ "onRowSelectionChange": {
69
+ "type": "function",
70
+ "required": true
71
+ },
72
+ "selectionActions": {
73
+ "type": "array"
74
+ },
75
+ "density": {
76
+ "type": "string",
77
+ "required": true
78
+ },
79
+ "onDensityChange": {
80
+ "type": "function",
81
+ "required": true
82
+ },
83
+ "isFullScreen": {
84
+ "type": "boolean",
85
+ "required": true
86
+ },
87
+ "onFullScreenChange": {
88
+ "type": "function",
89
+ "required": true
90
+ },
91
+ "filters": {
92
+ "type": "object",
93
+ "required": true
94
+ },
95
+ "onFiltersChange": {
96
+ "type": "function",
97
+ "required": true
98
+ },
99
+ "onResetFilters": {
100
+ "type": "function",
101
+ "required": true
102
+ },
35
103
  "showFilters": {
36
- "type": "boolean"
104
+ "type": "boolean",
105
+ "required": true
37
106
  },
38
- "showSearch": {
39
- "type": "boolean"
107
+ "onFilterToggleChange": {
108
+ "type": "function",
109
+ "required": true
110
+ },
111
+ "locale": {
112
+ "type": "string",
113
+ "required": true
114
+ },
115
+ "emptyFallback": {
116
+ "type": "node"
40
117
  }
41
118
  }
42
119
  },
@@ -48,7 +125,7 @@
48
125
  "staticMarkup": "Table",
49
126
  "handmadeRecordList": "DataTable or Table, not stacked Card/Inline rows of records"
50
127
  },
51
- "notes": "Static dummy lists may use Table, not DataTable."
128
+ "notes": "Static dummy lists may use Table, not DataTable. DataTable is controlled: keep pagination, selection, density, filters and sort state in the page (see micro-ui-ts Table)."
52
129
  },
53
130
  "enforcement": {
54
131
  "deterministic": [
@@ -20,6 +20,11 @@
20
20
  "kind": "wrapper",
21
21
  "file": "Button.json"
22
22
  },
23
+ {
24
+ "id": "DashboardWidget",
25
+ "kind": "complex",
26
+ "file": "DashboardWidget.json"
27
+ },
23
28
  {
24
29
  "id": "DataTable",
25
30
  "kind": "complex",
@@ -186,6 +186,38 @@
186
186
  "colorEnum": null,
187
187
  "colorDeprecated": true
188
188
  },
189
+ {
190
+ "id": "DashboardWidget",
191
+ "kind": "complex",
192
+ "mantineName": "DashboardWidget",
193
+ "importNames": [
194
+ "DashboardWidget"
195
+ ],
196
+ "variantEnum": null,
197
+ "sizeEnum": null,
198
+ "fixedProps": {},
199
+ "defaultProps": {
200
+ "spacing": "lg",
201
+ "interactive": false,
202
+ "selected": false
203
+ },
204
+ "deprecatedPatterns": [],
205
+ "deterministic": [
206
+ "importFrom",
207
+ "kind",
208
+ "mantineCounterpart",
209
+ "api.props.title.required",
210
+ "api.props.children.required"
211
+ ],
212
+ "semantic": [
213
+ "purpose",
214
+ "composition.mustUseFor",
215
+ "composition.mustNotRebuildFrom"
216
+ ],
217
+ "purpose": "Dashboard card with a title row, optional header controls, a flexible content slot, and a footer that stays in flow so equal-height rows align.",
218
+ "colorEnum": null,
219
+ "colorDeprecated": false
220
+ },
189
221
  {
190
222
  "id": "DataTable",
191
223
  "kind": "complex",
@@ -210,7 +242,7 @@
210
242
  "composition.mustUseFor",
211
243
  "composition.preferInstead.staticMarkup"
212
244
  ],
213
- "purpose": "Sortable, filterable, paginated record table. AppDirect composition over mantine-react-table-open, not a Mantine Table wrapper.",
245
+ "purpose": "Sortable, filterable, paginated record table. Controlled composition of the micro-ui-ts table pieces on TanStack Table v9 (consumer owns all state), not a Mantine Table wrapper.",
214
246
  "colorEnum": null,
215
247
  "colorDeprecated": false
216
248
  },
@@ -656,6 +688,7 @@
656
688
  "--ad-color-bg-inverted",
657
689
  "--ad-color-bg-muted",
658
690
  "--ad-color-bg-overlay-hover",
691
+ "--ad-color-bg-selected",
659
692
  "--ad-color-bg-subtle",
660
693
  "--ad-color-bg-tinted",
661
694
  "--ad-color-border-default",
@@ -890,6 +923,7 @@
890
923
  "--ad-spacing-sm",
891
924
  "--ad-spacing-xl",
892
925
  "--ad-spacing-xs",
926
+ "--ad-spacing-xshalf",
893
927
  "--ad-spacing-xxs",
894
928
  "--ad-transparent",
895
929
  "--ad-white",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appdirect/ds-enforce",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "description": "ESLint, Stylelint, and Mantine types that keep apps on the AppDirect design system.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",