@slipstream-ui/core 0.10.2 → 0.11.1
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 +22 -8
- package/dist/index.d.ts +22 -8
- package/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -4
- 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/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.manifest.json +1 -1
- package/dist/manifests/load-more.manifest.json +2 -2
- package/dist/manifests/logo-cloud.manifest.json +8 -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 +5 -5
- 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 +8 -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 +3 -3
- 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/load-more/LoadMore.d.ts +2 -2
- package/dist/src/components/load-more/LoadMore.js +1 -1
- package/dist/src/components/load-more/LoadMore.js.map +1 -1
- package/dist/src/components/load-more/LoadMore.mjs +1 -1
- package/dist/src/components/load-more/LoadMore.mjs.map +1 -1
- package/dist/src/components/logo-cloud/LogoCloud.d.ts +4 -0
- package/dist/src/components/logo-cloud/LogoCloud.js +2 -1
- package/dist/src/components/logo-cloud/LogoCloud.js.map +1 -1
- package/dist/src/components/logo-cloud/LogoCloud.mjs +2 -1
- package/dist/src/components/logo-cloud/LogoCloud.mjs.map +1 -1
- package/dist/src/components/menu/Menu.js +12 -0
- package/dist/src/components/menu/Menu.js.map +1 -1
- package/dist/src/components/menu/Menu.mjs +12 -0
- package/dist/src/components/menu/Menu.mjs.map +1 -1
- package/dist/src/components/page-header/PageHeader.d.ts +6 -4
- package/dist/src/components/page-header/PageHeader.js.map +1 -1
- package/dist/src/components/page-header/PageHeader.mjs.map +1 -1
- package/dist/src/components/process-steps/ProcessSteps.d.ts +6 -0
- package/dist/src/components/process-steps/ProcessSteps.js +3 -2
- package/dist/src/components/process-steps/ProcessSteps.js.map +1 -1
- package/dist/src/components/process-steps/ProcessSteps.mjs +3 -2
- package/dist/src/components/process-steps/ProcessSteps.mjs.map +1 -1
- package/dist/src/components/section-heading/SectionHeading.d.ts +4 -2
- package/dist/src/components/section-heading/SectionHeading.js.map +1 -1
- package/dist/src/components/section-heading/SectionHeading.mjs.map +1 -1
- package/package.json +6 -4
- package/src/components/grid/Grid.test.tsx +3 -1
- package/src/components/input/Input.ssr.test.tsx +1 -1
- package/src/components/load-more/LoadMore.tsx +2 -2
- package/src/components/logo-cloud/LogoCloud.tsx +4 -1
- package/src/components/menu/Menu.test.tsx +15 -0
- package/src/components/menu/Menu.tsx +19 -0
- package/src/components/page-header/PageHeader.test.tsx +16 -0
- package/src/components/page-header/PageHeader.tsx +3 -2
- package/src/components/process-steps/ProcessSteps.tsx +6 -2
- package/src/components/section/Section.test.tsx +1 -1
- package/src/components/section-heading/SectionHeading.test.tsx +16 -0
- package/src/components/section-heading/SectionHeading.tsx +2 -1
- 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/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.manifest.json +1 -1
- package/src/manifests/load-more.manifest.json +2 -2
- package/src/manifests/logo-cloud.manifest.json +8 -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 +5 -5
- 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 +8 -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 +3 -3
- 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": "organism",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "newsletter",
|
|
9
9
|
"exportName": "Newsletter",
|
|
10
10
|
"description": "Email capture block with inline or stacked layout, pending state, success and failure feedback.",
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"name": "description",
|
|
16
|
-
"type": "
|
|
16
|
+
"type": "ReactNode",
|
|
17
17
|
"required": false,
|
|
18
|
-
"description": "Supporting summary under the title."
|
|
18
|
+
"description": "Supporting summary under the title; accepts links and inline markup."
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"name": "subtitle",
|
|
22
|
-
"type": "
|
|
22
|
+
"type": "ReactNode",
|
|
23
23
|
"required": false,
|
|
24
|
-
"description": "Alias for description (migration-friendly)."
|
|
24
|
+
"description": "Alias for description (migration-friendly); accepts links and inline markup."
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"name": "breadcrumbs",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
],
|
|
148
148
|
"package": "@slipstream-ui/core",
|
|
149
149
|
"importPath": "@slipstream-ui/core",
|
|
150
|
-
"version": "0.
|
|
150
|
+
"version": "0.11.1",
|
|
151
151
|
"sourceDir": "page-header",
|
|
152
152
|
"exportName": "PageHeader"
|
|
153
153
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "organism",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "process-steps",
|
|
9
9
|
"exportName": "ProcessSteps",
|
|
10
10
|
"description": "Ordered process cards with derived step numbers or custom icons.",
|
|
@@ -40,6 +40,13 @@
|
|
|
40
40
|
"center"
|
|
41
41
|
],
|
|
42
42
|
"description": "Content alignment."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "headingLevel",
|
|
46
|
+
"type": "2 | 3 | 4",
|
|
47
|
+
"required": false,
|
|
48
|
+
"defaultValue": "3",
|
|
49
|
+
"description": "Heading level for step titles (h2-h4); pick the level that continues the page outline without skipping a rank."
|
|
43
50
|
}
|
|
44
51
|
],
|
|
45
52
|
"examples": [
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "prose",
|
|
9
9
|
"exportName": "Prose",
|
|
10
10
|
"description": "Self-contained long-form typography for rendered markdown/MDX: headings, links, lists, code, tables, quotes and figures.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "range-slider",
|
|
9
9
|
"exportName": "RangeSlider",
|
|
10
10
|
"description": "Dual-thumb numeric range slider with labeled native inputs and formatted values.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "section-heading",
|
|
9
9
|
"exportName": "SectionHeading",
|
|
10
10
|
"description": "Section heading block: eyebrow, title (level 2-4), description and actions, with left/center alignment and three sizes.",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"name": "description",
|
|
21
|
-
"type": "
|
|
21
|
+
"type": "ReactNode",
|
|
22
22
|
"required": false,
|
|
23
|
-
"description": "Supporting copy."
|
|
23
|
+
"description": "Supporting copy; accepts links and inline markup."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"name": "eyebrow",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "organism",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "section",
|
|
9
9
|
"exportName": "Section",
|
|
10
10
|
"description": "Full-width page section with a surface tone, vertical rhythm and an optional centered container.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "segmented-control",
|
|
9
9
|
"exportName": "SegmentedControl",
|
|
10
10
|
"description": "Single- or multi-select segmented control for view and filter switches.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "select-menu",
|
|
9
9
|
"exportName": "SelectMenu",
|
|
10
10
|
"description": "Custom listbox select for rich options: descriptions, icons, groups, multi-select, custom rows and hidden inputs for forms.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "organism",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "site-footer",
|
|
9
9
|
"exportName": "SiteFooter",
|
|
10
10
|
"description": "Marketing footer: brand + tagline column, link columns and a legal bar; router-agnostic via linkComponent.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "organism",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "site-header",
|
|
9
9
|
"exportName": "SiteHeader",
|
|
10
10
|
"description": "Marketing/site header: sticky bar with brand, horizontal navigation with prefix-aware active states, right-aligned actions and a mobile drawer.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "stat-band",
|
|
9
9
|
"exportName": "StatBand",
|
|
10
10
|
"description": "Semantic description list of headline stats with labels, optional hints and column presets.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.11.1",
|
|
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.
|
|
7
|
+
"version": "0.11.1",
|
|
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.
|
|
7
|
+
"version": "0.11.1",
|
|
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.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "tombstone-card",
|
|
9
9
|
"exportName": "TombstoneCard",
|
|
10
10
|
"description": "Placeholder card for archived, closed or unavailable marketplace items.",
|
|
@@ -8,7 +8,7 @@ export type LoadMoreProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
8
8
|
loading?: boolean;
|
|
9
9
|
/** Button label. Default "Load more". */
|
|
10
10
|
loadLabel?: string;
|
|
11
|
-
/** Loading label. Default "Loading
|
|
11
|
+
/** Loading label. Default "Loading…". */
|
|
12
12
|
loadingLabel?: string;
|
|
13
13
|
/** End-of-list message. Default "You're all caught up." */
|
|
14
14
|
endLabel?: string;
|
|
@@ -27,7 +27,7 @@ export declare const LoadMore: React.ForwardRefExoticComponent<React.HTMLAttribu
|
|
|
27
27
|
loading?: boolean;
|
|
28
28
|
/** Button label. Default "Load more". */
|
|
29
29
|
loadLabel?: string;
|
|
30
|
-
/** Loading label. Default "Loading
|
|
30
|
+
/** Loading label. Default "Loading…". */
|
|
31
31
|
loadingLabel?: string;
|
|
32
32
|
/** End-of-list message. Default "You're all caught up." */
|
|
33
33
|
endLabel?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/load-more/LoadMore.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../utils/cn';\nimport { Button } from '../button/Button';\n\nexport type LoadMoreProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Whether another page is available. */\n hasMore: boolean;\n /** Request the next page. */\n onLoadMore: () => void;\n /** Loading state. */\n loading?: boolean;\n /** Button label. Default \"Load more\". */\n loadLabel?: string;\n /** Loading label. Default \"Loading
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/load-more/LoadMore.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../utils/cn';\nimport { Button } from '../button/Button';\n\nexport type LoadMoreProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Whether another page is available. */\n hasMore: boolean;\n /** Request the next page. */\n onLoadMore: () => void;\n /** Loading state. */\n loading?: boolean;\n /** Button label. Default \"Load more\". */\n loadLabel?: string;\n /** Loading label. Default \"Loading…\". */\n loadingLabel?: string;\n /** End-of-list message. Default \"You're all caught up.\" */\n endLabel?: string;\n};\n\n/**\n * Load-more control for paginated lists without page numbers. While loading it\n * disables the button and sets aria-busy; at the end it replaces the button\n * with a polite status message.\n */\nexport const LoadMore = React.forwardRef<HTMLDivElement, LoadMoreProps>(function LoadMore(\n {\n hasMore,\n onLoadMore,\n loading = false,\n loadLabel = 'Load more',\n loadingLabel = 'Loading…',\n endLabel = \"You're all caught up.\",\n className,\n ...props\n },\n ref\n) {\n return (\n <div ref={ref} aria-live=\"polite\" className={cn('flex w-full justify-center py-4', className)} {...props}>\n {hasMore ? (\n <Button type=\"button\" variant=\"outline\" onClick={onLoadMore} loading={loading}>\n {loading ? loadingLabel : loadLabel}\n </Button>\n ) : (\n <p role=\"status\" className=\"text-sm text-muted-foreground\">\n {endLabel}\n </p>\n )}\n </div>\n );\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0CQ;AAxCR,YAAuB;AACvB,gBAAmB;AACnB,oBAAuB;AAsBhB,MAAM,WAAW,MAAM,WAA0C,SAASA,UAC/E;AAAA,EACE;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,WAAW;AAAA,EACX;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE,4CAAC,SAAI,KAAU,aAAU,UAAS,eAAW,cAAG,mCAAmC,SAAS,GAAI,GAAG,OAChG,oBACC,4CAAC,wBAAO,MAAK,UAAS,SAAQ,WAAU,SAAS,YAAY,SAC1D,oBAAU,eAAe,WAC5B,IAEA,4CAAC,OAAE,MAAK,UAAS,WAAU,iCACxB,oBACH,GAEJ;AAEJ,CAAC;","names":["LoadMore"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/load-more/LoadMore.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../utils/cn';\nimport { Button } from '../button/Button';\n\nexport type LoadMoreProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Whether another page is available. */\n hasMore: boolean;\n /** Request the next page. */\n onLoadMore: () => void;\n /** Loading state. */\n loading?: boolean;\n /** Button label. Default \"Load more\". */\n loadLabel?: string;\n /** Loading label. Default \"Loading
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/load-more/LoadMore.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../utils/cn';\nimport { Button } from '../button/Button';\n\nexport type LoadMoreProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Whether another page is available. */\n hasMore: boolean;\n /** Request the next page. */\n onLoadMore: () => void;\n /** Loading state. */\n loading?: boolean;\n /** Button label. Default \"Load more\". */\n loadLabel?: string;\n /** Loading label. Default \"Loading…\". */\n loadingLabel?: string;\n /** End-of-list message. Default \"You're all caught up.\" */\n endLabel?: string;\n};\n\n/**\n * Load-more control for paginated lists without page numbers. While loading it\n * disables the button and sets aria-busy; at the end it replaces the button\n * with a polite status message.\n */\nexport const LoadMore = React.forwardRef<HTMLDivElement, LoadMoreProps>(function LoadMore(\n {\n hasMore,\n onLoadMore,\n loading = false,\n loadLabel = 'Load more',\n loadingLabel = 'Loading…',\n endLabel = \"You're all caught up.\",\n className,\n ...props\n },\n ref\n) {\n return (\n <div ref={ref} aria-live=\"polite\" className={cn('flex w-full justify-center py-4', className)} {...props}>\n {hasMore ? (\n <Button type=\"button\" variant=\"outline\" onClick={onLoadMore} loading={loading}>\n {loading ? loadingLabel : loadLabel}\n </Button>\n ) : (\n <p role=\"status\" className=\"text-sm text-muted-foreground\">\n {endLabel}\n </p>\n )}\n </div>\n );\n});\n"],"mappings":";AA0CQ;AAxCR,YAAY,WAAW;AACvB,SAAS,UAAU;AACnB,SAAS,cAAc;AAsBhB,MAAM,WAAW,MAAM,WAA0C,SAASA,UAC/E;AAAA,EACE;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,WAAW;AAAA,EACX;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE,oBAAC,SAAI,KAAU,aAAU,UAAS,WAAW,GAAG,mCAAmC,SAAS,GAAI,GAAG,OAChG,oBACC,oBAAC,UAAO,MAAK,UAAS,SAAQ,WAAU,SAAS,YAAY,SAC1D,oBAAU,eAAe,WAC5B,IAEA,oBAAC,OAAE,MAAK,UAAS,WAAU,iCACxB,oBACH,GAEJ;AAEJ,CAAC;","names":["LoadMore"]}
|
|
@@ -22,6 +22,8 @@ export type LogoCloudProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
22
22
|
align?: 'left' | 'center';
|
|
23
23
|
/** Custom link element for routers. */
|
|
24
24
|
linkComponent?: React.ElementType;
|
|
25
|
+
/** Prop used to pass the destination to linkComponent ('to' for react-router). */
|
|
26
|
+
linkHrefProp?: 'href' | 'to';
|
|
25
27
|
};
|
|
26
28
|
/**
|
|
27
29
|
* Trust strip for member, customer or partner logos. Logos are decorative
|
|
@@ -43,4 +45,6 @@ export declare const LogoCloud: React.ForwardRefExoticComponent<React.HTMLAttrib
|
|
|
43
45
|
align?: "left" | "center";
|
|
44
46
|
/** Custom link element for routers. */
|
|
45
47
|
linkComponent?: React.ElementType;
|
|
48
|
+
/** Prop used to pass the destination to linkComponent ('to' for react-router). */
|
|
49
|
+
linkHrefProp?: "href" | "to";
|
|
46
50
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -53,6 +53,7 @@ const LogoCloud = React.forwardRef(function LogoCloud2({
|
|
|
53
53
|
size = "md",
|
|
54
54
|
align = "center",
|
|
55
55
|
linkComponent,
|
|
56
|
+
linkHrefProp = "href",
|
|
56
57
|
className,
|
|
57
58
|
...props
|
|
58
59
|
}, ref) {
|
|
@@ -81,7 +82,7 @@ const LogoCloud = React.forwardRef(function LogoCloud2({
|
|
|
81
82
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { className: (0, import_cn.cn)("min-w-0", align === "center" ? "justify-self-center" : "justify-self-start"), children: item.href ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
82
83
|
Link,
|
|
83
84
|
{
|
|
84
|
-
href: item.href,
|
|
85
|
+
...linkHrefProp === "to" ? { to: item.href } : { href: item.href },
|
|
85
86
|
className: "rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
86
87
|
children: content
|
|
87
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/logo-cloud/LogoCloud.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type LogoItem = {\n /** Accessible name announced for the logo. */\n name: string;\n /** Logo artwork. Mark the image decorative so the name is not duplicated. */\n logo: React.ReactNode;\n /** Optional destination. */\n href?: string;\n};\n\nexport type LogoCloudProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Logos to display. */\n items: LogoItem[];\n /** Caption above the strip. */\n caption?: string;\n /** Desktop column count (3-6). Default 4. */\n columns?: 3 | 4 | 5 | 6;\n /** Desaturate logos until hover. Default true. */\n grayscale?: boolean;\n /** Logo box height. Default 'md'. */\n size?: 'sm' | 'md' | 'lg';\n /** Caption and grid alignment. Default 'center'. */\n align?: 'left' | 'center';\n /** Custom link element for routers. */\n linkComponent?: React.ElementType;\n};\n\nconst columnClasses: Record<NonNullable<LogoCloudProps['columns']>, string> = {\n 3: 'grid-cols-2 sm:grid-cols-3',\n 4: 'grid-cols-2 sm:grid-cols-4',\n 5: 'grid-cols-2 sm:grid-cols-3 lg:grid-cols-5',\n 6: 'grid-cols-2 sm:grid-cols-3 lg:grid-cols-6',\n};\n\nconst sizeClasses: Record<NonNullable<LogoCloudProps['size']>, string> = {\n sm: 'h-6',\n md: 'h-8',\n lg: 'h-12',\n};\n\n/**\n * Trust strip for member, customer or partner logos. Logos are decorative\n * slots; the item name supplies the accessible text. Use it inside a Section\n * so the surface tone and spacing come from the band.\n */\nexport const LogoCloud = React.forwardRef<HTMLDivElement, LogoCloudProps>(function LogoCloud(\n {\n items,\n caption,\n columns = 4,\n grayscale = true,\n size = 'md',\n align = 'center',\n linkComponent,\n className,\n ...props\n },\n ref\n) {\n const Link = linkComponent ?? 'a';\n const logoClass = cn(\n 'flex items-center transition duration-200 motion-reduce:transition-none',\n sizeClasses[size],\n grayscale && 'opacity-70 grayscale hover:opacity-100 hover:grayscale-0'\n );\n\n return (\n <div ref={ref} className={cn('w-full', className)} {...props}>\n {caption && (\n <p\n className={cn(\n 'mb-6 text-xs font-semibold uppercase tracking-widest text-muted-foreground',\n align === 'center' && 'text-center'\n )}\n >\n {caption}\n </p>\n )}\n <ul className={cn('grid items-center gap-x-8 gap-y-6', columnClasses[columns], align === 'center' && 'justify-items-center')}>\n {items.map((item) => {\n const content = (\n <>\n <span className={logoClass} aria-hidden=\"true\">\n {item.logo}\n </span>\n <span className=\"sr-only\">{item.name}</span>\n </>\n );\n\n return (\n <li key={item.name} className={cn('min-w-0', align === 'center' ? 'justify-self-center' : 'justify-self-start')}>\n {item.href ? (\n <Link\n href
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/logo-cloud/LogoCloud.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type LogoItem = {\n /** Accessible name announced for the logo. */\n name: string;\n /** Logo artwork. Mark the image decorative so the name is not duplicated. */\n logo: React.ReactNode;\n /** Optional destination. */\n href?: string;\n};\n\nexport type LogoCloudProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Logos to display. */\n items: LogoItem[];\n /** Caption above the strip. */\n caption?: string;\n /** Desktop column count (3-6). Default 4. */\n columns?: 3 | 4 | 5 | 6;\n /** Desaturate logos until hover. Default true. */\n grayscale?: boolean;\n /** Logo box height. Default 'md'. */\n size?: 'sm' | 'md' | 'lg';\n /** Caption and grid alignment. Default 'center'. */\n align?: 'left' | 'center';\n /** Custom link element for routers. */\n linkComponent?: React.ElementType;\n /** Prop used to pass the destination to linkComponent ('to' for react-router). */\n linkHrefProp?: 'href' | 'to';\n};\n\nconst columnClasses: Record<NonNullable<LogoCloudProps['columns']>, string> = {\n 3: 'grid-cols-2 sm:grid-cols-3',\n 4: 'grid-cols-2 sm:grid-cols-4',\n 5: 'grid-cols-2 sm:grid-cols-3 lg:grid-cols-5',\n 6: 'grid-cols-2 sm:grid-cols-3 lg:grid-cols-6',\n};\n\nconst sizeClasses: Record<NonNullable<LogoCloudProps['size']>, string> = {\n sm: 'h-6',\n md: 'h-8',\n lg: 'h-12',\n};\n\n/**\n * Trust strip for member, customer or partner logos. Logos are decorative\n * slots; the item name supplies the accessible text. Use it inside a Section\n * so the surface tone and spacing come from the band.\n */\nexport const LogoCloud = React.forwardRef<HTMLDivElement, LogoCloudProps>(function LogoCloud(\n {\n items,\n caption,\n columns = 4,\n grayscale = true,\n size = 'md',\n align = 'center',\n linkComponent,\n linkHrefProp = 'href',\n className,\n ...props\n },\n ref\n) {\n const Link = linkComponent ?? 'a';\n const logoClass = cn(\n 'flex items-center transition duration-200 motion-reduce:transition-none',\n sizeClasses[size],\n grayscale && 'opacity-70 grayscale hover:opacity-100 hover:grayscale-0'\n );\n\n return (\n <div ref={ref} className={cn('w-full', className)} {...props}>\n {caption && (\n <p\n className={cn(\n 'mb-6 text-xs font-semibold uppercase tracking-widest text-muted-foreground',\n align === 'center' && 'text-center'\n )}\n >\n {caption}\n </p>\n )}\n <ul className={cn('grid items-center gap-x-8 gap-y-6', columnClasses[columns], align === 'center' && 'justify-items-center')}>\n {items.map((item) => {\n const content = (\n <>\n <span className={logoClass} aria-hidden=\"true\">\n {item.logo}\n </span>\n <span className=\"sr-only\">{item.name}</span>\n </>\n );\n\n return (\n <li key={item.name} className={cn('min-w-0', align === 'center' ? 'justify-self-center' : 'justify-self-start')}>\n {item.href ? (\n <Link\n {...(linkHrefProp === 'to' ? { to: item.href } : { href: item.href })}\n className=\"rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n >\n {content}\n </Link>\n ) : (\n content\n )}\n </li>\n );\n })}\n </ul>\n </div>\n );\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0EQ;AA1ER,YAAuB;AACvB,gBAAmB;AA8BnB,MAAM,gBAAwE;AAAA,EAC5E,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,cAAmE;AAAA,EACvE,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAOO,MAAM,YAAY,MAAM,WAA2C,SAASA,WACjF;AAAA,EACE;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,OAAO,iBAAiB;AAC9B,QAAM,gBAAY;AAAA,IAChB;AAAA,IACA,YAAY,IAAI;AAAA,IAChB,aAAa;AAAA,EACf;AAEA,SACE,6CAAC,SAAI,KAAU,eAAW,cAAG,UAAU,SAAS,GAAI,GAAG,OACpD;AAAA,eACC;AAAA,MAAC;AAAA;AAAA,QACC,eAAW;AAAA,UACT;AAAA,UACA,UAAU,YAAY;AAAA,QACxB;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,IAEF,4CAAC,QAAG,eAAW,cAAG,qCAAqC,cAAc,OAAO,GAAG,UAAU,YAAY,sBAAsB,GACxH,gBAAM,IAAI,CAAC,SAAS;AACnB,YAAM,UACJ,4EACE;AAAA,oDAAC,UAAK,WAAW,WAAW,eAAY,QACrC,eAAK,MACR;AAAA,QACA,4CAAC,UAAK,WAAU,WAAW,eAAK,MAAK;AAAA,SACvC;AAGF,aACE,4CAAC,QAAmB,eAAW,cAAG,WAAW,UAAU,WAAW,wBAAwB,oBAAoB,GAC3G,eAAK,OACJ;AAAA,QAAC;AAAA;AAAA,UACE,GAAI,iBAAiB,OAAO,EAAE,IAAI,KAAK,KAAK,IAAI,EAAE,MAAM,KAAK,KAAK;AAAA,UACnE,WAAU;AAAA,UAET;AAAA;AAAA,MACH,IAEA,WATK,KAAK,IAWd;AAAA,IAEJ,CAAC,GACH;AAAA,KACF;AAEJ,CAAC;","names":["LogoCloud"]}
|
|
@@ -20,6 +20,7 @@ const LogoCloud = React.forwardRef(function LogoCloud2({
|
|
|
20
20
|
size = "md",
|
|
21
21
|
align = "center",
|
|
22
22
|
linkComponent,
|
|
23
|
+
linkHrefProp = "href",
|
|
23
24
|
className,
|
|
24
25
|
...props
|
|
25
26
|
}, ref) {
|
|
@@ -48,7 +49,7 @@ const LogoCloud = React.forwardRef(function LogoCloud2({
|
|
|
48
49
|
return /* @__PURE__ */ jsx("li", { className: cn("min-w-0", align === "center" ? "justify-self-center" : "justify-self-start"), children: item.href ? /* @__PURE__ */ jsx(
|
|
49
50
|
Link,
|
|
50
51
|
{
|
|
51
|
-
href: item.href,
|
|
52
|
+
...linkHrefProp === "to" ? { to: item.href } : { href: item.href },
|
|
52
53
|
className: "rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
53
54
|
children: content
|
|
54
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/logo-cloud/LogoCloud.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type LogoItem = {\n /** Accessible name announced for the logo. */\n name: string;\n /** Logo artwork. Mark the image decorative so the name is not duplicated. */\n logo: React.ReactNode;\n /** Optional destination. */\n href?: string;\n};\n\nexport type LogoCloudProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Logos to display. */\n items: LogoItem[];\n /** Caption above the strip. */\n caption?: string;\n /** Desktop column count (3-6). Default 4. */\n columns?: 3 | 4 | 5 | 6;\n /** Desaturate logos until hover. Default true. */\n grayscale?: boolean;\n /** Logo box height. Default 'md'. */\n size?: 'sm' | 'md' | 'lg';\n /** Caption and grid alignment. Default 'center'. */\n align?: 'left' | 'center';\n /** Custom link element for routers. */\n linkComponent?: React.ElementType;\n};\n\nconst columnClasses: Record<NonNullable<LogoCloudProps['columns']>, string> = {\n 3: 'grid-cols-2 sm:grid-cols-3',\n 4: 'grid-cols-2 sm:grid-cols-4',\n 5: 'grid-cols-2 sm:grid-cols-3 lg:grid-cols-5',\n 6: 'grid-cols-2 sm:grid-cols-3 lg:grid-cols-6',\n};\n\nconst sizeClasses: Record<NonNullable<LogoCloudProps['size']>, string> = {\n sm: 'h-6',\n md: 'h-8',\n lg: 'h-12',\n};\n\n/**\n * Trust strip for member, customer or partner logos. Logos are decorative\n * slots; the item name supplies the accessible text. Use it inside a Section\n * so the surface tone and spacing come from the band.\n */\nexport const LogoCloud = React.forwardRef<HTMLDivElement, LogoCloudProps>(function LogoCloud(\n {\n items,\n caption,\n columns = 4,\n grayscale = true,\n size = 'md',\n align = 'center',\n linkComponent,\n className,\n ...props\n },\n ref\n) {\n const Link = linkComponent ?? 'a';\n const logoClass = cn(\n 'flex items-center transition duration-200 motion-reduce:transition-none',\n sizeClasses[size],\n grayscale && 'opacity-70 grayscale hover:opacity-100 hover:grayscale-0'\n );\n\n return (\n <div ref={ref} className={cn('w-full', className)} {...props}>\n {caption && (\n <p\n className={cn(\n 'mb-6 text-xs font-semibold uppercase tracking-widest text-muted-foreground',\n align === 'center' && 'text-center'\n )}\n >\n {caption}\n </p>\n )}\n <ul className={cn('grid items-center gap-x-8 gap-y-6', columnClasses[columns], align === 'center' && 'justify-items-center')}>\n {items.map((item) => {\n const content = (\n <>\n <span className={logoClass} aria-hidden=\"true\">\n {item.logo}\n </span>\n <span className=\"sr-only\">{item.name}</span>\n </>\n );\n\n return (\n <li key={item.name} className={cn('min-w-0', align === 'center' ? 'justify-self-center' : 'justify-self-start')}>\n {item.href ? (\n <Link\n href
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/logo-cloud/LogoCloud.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type LogoItem = {\n /** Accessible name announced for the logo. */\n name: string;\n /** Logo artwork. Mark the image decorative so the name is not duplicated. */\n logo: React.ReactNode;\n /** Optional destination. */\n href?: string;\n};\n\nexport type LogoCloudProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Logos to display. */\n items: LogoItem[];\n /** Caption above the strip. */\n caption?: string;\n /** Desktop column count (3-6). Default 4. */\n columns?: 3 | 4 | 5 | 6;\n /** Desaturate logos until hover. Default true. */\n grayscale?: boolean;\n /** Logo box height. Default 'md'. */\n size?: 'sm' | 'md' | 'lg';\n /** Caption and grid alignment. Default 'center'. */\n align?: 'left' | 'center';\n /** Custom link element for routers. */\n linkComponent?: React.ElementType;\n /** Prop used to pass the destination to linkComponent ('to' for react-router). */\n linkHrefProp?: 'href' | 'to';\n};\n\nconst columnClasses: Record<NonNullable<LogoCloudProps['columns']>, string> = {\n 3: 'grid-cols-2 sm:grid-cols-3',\n 4: 'grid-cols-2 sm:grid-cols-4',\n 5: 'grid-cols-2 sm:grid-cols-3 lg:grid-cols-5',\n 6: 'grid-cols-2 sm:grid-cols-3 lg:grid-cols-6',\n};\n\nconst sizeClasses: Record<NonNullable<LogoCloudProps['size']>, string> = {\n sm: 'h-6',\n md: 'h-8',\n lg: 'h-12',\n};\n\n/**\n * Trust strip for member, customer or partner logos. Logos are decorative\n * slots; the item name supplies the accessible text. Use it inside a Section\n * so the surface tone and spacing come from the band.\n */\nexport const LogoCloud = React.forwardRef<HTMLDivElement, LogoCloudProps>(function LogoCloud(\n {\n items,\n caption,\n columns = 4,\n grayscale = true,\n size = 'md',\n align = 'center',\n linkComponent,\n linkHrefProp = 'href',\n className,\n ...props\n },\n ref\n) {\n const Link = linkComponent ?? 'a';\n const logoClass = cn(\n 'flex items-center transition duration-200 motion-reduce:transition-none',\n sizeClasses[size],\n grayscale && 'opacity-70 grayscale hover:opacity-100 hover:grayscale-0'\n );\n\n return (\n <div ref={ref} className={cn('w-full', className)} {...props}>\n {caption && (\n <p\n className={cn(\n 'mb-6 text-xs font-semibold uppercase tracking-widest text-muted-foreground',\n align === 'center' && 'text-center'\n )}\n >\n {caption}\n </p>\n )}\n <ul className={cn('grid items-center gap-x-8 gap-y-6', columnClasses[columns], align === 'center' && 'justify-items-center')}>\n {items.map((item) => {\n const content = (\n <>\n <span className={logoClass} aria-hidden=\"true\">\n {item.logo}\n </span>\n <span className=\"sr-only\">{item.name}</span>\n </>\n );\n\n return (\n <li key={item.name} className={cn('min-w-0', align === 'center' ? 'justify-self-center' : 'justify-self-start')}>\n {item.href ? (\n <Link\n {...(linkHrefProp === 'to' ? { to: item.href } : { href: item.href })}\n className=\"rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n >\n {content}\n </Link>\n ) : (\n content\n )}\n </li>\n );\n })}\n </ul>\n </div>\n );\n});\n"],"mappings":"AA0EQ,SAYI,UAZJ,KAYI,YAZJ;AA1ER,YAAY,WAAW;AACvB,SAAS,UAAU;AA8BnB,MAAM,gBAAwE;AAAA,EAC5E,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,cAAmE;AAAA,EACvE,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAOO,MAAM,YAAY,MAAM,WAA2C,SAASA,WACjF;AAAA,EACE;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,OAAO,iBAAiB;AAC9B,QAAM,YAAY;AAAA,IAChB;AAAA,IACA,YAAY,IAAI;AAAA,IAChB,aAAa;AAAA,EACf;AAEA,SACE,qBAAC,SAAI,KAAU,WAAW,GAAG,UAAU,SAAS,GAAI,GAAG,OACpD;AAAA,eACC;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,UAAU,YAAY;AAAA,QACxB;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,IAEF,oBAAC,QAAG,WAAW,GAAG,qCAAqC,cAAc,OAAO,GAAG,UAAU,YAAY,sBAAsB,GACxH,gBAAM,IAAI,CAAC,SAAS;AACnB,YAAM,UACJ,iCACE;AAAA,4BAAC,UAAK,WAAW,WAAW,eAAY,QACrC,eAAK,MACR;AAAA,QACA,oBAAC,UAAK,WAAU,WAAW,eAAK,MAAK;AAAA,SACvC;AAGF,aACE,oBAAC,QAAmB,WAAW,GAAG,WAAW,UAAU,WAAW,wBAAwB,oBAAoB,GAC3G,eAAK,OACJ;AAAA,QAAC;AAAA;AAAA,UACE,GAAI,iBAAiB,OAAO,EAAE,IAAI,KAAK,KAAK,IAAI,EAAE,MAAM,KAAK,KAAK;AAAA,UACnE,WAAU;AAAA,UAET;AAAA;AAAA,MACH,IAEA,WATK,KAAK,IAWd;AAAA,IAEJ,CAAC,GACH;AAAA,KACF;AAEJ,CAAC;","names":["LogoCloud"]}
|