ab-nextjs-components 0.1.1 → 0.1.3

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 (109) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/LICENSE +1 -1
  3. package/README.md +91 -15
  4. package/ab-avatar/index.tsx +90 -0
  5. package/ab-avatar/styles.module.css +62 -0
  6. package/ab-balloon/index.tsx +55 -0
  7. package/ab-balloon/styles.module.css +12 -0
  8. package/ab-brand/index.tsx +88 -0
  9. package/ab-brand/styles.module.css +54 -0
  10. package/ab-button/index.tsx +164 -0
  11. package/ab-button/styles.module.css +63 -0
  12. package/ab-collapsible/index.tsx +188 -0
  13. package/ab-collapsible/styles.module.css +98 -0
  14. package/ab-color/index.tsx +84 -0
  15. package/ab-color/styles.module.css +51 -0
  16. package/ab-demo-box/index.tsx +38 -0
  17. package/ab-demo-box/styles.module.css +13 -0
  18. package/ab-demo-code/index.tsx +62 -0
  19. package/ab-demo-code/styles.module.css +41 -0
  20. package/ab-icon/index.tsx +63 -0
  21. package/ab-icon/styles.module.css +27 -0
  22. package/ab-icon-button/index.tsx +107 -0
  23. package/ab-icon-button/styles.module.css +64 -0
  24. package/ab-image/index.tsx +83 -0
  25. package/ab-image/styles.module.css +27 -0
  26. package/ab-info/index.tsx +89 -0
  27. package/ab-info/styles.module.css +87 -0
  28. package/ab-input/index.tsx +277 -0
  29. package/ab-input/styles.module.css +101 -0
  30. package/ab-key-feature/index.tsx +60 -0
  31. package/ab-key-feature/styles.module.css +47 -0
  32. package/ab-like-button/index.tsx +116 -0
  33. package/ab-like-button/styles.module.css +60 -0
  34. package/ab-logo/index.tsx +94 -0
  35. package/ab-logo/styles.module.css +30 -0
  36. package/ab-main-headline/index.tsx +57 -0
  37. package/ab-main-headline/styles.module.css +24 -0
  38. package/ab-menu/index.tsx +119 -0
  39. package/ab-menu/styles.module.css +99 -0
  40. package/ab-name/index.tsx +49 -0
  41. package/ab-name/styles.module.css +14 -0
  42. package/ab-navbar/index.tsx +68 -0
  43. package/ab-navbar/styles.module.css +35 -0
  44. package/ab-page-paginator/index.tsx +130 -0
  45. package/ab-page-paginator/styles.module.css +47 -0
  46. package/ab-page-switcher/index.tsx +121 -0
  47. package/ab-page-switcher/styles.module.css +37 -0
  48. package/ab-preview/index.tsx +78 -0
  49. package/ab-preview/styles.module.css +26 -0
  50. package/ab-price/index.tsx +109 -0
  51. package/ab-price/styles.module.css +36 -0
  52. package/ab-price-tag/index.tsx +70 -0
  53. package/ab-price-tag/styles.module.css +81 -0
  54. package/ab-product/index.tsx +128 -0
  55. package/ab-product/styles.module.css +44 -0
  56. package/ab-product-item/index.tsx +78 -0
  57. package/ab-product-item/styles.module.css +21 -0
  58. package/ab-progress-chips/index.tsx +105 -0
  59. package/ab-progress-chips/styles.module.css +43 -0
  60. package/ab-search-result/index.tsx +79 -0
  61. package/ab-search-result/styles.module.css +48 -0
  62. package/ab-searchbar/index.tsx +150 -0
  63. package/ab-searchbar/styles.module.css +77 -0
  64. package/ab-sidebar/index.tsx +72 -0
  65. package/ab-sidebar/styles.module.css +41 -0
  66. package/ab-switch-back/index.tsx +72 -0
  67. package/ab-switch-back/styles.module.css +45 -0
  68. package/ab-tab/index.tsx +101 -0
  69. package/ab-tab/styles.module.css +65 -0
  70. package/ab-tabs/index.tsx +45 -0
  71. package/ab-tabs/styles.module.css +17 -0
  72. package/ab-test-hello/index.tsx +37 -0
  73. package/ab-test-hello/styles.module.css +25 -0
  74. package/ab-text/index.tsx +36 -0
  75. package/ab-text/styles.module.css +3 -0
  76. package/index.ts +117 -0
  77. package/package.json +152 -7
  78. package/server/ab-avatar/index.tsx +85 -0
  79. package/server/ab-avatar/styles.module.css +62 -0
  80. package/server/ab-badge/index.tsx +66 -0
  81. package/server/ab-badge/styles.module.css +39 -0
  82. package/server/ab-brand/index.tsx +87 -0
  83. package/server/ab-brand/styles.module.css +54 -0
  84. package/server/ab-button/index.tsx +144 -0
  85. package/server/ab-button/styles.module.css +63 -0
  86. package/server/ab-icon/index.tsx +61 -0
  87. package/server/ab-icon/styles.module.css +27 -0
  88. package/server/ab-key-feature/index.tsx +59 -0
  89. package/server/ab-key-feature/styles.module.css +47 -0
  90. package/server/ab-logo/index.tsx +93 -0
  91. package/server/ab-logo/styles.module.css +30 -0
  92. package/server/ab-name/index.tsx +48 -0
  93. package/server/ab-name/styles.module.css +14 -0
  94. package/server/ab-nav-link/index.tsx +60 -0
  95. package/server/ab-nav-link/styles.module.css +32 -0
  96. package/server/ab-navbar/index.tsx +64 -0
  97. package/server/ab-navbar/styles.module.css +35 -0
  98. package/server/ab-polygon/index.tsx +45 -0
  99. package/server/ab-polygon/styles.module.css +11 -0
  100. package/server/ab-sidebar/index.tsx +68 -0
  101. package/server/ab-sidebar/styles.module.css +41 -0
  102. package/server/ab-switch-back/index.tsx +71 -0
  103. package/server/ab-switch-back/styles.module.css +45 -0
  104. package/server/ab-test-hello/index.tsx +35 -0
  105. package/server/ab-test-hello/styles.module.css +22 -0
  106. package/server/ab-text/index.tsx +33 -0
  107. package/server/ab-text/styles.module.css +3 -0
  108. package/server/index.ts +27 -0
  109. package/types/index.d.ts +54 -0
