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.
- package/CHANGELOG.md +64 -0
- package/README.md +52 -0
- package/ab-app-bar/index.tsx +210 -0
- package/ab-app-bar/styles.module.css +158 -0
- package/ab-avatar/index.tsx +2 -1
- package/ab-avatar/styles.module.css +32 -0
- package/ab-balloon/index.tsx +134 -23
- package/ab-balloon/styles.module.css +84 -7
- package/ab-bottom-drawer/index.tsx +71 -0
- package/ab-bottom-drawer/styles.module.css +66 -0
- package/ab-brand/index.tsx +1 -1
- package/ab-breadcrumbs/index.tsx +92 -0
- package/ab-breadcrumbs/styles.module.css +54 -0
- package/ab-button/helpers.ts +6 -1
- package/ab-button/index.tsx +23 -4
- package/ab-button/styles.module.css +70 -0
- package/ab-card/index.tsx +89 -0
- package/ab-card/styles.module.css +68 -0
- package/ab-carousel/styles.module.css +1 -1
- package/ab-chip/index.tsx +16 -4
- package/ab-chip/styles.module.css +12 -1
- package/ab-collapsible/index.tsx +1 -1
- package/ab-color/index.tsx +1 -0
- package/ab-color/styles.module.css +32 -0
- package/ab-confirm-drawer/index.tsx +97 -0
- package/ab-confirm-drawer/styles.module.css +41 -0
- package/ab-demo-box/index.tsx +1 -0
- package/ab-demo-box/styles.module.css +32 -0
- package/ab-demo-code/index.tsx +1 -0
- package/ab-demo-code/styles.module.css +32 -0
- package/ab-drawer/index.tsx +307 -0
- package/ab-drawer/styles.module.css +127 -0
- package/ab-drawer/use-ab-drawer.ts +89 -0
- package/ab-drawer-list/index.tsx +118 -0
- package/ab-drawer-list/styles.module.css +65 -0
- package/ab-flow-diagram/styles.module.css +2 -2
- package/ab-icon/builtin.ts +19 -1
- package/ab-icon/helpers.ts +37 -0
- package/ab-icon/index.tsx +14 -8
- package/ab-icon/registrar.tsx +68 -0
- package/ab-icon-button/index.tsx +19 -3
- package/ab-icon-button/styles.module.css +1 -1
- package/ab-image/index.tsx +1 -0
- package/ab-image/styles.module.css +32 -0
- package/ab-info/index.tsx +2 -1
- package/ab-info/styles.module.css +32 -0
- package/ab-input/index.tsx +1 -0
- package/ab-input/styles.module.css +1 -0
- package/ab-install-snippet/index.tsx +51 -29
- package/ab-install-snippet/styles.module.css +50 -4
- package/ab-kbd/index.tsx +65 -0
- package/ab-kbd/styles.module.css +55 -0
- package/ab-key-feature/index.tsx +2 -1
- package/ab-key-feature/styles.module.css +32 -0
- package/ab-like-button/index.tsx +1 -1
- package/ab-link/index.tsx +112 -0
- package/ab-link/locale.ts +53 -0
- package/ab-list/index.tsx +107 -0
- package/ab-list/styles.module.css +82 -0
- package/ab-locale-switcher/index.tsx +59 -10
- package/ab-locale-switcher/styles.module.css +15 -4
- package/ab-main-headline/index.tsx +1 -0
- package/ab-main-headline/styles.module.css +32 -0
- package/ab-menu/index.tsx +6 -5
- package/ab-menu/styles.module.css +32 -0
- package/ab-name/index.tsx +1 -0
- package/ab-name/styles.module.css +32 -0
- package/ab-navbar/index.tsx +54 -46
- package/ab-navbar/styles.module.css +102 -28
- package/ab-navbar/view.tsx +166 -0
- package/ab-package-card/index.tsx +141 -0
- package/ab-package-card/styles.module.css +81 -0
- package/ab-page-paginator/index.tsx +1 -0
- package/ab-page-paginator/styles.module.css +32 -0
- package/ab-page-switcher/index.tsx +1 -0
- package/ab-page-switcher/styles.module.css +32 -0
- package/ab-preview/index.tsx +1 -0
- package/ab-preview/styles.module.css +32 -0
- package/ab-price/index.tsx +1 -0
- package/ab-price/styles.module.css +32 -0
- package/ab-price-tag/index.tsx +1 -0
- package/ab-price-tag/styles.module.css +32 -0
- package/ab-product/index.tsx +1 -0
- package/ab-product/styles.module.css +32 -0
- package/ab-product-item/index.tsx +1 -0
- package/ab-product-item/styles.module.css +32 -0
- package/ab-search-result/index.tsx +1 -0
- package/ab-search-result/styles.module.css +32 -0
- package/ab-search-trigger/index.tsx +157 -0
- package/ab-search-trigger/styles.module.css +96 -0
- package/ab-sidebar/index.tsx +91 -49
- package/ab-sidebar/styles.module.css +179 -31
- package/ab-sidebar/view.tsx +192 -0
- package/ab-switch-back/index.tsx +2 -1
- package/ab-switch-back/styles.module.css +32 -0
- package/ab-tab/index.tsx +2 -1
- package/ab-tab/styles.module.css +32 -0
- package/ab-tabs/index.tsx +1 -0
- package/ab-tabs/styles.module.css +32 -0
- package/ab-test-hello/index.tsx +1 -0
- package/ab-test-hello/styles.module.css +32 -0
- package/ab-text/index.tsx +1 -0
- package/ab-text/styles.module.css +32 -0
- package/ab-theme-toggle/index.tsx +21 -6
- package/ab-theme-toggle/styles.module.css +18 -3
- package/ab-toc/index.tsx +131 -0
- package/ab-toc/styles.module.css +66 -0
- package/ab-version-switcher/index.tsx +143 -0
- package/ab-version-switcher/styles.module.css +76 -0
- package/css/chrome-mq.css +32 -0
- package/css/doodle.css +32 -0
- package/css/logo.css +32 -0
- package/css/spinner.css +32 -0
- package/css/toast.css +32 -0
- package/index.ts +45 -0
- package/package.json +42 -10
- package/server/ab-avatar/index.tsx +2 -1
- package/server/ab-avatar/styles.module.css +32 -0
- package/server/ab-badge/index.tsx +1 -0
- package/server/ab-badge/styles.module.css +32 -0
- package/server/ab-brand/index.tsx +1 -1
- package/server/ab-button/index.tsx +6 -2
- package/server/ab-button/styles.module.css +39 -0
- package/server/ab-icon/index.tsx +13 -8
- package/server/ab-key-feature/index.tsx +2 -1
- package/server/ab-key-feature/styles.module.css +32 -0
- package/server/ab-name/index.tsx +1 -0
- package/server/ab-name/styles.module.css +32 -0
- package/server/ab-nav-link/index.tsx +2 -1
- package/server/ab-nav-link/styles.module.css +32 -0
- package/server/ab-navbar/index.tsx +44 -45
- package/server/ab-polygon/index.tsx +1 -0
- package/server/ab-polygon/styles.module.css +32 -0
- package/server/ab-sidebar/index.tsx +44 -49
- package/server/ab-switch-back/index.tsx +2 -1
- package/server/ab-switch-back/styles.module.css +32 -0
- package/server/ab-test-hello/index.tsx +1 -0
- package/server/ab-test-hello/styles.module.css +32 -0
- package/server/ab-text/index.tsx +1 -0
- package/server/ab-text/styles.module.css +32 -0
- package/server/index.ts +1 -0
- package/styles.css +32 -0
- package/types/index.d.ts +54 -0
- package/server/ab-navbar/styles.module.css +0 -35
- 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 (
|
|
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
|
-
|
|
15
|
-
import
|
|
16
|
-
|
|
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
|
-
|
|
19
|
-
|
|
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
|
-
|
|
26
|
-
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
page,
|
|
36
|
-
|
|
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 };
|
|
@@ -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 (
|
|
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
|
-
|
|
15
|
-
import
|
|
16
|
-
|
|
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
|
-
|
|
19
|
-
|
|
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
|
-
|
|
26
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
page,
|
|
38
|
-
|
|
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;
|
|
@@ -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;
|
package/server/ab-text/index.tsx
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.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
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; }
|