@appdirect/design-system 0.0.14 → 0.0.16

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,79 @@
1
+ {
2
+ "$schema": "../../contracts/ds-component-contract.v1.json",
3
+ "id": "KeyInsight",
4
+ "kind": "complex",
5
+ "version": "0.1.0",
6
+ "purpose": "Single KPI tile: a value, a title, and an optional subtitle. Visual size is independent of the value's HTML element.",
7
+ "importFrom": [
8
+ "@appdirect/design-system"
9
+ ],
10
+ "mantineCounterpart": null,
11
+ "anatomy": [
12
+ "value",
13
+ "title",
14
+ "subtitle"
15
+ ],
16
+ "api": {
17
+ "props": {
18
+ "value": {
19
+ "type": "string | number",
20
+ "required": true
21
+ },
22
+ "title": {
23
+ "type": "string",
24
+ "required": true
25
+ },
26
+ "subtitle": {
27
+ "type": "string"
28
+ },
29
+ "showBorder": {
30
+ "type": "boolean",
31
+ "default": false
32
+ },
33
+ "size": {
34
+ "enum": [
35
+ "super-jumbo",
36
+ "jumbo",
37
+ "level-1",
38
+ "level-2",
39
+ "level-3",
40
+ "level-4",
41
+ "level-5",
42
+ "level-6",
43
+ "xs",
44
+ "sm",
45
+ "md",
46
+ "lg"
47
+ ],
48
+ "default": "level-2",
49
+ "notes": "Canonical sizes are super-jumbo, jumbo, and level-1…level-6. Deprecated aliases: xs→level-4, sm→level-3, md→level-2, lg→level-1. jumbo and super-jumbo are unchanged."
50
+ },
51
+ "valueAs": {
52
+ "enum": [
53
+ "h1",
54
+ "h2",
55
+ "h3",
56
+ "h4",
57
+ "h5",
58
+ "h6",
59
+ "p",
60
+ "span"
61
+ ],
62
+ "notes": "Element for the value. Defaults to the heading that matches the resolved size (level-1, jumbo, and super-jumbo → h1). Pass p or span so a level-1 visual size is not an h1."
63
+ }
64
+ }
65
+ },
66
+ "enforcement": {
67
+ "deterministic": [
68
+ "importFrom",
69
+ "kind",
70
+ "mantineCounterpart",
71
+ "api.props.value.required",
72
+ "api.props.title.required",
73
+ "api.props.size.enum"
74
+ ],
75
+ "semantic": [
76
+ "purpose"
77
+ ]
78
+ }
79
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.14",
2
+ "version": "0.0.16",
3
3
  "contracts": [
4
4
  {
5
5
  "id": "Alert",
@@ -41,6 +41,11 @@
41
41
  "kind": "wrapper",
42
42
  "source": "Layout/Inline.contract.json"
43
43
  },
44
+ {
45
+ "id": "KeyInsight",
46
+ "kind": "complex",
47
+ "source": "ComplexComponents/KeyInsight/KeyInsight.contract.json"
48
+ },
44
49
  {
45
50
  "id": "PageContentHeader",
46
51
  "kind": "complex",
@@ -149,6 +149,10 @@
149
149
  --ad-headings-sizes-h5-line-height: 1.5;
150
150
  --ad-headings-sizes-h6-font-size: 14px;
151
151
  --ad-headings-sizes-h6-line-height: 1.5;
152
+ --ad-headings-sizes-jumbo-font-size: 96px;
153
+ --ad-headings-sizes-super-jumbo-font-size: 128px;
154
+ --ad-headings-sizes-super-jumbo-label-font-size: 32px;
155
+ --ad-headings-sizes-super-jumbo-label-line-height: 1.16;
152
156
  --ad-z-index-app: 100;
153
157
  --ad-z-index-modal: 200;
154
158
  --ad-z-index-popover: 300;
@@ -497,6 +501,10 @@
497
501
  --ad-headings-sizes-h5-line-height: 1.5;
498
502
  --ad-headings-sizes-h6-font-size: 14px;
499
503
  --ad-headings-sizes-h6-line-height: 1.5;
504
+ --ad-headings-sizes-jumbo-font-size: 96px;
505
+ --ad-headings-sizes-super-jumbo-font-size: 128px;
506
+ --ad-headings-sizes-super-jumbo-label-font-size: 32px;
507
+ --ad-headings-sizes-super-jumbo-label-line-height: 1.16;
500
508
  --ad-z-index-app: 100;
501
509
  --ad-z-index-modal: 200;
502
510
  --ad-z-index-popover: 300;
@@ -1080,6 +1080,224 @@
1080
1080
  background: var(--ad-color-bg-default-hover);
1081
1081
  color: var(--ad-color-text-default);
1082
1082
  }
1083
+ /* === KeyInsights === */
1084
+ .ad-KeyInsight {
1085
+ text-align: center;
1086
+ }
1087
+ .ad-KeyInsight[data-border] {
1088
+ border-right-width: var(--ad-border-width-thin);
1089
+ border-right-style: var(--ad-border-style-solid);
1090
+ border-right-color: var(--ad-color-border-subtle);
1091
+ }
1092
+ .ad-KeyInsight-valueRow {
1093
+ display: flex;
1094
+ align-items: center;
1095
+ justify-content: center;
1096
+ }
1097
+ .ad-KeyInsight-value {
1098
+ font-family: var(--ad-headings-font-family);
1099
+ margin: var(--ad-spacing-none);
1100
+ }
1101
+ .ad-KeyInsight-title {
1102
+ font-family: var(--ad-font-family-body);
1103
+ margin: var(--ad-spacing-none);
1104
+ }
1105
+ .ad-KeyInsight-subtitle {
1106
+ font-family: var(--ad-font-family-body);
1107
+ margin: var(--ad-spacing-none);
1108
+ }
1109
+ .ad-KeyInsight[data-size="super-jumbo"] {
1110
+ padding: var(--ad-spacing-lg);
1111
+ }
1112
+ .ad-KeyInsight[data-size="super-jumbo"] .ad-KeyInsight-valueRow {
1113
+ gap: var(--ad-spacing-xxs);
1114
+ }
1115
+ .ad-KeyInsight[data-size="super-jumbo"] .ad-KeyInsight-value {
1116
+ font-size: var(--ad-headings-sizes-super-jumbo-font-size);
1117
+ line-height: var(--ad-headings-sizes-h1-line-height);
1118
+ font-weight: var(--ad-headings-font-weight);
1119
+ color: var(--ad-color-text-default);
1120
+ }
1121
+ .ad-KeyInsight[data-size="super-jumbo"] .ad-KeyInsight-title {
1122
+ font-size: var(--ad-headings-sizes-super-jumbo-label-font-size);
1123
+ line-height: var(--ad-headings-sizes-super-jumbo-label-line-height);
1124
+ font-weight: var(--ad-font-weights-regular);
1125
+ color: var(--ad-color-text-default);
1126
+ }
1127
+ .ad-KeyInsight[data-size="super-jumbo"] .ad-KeyInsight-subtitle {
1128
+ font-size: var(--ad-headings-sizes-super-jumbo-label-font-size);
1129
+ line-height: var(--ad-headings-sizes-super-jumbo-label-line-height);
1130
+ font-weight: var(--ad-font-weights-regular);
1131
+ color: var(--ad-color-text-dimmed);
1132
+ }
1133
+ .ad-KeyInsight[data-size="jumbo"] {
1134
+ padding: var(--ad-spacing-md);
1135
+ }
1136
+ .ad-KeyInsight[data-size="jumbo"] .ad-KeyInsight-valueRow {
1137
+ gap: var(--ad-spacing-xxs);
1138
+ }
1139
+ .ad-KeyInsight[data-size="jumbo"] .ad-KeyInsight-value {
1140
+ font-size: var(--ad-headings-sizes-jumbo-font-size);
1141
+ line-height: var(--ad-headings-sizes-h1-line-height);
1142
+ font-weight: var(--ad-headings-font-weight);
1143
+ color: var(--ad-color-text-default);
1144
+ }
1145
+ .ad-KeyInsight[data-size="jumbo"] .ad-KeyInsight-title {
1146
+ font-size: var(--ad-font-sizes-xl);
1147
+ line-height: var(--ad-line-heights-xl);
1148
+ font-weight: var(--ad-font-weights-regular);
1149
+ color: var(--ad-color-text-default);
1150
+ }
1151
+ .ad-KeyInsight[data-size="jumbo"] .ad-KeyInsight-subtitle {
1152
+ font-size: var(--ad-font-sizes-xl);
1153
+ line-height: var(--ad-line-heights-xl);
1154
+ font-weight: var(--ad-font-weights-regular);
1155
+ color: var(--ad-color-text-dimmed);
1156
+ }
1157
+ .ad-KeyInsight[data-size="level-1"] {
1158
+ padding: var(--ad-spacing-sm);
1159
+ }
1160
+ .ad-KeyInsight[data-size="level-1"] .ad-KeyInsight-valueRow {
1161
+ gap: var(--ad-spacing-xxs);
1162
+ }
1163
+ .ad-KeyInsight[data-size="level-1"] .ad-KeyInsight-value {
1164
+ font-size: var(--ad-headings-sizes-h1-font-size);
1165
+ line-height: var(--ad-headings-sizes-h1-line-height);
1166
+ font-weight: var(--ad-headings-font-weight);
1167
+ color: var(--ad-color-text-default);
1168
+ }
1169
+ .ad-KeyInsight[data-size="level-1"] .ad-KeyInsight-title {
1170
+ font-size: var(--ad-font-sizes-lg);
1171
+ line-height: var(--ad-line-heights-lg);
1172
+ font-weight: var(--ad-font-weights-regular);
1173
+ color: var(--ad-color-text-default);
1174
+ }
1175
+ .ad-KeyInsight[data-size="level-1"] .ad-KeyInsight-subtitle {
1176
+ font-size: var(--ad-font-sizes-lg);
1177
+ line-height: var(--ad-line-heights-lg);
1178
+ font-weight: var(--ad-font-weights-regular);
1179
+ color: var(--ad-color-text-dimmed);
1180
+ }
1181
+ .ad-KeyInsight[data-size="level-2"] {
1182
+ padding: var(--ad-spacing-sm);
1183
+ }
1184
+ .ad-KeyInsight[data-size="level-2"] .ad-KeyInsight-valueRow {
1185
+ gap: var(--ad-spacing-xxs);
1186
+ }
1187
+ .ad-KeyInsight[data-size="level-2"] .ad-KeyInsight-value {
1188
+ font-size: var(--ad-headings-sizes-h2-font-size);
1189
+ line-height: var(--ad-headings-sizes-h2-line-height);
1190
+ font-weight: var(--ad-headings-font-weight);
1191
+ color: var(--ad-color-text-default);
1192
+ }
1193
+ .ad-KeyInsight[data-size="level-2"] .ad-KeyInsight-title {
1194
+ font-size: var(--ad-font-sizes-md);
1195
+ line-height: var(--ad-line-heights-md);
1196
+ font-weight: var(--ad-font-weights-regular);
1197
+ color: var(--ad-color-text-default);
1198
+ }
1199
+ .ad-KeyInsight[data-size="level-2"] .ad-KeyInsight-subtitle {
1200
+ font-size: var(--ad-font-sizes-md);
1201
+ line-height: var(--ad-line-heights-md);
1202
+ font-weight: var(--ad-font-weights-regular);
1203
+ color: var(--ad-color-text-dimmed);
1204
+ }
1205
+ .ad-KeyInsight[data-size="level-3"] {
1206
+ padding: var(--ad-spacing-xs);
1207
+ }
1208
+ .ad-KeyInsight[data-size="level-3"] .ad-KeyInsight-valueRow {
1209
+ gap: var(--ad-spacing-xxs);
1210
+ }
1211
+ .ad-KeyInsight[data-size="level-3"] .ad-KeyInsight-value {
1212
+ font-size: var(--ad-headings-sizes-h3-font-size);
1213
+ line-height: var(--ad-headings-sizes-h3-line-height);
1214
+ font-weight: var(--ad-headings-font-weight);
1215
+ color: var(--ad-color-text-default);
1216
+ }
1217
+ .ad-KeyInsight[data-size="level-3"] .ad-KeyInsight-title {
1218
+ font-size: var(--ad-font-sizes-sm);
1219
+ line-height: var(--ad-line-heights-sm);
1220
+ font-weight: var(--ad-font-weights-regular);
1221
+ color: var(--ad-color-text-default);
1222
+ }
1223
+ .ad-KeyInsight[data-size="level-3"] .ad-KeyInsight-subtitle {
1224
+ font-size: var(--ad-font-sizes-sm);
1225
+ line-height: var(--ad-line-heights-sm);
1226
+ font-weight: var(--ad-font-weights-regular);
1227
+ color: var(--ad-color-text-dimmed);
1228
+ }
1229
+ .ad-KeyInsight[data-size="level-4"] {
1230
+ padding: var(--ad-spacing-xs);
1231
+ }
1232
+ .ad-KeyInsight[data-size="level-4"] .ad-KeyInsight-valueRow {
1233
+ gap: var(--ad-spacing-xxs);
1234
+ }
1235
+ .ad-KeyInsight[data-size="level-4"] .ad-KeyInsight-value {
1236
+ font-size: var(--ad-headings-sizes-h4-font-size);
1237
+ line-height: var(--ad-headings-sizes-h4-line-height);
1238
+ font-weight: var(--ad-headings-font-weight);
1239
+ color: var(--ad-color-text-default);
1240
+ }
1241
+ .ad-KeyInsight[data-size="level-4"] .ad-KeyInsight-title {
1242
+ font-size: var(--ad-font-sizes-xs);
1243
+ line-height: var(--ad-line-heights-xs);
1244
+ font-weight: var(--ad-font-weights-regular);
1245
+ color: var(--ad-color-text-default);
1246
+ }
1247
+ .ad-KeyInsight[data-size="level-4"] .ad-KeyInsight-subtitle {
1248
+ font-size: var(--ad-font-sizes-xs);
1249
+ line-height: var(--ad-line-heights-xs);
1250
+ font-weight: var(--ad-font-weights-regular);
1251
+ color: var(--ad-color-text-dimmed);
1252
+ }
1253
+ .ad-KeyInsight[data-size="level-5"] {
1254
+ padding: var(--ad-spacing-xs);
1255
+ }
1256
+ .ad-KeyInsight[data-size="level-5"] .ad-KeyInsight-valueRow {
1257
+ gap: var(--ad-spacing-xxs);
1258
+ }
1259
+ .ad-KeyInsight[data-size="level-5"] .ad-KeyInsight-value {
1260
+ font-size: var(--ad-headings-sizes-h5-font-size);
1261
+ line-height: var(--ad-headings-sizes-h5-line-height);
1262
+ font-weight: var(--ad-headings-font-weight);
1263
+ color: var(--ad-color-text-default);
1264
+ }
1265
+ .ad-KeyInsight[data-size="level-5"] .ad-KeyInsight-title {
1266
+ font-size: var(--ad-font-sizes-xs);
1267
+ line-height: var(--ad-line-heights-xs);
1268
+ font-weight: var(--ad-font-weights-regular);
1269
+ color: var(--ad-color-text-default);
1270
+ }
1271
+ .ad-KeyInsight[data-size="level-5"] .ad-KeyInsight-subtitle {
1272
+ font-size: var(--ad-font-sizes-xs);
1273
+ line-height: var(--ad-line-heights-xs);
1274
+ font-weight: var(--ad-font-weights-regular);
1275
+ color: var(--ad-color-text-dimmed);
1276
+ }
1277
+ .ad-KeyInsight[data-size="level-6"] {
1278
+ padding: var(--ad-spacing-xs);
1279
+ }
1280
+ .ad-KeyInsight[data-size="level-6"] .ad-KeyInsight-valueRow {
1281
+ gap: var(--ad-spacing-xxs);
1282
+ }
1283
+ .ad-KeyInsight[data-size="level-6"] .ad-KeyInsight-value {
1284
+ font-size: var(--ad-headings-sizes-h6-font-size);
1285
+ line-height: var(--ad-headings-sizes-h6-line-height);
1286
+ font-weight: var(--ad-headings-font-weight);
1287
+ color: var(--ad-color-text-default);
1288
+ }
1289
+ .ad-KeyInsight[data-size="level-6"] .ad-KeyInsight-title {
1290
+ font-size: var(--ad-font-sizes-xs);
1291
+ line-height: var(--ad-line-heights-xs);
1292
+ font-weight: var(--ad-font-weights-regular);
1293
+ color: var(--ad-color-text-default);
1294
+ }
1295
+ .ad-KeyInsight[data-size="level-6"] .ad-KeyInsight-subtitle {
1296
+ font-size: var(--ad-font-sizes-xs);
1297
+ line-height: var(--ad-line-heights-xs);
1298
+ font-weight: var(--ad-font-weights-regular);
1299
+ color: var(--ad-color-text-dimmed);
1300
+ }
1083
1301
  /* === List === */
1084
1302
  .mantine-List-root {
1085
1303
  color: var(--ad-color-text-default);
package/dist/index.js CHANGED
@@ -32,6 +32,7 @@ import { DataTable } from './ComplexComponents/DataTable/index.js';
32
32
  import { DashboardWidget } from './ComplexComponents/DashboardWidget/index.js';
33
33
  import { Placeholder } from './ComplexComponents/Placeholder/index.js';
34
34
  import { Slat } from './ComplexComponents/Slat/index.js';
35
+ import { StatusGem } from './ComplexComponents/StatusGem/index.js';
35
36
  // ========================== INPUTS ==========================
36
37
  export { TextInput, TextArea, NumberInput, ColorInput, Slider, SliderWithLabel, Switch, SegmentedControl, Checkbox, Radio, RadioGroup, DropZone, FileInput } from './Inputs/index.js';
37
38
  // ========================== BUTTONS ==========================
@@ -61,6 +62,7 @@ export { DataTable } from './ComplexComponents/DataTable/index.js';
61
62
  export { DashboardWidget } from './ComplexComponents/DashboardWidget/index.js';
62
63
  export { Placeholder } from './ComplexComponents/Placeholder/index.js';
63
64
  export { Slat } from './ComplexComponents/Slat/index.js';
65
+ export { StatusGem } from './ComplexComponents/StatusGem/index.js';
64
66
  // ========================== CATEGORY EXPORTS ==========================
65
67
  // Export components grouped by category for convenient importing
66
68
  export const Inputs = {
@@ -159,4 +161,5 @@ export const ComplexComponents = {
159
161
  DashboardWidget,
160
162
  Placeholder,
161
163
  Slat,
164
+ StatusGem,
162
165
  };
package/dist/index.ts CHANGED
@@ -33,6 +33,7 @@ import { DataTable } from './ComplexComponents/DataTable';
33
33
  import { DashboardWidget } from './ComplexComponents/DashboardWidget';
34
34
  import { Placeholder } from './ComplexComponents/Placeholder';
35
35
  import { Slat } from './ComplexComponents/Slat';
36
+ import { StatusGem } from './ComplexComponents/StatusGem';
36
37
 
37
38
  // ========================== INPUTS ==========================
38
39
  export { TextInput, TextArea, NumberInput, ColorInput, Slider, SliderWithLabel, Switch, SegmentedControl, Checkbox, Radio, RadioGroup, DropZone, FileInput } from './Inputs';
@@ -88,7 +89,7 @@ export type { DSAppShellLayoutProps, DSHeaderBarProps, DSSidebarNavProps, NavIte
88
89
 
89
90
  // ========================== COMPLEX COMPONENTS ==========================
90
91
  export { KeyInsight } from './ComplexComponents/KeyInsight';
91
- export type { KeyInsightProps } from './ComplexComponents/KeyInsight';
92
+ export type { KeyInsightProps, KeyInsightSize, KeyInsightValueAs } from './ComplexComponents/KeyInsight';
92
93
  export { NameValue, NameValueItem } from './ComplexComponents/NameValue';
93
94
  export type { NameValueProps, NameValuePair, NameValueItemProps } from './ComplexComponents/NameValue';
94
95
  export { CopyButton } from './ComplexComponents/Utilities';
@@ -103,6 +104,8 @@ export { Placeholder } from './ComplexComponents/Placeholder';
103
104
  export type { PlaceholderProps, PlaceholderAction, PlaceholderSize } from './ComplexComponents/Placeholder';
104
105
  export { Slat } from './ComplexComponents/Slat';
105
106
  export type { SlatProps, SlatSize, SlatIndicator, SlatBadge, SlatAction } from './ComplexComponents/Slat';
107
+ export { StatusGem } from './ComplexComponents/StatusGem';
108
+ export type { StatusGemProps, StatusGemVariant, StatusGemSize } from './ComplexComponents/StatusGem';
106
109
 
107
110
  // ========================== CATEGORY EXPORTS ==========================
108
111
  // Export components grouped by category for convenient importing
@@ -212,6 +215,7 @@ export const ComplexComponents = {
212
215
  DashboardWidget,
213
216
  Placeholder,
214
217
  Slat,
218
+ StatusGem,
215
219
  };
216
220
 
217
221
  // Placeholder export to prevent empty module errors