ab-nextjs-components 0.1.12 → 0.1.14

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 (145) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +52 -0
  3. package/ab-app-bar/index.tsx +210 -0
  4. package/ab-app-bar/styles.module.css +158 -0
  5. package/ab-avatar/index.tsx +2 -1
  6. package/ab-avatar/styles.module.css +32 -0
  7. package/ab-balloon/index.tsx +134 -23
  8. package/ab-balloon/styles.module.css +84 -7
  9. package/ab-bottom-drawer/index.tsx +71 -0
  10. package/ab-bottom-drawer/styles.module.css +66 -0
  11. package/ab-brand/index.tsx +1 -1
  12. package/ab-breadcrumbs/index.tsx +92 -0
  13. package/ab-breadcrumbs/styles.module.css +54 -0
  14. package/ab-button/helpers.ts +6 -1
  15. package/ab-button/index.tsx +23 -4
  16. package/ab-button/styles.module.css +70 -0
  17. package/ab-card/index.tsx +89 -0
  18. package/ab-card/styles.module.css +68 -0
  19. package/ab-carousel/styles.module.css +1 -1
  20. package/ab-chip/index.tsx +16 -4
  21. package/ab-chip/styles.module.css +12 -1
  22. package/ab-collapsible/index.tsx +1 -1
  23. package/ab-color/index.tsx +1 -0
  24. package/ab-color/styles.module.css +32 -0
  25. package/ab-confirm-drawer/index.tsx +97 -0
  26. package/ab-confirm-drawer/styles.module.css +41 -0
  27. package/ab-demo-box/index.tsx +1 -0
  28. package/ab-demo-box/styles.module.css +32 -0
  29. package/ab-demo-code/index.tsx +1 -0
  30. package/ab-demo-code/styles.module.css +32 -0
  31. package/ab-drawer/index.tsx +307 -0
  32. package/ab-drawer/styles.module.css +127 -0
  33. package/ab-drawer/use-ab-drawer.ts +89 -0
  34. package/ab-drawer-list/index.tsx +118 -0
  35. package/ab-drawer-list/styles.module.css +65 -0
  36. package/ab-flow-diagram/styles.module.css +2 -2
  37. package/ab-icon/builtin.ts +19 -1
  38. package/ab-icon/helpers.ts +37 -0
  39. package/ab-icon/index.tsx +14 -8
  40. package/ab-icon/registrar.tsx +68 -0
  41. package/ab-icon-button/index.tsx +19 -3
  42. package/ab-icon-button/styles.module.css +1 -1
  43. package/ab-image/index.tsx +1 -0
  44. package/ab-image/styles.module.css +32 -0
  45. package/ab-info/index.tsx +2 -1
  46. package/ab-info/styles.module.css +32 -0
  47. package/ab-input/index.tsx +1 -0
  48. package/ab-input/styles.module.css +1 -0
  49. package/ab-install-snippet/index.tsx +51 -29
  50. package/ab-install-snippet/styles.module.css +50 -4
  51. package/ab-kbd/index.tsx +65 -0
  52. package/ab-kbd/styles.module.css +55 -0
  53. package/ab-key-feature/index.tsx +2 -1
  54. package/ab-key-feature/styles.module.css +32 -0
  55. package/ab-like-button/index.tsx +1 -1
  56. package/ab-link/index.tsx +112 -0
  57. package/ab-link/locale.ts +53 -0
  58. package/ab-list/index.tsx +107 -0
  59. package/ab-list/styles.module.css +82 -0
  60. package/ab-locale-switcher/index.tsx +59 -10
  61. package/ab-locale-switcher/styles.module.css +15 -4
  62. package/ab-main-headline/index.tsx +1 -0
  63. package/ab-main-headline/styles.module.css +32 -0
  64. package/ab-menu/index.tsx +6 -5
  65. package/ab-menu/styles.module.css +32 -0
  66. package/ab-name/index.tsx +1 -0
  67. package/ab-name/styles.module.css +32 -0
  68. package/ab-navbar/index.tsx +54 -46
  69. package/ab-navbar/styles.module.css +102 -28
  70. package/ab-navbar/view.tsx +166 -0
  71. package/ab-package-card/index.tsx +141 -0
  72. package/ab-package-card/styles.module.css +81 -0
  73. package/ab-page-paginator/index.tsx +1 -0
  74. package/ab-page-paginator/styles.module.css +32 -0
  75. package/ab-page-switcher/index.tsx +1 -0
  76. package/ab-page-switcher/styles.module.css +32 -0
  77. package/ab-preview/index.tsx +1 -0
  78. package/ab-preview/styles.module.css +32 -0
  79. package/ab-price/index.tsx +1 -0
  80. package/ab-price/styles.module.css +32 -0
  81. package/ab-price-tag/index.tsx +1 -0
  82. package/ab-price-tag/styles.module.css +32 -0
  83. package/ab-product/index.tsx +1 -0
  84. package/ab-product/styles.module.css +32 -0
  85. package/ab-product-item/index.tsx +1 -0
  86. package/ab-product-item/styles.module.css +32 -0
  87. package/ab-search-result/index.tsx +1 -0
  88. package/ab-search-result/styles.module.css +32 -0
  89. package/ab-search-trigger/index.tsx +157 -0
  90. package/ab-search-trigger/styles.module.css +96 -0
  91. package/ab-sidebar/index.tsx +91 -49
  92. package/ab-sidebar/styles.module.css +179 -31
  93. package/ab-sidebar/view.tsx +192 -0
  94. package/ab-switch-back/index.tsx +2 -1
  95. package/ab-switch-back/styles.module.css +32 -0
  96. package/ab-tab/index.tsx +2 -1
  97. package/ab-tab/styles.module.css +32 -0
  98. package/ab-tabs/index.tsx +1 -0
  99. package/ab-tabs/styles.module.css +32 -0
  100. package/ab-test-hello/index.tsx +1 -0
  101. package/ab-test-hello/styles.module.css +32 -0
  102. package/ab-text/index.tsx +1 -0
  103. package/ab-text/styles.module.css +32 -0
  104. package/ab-theme-toggle/index.tsx +21 -6
  105. package/ab-theme-toggle/styles.module.css +18 -3
  106. package/ab-toc/index.tsx +131 -0
  107. package/ab-toc/styles.module.css +66 -0
  108. package/ab-version-switcher/index.tsx +143 -0
  109. package/ab-version-switcher/styles.module.css +76 -0
  110. package/css/chrome-mq.css +32 -0
  111. package/css/doodle.css +32 -0
  112. package/css/logo.css +32 -0
  113. package/css/spinner.css +32 -0
  114. package/css/toast.css +32 -0
  115. package/index.ts +45 -0
  116. package/package.json +42 -10
  117. package/server/ab-avatar/index.tsx +2 -1
  118. package/server/ab-avatar/styles.module.css +32 -0
  119. package/server/ab-badge/index.tsx +1 -0
  120. package/server/ab-badge/styles.module.css +32 -0
  121. package/server/ab-brand/index.tsx +1 -1
  122. package/server/ab-button/index.tsx +6 -2
  123. package/server/ab-button/styles.module.css +39 -0
  124. package/server/ab-icon/index.tsx +13 -8
  125. package/server/ab-key-feature/index.tsx +2 -1
  126. package/server/ab-key-feature/styles.module.css +32 -0
  127. package/server/ab-name/index.tsx +1 -0
  128. package/server/ab-name/styles.module.css +32 -0
  129. package/server/ab-nav-link/index.tsx +2 -1
  130. package/server/ab-nav-link/styles.module.css +32 -0
  131. package/server/ab-navbar/index.tsx +44 -45
  132. package/server/ab-polygon/index.tsx +1 -0
  133. package/server/ab-polygon/styles.module.css +32 -0
  134. package/server/ab-sidebar/index.tsx +44 -49
  135. package/server/ab-switch-back/index.tsx +2 -1
  136. package/server/ab-switch-back/styles.module.css +32 -0
  137. package/server/ab-test-hello/index.tsx +1 -0
  138. package/server/ab-test-hello/styles.module.css +32 -0
  139. package/server/ab-text/index.tsx +1 -0
  140. package/server/ab-text/styles.module.css +32 -0
  141. package/server/index.ts +1 -0
  142. package/styles.css +32 -0
  143. package/types/index.d.ts +54 -0
  144. package/server/ab-navbar/styles.module.css +0 -35
  145. package/server/ab-sidebar/styles.module.css +0 -41
