@godxjp/ui 33.13.0 → 33.14.0
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 +4 -4
- package/agent/START-HERE.md +5 -5
- package/agent/components/DataTable.json +2 -1
- package/agent/components/Persona.json +66 -0
- package/agent/components/Table.json +1 -1
- package/agent/components-index.json +5 -0
- package/agent/components.json +69 -2
- package/agent/index.json +6 -6
- package/agent/llms.txt +6 -6
- package/agent/tokens.json +61 -1
- package/dist/components/data-display/data-table.js +51 -10
- package/dist/components/data-display/index.d.ts +2 -0
- package/dist/components/data-display/index.js +2 -0
- package/dist/components/data-display/persona.d.ts +11 -0
- package/dist/components/data-display/persona.js +34 -0
- package/dist/contracts/measurement.json +1 -1
- package/dist/props/components/data-display.prop.d.ts +10 -0
- package/dist/props/registry.d.ts +5 -0
- package/dist/props/registry.js +5 -0
- package/dist/styles/data-display-layout.css +58 -0
- package/dist/styles/layers.json +6 -1
- package/dist/styles/table-layout.css +32 -24
- package/dist/styles.css +1 -1
- package/dist/tokens/base.css +2 -0
- package/dist/tokens/components/persona.css +13 -0
- package/package.json +2 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import { Avatar, AvatarFallback, AvatarImage } from "./avatar.js";
|
|
6
|
+
const Persona = React.forwardRef(
|
|
7
|
+
({ name, description, avatarSrc, avatarFallback, trailing, size = "md", className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
8
|
+
"span",
|
|
9
|
+
{
|
|
10
|
+
ref,
|
|
11
|
+
"data-slot": "persona",
|
|
12
|
+
"data-size": size,
|
|
13
|
+
className: cn("ui-persona", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsxs(Avatar, { size, "aria-hidden": "true", children: [
|
|
17
|
+
avatarSrc ? /* @__PURE__ */ jsx(AvatarImage, { src: avatarSrc, alt: "" }) : null,
|
|
18
|
+
/* @__PURE__ */ jsx(AvatarFallback, { children: avatarFallback ?? Array.from(name)[0] })
|
|
19
|
+
] }),
|
|
20
|
+
/* @__PURE__ */ jsxs("span", { "data-slot": "persona-body", children: [
|
|
21
|
+
/* @__PURE__ */ jsxs("span", { "data-slot": "persona-name-line", children: [
|
|
22
|
+
/* @__PURE__ */ jsx("span", { "data-slot": "persona-name", dir: "auto", title: name, children: name }),
|
|
23
|
+
trailing != null ? /* @__PURE__ */ jsx("span", { "data-slot": "persona-trailing", children: trailing }) : null
|
|
24
|
+
] }),
|
|
25
|
+
description != null ? /* @__PURE__ */ jsx("span", { "data-slot": "persona-description", dir: "auto", title: description, children: description }) : null
|
|
26
|
+
] })
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
);
|
|
31
|
+
Persona.displayName = "Persona";
|
|
32
|
+
export {
|
|
33
|
+
Persona
|
|
34
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$comment": "AUTO-GENERATED by scripts/gen-measurement-contract.mjs — do not edit. Read this instead of guessing: docs/MEASUREMENT-CONTRACT.md.",
|
|
3
|
-
"version": "33.
|
|
3
|
+
"version": "33.14.0",
|
|
4
4
|
"targetSize": {
|
|
5
5
|
"standard": "WCAG 2.2 SC 2.5.8 Target Size (Minimum), level AA — 24×24 CSS px",
|
|
6
6
|
"min": 24,
|
|
@@ -1424,3 +1424,13 @@ export type TextDiffProp = Omit<React.HTMLAttributes<HTMLDivElement>, "children"
|
|
|
1424
1424
|
lang?: string;
|
|
1425
1425
|
className?: ClassNameProp;
|
|
1426
1426
|
};
|
|
1427
|
+
/** @see Persona — static identity; pass translated labels and badge content from the consumer. */
|
|
1428
|
+
export type PersonaProp = Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
1429
|
+
name: string;
|
|
1430
|
+
description?: string;
|
|
1431
|
+
avatarSrc?: string;
|
|
1432
|
+
avatarFallback?: React.ReactNode;
|
|
1433
|
+
/** Optional inline badge beside the name, never part of the clipped name. */
|
|
1434
|
+
trailing?: React.ReactNode;
|
|
1435
|
+
size?: Extract<SizeProp, "sm" | "md">;
|
|
1436
|
+
};
|
package/dist/props/registry.d.ts
CHANGED
|
@@ -2171,6 +2171,11 @@ export declare const COMPONENT_PROP_REGISTRY: {
|
|
|
2171
2171
|
readonly file: "components/data-display.prop.ts";
|
|
2172
2172
|
readonly vocabulary: readonly ["ColumnDefProp", "DensityProp", "SortStateProp", "SelectedIdsProp", "GetRowLabelProp", "HandlerProp", "TablePresetProp", "TableColumnPriorityProp", "BreakpointProp", "ColumnFixedProp", "ColumnFilterItemProp", "ColumnFilterStateProp", "ColumnSorterProp", "TableRowSelectionProp", "TableSelectionBuiltInProp", "TableSelectAllMatchingProp", "TableExpandableProp", "TableSummaryProp", "TableScrollProp", "TableStickyProp", "OnRowProp", "TablePaginationProp", "TablePaginationPositionProp", "SortDirectionProp", "OnColumnFilterChangeProp"];
|
|
2173
2173
|
};
|
|
2174
|
+
readonly PersonaProp: {
|
|
2175
|
+
readonly group: "data-display";
|
|
2176
|
+
readonly file: "components/data-display.prop.ts";
|
|
2177
|
+
readonly vocabulary: readonly ["SizeProp", "ClassNameProp", "DescriptionProp"];
|
|
2178
|
+
};
|
|
2174
2179
|
readonly ListRowDensityProp: {
|
|
2175
2180
|
readonly group: "data-display";
|
|
2176
2181
|
readonly file: "components/data-display.prop.ts";
|
package/dist/props/registry.js
CHANGED
|
@@ -2651,6 +2651,11 @@ const COMPONENT_PROP_REGISTRY = {
|
|
|
2651
2651
|
"OnColumnFilterChangeProp"
|
|
2652
2652
|
]
|
|
2653
2653
|
},
|
|
2654
|
+
PersonaProp: {
|
|
2655
|
+
group: "data-display",
|
|
2656
|
+
file: "components/data-display.prop.ts",
|
|
2657
|
+
vocabulary: ["SizeProp", "ClassNameProp", "DescriptionProp"]
|
|
2658
|
+
},
|
|
2654
2659
|
ListRowDensityProp: {
|
|
2655
2660
|
group: "data-display",
|
|
2656
2661
|
file: "components/data-display.prop.ts",
|
|
@@ -1,4 +1,62 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
+
.ui-persona {
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
flex-wrap: nowrap;
|
|
6
|
+
min-inline-size: 0;
|
|
7
|
+
max-inline-size: 100%;
|
|
8
|
+
gap: var(--persona-avatar-gap, var(--space-2));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.ui-persona [data-slot="persona-body"] {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
flex: 1;
|
|
15
|
+
min-inline-size: 0;
|
|
16
|
+
gap: var(--persona-label-gap, 0);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ui-persona [data-slot="persona-name-line"] {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
min-inline-size: 0;
|
|
23
|
+
gap: var(--persona-trailing-gap, var(--space-1));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ui-persona [data-slot="persona-name"],
|
|
27
|
+
.ui-persona [data-slot="persona-description"] {
|
|
28
|
+
display: block;
|
|
29
|
+
min-inline-size: 0;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
text-overflow: ellipsis;
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
text-align: start;
|
|
34
|
+
line-height: var(--persona-label-line-height);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ui-persona [data-slot="persona-name"] {
|
|
38
|
+
font-size: var(--persona-name-font-size, var(--font-size-sm));
|
|
39
|
+
font-weight: var(--persona-name-font-weight, var(--font-weight-medium));
|
|
40
|
+
color: var(--persona-name-color, hsl(var(--foreground)));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ui-persona[data-size="sm"] [data-slot="persona-name"] {
|
|
44
|
+
font-size: var(--persona-name-font-size-sm, var(--font-size-xs));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ui-persona [data-slot="persona-description"] {
|
|
48
|
+
align-self: flex-start;
|
|
49
|
+
max-inline-size: 100%;
|
|
50
|
+
font-size: var(--persona-description-font-size, var(--font-size-xs));
|
|
51
|
+
color: var(--persona-description-color, hsl(var(--muted-foreground)));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ui-persona [data-slot="persona-trailing"] {
|
|
55
|
+
flex: none;
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
}
|
|
59
|
+
|
|
2
60
|
.ui-avatar {
|
|
3
61
|
position: relative;
|
|
4
62
|
display: inline-flex;
|
package/dist/styles/layers.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "33.
|
|
2
|
+
"version": "33.14.0",
|
|
3
3
|
"generatedBy": "scripts/gen-style-layers.mjs — do not edit by hand; run `pnpm gen:style-layers`",
|
|
4
4
|
"base": "base.css",
|
|
5
5
|
"fonts": "fonts.css",
|
|
@@ -768,6 +768,11 @@
|
|
|
768
768
|
"form-layout.css"
|
|
769
769
|
]
|
|
770
770
|
},
|
|
771
|
+
"Persona": {
|
|
772
|
+
"layers": [
|
|
773
|
+
"data-display-layout.css"
|
|
774
|
+
]
|
|
775
|
+
},
|
|
771
776
|
"PieChart": {
|
|
772
777
|
"layers": [
|
|
773
778
|
"layout.css",
|
|
@@ -1050,22 +1050,24 @@
|
|
|
1050
1050
|
display: block;
|
|
1051
1051
|
|
|
1052
1052
|
height: auto;
|
|
1053
|
-
|
|
1054
|
-
border
|
|
1053
|
+
|
|
1054
|
+
border: 0;
|
|
1055
|
+
border-block-end: var(--stroke-hairline) solid hsl(var(--border));
|
|
1056
|
+
border-radius: 0;
|
|
1055
1057
|
padding: var(--table-stacked-collection-card-padding-y)
|
|
1056
|
-
var(
|
|
1057
|
-
--table-stacked-collection-card-padding-x,
|
|
1058
|
-
calc(var(--card-space-inset) - var(--stroke-hairline))
|
|
1059
|
-
);
|
|
1058
|
+
var(--table-stacked-collection-card-padding-x, var(--card-space-inset));
|
|
1060
1059
|
margin-block-end: var(--table-stacked-collection-card-gap);
|
|
1061
1060
|
}
|
|
1062
1061
|
|
|
1063
1062
|
[data-collapse-below="sm"] .ui-table-row:last-child {
|
|
1064
1063
|
margin-block-end: 0;
|
|
1064
|
+
border-block-end-width: 0;
|
|
1065
1065
|
}
|
|
1066
1066
|
|
|
1067
1067
|
[data-collapse-below="sm"] [data-slot="table-cell"] {
|
|
1068
1068
|
display: block;
|
|
1069
|
+
|
|
1070
|
+
inline-size: auto !important;
|
|
1069
1071
|
padding-block: var(--table-stacked-collection-cell-padding-y);
|
|
1070
1072
|
|
|
1071
1073
|
padding-inline: var(--table-stacked-collection-cell-padding-x);
|
|
@@ -1107,22 +1109,24 @@
|
|
|
1107
1109
|
display: block;
|
|
1108
1110
|
|
|
1109
1111
|
height: auto;
|
|
1110
|
-
|
|
1111
|
-
border
|
|
1112
|
+
|
|
1113
|
+
border: 0;
|
|
1114
|
+
border-block-end: var(--stroke-hairline) solid hsl(var(--border));
|
|
1115
|
+
border-radius: 0;
|
|
1112
1116
|
padding: var(--table-stacked-collection-card-padding-y)
|
|
1113
|
-
var(
|
|
1114
|
-
--table-stacked-collection-card-padding-x,
|
|
1115
|
-
calc(var(--card-space-inset) - var(--stroke-hairline))
|
|
1116
|
-
);
|
|
1117
|
+
var(--table-stacked-collection-card-padding-x, var(--card-space-inset));
|
|
1117
1118
|
margin-block-end: var(--table-stacked-collection-card-gap);
|
|
1118
1119
|
}
|
|
1119
1120
|
|
|
1120
1121
|
[data-collapse-below="md"] .ui-table-row:last-child {
|
|
1121
1122
|
margin-block-end: 0;
|
|
1123
|
+
border-block-end-width: 0;
|
|
1122
1124
|
}
|
|
1123
1125
|
|
|
1124
1126
|
[data-collapse-below="md"] [data-slot="table-cell"] {
|
|
1125
1127
|
display: block;
|
|
1128
|
+
|
|
1129
|
+
inline-size: auto !important;
|
|
1126
1130
|
padding-block: var(--table-stacked-collection-cell-padding-y);
|
|
1127
1131
|
padding-inline: var(--table-stacked-collection-cell-padding-x);
|
|
1128
1132
|
white-space: normal;
|
|
@@ -1162,22 +1166,24 @@
|
|
|
1162
1166
|
display: block;
|
|
1163
1167
|
|
|
1164
1168
|
height: auto;
|
|
1165
|
-
|
|
1166
|
-
border
|
|
1169
|
+
|
|
1170
|
+
border: 0;
|
|
1171
|
+
border-block-end: var(--stroke-hairline) solid hsl(var(--border));
|
|
1172
|
+
border-radius: 0;
|
|
1167
1173
|
padding: var(--table-stacked-collection-card-padding-y)
|
|
1168
|
-
var(
|
|
1169
|
-
--table-stacked-collection-card-padding-x,
|
|
1170
|
-
calc(var(--card-space-inset) - var(--stroke-hairline))
|
|
1171
|
-
);
|
|
1174
|
+
var(--table-stacked-collection-card-padding-x, var(--card-space-inset));
|
|
1172
1175
|
margin-block-end: var(--table-stacked-collection-card-gap);
|
|
1173
1176
|
}
|
|
1174
1177
|
|
|
1175
1178
|
[data-collapse-below="lg"] .ui-table-row:last-child {
|
|
1176
1179
|
margin-block-end: 0;
|
|
1180
|
+
border-block-end-width: 0;
|
|
1177
1181
|
}
|
|
1178
1182
|
|
|
1179
1183
|
[data-collapse-below="lg"] [data-slot="table-cell"] {
|
|
1180
1184
|
display: block;
|
|
1185
|
+
|
|
1186
|
+
inline-size: auto !important;
|
|
1181
1187
|
padding-block: var(--table-stacked-collection-cell-padding-y);
|
|
1182
1188
|
padding-inline: var(--table-stacked-collection-cell-padding-x);
|
|
1183
1189
|
white-space: normal;
|
|
@@ -1217,22 +1223,24 @@
|
|
|
1217
1223
|
display: block;
|
|
1218
1224
|
|
|
1219
1225
|
height: auto;
|
|
1220
|
-
|
|
1221
|
-
border
|
|
1226
|
+
|
|
1227
|
+
border: 0;
|
|
1228
|
+
border-block-end: var(--stroke-hairline) solid hsl(var(--border));
|
|
1229
|
+
border-radius: 0;
|
|
1222
1230
|
padding: var(--table-stacked-collection-card-padding-y)
|
|
1223
|
-
var(
|
|
1224
|
-
--table-stacked-collection-card-padding-x,
|
|
1225
|
-
calc(var(--card-space-inset) - var(--stroke-hairline))
|
|
1226
|
-
);
|
|
1231
|
+
var(--table-stacked-collection-card-padding-x, var(--card-space-inset));
|
|
1227
1232
|
margin-block-end: var(--table-stacked-collection-card-gap);
|
|
1228
1233
|
}
|
|
1229
1234
|
|
|
1230
1235
|
[data-collapse-below="xl"] .ui-table-row:last-child {
|
|
1231
1236
|
margin-block-end: 0;
|
|
1237
|
+
border-block-end-width: 0;
|
|
1232
1238
|
}
|
|
1233
1239
|
|
|
1234
1240
|
[data-collapse-below="xl"] [data-slot="table-cell"] {
|
|
1235
1241
|
display: block;
|
|
1242
|
+
|
|
1243
|
+
inline-size: auto !important;
|
|
1236
1244
|
padding-block: var(--table-stacked-collection-cell-padding-y);
|
|
1237
1245
|
padding-inline: var(--table-stacked-collection-cell-padding-x);
|
|
1238
1246
|
white-space: normal;
|