@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,129 @@
1
+ /**
2
+ * Shared TypeScript types for the component collection
3
+ */
4
+ import type { ReactNode, CSSProperties } from "react";
5
+ /**
6
+ * Color configuration for icons with theme and hover support
7
+ */
8
+ export interface IconColorConfig {
9
+ /** Icon color in light mode (default: --ifm-color-emphasis-600) */
10
+ light?: string;
11
+ /** Icon color on hover in light mode (default: --ifm-color-primary) */
12
+ lightHover?: string;
13
+ /** Icon color in dark mode (default: inherits from light) */
14
+ dark?: string;
15
+ /** Icon color on hover in dark mode (default: inherits from lightHover) */
16
+ darkHover?: string;
17
+ }
18
+ /**
19
+ * Color configuration for titles with theme and hover support
20
+ */
21
+ export interface TitleColorConfig {
22
+ /** Title color in light mode (default: --ifm-color-emphasis-600) */
23
+ light?: string;
24
+ /** Title color on hover in light mode (default: --ifm-color-primary) */
25
+ lightHover?: string;
26
+ /** Title color in dark mode (default: inherits from light) */
27
+ dark?: string;
28
+ /** Title color on hover in dark mode (default: inherits from lightHover) */
29
+ darkHover?: string;
30
+ }
31
+ /**
32
+ * Color configuration for Iconify component (simplified, no hover states)
33
+ */
34
+ export interface IconifyImageColorConfig {
35
+ /** Icon color in light mode (default: --ifm-color-primary) */
36
+ light?: string;
37
+ /** Icon color in dark mode (default: --ifm-color-primary if light is not defined, otherwise inherits from light) */
38
+ dark?: string;
39
+ }
40
+ /**
41
+ * Configuration for Iconify icons
42
+ */
43
+ export interface IconifyConfig {
44
+ /** Iconify icon identifier (e.g., "mdi:home") */
45
+ icon: string;
46
+ /** Optional width override */
47
+ width?: number | string;
48
+ /** Optional height override */
49
+ height?: number | string;
50
+ /** Optional color configuration (for components with hover states) */
51
+ colors?: IconColorConfig;
52
+ }
53
+ /**
54
+ * Configuration for custom SVG icons (inline rendering with color support)
55
+ * Can be a single SVG path or theme-specific SVG paths
56
+ */
57
+ export type CustomSvgConfig = string | {
58
+ /** SVG source for light theme */
59
+ light: string;
60
+ /** SVG source for dark theme */
61
+ dark: string;
62
+ };
63
+ /**
64
+ * Configuration for custom image icons (img tag, no color override)
65
+ * Can be a single image path or theme-specific image paths
66
+ */
67
+ export type CustomImageConfig = string | {
68
+ /** Image source for light theme */
69
+ light: string;
70
+ /** Image source for dark theme */
71
+ dark: string;
72
+ };
73
+ /**
74
+ * Props for IconifyIcon component
75
+ */
76
+ export interface IconifyIconProps {
77
+ /** Iconify icon identifier (e.g., "mdi-light:home") */
78
+ icon: string;
79
+ /** Icon color */
80
+ color?: string;
81
+ /** Icon width */
82
+ width?: number | string;
83
+ /** Icon height */
84
+ height?: number | string;
85
+ /** Additional CSS class */
86
+ className?: string;
87
+ /** Additional inline styles */
88
+ style?: CSSProperties;
89
+ }
90
+ /**
91
+ * Props for ThemedIcon component
92
+ */
93
+ export interface ThemedIconProps {
94
+ /** Iconify icon configuration */
95
+ iconify?: IconifyConfig | string;
96
+ /** Custom SVG configuration (inline rendering, supports color override) */
97
+ customSvg?: CustomSvgConfig;
98
+ /** Custom image configuration (img tag, no color override) */
99
+ customImage?: CustomImageConfig;
100
+ /** Alt text for the icon (used for custom images) */
101
+ alt?: string;
102
+ /** Additional CSS class */
103
+ className?: string;
104
+ /** Additional inline styles */
105
+ style?: CSSProperties;
106
+ /** Disable hover animations (default: false) */
107
+ disableAnimation?: boolean;
108
+ /** Whether this icon supports hover colors (adds CSS custom properties) */
109
+ supportsHover?: boolean;
110
+ }
111
+ /**
112
+ * Common props for components with children
113
+ */
114
+ export interface WithChildren {
115
+ children?: ReactNode;
116
+ }
117
+ /**
118
+ * Common props for components with className
119
+ */
120
+ export interface WithClassName {
121
+ className?: string;
122
+ }
123
+ /**
124
+ * Common props for styled components
125
+ */
126
+ export interface StyledComponentProps extends WithChildren, WithClassName {
127
+ style?: CSSProperties;
128
+ }
129
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oHAAoH;IACpH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,sEAAsE;IACtE,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GACvB,MAAM,GACN;IACE,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;I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,YAAY,EAAE,aAAa;IACvE,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * Shared TypeScript types for the component collection
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":";AAAA;;GAEG"}
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "@sp-days-framework/docusaurus-frontpage-collection",
3
+ "version": "1.0.0",
4
+ "description": "A collection of Docusaurus frontpage UI components.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/helse-sorost/sp-days-framework",
8
+ "directory": "docusaurus-frontpage-collection"
9
+ },
10
+ "author": "SP-Days Framework",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "docusaurus",
14
+ "docusaurus-plugin",
15
+ "tasks",
16
+ "interactive",
17
+ "training",
18
+ "progress"
19
+ ],
20
+ "main": "lib/index.js",
21
+ "types": "lib/index.d.ts",
22
+ "files": [
23
+ "lib/**/*",
24
+ "README.md",
25
+ "LICENSE"
26
+ ],
27
+ "exports": {
28
+ ".": {
29
+ "require": "./lib/index.js",
30
+ "import": "./lib/index.js",
31
+ "types": "./lib/index.d.ts"
32
+ },
33
+ "./lib/components*": "./lib/components/*",
34
+ "./lib/plugin/*": "./lib/plugin/*"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "scripts": {
40
+ "build": "rm -rf lib && tsc && node ./copyUntypedFiles.js",
41
+ "watch": "npm-run-all -c -p copy:watch build:watch",
42
+ "build:watch": "tsc --watch",
43
+ "copy:watch": "node ./copyUntypedFiles.js --watch"
44
+ },
45
+ "dependencies": {
46
+ "@iconify/react": "^5.0.2",
47
+ "clsx": "^2.0.0",
48
+ "gsap": "^3.13.0",
49
+ "tslib": "^2.6.0"
50
+ },
51
+ "devDependencies": {
52
+ "@docusaurus/core": "^3.9.2",
53
+ "@docusaurus/theme-common": "^3.9.2",
54
+ "@docusaurus/types": "^3.9.2",
55
+ "@mdx-js/react": "^3.0.0",
56
+ "@types/node": "^24.9.1",
57
+ "@types/react": "^18.0.0",
58
+ "@types/react-dom": "^18.0.0",
59
+ "chokidar": "^3.5.3",
60
+ "npm-run-all": "^4.1.5",
61
+ "typescript": "^5.0.0"
62
+ },
63
+ "peerDependencies": {
64
+ "@docusaurus/core": "^3.0.0",
65
+ "@docusaurus/theme-common": "^3.0.0",
66
+ "@mdx-js/react": "^3.0.0",
67
+ "react": "^18.0.0 || ^19.0.0",
68
+ "react-dom": "^18.0.0 || ^19.0.0"
69
+ },
70
+ "engines": {
71
+ "node": ">=18.0"
72
+ }
73
+ }