@@ -5,60 +5,59 @@
5
5
  * ~~~~~~~~~~~~
6
6
  * Copyright (c) 2026 Abraham Ukachi. The abElements Project.
7
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
+ *
8
26
  * @project: ab-nextjs-components
9
- * @name: AbNavbar - Server (port of lyd-navbar)
27
+ * @name: AbNavbar - Server (G41)
10
28
  * @file: server/ab-navbar/index.tsx
29
+ * @type: Server Component
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
31
  */
12
32
 
33
+ /*
34
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
35
+ * MOTTO: We'll always do more 😜!!!
36
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
37
+ */
38
+
39
+ // ⚛️ React
13
40
  import type { ReactElement } from 'react';
14
- import Link from 'next/link';
15
- import clsx from 'clsx';
16
- import styles from './styles.module.css';
41
+ // 🔣 server AbIcon
42
+ import AbIcon from '../ab-icon';
43
+ // 🖼️ shared view
44
+ import { AbNavbarView, isAbNavbarActive, type AbNavbarBaseProps, type AbNavbarLinkItem } from '../../ab-navbar/view';
45
+ // 🌍 0.1.13: strip `/fr` from activeHref when `locales` is given (pure helper, server-safe)
46
+ import { stripAbLocalePrefix } from '../../ab-link/locale';
17
47
 
