ab-nextjs-components 0.2.3 → 0.3.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/README.md +4 -12
- package/index.ts +0 -13
- package/package.json +1 -14
- package/server/index.ts +0 -3
- package/types/index.d.ts +0 -5
- package/ab-key-feature/index.tsx +0 -61
- package/ab-key-feature/styles.module.css +0 -79
- package/ab-main-headline/index.tsx +0 -58
- package/ab-main-headline/styles.module.css +0 -56
- package/ab-preview/index.tsx +0 -79
- package/ab-preview/styles.module.css +0 -58
- package/ab-switch-back/index.tsx +0 -73
- package/ab-switch-back/styles.module.css +0 -77
- package/ab-test-hello/index.tsx +0 -38
- package/ab-test-hello/styles.module.css +0 -57
- package/server/ab-key-feature/index.tsx +0 -60
- package/server/ab-key-feature/styles.module.css +0 -79
- package/server/ab-switch-back/index.tsx +0 -72
- package/server/ab-switch-back/styles.module.css +0 -77
- package/server/ab-test-hello/index.tsx +0 -36
- package/server/ab-test-hello/styles.module.css +0 -57
package/README.md
CHANGED
|
@@ -192,15 +192,10 @@ A list of all the **client components** and their current status:
|
|
|
192
192
|
| 25 | *`AbNavbar`* | **ab-navbar/index.tsx** | Done |
|
|
193
193
|
| 26 | *`AbSidebar`* | **ab-sidebar/index.tsx** | Done |
|
|
194
194
|
| 27 | *`AbText`* | **ab-text/index.tsx** | Done |
|
|
195
|
-
| 28 | *`
|
|
196
|
-
| 29 | *`
|
|
197
|
-
| 30 | *`
|
|
198
|
-
| 31 | *`
|
|
199
|
-
| 32 | *`AbProduct`* | **ab-product/index.tsx** | Done |
|
|
200
|
-
| 33 | *`AbProductItem`* | **ab-product-item/index.tsx** | Done |
|
|
201
|
-
| 34 | *`AbSwitchBack`* | **ab-switch-back/index.tsx** | Done |
|
|
202
|
-
| 35 | *`AbDemoBox`* | **ab-demo-box/index.tsx** | Done |
|
|
203
|
-
| 36 | *`AbDemoCode`* | **ab-demo-code/index.tsx** | Done |
|
|
195
|
+
| 28 | *`AbProduct`* | **ab-product/index.tsx** | Done |
|
|
196
|
+
| 29 | *`AbProductItem`* | **ab-product-item/index.tsx** | Done |
|
|
197
|
+
| 30 | *`AbDemoBox`* | **ab-demo-box/index.tsx** | Done |
|
|
198
|
+
| 31 | *`AbDemoCode`* | **ab-demo-code/index.tsx** | Done |
|
|
204
199
|
|
|
205
200
|
## Server Components
|
|
206
201
|
|
|
@@ -220,9 +215,6 @@ A list of all the **server components** and their current status:
|
|
|
220
215
|
| 10 | *`AbSidebar`* | **server/ab-sidebar/index.tsx** | Done |
|
|
221
216
|
| 11 | *`AbNavLink`* | **server/ab-nav-link/index.tsx** | Done |
|
|
222
217
|
| 12 | *`AbText`* | **server/ab-text/index.tsx** | Done |
|
|
223
|
-
| 13 | *`AbTestHello`* | **server/ab-test-hello/index.tsx** | Done |
|
|
224
|
-
| 14 | *`AbKeyFeature`* | **server/ab-key-feature/index.tsx** | Done |
|
|
225
|
-
| 15 | *`AbSwitchBack`* | **server/ab-switch-back/index.tsx** | Done |
|
|
226
218
|
|
|
227
219
|
|
|
228
220
|
## Learn More abElements
|
package/index.ts
CHANGED
|
@@ -78,13 +78,8 @@ const supportedComponents: Array<ComponentCatalogEntry> = [
|
|
|
78
78
|
{ name: 'AbNavbar', file: 'ab-navbar/index.tsx', kind: 'client', status: 'Done' },
|
|
79
79
|
{ name: 'AbSidebar', file: 'ab-sidebar/index.tsx', kind: 'client', status: 'Done' },
|
|
80
80
|
{ name: 'AbText', file: 'ab-text/index.tsx', kind: 'client', status: 'Done' },
|
|
81
|
-
{ name: 'AbTestHello', file: 'ab-test-hello/index.tsx', kind: 'client', status: 'Done' },
|
|
82
|
-
{ name: 'AbKeyFeature', file: 'ab-key-feature/index.tsx', kind: 'client', status: 'Done' },
|
|
83
|
-
{ name: 'AbMainHeadline', file: 'ab-main-headline/index.tsx', kind: 'client', status: 'Done' },
|
|
84
|
-
{ name: 'AbPreview', file: 'ab-preview/index.tsx', kind: 'client', status: 'Done' },
|
|
85
81
|
{ name: 'AbProduct', file: 'ab-product/index.tsx', kind: 'client', status: 'Done' },
|
|
86
82
|
{ name: 'AbProductItem', file: 'ab-product-item/index.tsx', kind: 'client', status: 'Done' },
|
|
87
|
-
{ name: 'AbSwitchBack', file: 'ab-switch-back/index.tsx', kind: 'client', status: 'Done' },
|
|
88
83
|
{ name: 'AbDemoBox', file: 'ab-demo-box/index.tsx', kind: 'client', status: 'Done' },
|
|
89
84
|
{ name: 'AbDemoCode', file: 'ab-demo-code/index.tsx', kind: 'client', status: 'Done' },
|
|
90
85
|
|
|
@@ -101,9 +96,6 @@ const supportedComponents: Array<ComponentCatalogEntry> = [
|
|
|
101
96
|
{ name: 'AbSidebar', file: 'server/ab-sidebar/index.tsx', kind: 'server', status: 'Done' },
|
|
102
97
|
{ name: 'AbNavLink', file: 'server/ab-nav-link/index.tsx', kind: 'server', status: 'Done' },
|
|
103
98
|
{ name: 'AbText', file: 'server/ab-text/index.tsx', kind: 'server', status: 'Done' },
|
|
104
|
-
{ name: 'AbTestHello', file: 'server/ab-test-hello/index.tsx', kind: 'server', status: 'Done' },
|
|
105
|
-
{ name: 'AbKeyFeature', file: 'server/ab-key-feature/index.tsx', kind: 'server', status: 'Done' },
|
|
106
|
-
{ name: 'AbSwitchBack', file: 'server/ab-switch-back/index.tsx', kind: 'server', status: 'Done' },
|
|
107
99
|
// 🆕 Welcome v6 (AbThemeToggle)
|
|
108
100
|
{ name: 'AbThemeToggle', file: 'ab-theme-toggle/index.tsx', kind: 'client', status: 'Done' },
|
|
109
101
|
// 🆕 Welcome v6 (AbChip)
|
|
@@ -242,13 +234,8 @@ export type { AbBreadcrumbItem, AbBreadcrumbsProps } from './ab-breadcrumbs/inde
|
|
|
242
234
|
export { default as AbList, AbListItem } from './ab-list/index.tsx'
|
|
243
235
|
export type { AbListProps, AbListItemProps } from './ab-list/index.tsx'
|
|
244
236
|
export { default as AbText } from './ab-text/index.tsx'
|
|
245
|
-
export { default as AbTestHello } from './ab-test-hello/index.tsx'
|
|
246
|
-
export { default as AbKeyFeature } from './ab-key-feature/index.tsx'
|
|
247
|
-
export { default as AbMainHeadline } from './ab-main-headline/index.tsx'
|
|
248
|
-
export { default as AbPreview } from './ab-preview/index.tsx'
|
|
249
237
|
export { default as AbProduct } from './ab-product/index.tsx'
|
|
250
238
|
export { default as AbProductItem } from './ab-product-item/index.tsx'
|
|
251
|
-
export { default as AbSwitchBack } from './ab-switch-back/index.tsx'
|
|
252
239
|
export { default as AbDemoBox } from './ab-demo-box/index.tsx'
|
|
253
240
|
export { default as AbDemoCode } from './ab-demo-code/index.tsx'
|
|
254
241
|
export { default as AbPolygon } from './server/ab-polygon/index.tsx'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ab-nextjs-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "🚀 A lightweight collection of server & client React components created by Abraham Ukachi, and optimized for Next.js applications 😎.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -102,13 +102,8 @@
|
|
|
102
102
|
"ab-navbar",
|
|
103
103
|
"ab-sidebar",
|
|
104
104
|
"ab-text",
|
|
105
|
-
"ab-test-hello",
|
|
106
|
-
"ab-key-feature",
|
|
107
|
-
"ab-main-headline",
|
|
108
|
-
"ab-preview",
|
|
109
105
|
"ab-product",
|
|
110
106
|
"ab-product-item",
|
|
111
|
-
"ab-switch-back",
|
|
112
107
|
"ab-demo-box",
|
|
113
108
|
"ab-demo-code",
|
|
114
109
|
"ab-splash",
|
|
@@ -223,13 +218,8 @@
|
|
|
223
218
|
"./ab-navbar": "./ab-navbar/index.tsx",
|
|
224
219
|
"./ab-sidebar": "./ab-sidebar/index.tsx",
|
|
225
220
|
"./ab-text": "./ab-text/index.tsx",
|
|
226
|
-
"./ab-test-hello": "./ab-test-hello/index.tsx",
|
|
227
|
-
"./ab-key-feature": "./ab-key-feature/index.tsx",
|
|
228
|
-
"./ab-main-headline": "./ab-main-headline/index.tsx",
|
|
229
|
-
"./ab-preview": "./ab-preview/index.tsx",
|
|
230
221
|
"./ab-product": "./ab-product/index.tsx",
|
|
231
222
|
"./ab-product-item": "./ab-product-item/index.tsx",
|
|
232
|
-
"./ab-switch-back": "./ab-switch-back/index.tsx",
|
|
233
223
|
"./ab-demo-box": "./ab-demo-box/index.tsx",
|
|
234
224
|
"./ab-demo-code": "./ab-demo-code/index.tsx",
|
|
235
225
|
"./server/ab-brand": "./server/ab-brand/index.tsx",
|
|
@@ -238,9 +228,6 @@
|
|
|
238
228
|
"./server/ab-sidebar": "./server/ab-sidebar/index.tsx",
|
|
239
229
|
"./server/ab-nav-link": "./server/ab-nav-link/index.tsx",
|
|
240
230
|
"./server/ab-text": "./server/ab-text/index.tsx",
|
|
241
|
-
"./server/ab-test-hello": "./server/ab-test-hello/index.tsx",
|
|
242
|
-
"./server/ab-key-feature": "./server/ab-key-feature/index.tsx",
|
|
243
|
-
"./server/ab-switch-back": "./server/ab-switch-back/index.tsx",
|
|
244
231
|
"./styles.css": "./styles.css",
|
|
245
232
|
"./css/*": "./css/*",
|
|
246
233
|
"./assets/*": "./assets/*",
|
package/server/index.ts
CHANGED
|
@@ -23,6 +23,3 @@ export { default as AbNavbar } from './ab-navbar/index.tsx'
|
|
|
23
23
|
export { default as AbSidebar } from './ab-sidebar/index.tsx'
|
|
24
24
|
export { default as AbNavLink } from './ab-nav-link/index.tsx'
|
|
25
25
|
export { default as AbText } from './ab-text/index.tsx'
|
|
26
|
-
export { default as AbTestHello } from './ab-test-hello/index.tsx'
|
|
27
|
-
export { default as AbKeyFeature } from './ab-key-feature/index.tsx'
|
|
28
|
-
export { default as AbSwitchBack } from './ab-switch-back/index.tsx'
|
package/types/index.d.ts
CHANGED
|
@@ -131,13 +131,8 @@ export type { AbBreadcrumbItem, AbBreadcrumbsProps } from '../ab-breadcrumbs/ind
|
|
|
131
131
|
export { default as AbList, AbListItem } from '../ab-list/index.tsx';
|
|
132
132
|
export type { AbListProps, AbListItemProps } from '../ab-list/index.tsx';
|
|
133
133
|
export { default as AbText } from '../ab-text/index.tsx';
|
|
134
|
-
export { default as AbTestHello } from '../ab-test-hello/index.tsx';
|
|
135
|
-
export { default as AbKeyFeature } from '../ab-key-feature/index.tsx';
|
|
136
|
-
export { default as AbMainHeadline } from '../ab-main-headline/index.tsx';
|
|
137
|
-
export { default as AbPreview } from '../ab-preview/index.tsx';
|
|
138
134
|
export { default as AbProduct } from '../ab-product/index.tsx';
|
|
139
135
|
export { default as AbProductItem } from '../ab-product-item/index.tsx';
|
|
140
|
-
export { default as AbSwitchBack } from '../ab-switch-back/index.tsx';
|
|
141
136
|
export { default as AbDemoBox } from '../ab-demo-box/index.tsx';
|
|
142
137
|
export { default as AbDemoCode } from '../ab-demo-code/index.tsx';
|
|
143
138
|
export { default as AbPolygon } from '../server/ab-polygon/index.tsx';
|
package/ab-key-feature/index.tsx
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* @project: ab-nextjs-components
|
|
9
|
-
* @name: AbKeyFeature - Client (port of lyd-key-feature)
|
|
10
|
-
* @file: ab-key-feature/index.tsx
|
|
11
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
'use client';
|
|
15
|
-
|
|
16
|
-
import type { ReactElement } from 'react';
|
|
17
|
-
import Link from '../ab-link'; // 🔗 G42: injectable via AbLinkProvider (default next/link)
|
|
18
|
-
import clsx from 'clsx';
|
|
19
|
-
import styles from './styles.module.css';
|
|
20
|
-
|
|
21
|
-
export interface AbKeyFeatureProps {
|
|
22
|
-
className?: string;
|
|
23
|
-
hidden?: boolean;
|
|
24
|
-
icon: string;
|
|
25
|
-
name: string;
|
|
26
|
-
title: string;
|
|
27
|
-
description?: string;
|
|
28
|
-
linkHidden?: boolean;
|
|
29
|
-
linkLabel?: string;
|
|
30
|
-
link?: string;
|
|
31
|
-
watermark?: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const AbKeyFeature = ({
|
|
35
|
-
className,
|
|
36
|
-
hidden = false,
|
|
37
|
-
icon,
|
|
38
|
-
name,
|
|
39
|
-
title,
|
|
40
|
-
description,
|
|
41
|
-
linkHidden = false,
|
|
42
|
-
linkLabel = 'Learn more',
|
|
43
|
-
link,
|
|
44
|
-
watermark,
|
|
45
|
-
}: AbKeyFeatureProps): ReactElement => {
|
|
46
|
-
return (
|
|
47
|
-
<article hidden={hidden} className={clsx('AbKeyFeature', styles.abKeyFeature, className)}>
|
|
48
|
-
<span className={clsx('material-symbols-rounded', styles.abKeyFeatureIcon)} aria-hidden>{icon}</span>
|
|
49
|
-
<span className={styles.abKeyFeatureName}>{name}</span>
|
|
50
|
-
<h3 className={styles.abKeyFeatureTitle}>{title}</h3>
|
|
51
|
-
{description ? <p className={styles.abKeyFeatureDesc}>{description}</p> : null}
|
|
52
|
-
{!linkHidden && link ? (
|
|
53
|
-
<Link href={link} className={styles.abKeyFeatureLink}>{linkLabel}</Link>
|
|
54
|
-
) : null}
|
|
55
|
-
{watermark ? <span className={styles.abKeyFeatureWatermark} aria-hidden>{watermark}</span> : null}
|
|
56
|
-
</article>
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export default AbKeyFeature;
|
|
61
|
-
export { AbKeyFeature };
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
-
* of this software and associated documentation files (the 'Software'), to deal
|
|
10
|
-
* in the Software without restriction, including without limitation the rights
|
|
11
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
-
* furnished to do so, subject to the following conditions:
|
|
14
|
-
*
|
|
15
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
-
* copies or substantial portions of the Software.
|
|
17
|
-
*
|
|
18
|
-
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
-
* SOFTWARE.
|
|
25
|
-
*
|
|
26
|
-
* @project: ab-nextjs-components
|
|
27
|
-
* @name: styles.module.css
|
|
28
|
-
* @file: ab-key-feature/styles.module.css
|
|
29
|
-
* @type: CSS Stylesheet
|
|
30
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
.abKeyFeature {
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
gap: 0.5rem;
|
|
37
|
-
padding: 1rem;
|
|
38
|
-
border-radius: 1rem;
|
|
39
|
-
position: relative;
|
|
40
|
-
overflow: hidden;
|
|
41
|
-
background: color-mix(in srgb, var(--ab-surface-container, #f3edf7) 85%, transparent);
|
|
42
|
-
}
|
|
43
|
-
.abKeyFeatureIcon {
|
|
44
|
-
font-size: 2rem;
|
|
45
|
-
color: var(--ab-primary, #6750a4);
|
|
46
|
-
}
|
|
47
|
-
.abKeyFeatureName {
|
|
48
|
-
font-size: 0.75rem;
|
|
49
|
-
font-weight: 700;
|
|
50
|
-
text-transform: uppercase;
|
|
51
|
-
letter-spacing: 0.06em;
|
|
52
|
-
opacity: 0.7;
|
|
53
|
-
}
|
|
54
|
-
.abKeyFeatureTitle {
|
|
55
|
-
margin: 0;
|
|
56
|
-
font-size: 1.25rem;
|
|
57
|
-
font-weight: 700;
|
|
58
|
-
}
|
|
59
|
-
.abKeyFeatureDesc {
|
|
60
|
-
margin: 0;
|
|
61
|
-
font-size: 0.9375rem;
|
|
62
|
-
opacity: 0.8;
|
|
63
|
-
}
|
|
64
|
-
.abKeyFeatureLink {
|
|
65
|
-
margin-top: 0.5rem;
|
|
66
|
-
align-self: flex-start;
|
|
67
|
-
color: var(--ab-primary, #6750a4);
|
|
68
|
-
font-weight: 600;
|
|
69
|
-
text-decoration: none;
|
|
70
|
-
}
|
|
71
|
-
.abKeyFeatureWatermark {
|
|
72
|
-
position: absolute;
|
|
73
|
-
right: -0.5rem;
|
|
74
|
-
bottom: -0.5rem;
|
|
75
|
-
font-size: 5rem;
|
|
76
|
-
opacity: 0.06;
|
|
77
|
-
pointer-events: none;
|
|
78
|
-
user-select: none;
|
|
79
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* @project: ab-nextjs-components
|
|
9
|
-
* @name: AbMainHeadline - Client (port of lyd-main-headline; providers stripped)
|
|
10
|
-
* @file: ab-main-headline/index.tsx
|
|
11
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
'use client';
|
|
15
|
-
|
|
16
|
-
import type { ReactElement } from 'react';
|
|
17
|
-
import clsx from 'clsx';
|
|
18
|
-
import styles from './styles.module.css';
|
|
19
|
-
|
|
20
|
-
export interface AbMainHeadlineProps {
|
|
21
|
-
className?: string;
|
|
22
|
-
timePeriod?: 'morning' | 'afternoon' | 'evening' | 'night';
|
|
23
|
-
title: string;
|
|
24
|
-
commaHidden?: boolean;
|
|
25
|
-
subtitle: string;
|
|
26
|
-
isFirstNameBold?: boolean;
|
|
27
|
-
hasExclamationMark?: boolean;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const AbMainHeadline = ({
|
|
31
|
-
className,
|
|
32
|
-
timePeriod,
|
|
33
|
-
title,
|
|
34
|
-
commaHidden = false,
|
|
35
|
-
subtitle,
|
|
36
|
-
isFirstNameBold = false,
|
|
37
|
-
hasExclamationMark = false,
|
|
38
|
-
}: AbMainHeadlineProps): ReactElement => {
|
|
39
|
-
const parts = title.trim().split(/\s+/);
|
|
40
|
-
const first = parts[0] ?? '';
|
|
41
|
-
const rest = parts.slice(1).join(' ');
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<header className={clsx('AbMainHeadline', styles.abMainHeadline, className)}>
|
|
45
|
-
{timePeriod ? <span className={styles.abMainHeadlinePeriod}>{timePeriod}</span> : null}
|
|
46
|
-
<h1 className={styles.abMainHeadlineTitle}>
|
|
47
|
-
{isFirstNameBold ? <strong>{first}</strong> : first}
|
|
48
|
-
{rest ? ` ${rest}` : ''}
|
|
49
|
-
{!commaHidden ? ',' : ''}
|
|
50
|
-
{hasExclamationMark ? '!' : ''}
|
|
51
|
-
</h1>
|
|
52
|
-
<p className={styles.abMainHeadlineSubtitle}>{subtitle}</p>
|
|
53
|
-
</header>
|
|
54
|
-
);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export default AbMainHeadline;
|
|
58
|
-
export { AbMainHeadline };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
-
* of this software and associated documentation files (the 'Software'), to deal
|
|
10
|
-
* in the Software without restriction, including without limitation the rights
|
|
11
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
-
* furnished to do so, subject to the following conditions:
|
|
14
|
-
*
|
|
15
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
-
* copies or substantial portions of the Software.
|
|
17
|
-
*
|
|
18
|
-
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
-
* SOFTWARE.
|
|
25
|
-
*
|
|
26
|
-
* @project: ab-nextjs-components
|
|
27
|
-
* @name: styles.module.css
|
|
28
|
-
* @file: ab-main-headline/styles.module.css
|
|
29
|
-
* @type: CSS Stylesheet
|
|
30
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
.abMainHeadline {
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
gap: 0.35rem;
|
|
37
|
-
}
|
|
38
|
-
.abMainHeadlineTitle {
|
|
39
|
-
margin: 0;
|
|
40
|
-
font-size: clamp(1.75rem, 4vw, 2.75rem);
|
|
41
|
-
font-weight: 700;
|
|
42
|
-
line-height: 1.15;
|
|
43
|
-
}
|
|
44
|
-
.abMainHeadlineTitle strong { font-weight: 900; }
|
|
45
|
-
.abMainHeadlineSubtitle {
|
|
46
|
-
margin: 0;
|
|
47
|
-
font-size: 1.05rem;
|
|
48
|
-
opacity: 0.75;
|
|
49
|
-
}
|
|
50
|
-
.abMainHeadlinePeriod {
|
|
51
|
-
font-size: 0.75rem;
|
|
52
|
-
font-weight: 700;
|
|
53
|
-
text-transform: uppercase;
|
|
54
|
-
letter-spacing: 0.08em;
|
|
55
|
-
opacity: 0.55;
|
|
56
|
-
}
|
package/ab-preview/index.tsx
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* @project: ab-nextjs-components
|
|
9
|
-
* @name: AbPreview - Client (Adapt of lyd-preview; db/providers stripped)
|
|
10
|
-
* @file: ab-preview/index.tsx
|
|
11
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
'use client';
|
|
15
|
-
|
|
16
|
-
import type { ReactElement } from 'react';
|
|
17
|
-
import Image from 'next/image';
|
|
18
|
-
import clsx from 'clsx';
|
|
19
|
-
import styles from './styles.module.css';
|
|
20
|
-
|
|
21
|
-
export type AbPreviewItem = {
|
|
22
|
-
id: string | number;
|
|
23
|
-
src: string;
|
|
24
|
-
alt?: string;
|
|
25
|
-
href?: string;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export interface AbPreviewProps {
|
|
29
|
-
className?: string;
|
|
30
|
-
hidden?: boolean;
|
|
31
|
-
items?: AbPreviewItem[];
|
|
32
|
-
emptyLabel?: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const AbPreview = ({
|
|
36
|
-
className,
|
|
37
|
-
hidden = false,
|
|
38
|
-
items = [],
|
|
39
|
-
emptyLabel = 'No previews',
|
|
40
|
-
}: AbPreviewProps): ReactElement => {
|
|
41
|
-
if (!items.length) {
|
|
42
|
-
return (
|
|
43
|
-
<div hidden={hidden} className={clsx('AbPreview', styles.abPreview, className)}>
|
|
44
|
-
<div className={styles.abPreviewEmpty}>{emptyLabel}</div>
|
|
45
|
-
</div>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return (
|
|
50
|
-
<div hidden={hidden} className={clsx('AbPreview', styles.abPreview, className)}>
|
|
51
|
-
{items.map((item) => {
|
|
52
|
-
const inner = (
|
|
53
|
-
<Image
|
|
54
|
-
className={styles.abPreviewImg}
|
|
55
|
-
src={item.src}
|
|
56
|
-
alt={item.alt ?? ''}
|
|
57
|
-
width={160}
|
|
58
|
-
height={160}
|
|
59
|
-
unoptimized
|
|
60
|
-
/>
|
|
61
|
-
);
|
|
62
|
-
return (
|
|
63
|
-
<div key={item.id} className={styles.abPreviewItem}>
|
|
64
|
-
{item.href ? (
|
|
65
|
-
<a href={item.href} style={{ display: 'contents' }}>
|
|
66
|
-
{inner}
|
|
67
|
-
</a>
|
|
68
|
-
) : (
|
|
69
|
-
inner
|
|
70
|
-
)}
|
|
71
|
-
</div>
|
|
72
|
-
);
|
|
73
|
-
})}
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export default AbPreview;
|
|
79
|
-
export { AbPreview };
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
-
* of this software and associated documentation files (the 'Software'), to deal
|
|
10
|
-
* in the Software without restriction, including without limitation the rights
|
|
11
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
-
* furnished to do so, subject to the following conditions:
|
|
14
|
-
*
|
|
15
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
-
* copies or substantial portions of the Software.
|
|
17
|
-
*
|
|
18
|
-
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
-
* SOFTWARE.
|
|
25
|
-
*
|
|
26
|
-
* @project: ab-nextjs-components
|
|
27
|
-
* @name: styles.module.css
|
|
28
|
-
* @file: ab-preview/styles.module.css
|
|
29
|
-
* @type: CSS Stylesheet
|
|
30
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
.abPreview {
|
|
34
|
-
display: grid;
|
|
35
|
-
grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
|
|
36
|
-
gap: 0.75rem;
|
|
37
|
-
}
|
|
38
|
-
.abPreviewItem {
|
|
39
|
-
position: relative;
|
|
40
|
-
aspect-ratio: 1;
|
|
41
|
-
border-radius: 0.85rem;
|
|
42
|
-
overflow: hidden;
|
|
43
|
-
background: color-mix(in srgb, var(--ab-surface-container, #f3edf7) 100%, transparent);
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
justify-content: center;
|
|
47
|
-
}
|
|
48
|
-
.abPreviewImg {
|
|
49
|
-
object-fit: cover;
|
|
50
|
-
width: 100%;
|
|
51
|
-
height: 100%;
|
|
52
|
-
}
|
|
53
|
-
.abPreviewEmpty {
|
|
54
|
-
font-size: 0.75rem;
|
|
55
|
-
opacity: 0.6;
|
|
56
|
-
text-align: center;
|
|
57
|
-
padding: 0.5rem;
|
|
58
|
-
}
|
package/ab-switch-back/index.tsx
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* @project: ab-nextjs-components
|
|
9
|
-
* @name: AbSwitchBack - Client (port of lyd-switch-back)
|
|
10
|
-
* @file: ab-switch-back/index.tsx
|
|
11
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
'use client';
|
|
15
|
-
|
|
16
|
-
import type { ReactElement, ReactNode } from 'react';
|
|
17
|
-
import Link from '../ab-link'; // 🔗 G42: injectable via AbLinkProvider (default next/link)
|
|
18
|
-
import Image from 'next/image';
|
|
19
|
-
import clsx from 'clsx';
|
|
20
|
-
import styles from './styles.module.css';
|
|
21
|
-
|
|
22
|
-
export interface AbSwitchBackProps {
|
|
23
|
-
className?: string;
|
|
24
|
-
hidden?: boolean;
|
|
25
|
-
switched?: boolean;
|
|
26
|
-
image: string;
|
|
27
|
-
imageAlt: string;
|
|
28
|
-
title?: ReactNode;
|
|
29
|
-
description?: ReactNode;
|
|
30
|
-
cta1Label: string;
|
|
31
|
-
cta1Link: string;
|
|
32
|
-
cta2Label: string;
|
|
33
|
-
cta2Link: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const AbSwitchBack = ({
|
|
37
|
-
className,
|
|
38
|
-
hidden = false,
|
|
39
|
-
switched = false,
|
|
40
|
-
image,
|
|
41
|
-
imageAlt,
|
|
42
|
-
title,
|
|
43
|
-
description,
|
|
44
|
-
cta1Label,
|
|
45
|
-
cta1Link,
|
|
46
|
-
cta2Label,
|
|
47
|
-
cta2Link,
|
|
48
|
-
}: AbSwitchBackProps): ReactElement => {
|
|
49
|
-
return (
|
|
50
|
-
<section
|
|
51
|
-
hidden={hidden}
|
|
52
|
-
data-switched={switched ? 'true' : 'false'}
|
|
53
|
-
className={clsx('AbSwitchBack', styles.abSwitchBack, className)}
|
|
54
|
-
>
|
|
55
|
-
<div className={styles.abSwitchBackMedia}>
|
|
56
|
-
<Image className={styles.abSwitchBackImage} src={image} alt={imageAlt} width={800} height={600} unoptimized />
|
|
57
|
-
</div>
|
|
58
|
-
<div className={styles.abSwitchBackCopy}>
|
|
59
|
-
{title ? <h2 className={styles.abSwitchBackTitle}>{title}</h2> : null}
|
|
60
|
-
{description ? <div className={styles.abSwitchBackDesc}>{description}</div> : null}
|
|
61
|
-
<div className={styles.abSwitchBackActions}>
|
|
62
|
-
<Link href={cta1Link} className={styles.abSwitchBackCta}>{cta1Label}</Link>
|
|
63
|
-
<Link href={cta2Link} className={clsx(styles.abSwitchBackCta, styles.abSwitchBackCtaSecondary)}>
|
|
64
|
-
{cta2Label}
|
|
65
|
-
</Link>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</section>
|
|
69
|
-
);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export default AbSwitchBack;
|
|
73
|
-
export { AbSwitchBack };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
-
* of this software and associated documentation files (the 'Software'), to deal
|
|
10
|
-
* in the Software without restriction, including without limitation the rights
|
|
11
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
-
* furnished to do so, subject to the following conditions:
|
|
14
|
-
*
|
|
15
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
-
* copies or substantial portions of the Software.
|
|
17
|
-
*
|
|
18
|
-
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
-
* SOFTWARE.
|
|
25
|
-
*
|
|
26
|
-
* @project: ab-nextjs-components
|
|
27
|
-
* @name: styles.module.css
|
|
28
|
-
* @file: ab-switch-back/styles.module.css
|
|
29
|
-
* @type: CSS Stylesheet
|
|
30
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
.abSwitchBack {
|
|
34
|
-
display: grid;
|
|
35
|
-
grid-template-columns: 1fr;
|
|
36
|
-
gap: 1.25rem;
|
|
37
|
-
align-items: center;
|
|
38
|
-
}
|
|
39
|
-
@media (min-width: 768px) {
|
|
40
|
-
.abSwitchBack {
|
|
41
|
-
grid-template-columns: 1fr 1fr;
|
|
42
|
-
}
|
|
43
|
-
.abSwitchBack[data-switched='true'] .abSwitchBackMedia { order: 2; }
|
|
44
|
-
.abSwitchBack[data-switched='true'] .abSwitchBackCopy { order: 1; }
|
|
45
|
-
}
|
|
46
|
-
.abSwitchBackMedia {
|
|
47
|
-
position: relative;
|
|
48
|
-
width: 100%;
|
|
49
|
-
aspect-ratio: 4 / 3;
|
|
50
|
-
border-radius: 1rem;
|
|
51
|
-
overflow: hidden;
|
|
52
|
-
background: #ddd;
|
|
53
|
-
}
|
|
54
|
-
.abSwitchBackImage {
|
|
55
|
-
object-fit: cover;
|
|
56
|
-
width: 100%;
|
|
57
|
-
height: 100%;
|
|
58
|
-
}
|
|
59
|
-
.abSwitchBackCopy { display: flex; flex-direction: column; gap: 0.75rem; }
|
|
60
|
-
.abSwitchBackTitle { margin: 0; font-size: 1.5rem; font-weight: 700; }
|
|
61
|
-
.abSwitchBackDesc { margin: 0; opacity: 0.8; }
|
|
62
|
-
.abSwitchBackActions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
|
|
63
|
-
.abSwitchBackCta {
|
|
64
|
-
display: inline-flex;
|
|
65
|
-
align-items: center;
|
|
66
|
-
padding: 0.5rem 1rem;
|
|
67
|
-
border-radius: 9999px;
|
|
68
|
-
text-decoration: none;
|
|
69
|
-
font-weight: 600;
|
|
70
|
-
background: var(--ab-primary, #6750a4);
|
|
71
|
-
color: #fff;
|
|
72
|
-
}
|
|
73
|
-
.abSwitchBackCtaSecondary {
|
|
74
|
-
background: transparent;
|
|
75
|
-
color: var(--ab-primary, #6750a4);
|
|
76
|
-
border: 1px solid color-mix(in srgb, var(--ab-primary, #6750a4) 40%, transparent);
|
|
77
|
-
}
|
package/ab-test-hello/index.tsx
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* @project: ab-nextjs-components
|
|
9
|
-
* @name: AbTestHello - Client (port of lyd-test-hello)
|
|
10
|
-
* @file: ab-test-hello/index.tsx
|
|
11
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
'use client';
|
|
15
|
-
|
|
16
|
-
import type { ReactElement } from 'react';
|
|
17
|
-
import clsx from 'clsx';
|
|
18
|
-
import styles from './styles.module.css';
|
|
19
|
-
|
|
20
|
-
export interface AbTestHelloProps {
|
|
21
|
-
name: string;
|
|
22
|
-
src?: string;
|
|
23
|
-
className?: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const AbTestHello = ({ name, src, className }: AbTestHelloProps): ReactElement => {
|
|
27
|
-
return (
|
|
28
|
-
<div id="abTestHello" className={clsx('AbTestHello', styles.abTestHello, className)}>
|
|
29
|
-
<h2 className={styles.abTestHelloTitle}>
|
|
30
|
-
Hello from <span className={styles.abTestHelloName}>{name}</span>
|
|
31
|
-
</h2>
|
|
32
|
-
{src ? <span className={styles.abTestHelloSrc}>{src}</span> : null}
|
|
33
|
-
</div>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default AbTestHello;
|
|
38
|
-
export { AbTestHello };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
-
* of this software and associated documentation files (the 'Software'), to deal
|
|
10
|
-
* in the Software without restriction, including without limitation the rights
|
|
11
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
-
* furnished to do so, subject to the following conditions:
|
|
14
|
-
*
|
|
15
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
-
* copies or substantial portions of the Software.
|
|
17
|
-
*
|
|
18
|
-
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
-
* SOFTWARE.
|
|
25
|
-
*
|
|
26
|
-
* @project: ab-nextjs-components
|
|
27
|
-
* @name: styles.module.css
|
|
28
|
-
* @file: ab-test-hello/styles.module.css
|
|
29
|
-
* @type: CSS Stylesheet
|
|
30
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
.abTestHello {
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
align-items: flex-start;
|
|
37
|
-
text-align: left;
|
|
38
|
-
padding: 1.5rem;
|
|
39
|
-
}
|
|
40
|
-
.abTestHelloTitle {
|
|
41
|
-
margin: 0;
|
|
42
|
-
padding: 0.75rem 0 0.25rem;
|
|
43
|
-
font-size: 1rem;
|
|
44
|
-
}
|
|
45
|
-
.abTestHelloName {
|
|
46
|
-
font-family: ui-serif, Georgia, serif;
|
|
47
|
-
font-weight: 700;
|
|
48
|
-
color: var(--ab-primary, #6750a4);
|
|
49
|
-
}
|
|
50
|
-
.abTestHelloSrc {
|
|
51
|
-
font-family: ui-monospace, monospace;
|
|
52
|
-
font-size: 0.875rem;
|
|
53
|
-
opacity: 0.5;
|
|
54
|
-
}
|
|
55
|
-
.abTestHelloSrc:hover {
|
|
56
|
-
opacity: 0.9;
|
|
57
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* @project: ab-nextjs-components
|
|
9
|
-
* @name: AbKeyFeature - Server (port of lyd-key-feature)
|
|
10
|
-
* @file: server/ab-key-feature/index.tsx
|
|
11
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import type { ReactElement } from 'react';
|
|
16
|
-
import Link from '../../ab-link'; // 🔗 G42: injectable via AbLinkProvider (default next/link)
|
|
17
|
-
import clsx from 'clsx';
|
|
18
|
-
import styles from './styles.module.css';
|
|
19
|
-
|
|
20
|
-
export interface AbKeyFeatureProps {
|
|
21
|
-
className?: string;
|
|
22
|
-
hidden?: boolean;
|
|
23
|
-
icon: string;
|
|
24
|
-
name: string;
|
|
25
|
-
title: string;
|
|
26
|
-
description?: string;
|
|
27
|
-
linkHidden?: boolean;
|
|
28
|
-
linkLabel?: string;
|
|
29
|
-
link?: string;
|
|
30
|
-
watermark?: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const AbKeyFeature = ({
|
|
34
|
-
className,
|
|
35
|
-
hidden = false,
|
|
36
|
-
icon,
|
|
37
|
-
name,
|
|
38
|
-
title,
|
|
39
|
-
description,
|
|
40
|
-
linkHidden = false,
|
|
41
|
-
linkLabel = 'Learn more',
|
|
42
|
-
link,
|
|
43
|
-
watermark,
|
|
44
|
-
}: AbKeyFeatureProps): ReactElement => {
|
|
45
|
-
return (
|
|
46
|
-
<article hidden={hidden} className={clsx('AbKeyFeature', styles.abKeyFeature, className)}>
|
|
47
|
-
<span className={clsx('material-symbols-rounded', styles.abKeyFeatureIcon)} aria-hidden>{icon}</span>
|
|
48
|
-
<span className={styles.abKeyFeatureName}>{name}</span>
|
|
49
|
-
<h3 className={styles.abKeyFeatureTitle}>{title}</h3>
|
|
50
|
-
{description ? <p className={styles.abKeyFeatureDesc}>{description}</p> : null}
|
|
51
|
-
{!linkHidden && link ? (
|
|
52
|
-
<Link href={link} className={styles.abKeyFeatureLink}>{linkLabel}</Link>
|
|
53
|
-
) : null}
|
|
54
|
-
{watermark ? <span className={styles.abKeyFeatureWatermark} aria-hidden>{watermark}</span> : null}
|
|
55
|
-
</article>
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export default AbKeyFeature;
|
|
60
|
-
export { AbKeyFeature };
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
-
* of this software and associated documentation files (the 'Software'), to deal
|
|
10
|
-
* in the Software without restriction, including without limitation the rights
|
|
11
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
-
* furnished to do so, subject to the following conditions:
|
|
14
|
-
*
|
|
15
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
-
* copies or substantial portions of the Software.
|
|
17
|
-
*
|
|
18
|
-
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
-
* SOFTWARE.
|
|
25
|
-
*
|
|
26
|
-
* @project: ab-nextjs-components
|
|
27
|
-
* @name: styles.module.css
|
|
28
|
-
* @file: server/ab-key-feature/styles.module.css
|
|
29
|
-
* @type: CSS Stylesheet
|
|
30
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
.abKeyFeature {
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
gap: 0.5rem;
|
|
37
|
-
padding: 1rem;
|
|
38
|
-
border-radius: 1rem;
|
|
39
|
-
position: relative;
|
|
40
|
-
overflow: hidden;
|
|
41
|
-
background: color-mix(in srgb, var(--ab-surface-container, #f3edf7) 85%, transparent);
|
|
42
|
-
}
|
|
43
|
-
.abKeyFeatureIcon {
|
|
44
|
-
font-size: 2rem;
|
|
45
|
-
color: var(--ab-primary, #6750a4);
|
|
46
|
-
}
|
|
47
|
-
.abKeyFeatureName {
|
|
48
|
-
font-size: 0.75rem;
|
|
49
|
-
font-weight: 700;
|
|
50
|
-
text-transform: uppercase;
|
|
51
|
-
letter-spacing: 0.06em;
|
|
52
|
-
opacity: 0.7;
|
|
53
|
-
}
|
|
54
|
-
.abKeyFeatureTitle {
|
|
55
|
-
margin: 0;
|
|
56
|
-
font-size: 1.25rem;
|
|
57
|
-
font-weight: 700;
|
|
58
|
-
}
|
|
59
|
-
.abKeyFeatureDesc {
|
|
60
|
-
margin: 0;
|
|
61
|
-
font-size: 0.9375rem;
|
|
62
|
-
opacity: 0.8;
|
|
63
|
-
}
|
|
64
|
-
.abKeyFeatureLink {
|
|
65
|
-
margin-top: 0.5rem;
|
|
66
|
-
align-self: flex-start;
|
|
67
|
-
color: var(--ab-primary, #6750a4);
|
|
68
|
-
font-weight: 600;
|
|
69
|
-
text-decoration: none;
|
|
70
|
-
}
|
|
71
|
-
.abKeyFeatureWatermark {
|
|
72
|
-
position: absolute;
|
|
73
|
-
right: -0.5rem;
|
|
74
|
-
bottom: -0.5rem;
|
|
75
|
-
font-size: 5rem;
|
|
76
|
-
opacity: 0.06;
|
|
77
|
-
pointer-events: none;
|
|
78
|
-
user-select: none;
|
|
79
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* @project: ab-nextjs-components
|
|
9
|
-
* @name: AbSwitchBack - Server (port of lyd-switch-back)
|
|
10
|
-
* @file: server/ab-switch-back/index.tsx
|
|
11
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import type { ReactElement, ReactNode } from 'react';
|
|
16
|
-
import Link from '../../ab-link'; // 🔗 G42: injectable via AbLinkProvider (default next/link)
|
|
17
|
-
import Image from 'next/image';
|
|
18
|
-
import clsx from 'clsx';
|
|
19
|
-
import styles from './styles.module.css';
|
|
20
|
-
|
|
21
|
-
export interface AbSwitchBackProps {
|
|
22
|
-
className?: string;
|
|
23
|
-
hidden?: boolean;
|
|
24
|
-
switched?: boolean;
|
|
25
|
-
image: string;
|
|
26
|
-
imageAlt: string;
|
|
27
|
-
title?: ReactNode;
|
|
28
|
-
description?: ReactNode;
|
|
29
|
-
cta1Label: string;
|
|
30
|
-
cta1Link: string;
|
|
31
|
-
cta2Label: string;
|
|
32
|
-
cta2Link: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const AbSwitchBack = ({
|
|
36
|
-
className,
|
|
37
|
-
hidden = false,
|
|
38
|
-
switched = false,
|
|
39
|
-
image,
|
|
40
|
-
imageAlt,
|
|
41
|
-
title,
|
|
42
|
-
description,
|
|
43
|
-
cta1Label,
|
|
44
|
-
cta1Link,
|
|
45
|
-
cta2Label,
|
|
46
|
-
cta2Link,
|
|
47
|
-
}: AbSwitchBackProps): ReactElement => {
|
|
48
|
-
return (
|
|
49
|
-
<section
|
|
50
|
-
hidden={hidden}
|
|
51
|
-
data-switched={switched ? 'true' : 'false'}
|
|
52
|
-
className={clsx('AbSwitchBack', styles.abSwitchBack, className)}
|
|
53
|
-
>
|
|
54
|
-
<div className={styles.abSwitchBackMedia}>
|
|
55
|
-
<Image className={styles.abSwitchBackImage} src={image} alt={imageAlt} width={800} height={600} unoptimized />
|
|
56
|
-
</div>
|
|
57
|
-
<div className={styles.abSwitchBackCopy}>
|
|
58
|
-
{title ? <h2 className={styles.abSwitchBackTitle}>{title}</h2> : null}
|
|
59
|
-
{description ? <div className={styles.abSwitchBackDesc}>{description}</div> : null}
|
|
60
|
-
<div className={styles.abSwitchBackActions}>
|
|
61
|
-
<Link href={cta1Link} className={styles.abSwitchBackCta}>{cta1Label}</Link>
|
|
62
|
-
<Link href={cta2Link} className={clsx(styles.abSwitchBackCta, styles.abSwitchBackCtaSecondary)}>
|
|
63
|
-
{cta2Label}
|
|
64
|
-
</Link>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
</section>
|
|
68
|
-
);
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export default AbSwitchBack;
|
|
72
|
-
export { AbSwitchBack };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
-
* of this software and associated documentation files (the 'Software'), to deal
|
|
10
|
-
* in the Software without restriction, including without limitation the rights
|
|
11
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
-
* furnished to do so, subject to the following conditions:
|
|
14
|
-
*
|
|
15
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
-
* copies or substantial portions of the Software.
|
|
17
|
-
*
|
|
18
|
-
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
-
* SOFTWARE.
|
|
25
|
-
*
|
|
26
|
-
* @project: ab-nextjs-components
|
|
27
|
-
* @name: styles.module.css
|
|
28
|
-
* @file: server/ab-switch-back/styles.module.css
|
|
29
|
-
* @type: CSS Stylesheet
|
|
30
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
.abSwitchBack {
|
|
34
|
-
display: grid;
|
|
35
|
-
grid-template-columns: 1fr;
|
|
36
|
-
gap: 1.25rem;
|
|
37
|
-
align-items: center;
|
|
38
|
-
}
|
|
39
|
-
@media (min-width: 768px) {
|
|
40
|
-
.abSwitchBack {
|
|
41
|
-
grid-template-columns: 1fr 1fr;
|
|
42
|
-
}
|
|
43
|
-
.abSwitchBack[data-switched='true'] .abSwitchBackMedia { order: 2; }
|
|
44
|
-
.abSwitchBack[data-switched='true'] .abSwitchBackCopy { order: 1; }
|
|
45
|
-
}
|
|
46
|
-
.abSwitchBackMedia {
|
|
47
|
-
position: relative;
|
|
48
|
-
width: 100%;
|
|
49
|
-
aspect-ratio: 4 / 3;
|
|
50
|
-
border-radius: 1rem;
|
|
51
|
-
overflow: hidden;
|
|
52
|
-
background: #ddd;
|
|
53
|
-
}
|
|
54
|
-
.abSwitchBackImage {
|
|
55
|
-
object-fit: cover;
|
|
56
|
-
width: 100%;
|
|
57
|
-
height: 100%;
|
|
58
|
-
}
|
|
59
|
-
.abSwitchBackCopy { display: flex; flex-direction: column; gap: 0.75rem; }
|
|
60
|
-
.abSwitchBackTitle { margin: 0; font-size: 1.5rem; font-weight: 700; }
|
|
61
|
-
.abSwitchBackDesc { margin: 0; opacity: 0.8; }
|
|
62
|
-
.abSwitchBackActions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
|
|
63
|
-
.abSwitchBackCta {
|
|
64
|
-
display: inline-flex;
|
|
65
|
-
align-items: center;
|
|
66
|
-
padding: 0.5rem 1rem;
|
|
67
|
-
border-radius: 9999px;
|
|
68
|
-
text-decoration: none;
|
|
69
|
-
font-weight: 600;
|
|
70
|
-
background: var(--ab-primary, #6750a4);
|
|
71
|
-
color: #fff;
|
|
72
|
-
}
|
|
73
|
-
.abSwitchBackCtaSecondary {
|
|
74
|
-
background: transparent;
|
|
75
|
-
color: var(--ab-primary, #6750a4);
|
|
76
|
-
border: 1px solid color-mix(in srgb, var(--ab-primary, #6750a4) 40%, transparent);
|
|
77
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* @project: ab-nextjs-components
|
|
9
|
-
* @name: AbTestHello - Server (port of lyd-test-hello)
|
|
10
|
-
* @file: server/ab-test-hello/index.tsx
|
|
11
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
import type { ReactElement } from 'react';
|
|
15
|
-
import clsx from 'clsx';
|
|
16
|
-
import styles from './styles.module.css';
|
|
17
|
-
|
|
18
|
-
export interface AbTestHelloProps {
|
|
19
|
-
name: string;
|
|
20
|
-
src?: string;
|
|
21
|
-
className?: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const AbTestHello = ({ name, src, className }: AbTestHelloProps): ReactElement => {
|
|
25
|
-
return (
|
|
26
|
-
<div id="abTestHello" className={clsx('AbTestHello', styles.abTestHello, className)}>
|
|
27
|
-
<h2 className={styles.abTestHelloTitle}>
|
|
28
|
-
Hello from <span className={styles.abTestHelloName}>{name}</span>
|
|
29
|
-
</h2>
|
|
30
|
-
{src ? <span className={styles.abTestHelloSrc}>{src}</span> : null}
|
|
31
|
-
</div>
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export default AbTestHello;
|
|
36
|
-
export { AbTestHello };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license MIT
|
|
3
|
-
* ~~~~~~~~~~~~
|
|
4
|
-
* ab-nextjs-components
|
|
5
|
-
* ~~~~~~~~~~~~
|
|
6
|
-
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
-
*
|
|
8
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
-
* of this software and associated documentation files (the 'Software'), to deal
|
|
10
|
-
* in the Software without restriction, including without limitation the rights
|
|
11
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
-
* furnished to do so, subject to the following conditions:
|
|
14
|
-
*
|
|
15
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
-
* copies or substantial portions of the Software.
|
|
17
|
-
*
|
|
18
|
-
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
-
* SOFTWARE.
|
|
25
|
-
*
|
|
26
|
-
* @project: ab-nextjs-components
|
|
27
|
-
* @name: styles.module.css
|
|
28
|
-
* @file: server/ab-test-hello/styles.module.css
|
|
29
|
-
* @type: CSS Stylesheet
|
|
30
|
-
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
.abTestHello {
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
align-items: flex-start;
|
|
37
|
-
text-align: left;
|
|
38
|
-
padding: 1.5rem;
|
|
39
|
-
}
|
|
40
|
-
.abTestHelloTitle {
|
|
41
|
-
margin: 0;
|
|
42
|
-
padding: 0.75rem 0 0.25rem;
|
|
43
|
-
font-size: 1rem;
|
|
44
|
-
}
|
|
45
|
-
.abTestHelloName {
|
|
46
|
-
font-family: ui-serif, Georgia, serif;
|
|
47
|
-
font-weight: 700;
|
|
48
|
-
color: var(--ab-primary, #6750a4);
|
|
49
|
-
}
|
|
50
|
-
.abTestHelloSrc {
|
|
51
|
-
font-family: ui-monospace, monospace;
|
|
52
|
-
font-size: 0.875rem;
|
|
53
|
-
opacity: 0.5;
|
|
54
|
-
}
|
|
55
|
-
.abTestHelloSrc:hover {
|
|
56
|
-
opacity: 0.9;
|
|
57
|
-
}
|