@kickstartds/ds-agency-premium 1.6.71--canary.50.2241.0 → 1.6.71--canary.50.2247.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/SearchResultMatchProps-777cd47c.d.ts +23 -0
- package/dist/{SearchResultProps-4a00e50a.d.ts → SearchResultProps-a4d09722.d.ts} +3 -18
- package/dist/components/page-wrapper/tokens.css +1 -1
- package/dist/components/presets.json +28 -8
- package/dist/components/search/index.d.ts +1 -1
- package/dist/components/search/index.js +2 -0
- package/dist/components/search/search.schema.dereffed.json +3 -0
- package/dist/components/search-form/index.js +2 -0
- package/dist/components/search-modal/index.js +2 -0
- package/dist/components/search-result/index.d.ts +1 -1
- package/dist/components/search-result/index.js +7 -5
- package/dist/components/search-result/search-result.css +22 -29
- package/dist/components/search-result/search-result.schema.dereffed.json +3 -0
- package/dist/components/search-result/search-result.schema.json +1 -25
- package/dist/components/search-result-match/index.d.ts +7 -0
- package/dist/components/search-result-match/index.js +19 -0
- package/dist/components/search-result-match/search-result-match.css +20 -0
- package/dist/components/search-result-match/search-result-match.schema.dereffed.json +33 -0
- package/dist/components/search-result-match/search-result-match.schema.json +31 -0
- package/dist/tokens/themes.css +4 -4
- package/dist/tokens/tokens.css +1 -1
- package/dist/tokens/tokens.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
3
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
4
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The title of the match.
|
|
8
|
+
*/
|
|
9
|
+
type Title = string;
|
|
10
|
+
/**
|
|
11
|
+
* The main content or description of the search result.
|
|
12
|
+
*/
|
|
13
|
+
type Text = string;
|
|
14
|
+
/**
|
|
15
|
+
* A URL linking to the specific match or more information.
|
|
16
|
+
*/
|
|
17
|
+
type URL = string;
|
|
18
|
+
interface SearchResultMatchProps {
|
|
19
|
+
title?: Title;
|
|
20
|
+
snippet?: Text;
|
|
21
|
+
url?: URL;
|
|
22
|
+
}
|
|
23
|
+
export { Title, Text, URL, SearchResultMatchProps };
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
4
4
|
* and run json-schema-to-typescript to regenerate this file.
|
|
5
5
|
*/
|
|
6
|
+
import { SearchResultMatchProps } from "./SearchResultMatchProps-777cd47c.js";
|
|
6
7
|
/**
|
|
7
8
|
* A URL linking to the search result or more information.
|
|
8
9
|
*/
|
|
@@ -15,26 +16,10 @@ type Title = string;
|
|
|
15
16
|
* The initial search match or summary of the search result.
|
|
16
17
|
*/
|
|
17
18
|
type InitialMatch = string;
|
|
18
|
-
/**
|
|
19
|
-
* The title of the match.
|
|
20
|
-
*/
|
|
21
|
-
type Title1 = string;
|
|
22
|
-
/**
|
|
23
|
-
* The main content or description of the search result.
|
|
24
|
-
*/
|
|
25
|
-
type Text = string;
|
|
26
|
-
/**
|
|
27
|
-
* A URL linking to the specific match or more information.
|
|
28
|
-
*/
|
|
29
|
-
type URL1 = string;
|
|
30
19
|
/**
|
|
31
20
|
* An array of search matches.
|
|
32
21
|
*/
|
|
33
|
-
type Matches =
|
|
34
|
-
title?: Title1;
|
|
35
|
-
snippet?: Text;
|
|
36
|
-
url?: URL1;
|
|
37
|
-
}[];
|
|
22
|
+
type Matches = SearchResultMatchProps[];
|
|
38
23
|
/**
|
|
39
24
|
* Whether to display the link to the search result.
|
|
40
25
|
*/
|
|
@@ -60,4 +45,4 @@ interface PreviewImage {
|
|
|
60
45
|
*/
|
|
61
46
|
large?: boolean;
|
|
62
47
|
}
|
|
63
|
-
export { URL, Title, InitialMatch,
|
|
48
|
+
export { URL, Title, InitialMatch, Matches, ShowLink, SearchResultProps, PreviewImage };
|
|
@@ -1192,7 +1192,7 @@
|
|
|
1192
1192
|
"id": "page-archetypes-search--search",
|
|
1193
1193
|
"group": "Page Archetypes/Search",
|
|
1194
1194
|
"name": "Search",
|
|
1195
|
-
"code": "<Search\n events={[\n {\n category: 'Buyers',\n ctaText: 'Show event',\n date: 'FRI, JAN 16',\n image: {\n alt: 'This is an image of a flower',\n src: 'https://picsum.photos/seed/flower/800/600'\n },\n location: {\n address: 'Köln',\n name: 'Stadthalle'\n },\n tags: [\n 'AI'\n ],\n text: 'The Future of AI is here and now - Join us to explore the latest advancements in artificial intelligence. The Future of AI is here and now - Join us to explore the latest advancements in artificial intelligence.',\n time: '10:00',\n title: 'This is a event teaser title',\n url: 'https://example.com'\n },\n {\n category: 'Buyers',\n ctaText: 'Show event',\n date: 'FRI, JAN 16',\n image: {\n alt: 'This is an image of a flower',\n src: 'https://picsum.photos/seed/flower/800/600'\n },\n location: {\n address: 'Köln',\n name: 'Stadthalle'\n },\n tags: [\n 'AI'\n ],\n text: 'The Future of AI is here and now - Join us to explore the latest advancements in artificial intelligence. The Future of AI is here and now - Join us to explore the latest advancements in artificial intelligence.',\n time: '10:00',\n title: 'This is a event teaser title',\n url: 'https://example.com'\n },\n {\n category: 'Buyers',\n ctaText: 'Show event',\n date: 'FRI, JAN 16',\n image: {\n alt: 'This is an image of a flower',\n src: 'https://picsum.photos/seed/flower/800/600'\n },\n location: {\n address: 'Köln',\n name: 'Stadthalle'\n },\n tags: [\n 'AI'\n ],\n text: 'The Future of AI is here and now - Join us to explore the latest advancements in artificial intelligence. The Future of AI is here and now - Join us to explore the latest advancements in artificial intelligence.',\n time: '10:00',\n title: 'This is a event teaser title',\n url: 'https://example.com'\n }\n ]}\n filter={{\n applyButton: {\n label: 'Filter Appointments'\n },\n categories: {\n categoryCheckboxes: [\n 'Category Filter',\n 'Category Filter',\n 'Category Filter'\n ],\n title: 'Categories',\n toggle: true\n },\n datePicker: {\n dateFromInput: {\n label: 'From',\n placeholder: 'Select a date'\n },\n dateToInput: {\n label: 'To',\n placeholder: 'Select a date'\n },\n title: 'Find Appointment',\n toggle: true\n },\n resetButton: {\n label: 'Reset Filters'\n }\n }}\n headline={{\n level: 'h1',\n style: 'h1',\n text: 'Search'\n }}\n searchFilter={{\n categories: [\n {\n amount: 10,\n title: 'Pages',\n url: '#'\n },\n {\n amount: 5,\n title: 'News',\n url: '#'\n },\n {\n amount: 2,\n title: 'Blog Posts',\n url: '#'\n }\n ],\n title: 'Search Filters'\n }}\n searchResults={[\n {\n initialMatch: 'Embracing a **sustainable** lifestyle can significantly reduce your environmental impact.',\n matches: [\n {\n snippet: 'Simple changes can make your home more **sustainable** and energy-efficient.',\n title: 'Home',\n url: '#'\n },\n {\n snippet: 'Adopting a **sustainable** lifestyle benefits both you and the planet.',\n title: 'Lifestyle',\n url: '#'\n }\n ],\n previewImage: {\n src: 'img/people-brainstorming-work-meeting.png'\n },\n title: 'Sustainable Living: Everyday Tips',\n url: 'www.example.com/lifestyle/sustainable-living'\n },\n {\n
|
|
1195
|
+
"code": "<Search\n events={[\n {\n category: 'Buyers',\n ctaText: 'Show event',\n date: 'FRI, JAN 16',\n image: {\n alt: 'This is an image of a flower',\n src: 'https://picsum.photos/seed/flower/800/600'\n },\n location: {\n address: 'Köln',\n name: 'Stadthalle'\n },\n tags: [\n 'AI'\n ],\n text: 'The Future of AI is here and now - Join us to explore the latest advancements in artificial intelligence. The Future of AI is here and now - Join us to explore the latest advancements in artificial intelligence.',\n time: '10:00',\n title: 'This is a event teaser title',\n url: 'https://example.com'\n },\n {\n category: 'Buyers',\n ctaText: 'Show event',\n date: 'FRI, JAN 16',\n image: {\n alt: 'This is an image of a flower',\n src: 'https://picsum.photos/seed/flower/800/600'\n },\n location: {\n address: 'Köln',\n name: 'Stadthalle'\n },\n tags: [\n 'AI'\n ],\n text: 'The Future of AI is here and now - Join us to explore the latest advancements in artificial intelligence. The Future of AI is here and now - Join us to explore the latest advancements in artificial intelligence.',\n time: '10:00',\n title: 'This is a event teaser title',\n url: 'https://example.com'\n },\n {\n category: 'Buyers',\n ctaText: 'Show event',\n date: 'FRI, JAN 16',\n image: {\n alt: 'This is an image of a flower',\n src: 'https://picsum.photos/seed/flower/800/600'\n },\n location: {\n address: 'Köln',\n name: 'Stadthalle'\n },\n tags: [\n 'AI'\n ],\n text: 'The Future of AI is here and now - Join us to explore the latest advancements in artificial intelligence. The Future of AI is here and now - Join us to explore the latest advancements in artificial intelligence.',\n time: '10:00',\n title: 'This is a event teaser title',\n url: 'https://example.com'\n }\n ]}\n filter={{\n applyButton: {\n label: 'Filter Appointments'\n },\n categories: {\n categoryCheckboxes: [\n 'Category Filter',\n 'Category Filter',\n 'Category Filter'\n ],\n title: 'Categories',\n toggle: true\n },\n datePicker: {\n dateFromInput: {\n label: 'From',\n placeholder: 'Select a date'\n },\n dateToInput: {\n label: 'To',\n placeholder: 'Select a date'\n },\n title: 'Find Appointment',\n toggle: true\n },\n resetButton: {\n label: 'Reset Filters'\n }\n }}\n headline={{\n level: 'h1',\n style: 'h1',\n text: 'Search'\n }}\n searchFilter={{\n categories: [\n {\n amount: 10,\n title: 'Pages',\n url: '#'\n },\n {\n amount: 5,\n title: 'News',\n url: '#'\n },\n {\n amount: 2,\n title: 'Blog Posts',\n url: '#'\n }\n ],\n title: 'Search Filters'\n }}\n searchResults={[\n {\n initialMatch: 'Embracing a **sustainable** lifestyle can significantly reduce your environmental impact. From using energy-efficient appliances to adopting renewable energy sources, every small step counts towards a greener future.',\n matches: [\n {\n snippet: 'Simple changes can make your home more **sustainable** and energy-efficient.',\n title: 'Home',\n url: '#'\n },\n {\n snippet: 'Adopting a **sustainable** lifestyle benefits both you and the planet.',\n title: 'Lifestyle',\n url: '#'\n }\n ],\n previewImage: {\n src: 'img/people-brainstorming-work-meeting.png'\n },\n title: 'Sustainable Living: Everyday Tips',\n url: 'www.example.com/lifestyle/sustainable-living'\n },\n {\n initialMatch: 'Discover how **sustainable** design is shaping the future of urban development, from green buildings to eco-friendly materials. Research shows that **sustainable** architecture not only benefits the environment but also enhances the well-being of its occupants.',\n previewImage: {\n large: true,\n src: 'img/full-shot-different-people-working-together.png'\n },\n title: 'Sustainable Architecture Trends',\n url: 'www.example.com/architecture/sustainable-trends'\n },\n {\n matches: [\n {\n snippet: 'A **sustainable** business model focuses on long-term growth and environmental responsibility.',\n title: 'Getting Started',\n url: '#'\n },\n {\n snippet: 'Explore examples of companies that have adopted **sustainable** practices successfully.',\n title: 'Case Studies',\n url: '#'\n },\n {\n snippet: 'Using **sustainable** materials can significantly reduce a building’s carbon footprint.',\n title: 'Materials',\n url: '#'\n }\n ],\n title: 'How to Build a Sustainable Business',\n url: 'www.example.com/business/sustainable-model'\n },\n {\n initialMatch: 'Embracing a **sustainable** lifestyle can significantly reduce your environmental impact. From using energy-efficient appliances to adopting renewable energy sources, every small step counts towards a greener future.',\n matches: [\n {\n snippet: 'A **sustainable** business model focuses on long-term growth and environmental responsibility.',\n title: 'Getting Started',\n url: '#'\n },\n {\n snippet: 'Explore examples of companies that have adopted **sustainable** practices successfully.',\n title: 'Case Studies',\n url: '#'\n },\n {\n snippet: 'Using **sustainable** materials can significantly reduce a building’s carbon footprint.',\n title: 'Materials',\n url: '#'\n }\n ],\n previewImage: {\n large: true,\n src: 'img/full-shot-different-people-working-together.png'\n },\n title: 'Sustainable Living: Everyday Tips',\n url: 'www.example.com/business/sustainable-model'\n }\n ]}\n/>",
|
|
1196
1196
|
"args": {
|
|
1197
1197
|
"filter": {
|
|
1198
1198
|
"datePicker": {
|
|
@@ -1316,7 +1316,7 @@
|
|
|
1316
1316
|
"previewImage": {
|
|
1317
1317
|
"src": "img/people-brainstorming-work-meeting.png"
|
|
1318
1318
|
},
|
|
1319
|
-
"initialMatch": "Embracing a **sustainable** lifestyle can significantly reduce your environmental impact.",
|
|
1319
|
+
"initialMatch": "Embracing a **sustainable** lifestyle can significantly reduce your environmental impact. From using energy-efficient appliances to adopting renewable energy sources, every small step counts towards a greener future.",
|
|
1320
1320
|
"matches": [
|
|
1321
1321
|
{
|
|
1322
1322
|
"title": "Home",
|
|
@@ -1337,17 +1337,37 @@
|
|
|
1337
1337
|
"large": true,
|
|
1338
1338
|
"src": "img/full-shot-different-people-working-together.png"
|
|
1339
1339
|
},
|
|
1340
|
+
"initialMatch": "Discover how **sustainable** design is shaping the future of urban development, from green buildings to eco-friendly materials. Research shows that **sustainable** architecture not only benefits the environment but also enhances the well-being of its occupants.",
|
|
1341
|
+
"url": "www.example.com/architecture/sustainable-trends"
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
"title": "How to Build a Sustainable Business",
|
|
1340
1345
|
"matches": [
|
|
1341
1346
|
{
|
|
1342
|
-
"title": "
|
|
1343
|
-
"snippet": "
|
|
1347
|
+
"title": "Getting Started",
|
|
1348
|
+
"snippet": "A **sustainable** business model focuses on long-term growth and environmental responsibility.",
|
|
1349
|
+
"url": "#"
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
"title": "Case Studies",
|
|
1353
|
+
"snippet": "Explore examples of companies that have adopted **sustainable** practices successfully.",
|
|
1354
|
+
"url": "#"
|
|
1355
|
+
},
|
|
1356
|
+
{
|
|
1357
|
+
"title": "Materials",
|
|
1358
|
+
"snippet": "Using **sustainable** materials can significantly reduce a building’s carbon footprint.",
|
|
1344
1359
|
"url": "#"
|
|
1345
1360
|
}
|
|
1346
1361
|
],
|
|
1347
|
-
"url": "www.example.com/
|
|
1362
|
+
"url": "www.example.com/business/sustainable-model"
|
|
1348
1363
|
},
|
|
1349
1364
|
{
|
|
1350
|
-
"title": "
|
|
1365
|
+
"title": "Sustainable Living: Everyday Tips",
|
|
1366
|
+
"previewImage": {
|
|
1367
|
+
"large": true,
|
|
1368
|
+
"src": "img/full-shot-different-people-working-together.png"
|
|
1369
|
+
},
|
|
1370
|
+
"initialMatch": "Embracing a **sustainable** lifestyle can significantly reduce your environmental impact. From using energy-efficient appliances to adopting renewable energy sources, every small step counts towards a greener future.",
|
|
1351
1371
|
"matches": [
|
|
1352
1372
|
{
|
|
1353
1373
|
"title": "Getting Started",
|
|
@@ -3972,7 +3992,7 @@
|
|
|
3972
3992
|
"id": "corporate-search-result--default",
|
|
3973
3993
|
"group": "Corporate / Search Result",
|
|
3974
3994
|
"name": "Default",
|
|
3975
|
-
"code": "<SearchResult\n
|
|
3995
|
+
"code": "<SearchResult\n initialMatch=\"Embracing a **sustainable** lifestyle can significantly reduce your environmental impact. From using energy-efficient appliances to adopting renewable energy sources, every small step counts towards a greener future.\"\n matches={[\n {\n snippet: 'Learn how leading companies are integrating **sustainability** into their core strategies.',\n title: 'Keynote: Embracing Sustainability',\n url: '#'\n },\n {\n snippet: 'Business models that prioritize **sustainability** are shared by industry experts in this session.',\n title: 'Panel: Sustainability in Practice',\n url: '#'\n },\n {\n snippet: 'In your organization, **sustainability** can be assessed using new tools and techniques.',\n title: 'Workshop: Measuring Sustainability',\n url: '#'\n }\n ]}\n previewImage={{\n large: false,\n src: 'img/full-shot-different-people-working-together.png'\n }}\n showLink\n title=\"GreenTech Summit 2023\"\n url=\"https://www.example.com/greentech-summit-2023\"\n/>",
|
|
3976
3996
|
"args": {
|
|
3977
3997
|
"url": "https://www.example.com/greentech-summit-2023",
|
|
3978
3998
|
"title": "GreenTech Summit 2023",
|
|
@@ -3998,7 +4018,7 @@
|
|
|
3998
4018
|
}
|
|
3999
4019
|
],
|
|
4000
4020
|
"showLink": true,
|
|
4001
|
-
"
|
|
4021
|
+
"initialMatch": "Embracing a **sustainable** lifestyle can significantly reduce your environmental impact. From using energy-efficient appliances to adopting renewable energy sources, every small step counts towards a greener future."
|
|
4002
4022
|
},
|
|
4003
4023
|
"screenshot": "img/screenshots/corporate-search-result--default.png"
|
|
4004
4024
|
},
|
|
@@ -8,7 +8,7 @@ import { FC, PropsWithChildren } from "react";
|
|
|
8
8
|
import { HeadlineProps } from "../../HeadlineProps-e1305784.js";
|
|
9
9
|
import { SearchBarProps } from "../../SearchBarProps-26263244.js";
|
|
10
10
|
import { SearchFilterProps } from "../../SearchFilterProps-2fa6419b.js";
|
|
11
|
-
import { SearchResultProps } from "../../SearchResultProps-
|
|
11
|
+
import { SearchResultProps } from "../../SearchResultProps-a4d09722.js";
|
|
12
12
|
interface SearchProps {
|
|
13
13
|
/**
|
|
14
14
|
* Referenced component HeadlineProps
|
|
@@ -17,6 +17,8 @@ import '../../helpers-12f48df8.js';
|
|
|
17
17
|
import 'markdown-to-jsx';
|
|
18
18
|
import '@kickstartds/base/lib/link';
|
|
19
19
|
import '@kickstartds/base/lib/picture';
|
|
20
|
+
import '@kickstartds/core/lib/container';
|
|
21
|
+
import '../search-result-match/index.js';
|
|
20
22
|
import '@kickstartds/base/lib/icon';
|
|
21
23
|
import '@kickstartds/form/lib/text-field';
|
|
22
24
|
import '@kickstartds/base/lib/headline';
|
|
@@ -254,6 +254,9 @@
|
|
|
254
254
|
"type": "array",
|
|
255
255
|
"description": "An array of search matches.",
|
|
256
256
|
"items": {
|
|
257
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
258
|
+
"$id": "http://schema.mydesignsystem.com/search-result-match.schema.json",
|
|
259
|
+
"title": "Search Result Match",
|
|
257
260
|
"type": "object",
|
|
258
261
|
"properties": {
|
|
259
262
|
"title": {
|
|
@@ -12,6 +12,8 @@ import '@kickstartds/base/lib/link';
|
|
|
12
12
|
import '../../helpers-12f48df8.js';
|
|
13
13
|
import '@kickstartds/base/lib/rich-text';
|
|
14
14
|
import '@kickstartds/base/lib/picture';
|
|
15
|
+
import '@kickstartds/core/lib/container';
|
|
16
|
+
import '../search-result-match/index.js';
|
|
15
17
|
import '@kickstartds/core/lib/component';
|
|
16
18
|
|
|
17
19
|
const SearchForm = ({ className, component = "dsa.search-form", ...props }) => (jsxs("form", { className: classnames("dsa-search-form", className), "ks-component": component, ...props, children: [jsx(SearchBar, { alternativeText: "", alternativeResult: "", hint: "" }), jsx("li", { "data-template": "result", hidden: true, children: jsx(SearchResult, {}) }), jsx("ol", { className: "dsa-search-form__results" })] }));
|
|
@@ -20,6 +20,8 @@ import '@kickstartds/base/lib/link';
|
|
|
20
20
|
import '../search-result/index.js';
|
|
21
21
|
import '@kickstartds/base/lib/rich-text';
|
|
22
22
|
import '@kickstartds/base/lib/picture';
|
|
23
|
+
import '@kickstartds/core/lib/container';
|
|
24
|
+
import '../search-result-match/index.js';
|
|
23
25
|
import '../search-form/SearchForm.client.js';
|
|
24
26
|
|
|
25
27
|
const SearchModal = ({ headline = "Search", closeAriaLabel = "close", formComponent, }) => (jsx("dialog", { "ks-component": "dsa.search-modal", className: "dsa-search-modal", children: jsx(Section, { headline: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SearchResultProps } from "../../SearchResultProps-
|
|
2
|
+
import { SearchResultProps } from "../../SearchResultProps-a4d09722.js";
|
|
3
3
|
declare const SearchResultContextDefault: import("react").ForwardRefExoticComponent<SearchResultProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
4
|
declare const SearchResultContext: import("react").Context<import("react").ForwardRefExoticComponent<SearchResultProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
5
5
|
declare const SearchResult: import("react").ForwardRefExoticComponent<SearchResultProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import "./search-result.css";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef, createContext, useContext } from 'react';
|
|
4
4
|
import { Link } from '@kickstartds/base/lib/link';
|
|
5
5
|
import { RichText } from '@kickstartds/base/lib/rich-text';
|
|
6
6
|
import { d as deepMergeDefaults } from '../../helpers-12f48df8.js';
|
|
7
7
|
import classnames from 'classnames';
|
|
8
8
|
import { Picture } from '@kickstartds/base/lib/picture';
|
|
9
|
-
import {
|
|
9
|
+
import { Container } from '@kickstartds/core/lib/container';
|
|
10
|
+
import { SearchResultMatch } from '../search-result-match/index.js';
|
|
11
|
+
import '@kickstartds/base/lib/icon';
|
|
10
12
|
|
|
11
13
|
const defaults = {
|
|
12
14
|
"previewImage": {
|
|
@@ -16,9 +18,9 @@ const defaults = {
|
|
|
16
18
|
"showLink": true
|
|
17
19
|
};
|
|
18
20
|
|
|
19
|
-
const SearchResultContextDefault = forwardRef(({ title, previewImage, initialMatch, matches, url, showLink }, ref) => (jsxs("div", { ref: ref, className: classnames("dsa-search-result", {
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
const SearchResultContextDefault = forwardRef(({ title, previewImage, initialMatch, matches, url, showLink }, ref) => (jsx(Container, { name: "search-result", children: jsxs("div", { ref: ref, className: classnames("dsa-search-result", {
|
|
22
|
+
"dsa-search-result--image-large": previewImage?.large,
|
|
23
|
+
}), children: [jsxs("div", { className: "dsa-search-result__content", children: [jsx("div", { className: "dsa-search-result__header", children: jsx(Link, { href: url, className: "dsa-search-result__title", children: title }) }), initialMatch && (jsx(RichText, { text: initialMatch, className: "dsa-search-result__initial-match" })), matches && matches.length > 0 && (jsx("div", { className: "dsa-search-result__matches", children: matches.map((match, index) => (jsx(SearchResultMatch, { ...match }, index))) })), showLink && (jsx(Link, { href: url, className: "dsa-search-result__link", children: url }))] }), previewImage?.src && (jsx(Link, { tabIndex: -1, "aria-hidden": true, href: url, className: "dsa-search-result__preview-image-wrapper", children: jsx(Picture, { src: previewImage?.src, alt: "", className: "dsa-search-result__preview-image" }) }))] }) })));
|
|
22
24
|
const SearchResultContext = createContext(SearchResultContextDefault);
|
|
23
25
|
const SearchResult = forwardRef((props, ref) => {
|
|
24
26
|
const Component = useContext(SearchResultContext);
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
.l-container--search-result {
|
|
2
|
+
/* stylelint-disable-next-line property-no-unknown */
|
|
3
|
+
container-name: search-result;
|
|
4
|
+
}
|
|
5
|
+
|
|
1
6
|
.dsa-search-result {
|
|
2
7
|
--g-link--border-radius: var(--ks-border-radius-card);
|
|
3
8
|
--g-link--text-decoration: none;
|
|
4
9
|
--g-link--text-decoration-hover: none;
|
|
5
10
|
display: flex;
|
|
6
|
-
flex-wrap: wrap;
|
|
7
11
|
gap: var(--ks-spacing-stack-m) var(--ks-spacing-inline-m);
|
|
8
12
|
}
|
|
9
13
|
.dsa-search-result .l-container {
|
|
@@ -15,46 +19,35 @@
|
|
|
15
19
|
.dsa-search-result__content {
|
|
16
20
|
display: flex;
|
|
17
21
|
flex-direction: column;
|
|
18
|
-
gap: var(--ks-spacing-stack-
|
|
22
|
+
gap: var(--ks-spacing-stack-xs);
|
|
19
23
|
flex-basis: var(--dsa-tile--width_medium);
|
|
20
24
|
flex-grow: 1;
|
|
21
25
|
}
|
|
22
|
-
.dsa-search-result__header {
|
|
23
|
-
display: block;
|
|
24
|
-
width: fit-content;
|
|
25
|
-
}
|
|
26
26
|
.dsa-search-result__link {
|
|
27
|
-
|
|
28
|
-
font: var(--ks-font-interface-
|
|
29
|
-
color: var(--ks-
|
|
30
|
-
}
|
|
31
|
-
.dsa-search-result__initial-match {
|
|
32
|
-
padding-bottom: var(--ks-spacing-stack-s);
|
|
33
|
-
}
|
|
34
|
-
.dsa-search-result__match {
|
|
35
|
-
--g-link--border-radius: 0;
|
|
36
|
-
font: var(--ks-font-interface-m);
|
|
37
|
-
padding: var(--ks-spacing-stack-s) 0;
|
|
38
|
-
border-top: 1px solid var(--ks-border-color-default);
|
|
39
|
-
display: block;
|
|
40
|
-
}
|
|
41
|
-
.dsa-search-result__match:last-child {
|
|
42
|
-
padding-bottom: 0;
|
|
27
|
+
width: fit-content;
|
|
28
|
+
font: var(--ks-font-interface-s);
|
|
29
|
+
color: var(--ks-color-fg-alpha-4);
|
|
43
30
|
}
|
|
44
|
-
.dsa-search-
|
|
45
|
-
|
|
31
|
+
.dsa-search-result__matches {
|
|
32
|
+
padding: var(--ks-spacing-xxs) 0;
|
|
46
33
|
}
|
|
47
34
|
.dsa-search-result__title {
|
|
48
35
|
font-size: var(--ks-font-size-display-l);
|
|
49
36
|
font-family: var(--ks-font-family-display);
|
|
50
37
|
line-height: var(--ks-line-height-display-m);
|
|
51
38
|
}
|
|
52
|
-
.dsa-search-
|
|
53
|
-
|
|
39
|
+
.dsa-search-result__preview-image-wrapper {
|
|
40
|
+
height: fit-content;
|
|
54
41
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
42
|
+
@media (max-width: 980px) {
|
|
43
|
+
.dsa-search-result__preview-image-wrapper {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
@container search-result (min-width: 640px) {
|
|
47
|
+
.dsa-search-result__preview-image-wrapper {
|
|
48
|
+
display: block;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
58
51
|
}
|
|
59
52
|
.dsa-search-result__preview-image {
|
|
60
53
|
width: 100%;
|
|
@@ -47,6 +47,9 @@
|
|
|
47
47
|
"type": "array",
|
|
48
48
|
"description": "An array of search matches.",
|
|
49
49
|
"items": {
|
|
50
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
51
|
+
"$id": "http://schema.mydesignsystem.com/search-result-match.schema.json",
|
|
52
|
+
"title": "Search Result Match",
|
|
50
53
|
"type": "object",
|
|
51
54
|
"properties": {
|
|
52
55
|
"title": {
|
|
@@ -42,31 +42,7 @@
|
|
|
42
42
|
"type": "array",
|
|
43
43
|
"description": "An array of search matches.",
|
|
44
44
|
"items": {
|
|
45
|
-
"
|
|
46
|
-
"properties": {
|
|
47
|
-
"title": {
|
|
48
|
-
"title": "Title",
|
|
49
|
-
"type": "string",
|
|
50
|
-
"description": "The title of the match.",
|
|
51
|
-
"examples": ["Panel Discussion: Ethics in AI"]
|
|
52
|
-
},
|
|
53
|
-
"snippet": {
|
|
54
|
-
"title": "Text",
|
|
55
|
-
"type": "string",
|
|
56
|
-
"description": "The main content or description of the search result.",
|
|
57
|
-
"examples": [
|
|
58
|
-
"Experts debate the ethical challenges and responsibilities of deploying AI technologies."
|
|
59
|
-
]
|
|
60
|
-
},
|
|
61
|
-
"url": {
|
|
62
|
-
"title": "URL",
|
|
63
|
-
"type": "string",
|
|
64
|
-
"description": "A URL linking to the specific match or more information.",
|
|
65
|
-
"examples": [
|
|
66
|
-
"https://www.example.com/ai-conference-2023/panel-discussion"
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
}
|
|
45
|
+
"$ref": "http://schema.mydesignsystem.com/search-result-match.schema.json"
|
|
70
46
|
}
|
|
71
47
|
},
|
|
72
48
|
"showLink": {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SearchResultMatchProps } from "../../SearchResultMatchProps-777cd47c.js";
|
|
3
|
+
declare const SearchResultMatchContextDefault: import("react").ForwardRefExoticComponent<SearchResultMatchProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
4
|
+
declare const SearchResultMatchContext: import("react").Context<import("react").ForwardRefExoticComponent<SearchResultMatchProps & import("react").RefAttributes<HTMLAnchorElement>>>;
|
|
5
|
+
declare const SearchResultMatch: import("react").ForwardRefExoticComponent<SearchResultMatchProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
6
|
+
export type { SearchResultMatchProps };
|
|
7
|
+
export { SearchResultMatchContextDefault, SearchResultMatchContext, SearchResultMatch };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "./search-result-match.css";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef, createContext, useContext } from 'react';
|
|
4
|
+
import { Link } from '@kickstartds/base/lib/link';
|
|
5
|
+
import { RichText } from '@kickstartds/base/lib/rich-text';
|
|
6
|
+
import { d as deepMergeDefaults } from '../../helpers-12f48df8.js';
|
|
7
|
+
import { Icon } from '@kickstartds/base/lib/icon';
|
|
8
|
+
|
|
9
|
+
const defaults = {};
|
|
10
|
+
|
|
11
|
+
const SearchResultMatchContextDefault = forwardRef(({ title, snippet, url }, ref) => (jsxs(Link, { ref: ref, href: url, className: "dsa-search-result-match", children: [jsxs("div", { className: "dsa-search-result-match__title", children: [jsx(Icon, { className: "dsa-search-result-match__chevron", icon: "chevron-right" }), title] }), jsx(RichText, { text: snippet, className: "dsa-search-result-match__snippet" })] })));
|
|
12
|
+
const SearchResultMatchContext = createContext(SearchResultMatchContextDefault);
|
|
13
|
+
const SearchResultMatch = forwardRef((props, ref) => {
|
|
14
|
+
const Component = useContext(SearchResultMatchContext);
|
|
15
|
+
return jsx(Component, { ...deepMergeDefaults(defaults, props), ref: ref });
|
|
16
|
+
});
|
|
17
|
+
SearchResultMatch.displayName = "SearchResultMatch";
|
|
18
|
+
|
|
19
|
+
export { SearchResultMatch, SearchResultMatchContext, SearchResultMatchContextDefault };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.dsa-search-result-match {
|
|
2
|
+
--g-link--border-radius: 0;
|
|
3
|
+
font: var(--ks-font-interface-m);
|
|
4
|
+
padding: var(--ks-spacing-stack-s) 0;
|
|
5
|
+
border-top: 1px solid var(--ks-border-color-default);
|
|
6
|
+
display: block;
|
|
7
|
+
}
|
|
8
|
+
.dsa-search-result-match__snippet {
|
|
9
|
+
font: var(--ks-font-copy-m);
|
|
10
|
+
}
|
|
11
|
+
.dsa-search-result-match__chevron {
|
|
12
|
+
width: 1em;
|
|
13
|
+
height: 1em;
|
|
14
|
+
}
|
|
15
|
+
.dsa-search-result-match:last-child {
|
|
16
|
+
border-bottom: 1px solid var(--ks-border-color-default);
|
|
17
|
+
}
|
|
18
|
+
.dsa-search-result-match .l-container--rich-text {
|
|
19
|
+
margin-left: 1em;
|
|
20
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "http://schema.mydesignsystem.com/search-result-match.schema.json",
|
|
4
|
+
"title": "Search Result Match",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"title": {
|
|
8
|
+
"title": "Title",
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The title of the match.",
|
|
11
|
+
"examples": [
|
|
12
|
+
"Panel Discussion: Ethics in AI"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"snippet": {
|
|
16
|
+
"title": "Text",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The main content or description of the search result.",
|
|
19
|
+
"examples": [
|
|
20
|
+
"Experts debate the ethical challenges and responsibilities of deploying AI technologies."
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"url": {
|
|
24
|
+
"title": "URL",
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "A URL linking to the specific match or more information.",
|
|
27
|
+
"examples": [
|
|
28
|
+
"https://www.example.com/ai-conference-2023/panel-discussion"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"additionalProperties": false
|
|
33
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "http://schema.mydesignsystem.com/search-result-match.schema.json",
|
|
4
|
+
"title": "Search Result Match",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"title": {
|
|
8
|
+
"title": "Title",
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The title of the match.",
|
|
11
|
+
"examples": ["Panel Discussion: Ethics in AI"]
|
|
12
|
+
},
|
|
13
|
+
"snippet": {
|
|
14
|
+
"title": "Text",
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "The main content or description of the search result.",
|
|
17
|
+
"examples": [
|
|
18
|
+
"Experts debate the ethical challenges and responsibilities of deploying AI technologies."
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"url": {
|
|
22
|
+
"title": "URL",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "A URL linking to the specific match or more information.",
|
|
25
|
+
"examples": [
|
|
26
|
+
"https://www.example.com/ai-conference-2023/panel-discussion"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"additionalProperties": false
|
|
31
|
+
}
|
package/dist/tokens/themes.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on Fri, 05 Sep 2025
|
|
3
|
+
* Generated on Fri, 05 Sep 2025 10:45:57 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root [ks-theme=business] {
|
|
6
6
|
--ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
|
|
@@ -2727,7 +2727,7 @@
|
|
|
2727
2727
|
}
|
|
2728
2728
|
/**
|
|
2729
2729
|
* Do not edit directly
|
|
2730
|
-
* Generated on Fri, 05 Sep 2025
|
|
2730
|
+
* Generated on Fri, 05 Sep 2025 10:46:01 GMT
|
|
2731
2731
|
*/
|
|
2732
2732
|
:root [ks-theme=google] {
|
|
2733
2733
|
--ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
|
|
@@ -5458,7 +5458,7 @@
|
|
|
5458
5458
|
}
|
|
5459
5459
|
/**
|
|
5460
5460
|
* Do not edit directly
|
|
5461
|
-
* Generated on Fri, 05 Sep 2025
|
|
5461
|
+
* Generated on Fri, 05 Sep 2025 10:45:59 GMT
|
|
5462
5462
|
*/
|
|
5463
5463
|
:root [ks-theme=ngo] {
|
|
5464
5464
|
--ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
|
|
@@ -8459,7 +8459,7 @@
|
|
|
8459
8459
|
}
|
|
8460
8460
|
/**
|
|
8461
8461
|
* Do not edit directly
|
|
8462
|
-
* Generated on Fri, 05 Sep 2025
|
|
8462
|
+
* Generated on Fri, 05 Sep 2025 10:46:03 GMT
|
|
8463
8463
|
*/
|
|
8464
8464
|
:root [ks-theme=telekom] {
|
|
8465
8465
|
--ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
|
package/dist/tokens/tokens.css
CHANGED
package/dist/tokens/tokens.js
CHANGED