@@ -0,0 +1,87 @@
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: AbBrand - Server (port of lyd-brand)
10
+ * @file: server/ab-brand/index.tsx
11
+ */
12
+
13
+
14
+ import type { CSSProperties, ReactElement } from 'react';
15
+ import Link from 'next/link';
16
+ import Image from 'next/image';
17
+ import clsx from 'clsx';
18
+ import styles from './styles.module.css';
19
+
20
+ export interface AbBrandProps {
21
+ className?: string;
22
+ type?: 'default' | 'blurred';
23
+ effect?: 'normal' | 'zoom';
24
+ hidden?: boolean;
25
+ image: string;
26
+ imageAlt?: string;
27
+ logo: string;
28
+ logoAlt?: string;
29
+ name: string;
30
+ shortName: string;
31
+ description: string;
32
+ autohideDescription?: boolean;
33
+ color?: string;
34
+ accentColor?: string;
35
+ link: string;
36
+ ctaLabel: string;
37
+ }
38
+
39
+ const AbBrand = ({
40
+ className,
41
+ type = 'default',
42
+ effect = 'normal',
43
+ hidden = false,
44
+ image,
45
+ imageAlt,
46
+ logo,
47
+ logoAlt,
48
+ name,
49
+ shortName,
50
+ description,
51
+ autohideDescription = false,
52
+ color,
53
+ accentColor,
54
+ link,
55
+ ctaLabel,
56
+ }: AbBrandProps): ReactElement => {
57
+ const style = {
58
+ '--ab-brand-color': color,
59
+ '--ab-brand-accent': accentColor,
60
+ } as CSSProperties;
61
+
62
+ return (
63
+ <Link
64
+ href={link}
65
+ hidden={hidden}
66
+ data-type={type}
67
+ data-effect={effect}
68
+ data-autohide-desc={autohideDescription ? 'true' : 'false'}
69
+ className={clsx('AbBrand', styles.abBrand, className)}
70
+ style={style}
71
+ >
72
+ <div className={styles.abBrandImageWrap}>
73
+ <Image className={styles.abBrandImage} src={image} alt={imageAlt ?? name} width={640} height={360} unoptimized />
74
+ </div>
75
+ <div className={styles.abBrandMeta}>
76
+ <Image className={styles.abBrandLogo} src={logo} alt={logoAlt ?? shortName} width={40} height={40} unoptimized />
77
+ <span className={styles.abBrandShort}>{shortName}</span>
78
+ <h3 className={styles.abBrandName}>{name}</h3>
79
+ <p className={styles.abBrandDesc}>{description}</p>
80
+ <span className={styles.abBrandCta}>{ctaLabel}</span>
81
+ </div>
82
+ </Link>
83
+ );
84
+ };
85
+
86
+ export default AbBrand;
87
+ export { AbBrand };
@@ -0,0 +1,54 @@
1
+ .abBrand {
2
+ position: relative;
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 0.75rem;
6
+ padding: 1rem;
7
+ border-radius: 1rem;
8
+ overflow: hidden;
9
+ text-decoration: none;
10
+ color: inherit;
11
+ background: color-mix(in srgb, var(--ab-surface-container, #f3edf7) 90%, transparent);
12
+ }
13
+ .abBrand[data-type='blurred'] {
14
+ backdrop-filter: blur(12px);
15
+ }
16
+ .abBrand[data-effect='zoom']:hover .abBrandImage {
17
+ transform: scale(1.05);
18
+ }
19
+ .abBrandImageWrap {
20
+ position: relative;
21
+ width: 100%;
22
+ aspect-ratio: 16 / 9;
23
+ border-radius: 0.75rem;
24
+ overflow: hidden;
25
+ background: #ddd;
26
+ }
27
+ .abBrandImage {
28
+ object-fit: cover;
29
+ width: 100%;
30
+ height: 100%;
31
+ transition: transform 0.35s ease;
32
+ }
33
+ .abBrandLogo {
34
+ width: 2.5rem;
35
+ height: 2.5rem;
36
+ object-fit: contain;
37
+ }
38
+ .abBrandMeta { display: flex; flex-direction: column; gap: 0.25rem; }
39
+ .abBrandName { margin: 0; font-size: 1.125rem; font-weight: 700; }
40
+ .abBrandShort { font-size: 0.75rem; font-weight: 600; opacity: 0.7; text-transform: uppercase; }
41
+ .abBrandDesc { margin: 0; font-size: 0.875rem; opacity: 0.8; }
42
+ .abBrand[data-autohide-desc='true'] .abBrandDesc { display: none; }
43
+ .abBrandCta {
44
+ align-self: flex-start;
45
+ border: none;
46
+ border-radius: 9999px;
47
+ padding: 0.4rem 0.9rem;
48
+ background: var(--ab-brand-accent, var(--ab-primary, #6750a4));
49
+ color: #fff;
50
+ font: inherit;
51
+ font-weight: 600;
52
+ cursor: pointer;
53
+ text-decoration: none;
54
+ }
@@ -0,0 +1,144 @@
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
+ *
27
+ * @project: ab-nextjs-components
28
+ * @name: AbButton - Server (no onClick; href→<a> or submit)
29
+ * @file: server/ab-button/index.tsx
30
+ */
31
+
32
+ import type { CSSProperties, ReactElement, ReactNode } from 'react';
33
+ import clsx from 'clsx';
34
+ import styles from './styles.module.css';
35
+
36
+ export type AbButtonType = 'contained' | 'outlined' | 'text';
37
+ export type AbButtonColor = 'primary' | 'secondary' | 'tertiary' | 'white' | 'black';
38
+
39
+ export interface AbButtonProps {
40
+ id?: string;
41
+ type?: AbButtonType;
42
+ htmlType?: 'button' | 'submit' | 'reset';
43
+ className?: string;
44
+ hidden?: boolean;
45
+ style?: CSSProperties;
46
+ rounded?: boolean;
47
+ raised?: boolean;
48
+ shrinks?: boolean;
49
+ expands?: boolean;
50
+ withIcon?: boolean;
51
+ disabled?: boolean;
52
+ iconPosition?: 'left' | 'right';
53
+ label: string;
54
+ icon?: string;
55
+ color?: AbButtonColor;
56
+ href?: string;
57
+ children?: ReactNode;
58
+ }
59
+
60
+ /** Server AbButton — no onClick. Use href for links or htmlType for form submit. */
61
+ const AbButton = ({
62
+ id,
63
+ type = 'contained',
64
+ htmlType = 'button',
65
+ className,
66
+ hidden = false,
67
+ style,
68
+ rounded = true,
69
+ raised = false,
70
+ shrinks = false,
71
+ expands = false,
72
+ withIcon = false,
73
+ disabled = false,
74
+ iconPosition = 'left',
75
+ label,
76
+ icon,
77
+ color = 'primary',
78
+ href,
79
+ children,
80
+ }: AbButtonProps): ReactElement => {
81
+ const classNames = clsx(
82
+ 'AbButton',
83
+ styles.abButton,
84
+ className,
85
+ rounded && styles.abButtonRounded,
86
+ disabled && styles.isDisabled,
87
+ );
88
+
89
+ const dataAttrs = {
90
+ 'data-type': type,
91
+ 'data-raised': raised ? 'true' : 'false',
92
+ 'data-shrinks': shrinks ? 'true' : 'false',
93
+ 'data-expands': expands ? 'true' : 'false',
94
+ 'data-rounded': rounded ? 'true' : 'false',
95
+ 'data-iconpos': iconPosition,
96
+ 'data-color': color,
97
+ } as const;
98
+
99
+ const content = (
100
+ <>
101
+ {withIcon && iconPosition === 'left' && icon ? (
102
+ <span className={clsx('material-symbols-rounded', 'icon')}>{icon}</span>
103
+ ) : null}
104
+ <span>{children ?? label}</span>
105
+ {withIcon && iconPosition === 'right' && icon ? (
106
+ <span className={clsx('material-symbols-rounded', 'icon')}>{icon}</span>
107
+ ) : null}
108
+ </>
109
+ );
110
+
111
+ if (href) {
112
+ return (
113
+ <a
114
+ id={id}
115
+ href={disabled ? undefined : href}
116
+ role="button"
117
+ className={classNames}
118
+ style={style}
119
+ hidden={hidden}
120
+ aria-disabled={disabled}
121
+ {...dataAttrs}
122
+ >
123
+ {content}
124
+ </a>
125
+ );
126
+ }
127
+
128
+ return (
129
+ <button
130
+ id={id}
131
+ type={htmlType}
132
+ className={classNames}
133
+ style={style}
134
+ hidden={hidden}
135
+ disabled={disabled}
136
+ {...dataAttrs}
137
+ >
138
+ {content}
139
+ </button>
140
+ );
141
+ };
142
+
143
+ export default AbButton;
144
+ export { AbButton };
@@ -0,0 +1,63 @@
1
+ /*
2
+ * @license MIT
3
+ * ~~~~~~~~~~~~
4
+ * ab-nextjs-components
5
+ * Plain CSS modules — no Tailwind Tailwind apply (Turbopack-safe).
6
+ */
7
+
8
+ /*
9
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
+ * MOTTO: We'll always do more 😜!!!
11
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
+ */
13
+
14
+ .abButton {
15
+ position: relative;
16
+ display: inline-flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ gap: 0.5rem;
20
+ width: fit-content;
21
+ height: fit-content;
22
+ margin: 0;
23
+ overflow: hidden;
24
+ font-size: 1rem;
25
+ line-height: 1.25;
26
+ text-decoration: none;
27
+ cursor: pointer;
28
+ border: none;
29
+ background: transparent;
30
+ color: inherit;
31
+ }
32
+
33
+ .abButtonRounded {
34
+ border-radius: 9999px;
35
+ }
36
+
37
+ .isContained {}
38
+
39
+ .isDisabled {
40
+ pointer-events: none;
41
+ opacity: 0.6;
42
+ }
43
+
44
+ .abButtonIcon {
45
+ font-size: 1.25rem;
46
+ line-height: 1;
47
+ }
48
+
49
+ .abButtonSpinnerSlot {
50
+ position: absolute;
51
+ inset: 0;
52
+ z-index: 10;
53
+ display: flex;
54
+ align-items: center;
55
+ justify-content: center;
56
+ }
57
+
58
+ .abButtonSpinner {
59
+ /* themed via --ab-button-spinner-color when present */
60
+ }
61
+
62
+ .hidden { display: none !important; }
63
+ .invisible { visibility: hidden; }
@@ -0,0 +1,61 @@
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
+ *
27
+ * @project: ab-nextjs-components
28
+ * @name: AbIcon - Server
29
+ * @file: server/ab-icon/index.tsx
30
+ */
31
+
32
+ import type { ReactElement } from 'react';
33
+ import clsx from 'clsx';
34
+ import styles from './styles.module.css';
35
+
36
+ export interface AbIconProps {
37
+ name: string;
38
+ className?: string;
39
+ filled?: boolean;
40
+ size?: number | string;
41
+ title?: string;
42
+ }
43
+
44
+ /** Material Symbols ligature icon (server / RSC). */
45
+ const AbIcon = ({ name, className, filled = false, size, title }: AbIconProps): ReactElement => {
46
+ return (
47
+ <span
48
+ className={clsx('material-symbols-rounded', 'icon', styles.abIcon, className)}
49
+ style={size != null ? { fontSize: typeof size === 'number' ? `${size}px` : size } : undefined}
50
+ title={title}
51
+ aria-hidden={title ? undefined : true}
52
+ role={title ? 'img' : undefined}
53
+ data-filled={filled ? 'true' : 'false'}
54
+ >
55
+ {name}
56
+ </span>
57
+ );
58
+ };
59
+
60
+ export default AbIcon;
61
+ export { AbIcon };
@@ -0,0 +1,27 @@
1
+ /*
2
+ * @license MIT
3
+ * ~~~~~~~~~~~~
4
+ * ab-nextjs-components
5
+ * ~~~~~~~~~~~~
6
+ * Copyright (c) 2026 Abraham Ukachi. The abElements Project.
7
+ * Plain CSS modules — no Tailwind Tailwind apply (Turbopack-safe).
8
+ */
9
+
10
+ /*
11
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
+ * MOTTO: We'll always do more 😜!!!
13
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
+ */
15
+
16
+ .abIcon {
17
+ display: inline-flex;
18
+ align-items: center;
19
+ justify-content: center;
20
+ font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
21
+ line-height: 1;
22
+ user-select: none;
23
+ }
24
+
25
+ .abIcon[data-filled='true'] {
26
+ font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
27
+ }
@@ -0,0 +1,59 @@
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
+ */
12
+
13
+
14
+ import type { ReactElement } from 'react';
15
+ import Link from 'next/link';
16
+ import clsx from 'clsx';
17
+ import styles from './styles.module.css';
18
+
19
+ export interface AbKeyFeatureProps {
20
+ className?: string;
21
+ hidden?: boolean;
22
+ icon: string;
23
+ name: string;
24
+ title: string;
25
+ description?: string;
26
+ linkHidden?: boolean;
27
+ linkLabel?: string;
28
+ link?: string;
29
+ watermark?: string;
30
+ }
31
+
32
+ const AbKeyFeature = ({
33
+ className,
34
+ hidden = false,
35
+ icon,
36
+ name,
37
+ title,
38
+ description,
39
+ linkHidden = false,
40
+ linkLabel = 'Learn more',
41
+ link,
42
+ watermark,
43
+ }: AbKeyFeatureProps): ReactElement => {
44
+ return (
45
+ <article hidden={hidden} className={clsx('AbKeyFeature', styles.abKeyFeature, className)}>
46
+ <span className={clsx('material-symbols-rounded', styles.abKeyFeatureIcon)} aria-hidden>{icon}</span>
47
+ <span className={styles.abKeyFeatureName}>{name}</span>
48
+ <h3 className={styles.abKeyFeatureTitle}>{title}</h3>
49
+ {description ? <p className={styles.abKeyFeatureDesc}>{description}</p> : null}
50
+ {!linkHidden && link ? (
51
+ <Link href={link} className={styles.abKeyFeatureLink}>{linkLabel}</Link>
52
+ ) : null}
53
+ {watermark ? <span className={styles.abKeyFeatureWatermark} aria-hidden>{watermark}</span> : null}
54
+ </article>
55
+ );
56
+ };
57
+
58
+ export default AbKeyFeature;
59
+ export { AbKeyFeature };
@@ -0,0 +1,47 @@
1
+ .abKeyFeature {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 0.5rem;
5
+ padding: 1rem;
6
+ border-radius: 1rem;
7
+ position: relative;
8
+ overflow: hidden;
9
+ background: color-mix(in srgb, var(--ab-surface-container, #f3edf7) 85%, transparent);
10
+ }
11
+ .abKeyFeatureIcon {
12
+ font-size: 2rem;
13
+ color: var(--ab-primary, #6750a4);
14
+ }
15
+ .abKeyFeatureName {
16
+ font-size: 0.75rem;
17
+ font-weight: 700;
18
+ text-transform: uppercase;
19
+ letter-spacing: 0.06em;
20
+ opacity: 0.7;
21
+ }
22
+ .abKeyFeatureTitle {
23
+ margin: 0;
24
+ font-size: 1.25rem;
25
+ font-weight: 700;
26
+ }
27
+ .abKeyFeatureDesc {
28
+ margin: 0;
29
+ font-size: 0.9375rem;
30
+ opacity: 0.8;
31
+ }
32
+ .abKeyFeatureLink {
33
+ margin-top: 0.5rem;
34
+ align-self: flex-start;
35
+ color: var(--ab-primary, #6750a4);
36
+ font-weight: 600;
37
+ text-decoration: none;
38
+ }
39
+ .abKeyFeatureWatermark {
40
+ position: absolute;
41
+ right: -0.5rem;
42
+ bottom: -0.5rem;
43
+ font-size: 5rem;
44
+ opacity: 0.06;
45
+ pointer-events: none;
46
+ user-select: none;
47
+ }
@@ -0,0 +1,93 @@
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
+ *
27
+ * @project: ab-nextjs-components
28
+ * @name: AbLogo - Server
29
+ * @file: server/ab-logo/index.tsx
30
+ */
31
+
32
+
33
+ import type { ReactElement } from 'react';
34
+ import clsx from 'clsx';
35
+ import styles from './styles.module.css';
36
+
37
+ export type AbLogoType = 'contained' | 'outlined' | 'hollow' | 'naked';
38
+
39
+ export interface AbLogoProps {
40
+ type?: AbLogoType;
41
+ className?: string;
42
+ /** Optional image src (contained). Defaults to ab-nextjs-icons Ab logo. */
43
+ src?: string;
44
+ /** Optional CSS mask value for outlined/hollow/naked. */
45
+ mask?: string;
46
+ alt?: string;
47
+ size?: number | string;
48
+ }
49
+
50
+ const DEFAULT_SRC = '/ab-nextjs-icons/logos/ab-logo.svg';
51
+
52
+ const AbLogo = ({
53
+ type = 'naked',
54
+ className,
55
+ src,
56
+ mask,
57
+ alt = 'Ab',
58
+ size,
59
+ }: AbLogoProps): ReactElement => {
60
+ const dim = size != null ? (typeof size === 'number' ? `${size}px` : size) : undefined;
61
+
62
+ if (type === 'contained') {
63
+ return (
64
+ <img
65
+ className={clsx('AbLogo', 'app-logo', styles.abLogoContained, className)}
66
+ src={src ?? DEFAULT_SRC}
67
+ alt={alt}
68
+ data-type="contained"
69
+ style={dim ? { width: dim, height: dim } : undefined}
70
+ />
71
+ );
72
+ }
73
+
74
+ const maskValue = mask ?? `url('${DEFAULT_SRC}') no-repeat 50% 50%`;
75
+ return (
76
+ <span
77
+ className={clsx('AbLogo', 'app-logo', styles.abLogo, className)}
78
+ data-type={type}
79
+ role="img"
80
+ aria-label={alt}
81
+ style={{
82
+ ...(dim ? { width: dim, height: dim } : {}),
83
+ WebkitMask: maskValue,
84
+ mask: maskValue,
85
+ WebkitMaskSize: 'cover',
86
+ maskSize: 'cover',
87
+ }}
88
+ />
89
+ );
90
+ };
91
+
92
+ export default AbLogo;
93
+ export { AbLogo };
@@ -0,0 +1,30 @@
1
+ /*
2
+ * @license MIT
3
+ * ~~~~~~~~~~~~
4
+ * ab-nextjs-components
5
+ * ~~~~~~~~~~~~
6
+ * Copyright (c) 2026 Abraham Ukachi. The abElements Project.
7
+ * Plain CSS modules — no Tailwind Tailwind apply (Turbopack-safe).
8
+ */
9
+
10
+ /*
11
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
+ * MOTTO: We'll always do more 😜!!!
13
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
+ */
15
+
16
+ .abLogo {
17
+ display: block;
18
+ position: relative;
19
+ width: 1.5rem;
20
+ height: 1.5rem;
21
+ background-color: var(--app-logo-color, #a67c52);
22
+ }
23
+
24
+ .abLogoContained {
25
+ display: block;
26
+ position: relative;
27
+ width: 1.5rem;
28
+ height: 1.5rem;
29
+ object-fit: contain;
30
+ }