@homotechsual/docusaurus-plugin-showcase 0.1.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/CHANGELOG.md +13 -0
- package/LICENSE +13 -0
- package/README.md +93 -0
- package/lib/core/module-generator.d.ts +3 -0
- package/lib/core/module-generator.d.ts.map +1 -0
- package/lib/core/module-generator.js +14 -0
- package/lib/core/module-generator.js.map +1 -0
- package/lib/core/types.d.ts +43 -0
- package/lib/core/types.d.ts.map +1 -0
- package/lib/core/types.js +2 -0
- package/lib/core/types.js.map +1 -0
- package/lib/core/utils.d.ts +3 -0
- package/lib/core/utils.d.ts.map +1 -0
- package/lib/core/utils.js +22 -0
- package/lib/core/utils.js.map +1 -0
- package/lib/icons/CircleCheck.d.ts +7 -0
- package/lib/icons/CircleCheck.d.ts.map +1 -0
- package/lib/icons/CircleCheck.js +5 -0
- package/lib/icons/CircleCheck.js.map +1 -0
- package/lib/icons/CircleMinus.d.ts +7 -0
- package/lib/icons/CircleMinus.d.ts.map +1 -0
- package/lib/icons/CircleMinus.js +5 -0
- package/lib/icons/CircleMinus.js.map +1 -0
- package/lib/icons/CircleX.d.ts +7 -0
- package/lib/icons/CircleX.d.ts.map +1 -0
- package/lib/icons/CircleX.js +5 -0
- package/lib/icons/CircleX.js.map +1 -0
- package/lib/icons/Docusaurus.d.ts +7 -0
- package/lib/icons/Docusaurus.d.ts.map +1 -0
- package/lib/icons/Docusaurus.js +5 -0
- package/lib/icons/Docusaurus.js.map +1 -0
- package/lib/icons/Heart.d.ts +7 -0
- package/lib/icons/Heart.d.ts.map +1 -0
- package/lib/icons/Heart.js +5 -0
- package/lib/icons/Heart.js.map +1 -0
- package/lib/icons/PlusSquare.d.ts +7 -0
- package/lib/icons/PlusSquare.d.ts.map +1 -0
- package/lib/icons/PlusSquare.js +5 -0
- package/lib/icons/PlusSquare.js.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/loaders/yaml.d.ts +7 -0
- package/lib/loaders/yaml.d.ts.map +1 -0
- package/lib/loaders/yaml.js +73 -0
- package/lib/loaders/yaml.js.map +1 -0
- package/lib/plugin.d.ts +6 -0
- package/lib/plugin.d.ts.map +1 -0
- package/lib/plugin.js +45 -0
- package/lib/plugin.js.map +1 -0
- package/lib/presets/index.d.ts +3 -0
- package/lib/presets/index.d.ts.map +1 -0
- package/lib/presets/index.js +3 -0
- package/lib/presets/index.js.map +1 -0
- package/lib/presets/plugins.d.ts +3 -0
- package/lib/presets/plugins.d.ts.map +1 -0
- package/lib/presets/plugins.js +93 -0
- package/lib/presets/plugins.js.map +1 -0
- package/lib/presets/sites.d.ts +3 -0
- package/lib/presets/sites.d.ts.map +1 -0
- package/lib/presets/sites.js +63 -0
- package/lib/presets/sites.js.map +1 -0
- package/lib/theme/ShowcaseCard/index.d.ts +9 -0
- package/lib/theme/ShowcaseCard/index.d.ts.map +1 -0
- package/lib/theme/ShowcaseCard/index.js +29 -0
- package/lib/theme/ShowcaseCard/index.js.map +1 -0
- package/lib/theme/ShowcaseCard/styles.module.css +118 -0
- package/lib/theme/ShowcaseFilterToggle/index.d.ts +5 -0
- package/lib/theme/ShowcaseFilterToggle/index.d.ts.map +1 -0
- package/lib/theme/ShowcaseFilterToggle/index.js +24 -0
- package/lib/theme/ShowcaseFilterToggle/index.js.map +1 -0
- package/lib/theme/ShowcaseFilterToggle/styles.module.css +62 -0
- package/lib/theme/ShowcaseFilters/index.d.ts +13 -0
- package/lib/theme/ShowcaseFilters/index.d.ts.map +1 -0
- package/lib/theme/ShowcaseFilters/index.js +86 -0
- package/lib/theme/ShowcaseFilters/index.js.map +1 -0
- package/lib/theme/ShowcaseFilters/styles.module.css +62 -0
- package/lib/theme/ShowcasePage/index.d.ts +8 -0
- package/lib/theme/ShowcasePage/index.d.ts.map +1 -0
- package/lib/theme/ShowcasePage/index.js +30 -0
- package/lib/theme/ShowcasePage/index.js.map +1 -0
- package/lib/theme/ShowcasePage/styles.module.css +38 -0
- package/lib/theme/ShowcaseStatusSelect/index.d.ts +11 -0
- package/lib/theme/ShowcaseStatusSelect/index.d.ts.map +1 -0
- package/lib/theme/ShowcaseStatusSelect/index.js +23 -0
- package/lib/theme/ShowcaseStatusSelect/index.js.map +1 -0
- package/lib/theme/ShowcaseStatusSelect/styles.module.css +44 -0
- package/lib/theme/ShowcaseTagSelect/index.d.ts +11 -0
- package/lib/theme/ShowcaseTagSelect/index.d.ts.map +1 -0
- package/lib/theme/ShowcaseTagSelect/index.js +23 -0
- package/lib/theme/ShowcaseTagSelect/index.js.map +1 -0
- package/lib/theme/ShowcaseTagSelect/styles.module.css +44 -0
- package/lib/theme/ShowcaseTooltip/index.d.ts +10 -0
- package/lib/theme/ShowcaseTooltip/index.d.ts.map +1 -0
- package/lib/theme/ShowcaseTooltip/index.js +23 -0
- package/lib/theme/ShowcaseTooltip/index.js.map +1 -0
- package/lib/theme/icons.d.ts +9 -0
- package/lib/theme/icons.d.ts.map +1 -0
- package/lib/theme/icons.js +20 -0
- package/lib/theme/icons.js.map +1 -0
- package/package.json +91 -0
- package/schema/plugins-preset/1.0.0.json +43 -0
- package/schema/showcase/1.0.0.json +58 -0
- package/schema/sites-preset/1.0.0.json +42 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { dirname, join } from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
export const pluginsPreset = {
|
|
4
|
+
favouriteTag: 'favourite',
|
|
5
|
+
schemaPath: join(dirname(fileURLToPath(import.meta.url)), '../../schema/plugins-preset/1.0.0.json'),
|
|
6
|
+
pageTitle: 'Docusaurus Plugin Directory',
|
|
7
|
+
pageDescription: 'A community-sourced list of plugins for Docusaurus',
|
|
8
|
+
tags: {
|
|
9
|
+
favourite: {
|
|
10
|
+
label: 'Favourite',
|
|
11
|
+
description: 'Our favourite Docusaurus plugins you should check out!',
|
|
12
|
+
color: '#e9669e',
|
|
13
|
+
icon: 'heart',
|
|
14
|
+
},
|
|
15
|
+
docusaurus: {
|
|
16
|
+
label: 'Docusaurus',
|
|
17
|
+
description: 'Docusaurus core / official plugins.',
|
|
18
|
+
color: '#3ecc5f',
|
|
19
|
+
icon: 'docusaurus',
|
|
20
|
+
},
|
|
21
|
+
search: {
|
|
22
|
+
label: 'Search',
|
|
23
|
+
description: 'Plugins implementing search functionality.',
|
|
24
|
+
color: '#ca3c25',
|
|
25
|
+
},
|
|
26
|
+
api: {
|
|
27
|
+
label: 'API',
|
|
28
|
+
description: 'Plugins for API documentation and testing.',
|
|
29
|
+
color: '#e6af2e',
|
|
30
|
+
},
|
|
31
|
+
utility: {
|
|
32
|
+
label: 'Utility',
|
|
33
|
+
description: 'Utility plugins such as analytics, SASS support, etc.',
|
|
34
|
+
color: '#baff29',
|
|
35
|
+
},
|
|
36
|
+
content: {
|
|
37
|
+
label: 'Content',
|
|
38
|
+
description: 'Plugins providing content enhancements.',
|
|
39
|
+
color: '#820b8a',
|
|
40
|
+
},
|
|
41
|
+
theme: {
|
|
42
|
+
label: 'Theme',
|
|
43
|
+
description: 'Plugins implementing themes or significant theme enhancements.',
|
|
44
|
+
color: '#7eb2dd',
|
|
45
|
+
},
|
|
46
|
+
markdown: {
|
|
47
|
+
label: 'Markdown',
|
|
48
|
+
description: 'Plugins implementing new markdown features.',
|
|
49
|
+
color: '#49d49d',
|
|
50
|
+
},
|
|
51
|
+
analytics: {
|
|
52
|
+
label: 'Analytics',
|
|
53
|
+
description: 'Plugins implementing analytics (Plausible, Matomo, etc.).',
|
|
54
|
+
color: '#b892ff',
|
|
55
|
+
},
|
|
56
|
+
integration: {
|
|
57
|
+
label: 'Integration',
|
|
58
|
+
description: 'Plugins integrating with external services.',
|
|
59
|
+
color: '#ff7700',
|
|
60
|
+
},
|
|
61
|
+
seo: {
|
|
62
|
+
label: 'SEO',
|
|
63
|
+
description: 'Plugins implementing SEO features.',
|
|
64
|
+
color: '#e128d4',
|
|
65
|
+
},
|
|
66
|
+
editing: {
|
|
67
|
+
label: 'Editing',
|
|
68
|
+
description: 'Plugins implementing editing or contribution features.',
|
|
69
|
+
color: '#ffaaff',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
statuses: {
|
|
73
|
+
maintained: {
|
|
74
|
+
label: 'Maintained',
|
|
75
|
+
description: 'Compatible with the latest Docusaurus stable release.',
|
|
76
|
+
color: '#39ca30',
|
|
77
|
+
icon: 'circle-check',
|
|
78
|
+
},
|
|
79
|
+
unmaintained: {
|
|
80
|
+
label: 'Unmaintained',
|
|
81
|
+
description: 'Not compatible with or not updated for the latest Docusaurus stable release.',
|
|
82
|
+
color: '#ca3c25',
|
|
83
|
+
icon: 'circle-x',
|
|
84
|
+
},
|
|
85
|
+
unknown: {
|
|
86
|
+
label: 'Unknown',
|
|
87
|
+
description: 'Maintenance status could not be determined.',
|
|
88
|
+
color: '#f0ad4e',
|
|
89
|
+
icon: 'circle-minus',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=plugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../src/presets/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAGxC,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,YAAY,EAAE,WAAW;IACzB,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,wCAAwC,CAAC;IACnG,SAAS,EAAE,6BAA6B;IACxC,eAAe,EAAE,oDAAoD;IAErE,IAAI,EAAE;QACJ,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,wDAAwD;YACrE,KAAK,EAA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AAS;YAChB,IAAI,EAAE,cAAc;SACrB;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,8EAA8E;YAC3F,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,UAAU;SACjB;QACD,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,6CAA6C;YAC1D,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,cAAc;SACrB;KACF;CACF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../src/presets/sites.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,aAAa,CA8D9C,CAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { join, dirname } from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
export const sitesPreset = {
|
|
4
|
+
favouriteTag: 'favorite',
|
|
5
|
+
statuses: {},
|
|
6
|
+
schemaPath: join(dirname(fileURLToPath(import.meta.url)), '../../schema/sites-preset/1.0.0.json'),
|
|
7
|
+
pageTitle: 'Docusaurus Site Showcase',
|
|
8
|
+
pageDescription: 'List of websites people are building with Docusaurus',
|
|
9
|
+
tags: {
|
|
10
|
+
favorite: {
|
|
11
|
+
label: 'Favorite',
|
|
12
|
+
description: 'Our favorite Docusaurus sites that you must absolutely check out!',
|
|
13
|
+
color: '#e9669e',
|
|
14
|
+
icon: 'heart',
|
|
15
|
+
},
|
|
16
|
+
opensource: {
|
|
17
|
+
label: 'Open-Source',
|
|
18
|
+
description: 'Open-Source Docusaurus sites can be useful for inspiration!',
|
|
19
|
+
color: '#39ca30',
|
|
20
|
+
},
|
|
21
|
+
product: {
|
|
22
|
+
label: 'Product',
|
|
23
|
+
description: 'Docusaurus sites associated to a commercial product!',
|
|
24
|
+
color: '#dfd545',
|
|
25
|
+
},
|
|
26
|
+
design: {
|
|
27
|
+
label: 'Design',
|
|
28
|
+
description: 'Beautiful Docusaurus sites, polished and standing out from the initial template!',
|
|
29
|
+
color: '#a44fb7',
|
|
30
|
+
},
|
|
31
|
+
i18n: {
|
|
32
|
+
label: 'I18n',
|
|
33
|
+
description: 'Translated Docusaurus sites using the internationalization support with more than 1 locale.',
|
|
34
|
+
color: '#127f82',
|
|
35
|
+
},
|
|
36
|
+
versioning: {
|
|
37
|
+
label: 'Versioning',
|
|
38
|
+
description: 'Docusaurus sites using the versioning feature of the docs plugin to manage multiple versions.',
|
|
39
|
+
color: '#fe6829',
|
|
40
|
+
},
|
|
41
|
+
large: {
|
|
42
|
+
label: 'Large',
|
|
43
|
+
description: 'Very large Docusaurus sites, including many more pages than the average!',
|
|
44
|
+
color: '#8c2f00',
|
|
45
|
+
},
|
|
46
|
+
meta: {
|
|
47
|
+
label: 'Meta',
|
|
48
|
+
description: 'Docusaurus sites of Meta (formerly Facebook) projects',
|
|
49
|
+
color: '#4267b2',
|
|
50
|
+
},
|
|
51
|
+
personal: {
|
|
52
|
+
label: 'Personal',
|
|
53
|
+
description: 'Personal websites, blogs and digital gardens built with Docusaurus',
|
|
54
|
+
color: '#14cfc3',
|
|
55
|
+
},
|
|
56
|
+
rtl: {
|
|
57
|
+
label: 'RTL Direction',
|
|
58
|
+
description: 'Docusaurus sites using the right-to-left reading direction support.',
|
|
59
|
+
color: '#ffcfc3',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=sites.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sites.js","sourceRoot":"","sources":["../../src/presets/sites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAGxC,MAAM,CAAC,MAAM,WAAW,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B;KACF;CACF,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ShowcaseItem, PluginOptions } from '../../core/types.js';
|
|
3
|
+
type Props = {
|
|
4
|
+
item: ShowcaseItem;
|
|
5
|
+
options: PluginOptions;
|
|
6
|
+
};
|
|
7
|
+
export default function ShowcaseCard({ item, options }: Props): React.JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/ShowcaseCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAItE,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,EAAE,aAAa,CAAA;CACvB,CAAA;AASD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAuEhF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import Link from '@docusaurus/Link';
|
|
4
|
+
import Translate from '@docusaurus/Translate';
|
|
5
|
+
import { sortBy } from '../../core/utils.js';
|
|
6
|
+
import { getIcon } from '../icons.js';
|
|
7
|
+
import ShowcaseTooltip from '../ShowcaseTooltip/index.js';
|
|
8
|
+
import styles from './styles.module.css';
|
|
9
|
+
function getCardImage(item) {
|
|
10
|
+
return (item.preview ??
|
|
11
|
+
`https://slorber-api-screenshot.netlify.app/${encodeURIComponent(item.website)}/showcase`);
|
|
12
|
+
}
|
|
13
|
+
export default function ShowcaseCard({ item, options }) {
|
|
14
|
+
const image = getCardImage(item);
|
|
15
|
+
const isFavourite = options.favouriteTag ? item.tags.includes(options.favouriteTag) : false;
|
|
16
|
+
const sortedTags = sortBy(item.tags.filter((t) => t in options.tags), (t) => Object.keys(options.tags).indexOf(t));
|
|
17
|
+
const statusDef = item.status ? options.statuses[item.status] : null;
|
|
18
|
+
const StatusIcon = statusDef?.icon ? getIcon(statusDef.icon) : null;
|
|
19
|
+
const FavIcon = getIcon('heart');
|
|
20
|
+
return (_jsxs("li", { className: clsx('card shadow--md', styles.card), children: [_jsx("div", { className: clsx('card__image', styles.cardImage), children: _jsx("img", { src: image, alt: item.name, loading: "lazy" }) }), _jsxs("div", { className: "card__body", children: [_jsxs("div", { className: styles.cardHeader, children: [_jsx("h4", { className: styles.cardTitle, children: _jsx(Link, { href: item.website, className: styles.cardLink, children: item.name }) }), isFavourite && FavIcon && (_jsx(FavIcon, { size: 14, className: styles.favouriteIcon })), item.source && (_jsx(Link, { href: item.source, className: clsx('button button--secondary button--sm', styles.sourceBtn), children: _jsx(Translate, { id: "showcase.card.sourceLink", children: "source" }) }))] }), _jsx("p", { className: styles.cardBody, children: item.description }), item.author && (_jsxs("p", { className: styles.cardAuthor, children: [_jsx("span", { className: styles.authorLabel, children: "Author:" }), _jsx("span", { children: item.author })] })), statusDef && (_jsxs("p", { className: styles.statusRow, children: [_jsx("span", { className: styles.statusLabel, children: "Status:" }), _jsx("span", { children: statusDef.label }), StatusIcon && _jsx(StatusIcon, { size: 14 })] }))] }), _jsx("ul", { className: clsx('card__footer', styles.cardFooter), children: sortedTags.map((tagKey) => {
|
|
21
|
+
const tagDef = options.tags[tagKey];
|
|
22
|
+
if (!tagDef)
|
|
23
|
+
return null;
|
|
24
|
+
const TooltipId = `card-tag-${item.id}-${tagKey}`;
|
|
25
|
+
const TagIcon = tagDef.icon ? getIcon(tagDef.icon) : null;
|
|
26
|
+
return (_jsx(ShowcaseTooltip, { id: TooltipId, text: tagDef.description, anchorEl: "#__docusaurus", children: _jsxs("li", { className: styles.tag, children: [_jsx("span", { className: styles.tagColor, style: { backgroundColor: tagDef.color } }), tagDef.label.toLowerCase(), TagIcon && _jsx(TagIcon, { size: 12 })] }) }, tagKey));
|
|
27
|
+
}) })] }));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme/ShowcaseCard/index.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,IAAI,MAAM,kBAAkB,CAAA;AACnC,OAAO,SAAS,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,eAAe,MAAM,6BAA6B,CAAA;AACzD,OAAO,MAAM,MAAM,qBAAqB,CAAA;AAOxC,SAAS,YAAY,CAAC,IAAkB;IACtC,OAAO,CACL,IAAI,CAAC,OAAO;QACZ,8CAA8C,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAC1F,CAAA;AACH,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAS;IAC3D,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,CAAA;IAChC,MAAM,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;IAE3F,MAAM,UAAU,GAAG,MAAM,CACvB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,EAC1C,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IA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,OAAO,IAAC,IAAI,EAAE,EAAE,GAAI,IAC9B,IALe,MAAM,CAMV,CACnB,CAAA;gBACH,CAAC,CAAC,GACC,IACF,CACN,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
.card {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.cardImage {
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
height: 150px;
|
|
10
|
+
border-bottom: 2px solid var(--ifm-color-emphasis-200);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.cardImage img {
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
object-fit: cover;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.cardHeader {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: 8px;
|
|
23
|
+
margin-bottom: 0.5rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.cardTitle {
|
|
27
|
+
margin: 0;
|
|
28
|
+
flex: 1 1 auto;
|
|
29
|
+
font-size: 1rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.cardLink {
|
|
33
|
+
color: var(--ifm-color-primary);
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
background: linear-gradient(var(--ifm-color-primary), var(--ifm-color-primary))
|
|
36
|
+
0% 100% / 0% 1px no-repeat;
|
|
37
|
+
transition: background-size ease-out 200ms;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.cardLink:not(:focus):hover {
|
|
41
|
+
background-size: 100% 1px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.cardBody {
|
|
45
|
+
font-size: 0.875rem;
|
|
46
|
+
flex: 1 1 auto;
|
|
47
|
+
margin-bottom: 0.25rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.cardAuthor {
|
|
51
|
+
font-size: 0.8rem;
|
|
52
|
+
color: var(--ifm-color-emphasis-600);
|
|
53
|
+
margin-bottom: 0.25rem;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.authorLabel {
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
margin-right: 4px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.statusRow {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
gap: 4px;
|
|
65
|
+
font-size: 0.8rem;
|
|
66
|
+
margin-bottom: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.statusLabel {
|
|
70
|
+
font-weight: 600;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.cardFooter {
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-wrap: wrap;
|
|
76
|
+
gap: 4px;
|
|
77
|
+
padding-top: 0.5rem;
|
|
78
|
+
list-style: none;
|
|
79
|
+
margin: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.tag {
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
gap: 4px;
|
|
86
|
+
font-size: 0.7rem;
|
|
87
|
+
border-radius: 12px;
|
|
88
|
+
padding: 2px 8px;
|
|
89
|
+
background-color: var(--ifm-color-emphasis-100);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.tagColor {
|
|
93
|
+
width: 8px;
|
|
94
|
+
height: 8px;
|
|
95
|
+
border-radius: 50%;
|
|
96
|
+
flex-shrink: 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.favouriteIcon {
|
|
100
|
+
color: var(--ifm-color-danger);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.sourceBtn {
|
|
104
|
+
margin-left: auto;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.sourceBtn:focus-visible {
|
|
108
|
+
background-color: var(--ifm-color-secondary-dark);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
[data-theme='dark'] .sourceBtn {
|
|
112
|
+
background-color: var(--ifm-color-emphasis-200) !important;
|
|
113
|
+
color: inherit;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
[data-theme='dark'] .sourceBtn:hover {
|
|
117
|
+
background-color: var(--ifm-color-emphasis-300) !important;
|
|
118
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/ShowcaseFilterToggle/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,IAAI,CAAA;AAInC,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAErD;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CA8BhE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useHistory, useLocation } from '@docusaurus/router';
|
|
4
|
+
import Translate from '@docusaurus/Translate';
|
|
5
|
+
import styles from './styles.module.css';
|
|
6
|
+
const OperatorQueryKey = 'operator';
|
|
7
|
+
export function readOperator(search) {
|
|
8
|
+
return new URLSearchParams(search).get(OperatorQueryKey) ?? 'OR';
|
|
9
|
+
}
|
|
10
|
+
export default function ShowcaseFilterToggle() {
|
|
11
|
+
const id = 'showcase_filter_toggle';
|
|
12
|
+
const history = useHistory();
|
|
13
|
+
const location = useLocation();
|
|
14
|
+
const operator = readOperator(location.search);
|
|
15
|
+
const isAnd = operator === 'AND';
|
|
16
|
+
const toggle = () => {
|
|
17
|
+
const next = isAnd ? 'OR' : 'AND';
|
|
18
|
+
const search = new URLSearchParams(location.search);
|
|
19
|
+
search.set(OperatorQueryKey, next);
|
|
20
|
+
history.push({ ...location, search: search.toString() });
|
|
21
|
+
};
|
|
22
|
+
return (_jsxs("div", { children: [_jsx("input", { type: "checkbox", id: id, className: styles.srOnly, "aria-label": "Toggle between OR and AND for the selected filters", onChange: toggle, checked: isAnd }), _jsxs("label", { htmlFor: id, className: clsx(styles.checkboxLabel, 'shadow--md'), children: [_jsx("span", { children: _jsx(Translate, { id: "showcase.filterToggle.or", children: "OR" }) }), _jsx("span", { children: _jsx(Translate, { id: "showcase.filterToggle.and", children: "AND" }) })] })] }));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme/ShowcaseFilterToggle/index.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,SAAS,MAAM,uBAAuB,CAAA;AAC7C,OAAO,MAAM,MAAM,qBAAqB,CAAA;AAIxC,MAAM,gBAAgB,GAAG,UAAU,CAAA;AAEnC,MAAM,UAAU,YAAY,CAAC,MAAc;IACzC,OAAQ,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAc,IAAI,IAAI,CAAA;AAChF,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB;IAC1C,MAAM,EAAE,GAAG,wBAAwB,CAAA;IACnC,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAC5B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IAC9C,MAAM,KAAK,GAAG,QAAQ,KAAK,KAAK,CAAA;IAEhC,MAAM,MAAM,GAAG,GAAG,EAAE;QAClB,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAA;QACjC,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;QACnD,MAAM,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAA;QAClC,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;IAC1D,CAAC,CAAA;IAED,OAAO,CACL,0BACE,gBACE,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,MAAM,CAAC,MAAM,gBACb,oDAAoD,EAC/D,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,KAAK,GACd,EACF,iBAAO,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,YAAY,CAAC,aACrE,yBAAM,KAAC,SAAS,IAAC,EAAE,EAAC,0BAA0B,mBAAe,GAAO,EACpE,yBAAM,KAAC,SAAS,IAAC,EAAE,EAAC,2BAA2B,oBAAgB,GAAO,IAChE,IACJ,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.srOnly {
|
|
2
|
+
border: 0;
|
|
3
|
+
clip: rect(0 0 0 0);
|
|
4
|
+
clip-path: polygon(0 0, 0 0, 0 0);
|
|
5
|
+
height: 1px;
|
|
6
|
+
margin: -1px;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
padding: 0;
|
|
9
|
+
position: absolute;
|
|
10
|
+
width: 1px;
|
|
11
|
+
white-space: nowrap;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.checkboxLabel {
|
|
15
|
+
--toggle-height: 25px;
|
|
16
|
+
--toggle-width: 80px;
|
|
17
|
+
--toggle-border: 2px;
|
|
18
|
+
display: flex;
|
|
19
|
+
width: var(--toggle-width);
|
|
20
|
+
height: var(--toggle-height);
|
|
21
|
+
position: relative;
|
|
22
|
+
border-radius: var(--toggle-height);
|
|
23
|
+
border: var(--toggle-border) solid var(--ifm-color-primary-darkest);
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
justify-content: space-around;
|
|
26
|
+
align-items: center;
|
|
27
|
+
opacity: 0.75;
|
|
28
|
+
transition: opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default);
|
|
29
|
+
box-shadow: var(--ifm-global-shadow-md);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.checkboxLabel:hover {
|
|
33
|
+
opacity: 1;
|
|
34
|
+
box-shadow: var(--ifm-global-shadow-md), 0 0 2px 1px var(--ifm-color-primary-dark);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.checkboxLabel::after {
|
|
38
|
+
position: absolute;
|
|
39
|
+
content: '';
|
|
40
|
+
inset: 0;
|
|
41
|
+
width: calc(var(--toggle-width) / 2);
|
|
42
|
+
height: 100%;
|
|
43
|
+
border-radius: var(--toggle-height);
|
|
44
|
+
background-color: var(--ifm-color-primary-darkest);
|
|
45
|
+
transition: transform var(--ifm-transition-fast) var(--ifm-transition-timing-default);
|
|
46
|
+
transform: translateX(calc(var(--toggle-width) / 2 - var(--toggle-border)));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.checkboxLabel > * {
|
|
50
|
+
font-size: 0.8rem;
|
|
51
|
+
color: inherit;
|
|
52
|
+
transition: opacity 150ms ease-in 50ms;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
input:checked + .checkboxLabel::after {
|
|
56
|
+
transform: translateX(calc(-1 * var(--toggle-border)));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
input:focus-visible + .checkboxLabel {
|
|
60
|
+
outline: 2px solid currentColor;
|
|
61
|
+
outline-offset: 2px;
|
|
62
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ShowcaseItem, PluginOptions } from '../../core/types.js';
|
|
3
|
+
import { type Operator } from '../ShowcaseFilterToggle/index.js';
|
|
4
|
+
export declare function readSearchName(search: string): string | null;
|
|
5
|
+
export declare function filterItems(items: ShowcaseItem[], selectedTags: string[], operator: Operator, searchName: string | null, selectedStatuses: string[]): ShowcaseItem[];
|
|
6
|
+
type Props = {
|
|
7
|
+
items: ShowcaseItem[];
|
|
8
|
+
options: PluginOptions;
|
|
9
|
+
onFilter: (filtered: ShowcaseItem[]) => void;
|
|
10
|
+
};
|
|
11
|
+
export default function ShowcaseFilters({ items, options, onFilter }: Props): React.JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/ShowcaseFilters/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAKlD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAGtE,OAA6B,EAAgB,KAAK,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAOpG,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE5D;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,YAAY,EAAE,EACrB,YAAY,EAAE,MAAM,EAAE,EACtB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,gBAAgB,EAAE,MAAM,EAAE,GACzB,YAAY,EAAE,CA8BhB;AAED,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,YAAY,EAAE,CAAA;IACrB,OAAO,EAAE,aAAa,CAAA;IACtB,QAAQ,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,IAAI,CAAA;CAC7C,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA8G9F"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import { useLocation, useHistory } from '@docusaurus/router';
|
|
4
|
+
import { usePluralForm } from '@docusaurus/theme-common';
|
|
5
|
+
import { translate } from '@docusaurus/Translate';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import ShowcaseTagSelect, { readSearchTags } from '../ShowcaseTagSelect/index.js';
|
|
8
|
+
import ShowcaseStatusSelect, { readMaintenanceStatus } from '../ShowcaseStatusSelect/index.js';
|
|
9
|
+
import ShowcaseFilterToggle, { readOperator } from '../ShowcaseFilterToggle/index.js';
|
|
10
|
+
import ShowcaseTooltip from '../ShowcaseTooltip/index.js';
|
|
11
|
+
import { getIcon } from '../icons.js';
|
|
12
|
+
import styles from './styles.module.css';
|
|
13
|
+
const SearchNameKey = 'name';
|
|
14
|
+
export function readSearchName(search) {
|
|
15
|
+
return new URLSearchParams(search).get(SearchNameKey);
|
|
16
|
+
}
|
|
17
|
+
export function filterItems(items, selectedTags, operator, searchName, selectedStatuses) {
|
|
18
|
+
let result = items;
|
|
19
|
+
if (searchName) {
|
|
20
|
+
const q = searchName.toLowerCase();
|
|
21
|
+
result = result.filter((item) => item.name.toLowerCase().includes(q) ||
|
|
22
|
+
item.author?.toLowerCase().includes(q));
|
|
23
|
+
}
|
|
24
|
+
if (selectedStatuses.length > 0) {
|
|
25
|
+
result = result.filter((item) => operator === 'AND'
|
|
26
|
+
? selectedStatuses.every((s) => item.status === s)
|
|
27
|
+
: selectedStatuses.some((s) => item.status === s));
|
|
28
|
+
}
|
|
29
|
+
if (selectedTags.length > 0) {
|
|
30
|
+
result = result.filter((item) => {
|
|
31
|
+
if (item.tags.length === 0)
|
|
32
|
+
return false;
|
|
33
|
+
return operator === 'AND'
|
|
34
|
+
? selectedTags.every((t) => item.tags.includes(t))
|
|
35
|
+
: selectedTags.some((t) => item.tags.includes(t));
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
export default function ShowcaseFilters({ items, options, onFilter }) {
|
|
41
|
+
const location = useLocation();
|
|
42
|
+
const history = useHistory();
|
|
43
|
+
const [searchValue, setSearchValue] = useState('');
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
const tags = readSearchTags(location.search);
|
|
46
|
+
const operator = readOperator(location.search);
|
|
47
|
+
const name = readSearchName(location.search);
|
|
48
|
+
const statuses = readMaintenanceStatus(location.search);
|
|
49
|
+
setSearchValue(name ?? '');
|
|
50
|
+
onFilter(filterItems(items, tags, operator, name, statuses));
|
|
51
|
+
}, [location.search, items, onFilter]);
|
|
52
|
+
const { selectMessage } = usePluralForm();
|
|
53
|
+
const filteredCount = filterItems(items, readSearchTags(location.search), readOperator(location.search), readSearchName(location.search), readMaintenanceStatus(location.search)).length;
|
|
54
|
+
const countLabel = selectMessage(filteredCount, translate({
|
|
55
|
+
id: 'showcase.filters.resultCount',
|
|
56
|
+
message: '1 item|{count} items',
|
|
57
|
+
}, { count: filteredCount }));
|
|
58
|
+
const updateSearch = (value) => {
|
|
59
|
+
setSearchValue(value);
|
|
60
|
+
const search = new URLSearchParams(location.search);
|
|
61
|
+
if (value)
|
|
62
|
+
search.set(SearchNameKey, value);
|
|
63
|
+
else
|
|
64
|
+
search.delete(SearchNameKey);
|
|
65
|
+
history.push({ ...location, search: search.toString() });
|
|
66
|
+
};
|
|
67
|
+
return (_jsxs("section", { className: "container margin-top--l margin-bottom--lg", children: [_jsxs("div", { className: styles.filtersRow, children: [_jsxs("div", { className: styles.filtersRowLeft, children: [_jsx("h2", { style: { marginBottom: 0 }, children: translate({ id: 'showcase.filters.title', message: 'Filters' }) }), _jsx("span", { children: countLabel })] }), _jsx(ShowcaseFilterToggle, {})] }), _jsx("ul", { className: clsx('clean-list', styles.tagList), children: Object.entries(options.tags).map(([key, tag]) => {
|
|
68
|
+
const id = `showcase-tag-${key}`;
|
|
69
|
+
const Icon = getIcon(tag.icon);
|
|
70
|
+
return (_jsx("li", { className: styles.tagListItem, children: _jsx(ShowcaseTooltip, { id: id, text: tag.description, anchorEl: "#__docusaurus", children: _jsx(ShowcaseTagSelect, { tag: key, id: id, label: tag.label, icon: Icon
|
|
71
|
+
? _jsx("span", { className: styles.tagIcon, style: { '--showcase-tag-color': tag.color }, children: _jsx(Icon, { size: 18 }) })
|
|
72
|
+
: _jsx("span", { className: styles.tagColorDot, style: { '--showcase-tag-color': tag.color } }) }) }) }, key));
|
|
73
|
+
}) }), Object.keys(options.statuses).length > 0 && (_jsx("ul", { className: clsx('clean-list', styles.tagList), children: Object.entries(options.statuses).map(([key, status]) => {
|
|
74
|
+
const id = `showcase-status-${key}`;
|
|
75
|
+
const Icon = getIcon(status.icon);
|
|
76
|
+
return (_jsx("li", { className: styles.tagListItem, children: _jsx(ShowcaseTooltip, { id: id, text: status.description, anchorEl: "#__docusaurus", children: _jsx(ShowcaseStatusSelect, { status: key, id: id, label: status.label, icon: Icon
|
|
77
|
+
? _jsx("span", { className: styles.tagIcon, style: { '--showcase-tag-color': status.color ?? undefined }, children: _jsx(Icon, { size: 18 }) })
|
|
78
|
+
: status.color
|
|
79
|
+
? _jsx("span", { className: styles.tagColorDot, style: { '--showcase-tag-color': status.color } })
|
|
80
|
+
: null }) }) }, key));
|
|
81
|
+
}) })), _jsx("div", { className: styles.searchContainer, children: _jsx("input", { id: "showcase-searchbar", placeholder: translate({
|
|
82
|
+
id: 'showcase.searchBar.placeholder',
|
|
83
|
+
message: 'Search by name or author...',
|
|
84
|
+
}), value: searchValue, onInput: (e) => updateSearch(e.currentTarget.value) }) })] }));
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme/ShowcaseFilters/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,S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,IAAI,GACV,GACc,IAZX,GAAG,CAaP,CACN,CAAA;gBACH,CAAC,CAAC,GACC,CACN,EAED,cAAK,SAAS,EAAE,MAAM,CAAC,eAAe,YACpC,gBACE,EAAE,EAAC,oBAAoB,EACvB,WAAW,EAAE,SAAS,CAAC;wBACrB,EAAE,EAAE,gCAAgC;wBACpC,OAAO,EAAE,6BAA6B;qBACvC,CAAC,EACF,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,GACnD,GACE,IACE,CACX,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.filtersRow {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
margin-bottom: 0.5rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.filtersRowLeft {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex: 1 1 auto;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: 8px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.tagList {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-wrap: wrap;
|
|
18
|
+
gap: 8px;
|
|
19
|
+
padding: 0;
|
|
20
|
+
list-style: none;
|
|
21
|
+
margin: 0 0 0.5rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.tagListItem {
|
|
25
|
+
-webkit-user-select: none;
|
|
26
|
+
-moz-user-select: none;
|
|
27
|
+
-ms-user-select: none;
|
|
28
|
+
user-select: none;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
height: 32px;
|
|
31
|
+
font-size: 0.8rem;
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.tagIcon {
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
margin-left: 4px;
|
|
39
|
+
color: var(--showcase-tag-color);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.tagColorDot {
|
|
43
|
+
width: 12px;
|
|
44
|
+
height: 12px;
|
|
45
|
+
border-radius: 50%;
|
|
46
|
+
background-color: var(--showcase-tag-color);
|
|
47
|
+
display: inline-block;
|
|
48
|
+
margin-left: 4px;
|
|
49
|
+
flex-shrink: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.searchContainer {
|
|
53
|
+
margin-left: auto;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.searchContainer input {
|
|
57
|
+
height: 30px;
|
|
58
|
+
border-radius: 15px;
|
|
59
|
+
padding: 0 10px;
|
|
60
|
+
border: 1px solid gray;
|
|
61
|
+
width: 15rem;
|
|
62
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ShowcasePageData } from '../../core/types.js';
|
|
3
|
+
type Props = {
|
|
4
|
+
showcase: ShowcasePageData;
|
|
5
|
+
};
|
|
6
|
+
export default function ShowcasePage({ showcase }: Props): React.JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/ShowcasePage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAMhD,OAAO,KAAK,EAAgB,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAMzE,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,gBAAgB,CAAA;CAC3B,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA8F3E"}
|