@slipstream-ui/core 0.6.0 → 0.7.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/dist/index.d.mts +337 -17
- package/dist/index.d.ts +337 -17
- package/dist/index.js +719 -226
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +713 -226
- 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/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/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/cta-section.manifest.json +1 -1
- package/dist/manifests/data-table.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 +158 -0
- package/dist/manifests/dialog.manifest.json +1 -1
- package/dist/manifests/document-card.manifest.json +108 -0
- package/dist/manifests/drawer.manifest.json +1 -1
- package/dist/manifests/empty-state.manifest.json +1 -1
- package/dist/manifests/entity-card.manifest.json +114 -0
- 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 +40 -8
- 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.manifest.json +1 -1
- package/dist/manifests/load-more.manifest.json +88 -0
- package/dist/manifests/logo-cloud.manifest.json +1 -1
- package/dist/manifests/menu.manifest.json +1 -1
- package/dist/manifests/metric-card.manifest.json +1 -1
- 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 +2 -2
- 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 +69 -5
- 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 +26 -5
- 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 +97 -0
- package/dist/manifests/tooltip.manifest.json +1 -1
- package/dist/src/components/date-picker/DatePicker.js +1 -1
- package/dist/src/components/date-picker/DatePicker.js.map +1 -1
- package/dist/src/components/date-picker/DatePicker.mjs +1 -1
- package/dist/src/components/date-picker/DatePicker.mjs.map +1 -1
- package/dist/src/components/deal-card/DealCard.d.ts +72 -0
- package/dist/src/components/deal-card/DealCard.js +108 -0
- package/dist/src/components/deal-card/DealCard.js.map +1 -0
- package/dist/src/components/deal-card/DealCard.mjs +74 -0
- package/dist/src/components/deal-card/DealCard.mjs.map +1 -0
- package/dist/src/components/deal-card/index.d.ts +2 -0
- package/dist/src/components/deal-card/index.js +29 -0
- package/dist/src/components/deal-card/index.js.map +1 -0
- package/dist/src/components/deal-card/index.mjs +5 -0
- package/dist/src/components/deal-card/index.mjs.map +1 -0
- package/dist/src/components/document-card/DocumentCard.d.ts +42 -0
- package/dist/src/components/document-card/DocumentCard.js +84 -0
- package/dist/src/components/document-card/DocumentCard.js.map +1 -0
- package/dist/src/components/document-card/DocumentCard.mjs +50 -0
- package/dist/src/components/document-card/DocumentCard.mjs.map +1 -0
- package/dist/src/components/document-card/index.d.ts +2 -0
- package/dist/src/components/document-card/index.js +29 -0
- package/dist/src/components/document-card/index.js.map +1 -0
- package/dist/src/components/document-card/index.mjs +5 -0
- package/dist/src/components/document-card/index.mjs.map +1 -0
- package/dist/src/components/entity-card/EntityCard.d.ts +78 -0
- package/dist/src/components/entity-card/EntityCard.js +95 -0
- package/dist/src/components/entity-card/EntityCard.js.map +1 -0
- package/dist/src/components/entity-card/EntityCard.mjs +60 -0
- package/dist/src/components/entity-card/EntityCard.mjs.map +1 -0
- package/dist/src/components/entity-card/index.d.ts +2 -0
- package/dist/src/components/entity-card/index.js +31 -0
- package/dist/src/components/entity-card/index.js.map +1 -0
- package/dist/src/components/entity-card/index.mjs +6 -0
- package/dist/src/components/entity-card/index.mjs.map +1 -0
- package/dist/src/components/hero/Hero.d.ts +25 -13
- package/dist/src/components/hero/Hero.js +116 -12
- package/dist/src/components/hero/Hero.js.map +1 -1
- package/dist/src/components/hero/Hero.mjs +116 -12
- package/dist/src/components/hero/Hero.mjs.map +1 -1
- package/dist/src/components/load-more/LoadMore.d.ts +34 -0
- package/dist/src/components/load-more/LoadMore.js +55 -0
- package/dist/src/components/load-more/LoadMore.js.map +1 -0
- package/dist/src/components/load-more/LoadMore.mjs +21 -0
- package/dist/src/components/load-more/LoadMore.mjs.map +1 -0
- package/dist/src/components/load-more/index.d.ts +2 -0
- package/dist/src/components/load-more/index.js +29 -0
- package/dist/src/components/load-more/index.js.map +1 -0
- package/dist/src/components/load-more/index.mjs +5 -0
- package/dist/src/components/load-more/index.mjs.map +1 -0
- package/dist/src/components/range-slider/RangeSlider.js +6 -6
- package/dist/src/components/range-slider/RangeSlider.js.map +1 -1
- package/dist/src/components/range-slider/RangeSlider.mjs +6 -6
- package/dist/src/components/range-slider/RangeSlider.mjs.map +1 -1
- package/dist/src/components/select-menu/SelectMenu.js +2 -0
- package/dist/src/components/select-menu/SelectMenu.js.map +1 -1
- package/dist/src/components/select-menu/SelectMenu.mjs +2 -0
- package/dist/src/components/select-menu/SelectMenu.mjs.map +1 -1
- package/dist/src/components/separator/Separator.js +1 -1
- package/dist/src/components/separator/Separator.js.map +1 -1
- package/dist/src/components/separator/Separator.mjs +1 -1
- package/dist/src/components/separator/Separator.mjs.map +1 -1
- package/dist/src/components/stepper/Stepper.d.ts +35 -0
- package/dist/src/components/stepper/Stepper.js +118 -25
- package/dist/src/components/stepper/Stepper.js.map +1 -1
- package/dist/src/components/stepper/Stepper.mjs +118 -25
- package/dist/src/components/stepper/Stepper.mjs.map +1 -1
- package/dist/src/components/table-of-contents/TableOfContents.d.ts +10 -2
- package/dist/src/components/table-of-contents/TableOfContents.js +13 -0
- package/dist/src/components/table-of-contents/TableOfContents.js.map +1 -1
- package/dist/src/components/table-of-contents/TableOfContents.mjs +13 -0
- package/dist/src/components/table-of-contents/TableOfContents.mjs.map +1 -1
- package/dist/src/components/tabs/Tabs.js +43 -3
- package/dist/src/components/tabs/Tabs.js.map +1 -1
- package/dist/src/components/tabs/Tabs.mjs +43 -3
- package/dist/src/components/tabs/Tabs.mjs.map +1 -1
- package/dist/src/components/time-picker/TimePicker.js +1 -1
- package/dist/src/components/time-picker/TimePicker.js.map +1 -1
- package/dist/src/components/time-picker/TimePicker.mjs +1 -1
- package/dist/src/components/time-picker/TimePicker.mjs.map +1 -1
- package/dist/src/components/timeline/Timeline.js +2 -2
- package/dist/src/components/timeline/Timeline.js.map +1 -1
- package/dist/src/components/timeline/Timeline.mjs +2 -2
- package/dist/src/components/timeline/Timeline.mjs.map +1 -1
- package/dist/src/components/tombstone-card/TombstoneCard.d.ts +39 -0
- package/dist/src/components/tombstone-card/TombstoneCard.js +86 -0
- package/dist/src/components/tombstone-card/TombstoneCard.js.map +1 -0
- package/dist/src/components/tombstone-card/TombstoneCard.mjs +52 -0
- package/dist/src/components/tombstone-card/TombstoneCard.mjs.map +1 -0
- package/dist/src/components/tombstone-card/index.d.ts +2 -0
- package/dist/src/components/tombstone-card/index.js +29 -0
- package/dist/src/components/tombstone-card/index.js.map +1 -0
- package/dist/src/components/tombstone-card/index.mjs +5 -0
- package/dist/src/components/tombstone-card/index.mjs.map +1 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/utils/modal-layer.js +3 -2
- package/dist/src/utils/modal-layer.js.map +1 -1
- package/dist/src/utils/modal-layer.mjs +3 -2
- package/dist/src/utils/modal-layer.mjs.map +1 -1
- package/dist/styles-full.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -4
- package/src/components/date-picker/DatePicker.tsx +1 -1
- package/src/components/deal-card/DealCard.test.tsx +54 -0
- package/src/components/deal-card/DealCard.tsx +138 -0
- package/src/components/deal-card/index.ts +2 -0
- package/src/components/document-card/DocumentCard.test.tsx +41 -0
- package/src/components/document-card/DocumentCard.tsx +82 -0
- package/src/components/document-card/index.ts +2 -0
- package/src/components/entity-card/EntityCard.test.tsx +38 -0
- package/src/components/entity-card/EntityCard.tsx +133 -0
- package/src/components/entity-card/index.ts +2 -0
- package/src/components/hero/Hero.test.tsx +14 -0
- package/src/components/hero/Hero.tsx +111 -19
- package/src/components/load-more/LoadMore.test.tsx +28 -0
- package/src/components/load-more/LoadMore.tsx +53 -0
- package/src/components/load-more/index.ts +2 -0
- package/src/components/range-slider/RangeSlider.test.tsx +8 -0
- package/src/components/range-slider/RangeSlider.tsx +10 -6
- package/src/components/select-menu/SelectMenu.test.tsx +20 -10
- package/src/components/select-menu/SelectMenu.tsx +2 -0
- package/src/components/separator/Separator.test.tsx +9 -1
- package/src/components/separator/Separator.tsx +1 -1
- package/src/components/stepper/Stepper.test.tsx +19 -0
- package/src/components/stepper/Stepper.tsx +169 -37
- package/src/components/table-of-contents/TableOfContents.test.tsx +12 -1
- package/src/components/table-of-contents/TableOfContents.tsx +25 -1
- package/src/components/tabs/Tabs.test.tsx +12 -0
- package/src/components/tabs/Tabs.tsx +48 -4
- package/src/components/time-picker/TimePicker.tsx +1 -1
- package/src/components/timeline/Timeline.tsx +2 -2
- package/src/components/tombstone-card/TombstoneCard.test.tsx +26 -0
- package/src/components/tombstone-card/TombstoneCard.tsx +77 -0
- package/src/components/tombstone-card/index.ts +2 -0
- package/src/index.ts +5 -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/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/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/cta-section.manifest.json +1 -1
- package/src/manifests/data-table.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 +158 -0
- package/src/manifests/dialog.manifest.json +1 -1
- package/src/manifests/document-card.manifest.json +108 -0
- package/src/manifests/drawer.manifest.json +1 -1
- package/src/manifests/empty-state.manifest.json +1 -1
- package/src/manifests/entity-card.manifest.json +114 -0
- 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 +40 -8
- 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.manifest.json +1 -1
- package/src/manifests/load-more.manifest.json +88 -0
- package/src/manifests/logo-cloud.manifest.json +1 -1
- package/src/manifests/menu.manifest.json +1 -1
- package/src/manifests/metric-card.manifest.json +1 -1
- 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 +2 -2
- 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 +69 -5
- 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 +26 -5
- 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 +97 -0
- package/src/manifests/tooltip.manifest.json +1 -1
- package/src/test/jest-axe.d.ts +6 -1
- package/src/utils/modal-layer.ts +3 -2
|
@@ -0,0 +1,95 @@
|
|
|
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 EntityCard_exports = {};
|
|
30
|
+
__export(EntityCard_exports, {
|
|
31
|
+
EntityCard: () => EntityCard,
|
|
32
|
+
ProfileCard: () => ProfileCard
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(EntityCard_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_cn = require("../../utils/cn.js");
|
|
38
|
+
var import_Avatar = require("../avatar/Avatar.js");
|
|
39
|
+
var import_Badge = require("../badge/Badge.js");
|
|
40
|
+
var import_Card = require("../card/Card.js");
|
|
41
|
+
function initials(name) {
|
|
42
|
+
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
43
|
+
}
|
|
44
|
+
const EntityCard = React.forwardRef(function EntityCard2({
|
|
45
|
+
name,
|
|
46
|
+
entityType,
|
|
47
|
+
location,
|
|
48
|
+
description,
|
|
49
|
+
logo,
|
|
50
|
+
stats,
|
|
51
|
+
tags,
|
|
52
|
+
href,
|
|
53
|
+
linkComponent,
|
|
54
|
+
actions,
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}, ref) {
|
|
58
|
+
const Link = linkComponent ?? "a";
|
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Card.Card, { ref, className: (0, import_cn.cn)("flex h-full flex-col", className), ...props, children: [
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Card.CardHeader, { className: "flex-row items-start gap-3 p-5 pb-3", children: [
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "shrink-0", children: logo ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Avatar.Avatar, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Avatar.AvatarFallback, { children: initials(name) }) }) }),
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "truncate text-base font-semibold tracking-tight", children: href ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, { href, className: "rounded-sm hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: name }) : name }),
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: entityType }),
|
|
65
|
+
location && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: location })
|
|
66
|
+
] })
|
|
67
|
+
] }),
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Card.CardContent, { className: "flex-1 px-5 pb-3", children: [
|
|
69
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "line-clamp-3 text-sm leading-relaxed text-muted-foreground", children: description }),
|
|
70
|
+
tags && tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-3 flex flex-wrap gap-1.5", children: tags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Badge.Badge, { variant: "secondary", children: tag }, tag)) }),
|
|
71
|
+
stats && stats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dl", { className: "mt-4 grid grid-cols-2 gap-3", children: stats.map((stat) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { className: "text-xs text-muted-foreground", children: stat.label }),
|
|
73
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { className: "mt-0.5 truncate text-sm font-semibold tabular-nums", children: stat.value })
|
|
74
|
+
] }, stat.label)) })
|
|
75
|
+
] }),
|
|
76
|
+
(href || actions) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Card.CardFooter, { className: "flex flex-wrap items-center gap-2 border-t border-border px-5 py-3", children: [
|
|
77
|
+
href && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
78
|
+
Link,
|
|
79
|
+
{
|
|
80
|
+
href,
|
|
81
|
+
className: "text-sm font-medium text-primary underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
82
|
+
children: "View profile"
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ml-auto flex items-center gap-2", children: actions })
|
|
86
|
+
] })
|
|
87
|
+
] });
|
|
88
|
+
});
|
|
89
|
+
const ProfileCard = EntityCard;
|
|
90
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
91
|
+
0 && (module.exports = {
|
|
92
|
+
EntityCard,
|
|
93
|
+
ProfileCard
|
|
94
|
+
});
|
|
95
|
+
//# sourceMappingURL=EntityCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/entity-card/EntityCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\nimport { Avatar, AvatarFallback } from '../avatar/Avatar';\nimport { Badge } from '../badge/Badge';\nimport { Card, CardContent, CardFooter, CardHeader } from '../card/Card';\n\nexport type EntityStat = {\n label: string;\n value: string;\n};\n\nexport type EntityCardProps = React.HTMLAttributes<HTMLElement> & {\n /** Firm or member name. */\n name: string;\n /** Firm type, role or member category. */\n entityType: string;\n /** Region or office location. */\n location?: string;\n /** Short firm description. */\n description?: string;\n /** Logo slot. Falls back to initials when omitted. */\n logo?: React.ReactNode;\n /** Small stats such as closed deals or active mandates. */\n stats?: EntityStat[];\n /** Sector or service tags. */\n tags?: string[];\n /** Profile destination. */\n href?: string;\n /** Custom link element for routers. */\n linkComponent?: React.ElementType;\n /** Extra footer actions. */\n actions?: React.ReactNode;\n};\n\nfunction initials(name: string): string {\n return name\n .split(/\\s+/)\n .filter(Boolean)\n .slice(0, 2)\n .map((part) => part[0]?.toUpperCase() ?? '')\n .join('');\n}\n\n/**\n * Firm or member profile card for a directory. Use the logo slot for a brand\n * mark; when absent, initials keep the card identifiable. Stats and tags are\n * optional, so the same card works in compact and detailed directory views.\n */\nexport const EntityCard = React.forwardRef<HTMLElement, EntityCardProps>(function EntityCard(\n {\n name,\n entityType,\n location,\n description,\n logo,\n stats,\n tags,\n href,\n linkComponent,\n actions,\n className,\n ...props\n },\n ref\n) {\n const Link = linkComponent ?? 'a';\n\n return (\n <Card ref={ref as never} className={cn('flex h-full flex-col', className)} {...props}>\n <CardHeader className=\"flex-row items-start gap-3 p-5 pb-3\">\n <div className=\"shrink-0\">\n {logo ?? (\n <Avatar>\n <AvatarFallback>{initials(name)}</AvatarFallback>\n </Avatar>\n )}\n </div>\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"truncate text-base font-semibold tracking-tight\">\n {href ? (\n <Link href={href} className=\"rounded-sm hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\">\n {name}\n </Link>\n ) : (\n name\n )}\n </h3>\n <p className=\"mt-0.5 truncate text-xs text-muted-foreground\">{entityType}</p>\n {location && <p className=\"mt-0.5 truncate text-xs text-muted-foreground\">{location}</p>}\n </div>\n </CardHeader>\n <CardContent className=\"flex-1 px-5 pb-3\">\n {description && <p className=\"line-clamp-3 text-sm leading-relaxed text-muted-foreground\">{description}</p>}\n {tags && tags.length > 0 && (\n <div className=\"mt-3 flex flex-wrap gap-1.5\">\n {tags.map((tag) => (\n <Badge key={tag} variant=\"secondary\">\n {tag}\n </Badge>\n ))}\n </div>\n )}\n {stats && stats.length > 0 && (\n <dl className=\"mt-4 grid grid-cols-2 gap-3\">\n {stats.map((stat) => (\n <div key={stat.label} className=\"min-w-0\">\n <dt className=\"text-xs text-muted-foreground\">{stat.label}</dt>\n <dd className=\"mt-0.5 truncate text-sm font-semibold tabular-nums\">{stat.value}</dd>\n </div>\n ))}\n </dl>\n )}\n </CardContent>\n {(href || actions) && (\n <CardFooter className=\"flex flex-wrap items-center gap-2 border-t border-border px-5 py-3\">\n {href && (\n <Link\n href={href}\n className=\"text-sm font-medium text-primary underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n >\n View profile\n </Link>\n )}\n {actions && <div className=\"ml-auto flex items-center gap-2\">{actions}</div>}\n </CardFooter>\n )}\n </Card>\n );\n});\n\n/** Alias for profile-oriented directory surfaces. */\nexport const ProfileCard = EntityCard;\nexport type ProfileCardProps = EntityCardProps;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyEc;AAzEd,YAAuB;AACvB,gBAAmB;AACnB,oBAAuC;AACvC,mBAAsB;AACtB,kBAA0D;AA8B1D,SAAS,SAAS,MAAsB;AACtC,SAAO,KACJ,MAAM,KAAK,EACX,OAAO,OAAO,EACd,MAAM,GAAG,CAAC,EACV,IAAI,CAAC,SAAS,KAAK,CAAC,GAAG,YAAY,KAAK,EAAE,EAC1C,KAAK,EAAE;AACZ;AAOO,MAAM,aAAa,MAAM,WAAyC,SAASA,YAChF;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,OAAO,iBAAiB;AAE9B,SACE,6CAAC,oBAAK,KAAmB,eAAW,cAAG,wBAAwB,SAAS,GAAI,GAAG,OAC7E;AAAA,iDAAC,0BAAW,WAAU,uCACpB;AAAA,kDAAC,SAAI,WAAU,YACZ,kBACC,4CAAC,wBACC,sDAAC,gCAAgB,mBAAS,IAAI,GAAE,GAClC,GAEJ;AAAA,MACA,6CAAC,SAAI,WAAU,kBACb;AAAA,oDAAC,QAAG,WAAU,mDACX,iBACC,4CAAC,QAAK,MAAY,WAAU,yGACzB,gBACH,IAEA,MAEJ;AAAA,QACA,4CAAC,OAAE,WAAU,iDAAiD,sBAAW;AAAA,QACxE,YAAY,4CAAC,OAAE,WAAU,iDAAiD,oBAAS;AAAA,SACtF;AAAA,OACF;AAAA,IACA,6CAAC,2BAAY,WAAU,oBACpB;AAAA,qBAAe,4CAAC,OAAE,WAAU,8DAA8D,uBAAY;AAAA,MACtG,QAAQ,KAAK,SAAS,KACrB,4CAAC,SAAI,WAAU,+BACZ,eAAK,IAAI,CAAC,QACT,4CAAC,sBAAgB,SAAQ,aACtB,iBADS,GAEZ,CACD,GACH;AAAA,MAED,SAAS,MAAM,SAAS,KACvB,4CAAC,QAAG,WAAU,+BACX,gBAAM,IAAI,CAAC,SACV,6CAAC,SAAqB,WAAU,WAC9B;AAAA,oDAAC,QAAG,WAAU,iCAAiC,eAAK,OAAM;AAAA,QAC1D,4CAAC,QAAG,WAAU,sDAAsD,eAAK,OAAM;AAAA,WAFvE,KAAK,KAGf,CACD,GACH;AAAA,OAEJ;AAAA,KACE,QAAQ,YACR,6CAAC,0BAAW,WAAU,sEACnB;AAAA,cACC;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,WAAU;AAAA,UACX;AAAA;AAAA,MAED;AAAA,MAED,WAAW,4CAAC,SAAI,WAAU,mCAAmC,mBAAQ;AAAA,OACxE;AAAA,KAEJ;AAEJ,CAAC;AAGM,MAAM,cAAc;","names":["EntityCard"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../utils/cn.mjs";
|
|
4
|
+
import { Avatar, AvatarFallback } from "../avatar/Avatar.mjs";
|
|
5
|
+
import { Badge } from "../badge/Badge.mjs";
|
|
6
|
+
import { Card, CardContent, CardFooter, CardHeader } from "../card/Card.mjs";
|
|
7
|
+
function initials(name) {
|
|
8
|
+
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
9
|
+
}
|
|
10
|
+
const EntityCard = React.forwardRef(function EntityCard2({
|
|
11
|
+
name,
|
|
12
|
+
entityType,
|
|
13
|
+
location,
|
|
14
|
+
description,
|
|
15
|
+
logo,
|
|
16
|
+
stats,
|
|
17
|
+
tags,
|
|
18
|
+
href,
|
|
19
|
+
linkComponent,
|
|
20
|
+
actions,
|
|
21
|
+
className,
|
|
22
|
+
...props
|
|
23
|
+
}, ref) {
|
|
24
|
+
const Link = linkComponent ?? "a";
|
|
25
|
+
return /* @__PURE__ */ jsxs(Card, { ref, className: cn("flex h-full flex-col", className), ...props, children: [
|
|
26
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex-row items-start gap-3 p-5 pb-3", children: [
|
|
27
|
+
/* @__PURE__ */ jsx("div", { className: "shrink-0", children: logo ?? /* @__PURE__ */ jsx(Avatar, { children: /* @__PURE__ */ jsx(AvatarFallback, { children: initials(name) }) }) }),
|
|
28
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
29
|
+
/* @__PURE__ */ jsx("h3", { className: "truncate text-base font-semibold tracking-tight", children: href ? /* @__PURE__ */ jsx(Link, { href, className: "rounded-sm hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: name }) : name }),
|
|
30
|
+
/* @__PURE__ */ jsx("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: entityType }),
|
|
31
|
+
location && /* @__PURE__ */ jsx("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: location })
|
|
32
|
+
] })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "flex-1 px-5 pb-3", children: [
|
|
35
|
+
description && /* @__PURE__ */ jsx("p", { className: "line-clamp-3 text-sm leading-relaxed text-muted-foreground", children: description }),
|
|
36
|
+
tags && tags.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-3 flex flex-wrap gap-1.5", children: tags.map((tag) => /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: tag }, tag)) }),
|
|
37
|
+
stats && stats.length > 0 && /* @__PURE__ */ jsx("dl", { className: "mt-4 grid grid-cols-2 gap-3", children: stats.map((stat) => /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
38
|
+
/* @__PURE__ */ jsx("dt", { className: "text-xs text-muted-foreground", children: stat.label }),
|
|
39
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 truncate text-sm font-semibold tabular-nums", children: stat.value })
|
|
40
|
+
] }, stat.label)) })
|
|
41
|
+
] }),
|
|
42
|
+
(href || actions) && /* @__PURE__ */ jsxs(CardFooter, { className: "flex flex-wrap items-center gap-2 border-t border-border px-5 py-3", children: [
|
|
43
|
+
href && /* @__PURE__ */ jsx(
|
|
44
|
+
Link,
|
|
45
|
+
{
|
|
46
|
+
href,
|
|
47
|
+
className: "text-sm font-medium text-primary underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
48
|
+
children: "View profile"
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
actions && /* @__PURE__ */ jsx("div", { className: "ml-auto flex items-center gap-2", children: actions })
|
|
52
|
+
] })
|
|
53
|
+
] });
|
|
54
|
+
});
|
|
55
|
+
const ProfileCard = EntityCard;
|
|
56
|
+
export {
|
|
57
|
+
EntityCard,
|
|
58
|
+
ProfileCard
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=EntityCard.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/entity-card/EntityCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\nimport { Avatar, AvatarFallback } from '../avatar/Avatar';\nimport { Badge } from '../badge/Badge';\nimport { Card, CardContent, CardFooter, CardHeader } from '../card/Card';\n\nexport type EntityStat = {\n label: string;\n value: string;\n};\n\nexport type EntityCardProps = React.HTMLAttributes<HTMLElement> & {\n /** Firm or member name. */\n name: string;\n /** Firm type, role or member category. */\n entityType: string;\n /** Region or office location. */\n location?: string;\n /** Short firm description. */\n description?: string;\n /** Logo slot. Falls back to initials when omitted. */\n logo?: React.ReactNode;\n /** Small stats such as closed deals or active mandates. */\n stats?: EntityStat[];\n /** Sector or service tags. */\n tags?: string[];\n /** Profile destination. */\n href?: string;\n /** Custom link element for routers. */\n linkComponent?: React.ElementType;\n /** Extra footer actions. */\n actions?: React.ReactNode;\n};\n\nfunction initials(name: string): string {\n return name\n .split(/\\s+/)\n .filter(Boolean)\n .slice(0, 2)\n .map((part) => part[0]?.toUpperCase() ?? '')\n .join('');\n}\n\n/**\n * Firm or member profile card for a directory. Use the logo slot for a brand\n * mark; when absent, initials keep the card identifiable. Stats and tags are\n * optional, so the same card works in compact and detailed directory views.\n */\nexport const EntityCard = React.forwardRef<HTMLElement, EntityCardProps>(function EntityCard(\n {\n name,\n entityType,\n location,\n description,\n logo,\n stats,\n tags,\n href,\n linkComponent,\n actions,\n className,\n ...props\n },\n ref\n) {\n const Link = linkComponent ?? 'a';\n\n return (\n <Card ref={ref as never} className={cn('flex h-full flex-col', className)} {...props}>\n <CardHeader className=\"flex-row items-start gap-3 p-5 pb-3\">\n <div className=\"shrink-0\">\n {logo ?? (\n <Avatar>\n <AvatarFallback>{initials(name)}</AvatarFallback>\n </Avatar>\n )}\n </div>\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"truncate text-base font-semibold tracking-tight\">\n {href ? (\n <Link href={href} className=\"rounded-sm hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\">\n {name}\n </Link>\n ) : (\n name\n )}\n </h3>\n <p className=\"mt-0.5 truncate text-xs text-muted-foreground\">{entityType}</p>\n {location && <p className=\"mt-0.5 truncate text-xs text-muted-foreground\">{location}</p>}\n </div>\n </CardHeader>\n <CardContent className=\"flex-1 px-5 pb-3\">\n {description && <p className=\"line-clamp-3 text-sm leading-relaxed text-muted-foreground\">{description}</p>}\n {tags && tags.length > 0 && (\n <div className=\"mt-3 flex flex-wrap gap-1.5\">\n {tags.map((tag) => (\n <Badge key={tag} variant=\"secondary\">\n {tag}\n </Badge>\n ))}\n </div>\n )}\n {stats && stats.length > 0 && (\n <dl className=\"mt-4 grid grid-cols-2 gap-3\">\n {stats.map((stat) => (\n <div key={stat.label} className=\"min-w-0\">\n <dt className=\"text-xs text-muted-foreground\">{stat.label}</dt>\n <dd className=\"mt-0.5 truncate text-sm font-semibold tabular-nums\">{stat.value}</dd>\n </div>\n ))}\n </dl>\n )}\n </CardContent>\n {(href || actions) && (\n <CardFooter className=\"flex flex-wrap items-center gap-2 border-t border-border px-5 py-3\">\n {href && (\n <Link\n href={href}\n className=\"text-sm font-medium text-primary underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n >\n View profile\n </Link>\n )}\n {actions && <div className=\"ml-auto flex items-center gap-2\">{actions}</div>}\n </CardFooter>\n )}\n </Card>\n );\n});\n\n/** Alias for profile-oriented directory surfaces. */\nexport const ProfileCard = EntityCard;\nexport type ProfileCardProps = EntityCardProps;\n"],"mappings":"AAyEc,cAIN,YAJM;AAzEd,YAAY,WAAW;AACvB,SAAS,UAAU;AACnB,SAAS,QAAQ,sBAAsB;AACvC,SAAS,aAAa;AACtB,SAAS,MAAM,aAAa,YAAY,kBAAkB;AA8B1D,SAAS,SAAS,MAAsB;AACtC,SAAO,KACJ,MAAM,KAAK,EACX,OAAO,OAAO,EACd,MAAM,GAAG,CAAC,EACV,IAAI,CAAC,SAAS,KAAK,CAAC,GAAG,YAAY,KAAK,EAAE,EAC1C,KAAK,EAAE;AACZ;AAOO,MAAM,aAAa,MAAM,WAAyC,SAASA,YAChF;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,OAAO,iBAAiB;AAE9B,SACE,qBAAC,QAAK,KAAmB,WAAW,GAAG,wBAAwB,SAAS,GAAI,GAAG,OAC7E;AAAA,yBAAC,cAAW,WAAU,uCACpB;AAAA,0BAAC,SAAI,WAAU,YACZ,kBACC,oBAAC,UACC,8BAAC,kBAAgB,mBAAS,IAAI,GAAE,GAClC,GAEJ;AAAA,MACA,qBAAC,SAAI,WAAU,kBACb;AAAA,4BAAC,QAAG,WAAU,mDACX,iBACC,oBAAC,QAAK,MAAY,WAAU,yGACzB,gBACH,IAEA,MAEJ;AAAA,QACA,oBAAC,OAAE,WAAU,iDAAiD,sBAAW;AAAA,QACxE,YAAY,oBAAC,OAAE,WAAU,iDAAiD,oBAAS;AAAA,SACtF;AAAA,OACF;AAAA,IACA,qBAAC,eAAY,WAAU,oBACpB;AAAA,qBAAe,oBAAC,OAAE,WAAU,8DAA8D,uBAAY;AAAA,MACtG,QAAQ,KAAK,SAAS,KACrB,oBAAC,SAAI,WAAU,+BACZ,eAAK,IAAI,CAAC,QACT,oBAAC,SAAgB,SAAQ,aACtB,iBADS,GAEZ,CACD,GACH;AAAA,MAED,SAAS,MAAM,SAAS,KACvB,oBAAC,QAAG,WAAU,+BACX,gBAAM,IAAI,CAAC,SACV,qBAAC,SAAqB,WAAU,WAC9B;AAAA,4BAAC,QAAG,WAAU,iCAAiC,eAAK,OAAM;AAAA,QAC1D,oBAAC,QAAG,WAAU,sDAAsD,eAAK,OAAM;AAAA,WAFvE,KAAK,KAGf,CACD,GACH;AAAA,OAEJ;AAAA,KACE,QAAQ,YACR,qBAAC,cAAW,WAAU,sEACnB;AAAA,cACC;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,WAAU;AAAA,UACX;AAAA;AAAA,MAED;AAAA,MAED,WAAW,oBAAC,SAAI,WAAU,mCAAmC,mBAAQ;AAAA,OACxE;AAAA,KAEJ;AAEJ,CAAC;AAGM,MAAM,cAAc;","names":["EntityCard"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var entity_card_exports = {};
|
|
20
|
+
__export(entity_card_exports, {
|
|
21
|
+
EntityCard: () => import_EntityCard.EntityCard,
|
|
22
|
+
ProfileCard: () => import_EntityCard.ProfileCard
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(entity_card_exports);
|
|
25
|
+
var import_EntityCard = require("./EntityCard.js");
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {
|
|
28
|
+
EntityCard,
|
|
29
|
+
ProfileCard
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/entity-card/index.ts"],"sourcesContent":["export { EntityCard, ProfileCard } from './EntityCard';\nexport type { EntityCardProps, EntityStat, ProfileCardProps } from './EntityCard';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAwC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/entity-card/index.ts"],"sourcesContent":["export { EntityCard, ProfileCard } from './EntityCard';\nexport type { EntityCardProps, EntityStat, ProfileCardProps } from './EntityCard';\n"],"mappings":"AAAA,SAAS,YAAY,mBAAmB;","names":[]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
export type HeroVariant = 'split' | 'centered' | 'stacked' | 'overlay';
|
|
2
3
|
export type HeroProps = Omit<React.HTMLAttributes<HTMLElement>, 'title'> & {
|
|
3
4
|
/** Main headline. Accepts inline markup for a highlighted phrase. */
|
|
4
5
|
title: React.ReactNode;
|
|
@@ -10,9 +11,9 @@ export type HeroProps = Omit<React.HTMLAttributes<HTMLElement>, 'title'> & {
|
|
|
10
11
|
badge?: React.ReactNode;
|
|
11
12
|
/** Primary and secondary calls to action. */
|
|
12
13
|
actions?: React.ReactNode;
|
|
13
|
-
/** Product shot, illustration, video or form shown beside the copy. */
|
|
14
|
+
/** Product shot, illustration, video or form shown beside or behind the copy. */
|
|
14
15
|
media?: React.ReactNode;
|
|
15
|
-
/** Which side the media sits on at lg and up. Default 'right'. */
|
|
16
|
+
/** Which side the media sits on at lg and up in the split layout. Default 'right'. */
|
|
16
17
|
mediaPosition?: 'left' | 'right';
|
|
17
18
|
/** Copy alignment. Centered is typically used without media. */
|
|
18
19
|
align?: 'left' | 'center';
|
|
@@ -21,10 +22,13 @@ export type HeroProps = Omit<React.HTMLAttributes<HTMLElement>, 'title'> & {
|
|
|
21
22
|
/** Heading level. Default 1; use 2 when the hero is nested under a page h1. */
|
|
22
23
|
level?: 1 | 2;
|
|
23
24
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
25
|
+
* Layout:
|
|
26
|
+
* - `split` places copy and media side by side at lg and up (default with media).
|
|
27
|
+
* - `centered` stacks copy in a narrow centered column (default without media).
|
|
28
|
+
* - `stacked` puts copy above full-width media, left aligned unless `align` says otherwise.
|
|
29
|
+
* - `overlay` places media behind the copy with a scrim; copy stays readable in both themes.
|
|
26
30
|
*/
|
|
27
|
-
variant?:
|
|
31
|
+
variant?: HeroVariant;
|
|
28
32
|
/** Semantic element (default 'div'). */
|
|
29
33
|
as?: 'div' | 'section' | 'header';
|
|
30
34
|
/** Extra classes for the headline, for host display typography. */
|
|
@@ -35,12 +39,15 @@ export type HeroProps = Omit<React.HTMLAttributes<HTMLElement>, 'title'> & {
|
|
|
35
39
|
eyebrowClassName?: string;
|
|
36
40
|
/** Extra classes for the badge wrapper. */
|
|
37
41
|
badgeClassName?: string;
|
|
42
|
+
/** Extra classes for the media wrapper. */
|
|
43
|
+
mediaClassName?: string;
|
|
38
44
|
};
|
|
39
45
|
/**
|
|
40
46
|
* Marketing hero: optional badge/eyebrow, a large headline, supporting copy,
|
|
41
|
-
* calls to action and an optional media slot.
|
|
42
|
-
*
|
|
43
|
-
*
|
|
47
|
+
* calls to action and an optional media slot. Four responsive layouts cover
|
|
48
|
+
* the common landing-page shapes: split, centered, stacked and overlay. Use it
|
|
49
|
+
* inside Section so the band owns its tone and vertical padding. For a
|
|
50
|
+
* documentation page title without media, use PageHeader instead.
|
|
44
51
|
*/
|
|
45
52
|
export declare const Hero: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
|
|
46
53
|
/** Main headline. Accepts inline markup for a highlighted phrase. */
|
|
@@ -53,9 +60,9 @@ export declare const Hero: React.ForwardRefExoticComponent<Omit<React.HTMLAttrib
|
|
|
53
60
|
badge?: React.ReactNode;
|
|
54
61
|
/** Primary and secondary calls to action. */
|
|
55
62
|
actions?: React.ReactNode;
|
|
56
|
-
/** Product shot, illustration, video or form shown beside the copy. */
|
|
63
|
+
/** Product shot, illustration, video or form shown beside or behind the copy. */
|
|
57
64
|
media?: React.ReactNode;
|
|
58
|
-
/** Which side the media sits on at lg and up. Default 'right'. */
|
|
65
|
+
/** Which side the media sits on at lg and up in the split layout. Default 'right'. */
|
|
59
66
|
mediaPosition?: "left" | "right";
|
|
60
67
|
/** Copy alignment. Centered is typically used without media. */
|
|
61
68
|
align?: "left" | "center";
|
|
@@ -64,10 +71,13 @@ export declare const Hero: React.ForwardRefExoticComponent<Omit<React.HTMLAttrib
|
|
|
64
71
|
/** Heading level. Default 1; use 2 when the hero is nested under a page h1. */
|
|
65
72
|
level?: 1 | 2;
|
|
66
73
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
74
|
+
* Layout:
|
|
75
|
+
* - `split` places copy and media side by side at lg and up (default with media).
|
|
76
|
+
* - `centered` stacks copy in a narrow centered column (default without media).
|
|
77
|
+
* - `stacked` puts copy above full-width media, left aligned unless `align` says otherwise.
|
|
78
|
+
* - `overlay` places media behind the copy with a scrim; copy stays readable in both themes.
|
|
69
79
|
*/
|
|
70
|
-
variant?:
|
|
80
|
+
variant?: HeroVariant;
|
|
71
81
|
/** Semantic element (default 'div'). */
|
|
72
82
|
as?: "div" | "section" | "header";
|
|
73
83
|
/** Extra classes for the headline, for host display typography. */
|
|
@@ -78,4 +88,6 @@ export declare const Hero: React.ForwardRefExoticComponent<Omit<React.HTMLAttrib
|
|
|
78
88
|
eyebrowClassName?: string;
|
|
79
89
|
/** Extra classes for the badge wrapper. */
|
|
80
90
|
badgeClassName?: string;
|
|
91
|
+
/** Extra classes for the media wrapper. */
|
|
92
|
+
mediaClassName?: string;
|
|
81
93
|
} & React.RefAttributes<HTMLElement>>;
|
|
@@ -35,8 +35,8 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
35
35
|
var React = __toESM(require("react"));
|
|
36
36
|
var import_cn = require("../../utils/cn.js");
|
|
37
37
|
const titleSizes = {
|
|
38
|
-
md: "text-
|
|
39
|
-
lg: "text-4xl sm:text-5xl
|
|
38
|
+
md: "text-3xl sm:text-4xl md:text-5xl",
|
|
39
|
+
lg: "text-4xl sm:text-5xl md:text-6xl lg:leading-[1.05]"
|
|
40
40
|
};
|
|
41
41
|
const Hero = React.forwardRef(function Hero2({
|
|
42
42
|
title,
|
|
@@ -55,6 +55,7 @@ const Hero = React.forwardRef(function Hero2({
|
|
|
55
55
|
descriptionClassName,
|
|
56
56
|
eyebrowClassName,
|
|
57
57
|
badgeClassName,
|
|
58
|
+
mediaClassName,
|
|
58
59
|
className,
|
|
59
60
|
...props
|
|
60
61
|
}, ref) {
|
|
@@ -62,28 +63,131 @@ const Hero = React.forwardRef(function Hero2({
|
|
|
62
63
|
const layout = variant ?? (media ? "split" : "centered");
|
|
63
64
|
const Heading = `h${level}`;
|
|
64
65
|
const centered = layout === "centered" || align === "center";
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
const overlay = layout === "overlay";
|
|
67
|
+
const copy = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
className: (0, import_cn.cn)(
|
|
71
|
+
"min-w-0",
|
|
72
|
+
centered && "mx-auto flex max-w-3xl flex-col items-center text-center",
|
|
73
|
+
overlay && "max-w-2xl"
|
|
74
|
+
),
|
|
75
|
+
children: [
|
|
76
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
className: (0, import_cn.cn)(
|
|
80
|
+
"mb-5 inline-flex rounded-full border px-3 py-1 text-xs font-medium",
|
|
81
|
+
overlay ? "border-background/30 bg-background/10 text-background" : "border-primary/30 bg-primary/10 text-primary",
|
|
82
|
+
badgeClassName
|
|
83
|
+
),
|
|
84
|
+
children: badge
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
|
+
"p",
|
|
89
|
+
{
|
|
90
|
+
className: (0, import_cn.cn)(
|
|
91
|
+
"mb-3 text-xs font-semibold uppercase tracking-widest",
|
|
92
|
+
overlay ? "text-background/90" : "text-primary",
|
|
93
|
+
eyebrowClassName
|
|
94
|
+
),
|
|
95
|
+
children: eyebrow
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
99
|
+
Heading,
|
|
100
|
+
{
|
|
101
|
+
className: (0, import_cn.cn)(
|
|
102
|
+
"font-semibold tracking-tight text-balance",
|
|
103
|
+
titleSizes[size],
|
|
104
|
+
overlay && "text-background",
|
|
105
|
+
titleClassName
|
|
106
|
+
),
|
|
107
|
+
children: title
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
111
|
+
"p",
|
|
112
|
+
{
|
|
113
|
+
className: (0, import_cn.cn)(
|
|
114
|
+
"mt-5 text-base leading-relaxed sm:text-lg",
|
|
115
|
+
overlay ? "text-background/80" : "text-muted-foreground",
|
|
116
|
+
centered ? "max-w-2xl" : "max-w-xl",
|
|
117
|
+
descriptionClassName
|
|
118
|
+
),
|
|
119
|
+
children: description
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
123
|
+
"div",
|
|
124
|
+
{
|
|
125
|
+
className: (0, import_cn.cn)(
|
|
126
|
+
"mt-8 flex flex-wrap items-center gap-3",
|
|
127
|
+
centered && "justify-center"
|
|
128
|
+
),
|
|
129
|
+
children: actions
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
if (overlay) {
|
|
136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
137
|
+
Tag,
|
|
138
|
+
{
|
|
139
|
+
ref,
|
|
140
|
+
className: (0, import_cn.cn)(
|
|
141
|
+
"relative isolate flex min-h-[22rem] w-full items-center overflow-hidden rounded-lg py-12 sm:min-h-[26rem] sm:py-16 lg:min-h-[32rem] lg:py-20",
|
|
142
|
+
className
|
|
143
|
+
),
|
|
144
|
+
...props,
|
|
145
|
+
children: [
|
|
146
|
+
media && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
147
|
+
"div",
|
|
148
|
+
{
|
|
149
|
+
className: (0, import_cn.cn)(
|
|
150
|
+
"absolute inset-0 -z-20 [&>*]:h-full [&>*]:w-full [&>*]:object-cover",
|
|
151
|
+
mediaClassName
|
|
152
|
+
),
|
|
153
|
+
children: media
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "aria-hidden": "true", className: "absolute inset-0 -z-10 bg-foreground/60" }),
|
|
157
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative w-full px-4 sm:px-6 lg:px-10", children: copy })
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
}
|
|
72
162
|
if (layout === "centered") {
|
|
73
163
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tag, { ref, className: (0, import_cn.cn)("w-full", className), ...props, children: [
|
|
74
164
|
copy,
|
|
75
|
-
media && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-12", children: media })
|
|
165
|
+
media && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("mt-12 min-w-0", mediaClassName), children: media })
|
|
76
166
|
] });
|
|
77
167
|
}
|
|
168
|
+
if (layout === "stacked") {
|
|
169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
170
|
+
Tag,
|
|
171
|
+
{
|
|
172
|
+
ref,
|
|
173
|
+
className: (0, import_cn.cn)("flex w-full flex-col gap-10 lg:gap-14", className),
|
|
174
|
+
...props,
|
|
175
|
+
children: [
|
|
176
|
+
copy,
|
|
177
|
+
media && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("min-w-0 w-full", mediaClassName), children: media })
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
}
|
|
78
182
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
79
183
|
Tag,
|
|
80
184
|
{
|
|
81
185
|
ref,
|
|
82
|
-
className: (0, import_cn.cn)("grid w-full items-center gap-10 lg:grid-cols-2 lg:gap-16", className),
|
|
186
|
+
className: (0, import_cn.cn)("grid w-full items-center gap-10 lg:grid-cols-2 lg:gap-16 xl:gap-20", className),
|
|
83
187
|
...props,
|
|
84
188
|
children: [
|
|
85
189
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)(mediaPosition === "left" && "lg:order-2"), children: copy }),
|
|
86
|
-
media && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("min-w-0", mediaPosition === "left" && "lg:order-1"), children: media })
|
|
190
|
+
media && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("min-w-0", mediaPosition === "left" && "lg:order-1", mediaClassName), children: media })
|
|
87
191
|
]
|
|
88
192
|
}
|
|
89
193
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/hero/Hero.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type HeroProps = Omit<React.HTMLAttributes<HTMLElement>, 'title'> & {\n /** Main headline. Accepts inline markup for a highlighted phrase. */\n title: React.ReactNode;\n /** Supporting sentence under the headline. */\n description?: React.ReactNode;\n /** Small overline above the headline. */\n eyebrow?: React.ReactNode;\n /** Pill above the headline (announcement, category, proof point). */\n badge?: React.ReactNode;\n /** Primary and secondary calls to action. */\n actions?: React.ReactNode;\n /** Product shot, illustration, video or form shown beside the copy. */\n media?: React.ReactNode;\n /** Which side the media sits on at lg and up. Default 'right'. */\n mediaPosition?: 'left' | 'right';\n /** Copy alignment. Centered is typically used without media. */\n align?: 'left' | 'center';\n /** Headline scale. Default 'lg'. */\n size?: 'md' | 'lg';\n /** Heading level. Default 1; use 2 when the hero is nested under a page h1. */\n level?: 1 | 2;\n /**\n *
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/hero/Hero.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type HeroVariant = 'split' | 'centered' | 'stacked' | 'overlay';\n\nexport type HeroProps = Omit<React.HTMLAttributes<HTMLElement>, 'title'> & {\n /** Main headline. Accepts inline markup for a highlighted phrase. */\n title: React.ReactNode;\n /** Supporting sentence under the headline. */\n description?: React.ReactNode;\n /** Small overline above the headline. */\n eyebrow?: React.ReactNode;\n /** Pill above the headline (announcement, category, proof point). */\n badge?: React.ReactNode;\n /** Primary and secondary calls to action. */\n actions?: React.ReactNode;\n /** Product shot, illustration, video or form shown beside or behind the copy. */\n media?: React.ReactNode;\n /** Which side the media sits on at lg and up in the split layout. Default 'right'. */\n mediaPosition?: 'left' | 'right';\n /** Copy alignment. Centered is typically used without media. */\n align?: 'left' | 'center';\n /** Headline scale. Default 'lg'. */\n size?: 'md' | 'lg';\n /** Heading level. Default 1; use 2 when the hero is nested under a page h1. */\n level?: 1 | 2;\n /**\n * Layout:\n * - `split` places copy and media side by side at lg and up (default with media).\n * - `centered` stacks copy in a narrow centered column (default without media).\n * - `stacked` puts copy above full-width media, left aligned unless `align` says otherwise.\n * - `overlay` places media behind the copy with a scrim; copy stays readable in both themes.\n */\n variant?: HeroVariant;\n /** Semantic element (default 'div'). */\n as?: 'div' | 'section' | 'header';\n /** Extra classes for the headline, for host display typography. */\n titleClassName?: string;\n /** Extra classes for the description. */\n descriptionClassName?: string;\n /** Extra classes for the eyebrow. */\n eyebrowClassName?: string;\n /** Extra classes for the badge wrapper. */\n badgeClassName?: string;\n /** Extra classes for the media wrapper. */\n mediaClassName?: string;\n};\n\nconst titleSizes = {\n md: 'text-3xl sm:text-4xl md:text-5xl',\n lg: 'text-4xl sm:text-5xl md:text-6xl lg:leading-[1.05]',\n} as const;\n\n/**\n * Marketing hero: optional badge/eyebrow, a large headline, supporting copy,\n * calls to action and an optional media slot. Four responsive layouts cover\n * the common landing-page shapes: split, centered, stacked and overlay. Use it\n * inside Section so the band owns its tone and vertical padding. For a\n * documentation page title without media, use PageHeader instead.\n */\nexport const Hero = React.forwardRef<HTMLElement, HeroProps>(function Hero(\n {\n title,\n description,\n eyebrow,\n badge,\n actions,\n media,\n mediaPosition = 'right',\n align = 'left',\n size = 'lg',\n level = 1,\n variant,\n as = 'div',\n titleClassName,\n descriptionClassName,\n eyebrowClassName,\n badgeClassName,\n mediaClassName,\n className,\n ...props\n },\n ref\n) {\n const Tag = as as 'div';\n const layout = variant ?? (media ? 'split' : 'centered');\n const Heading = `h${level}` as 'h1' | 'h2';\n const centered = layout === 'centered' || align === 'center';\n const overlay = layout === 'overlay';\n\n const copy = (\n <div\n className={cn(\n 'min-w-0',\n centered && 'mx-auto flex max-w-3xl flex-col items-center text-center',\n overlay && 'max-w-2xl'\n )}\n >\n {badge && (\n <div\n className={cn(\n 'mb-5 inline-flex rounded-full border px-3 py-1 text-xs font-medium',\n overlay\n ? 'border-background/30 bg-background/10 text-background'\n : 'border-primary/30 bg-primary/10 text-primary',\n badgeClassName\n )}\n >\n {badge}\n </div>\n )}\n {eyebrow && (\n <p\n className={cn(\n 'mb-3 text-xs font-semibold uppercase tracking-widest',\n overlay ? 'text-background/90' : 'text-primary',\n eyebrowClassName\n )}\n >\n {eyebrow}\n </p>\n )}\n <Heading\n className={cn(\n 'font-semibold tracking-tight text-balance',\n titleSizes[size],\n overlay && 'text-background',\n titleClassName\n )}\n >\n {title}\n </Heading>\n {description && (\n <p\n className={cn(\n 'mt-5 text-base leading-relaxed sm:text-lg',\n overlay ? 'text-background/80' : 'text-muted-foreground',\n centered ? 'max-w-2xl' : 'max-w-xl',\n descriptionClassName\n )}\n >\n {description}\n </p>\n )}\n {actions && (\n <div\n className={cn(\n 'mt-8 flex flex-wrap items-center gap-3',\n centered && 'justify-center'\n )}\n >\n {actions}\n </div>\n )}\n </div>\n );\n\n if (overlay) {\n return (\n <Tag\n ref={ref as never}\n className={cn(\n 'relative isolate flex min-h-[22rem] w-full items-center overflow-hidden rounded-lg py-12 sm:min-h-[26rem] sm:py-16 lg:min-h-[32rem] lg:py-20',\n className\n )}\n {...props}\n >\n {media && (\n <div\n className={cn(\n 'absolute inset-0 -z-20 [&>*]:h-full [&>*]:w-full [&>*]:object-cover',\n mediaClassName\n )}\n >\n {media}\n </div>\n )}\n <div aria-hidden=\"true\" className=\"absolute inset-0 -z-10 bg-foreground/60\" />\n <div className=\"relative w-full px-4 sm:px-6 lg:px-10\">{copy}</div>\n </Tag>\n );\n }\n\n if (layout === 'centered') {\n return (\n <Tag ref={ref as never} className={cn('w-full', className)} {...props}>\n {copy}\n {media && <div className={cn('mt-12 min-w-0', mediaClassName)}>{media}</div>}\n </Tag>\n );\n }\n\n if (layout === 'stacked') {\n return (\n <Tag\n ref={ref as never}\n className={cn('flex w-full flex-col gap-10 lg:gap-14', className)}\n {...props}\n >\n {copy}\n {media && <div className={cn('min-w-0 w-full', mediaClassName)}>{media}</div>}\n </Tag>\n );\n }\n\n return (\n <Tag\n ref={ref as never}\n className={cn('grid w-full items-center gap-10 lg:grid-cols-2 lg:gap-16 xl:gap-20', className)}\n {...props}\n >\n <div className={cn(mediaPosition === 'left' && 'lg:order-2')}>{copy}</div>\n {media && (\n <div className={cn('min-w-0', mediaPosition === 'left' && 'lg:order-1', mediaClassName)}>\n {media}\n </div>\n )}\n </Tag>\n );\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2FI;AA3FJ,YAAuB;AACvB,gBAAmB;AA+CnB,MAAM,aAAa;AAAA,EACjB,IAAI;AAAA,EACJ,IAAI;AACN;AASO,MAAM,OAAO,MAAM,WAAmC,SAASA,MACpE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA,KAAK;AAAA,EACL;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,MAAM;AACZ,QAAM,SAAS,YAAY,QAAQ,UAAU;AAC7C,QAAM,UAAU,IAAI,KAAK;AACzB,QAAM,WAAW,WAAW,cAAc,UAAU;AACpD,QAAM,UAAU,WAAW;AAE3B,QAAM,OACJ;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,QACT;AAAA,QACA,YAAY;AAAA,QACZ,WAAW;AAAA,MACb;AAAA,MAEC;AAAA,iBACC;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,cACT;AAAA,cACA,UACI,0DACA;AAAA,cACJ;AAAA,YACF;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QAED,WACC;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,cACT;AAAA,cACA,UAAU,uBAAuB;AAAA,cACjC;AAAA,YACF;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,cACT;AAAA,cACA,WAAW,IAAI;AAAA,cACf,WAAW;AAAA,cACX;AAAA,YACF;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QACC,eACC;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,cACT;AAAA,cACA,UAAU,uBAAuB;AAAA,cACjC,WAAW,cAAc;AAAA,cACzB;AAAA,YACF;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QAED,WACC;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,cACT;AAAA,cACA,YAAY;AAAA,YACd;AAAA,YAEC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EAEJ;AAGF,MAAI,SAAS;AACX,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEH;AAAA,mBACC;AAAA,YAAC;AAAA;AAAA,cACC,eAAW;AAAA,gBACT;AAAA,gBACA;AAAA,cACF;AAAA,cAEC;AAAA;AAAA,UACH;AAAA,UAEF,4CAAC,SAAI,eAAY,QAAO,WAAU,2CAA0C;AAAA,UAC5E,4CAAC,SAAI,WAAU,yCAAyC,gBAAK;AAAA;AAAA;AAAA,IAC/D;AAAA,EAEJ;AAEA,MAAI,WAAW,YAAY;AACzB,WACE,6CAAC,OAAI,KAAmB,eAAW,cAAG,UAAU,SAAS,GAAI,GAAG,OAC7D;AAAA;AAAA,MACA,SAAS,4CAAC,SAAI,eAAW,cAAG,iBAAiB,cAAc,GAAI,iBAAM;AAAA,OACxE;AAAA,EAEJ;AAEA,MAAI,WAAW,WAAW;AACxB,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,cAAG,yCAAyC,SAAS;AAAA,QAC/D,GAAG;AAAA,QAEH;AAAA;AAAA,UACA,SAAS,4CAAC,SAAI,eAAW,cAAG,kBAAkB,cAAc,GAAI,iBAAM;AAAA;AAAA;AAAA,IACzE;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAW,cAAG,sEAAsE,SAAS;AAAA,MAC5F,GAAG;AAAA,MAEJ;AAAA,oDAAC,SAAI,eAAW,cAAG,kBAAkB,UAAU,YAAY,GAAI,gBAAK;AAAA,QACnE,SACC,4CAAC,SAAI,eAAW,cAAG,WAAW,kBAAkB,UAAU,cAAc,cAAc,GACnF,iBACH;AAAA;AAAA;AAAA,EAEJ;AAEJ,CAAC;","names":["Hero"]}
|