@sp-days-framework/docusaurus-frontpage-collection 1.0.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.
Files changed (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +339 -0
  3. package/lib/components/Block/index.d.ts +22 -0
  4. package/lib/components/Block/index.d.ts.map +1 -0
  5. package/lib/components/Block/index.js +32 -0
  6. package/lib/components/Block/index.js.map +1 -0
  7. package/lib/components/Block/styles.module.css +26 -0
  8. package/lib/components/Columns/index.d.ts +68 -0
  9. package/lib/components/Columns/index.d.ts.map +1 -0
  10. package/lib/components/Columns/index.js +119 -0
  11. package/lib/components/Columns/index.js.map +1 -0
  12. package/lib/components/Columns/styles.module.css +196 -0
  13. package/lib/components/CourseFeature/index.d.ts +99 -0
  14. package/lib/components/CourseFeature/index.d.ts.map +1 -0
  15. package/lib/components/CourseFeature/index.js +188 -0
  16. package/lib/components/CourseFeature/index.js.map +1 -0
  17. package/lib/components/CourseFeature/styles.module.css +204 -0
  18. package/lib/components/FancyHeader/index.d.ts +24 -0
  19. package/lib/components/FancyHeader/index.d.ts.map +1 -0
  20. package/lib/components/FancyHeader/index.js +32 -0
  21. package/lib/components/FancyHeader/index.js.map +1 -0
  22. package/lib/components/FancyHeader/styles.module.css +23 -0
  23. package/lib/components/GetStarted/index.d.ts +99 -0
  24. package/lib/components/GetStarted/index.d.ts.map +1 -0
  25. package/lib/components/GetStarted/index.js +127 -0
  26. package/lib/components/GetStarted/index.js.map +1 -0
  27. package/lib/components/GetStarted/styles.module.css +174 -0
  28. package/lib/components/HeroBanner/DotCrossGrid.d.ts +25 -0
  29. package/lib/components/HeroBanner/DotCrossGrid.d.ts.map +1 -0
  30. package/lib/components/HeroBanner/DotCrossGrid.js +283 -0
  31. package/lib/components/HeroBanner/DotCrossGrid.js.map +1 -0
  32. package/lib/components/HeroBanner/DotCrossGrid.module.css +9 -0
  33. package/lib/components/HeroBanner/index.d.ts +42 -0
  34. package/lib/components/HeroBanner/index.d.ts.map +1 -0
  35. package/lib/components/HeroBanner/index.js +116 -0
  36. package/lib/components/HeroBanner/index.js.map +1 -0
  37. package/lib/components/HeroBanner/styles.module.css +204 -0
  38. package/lib/components/IconContainer/index.d.ts +76 -0
  39. package/lib/components/IconContainer/index.d.ts.map +1 -0
  40. package/lib/components/IconContainer/index.js +119 -0
  41. package/lib/components/IconContainer/index.js.map +1 -0
  42. package/lib/components/IconContainer/styles.module.css +147 -0
  43. package/lib/components/Iconify/index.d.ts +56 -0
  44. package/lib/components/Iconify/index.d.ts.map +1 -0
  45. package/lib/components/Iconify/index.js +88 -0
  46. package/lib/components/Iconify/index.js.map +1 -0
  47. package/lib/components/Iconify/styles.module.css +30 -0
  48. package/lib/index.d.ts +36 -0
  49. package/lib/index.d.ts.map +1 -0
  50. package/lib/index.js +73 -0
  51. package/lib/index.js.map +1 -0
  52. package/lib/utils/IconifyIcon.d.ts +17 -0
  53. package/lib/utils/IconifyIcon.d.ts.map +1 -0
  54. package/lib/utils/IconifyIcon.js +26 -0
  55. package/lib/utils/IconifyIcon.js.map +1 -0
  56. package/lib/utils/InlineSvg.d.ts +29 -0
  57. package/lib/utils/InlineSvg.d.ts.map +1 -0
  58. package/lib/utils/InlineSvg.js +90 -0
  59. package/lib/utils/InlineSvg.js.map +1 -0
  60. package/lib/utils/ThemedIcon.d.ts +61 -0
  61. package/lib/utils/ThemedIcon.d.ts.map +1 -0
  62. package/lib/utils/ThemedIcon.js +128 -0
  63. package/lib/utils/ThemedIcon.js.map +1 -0
  64. package/lib/utils/constants.d.ts +23 -0
  65. package/lib/utils/constants.d.ts.map +1 -0
  66. package/lib/utils/constants.js +36 -0
  67. package/lib/utils/constants.js.map +1 -0
  68. package/lib/utils/index.d.ts +9 -0
  69. package/lib/utils/index.d.ts.map +1 -0
  70. package/lib/utils/index.js +19 -0
  71. package/lib/utils/index.js.map +1 -0
  72. package/lib/utils/logger.d.ts +21 -0
  73. package/lib/utils/logger.d.ts.map +1 -0
  74. package/lib/utils/logger.js +38 -0
  75. package/lib/utils/logger.js.map +1 -0
  76. package/lib/utils/types.d.ts +129 -0
  77. package/lib/utils/types.d.ts.map +1 -0
  78. package/lib/utils/types.js +6 -0
  79. package/lib/utils/types.js.map +1 -0
  80. package/package.json +73 -0
@@ -0,0 +1,196 @@
1
+ /**
2
+ * Columns component styles
3
+ */
4
+
5
+ .columnsContainer {
6
+ display: grid;
7
+ grid-template-columns: 1fr 1fr; /* Default 50/50 - will be overridden by inline styles */
8
+ padding: 0.5rem 1rem 1rem 1rem;
9
+ gap: 1.5rem;
10
+ width: 100%;
11
+ container-type: inline-size; /* Enable container queries */
12
+ max-width: 100%;
13
+ min-width: 0; /* Allows grid items to shrink below content size if needed */
14
+ }
15
+
16
+ .leftColumn, .rightColumn {
17
+ min-width: 0; /* Critical for grid items to allow them to be smaller than content */
18
+ overflow: hidden; /* Prevent content from overflowing the column */
19
+ max-width: 100%; /* Ensure the column doesn't exceed its allocated width */
20
+ position: relative; /* Create a positioning context for absolute elements */
21
+ }
22
+
23
+ .columnContent {
24
+ height: 100%;
25
+ width: 100%;
26
+ word-wrap: break-word; /* Ensures text wraps properly */
27
+ overflow-wrap: break-word;
28
+ word-break: break-word; /* Handle long words better */
29
+ hyphens: auto; /* Add hyphens for very long words */
30
+ overflow: hidden; /* Hide any overflow */
31
+ }
32
+
33
+ /* Container specifically for MDX content */
34
+ .mdxContainer {
35
+ width: 100%;
36
+ max-width: 100%;
37
+ overflow-wrap: anywhere; /* Force wrapping anywhere if needed */
38
+ /* Reset some MDX defaults that might cause issues */
39
+ display: block;
40
+ position: relative;
41
+ }
42
+
43
+ /* Ensure MDX elements have proper width constraints */
44
+ .mdxContainer > :global(*) {
45
+ max-width: 100%;
46
+ box-sizing: border-box;
47
+ }
48
+
49
+ /* Force paragraphs to wrap properly */
50
+ .mdxContainer :global(p) {
51
+ width: 100%;
52
+ max-width: 100%;
53
+ white-space: normal;
54
+ overflow-wrap: break-word;
55
+ word-break: break-word;
56
+ }
57
+
58
+ /* Specifically handle list elements which often cause overflow */
59
+ .mdxContainer :global(ul),
60
+ .mdxContainer :global(ol) {
61
+ width: 100%;
62
+ max-width: 100%;
63
+ padding-left: 1.5rem; /* Reduce default padding */
64
+ box-sizing: border-box;
65
+ }
66
+
67
+ .mdxContainer :global(li) {
68
+ width: 100%;
69
+ max-width: 100%;
70
+ overflow-wrap: break-word;
71
+ word-break: break-word;
72
+ }
73
+
74
+ /* Handle markdown table formatting */
75
+ .mdxContainer :global(table) {
76
+ table-layout: fixed; /* Fixed table layout helps with column width control */
77
+ width: 100%;
78
+ }
79
+
80
+ /* Apply line breaking to all potential inline elements in MDX */
81
+ .mdxContainer :global(span),
82
+ .mdxContainer :global(a),
83
+ .mdxContainer :global(strong),
84
+ .mdxContainer :global(em),
85
+ .mdxContainer :global(code) {
86
+ word-break: break-word;
87
+ overflow-wrap: break-word;
88
+ }
89
+
90
+ /* Ensure all content inside columns respects boundaries */
91
+ .columnContent :global(*) {
92
+ max-width: 100%;
93
+ }
94
+
95
+ /* Handle specific elements that commonly cause overflow */
96
+ .columnContent :global(pre),
97
+ .columnContent :global(code) {
98
+ white-space: pre-wrap;
99
+ word-break: break-all;
100
+ }
101
+
102
+ /* Handle tables */
103
+ .columnContent :global(table) {
104
+ display: block;
105
+ overflow-x: auto;
106
+ max-width: 100%;
107
+ }
108
+
109
+ /* Handle images */
110
+ .columnContent :global(img) {
111
+ max-width: 100%;
112
+ height: auto;
113
+ }
114
+
115
+ /* Handle other potentially overflowing elements */
116
+ .columnContent :global(iframe),
117
+ .columnContent :global(video),
118
+ .columnContent :global(.embed-responsive) {
119
+ max-width: 100%;
120
+ }
121
+
122
+ /* Responsive adjustments based on container width */
123
+ /* Responsive adjustments based on container width */
124
+ @container (max-width: 900px) {
125
+ .leftColumn, .rightColumn {
126
+ font-size: 0.95rem;
127
+ }
128
+
129
+ .leftColumn h2, .rightColumn h2 {
130
+ font-size: 1.4rem;
131
+ }
132
+
133
+ .leftColumn h3, .rightColumn h3 {
134
+ font-size: 1.2rem;
135
+ }
136
+
137
+ /* Make tables scroll horizontally with less space */
138
+ .columnContent :global(table) {
139
+ font-size: 0.9rem;
140
+ }
141
+ }
142
+
143
+ @container (max-width: 750px) {
144
+ .leftColumn, .rightColumn {
145
+ font-size: 0.9rem;
146
+ }
147
+
148
+ .leftColumn h2, .rightColumn h2 {
149
+ font-size: 1.3rem;
150
+ }
151
+
152
+ .leftColumn h3, .rightColumn h3 {
153
+ font-size: 1.1rem;
154
+ }
155
+
156
+ /* Further reduce elements that tend to be wide */
157
+ .columnContent :global(table) {
158
+ font-size: 0.85rem;
159
+ }
160
+
161
+ .columnContent :global(pre),
162
+ .columnContent :global(code) {
163
+ font-size: 0.85rem;
164
+ }
165
+ }
166
+
167
+ /* Only stack at very narrow container width */
168
+ @container (max-width: 600px) {
169
+ .columnsContainer {
170
+ grid-template-columns: 1fr !important; /* Force single column */
171
+ grid-auto-rows: auto; /* Let content determine height */
172
+ }
173
+
174
+ .leftColumn, .rightColumn {
175
+ width: 100% !important;
176
+ max-width: 100%;
177
+ grid-column: 1 / -1; /* Span all columns */
178
+
179
+ /* Reset font sizes when stacked */
180
+ font-size: 1rem;
181
+ }
182
+
183
+ .leftColumn h2, .rightColumn h2 {
184
+ font-size: 1.5rem;
185
+ }
186
+
187
+ .leftColumn h3, .rightColumn h3 {
188
+ font-size: 1.25rem;
189
+ }
190
+
191
+ .columnContent :global(table),
192
+ .columnContent :global(pre),
193
+ .columnContent :global(code) {
194
+ font-size: 0.9rem;
195
+ }
196
+ }
@@ -0,0 +1,99 @@
1
+ import React from 'react';
2
+ import type { WithChildren, IconifyConfig, CustomSvgConfig, CustomImageConfig } from '../../utils/types';
3
+ export interface IncludedProps extends WithChildren {
4
+ }
5
+ export interface NotIncludedProps extends WithChildren {
6
+ }
7
+ export interface CourseFeatureProps extends WithChildren {
8
+ /** Legacy prop - whether content is included (default: true) */
9
+ included?: boolean;
10
+ /** Iconify icon for included features */
11
+ iconifyIncluded?: IconifyConfig | string;
12
+ /** Custom SVG for included features */
13
+ customSvgIncluded?: CustomSvgConfig;
14
+ /** Custom image for included features */
15
+ customImageIncluded?: CustomImageConfig;
16
+ /** Iconify icon for not included features */
17
+ iconifyNotIncluded?: IconifyConfig | string;
18
+ /** Custom SVG for not included features */
19
+ customSvgNotIncluded?: CustomSvgConfig;
20
+ /** Custom image for not included features */
21
+ customImageNotIncluded?: CustomImageConfig;
22
+ }
23
+ /**
24
+ * Included Component
25
+ *
26
+ * Wrapper for content that is included in the course.
27
+ * Must be used as a child of CourseFeature component.
28
+ *
29
+ * @example
30
+ * ```tsx
31
+ * <CourseFeature>
32
+ * <Included>
33
+ * - Feature 1
34
+ * - Feature 2
35
+ * </Included>
36
+ * <NotIncluded>
37
+ * - Not this
38
+ * </NotIncluded>
39
+ * </CourseFeature>
40
+ * ```
41
+ */
42
+ export declare const Included: React.FC<IncludedProps>;
43
+ /**
44
+ * NotIncluded Component
45
+ *
46
+ * Wrapper for content that is not included in the course.
47
+ * Must be used as a child of CourseFeature component.
48
+ *
49
+ * @example
50
+ * ```tsx
51
+ * <CourseFeature>
52
+ * <Included>
53
+ * - Feature 1
54
+ * </Included>
55
+ * <NotIncluded>
56
+ * - Not included
57
+ * </NotIncluded>
58
+ * </CourseFeature>
59
+ * ```
60
+ */
61
+ export declare const NotIncluded: React.FC<NotIncludedProps>;
62
+ /**
63
+ * CourseFeature Component
64
+ *
65
+ * Container for displaying course features in a card layout.
66
+ * Supports both Included/NotIncluded child components or direct content.
67
+ *
68
+ * @example
69
+ * ```tsx
70
+ * // Using Included/NotIncluded components
71
+ * <CourseFeature>
72
+ * <Included>
73
+ * - Docker Fundamentals
74
+ * - Container Management
75
+ * </Included>
76
+ * <NotIncluded>
77
+ * - Kubernetes
78
+ * </NotIncluded>
79
+ * </CourseFeature>
80
+ *
81
+ * // With custom icons
82
+ * <CourseFeature
83
+ * iconifyIncluded="mdi:check-circle"
84
+ * iconifyNotIncluded="mdi:close-circle"
85
+ * >
86
+ * <Included>Content</Included>
87
+ * <NotIncluded>Not included</NotIncluded>
88
+ * </CourseFeature>
89
+ *
90
+ * // Legacy single card usage
91
+ * <CourseFeature included={true}>
92
+ * - Feature 1
93
+ * - Feature 2
94
+ * </CourseFeature>
95
+ * ```
96
+ */
97
+ export declare const CourseFeature: React.FC<CourseFeatureProps>;
98
+ export default CourseFeature;
99
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CourseFeature/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAItC,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGzG,MAAM,WAAW,aAAc,SAAQ,YAAY;CAAG;AAEtD,MAAM,WAAW,gBAAiB,SAAQ,YAAY;CAAG;AAEzD,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yCAAyC;IACzC,eAAe,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;IACzC,uCAAuC;IACvC,iBAAiB,CAAC,EAAE,eAAe,CAAC;IACpC,yCAAyC;IACzC,mBAAmB,CAAC,EAAE,iBAAiB,CAAC;IACxC,6CAA6C;IAC7C,kBAAkB,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;IAC5C,2CAA2C;IAC3C,oBAAoB,CAAC,EAAE,eAAe,CAAC;IACvC,6CAA6C;IAC7C,sBAAsB,CAAC,EAAE,iBAAiB,CAAC;CAC5C;AA6BD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAQ5C,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAQlD,CAAC;AA2CF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAsGtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,188 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.CourseFeature = exports.NotIncluded = exports.Included = void 0;
40
+ const react_1 = __importStar(require("react"));
41
+ const clsx_1 = __importDefault(require("clsx"));
42
+ const react_2 = require("@mdx-js/react");
43
+ const ThemedIcon_1 = require("../../utils/ThemedIcon");
44
+ const styles_module_css_1 = __importDefault(require("./styles.module.css"));
45
+ // Inline SVG icons as default
46
+ const CheckIcon = () => (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 24 24", className: styles_module_css_1.default.defaultIcon },
47
+ react_1.default.createElement("path", { fill: "var(--ifm-color-success)", d: "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10S17.5 2 12 2m-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8z" })));
48
+ const CrossIcon = () => (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 24 24", className: styles_module_css_1.default.defaultIcon },
49
+ react_1.default.createElement("path", { fill: "var(--ifm-color-danger)", d: "M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12S6.47 2 12 2m3.59 5L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41z" })));
50
+ /**
51
+ * Included Component
52
+ *
53
+ * Wrapper for content that is included in the course.
54
+ * Must be used as a child of CourseFeature component.
55
+ *
56
+ * @example
57
+ * ```tsx
58
+ * <CourseFeature>
59
+ * <Included>
60
+ * - Feature 1
61
+ * - Feature 2
62
+ * </Included>
63
+ * <NotIncluded>
64
+ * - Not this
65
+ * </NotIncluded>
66
+ * </CourseFeature>
67
+ * ```
68
+ */
69
+ const Included = ({ children }) => {
70
+ return (react_1.default.createElement("div", { className: styles_module_css_1.default.featureContent },
71
+ react_1.default.createElement(react_2.MDXProvider, null, children)));
72
+ };
73
+ exports.Included = Included;
74
+ /**
75
+ * NotIncluded Component
76
+ *
77
+ * Wrapper for content that is not included in the course.
78
+ * Must be used as a child of CourseFeature component.
79
+ *
80
+ * @example
81
+ * ```tsx
82
+ * <CourseFeature>
83
+ * <Included>
84
+ * - Feature 1
85
+ * </Included>
86
+ * <NotIncluded>
87
+ * - Not included
88
+ * </NotIncluded>
89
+ * </CourseFeature>
90
+ * ```
91
+ */
92
+ const NotIncluded = ({ children }) => {
93
+ return (react_1.default.createElement("div", { className: styles_module_css_1.default.featureContent },
94
+ react_1.default.createElement(react_2.MDXProvider, null, children)));
95
+ };
96
+ exports.NotIncluded = NotIncluded;
97
+ /**
98
+ * Feature Card Component - Internal component for both included and not included features
99
+ */
100
+ const FeatureCard = ({ isIncluded, children, iconify, customSvg, customImage, style }) => {
101
+ const title = isIncluded ? 'Included' : 'Not Included';
102
+ const titleClassName = isIncluded
103
+ ? styles_module_css_1.default.coverageTitleIncluded
104
+ : styles_module_css_1.default.coverageTitleNotIncluded;
105
+ return (react_1.default.createElement("div", { className: styles_module_css_1.default.coverageCard, style: style },
106
+ react_1.default.createElement("div", { className: (0, clsx_1.default)(styles_module_css_1.default.coverageTitleWrapper, titleClassName) },
107
+ react_1.default.createElement("div", { className: styles_module_css_1.default.coverageIconWrapper }, (iconify || customSvg || customImage) ? (react_1.default.createElement(ThemedIcon_1.ThemedIcon, { iconify: iconify, customSvg: customSvg, customImage: customImage, alt: title, className: styles_module_css_1.default.coverageIcon, supportsHover: false })) : (isIncluded ? react_1.default.createElement(CheckIcon, null) : react_1.default.createElement(CrossIcon, null))),
108
+ react_1.default.createElement("h2", null, title)),
109
+ react_1.default.createElement("div", { className: styles_module_css_1.default.coverageContent }, children)));
110
+ };
111
+ /**
112
+ * CourseFeature Component
113
+ *
114
+ * Container for displaying course features in a card layout.
115
+ * Supports both Included/NotIncluded child components or direct content.
116
+ *
117
+ * @example
118
+ * ```tsx
119
+ * // Using Included/NotIncluded components
120
+ * <CourseFeature>
121
+ * <Included>
122
+ * - Docker Fundamentals
123
+ * - Container Management
124
+ * </Included>
125
+ * <NotIncluded>
126
+ * - Kubernetes
127
+ * </NotIncluded>
128
+ * </CourseFeature>
129
+ *
130
+ * // With custom icons
131
+ * <CourseFeature
132
+ * iconifyIncluded="mdi:check-circle"
133
+ * iconifyNotIncluded="mdi:close-circle"
134
+ * >
135
+ * <Included>Content</Included>
136
+ * <NotIncluded>Not included</NotIncluded>
137
+ * </CourseFeature>
138
+ *
139
+ * // Legacy single card usage
140
+ * <CourseFeature included={true}>
141
+ * - Feature 1
142
+ * - Feature 2
143
+ * </CourseFeature>
144
+ * ```
145
+ */
146
+ const CourseFeature = ({ children, included, iconifyIncluded, customSvgIncluded, customImageIncluded, iconifyNotIncluded, customSvgNotIncluded, customImageNotIncluded }) => {
147
+ const containerRef = (0, react_1.useRef)(null);
148
+ // Handle direct children vs. Included/NotIncluded components
149
+ const hasCustomComponents = react_1.default.Children.toArray(children).some((child) => react_1.default.isValidElement(child) && (child.type === exports.Included || child.type === exports.NotIncluded));
150
+ if (hasCustomComponents) {
151
+ // Find Included and NotIncluded components
152
+ let includedContent = null;
153
+ let notIncludedContent = null;
154
+ react_1.default.Children.forEach(children, (child) => {
155
+ if (react_1.default.isValidElement(child)) {
156
+ if (child.type === exports.Included) {
157
+ includedContent = child.props.children;
158
+ }
159
+ else if (child.type === exports.NotIncluded) {
160
+ notIncludedContent = child.props.children;
161
+ }
162
+ }
163
+ });
164
+ // If we have both components, render them in a flex container
165
+ if (includedContent && notIncludedContent) {
166
+ return (react_1.default.createElement("div", { className: styles_module_css_1.default.coverageContainer, ref: containerRef },
167
+ react_1.default.createElement("div", { className: styles_module_css_1.default.equalHeightWrapper },
168
+ react_1.default.createElement(FeatureCard, { isIncluded: true, iconify: iconifyIncluded, customSvg: customSvgIncluded, customImage: customImageIncluded }, includedContent),
169
+ react_1.default.createElement(FeatureCard, { isIncluded: false, iconify: iconifyNotIncluded, customSvg: customSvgNotIncluded, customImage: customImageNotIncluded }, notIncludedContent))));
170
+ }
171
+ // If we only have one component, render just that one
172
+ if (includedContent) {
173
+ return (react_1.default.createElement(FeatureCard, { isIncluded: true, iconify: iconifyIncluded, customSvg: customSvgIncluded, customImage: customImageIncluded }, includedContent));
174
+ }
175
+ if (notIncludedContent) {
176
+ return (react_1.default.createElement(FeatureCard, { isIncluded: false, iconify: iconifyNotIncluded, customSvg: customSvgNotIncluded, customImage: customImageNotIncluded }, notIncludedContent));
177
+ }
178
+ }
179
+ // Legacy support - direct children and included prop
180
+ const isIncluded = included !== false;
181
+ const iconify = isIncluded ? iconifyIncluded : iconifyNotIncluded;
182
+ const customSvg = isIncluded ? customSvgIncluded : customSvgNotIncluded;
183
+ const customImage = isIncluded ? customImageIncluded : customImageNotIncluded;
184
+ return (react_1.default.createElement(FeatureCard, { isIncluded: isIncluded, iconify: iconify, customSvg: customSvg, customImage: customImage }, children));
185
+ };
186
+ exports.CourseFeature = CourseFeature;
187
+ exports.default = exports.CourseFeature;
188
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CourseFeature/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAsC;AACtC,gDAAwB;AACxB,yCAA4C;AAC5C,uDAAoD;AAEpD,4EAAyC;AA+BzC,8BAA8B;AAC9B,MAAM,SAAS,GAAa,GAAG,EAAE,CAAC,CAChC,uCAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,SAAS,EAAE,2BAAM,CAAC,WAAW;IAC9G,wCACE,IAAI,EAAC,0BAA0B,EAC/B,CAAC,EAAC,4GAA4G,GAC9G,CACE,CACP,CAAC;AAEF,MAAM,SAAS,GAAa,GAAG,EAAE,CAAC,CAChC,uCAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,SAAS,EAAE,2BAAM,CAAC,WAAW;IAC9G,wCACE,IAAI,EAAC,yBA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,CAAC;IACtC,MAAM,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,kBAAkB,CAAC;IAClE,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,oBAAoB,CAAC;IACxE,MAAM,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,sBAAsB,CAAC;IAE9E,OAAO,CACL,8BAAC,WAAW,IACV,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,IAEvB,QAAQ,CACG,CACf,CAAC;AACJ,CAAC,CAAC;AAtGW,QAAA,aAAa,iBAsGxB;AAEF,kBAAe,qBAAa,CAAC"}
@@ -0,0 +1,204 @@
1
+ /**
2
+ * Course Feature component styles
3
+ */
4
+
5
+ /* Container to hold both feature cards */
6
+ .coverageContainer {
7
+ margin-bottom: 1.5rem;
8
+ width: 100%;
9
+ container-type: inline-size; /* Enable container queries */
10
+ }
11
+
12
+ /* Equal height wrapper to ensure both cards have the same height */
13
+ .equalHeightWrapper {
14
+ display: flex;
15
+ gap: 1.5rem;
16
+ width: 100%;
17
+ flex-wrap: wrap;
18
+ }
19
+
20
+ /* Ensure cards maintain equal height */
21
+ .equalHeightWrapper .coverageCard {
22
+ height: auto; /* Let the height be determined by the tallest card */
23
+ flex: 1 1 0; /* Equal width with ability to grow */
24
+ }
25
+
26
+ /* Individual feature card */
27
+ .coverageCard {
28
+ height: 100%;
29
+ padding: 1.5rem;
30
+ border-radius: 8px;
31
+ background-color: var(--ifm-color-emphasis-100);
32
+ box-shadow: var(--ifm-global-shadow-lw);
33
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
34
+ display: flex;
35
+ flex-direction: column;
36
+ min-width: 200px;
37
+ container-type: inline-size; /* Enable container queries */
38
+ }
39
+
40
+ /* When card is alone (not in coverageContainer) */
41
+ .coverageCard:only-child {
42
+ width: 100%;
43
+ }
44
+
45
+ /* Single consistent layout - Icon and title on top, content below */
46
+ .coverageCard {
47
+ flex-direction: column;
48
+ }
49
+
50
+ /* Title wrapper styles */
51
+ .coverageTitleWrapper {
52
+ display: flex;
53
+ flex-direction: row;
54
+ align-items: center;
55
+ margin-bottom: 1rem;
56
+ justify-content: center;
57
+ width: 100%;
58
+ }
59
+
60
+ .coverageIconWrapper {
61
+ margin-right: 0.75rem;
62
+ flex-shrink: 0;
63
+ display: inline-flex;
64
+ }
65
+
66
+ .coverageIcon {
67
+ width: 30px;
68
+ height: 30px;
69
+ transition: transform 0.3s ease;
70
+ display: flex;
71
+ }
72
+
73
+ /* Default icon style for inline SVG */
74
+ .defaultIcon {
75
+ transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
76
+ }
77
+
78
+ /* Content area */
79
+ .coverageContent {
80
+ display: flex;
81
+ flex-direction: column;
82
+ flex: 1;
83
+ width: 100%;
84
+ height: 100%; /* Ensure content takes full height */
85
+ align-items: flex-start;
86
+ text-align: left;
87
+ }
88
+
89
+ .featureContent {
90
+ width: 100%;
91
+ height: 100%; /* Ensure content takes full height */
92
+ display: flex;
93
+ flex-direction: column;
94
+ align-items: flex-start;
95
+ text-align: left;
96
+ }
97
+
98
+ /* Hover effects */
99
+ .coverageCard:hover .coverageIcon {
100
+ transform: scale(1.05);
101
+ }
102
+
103
+ .coverageCard:hover .defaultIcon {
104
+ transform: scale(1.05);
105
+ }
106
+
107
+ .coverageCard:hover {
108
+ transform: translateY(-1px);
109
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
110
+ }
111
+
112
+ /* Typography */
113
+ .coverageCard h2 {
114
+ margin-bottom: 0;
115
+ font-size: 1.5rem;
116
+ }
117
+
118
+ .coverageTitleIncluded h2 {
119
+ display: contents;
120
+ color: var(--ifm-color-success);
121
+ }
122
+
123
+ .coverageTitleNotIncluded h2 {
124
+ display: contents;
125
+ color: var(--ifm-color-danger);
126
+ }
127
+
128
+ /* List styling */
129
+ .coverageCard ul {
130
+ margin-top: 20px !important;
131
+ margin-bottom: 0 !important;
132
+ align-self: flex-start;
133
+ width: 100%;
134
+ }
135
+
136
+ .coverageCard li {
137
+ margin-bottom: 0.75rem;
138
+ }
139
+
140
+ /* Container Responsive adjustments */
141
+ @container (max-width: 400px) {
142
+ .coverageCard {
143
+ font-size: 0.95rem;
144
+ }
145
+
146
+ .coverageCard h2 {
147
+ font-size: 1.4rem;
148
+ }
149
+ }
150
+
151
+ @container (max-width: 350px) {
152
+ .coverageCard {
153
+ font-size: 0.9rem;
154
+ padding: 1.25rem;
155
+ }
156
+
157
+ .coverageCard h2 {
158
+ font-size: 1.3rem;
159
+ }
160
+
161
+ .coverageCard li {
162
+ margin-bottom: 0.6rem;
163
+ }
164
+
165
+ .coverageIcon {
166
+ width: 25px;
167
+ height: 25px;
168
+ }
169
+ }
170
+
171
+ @container (max-width: 500px) {
172
+ .coverageCard ul {
173
+ padding-left: 20px;
174
+ }
175
+ }
176
+
177
+ /* Container responsiveness */
178
+ @container (max-width: 600px) {
179
+ .equalHeightWrapper {
180
+ flex-direction: column;
181
+ gap: 1.5rem;
182
+ }
183
+
184
+ .equalHeightWrapper .coverageCard {
185
+ width: 100%;
186
+ flex: 1 1 auto;
187
+ }
188
+ }
189
+
190
+ /* Fallback for browsers that don't support container queries */
191
+ @media (max-width: 768px) {
192
+ .equalHeightWrapper {
193
+ flex-direction: column;
194
+ }
195
+
196
+ .equalHeightWrapper .coverageCard {
197
+ width: 100%;
198
+ margin-bottom: 1.5rem;
199
+ }
200
+
201
+ .equalHeightWrapper .coverageCard:last-child {
202
+ margin-bottom: 0;
203
+ }
204
+ }