@atom63/widgets 0.1.0-beta.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/LICENSE +27 -0
- package/README.md +29 -0
- package/dist/chunk-F5NV6XJ5.js +418 -0
- package/dist/chunk-F5NV6XJ5.js.map +1 -0
- package/dist/chunk-US2CE3BV.js +222 -0
- package/dist/chunk-US2CE3BV.js.map +1 -0
- package/dist/index.d.ts +714 -0
- package/dist/index.js +206 -0
- package/dist/index.js.map +1 -0
- package/dist/primitives/index.d.ts +123 -0
- package/dist/primitives/index.js +4 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/runtime/index.d.ts +129 -0
- package/dist/runtime/index.js +236 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/state/index.d.ts +90 -0
- package/dist/state/index.js +158 -0
- package/dist/state/index.js.map +1 -0
- package/dist/types-C0zDKyo1.d.ts +3 -0
- package/dist/widget-card-BckLTmBY.d.ts +112 -0
- package/package.json +98 -0
- package/src/layout/widget-layout.css +76 -0
- package/src/primitives/widget-avatar.css +153 -0
- package/src/primitives/widget-card.css +128 -0
- package/src/primitives/widget-surface.css +75 -0
- package/src/runtime/widget-runtime.css +136 -0
- package/src/state/widget-state-feedback.css +149 -0
- package/src/styles.css +20 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { cn, wuMerge, wu, WIDGET_BODY_INSET, widgetInsetStyle, widgetChromeIconStyle, widgetTypeStyle, widgetClampRelief } from './chunk-F5NV6XJ5.js';
|
|
2
|
+
import { Avatar, AvatarImage, AvatarFallback } from '@atom63/ui-react';
|
|
3
|
+
import { LoaderCircle, RefreshCw } from 'lucide-react';
|
|
4
|
+
import { memo, createContext, useContext } from 'react';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var WidgetAvatar = memo(
|
|
8
|
+
({
|
|
9
|
+
alt = "",
|
|
10
|
+
busy = false,
|
|
11
|
+
className,
|
|
12
|
+
fallback,
|
|
13
|
+
onShuffle,
|
|
14
|
+
shuffleLabel = "Shuffle avatar",
|
|
15
|
+
showOutline = false,
|
|
16
|
+
size = "md",
|
|
17
|
+
src,
|
|
18
|
+
status = false
|
|
19
|
+
}) => {
|
|
20
|
+
const canShuffle = Boolean(onShuffle);
|
|
21
|
+
return /* @__PURE__ */ jsxs(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
className: cn("a63-WidgetAvatar", className),
|
|
25
|
+
"data-busy": busy ? "" : void 0,
|
|
26
|
+
"data-slot": "widget-avatar",
|
|
27
|
+
"data-widget-avatar-size": size,
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsxs(Avatar, { className: "a63-WidgetAvatar-avatar", "data-outline": showOutline ? "" : void 0, children: [
|
|
30
|
+
/* @__PURE__ */ jsx(AvatarImage, { alt, src }),
|
|
31
|
+
/* @__PURE__ */ jsx(AvatarFallback, { children: fallback })
|
|
32
|
+
] }),
|
|
33
|
+
busy && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "a63-WidgetAvatar-busyRing" }),
|
|
34
|
+
canShuffle && /* @__PURE__ */ jsx(
|
|
35
|
+
"button",
|
|
36
|
+
{
|
|
37
|
+
"aria-label": shuffleLabel,
|
|
38
|
+
className: "a63-WidgetAvatar-shuffle",
|
|
39
|
+
disabled: busy,
|
|
40
|
+
onClick: onShuffle,
|
|
41
|
+
type: "button",
|
|
42
|
+
children: busy ? /* @__PURE__ */ jsx(LoaderCircle, { "aria-hidden": true, className: "a63-WidgetAvatar-shuffleIcon a63-Widget-spin" }) : /* @__PURE__ */ jsx(RefreshCw, { "aria-hidden": true, className: "a63-WidgetAvatar-shuffleIcon" })
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
status && // The notch ring matches the card surface the avatar sits on, not the
|
|
46
|
+
// page, so the separator stays visible across themes and hosts.
|
|
47
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "a63-WidgetAvatar-status", "data-slot": "widget-avatar-status" })
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
WidgetAvatar.displayName = "WidgetAvatar";
|
|
54
|
+
|
|
55
|
+
// src/primitives/widget-surface-classes.ts
|
|
56
|
+
var WIDGET_RIM_SHELL_CLASS = "a63-WidgetSurface";
|
|
57
|
+
var WIDGET_CARD_SURFACE_CLASS = "a63-WidgetSurface-face";
|
|
58
|
+
var WidgetSurfaceSizeContext = createContext(void 0);
|
|
59
|
+
var SHELL_BOX_CLASS_PATTERN = /(^|:)(w|h|size|max-w|max-h|basis|aspect)-\[?[a-z0-9./%[\]-]+\]?$/;
|
|
60
|
+
var SHARED_CLASS_PATTERN = /(^|:)(overflow(-[xy])?-[a-z]+|min-[wh]-[a-z0-9.[\]/-]+|flex-(1|auto|initial|none)|grow(-0)?|shrink(-0)?)$/;
|
|
61
|
+
function partitionSurfaceClasses(className) {
|
|
62
|
+
if (!className) return { face: void 0, shell: void 0 };
|
|
63
|
+
const face = [];
|
|
64
|
+
const shell = [];
|
|
65
|
+
for (const token of className.split(/\s+/).filter(Boolean)) {
|
|
66
|
+
if (SHELL_BOX_CLASS_PATTERN.test(token)) {
|
|
67
|
+
shell.push(token);
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
face.push(token);
|
|
71
|
+
if (SHARED_CLASS_PATTERN.test(token)) shell.push(token);
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
face: face.length > 0 ? face.join(" ") : void 0,
|
|
75
|
+
shell: shell.length > 0 ? shell.join(" ") : void 0
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function useWidgetSurfaceSize() {
|
|
79
|
+
return useContext(WidgetSurfaceSizeContext);
|
|
80
|
+
}
|
|
81
|
+
function WidgetSurfaceSizeProvider({
|
|
82
|
+
children,
|
|
83
|
+
size
|
|
84
|
+
}) {
|
|
85
|
+
return /* @__PURE__ */ jsx(WidgetSurfaceSizeContext.Provider, { value: size, children });
|
|
86
|
+
}
|
|
87
|
+
function WidgetSurface({ children, className, size, ...rest }) {
|
|
88
|
+
const partitioned = partitionSurfaceClasses(className);
|
|
89
|
+
return /* @__PURE__ */ jsx(WidgetSurfaceSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
...rest,
|
|
93
|
+
className: cn(WIDGET_RIM_SHELL_CLASS, partitioned.shell),
|
|
94
|
+
"data-widget-surface": "",
|
|
95
|
+
"data-widget-surface-size": size,
|
|
96
|
+
children: /* @__PURE__ */ jsx("div", { className: cn(WIDGET_CARD_SURFACE_CLASS, "a63-WidgetSurface-body", partitioned.face), children })
|
|
97
|
+
}
|
|
98
|
+
) });
|
|
99
|
+
}
|
|
100
|
+
var WIDGET_BODY_INSET_CLASS = {
|
|
101
|
+
small: "",
|
|
102
|
+
medium: "",
|
|
103
|
+
large: ""
|
|
104
|
+
};
|
|
105
|
+
function WidgetCard({ children, className, size, ...props }) {
|
|
106
|
+
return /* @__PURE__ */ jsx(
|
|
107
|
+
WidgetSurface,
|
|
108
|
+
{
|
|
109
|
+
...props,
|
|
110
|
+
className: cn("a63-WidgetCard", "group", className),
|
|
111
|
+
"data-slot": "widget-card",
|
|
112
|
+
size,
|
|
113
|
+
children
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
function WidgetCardHeader({ children, className, style }) {
|
|
118
|
+
const size = useWidgetSurfaceSize() ?? "large";
|
|
119
|
+
return /* @__PURE__ */ jsx(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
className: cn("a63-WidgetCardHeader", className),
|
|
123
|
+
"data-size": size,
|
|
124
|
+
"data-slot": "widget-card-header",
|
|
125
|
+
style: wuMerge(
|
|
126
|
+
{
|
|
127
|
+
paddingInline: wu(WIDGET_BODY_INSET[size]),
|
|
128
|
+
columnGap: wu(size === "small" ? 6 : 8)
|
|
129
|
+
},
|
|
130
|
+
style
|
|
131
|
+
),
|
|
132
|
+
children
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
function WidgetCardHeaderLeft({ children, className }) {
|
|
137
|
+
return /* @__PURE__ */ jsx(
|
|
138
|
+
"div",
|
|
139
|
+
{
|
|
140
|
+
className: cn("a63-WidgetCardHeader-start", className),
|
|
141
|
+
"data-slot": "widget-card-header-left",
|
|
142
|
+
children
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
function WidgetCardHeaderRight({ children, className }) {
|
|
147
|
+
return /* @__PURE__ */ jsx("div", { className: cn("a63-WidgetCardHeader-end", className), "data-slot": "widget-card-header-right", children });
|
|
148
|
+
}
|
|
149
|
+
function WidgetCardContent({ children, className, style }) {
|
|
150
|
+
const size = useWidgetSurfaceSize() ?? "large";
|
|
151
|
+
return /* @__PURE__ */ jsx(
|
|
152
|
+
"div",
|
|
153
|
+
{
|
|
154
|
+
className: cn("a63-WidgetCardContent", className),
|
|
155
|
+
"data-slot": "widget-card-content",
|
|
156
|
+
style: wuMerge(widgetInsetStyle(size, "body"), style),
|
|
157
|
+
children
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
function WidgetBlock({ children, className, style }) {
|
|
162
|
+
return /* @__PURE__ */ jsx("div", { className: cn("a63-WidgetBlock", className), "data-slot": "widget-block", style, children });
|
|
163
|
+
}
|
|
164
|
+
function WidgetBlockHeader({ children, className }) {
|
|
165
|
+
return /* @__PURE__ */ jsx("header", { className: cn("a63-WidgetBlock-header", className), "data-slot": "widget-block-header", children });
|
|
166
|
+
}
|
|
167
|
+
function WidgetBlockContent({ children, className }) {
|
|
168
|
+
return /* @__PURE__ */ jsx("div", { className: cn("a63-WidgetBlock-content", className), "data-slot": "widget-block-content", children });
|
|
169
|
+
}
|
|
170
|
+
function WidgetBlockFooter({ children, className }) {
|
|
171
|
+
return /* @__PURE__ */ jsx("footer", { className: cn("a63-WidgetBlock-footer", className), "data-slot": "widget-block-footer", children });
|
|
172
|
+
}
|
|
173
|
+
function WidgetCardTitle({ children, icon, className }) {
|
|
174
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("a63-WidgetCardTitle", className), "data-slot": "widget-card-title", children: [
|
|
175
|
+
icon && /* @__PURE__ */ jsx(
|
|
176
|
+
"span",
|
|
177
|
+
{
|
|
178
|
+
className: "a63-WidgetCardTitle-icon",
|
|
179
|
+
"data-slot": "widget-card-title-icon",
|
|
180
|
+
style: widgetChromeIconStyle(),
|
|
181
|
+
children: icon
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
/* @__PURE__ */ jsx(
|
|
185
|
+
"div",
|
|
186
|
+
{
|
|
187
|
+
className: "a63-WidgetCardTitle-text",
|
|
188
|
+
"data-slot": "widget-card-title-text",
|
|
189
|
+
style: wuMerge(widgetTypeStyle("chrome"), widgetClampRelief()),
|
|
190
|
+
children
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
] });
|
|
194
|
+
}
|
|
195
|
+
function WidgetCardTextGroup({ children, className }) {
|
|
196
|
+
return /* @__PURE__ */ jsx("div", { className: cn("a63-WidgetCardTextGroup", className), "data-slot": "widget-card-text-group", children });
|
|
197
|
+
}
|
|
198
|
+
function WidgetCardRow({ children, className }) {
|
|
199
|
+
return /* @__PURE__ */ jsx("div", { className: cn("a63-WidgetCardRow", className), "data-slot": "widget-card-row", children });
|
|
200
|
+
}
|
|
201
|
+
function WidgetShell({
|
|
202
|
+
children,
|
|
203
|
+
className,
|
|
204
|
+
contentClassName,
|
|
205
|
+
headerClassName,
|
|
206
|
+
headerEnd,
|
|
207
|
+
icon,
|
|
208
|
+
title,
|
|
209
|
+
...props
|
|
210
|
+
}) {
|
|
211
|
+
return /* @__PURE__ */ jsxs(WidgetCard, { className, ...props, children: [
|
|
212
|
+
/* @__PURE__ */ jsxs(WidgetCardHeader, { className: headerClassName, children: [
|
|
213
|
+
/* @__PURE__ */ jsx(WidgetCardTitle, { icon, children: title }),
|
|
214
|
+
headerEnd
|
|
215
|
+
] }),
|
|
216
|
+
/* @__PURE__ */ jsx(WidgetCardContent, { className: contentClassName, children })
|
|
217
|
+
] });
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export { WIDGET_BODY_INSET_CLASS, WIDGET_CARD_SURFACE_CLASS, WIDGET_RIM_SHELL_CLASS, WidgetAvatar, WidgetBlock, WidgetBlockContent, WidgetBlockFooter, WidgetBlockHeader, WidgetCard, WidgetCardContent, WidgetCardHeader, WidgetCardHeaderLeft, WidgetCardHeaderRight, WidgetCardRow, WidgetCardTextGroup, WidgetCardTitle, WidgetShell, WidgetSurface, WidgetSurfaceSizeProvider, useWidgetSurfaceSize };
|
|
221
|
+
//# sourceMappingURL=chunk-US2CE3BV.js.map
|
|
222
|
+
//# sourceMappingURL=chunk-US2CE3BV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/primitives/widget-avatar.tsx","../src/primitives/widget-surface-classes.ts","../src/primitives/widget-surface.tsx","../src/primitives/widget-card.tsx"],"names":["jsx","jsxs"],"mappings":";;;;;;AAoCO,IAAM,YAAA,GAAe,IAAA;AAAA,EAC1B,CAAC;AAAA,IACC,GAAA,GAAM,EAAA;AAAA,IACN,IAAA,GAAO,KAAA;AAAA,IACP,SAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,YAAA,GAAe,gBAAA;AAAA,IACf,WAAA,GAAc,KAAA;AAAA,IACd,IAAA,GAAO,IAAA;AAAA,IACP,GAAA;AAAA,IACA,MAAA,GAAS;AAAA,GACX,KAAM;AACJ,IAAA,MAAM,UAAA,GAAa,QAAQ,SAAS,CAAA;AAEpC,IAAA,uBACE,IAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,EAAA,CAAG,kBAAA,EAAoB,SAAS,CAAA;AAAA,QAC3C,WAAA,EAAW,OAAO,EAAA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AAQ,CAAA,EAAG,mBAAmB,CAAA;AAAA,QAE5D;AAAA;AAAA;AACH,GAAA,EACF,CAAA;AAEJ;AAWO,SAAS,mBAAA,CAAoB,EAAE,QAAA,EAAU,SAAA,EAAU,EAAwB;AAChF,EAAA,uBACEA,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,2BAA2B,SAAS,CAAA,EAAG,WAAA,EAAU,wBAAA,EACjE,QAAA,EACH,CAAA;AAEJ;AAMO,SAAS,aAAA,CAAc,EAAE,QAAA,EAAU,SAAA,EAAU,EAAwB;AAC1E,EAAA,uBACEA,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,qBAAqB,SAAS,CAAA,EAAG,WAAA,EAAU,iBAAA,EAC3D,QAAA,EACH,CAAA;AAEJ;AAWO,SAAS,WAAA,CAAY;AAAA,EAC1B,QAAA;AAAA,EACA,SAAA;AAAA,EACA,gBAAA;AAAA,EACA,eAAA;AAAA,EACA,SAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAqB;AACnB,EAAA,uBACEC,IAAAA,CAAC,UAAA,EAAA,EAAW,SAAA,EAAuB,GAAG,KAAA,EACpC,QAAA,EAAA;AAAA,oBAAAA,IAAAA,CAAC,gBAAA,EAAA,EAAiB,SAAA,EAAW,eAAA,EAC3B,QAAA,EAAA;AAAA,sBAAAD,GAAAA,CAAC,eAAA,EAAA,EAAgB,IAAA,EAAa,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,MACnC;AAAA,KAAA,EACH,CAAA;AAAA,oBACAA,GAAAA,CAAC,iBAAA,EAAA,EAAkB,SAAA,EAAW,kBAAmB,QAAA,EAAS;AAAA,GAAA,EAC5D,CAAA;AAEJ","file":"chunk-US2CE3BV.js","sourcesContent":["import { Avatar, AvatarFallback, AvatarImage } from '@atom63/ui-react'\nimport { LoaderCircle, RefreshCw } from 'lucide-react'\nimport { memo } from 'react'\nimport { cn } from '../utils'\n\nexport type WidgetAvatarSize = 'sm' | 'md' | 'lg' | 'xl'\n\nexport interface WidgetAvatarProps {\n alt?: string\n /** Loading or shuffling: reveals the overlay and shows a spinner. */\n busy?: boolean\n className?: string\n fallback: string\n /** When provided, the avatar becomes a shuffle affordance (hover/focus reveal). */\n onShuffle?: () => void\n shuffleLabel?: string\n /** Draws the primary accent ring (e.g. the featured card avatar). */\n showOutline?: boolean\n size?: WidgetAvatarSize\n src?: string\n /**\n * Shows the decorative presence dot seated on the circle's lower-right.\n * The status meaning is conveyed textually elsewhere (e.g. a status badge),\n * so the dot itself is aria-hidden.\n */\n status?: boolean\n}\n\n/**\n * Circular avatar primitive with an optional shuffle overlay and a presence dot.\n * Chrome-agnostic and data-agnostic — widgets map their own data onto it.\n *\n * Per-size geometry (the avatar, the presence dot and the shuffle glyph) comes\n * from the stylesheet, keyed on `data-widget-avatar-size`. The status dot is\n * seated on the circle's lower-end arc, not the bounding-box corner.\n */\nexport const WidgetAvatar = memo<WidgetAvatarProps>(\n ({\n alt = '',\n busy = false,\n className,\n fallback,\n onShuffle,\n shuffleLabel = 'Shuffle avatar',\n showOutline = false,\n size = 'md',\n src,\n status = false,\n }) => {\n const canShuffle = Boolean(onShuffle)\n\n return (\n <div\n className={cn('a63-WidgetAvatar', className)}\n data-busy={busy ? '' : undefined}\n data-slot=\"widget-avatar\"\n data-widget-avatar-size={size}\n >\n <Avatar className=\"a63-WidgetAvatar-avatar\" data-outline={showOutline ? '' : undefined}>\n <AvatarImage alt={alt} src={src} />\n <AvatarFallback>{fallback}</AvatarFallback>\n </Avatar>\n\n {busy && <span aria-hidden className=\"a63-WidgetAvatar-busyRing\" />}\n\n {canShuffle && (\n <button\n aria-label={shuffleLabel}\n className=\"a63-WidgetAvatar-shuffle\"\n disabled={busy}\n onClick={onShuffle}\n type=\"button\"\n >\n {busy ? (\n <LoaderCircle aria-hidden className=\"a63-WidgetAvatar-shuffleIcon a63-Widget-spin\" />\n ) : (\n <RefreshCw aria-hidden className=\"a63-WidgetAvatar-shuffleIcon\" />\n )}\n </button>\n )}\n\n {status && (\n // The notch ring matches the card surface the avatar sits on, not the\n // page, so the separator stays visible across themes and hosts.\n <span aria-hidden className=\"a63-WidgetAvatar-status\" data-slot=\"widget-avatar-status\" />\n )}\n </div>\n )\n }\n)\n\nWidgetAvatar.displayName = 'WidgetAvatar'\n","/**\n * Outer shell of the themed widget surface — the rim.\n *\n * The rim is real geometry between the tile edge and the card face, so it can\n * carry a gradient across the whole frame, its own backdrop-filter, and a\n * smaller inner radius; a `box-shadow` inset can do none of those.\n *\n * It is a BORDER, not padding. Both inset the face identically, but only a\n * border follows `border-radius` — it mitres around each corner arc and takes a\n * per-side color. That is what lets a bevel theme light the top and left edges\n * while darkening the bottom and right AT ANY RADIUS. Radius is a\n * personalization axis, so the chrome has to hold up across it, not just at\n * each theme's default.\n *\n * The drop shadow belongs here, on the outermost box, so it casts from the true\n * tile edge. The shell's z-index scopes the face's material pseudo to this\n * surface's own stacking context so it can't bleed behind sibling tiles.\n *\n * The declarations live in `@atom63/widgets/styles.css` (`.a63-WidgetSurface`).\n */\nexport const WIDGET_RIM_SHELL_CLASS = 'a63-WidgetSurface'\n\n/**\n * Inner face of the themed widget surface — the card material.\n *\n * The frosted-glass fill + backdrop blur live on an isolated `::before` layer\n * (behind the content), not on the face element itself. Decoupling the blur\n * from content paint fixes the Chrome backdrop-filter flicker (crbug 41471914)\n * and the border-radius bleed (crbug 41212594 / 41432992).\n *\n * Deliberately NOT `position: relative`: a host can compose this class with its\n * own absolute positioning (a drag placeholder, for instance). `WidgetSurface`\n * adds the positioning itself to anchor the ::before material to the face.\n *\n * The declarations live in `@atom63/widgets/styles.css`\n * (`.a63-WidgetSurface-face`).\n */\nexport const WIDGET_CARD_SURFACE_CLASS = 'a63-WidgetSurface-face'\n","import { createContext, type HTMLAttributes, type ReactNode, useContext } from 'react'\nimport type { WidgetSize } from '../types'\nimport { cn } from '../utils'\nimport { WIDGET_CARD_SURFACE_CLASS, WIDGET_RIM_SHELL_CLASS } from './widget-surface-classes'\n\nconst WidgetSurfaceSizeContext = createContext<WidgetSize | undefined>(undefined)\n\n/**\n * The partition reads Tailwind utility names, because that is what consumer\n * call sites write. The package's own classes stay on the face.\n *\n * Classes that size the widget's OUTER box, so they belong on the shell and must\n * NOT stay on the face. A consumer writing `w-80` means \"this widget is 320px\n * wide\" — left on the face it constrains the material while the shell still\n * stretches to its parent, which shows up as dead space along one edge.\n *\n * Deliberately excludes bare `flex` and `flex-col`/`flex-row`: those set display\n * and direction for the CHILDREN, so they stay on the face.\n */\nconst SHELL_BOX_CLASS_PATTERN = /(^|:)(w|h|size|max-w|max-h|basis|aspect)-\\[?[a-z0-9./%[\\]-]+\\]?$/\n\n/**\n * Classes that must apply to BOTH boxes. `overflow-*` because the shell owns the\n * outer clip, so a view asking for `overflow-visible` has to escape both. Flex\n * item + min-size because each box is a flex item of the one above it, and\n * `min-h-0` on the face is separately load-bearing for internal scrolling.\n */\nconst SHARED_CLASS_PATTERN =\n /(^|:)(overflow(-[xy])?-[a-z]+|min-[wh]-[a-z0-9.[\\]/-]+|flex-(1|auto|initial|none)|grow(-0)?|shrink(-0)?)$/\n\nfunction partitionSurfaceClasses(className: string | undefined) {\n if (!className) return { face: undefined, shell: undefined }\n const face: string[] = []\n const shell: string[] = []\n for (const token of className.split(/\\s+/).filter(Boolean)) {\n if (SHELL_BOX_CLASS_PATTERN.test(token)) {\n shell.push(token)\n continue\n }\n face.push(token)\n if (SHARED_CLASS_PATTERN.test(token)) shell.push(token)\n }\n return {\n face: face.length > 0 ? face.join(' ') : undefined,\n shell: shell.length > 0 ? shell.join(' ') : undefined,\n }\n}\n\n/** Read the size of the nearest enclosing WidgetSurface (undefined outside one). */\nexport function useWidgetSurfaceSize(): WidgetSize | undefined {\n return useContext(WidgetSurfaceSizeContext)\n}\n\n/**\n * Publish a surface size WITHOUT any chrome.\n *\n * Use this inside a widget when an inner region only needs content blocks to\n * read `useWidgetSurfaceSize()` for density. Reaching for `WidgetSurface` and\n * switching its chrome off with `rounded-none border-0 bg-transparent\n * before:hidden` no longer works: `className` lands on the face, so the rim\n * shell still paints padding, background and radius — which renders as a\n * nested card inside the widget.\n */\nexport function WidgetSurfaceSizeProvider({\n children,\n size,\n}: {\n children: ReactNode\n size: WidgetSize\n}) {\n return (\n <WidgetSurfaceSizeContext.Provider value={size}>{children}</WidgetSurfaceSizeContext.Provider>\n )\n}\n\nexport interface WidgetSurfaceProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode\n /** Grid footprint: 1×1, 2×1 or 2×2. Every widget is designed at all three. */\n size: WidgetSize\n}\n\n/**\n * The sized surface primitive: themed chrome + size semantics. `size` is a\n * signal (data attribute + context), not dimensions — the box comes from the\n * consumption context (a grid tile). Content blocks read the size via\n * useWidgetSurfaceSize() to adapt density.\n *\n * It nests two layers: an outer SHELL carrying the rim (real padded geometry,\n * so it can hold a gradient across the whole frame) and an inner FACE carrying\n * today's background, border, and the ::before backdrop.\n * The shell is the surface root — `{...rest}` and the `data-widget-surface*`\n * attributes live there, because measurement tooling queries them and the tile\n * edge is the outer box.\n *\n * Consumer `className` is PARTITIONED between the two boxes, because real call\n * sites mix both concerns in one string (`flex size-full min-h-0 flex-col`):\n *\n * - box classes (`w-80`, `size-full`, `aspect-[2/1]`) size the widget itself, so\n * they move to the shell. Left on the face they constrain the material while\n * the shell still stretches to its parent, leaving dead space along one edge.\n * - flex-item and `overflow-*` classes apply to BOTH, since each box is a flex\n * item of the one above and the shell owns the outer clip.\n * - everything else stays on the face: inner layout (`flex-col`, `gap-3`,\n * `p-4`) and the chrome escape hatches (`before:hidden`, `border-0`) that need\n * to reach the element actually painting the material.\n */\nexport function WidgetSurface({ children, className, size, ...rest }: WidgetSurfaceProps) {\n const partitioned = partitionSurfaceClasses(className)\n\n return (\n <WidgetSurfaceSizeContext.Provider value={size}>\n <div\n {...rest}\n className={cn(WIDGET_RIM_SHELL_CLASS, partitioned.shell)}\n data-widget-surface=\"\"\n data-widget-surface-size={size}\n >\n {/* `a63-WidgetSurface-body` positions the face, which anchors its\n absolutely-positioned ::before material to the face rather than\n letting it escape to the shell. */}\n <div className={cn(WIDGET_CARD_SURFACE_CLASS, 'a63-WidgetSurface-body', partitioned.face)}>\n {children}\n </div>\n </div>\n </WidgetSurfaceSizeContext.Provider>\n )\n}\n","import type React from 'react'\nimport type { CSSProperties } from 'react'\nimport {\n WIDGET_BODY_INSET,\n widgetChromeIconStyle,\n widgetClampRelief,\n widgetInsetStyle,\n widgetTypeStyle,\n wu,\n wuMerge,\n} from '../layout'\nimport type { WidgetSize } from '../types'\nimport { cn } from '../utils'\nimport { useWidgetSurfaceSize, WidgetSurface } from './widget-surface'\n\nexport { WIDGET_CARD_SURFACE_CLASS, WIDGET_RIM_SHELL_CLASS } from './widget-surface-classes'\n\ninterface WidgetCardProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode\n /** Grid size fed into the surface context for chrome-less content to read. */\n size: WidgetSize\n}\n\n/*\n * Footprint chrome/card rhythm (header height, card gap) lives in the\n * stylesheet, keyed on the surface size. Horizontal padding comes from\n * `widgetInsetStyle`.\n */\n\n/**\n * @deprecated Prefer `widgetInsetStyle(size, 'body')`. Kept as a thin alias so\n * existing call sites can migrate without a flag day.\n */\nexport const WIDGET_BODY_INSET_CLASS: Record<WidgetSize, string> = {\n small: '',\n medium: '',\n large: '',\n}\n\n/**\n * Widget Card - Base container for widgets\n * Uses design system tokens for consistent styling.\n * Direct-child spacing follows the widget footprint: compact for one-row\n * surfaces and comfortable for the large canvas.\n */\nexport function WidgetCard({ children, className, size, ...props }: WidgetCardProps) {\n return (\n <WidgetSurface\n {...props}\n // `group` stays as a marker for consumer `group-hover:` utilities.\n className={cn('a63-WidgetCard', 'group', className)}\n data-slot=\"widget-card\"\n size={size}\n >\n {children}\n </WidgetSurface>\n )\n}\n\ninterface WidgetCardHeaderProps {\n children: React.ReactNode\n className?: string\n style?: CSSProperties\n}\n\n/**\n * Widget Card Header - Title/header section for widgets\n * Composed of left (icon + label) and right (optional badge/button) sections\n */\nexport function WidgetCardHeader({ children, className, style }: WidgetCardHeaderProps) {\n const size = useWidgetSurfaceSize() ?? 'large'\n\n return (\n <div\n className={cn('a63-WidgetCardHeader', className)}\n data-size={size}\n data-slot=\"widget-card-header\"\n style={wuMerge(\n {\n paddingInline: wu(WIDGET_BODY_INSET[size]),\n columnGap: wu(size === 'small' ? 6 : 8),\n },\n style\n )}\n >\n {children}\n </div>\n )\n}\n\ninterface WidgetCardHeaderLeftProps {\n children: React.ReactNode\n className?: string\n}\n\n/**\n * Widget Card Header Left - Left side of header (icon + label)\n */\nexport function WidgetCardHeaderLeft({ children, className }: WidgetCardHeaderLeftProps) {\n return (\n <div\n className={cn('a63-WidgetCardHeader-start', className)}\n data-slot=\"widget-card-header-left\"\n >\n {children}\n </div>\n )\n}\n\ninterface WidgetCardHeaderRightProps {\n children: React.ReactNode\n className?: string\n}\n\n/**\n * Widget Card Header Right - Right side of header (optional badge/button)\n */\nexport function WidgetCardHeaderRight({ children, className }: WidgetCardHeaderRightProps) {\n return (\n <div className={cn('a63-WidgetCardHeader-end', className)} data-slot=\"widget-card-header-right\">\n {children}\n </div>\n )\n}\n\ninterface WidgetCardContentProps {\n children: React.ReactNode\n className?: string\n style?: CSSProperties\n}\n\n/**\n * Widget Card Content - Main content area for widgets.\n * Padding/gap come from `widgetInsetStyle(size, 'body')`.\n */\nexport function WidgetCardContent({ children, className, style }: WidgetCardContentProps) {\n const size = useWidgetSurfaceSize() ?? 'large'\n\n return (\n <div\n className={cn('a63-WidgetCardContent', className)}\n data-slot=\"widget-card-content\"\n style={wuMerge(widgetInsetStyle(size, 'body'), style)}\n >\n {children}\n </div>\n )\n}\n\ninterface WidgetBlockProps {\n children: React.ReactNode\n className?: string\n style?: CSSProperties\n}\n\n/**\n * Widget block — stacks optional header, content, and footer regions.\n * Pass `style={widgetInsetStyle(size, 'body')}` when the block owns padding.\n */\nexport function WidgetBlock({ children, className, style }: WidgetBlockProps) {\n return (\n <div className={cn('a63-WidgetBlock', className)} data-slot=\"widget-block\" style={style}>\n {children}\n </div>\n )\n}\n\ninterface WidgetBlockRegionProps {\n children: React.ReactNode\n className?: string\n}\n\n/** Optional top region inside a widget block (title, metadata, controls). */\nexport function WidgetBlockHeader({ children, className }: WidgetBlockRegionProps) {\n return (\n <header className={cn('a63-WidgetBlock-header', className)} data-slot=\"widget-block-header\">\n {children}\n </header>\n )\n}\n\n/** Primary widget body — grows to fill space between header and footer. */\nexport function WidgetBlockContent({ children, className }: WidgetBlockRegionProps) {\n return (\n <div className={cn('a63-WidgetBlock-content', className)} data-slot=\"widget-block-content\">\n {children}\n </div>\n )\n}\n\n/** Optional bottom region (actions, status, pagination). */\nexport function WidgetBlockFooter({ children, className }: WidgetBlockRegionProps) {\n return (\n <footer className={cn('a63-WidgetBlock-footer', className)} data-slot=\"widget-block-footer\">\n {children}\n </footer>\n )\n}\n\ninterface WidgetCardTitleProps {\n children: React.ReactNode\n className?: string\n icon?: React.ReactNode\n}\n\n/**\n * Widget Card Title - Quiet chrome identity with optional leading icon.\n * Icon slot tracks the chrome type ramp (design 12 → ~10px at OS63) so the\n * pair stays optically matched when the label steps down.\n */\nexport function WidgetCardTitle({ children, icon, className }: WidgetCardTitleProps) {\n return (\n <div className={cn('a63-WidgetCardTitle', className)} data-slot=\"widget-card-title\">\n {icon && (\n <span\n className=\"a63-WidgetCardTitle-icon\"\n data-slot=\"widget-card-title-icon\"\n style={widgetChromeIconStyle()}\n >\n {icon}\n </span>\n )}\n <div\n className=\"a63-WidgetCardTitle-text\"\n data-slot=\"widget-card-title-text\"\n style={wuMerge(widgetTypeStyle('chrome'), widgetClampRelief())}\n >\n {children}\n </div>\n </div>\n )\n}\n\ninterface WidgetCardTextProps {\n children: React.ReactNode\n className?: string\n}\n\n/**\n * Widget Card Text Group - Flex column that clips content instead of wrapping.\n * Use around text blocks that should truncate during widget size transitions.\n */\nexport function WidgetCardTextGroup({ children, className }: WidgetCardTextProps) {\n return (\n <div className={cn('a63-WidgetCardTextGroup', className)} data-slot=\"widget-card-text-group\">\n {children}\n </div>\n )\n}\n\n/**\n * Widget Card Row - Inline row that stays on one line and clips overflow.\n * Use for metadata rows (location, stats, labels) that shouldn't wrap.\n */\nexport function WidgetCardRow({ children, className }: WidgetCardTextProps) {\n return (\n <div className={cn('a63-WidgetCardRow', className)} data-slot=\"widget-card-row\">\n {children}\n </div>\n )\n}\n\ninterface WidgetShellProps extends Omit<WidgetCardProps, 'children' | 'title'> {\n children: React.ReactNode\n contentClassName?: string\n headerClassName?: string\n headerEnd?: React.ReactNode\n icon?: React.ReactNode\n title: React.ReactNode\n}\n\nexport function WidgetShell({\n children,\n className,\n contentClassName,\n headerClassName,\n headerEnd,\n icon,\n title,\n ...props\n}: WidgetShellProps) {\n return (\n <WidgetCard className={className} {...props}>\n <WidgetCardHeader className={headerClassName}>\n <WidgetCardTitle icon={icon}>{title}</WidgetCardTitle>\n {headerEnd}\n </WidgetCardHeader>\n <WidgetCardContent className={contentClassName}>{children}</WidgetCardContent>\n </WidgetCard>\n )\n}\n"]}
|