@vantageos/mosaic-blocks 0.4.6-alpha → 0.4.8-alpha
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 +5 -4
- package/dist/index.cjs +408 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +313 -2
- package/dist/index.d.ts +313 -2
- package/dist/index.js +408 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
## 1. Hero & Positioning
|
|
12
12
|
|
|
13
|
-
`@vantageos/mosaic-blocks` is the **React composed-block layer** of the VantageOS Mosaic design system. It provides
|
|
13
|
+
`@vantageos/mosaic-blocks` is the **React composed-block layer** of the VantageOS Mosaic design system. It provides 125 opinionated, fully-typed UI components that integrate natively with:
|
|
14
14
|
|
|
15
15
|
- **Clerk** — auth sign-in/up flows, org switcher, RBAC, webhook sync
|
|
16
16
|
- **Convex** — real-time data binding ready
|
|
@@ -169,7 +169,7 @@ For OKLCH design tokens, pair with `@vantageos/mosaic-tokens` — see [Section 1
|
|
|
169
169
|
|
|
170
170
|
## 6. Component Catalogue Summary
|
|
171
171
|
|
|
172
|
-
|
|
172
|
+
125 exported `Mosaic*` components across 9 sections (142 total named exports including hooks, variant helpers, and unprefixed aliases such as `Tooltip`/`Accordion`). This count is enforced by `src/__tests__/readme-matches-exports.test.ts` — it fails CI if this README drifts from `src/index.ts` again. Full reference: [docs/components-catalog.md](docs/components-catalog.md).
|
|
173
173
|
|
|
174
174
|
> There is **no "Debate" section**. No `Mosaic*` debate component (room/timer/participant) is exported by this package — despite the "absorbed from anydebate" origin story below, the debate UI was never ported. If you need debate-room UI, it does not exist here yet.
|
|
175
175
|
|
|
@@ -179,7 +179,7 @@ For OKLCH design tokens, pair with `@vantageos/mosaic-tokens` — see [Section 1
|
|
|
179
179
|
| Device / Adaptive | `MosaicDeviceProvider`, `MosaicAdaptiveGrid`, `MosaicAdaptiveModal`, `MosaicAdaptiveNavigation` | 4 |
|
|
180
180
|
| Auth / Multi-tenant | `MosaicMultiTenantProvider`, `MosaicSignInLayout`, `MosaicOrgPanel`, `MosaicClerkWebhookHandler` | 14 |
|
|
181
181
|
| Agents & messaging | `MosaicAgentComposer`, `MosaicAgentCard`, `MosaicAgentList`, `MosaicMessageList`, `MosaicMarketplaceList` | 28 |
|
|
182
|
-
| Data display | `MosaicDataTable`, `MosaicKanbanBoard`, `MosaicStepPipeline`, `MosaicActivityFeed` |
|
|
182
|
+
| Data display | `MosaicDataTable`, `MosaicKanbanBoard`, `MosaicStepPipeline`, `MosaicActivityFeed`, `MosaicDocumentUpload`, `MosaicUrlScraper` | 8 |
|
|
183
183
|
| Forms & inputs | `MosaicInput`, `MosaicSelect`, `MosaicField`, `MosaicCombobox`, `MosaicFilterBar` | 17 |
|
|
184
184
|
| Primitives (incl. base-ui atoms) | `MosaicButton`, `MosaicBadge`, `MosaicCard`, `MosaicTabs`, `MosaicTooltip`, `MosaicAccordion` | 30 |
|
|
185
185
|
| Landing & utility blocks | `MosaicHeroSplit`, `MosaicStatsGrid`, `MosaicPricingCard`, `MosaicCounter`, `MosaicThemeToggle` | 13 |
|
|
@@ -470,7 +470,8 @@ This package follows [Semantic Versioning](https://semver.org/). While in alpha
|
|
|
470
470
|
|
|
471
471
|
| Version | Status | Notes |
|
|
472
472
|
|---|---|---|
|
|
473
|
-
| `0.4.
|
|
473
|
+
| `0.4.8-alpha` | Current | 125 exported `Mosaic*` components, Clerk auth, mobile-first, Storybook 10, 30 stories |
|
|
474
|
+
| `0.4.7-alpha` | Historical | 124 shipped `Mosaic*` components — superseded by the Current row above |
|
|
474
475
|
| `0.2.0-alpha` | Historical | anydebate absorb (partial) — counts quoted for this release are historical and superseded by the Current row above; see [CHANGELOG.md](CHANGELOG.md) |
|
|
475
476
|
| `0.1.0-alpha.1` | Historical | Initial alpha publish |
|
|
476
477
|
|
package/dist/index.cjs
CHANGED
|
@@ -46,7 +46,7 @@ function _interopNamespace(e) {
|
|
|
46
46
|
var React28__namespace = /*#__PURE__*/_interopNamespace(React28);
|
|
47
47
|
|
|
48
48
|
// src/version.ts
|
|
49
|
-
var version = "0.4.
|
|
49
|
+
var version = "0.4.8-alpha";
|
|
50
50
|
function Placeholder({ label = "mosaic-blocks placeholder" }) {
|
|
51
51
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-mosaic-block": "placeholder", children: label });
|
|
52
52
|
}
|
|
@@ -11078,6 +11078,411 @@ async function MosaicClerkWebhookHandler(req, options) {
|
|
|
11078
11078
|
}
|
|
11079
11079
|
return new Response("OK", { status: 200 });
|
|
11080
11080
|
}
|
|
11081
|
+
var documentUploadDropZoneVariants = classVarianceAuthority.cva(
|
|
11082
|
+
[
|
|
11083
|
+
"flex flex-col items-center justify-center text-center",
|
|
11084
|
+
"rounded-lg border-2 border-dashed p-8 gap-2",
|
|
11085
|
+
"transition-colors cursor-pointer"
|
|
11086
|
+
],
|
|
11087
|
+
{
|
|
11088
|
+
variants: {
|
|
11089
|
+
dragActive: {
|
|
11090
|
+
true: "border-ring bg-accent/40",
|
|
11091
|
+
false: "border-border hover:border-ring/50"
|
|
11092
|
+
}
|
|
11093
|
+
},
|
|
11094
|
+
defaultVariants: {
|
|
11095
|
+
dragActive: false
|
|
11096
|
+
}
|
|
11097
|
+
}
|
|
11098
|
+
);
|
|
11099
|
+
var documentUploadFileRowVariants = classVarianceAuthority.cva(
|
|
11100
|
+
["flex items-start gap-3 rounded-lg border p-4 transition-colors"],
|
|
11101
|
+
{
|
|
11102
|
+
variants: {
|
|
11103
|
+
status: {
|
|
11104
|
+
uploading: "border-border bg-card",
|
|
11105
|
+
success: "border-border bg-card",
|
|
11106
|
+
error: "border-destructive/40 bg-destructive/5"
|
|
11107
|
+
}
|
|
11108
|
+
},
|
|
11109
|
+
defaultVariants: {
|
|
11110
|
+
status: "uploading"
|
|
11111
|
+
}
|
|
11112
|
+
}
|
|
11113
|
+
);
|
|
11114
|
+
var documentUploadStatusLabelVariants = classVarianceAuthority.cva(["text-xs font-medium"], {
|
|
11115
|
+
variants: {
|
|
11116
|
+
status: {
|
|
11117
|
+
uploading: "text-muted-foreground",
|
|
11118
|
+
success: "text-foreground",
|
|
11119
|
+
error: "text-destructive"
|
|
11120
|
+
}
|
|
11121
|
+
},
|
|
11122
|
+
defaultVariants: {
|
|
11123
|
+
status: "uploading"
|
|
11124
|
+
}
|
|
11125
|
+
});
|
|
11126
|
+
var documentUploadProgressTrackVariants = classVarianceAuthority.cva(
|
|
11127
|
+
["h-1.5 w-full overflow-hidden rounded-full bg-muted"],
|
|
11128
|
+
{
|
|
11129
|
+
variants: {},
|
|
11130
|
+
defaultVariants: {}
|
|
11131
|
+
}
|
|
11132
|
+
);
|
|
11133
|
+
var documentUploadProgressFillVariants = classVarianceAuthority.cva(
|
|
11134
|
+
["h-full rounded-full bg-foreground transition-[width]"],
|
|
11135
|
+
{
|
|
11136
|
+
variants: {},
|
|
11137
|
+
defaultVariants: {}
|
|
11138
|
+
}
|
|
11139
|
+
);
|
|
11140
|
+
function cn71(...classes) {
|
|
11141
|
+
return classes.filter(Boolean).join(" ");
|
|
11142
|
+
}
|
|
11143
|
+
function MosaicDocumentUpload({
|
|
11144
|
+
files,
|
|
11145
|
+
onFilesSelected,
|
|
11146
|
+
onRemoveFile,
|
|
11147
|
+
idleLabel,
|
|
11148
|
+
dragActiveLabel,
|
|
11149
|
+
browseButtonLabel,
|
|
11150
|
+
acceptHint,
|
|
11151
|
+
dropZoneAriaLabel,
|
|
11152
|
+
removeFileAriaLabel,
|
|
11153
|
+
statusLabels,
|
|
11154
|
+
sizeLabel,
|
|
11155
|
+
accept,
|
|
11156
|
+
multiple = false,
|
|
11157
|
+
className,
|
|
11158
|
+
ref
|
|
11159
|
+
}) {
|
|
11160
|
+
const [isDragActive, setIsDragActive] = React28.useState(false);
|
|
11161
|
+
const inputRef = React28.useRef(null);
|
|
11162
|
+
const inputId = React28.useId();
|
|
11163
|
+
function handleDragOver(event) {
|
|
11164
|
+
event.preventDefault();
|
|
11165
|
+
setIsDragActive(true);
|
|
11166
|
+
}
|
|
11167
|
+
function handleDragLeave() {
|
|
11168
|
+
setIsDragActive(false);
|
|
11169
|
+
}
|
|
11170
|
+
function handleDrop(event) {
|
|
11171
|
+
event.preventDefault();
|
|
11172
|
+
setIsDragActive(false);
|
|
11173
|
+
const dropped = Array.from(event.dataTransfer.files);
|
|
11174
|
+
if (dropped.length > 0) onFilesSelected(dropped);
|
|
11175
|
+
}
|
|
11176
|
+
function handleInputChange(event) {
|
|
11177
|
+
const selected = event.target.files ? Array.from(event.target.files) : [];
|
|
11178
|
+
if (selected.length > 0) onFilesSelected(selected);
|
|
11179
|
+
event.target.value = "";
|
|
11180
|
+
}
|
|
11181
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "document-upload", className: cn71("flex flex-col gap-4", className), children: [
|
|
11182
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11183
|
+
"div",
|
|
11184
|
+
{
|
|
11185
|
+
"data-slot": "document-upload-drop-zone",
|
|
11186
|
+
"aria-label": dropZoneAriaLabel,
|
|
11187
|
+
onDragOver: handleDragOver,
|
|
11188
|
+
onDragLeave: handleDragLeave,
|
|
11189
|
+
onDrop: handleDrop,
|
|
11190
|
+
className: documentUploadDropZoneVariants({ dragActive: isDragActive }),
|
|
11191
|
+
children: [
|
|
11192
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-slot": "document-upload-idle-label", className: "text-sm font-medium", children: isDragActive ? dragActiveLabel : idleLabel }),
|
|
11193
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11194
|
+
"input",
|
|
11195
|
+
{
|
|
11196
|
+
ref: inputRef,
|
|
11197
|
+
id: inputId,
|
|
11198
|
+
type: "file",
|
|
11199
|
+
className: "hidden",
|
|
11200
|
+
accept,
|
|
11201
|
+
multiple,
|
|
11202
|
+
onChange: handleInputChange
|
|
11203
|
+
}
|
|
11204
|
+
),
|
|
11205
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: inputId, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11206
|
+
"span",
|
|
11207
|
+
{
|
|
11208
|
+
"data-slot": "document-upload-browse-button",
|
|
11209
|
+
className: "inline-flex min-h-9 items-center justify-center rounded-md border border-border px-3 text-sm font-medium hover:bg-accent/50 transition-colors",
|
|
11210
|
+
children: browseButtonLabel
|
|
11211
|
+
}
|
|
11212
|
+
) }),
|
|
11213
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-slot": "document-upload-accept-hint", className: "text-xs text-muted-foreground", children: acceptHint })
|
|
11214
|
+
]
|
|
11215
|
+
}
|
|
11216
|
+
),
|
|
11217
|
+
files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { "data-slot": "document-upload-file-list", className: "flex flex-col gap-2", children: files.map((file) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11218
|
+
"li",
|
|
11219
|
+
{
|
|
11220
|
+
"data-slot": "document-upload-file-row",
|
|
11221
|
+
"data-status": file.status,
|
|
11222
|
+
className: documentUploadFileRowVariants({ status: file.status }),
|
|
11223
|
+
children: [
|
|
11224
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
11225
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
11226
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-slot": "document-upload-file-name", className: "text-sm font-medium truncate", children: file.name }),
|
|
11227
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11228
|
+
"span",
|
|
11229
|
+
{
|
|
11230
|
+
"data-slot": "document-upload-status-label",
|
|
11231
|
+
className: documentUploadStatusLabelVariants({ status: file.status }),
|
|
11232
|
+
children: statusLabels[file.status]
|
|
11233
|
+
}
|
|
11234
|
+
)
|
|
11235
|
+
] }),
|
|
11236
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-slot": "document-upload-file-size", className: "text-xs text-muted-foreground", children: sizeLabel(file.sizeBytes) }),
|
|
11237
|
+
file.status === "uploading" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11238
|
+
"div",
|
|
11239
|
+
{
|
|
11240
|
+
"data-slot": "document-upload-progress-track",
|
|
11241
|
+
role: "progressbar",
|
|
11242
|
+
tabIndex: -1,
|
|
11243
|
+
"aria-valuemin": 0,
|
|
11244
|
+
"aria-valuemax": 100,
|
|
11245
|
+
"aria-valuenow": file.progress ?? 0,
|
|
11246
|
+
className: cn71(documentUploadProgressTrackVariants(), "mt-2"),
|
|
11247
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11248
|
+
"div",
|
|
11249
|
+
{
|
|
11250
|
+
"data-slot": "document-upload-progress-fill",
|
|
11251
|
+
className: documentUploadProgressFillVariants(),
|
|
11252
|
+
style: { width: `${file.progress ?? 0}%` }
|
|
11253
|
+
}
|
|
11254
|
+
)
|
|
11255
|
+
}
|
|
11256
|
+
),
|
|
11257
|
+
file.status === "error" && file.errorMessage !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11258
|
+
"p",
|
|
11259
|
+
{
|
|
11260
|
+
"data-slot": "document-upload-error-message",
|
|
11261
|
+
className: "mt-1 text-xs text-destructive",
|
|
11262
|
+
children: file.errorMessage
|
|
11263
|
+
}
|
|
11264
|
+
)
|
|
11265
|
+
] }),
|
|
11266
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11267
|
+
"button",
|
|
11268
|
+
{
|
|
11269
|
+
type: "button",
|
|
11270
|
+
"data-slot": "document-upload-remove-button",
|
|
11271
|
+
"aria-label": removeFileAriaLabel(file.name),
|
|
11272
|
+
onClick: () => onRemoveFile(file.id),
|
|
11273
|
+
className: "shrink-0 inline-flex min-h-9 min-w-9 items-center justify-center rounded-md hover:bg-accent/50 transition-colors",
|
|
11274
|
+
children: file.status === "success" ? "\u2713" : "\u2715"
|
|
11275
|
+
}
|
|
11276
|
+
)
|
|
11277
|
+
]
|
|
11278
|
+
},
|
|
11279
|
+
file.id
|
|
11280
|
+
)) })
|
|
11281
|
+
] });
|
|
11282
|
+
}
|
|
11283
|
+
MosaicDocumentUpload.displayName = "MosaicDocumentUpload";
|
|
11284
|
+
var urlScraperInputVariants = classVarianceAuthority.cva(
|
|
11285
|
+
[
|
|
11286
|
+
"min-h-9 flex-1 rounded-md border bg-transparent px-3 text-sm outline-none",
|
|
11287
|
+
"transition-colors focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50"
|
|
11288
|
+
],
|
|
11289
|
+
{
|
|
11290
|
+
variants: {
|
|
11291
|
+
invalid: {
|
|
11292
|
+
true: "border-destructive",
|
|
11293
|
+
false: "border-border"
|
|
11294
|
+
}
|
|
11295
|
+
},
|
|
11296
|
+
defaultVariants: {
|
|
11297
|
+
invalid: false
|
|
11298
|
+
}
|
|
11299
|
+
}
|
|
11300
|
+
);
|
|
11301
|
+
var urlScraperMessageVariants = classVarianceAuthority.cva(["text-sm"], {
|
|
11302
|
+
variants: {
|
|
11303
|
+
tone: {
|
|
11304
|
+
error: "text-destructive",
|
|
11305
|
+
muted: "text-muted-foreground"
|
|
11306
|
+
}
|
|
11307
|
+
},
|
|
11308
|
+
defaultVariants: {
|
|
11309
|
+
tone: "muted"
|
|
11310
|
+
}
|
|
11311
|
+
});
|
|
11312
|
+
var urlScraperCardVariants = classVarianceAuthority.cva(["flex flex-col gap-2 rounded-lg border p-4"], {
|
|
11313
|
+
variants: {
|
|
11314
|
+
tone: {
|
|
11315
|
+
neutral: "border-border bg-card",
|
|
11316
|
+
error: "border-destructive/40 bg-destructive/5"
|
|
11317
|
+
}
|
|
11318
|
+
},
|
|
11319
|
+
defaultVariants: {
|
|
11320
|
+
tone: "neutral"
|
|
11321
|
+
}
|
|
11322
|
+
});
|
|
11323
|
+
function cn72(...classes) {
|
|
11324
|
+
return classes.filter(Boolean).join(" ");
|
|
11325
|
+
}
|
|
11326
|
+
function isSyntacticallyValidUrl(candidate) {
|
|
11327
|
+
try {
|
|
11328
|
+
new URL(candidate);
|
|
11329
|
+
return true;
|
|
11330
|
+
} catch {
|
|
11331
|
+
return false;
|
|
11332
|
+
}
|
|
11333
|
+
}
|
|
11334
|
+
function MosaicUrlScraper(props) {
|
|
11335
|
+
const {
|
|
11336
|
+
url,
|
|
11337
|
+
onUrlChange,
|
|
11338
|
+
onScrape,
|
|
11339
|
+
inputAriaLabel,
|
|
11340
|
+
inputPlaceholder,
|
|
11341
|
+
scrapeButtonLabel,
|
|
11342
|
+
invalidUrlMessage,
|
|
11343
|
+
className,
|
|
11344
|
+
ref
|
|
11345
|
+
} = props;
|
|
11346
|
+
const [isLocallyInvalid, setIsLocallyInvalid] = React28.useState(false);
|
|
11347
|
+
const isBusy = props.status === "loading" || props.status === "success";
|
|
11348
|
+
function handleSubmit(event) {
|
|
11349
|
+
event.preventDefault();
|
|
11350
|
+
const trimmed = url.trim();
|
|
11351
|
+
if (!isSyntacticallyValidUrl(trimmed)) {
|
|
11352
|
+
setIsLocallyInvalid(true);
|
|
11353
|
+
return;
|
|
11354
|
+
}
|
|
11355
|
+
setIsLocallyInvalid(false);
|
|
11356
|
+
onScrape(trimmed);
|
|
11357
|
+
}
|
|
11358
|
+
function handleUrlChange(event) {
|
|
11359
|
+
setIsLocallyInvalid(false);
|
|
11360
|
+
onUrlChange(event.target.value);
|
|
11361
|
+
}
|
|
11362
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "url-scraper", className: cn72("flex flex-col gap-4", className), children: [
|
|
11363
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11364
|
+
"form",
|
|
11365
|
+
{
|
|
11366
|
+
"data-slot": "url-scraper-form",
|
|
11367
|
+
onSubmit: handleSubmit,
|
|
11368
|
+
className: "flex flex-col gap-2 md:flex-row",
|
|
11369
|
+
children: [
|
|
11370
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11371
|
+
"input",
|
|
11372
|
+
{
|
|
11373
|
+
type: "url",
|
|
11374
|
+
"data-slot": "url-scraper-input",
|
|
11375
|
+
"aria-label": inputAriaLabel,
|
|
11376
|
+
placeholder: inputPlaceholder,
|
|
11377
|
+
value: url,
|
|
11378
|
+
onChange: handleUrlChange,
|
|
11379
|
+
disabled: isBusy,
|
|
11380
|
+
className: urlScraperInputVariants({ invalid: isLocallyInvalid })
|
|
11381
|
+
}
|
|
11382
|
+
),
|
|
11383
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11384
|
+
"button",
|
|
11385
|
+
{
|
|
11386
|
+
type: "submit",
|
|
11387
|
+
"data-slot": "url-scraper-submit-button",
|
|
11388
|
+
disabled: isBusy,
|
|
11389
|
+
className: "min-h-9 inline-flex items-center justify-center rounded-md border border-border px-4 text-sm font-medium transition-colors hover:bg-accent/50 disabled:opacity-50",
|
|
11390
|
+
children: props.status === "loading" ? props.scrapingLabel : scrapeButtonLabel
|
|
11391
|
+
}
|
|
11392
|
+
)
|
|
11393
|
+
]
|
|
11394
|
+
}
|
|
11395
|
+
),
|
|
11396
|
+
isLocallyInvalid && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11397
|
+
"p",
|
|
11398
|
+
{
|
|
11399
|
+
"data-slot": "url-scraper-invalid-message",
|
|
11400
|
+
className: urlScraperMessageVariants({ tone: "error" }),
|
|
11401
|
+
children: invalidUrlMessage
|
|
11402
|
+
}
|
|
11403
|
+
),
|
|
11404
|
+
props.status === "loading" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11405
|
+
"output",
|
|
11406
|
+
{
|
|
11407
|
+
"data-slot": "url-scraper-loading",
|
|
11408
|
+
className: urlScraperCardVariants({ tone: "neutral" }),
|
|
11409
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: urlScraperMessageVariants({ tone: "muted" }), children: props.loadingMessage })
|
|
11410
|
+
}
|
|
11411
|
+
),
|
|
11412
|
+
props.status === "error" && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "url-scraper-error", className: urlScraperCardVariants({ tone: "error" }), children: [
|
|
11413
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11414
|
+
"p",
|
|
11415
|
+
{
|
|
11416
|
+
"data-slot": "url-scraper-error-message",
|
|
11417
|
+
className: urlScraperMessageVariants({ tone: "error" }),
|
|
11418
|
+
children: props.errorMessage
|
|
11419
|
+
}
|
|
11420
|
+
),
|
|
11421
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11422
|
+
"button",
|
|
11423
|
+
{
|
|
11424
|
+
type: "button",
|
|
11425
|
+
"data-slot": "url-scraper-reset-button",
|
|
11426
|
+
onClick: props.onReset,
|
|
11427
|
+
className: "min-h-9 inline-flex w-fit items-center justify-center rounded-md border border-border px-3 text-sm font-medium transition-colors hover:bg-accent/50",
|
|
11428
|
+
children: props.resetButtonLabel
|
|
11429
|
+
}
|
|
11430
|
+
)
|
|
11431
|
+
] }),
|
|
11432
|
+
props.status === "success" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11433
|
+
"div",
|
|
11434
|
+
{
|
|
11435
|
+
"data-slot": "url-scraper-content",
|
|
11436
|
+
className: urlScraperCardVariants({ tone: "neutral" }),
|
|
11437
|
+
children: [
|
|
11438
|
+
props.content.image !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11439
|
+
"img",
|
|
11440
|
+
{
|
|
11441
|
+
"data-slot": "url-scraper-image",
|
|
11442
|
+
src: props.content.image,
|
|
11443
|
+
alt: props.imageAlt(props.content.title),
|
|
11444
|
+
className: "h-32 w-full rounded-md object-cover md:h-48"
|
|
11445
|
+
}
|
|
11446
|
+
),
|
|
11447
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
11448
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { "data-slot": "url-scraper-title", className: "text-base font-semibold md:text-lg", children: props.content.title }),
|
|
11449
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11450
|
+
"a",
|
|
11451
|
+
{
|
|
11452
|
+
"data-slot": "url-scraper-link",
|
|
11453
|
+
href: props.content.url,
|
|
11454
|
+
target: "_blank",
|
|
11455
|
+
rel: "noopener noreferrer",
|
|
11456
|
+
"aria-label": props.openLinkAriaLabel(props.content.url),
|
|
11457
|
+
className: "shrink-0 text-sm text-muted-foreground transition-colors hover:text-foreground",
|
|
11458
|
+
children: "\u2197"
|
|
11459
|
+
}
|
|
11460
|
+
)
|
|
11461
|
+
] }),
|
|
11462
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11463
|
+
"p",
|
|
11464
|
+
{
|
|
11465
|
+
"data-slot": "url-scraper-description",
|
|
11466
|
+
className: urlScraperMessageVariants({ tone: "muted" }),
|
|
11467
|
+
children: props.content.description
|
|
11468
|
+
}
|
|
11469
|
+
),
|
|
11470
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11471
|
+
"button",
|
|
11472
|
+
{
|
|
11473
|
+
type: "button",
|
|
11474
|
+
"data-slot": "url-scraper-reset-button",
|
|
11475
|
+
onClick: props.onReset,
|
|
11476
|
+
className: "min-h-9 inline-flex w-fit items-center justify-center rounded-md border border-border px-3 text-sm font-medium transition-colors hover:bg-accent/50",
|
|
11477
|
+
children: props.resetButtonLabel
|
|
11478
|
+
}
|
|
11479
|
+
)
|
|
11480
|
+
]
|
|
11481
|
+
}
|
|
11482
|
+
)
|
|
11483
|
+
] });
|
|
11484
|
+
}
|
|
11485
|
+
MosaicUrlScraper.displayName = "MosaicUrlScraper";
|
|
11081
11486
|
|
|
11082
11487
|
Object.defineProperty(exports, "Accordion", {
|
|
11083
11488
|
enumerable: true,
|
|
@@ -11131,6 +11536,7 @@ exports.MosaicDashboardLayout = MosaicDashboardLayout;
|
|
|
11131
11536
|
exports.MosaicDataTable = MosaicDataTable;
|
|
11132
11537
|
exports.MosaicDeleteConfirmationDialog = MosaicDeleteConfirmationDialog;
|
|
11133
11538
|
exports.MosaicDeviceProvider = MosaicDeviceProvider;
|
|
11539
|
+
exports.MosaicDocumentUpload = MosaicDocumentUpload;
|
|
11134
11540
|
exports.MosaicDropdownMenu = MosaicDropdownMenu;
|
|
11135
11541
|
exports.MosaicEmptyState = MosaicEmptyState;
|
|
11136
11542
|
exports.MosaicFallingPattern = MosaicFallingPattern;
|
|
@@ -11209,6 +11615,7 @@ exports.MosaicTooltipContent = MosaicTooltipContent;
|
|
|
11209
11615
|
exports.MosaicTooltipProvider = MosaicTooltipProvider;
|
|
11210
11616
|
exports.MosaicTooltipRoot = MosaicTooltipRoot;
|
|
11211
11617
|
exports.MosaicTooltipTrigger = MosaicTooltipTrigger;
|
|
11618
|
+
exports.MosaicUrlScraper = MosaicUrlScraper;
|
|
11212
11619
|
exports.MosaicUserButton = MosaicUserButton;
|
|
11213
11620
|
exports.Placeholder = Placeholder;
|
|
11214
11621
|
exports.badgeVariants = badgeVariants;
|