18
- export type AbNavbarLink = {
19
- href: string;
20
- icon: string;
21
- value: string;
22
- label: string;
23
- };
48
+ // 📦 shared types
49
+ export type { AbNavbarLinkItem, AbNavbarLink } from '../../ab-navbar/view';
24
50
 
25
- export interface AbNavbarProps {
26
- className?: string;
27
- type?: 'customer' | 'admin';
28
- page?: string;
29
- links?: AbNavbarLink[];
30
- }
51
+ /** ⚙️ Server props: link items only (buttons need a client `onSelect`). */
52
+ export type AbNavbarProps = AbNavbarBaseProps<AbNavbarLinkItem>;
31
53
 
32
- const AbNavbar = ({
33
- className,
34
- type = 'customer',
35
- page,
36
- links = [],
37
- }: AbNavbarProps): ReactElement => {
38
- return (
39
- <nav data-type={type} data-ab-part="bottomBar" className={clsx('AbNavbar', styles.abNavbar, className)} aria-label="Primary">
40
- <ul className={styles.abNavbarList}>
41
- {links.map((link) => {
42
- const active = page === link.value;
43
- return (
44
- <li key={link.value}>
45
- <Link
46
- href={link.href}
47
- data-active={active ? 'true' : 'false'}
48
- className={styles.abNavbarLink}
49
- >
50
- <span className={clsx('material-symbols-rounded', styles.abNavbarIcon)} aria-hidden>
51
- {link.icon}
52
- </span>
53
- <span>{link.label}</span>
54
- </Link>
55
- </li>
56
- );
57
- })}
58
- </ul>
59
- </nav>
60
- );
54
+ /** 📱 AbNavbar (server, G41): same markup as the client twin; active from `activeHref` / legacy `page`. */
55
+ const AbNavbar = (props: AbNavbarProps): ReactElement => {
56
+ const { page, activeHref } = props;
57
+ const active = (href: string, value?: string) => (page ? page === value : isAbNavbarActive(href, activeHref && stripAbLocalePrefix(activeHref, props.locales))); // 🎯
58
+ return <AbNavbarView props={props} Icon={AbIcon} active={active} />;
61
59
  };
62
60
 
61
+ // 📦 exports
63
62
  export default AbNavbar;
64
63
  export { AbNavbar };
@@ -8,6 +8,7 @@
8
8
  * @project: ab-nextjs-components
9
9
  * @name: AbPolygon - Server (port of lyd-polygon)
10
10
  * @file: server/ab-polygon/index.tsx
11
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
12
  */
12
13
 
13
14
  import type { ReactElement } from 'react';
@@ -1,3 +1,35 @@
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-polygon/styles.module.css
29
+ * @type: CSS Stylesheet
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
31
+ */
32
+
1
33
  .abPolygon {
2
34
  display: block;
3
35
  line-height: 0;
@@ -5,64 +5,59 @@
5
5
  * ~~~~~~~~~~~~
6
6
  * Copyright (c) 2026 Abraham Ukachi. The abElements Project.
7
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
+ *
8
26
  * @project: ab-nextjs-components
9
- * @name: AbSidebar - Server (port of lyd-sidebar)
27
+ * @name: AbSidebar - Server (G40)
10
28
  * @file: server/ab-sidebar/index.tsx
29
+ * @type: Server Component
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
31
  */
12
32
 
33
+ /*
34
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
35
+ * MOTTO: We'll always do more 😜!!!
36
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
37
+ */
38
+
39
+ // ⚛️ React
13
40
  import type { ReactElement } from 'react';
14
- import Link from 'next/link';
15
- import clsx from 'clsx';
16
- import styles from './styles.module.css';
41
+ // 🔣 server AbIcon (full AbIcons map; no JS shipped)
42
+ import AbIcon from '../ab-icon';
43
+ // 🖼️ shared view (same markup as the client twin)
44
+ import { AbSidebarView, isAbSidebarActive, type AbSidebarBaseProps } from '../../ab-sidebar/view';
45
+ // 🌍 0.1.13: strip `/fr` from activeHref when `locales` is given (pure helper, server-safe)
46
+ import { stripAbLocalePrefix } from '../../ab-link/locale';
17
47
 
18
- export type AbSidebarLink = {
19
- href: string;
20
- icon: string;
21
- value: string;
22
- label: string;
23
- };
48
+ // 📦 shared types
49
+ export type { AbSidebarItem, AbSidebarSection, AbSidebarLink, AbSidebarLabels } from '../../ab-sidebar/view';
24
50
 
25
- export interface AbSidebarProps {
26
- className?: string;
27
- type?: 'customer' | 'admin';
28
- page?: string;
29
- links?: AbSidebarLink[];
30
- brandHref?: string;
31
- brandLabel?: string;
32
- }
51
+ /** ⚙️ Server props: no collapse button (needs JS); pass `collapsed` for a static rail. */
52
+ export type AbSidebarProps = AbSidebarBaseProps;
33
53
 
34
- const AbSidebar = ({
35
- className,
36
- type = 'customer',
37
- page,
38
- links = [],
39
- brandHref = '/',
40
- brandLabel = 'abElements',
41
- }: AbSidebarProps): ReactElement => {
42
- return (
43
- <nav data-type={type} data-ab-part="sidebar" className={clsx('AbSidebar', styles.abSidebar, className)} aria-label="Sidebar">
44
- <Link href={brandHref} className={styles.abSidebarBrand}>
45
- <span className="material-symbols-rounded" aria-hidden>apps</span>
46
- <span>{brandLabel}</span>
47
- </Link>
48
- <ul className={styles.abSidebarList}>
49
- {links.map((link) => {
50
- const active = page === link.value;
51
- return (
52
- <li key={link.value}>
53
- <Link href={link.href} data-active={active ? 'true' : 'false'} className={styles.abSidebarLink}>
54
- <span className={clsx('material-symbols-rounded', styles.abSidebarIcon)} aria-hidden>
55
- {link.icon}
56
- </span>
57
- <span>{link.label}</span>
58
- </Link>
59
- </li>
60
- );
61
- })}
62
- </ul>
63
- </nav>
64
- );
54
+ /** 🧭 AbSidebar (server, G40): same markup as the client twin; active state from `activeHref` / legacy `page`. */
55
+ const AbSidebar = (props: AbSidebarProps): ReactElement => {
56
+ const { page, activeHref } = props;
57
+ const active = (href: string, value?: string) => (page ? page === value : isAbSidebarActive(href, activeHref && stripAbLocalePrefix(activeHref, props.locales))); // 🎯
58
+ return <AbSidebarView props={props} Icon={AbIcon} active={active} />;
65
59
  };
66
60
 
61
+ // 📦 exports
67
62
  export default AbSidebar;
68
63
  export { AbSidebar };
@@ -8,11 +8,12 @@
8
8
  * @project: ab-nextjs-components
9
9
  * @name: AbSwitchBack - Server (port of lyd-switch-back)
10
10
  * @file: server/ab-switch-back/index.tsx
11
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
12
  */
12
13
 
13
14
 
14
15
  import type { ReactElement, ReactNode } from 'react';
15
- import Link from 'next/link';
16
+ import Link from '../../ab-link'; // 🔗 G42: injectable via AbLinkProvider (default next/link)
16
17
  import Image from 'next/image';
17
18
  import clsx from 'clsx';
18
19
  import styles from './styles.module.css';
@@ -1,3 +1,35 @@
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
+
1
33
  .abSwitchBack {
2
34
  display: grid;
3
35
  grid-template-columns: 1fr;
@@ -8,6 +8,7 @@
8
8
  * @project: ab-nextjs-components
9
9
  * @name: AbTestHello - Server (port of lyd-test-hello)
10
10
  * @file: server/ab-test-hello/index.tsx
11
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
12
  */
12
13
 
13
14
  import type { ReactElement } from 'react';
@@ -1,3 +1,35 @@
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
+
1
33
  .abTestHello {
2
34
  display: flex;
3
35
  flex-direction: column;
@@ -8,6 +8,7 @@
8
8
  * @project: ab-nextjs-components
9
9
  * @name: AbText - Server (port of lyd-text; i18n stripped)
10
10
  * @file: server/ab-text/index.tsx
11
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
12
  */
12
13
 
13
14
  import type { ReactElement } from 'react';
@@ -1,3 +1,35 @@
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-text/styles.module.css
29
+ * @type: CSS Stylesheet
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
31
+ */
32
+
1
33
  .abText {
2
34
  display: inline;
3
35
  }
package/server/index.ts CHANGED
@@ -8,6 +8,7 @@
8
8
  * @project: ab-nextjs-components
9
9
  * @name: Server Components - Barrel
10
10
  * @file: server/index.ts
11
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
12
  */
12
13
 
13
14
  export { default as AbIcon } from './ab-icon/index.tsx'
package/styles.css CHANGED
@@ -1,3 +1,35 @@
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.css
28
+ * @file: styles.css
29
+ * @type: CSS Stylesheet
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
31
+ */
32
+
1
33
  /*
2
34
  * ab-nextjs-components — component chrome (dialog, toast, logo, spinner, doodle)
3
35
  *
package/types/index.d.ts CHANGED
@@ -1,3 +1,35 @@
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: index.d.ts
28
+ * @file: types/index.d.ts
29
+ * @type: TypeScript Declarations
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
31
+ */
32
+
1
33
  export type ComponentCatalogStatus = 'Pending' | 'InProgress' | 'Done';
2
34
 
3
35
  export type ComponentCatalogEntry = {
@@ -43,6 +75,28 @@ export { default as AbBrand } from '../ab-brand/index.tsx';
43
75
  export { default as AbName } from '../ab-name/index.tsx';
44
76
  export { default as AbNavbar } from '../ab-navbar/index.tsx';
45
77
  export { default as AbSidebar } from '../ab-sidebar/index.tsx';
78
+ // 📑 0.1.13 (Joseph): AbToc + the panes main-scroller helpers (also at `ab-nextjs-components/ab-toc`)
79
+ export { default as AbToc, getAbMainScroller, AB_MAIN_SCROLLER_SELECTOR } from '../ab-toc/index.tsx';
80
+ export type { AbTocItem, AbTocProps } from '../ab-toc/index.tsx';
81
+ // 🗄️ 0.1.14 (G53): AbDrawer + useAbDrawer (also at `ab-nextjs-components/ab-drawer`)
82
+ export { default as AbDrawer, useAbDrawer, getAbDrawerHost, AB_DRAWER_DURATION } from '../ab-drawer/index.tsx';
83
+ export type { AbDrawerProps, AbDrawerSide, AbDrawerScope, UseAbDrawer } from '../ab-drawer/index.tsx';
84
+ export { default as AbDrawerList } from '../ab-drawer-list/index.tsx';
85
+ export type { AbDrawerListItem, AbDrawerListProps } from '../ab-drawer-list/index.tsx';
86
+ export { default as AbConfirmDrawer } from '../ab-confirm-drawer/index.tsx';
87
+ export type { AbConfirmDrawerProps } from '../ab-confirm-drawer/index.tsx';
88
+ // 📱 0.1.14 (D40): AbBottomDrawer, the mobile bottom drawer
89
+ export { default as AbBottomDrawer } from '../ab-bottom-drawer/index.tsx';
90
+ export type { AbBottomDrawerProps } from '../ab-bottom-drawer/index.tsx';
91
+ // 🏷️ 0.1.14 (P9): AbVersionSwitcher
92
+ export { default as AbVersionSwitcher } from '../ab-version-switcher/index.tsx';
93
+ export type { AbVersionOption, AbVersionSwitcherProps } from '../ab-version-switcher/index.tsx';
94
+ // 🍞 0.1.14 (P2): AbBreadcrumbs
95
+ export { default as AbBreadcrumbs } from '../ab-breadcrumbs/index.tsx';
96
+ export type { AbBreadcrumbItem, AbBreadcrumbsProps } from '../ab-breadcrumbs/index.tsx';
97
+ // 📋 0.1.14 (P13): AbList + AbListItem
98
+ export { default as AbList, AbListItem } from '../ab-list/index.tsx';
99
+ export type { AbListProps, AbListItemProps } from '../ab-list/index.tsx';
46
100
  export { default as AbText } from '../ab-text/index.tsx';
47
101
  export { default as AbTestHello } from '../ab-test-hello/index.tsx';
48
102
  export { default as AbKeyFeature } from '../ab-key-feature/index.tsx';
@@ -1,35 +0,0 @@
1
- .abNavbar {
2
- display: flex;
3
- align-items: center;
4
- gap: 0.5rem;
5
- width: 100%;
6
- padding: 0.5rem 0.75rem;
7
- box-sizing: border-box;
8
- }
9
- .abNavbarList {
10
- display: flex;
11
- align-items: center;
12
- gap: 0.25rem;
13
- list-style: none;
14
- margin: 0;
15
- padding: 0;
16
- overflow-x: auto;
17
- }
18
- .abNavbarLink {
19
- display: inline-flex;
20
- align-items: center;
21
- gap: 0.35rem;
22
- padding: 0.45rem 0.75rem;
23
- border-radius: 9999px;
24
- text-decoration: none;
25
- color: inherit;
26
- opacity: 0.7;
27
- white-space: nowrap;
28
- font-size: 0.875rem;
29
- font-weight: 600;
30
- }
31
- .abNavbarLink[data-active='true'] {
32
- opacity: 1;
33
- background: color-mix(in srgb, var(--ab-primary, #6750a4) 14%, transparent);
34
- }
35
- .abNavbarIcon { font-size: 1.15rem; }
@@ -1,41 +0,0 @@
1
- .abSidebar {
2
- display: flex;
3
- flex-direction: column;
4
- gap: 1rem;
5
- width: 100%;
6
- max-width: 16rem;
7
- padding: 1rem 0.75rem;
8
- box-sizing: border-box;
9
- }
10
- .abSidebarBrand {
11
- display: flex;
12
- align-items: center;
13
- gap: 0.5rem;
14
- font-weight: 700;
15
- text-decoration: none;
16
- color: inherit;
17
- }
18
- .abSidebarList {
19
- display: flex;
20
- flex-direction: column;
21
- gap: 0.25rem;
22
- list-style: none;
23
- margin: 0;
24
- padding: 0;
25
- }
26
- .abSidebarLink {
27
- display: flex;
28
- align-items: center;
29
- gap: 0.6rem;
30
- padding: 0.55rem 0.75rem;
31
- border-radius: 0.75rem;
32
- text-decoration: none;
33
- color: inherit;
34
- opacity: 0.75;
35
- font-weight: 600;
36
- }
37
- .abSidebarLink[data-active='true'] {
38
- opacity: 1;
39
- background: color-mix(in srgb, var(--ab-primary, #6750a4) 14%, transparent);
40
- }
41
- .abSidebarIcon { font-size: 1.25rem; }