@slipstream-ui/core 0.11.9 → 0.11.10
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/dist/index.d.mts +117 -2
- package/dist/index.d.ts +117 -2
- package/dist/index.js +1084 -827
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1082 -827
- package/dist/index.mjs.map +1 -1
- package/dist/manifests/accordion.manifest.json +1 -1
- package/dist/manifests/alert.manifest.json +1 -1
- package/dist/manifests/announcement-bar.manifest.json +1 -1
- package/dist/manifests/app-shell.manifest.json +1 -1
- package/dist/manifests/applied-filters.manifest.json +1 -1
- package/dist/manifests/article-card.manifest.json +1 -1
- package/dist/manifests/auth-layout.manifest.json +1 -1
- package/dist/manifests/autocomplete.manifest.json +1 -1
- package/dist/manifests/avatar.manifest.json +1 -1
- package/dist/manifests/badge.manifest.json +1 -1
- package/dist/manifests/block.manifest.json +1 -1
- package/dist/manifests/bottom-nav.manifest.json +1 -1
- package/dist/manifests/breadcrumb.manifest.json +1 -1
- package/dist/manifests/button-group.manifest.json +1 -1
- package/dist/manifests/button.manifest.json +1 -1
- package/dist/manifests/calendar.manifest.json +1 -1
- package/dist/manifests/card.manifest.json +1 -1
- package/dist/manifests/checkbox.manifest.json +1 -1
- package/dist/manifests/comparison-table.manifest.json +1 -1
- package/dist/manifests/confirm-dialog.manifest.json +1 -1
- package/dist/manifests/contact-strip.manifest.json +1 -1
- package/dist/manifests/container.manifest.json +1 -1
- package/dist/manifests/cover-image.manifest.json +1 -1
- package/dist/manifests/cta-section.manifest.json +1 -1
- package/dist/manifests/data-table.manifest.json +1 -1
- package/dist/manifests/date-picker-popover.manifest.json +1 -1
- package/dist/manifests/date-picker.manifest.json +1 -1
- package/dist/manifests/date-range-picker.manifest.json +1 -1
- package/dist/manifests/deal-card.manifest.json +1 -1
- package/dist/manifests/dialog.manifest.json +1 -1
- package/dist/manifests/document-card.manifest.json +1 -1
- package/dist/manifests/drawer.manifest.json +1 -1
- package/dist/manifests/empty-state.manifest.json +1 -1
- package/dist/manifests/entity-card.manifest.json +1 -1
- package/dist/manifests/feature-grid.manifest.json +1 -1
- package/dist/manifests/feature-row.manifest.json +1 -1
- package/dist/manifests/fieldset.manifest.json +1 -1
- package/dist/manifests/file-upload.manifest.json +1 -1
- package/dist/manifests/filter-bar.manifest.json +1 -1
- package/dist/manifests/filter-chips.manifest.json +1 -1
- package/dist/manifests/filter-panel.manifest.json +1 -1
- package/dist/manifests/flex.manifest.json +1 -1
- package/dist/manifests/form-field.manifest.json +1 -1
- package/dist/manifests/form-layout.manifest.json +1 -1
- package/dist/manifests/form.manifest.json +1 -1
- package/dist/manifests/grid.manifest.json +1 -1
- package/dist/manifests/heading.manifest.json +1 -1
- package/dist/manifests/hero.manifest.json +1 -1
- package/dist/manifests/image.manifest.json +1 -1
- package/dist/manifests/input-group.manifest.json +1 -1
- package/dist/manifests/input.manifest.json +1 -1
- package/dist/manifests/label.manifest.json +1 -1
- package/dist/manifests/link-tabs.manifest.json +1 -1
- package/dist/manifests/link.manifest.json +1 -1
- package/dist/manifests/list-toolbar.manifest.json +1 -1
- package/dist/manifests/list.manifest.json +1 -1
- package/dist/manifests/load-more.manifest.json +1 -1
- package/dist/manifests/logo-cloud.manifest.json +1 -1
- package/dist/manifests/media-card.manifest.json +161 -0
- package/dist/manifests/menu.manifest.json +1 -1
- package/dist/manifests/metric-card.manifest.json +1 -1
- package/dist/manifests/month-schedule.manifest.json +217 -0
- package/dist/manifests/multi-select.manifest.json +1 -1
- package/dist/manifests/newsletter.manifest.json +1 -1
- package/dist/manifests/page-header.manifest.json +1 -1
- package/dist/manifests/pagination.manifest.json +1 -1
- package/dist/manifests/password-input.manifest.json +1 -1
- package/dist/manifests/popover.manifest.json +1 -1
- package/dist/manifests/process-steps.manifest.json +1 -1
- package/dist/manifests/progress.manifest.json +1 -1
- package/dist/manifests/prose.manifest.json +1 -1
- package/dist/manifests/radio.manifest.json +1 -1
- package/dist/manifests/range-slider.manifest.json +1 -1
- package/dist/manifests/search.manifest.json +1 -1
- package/dist/manifests/section-heading.manifest.json +1 -1
- package/dist/manifests/section.manifest.json +1 -1
- package/dist/manifests/segmented-control.manifest.json +1 -1
- package/dist/manifests/select-menu.manifest.json +1 -1
- package/dist/manifests/select.manifest.json +1 -1
- package/dist/manifests/separator.manifest.json +1 -1
- package/dist/manifests/site-footer.manifest.json +1 -1
- package/dist/manifests/site-header.manifest.json +1 -1
- package/dist/manifests/skeleton.manifest.json +1 -1
- package/dist/manifests/spinner.manifest.json +1 -1
- package/dist/manifests/stat-band.manifest.json +1 -1
- package/dist/manifests/stepper.manifest.json +1 -1
- package/dist/manifests/switch.manifest.json +1 -1
- package/dist/manifests/table-card.manifest.json +1 -1
- package/dist/manifests/table-of-contents.manifest.json +1 -1
- package/dist/manifests/table.manifest.json +1 -1
- package/dist/manifests/tabs.manifest.json +1 -1
- package/dist/manifests/testimonial.manifest.json +1 -1
- package/dist/manifests/text.manifest.json +1 -1
- package/dist/manifests/textarea.manifest.json +1 -1
- package/dist/manifests/theme-toggle.manifest.json +1 -1
- package/dist/manifests/time-picker.manifest.json +1 -1
- package/dist/manifests/timeline.manifest.json +1 -1
- package/dist/manifests/toast.manifest.json +1 -1
- package/dist/manifests/tombstone-card.manifest.json +1 -1
- package/dist/manifests/tooltip.manifest.json +1 -1
- package/dist/src/components/media-card/MediaCard.d.ts +61 -0
- package/dist/src/components/media-card/MediaCard.js +88 -0
- package/dist/src/components/media-card/MediaCard.js.map +1 -0
- package/dist/src/components/media-card/MediaCard.mjs +54 -0
- package/dist/src/components/media-card/MediaCard.mjs.map +1 -0
- package/dist/src/components/media-card/index.d.ts +1 -0
- package/dist/src/components/media-card/index.js +23 -0
- package/dist/src/components/media-card/index.js.map +1 -0
- package/dist/src/components/media-card/index.mjs +2 -0
- package/dist/src/components/media-card/index.mjs.map +1 -0
- package/dist/src/components/month-schedule/MonthSchedule.d.ts +56 -0
- package/dist/src/components/month-schedule/MonthSchedule.js +245 -0
- package/dist/src/components/month-schedule/MonthSchedule.js.map +1 -0
- package/dist/src/components/month-schedule/MonthSchedule.mjs +219 -0
- package/dist/src/components/month-schedule/MonthSchedule.mjs.map +1 -0
- package/dist/src/components/month-schedule/index.d.ts +1 -0
- package/dist/src/components/month-schedule/index.js +23 -0
- package/dist/src/components/month-schedule/index.js.map +1 -0
- package/dist/src/components/month-schedule/index.mjs +2 -0
- package/dist/src/components/month-schedule/index.mjs.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/styles-full.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/media-card/MediaCard.test.tsx +97 -0
- package/src/components/media-card/MediaCard.tsx +116 -0
- package/src/components/media-card/index.ts +1 -0
- package/src/components/month-schedule/MonthSchedule.test.tsx +137 -0
- package/src/components/month-schedule/MonthSchedule.tsx +332 -0
- package/src/components/month-schedule/index.ts +1 -0
- package/src/index.ts +2 -0
- package/src/manifests/accordion.manifest.json +1 -1
- package/src/manifests/alert.manifest.json +1 -1
- package/src/manifests/announcement-bar.manifest.json +1 -1
- package/src/manifests/app-shell.manifest.json +1 -1
- package/src/manifests/applied-filters.manifest.json +1 -1
- package/src/manifests/article-card.manifest.json +1 -1
- package/src/manifests/auth-layout.manifest.json +1 -1
- package/src/manifests/autocomplete.manifest.json +1 -1
- package/src/manifests/avatar.manifest.json +1 -1
- package/src/manifests/badge.manifest.json +1 -1
- package/src/manifests/block.manifest.json +1 -1
- package/src/manifests/bottom-nav.manifest.json +1 -1
- package/src/manifests/breadcrumb.manifest.json +1 -1
- package/src/manifests/button-group.manifest.json +1 -1
- package/src/manifests/button.manifest.json +1 -1
- package/src/manifests/calendar.manifest.json +1 -1
- package/src/manifests/card.manifest.json +1 -1
- package/src/manifests/checkbox.manifest.json +1 -1
- package/src/manifests/comparison-table.manifest.json +1 -1
- package/src/manifests/confirm-dialog.manifest.json +1 -1
- package/src/manifests/contact-strip.manifest.json +1 -1
- package/src/manifests/container.manifest.json +1 -1
- package/src/manifests/cover-image.manifest.json +1 -1
- package/src/manifests/cta-section.manifest.json +1 -1
- package/src/manifests/data-table.manifest.json +1 -1
- package/src/manifests/date-picker-popover.manifest.json +1 -1
- package/src/manifests/date-picker.manifest.json +1 -1
- package/src/manifests/date-range-picker.manifest.json +1 -1
- package/src/manifests/deal-card.manifest.json +1 -1
- package/src/manifests/dialog.manifest.json +1 -1
- package/src/manifests/document-card.manifest.json +1 -1
- package/src/manifests/drawer.manifest.json +1 -1
- package/src/manifests/empty-state.manifest.json +1 -1
- package/src/manifests/entity-card.manifest.json +1 -1
- package/src/manifests/feature-grid.manifest.json +1 -1
- package/src/manifests/feature-row.manifest.json +1 -1
- package/src/manifests/fieldset.manifest.json +1 -1
- package/src/manifests/file-upload.manifest.json +1 -1
- package/src/manifests/filter-bar.manifest.json +1 -1
- package/src/manifests/filter-chips.manifest.json +1 -1
- package/src/manifests/filter-panel.manifest.json +1 -1
- package/src/manifests/flex.manifest.json +1 -1
- package/src/manifests/form-field.manifest.json +1 -1
- package/src/manifests/form-layout.manifest.json +1 -1
- package/src/manifests/form.manifest.json +1 -1
- package/src/manifests/grid.manifest.json +1 -1
- package/src/manifests/heading.manifest.json +1 -1
- package/src/manifests/hero.manifest.json +1 -1
- package/src/manifests/image.manifest.json +1 -1
- package/src/manifests/input-group.manifest.json +1 -1
- package/src/manifests/input.manifest.json +1 -1
- package/src/manifests/label.manifest.json +1 -1
- package/src/manifests/link-tabs.manifest.json +1 -1
- package/src/manifests/link.manifest.json +1 -1
- package/src/manifests/list-toolbar.manifest.json +1 -1
- package/src/manifests/list.manifest.json +1 -1
- package/src/manifests/load-more.manifest.json +1 -1
- package/src/manifests/logo-cloud.manifest.json +1 -1
- package/src/manifests/media-card.manifest.json +161 -0
- package/src/manifests/menu.manifest.json +1 -1
- package/src/manifests/metric-card.manifest.json +1 -1
- package/src/manifests/month-schedule.manifest.json +217 -0
- package/src/manifests/multi-select.manifest.json +1 -1
- package/src/manifests/newsletter.manifest.json +1 -1
- package/src/manifests/page-header.manifest.json +1 -1
- package/src/manifests/pagination.manifest.json +1 -1
- package/src/manifests/password-input.manifest.json +1 -1
- package/src/manifests/popover.manifest.json +1 -1
- package/src/manifests/process-steps.manifest.json +1 -1
- package/src/manifests/progress.manifest.json +1 -1
- package/src/manifests/prose.manifest.json +1 -1
- package/src/manifests/radio.manifest.json +1 -1
- package/src/manifests/range-slider.manifest.json +1 -1
- package/src/manifests/search.manifest.json +1 -1
- package/src/manifests/section-heading.manifest.json +1 -1
- package/src/manifests/section.manifest.json +1 -1
- package/src/manifests/segmented-control.manifest.json +1 -1
- package/src/manifests/select-menu.manifest.json +1 -1
- package/src/manifests/select.manifest.json +1 -1
- package/src/manifests/separator.manifest.json +1 -1
- package/src/manifests/site-footer.manifest.json +1 -1
- package/src/manifests/site-header.manifest.json +1 -1
- package/src/manifests/skeleton.manifest.json +1 -1
- package/src/manifests/spinner.manifest.json +1 -1
- package/src/manifests/stat-band.manifest.json +1 -1
- package/src/manifests/stepper.manifest.json +1 -1
- package/src/manifests/switch.manifest.json +1 -1
- package/src/manifests/table-card.manifest.json +1 -1
- package/src/manifests/table-of-contents.manifest.json +1 -1
- package/src/manifests/table.manifest.json +1 -1
- package/src/manifests/tabs.manifest.json +1 -1
- package/src/manifests/testimonial.manifest.json +1 -1
- package/src/manifests/text.manifest.json +1 -1
- package/src/manifests/textarea.manifest.json +1 -1
- package/src/manifests/theme-toggle.manifest.json +1 -1
- package/src/manifests/time-picker.manifest.json +1 -1
- package/src/manifests/timeline.manifest.json +1 -1
- package/src/manifests/toast.manifest.json +1 -1
- package/src/manifests/tombstone-card.manifest.json +1 -1
- package/src/manifests/tooltip.manifest.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.10",
|
|
8
8
|
"sourceDir": "table-card",
|
|
9
9
|
"exportName": "TableCard",
|
|
10
10
|
"description": "Table shell with title/description, header actions, optional toolbar, edge-to-edge body and a footer row.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.10",
|
|
8
8
|
"sourceDir": "table-of-contents",
|
|
9
9
|
"exportName": "TableOfContents",
|
|
10
10
|
"description": "Sticky 'On this page' navigation with real anchor links, nested levels and aria-current, plus a useScrollSpy hook for the active heading.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.10",
|
|
8
8
|
"sourceDir": "testimonial",
|
|
9
9
|
"exportName": "Testimonial",
|
|
10
10
|
"description": "Semantic written testimonial with quote, person, role, company, avatar and logo slots.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.10",
|
|
8
8
|
"sourceDir": "tombstone-card",
|
|
9
9
|
"exportName": "TombstoneCard",
|
|
10
10
|
"description": "Placeholder card for archived, closed or unavailable marketplace items.",
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type BadgeProps } from '../badge/Badge';
|
|
3
|
+
import { type CoverImageProps } from '../cover-image/CoverImage';
|
|
4
|
+
export type MediaCardChip = {
|
|
5
|
+
label: string;
|
|
6
|
+
/** Badge variant; quiet outline tones fit status metadata best. */
|
|
7
|
+
variant?: BadgeProps['variant'];
|
|
8
|
+
/** Leading status dot. */
|
|
9
|
+
dot?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type MediaCardProps = Omit<React.HTMLAttributes<HTMLElement>, 'title'> & {
|
|
12
|
+
/** Card title. */
|
|
13
|
+
title: string;
|
|
14
|
+
/** Supporting copy under the title. */
|
|
15
|
+
description?: React.ReactNode;
|
|
16
|
+
/** Destination URL; the whole card becomes one link when set. */
|
|
17
|
+
href?: string;
|
|
18
|
+
/** Cover art rendered through CoverImage (seeded gradient fallback included). */
|
|
19
|
+
cover?: Omit<CoverImageProps, 'className'>;
|
|
20
|
+
/** Metadata line under the description (date, location, deadline). */
|
|
21
|
+
meta?: React.ReactNode;
|
|
22
|
+
/** Status/category chips rendered as Badges. */
|
|
23
|
+
chips?: MediaCardChip[];
|
|
24
|
+
/** Bottom slot for a details affordance or secondary text. Non-interactive when the card is a link. */
|
|
25
|
+
footer?: React.ReactNode;
|
|
26
|
+
/** 'vertical' stacks cover over content; 'row' puts a fixed-width cover beside it. */
|
|
27
|
+
layout?: 'vertical' | 'row';
|
|
28
|
+
/** Custom link element for routers (Next Link, react-router). */
|
|
29
|
+
linkComponent?: React.ElementType;
|
|
30
|
+
/** Prop used to pass the destination to linkComponent ('href' or 'to'). */
|
|
31
|
+
linkHrefProp?: 'href' | 'to';
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Media card for event, article and listing grids: CoverImage on top (or
|
|
35
|
+
* beside in `layout="row"`), title, description, metadata line, status chips
|
|
36
|
+
* and an optional footer. With `href` the entire card is a single link —
|
|
37
|
+
* one target, one hover state, one focus ring — so keep `footer` free of
|
|
38
|
+
* nested interactive elements.
|
|
39
|
+
*/
|
|
40
|
+
export declare const MediaCard: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
|
|
41
|
+
/** Card title. */
|
|
42
|
+
title: string;
|
|
43
|
+
/** Supporting copy under the title. */
|
|
44
|
+
description?: React.ReactNode;
|
|
45
|
+
/** Destination URL; the whole card becomes one link when set. */
|
|
46
|
+
href?: string;
|
|
47
|
+
/** Cover art rendered through CoverImage (seeded gradient fallback included). */
|
|
48
|
+
cover?: Omit<CoverImageProps, "className">;
|
|
49
|
+
/** Metadata line under the description (date, location, deadline). */
|
|
50
|
+
meta?: React.ReactNode;
|
|
51
|
+
/** Status/category chips rendered as Badges. */
|
|
52
|
+
chips?: MediaCardChip[];
|
|
53
|
+
/** Bottom slot for a details affordance or secondary text. Non-interactive when the card is a link. */
|
|
54
|
+
footer?: React.ReactNode;
|
|
55
|
+
/** 'vertical' stacks cover over content; 'row' puts a fixed-width cover beside it. */
|
|
56
|
+
layout?: "vertical" | "row";
|
|
57
|
+
/** Custom link element for routers (Next Link, react-router). */
|
|
58
|
+
linkComponent?: React.ElementType;
|
|
59
|
+
/** Prop used to pass the destination to linkComponent ('href' or 'to'). */
|
|
60
|
+
linkHrefProp?: "href" | "to";
|
|
61
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var MediaCard_exports = {};
|
|
30
|
+
__export(MediaCard_exports, {
|
|
31
|
+
MediaCard: () => MediaCard
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(MediaCard_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_cn = require("../../utils/cn.js");
|
|
37
|
+
var import_Badge = require("../badge/Badge.js");
|
|
38
|
+
var import_CoverImage = require("../cover-image/CoverImage.js");
|
|
39
|
+
const MediaCard = React.forwardRef(function MediaCard2({
|
|
40
|
+
title,
|
|
41
|
+
description,
|
|
42
|
+
href,
|
|
43
|
+
cover,
|
|
44
|
+
meta,
|
|
45
|
+
chips,
|
|
46
|
+
footer,
|
|
47
|
+
layout = "vertical",
|
|
48
|
+
linkComponent,
|
|
49
|
+
linkHrefProp = "href",
|
|
50
|
+
className,
|
|
51
|
+
...props
|
|
52
|
+
}, ref) {
|
|
53
|
+
const Link = linkComponent ?? "a";
|
|
54
|
+
const destination = href ? linkHrefProp === "to" ? { to: href } : { href } : void 0;
|
|
55
|
+
const row = layout === "row";
|
|
56
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
57
|
+
cover && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
|
+
import_CoverImage.CoverImage,
|
|
59
|
+
{
|
|
60
|
+
...cover,
|
|
61
|
+
className: (0, import_cn.cn)(
|
|
62
|
+
row ? "w-36 shrink-0 sm:w-44" : "w-full",
|
|
63
|
+
!row && "rounded-none border-b border-border"
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_cn.cn)("flex min-w-0 flex-1 flex-col gap-2", row ? "p-4" : "p-5"), children: [
|
|
68
|
+
chips && chips.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex flex-wrap gap-1.5", children: chips.map((chip) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Badge.Badge, { variant: chip.variant ?? "outline", size: "sm", dot: chip.dot, children: chip.label }, chip.label)) }),
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "font-semibold tracking-tight transition-colors group-hover:text-primary-ink", children: title }),
|
|
70
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "line-clamp-3 text-sm leading-relaxed text-muted-foreground", children: description }),
|
|
71
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-xs text-muted-foreground", children: meta }),
|
|
72
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-auto pt-2 text-xs text-muted-foreground", children: footer })
|
|
73
|
+
] })
|
|
74
|
+
] });
|
|
75
|
+
const cardClass = (0, import_cn.cn)(
|
|
76
|
+
"group flex h-full overflow-hidden rounded-xl border border-border bg-card shadow-sm transition-colors hover:border-primary/40",
|
|
77
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
78
|
+
row ? "flex-row" : "flex-col",
|
|
79
|
+
className
|
|
80
|
+
);
|
|
81
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("article", { ref, className: "h-full", ...props, children: href && destination ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, { ...destination, className: cardClass, children: body }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: cardClass, children: body }) });
|
|
82
|
+
});
|
|
83
|
+
MediaCard.displayName = "MediaCard";
|
|
84
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
85
|
+
0 && (module.exports = {
|
|
86
|
+
MediaCard
|
|
87
|
+
});
|
|
88
|
+
//# sourceMappingURL=MediaCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/media-card/MediaCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\nimport { Badge, type BadgeProps } from '../badge/Badge';\nimport { CoverImage, type CoverImageProps } from '../cover-image/CoverImage';\n\nexport type MediaCardChip = {\n label: string;\n /** Badge variant; quiet outline tones fit status metadata best. */\n variant?: BadgeProps['variant'];\n /** Leading status dot. */\n dot?: boolean;\n};\n\nexport type MediaCardProps = Omit<React.HTMLAttributes<HTMLElement>, 'title'> & {\n /** Card title. */\n title: string;\n /** Supporting copy under the title. */\n description?: React.ReactNode;\n /** Destination URL; the whole card becomes one link when set. */\n href?: string;\n /** Cover art rendered through CoverImage (seeded gradient fallback included). */\n cover?: Omit<CoverImageProps, 'className'>;\n /** Metadata line under the description (date, location, deadline). */\n meta?: React.ReactNode;\n /** Status/category chips rendered as Badges. */\n chips?: MediaCardChip[];\n /** Bottom slot for a details affordance or secondary text. Non-interactive when the card is a link. */\n footer?: React.ReactNode;\n /** 'vertical' stacks cover over content; 'row' puts a fixed-width cover beside it. */\n layout?: 'vertical' | 'row';\n /** Custom link element for routers (Next Link, react-router). */\n linkComponent?: React.ElementType;\n /** Prop used to pass the destination to linkComponent ('href' or 'to'). */\n linkHrefProp?: 'href' | 'to';\n};\n\n/**\n * Media card for event, article and listing grids: CoverImage on top (or\n * beside in `layout=\"row\"`), title, description, metadata line, status chips\n * and an optional footer. With `href` the entire card is a single link —\n * one target, one hover state, one focus ring — so keep `footer` free of\n * nested interactive elements.\n */\nexport const MediaCard = React.forwardRef<HTMLElement, MediaCardProps>(function MediaCard(\n {\n title,\n description,\n href,\n cover,\n meta,\n chips,\n footer,\n layout = 'vertical',\n linkComponent,\n linkHrefProp = 'href',\n className,\n ...props\n },\n ref\n) {\n const Link = linkComponent ?? 'a';\n const destination = href ? (linkHrefProp === 'to' ? { to: href } : { href }) : undefined;\n const row = layout === 'row';\n\n const body = (\n <>\n {cover && (\n <CoverImage\n {...cover}\n className={cn(\n row ? 'w-36 shrink-0 sm:w-44' : 'w-full',\n !row && 'rounded-none border-b border-border'\n )}\n />\n )}\n <div className={cn('flex min-w-0 flex-1 flex-col gap-2', row ? 'p-4' : 'p-5')}>\n {chips && chips.length > 0 && (\n <div className=\"flex flex-wrap gap-1.5\">\n {chips.map((chip) => (\n <Badge key={chip.label} variant={chip.variant ?? 'outline'} size=\"sm\" dot={chip.dot}>\n {chip.label}\n </Badge>\n ))}\n </div>\n )}\n <h3 className=\"font-semibold tracking-tight transition-colors group-hover:text-primary-ink\">{title}</h3>\n {description && (\n <div className=\"line-clamp-3 text-sm leading-relaxed text-muted-foreground\">{description}</div>\n )}\n {meta && <div className=\"text-xs text-muted-foreground\">{meta}</div>}\n {footer && <div className=\"mt-auto pt-2 text-xs text-muted-foreground\">{footer}</div>}\n </div>\n </>\n );\n\n const cardClass = cn(\n 'group flex h-full overflow-hidden rounded-xl border border-border bg-card shadow-sm transition-colors hover:border-primary/40',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background',\n row ? 'flex-row' : 'flex-col',\n className\n );\n\n return (\n <article ref={ref as never} className=\"h-full\" {...props}>\n {href && destination ? (\n <Link {...destination} className={cardClass}>\n {body}\n </Link>\n ) : (\n <div className={cardClass}>{body}</div>\n )}\n </article>\n );\n});\n\nMediaCard.displayName = 'MediaCard';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiEI;AAjEJ,YAAuB;AACvB,gBAAmB;AACnB,mBAAuC;AACvC,wBAAiD;AAwC1C,MAAM,YAAY,MAAM,WAAwC,SAASA,WAC9E;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,OAAO,iBAAiB;AAC9B,QAAM,cAAc,OAAQ,iBAAiB,OAAO,EAAE,IAAI,KAAK,IAAI,EAAE,KAAK,IAAK;AAC/E,QAAM,MAAM,WAAW;AAEvB,QAAM,OACJ,4EACG;AAAA,aACC;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,eAAW;AAAA,UACT,MAAM,0BAA0B;AAAA,UAChC,CAAC,OAAO;AAAA,QACV;AAAA;AAAA,IACF;AAAA,IAEF,6CAAC,SAAI,eAAW,cAAG,sCAAsC,MAAM,QAAQ,KAAK,GACzE;AAAA,eAAS,MAAM,SAAS,KACvB,4CAAC,SAAI,WAAU,0BACZ,gBAAM,IAAI,CAAC,SACV,4CAAC,sBAAuB,SAAS,KAAK,WAAW,WAAW,MAAK,MAAK,KAAK,KAAK,KAC7E,eAAK,SADI,KAAK,KAEjB,CACD,GACH;AAAA,MAEF,4CAAC,QAAG,WAAU,+EAA+E,iBAAM;AAAA,MAClG,eACC,4CAAC,SAAI,WAAU,8DAA8D,uBAAY;AAAA,MAE1F,QAAQ,4CAAC,SAAI,WAAU,iCAAiC,gBAAK;AAAA,MAC7D,UAAU,4CAAC,SAAI,WAAU,8CAA8C,kBAAO;AAAA,OACjF;AAAA,KACF;AAGF,QAAM,gBAAY;AAAA,IAChB;AAAA,IACA;AAAA,IACA,MAAM,aAAa;AAAA,IACnB;AAAA,EACF;AAEA,SACE,4CAAC,aAAQ,KAAmB,WAAU,UAAU,GAAG,OAChD,kBAAQ,cACP,4CAAC,QAAM,GAAG,aAAa,WAAW,WAC/B,gBACH,IAEA,4CAAC,SAAI,WAAW,WAAY,gBAAK,GAErC;AAEJ,CAAC;AAED,UAAU,cAAc;","names":["MediaCard"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../utils/cn.mjs";
|
|
4
|
+
import { Badge } from "../badge/Badge.mjs";
|
|
5
|
+
import { CoverImage } from "../cover-image/CoverImage.mjs";
|
|
6
|
+
const MediaCard = React.forwardRef(function MediaCard2({
|
|
7
|
+
title,
|
|
8
|
+
description,
|
|
9
|
+
href,
|
|
10
|
+
cover,
|
|
11
|
+
meta,
|
|
12
|
+
chips,
|
|
13
|
+
footer,
|
|
14
|
+
layout = "vertical",
|
|
15
|
+
linkComponent,
|
|
16
|
+
linkHrefProp = "href",
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}, ref) {
|
|
20
|
+
const Link = linkComponent ?? "a";
|
|
21
|
+
const destination = href ? linkHrefProp === "to" ? { to: href } : { href } : void 0;
|
|
22
|
+
const row = layout === "row";
|
|
23
|
+
const body = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24
|
+
cover && /* @__PURE__ */ jsx(
|
|
25
|
+
CoverImage,
|
|
26
|
+
{
|
|
27
|
+
...cover,
|
|
28
|
+
className: cn(
|
|
29
|
+
row ? "w-36 shrink-0 sm:w-44" : "w-full",
|
|
30
|
+
!row && "rounded-none border-b border-border"
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ jsxs("div", { className: cn("flex min-w-0 flex-1 flex-col gap-2", row ? "p-4" : "p-5"), children: [
|
|
35
|
+
chips && chips.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: chips.map((chip) => /* @__PURE__ */ jsx(Badge, { variant: chip.variant ?? "outline", size: "sm", dot: chip.dot, children: chip.label }, chip.label)) }),
|
|
36
|
+
/* @__PURE__ */ jsx("h3", { className: "font-semibold tracking-tight transition-colors group-hover:text-primary-ink", children: title }),
|
|
37
|
+
description && /* @__PURE__ */ jsx("div", { className: "line-clamp-3 text-sm leading-relaxed text-muted-foreground", children: description }),
|
|
38
|
+
meta && /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: meta }),
|
|
39
|
+
footer && /* @__PURE__ */ jsx("div", { className: "mt-auto pt-2 text-xs text-muted-foreground", children: footer })
|
|
40
|
+
] })
|
|
41
|
+
] });
|
|
42
|
+
const cardClass = cn(
|
|
43
|
+
"group flex h-full overflow-hidden rounded-xl border border-border bg-card shadow-sm transition-colors hover:border-primary/40",
|
|
44
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
45
|
+
row ? "flex-row" : "flex-col",
|
|
46
|
+
className
|
|
47
|
+
);
|
|
48
|
+
return /* @__PURE__ */ jsx("article", { ref, className: "h-full", ...props, children: href && destination ? /* @__PURE__ */ jsx(Link, { ...destination, className: cardClass, children: body }) : /* @__PURE__ */ jsx("div", { className: cardClass, children: body }) });
|
|
49
|
+
});
|
|
50
|
+
MediaCard.displayName = "MediaCard";
|
|
51
|
+
export {
|
|
52
|
+
MediaCard
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=MediaCard.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/media-card/MediaCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\nimport { Badge, type BadgeProps } from '../badge/Badge';\nimport { CoverImage, type CoverImageProps } from '../cover-image/CoverImage';\n\nexport type MediaCardChip = {\n label: string;\n /** Badge variant; quiet outline tones fit status metadata best. */\n variant?: BadgeProps['variant'];\n /** Leading status dot. */\n dot?: boolean;\n};\n\nexport type MediaCardProps = Omit<React.HTMLAttributes<HTMLElement>, 'title'> & {\n /** Card title. */\n title: string;\n /** Supporting copy under the title. */\n description?: React.ReactNode;\n /** Destination URL; the whole card becomes one link when set. */\n href?: string;\n /** Cover art rendered through CoverImage (seeded gradient fallback included). */\n cover?: Omit<CoverImageProps, 'className'>;\n /** Metadata line under the description (date, location, deadline). */\n meta?: React.ReactNode;\n /** Status/category chips rendered as Badges. */\n chips?: MediaCardChip[];\n /** Bottom slot for a details affordance or secondary text. Non-interactive when the card is a link. */\n footer?: React.ReactNode;\n /** 'vertical' stacks cover over content; 'row' puts a fixed-width cover beside it. */\n layout?: 'vertical' | 'row';\n /** Custom link element for routers (Next Link, react-router). */\n linkComponent?: React.ElementType;\n /** Prop used to pass the destination to linkComponent ('href' or 'to'). */\n linkHrefProp?: 'href' | 'to';\n};\n\n/**\n * Media card for event, article and listing grids: CoverImage on top (or\n * beside in `layout=\"row\"`), title, description, metadata line, status chips\n * and an optional footer. With `href` the entire card is a single link —\n * one target, one hover state, one focus ring — so keep `footer` free of\n * nested interactive elements.\n */\nexport const MediaCard = React.forwardRef<HTMLElement, MediaCardProps>(function MediaCard(\n {\n title,\n description,\n href,\n cover,\n meta,\n chips,\n footer,\n layout = 'vertical',\n linkComponent,\n linkHrefProp = 'href',\n className,\n ...props\n },\n ref\n) {\n const Link = linkComponent ?? 'a';\n const destination = href ? (linkHrefProp === 'to' ? { to: href } : { href }) : undefined;\n const row = layout === 'row';\n\n const body = (\n <>\n {cover && (\n <CoverImage\n {...cover}\n className={cn(\n row ? 'w-36 shrink-0 sm:w-44' : 'w-full',\n !row && 'rounded-none border-b border-border'\n )}\n />\n )}\n <div className={cn('flex min-w-0 flex-1 flex-col gap-2', row ? 'p-4' : 'p-5')}>\n {chips && chips.length > 0 && (\n <div className=\"flex flex-wrap gap-1.5\">\n {chips.map((chip) => (\n <Badge key={chip.label} variant={chip.variant ?? 'outline'} size=\"sm\" dot={chip.dot}>\n {chip.label}\n </Badge>\n ))}\n </div>\n )}\n <h3 className=\"font-semibold tracking-tight transition-colors group-hover:text-primary-ink\">{title}</h3>\n {description && (\n <div className=\"line-clamp-3 text-sm leading-relaxed text-muted-foreground\">{description}</div>\n )}\n {meta && <div className=\"text-xs text-muted-foreground\">{meta}</div>}\n {footer && <div className=\"mt-auto pt-2 text-xs text-muted-foreground\">{footer}</div>}\n </div>\n </>\n );\n\n const cardClass = cn(\n 'group flex h-full overflow-hidden rounded-xl border border-border bg-card shadow-sm transition-colors hover:border-primary/40',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background',\n row ? 'flex-row' : 'flex-col',\n className\n );\n\n return (\n <article ref={ref as never} className=\"h-full\" {...props}>\n {href && destination ? (\n <Link {...destination} className={cardClass}>\n {body}\n </Link>\n ) : (\n <div className={cardClass}>{body}</div>\n )}\n </article>\n );\n});\n\nMediaCard.displayName = 'MediaCard';\n"],"mappings":"AAiEI,mBAEI,KAQF,YAVF;AAjEJ,YAAY,WAAW;AACvB,SAAS,UAAU;AACnB,SAAS,aAA8B;AACvC,SAAS,kBAAwC;AAwC1C,MAAM,YAAY,MAAM,WAAwC,SAASA,WAC9E;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,OAAO,iBAAiB;AAC9B,QAAM,cAAc,OAAQ,iBAAiB,OAAO,EAAE,IAAI,KAAK,IAAI,EAAE,KAAK,IAAK;AAC/E,QAAM,MAAM,WAAW;AAEvB,QAAM,OACJ,iCACG;AAAA,aACC;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,WAAW;AAAA,UACT,MAAM,0BAA0B;AAAA,UAChC,CAAC,OAAO;AAAA,QACV;AAAA;AAAA,IACF;AAAA,IAEF,qBAAC,SAAI,WAAW,GAAG,sCAAsC,MAAM,QAAQ,KAAK,GACzE;AAAA,eAAS,MAAM,SAAS,KACvB,oBAAC,SAAI,WAAU,0BACZ,gBAAM,IAAI,CAAC,SACV,oBAAC,SAAuB,SAAS,KAAK,WAAW,WAAW,MAAK,MAAK,KAAK,KAAK,KAC7E,eAAK,SADI,KAAK,KAEjB,CACD,GACH;AAAA,MAEF,oBAAC,QAAG,WAAU,+EAA+E,iBAAM;AAAA,MAClG,eACC,oBAAC,SAAI,WAAU,8DAA8D,uBAAY;AAAA,MAE1F,QAAQ,oBAAC,SAAI,WAAU,iCAAiC,gBAAK;AAAA,MAC7D,UAAU,oBAAC,SAAI,WAAU,8CAA8C,kBAAO;AAAA,OACjF;AAAA,KACF;AAGF,QAAM,YAAY;AAAA,IAChB;AAAA,IACA;AAAA,IACA,MAAM,aAAa;AAAA,IACnB;AAAA,EACF;AAEA,SACE,oBAAC,aAAQ,KAAmB,WAAU,UAAU,GAAG,OAChD,kBAAQ,cACP,oBAAC,QAAM,GAAG,aAAa,WAAW,WAC/B,gBACH,IAEA,oBAAC,SAAI,WAAW,WAAY,gBAAK,GAErC;AAEJ,CAAC;AAED,UAAU,cAAc;","names":["MediaCard"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MediaCard';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var media_card_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(media_card_exports);
|
|
18
|
+
__reExport(media_card_exports, require("./MediaCard.js"), module.exports);
|
|
19
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
20
|
+
0 && (module.exports = {
|
|
21
|
+
...require("./MediaCard.js")
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/media-card/index.ts"],"sourcesContent":["export * from './MediaCard';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+BAAc,wBAAd;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/media-card/index.ts"],"sourcesContent":["export * from './MediaCard';\n"],"mappings":"AAAA,cAAc;","names":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type MonthScheduleLegendItem = {
|
|
3
|
+
/** Type key returned by getType. */
|
|
4
|
+
type: string;
|
|
5
|
+
/** Human-readable label shown in the legend. */
|
|
6
|
+
label: string;
|
|
7
|
+
};
|
|
8
|
+
export type MonthScheduleProps<T> = {
|
|
9
|
+
/** Events to place inside days; each is dated via getDate. */
|
|
10
|
+
events: T[];
|
|
11
|
+
/** ISO date key (YYYY-MM-DD) for an event. */
|
|
12
|
+
getDate: (event: T) => string;
|
|
13
|
+
/** Short label shown on the day chip and in the agenda. */
|
|
14
|
+
getLabel: (event: T) => string;
|
|
15
|
+
/** Optional type key used for chip color and the legend. */
|
|
16
|
+
getType?: (event: T) => string | undefined;
|
|
17
|
+
/** Optional destination per event. */
|
|
18
|
+
getHref?: (event: T) => string | undefined;
|
|
19
|
+
/** Controlled month as YYYY-MM. Falls back to defaultMonth, then today. */
|
|
20
|
+
month?: string;
|
|
21
|
+
/** Uncontrolled initial month (YYYY-MM). */
|
|
22
|
+
defaultMonth?: string;
|
|
23
|
+
/** Called with the new YYYY-MM when paging. */
|
|
24
|
+
onMonthChange?: (month: string) => void;
|
|
25
|
+
/** Override "today" for deterministic server rendering and tests. */
|
|
26
|
+
today?: string;
|
|
27
|
+
/** BCP-47 locale for month, weekday and agenda labels. */
|
|
28
|
+
locale?: string;
|
|
29
|
+
/** 0 starts the week on Sunday, 1 on Monday. */
|
|
30
|
+
weekStartsOn?: 0 | 1;
|
|
31
|
+
/** Maximum event chips per day before collapsing into "+N more". */
|
|
32
|
+
maxPerDay?: number;
|
|
33
|
+
/** Type key → label/color entries rendered as a legend under the grid. */
|
|
34
|
+
legend?: MonthScheduleLegendItem[];
|
|
35
|
+
/**
|
|
36
|
+
* Below this breakpoint an agenda list replaces the day grid:
|
|
37
|
+
* 'sm' swaps under 640px, 'md' under 768px.
|
|
38
|
+
*/
|
|
39
|
+
agendaBreakpoint?: 'sm' | 'md';
|
|
40
|
+
/** Custom link element for event hrefs (Next Link, react-router). */
|
|
41
|
+
linkComponent?: React.ElementType;
|
|
42
|
+
/** Prop used to pass the destination to linkComponent ('href' or 'to'). */
|
|
43
|
+
linkHrefProp?: 'href' | 'to';
|
|
44
|
+
'aria-label'?: string;
|
|
45
|
+
className?: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Month schedule: a month grid with dated events rendered inside each day,
|
|
49
|
+
* plus a legend and a small-screen agenda. Built on the same date utilities
|
|
50
|
+
* as Calendar; `today` stays explicit so server-rendered pages never read the
|
|
51
|
+
* server clock.
|
|
52
|
+
*/
|
|
53
|
+
export declare function MonthSchedule<T>({ events, getDate, getLabel, getType, getHref, month, defaultMonth, onMonthChange, today, locale, weekStartsOn, maxPerDay, legend, agendaBreakpoint, linkComponent, linkHrefProp, 'aria-label': ariaLabel, className, }: MonthScheduleProps<T>): React.JSX.Element;
|
|
54
|
+
export declare namespace MonthSchedule {
|
|
55
|
+
var displayName: string;
|
|
56
|
+
}
|