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
|
@@ -0,0 +1,166 @@
|
|
|
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: AbNavbar - Shared view (client + server)
|
|
28
|
+
* @file: ab-navbar/view.tsx
|
|
29
|
+
* @type: React Component (no hooks)
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/*
|
|
34
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
35
|
+
* MOTTO: We'll always do more 😜!!!
|
|
36
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
// ⚛️ React
|
|
40
|
+
import type { ComponentType, ReactElement } from 'react';
|
|
41
|
+
// 🧵 classes
|
|
42
|
+
import clsx from 'clsx';
|
|
43
|
+
// 🔗 G42: injectable link
|
|
44
|
+
import Link from '../ab-link';
|
|
45
|
+
// 🎨 styles
|
|
46
|
+
import styles from './styles.module.css';
|
|
47
|
+
|
|
48
|
+
/** 🔗 A destination (G41). */
|
|
49
|
+
export interface AbNavbarLinkItem {
|
|
50
|
+
kind: 'link'; // 🏷️
|
|
51
|
+
href: string; // 🔗
|
|
52
|
+
icon: string; // 🔣 AbIcons name: outlined, filled when active
|
|
53
|
+
label: string; // 🏷️
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** 🔘 An action, e.g. "Menu" opening a sheet (client only: needs `onSelect`). */
|
|
57
|
+
export interface AbNavbarButtonItem {
|
|
58
|
+
kind: 'button'; // 🏷️
|
|
59
|
+
id: string; // 🆔
|
|
60
|
+
icon: string; // 🔣
|
|
61
|
+
label: string; // 🏷️
|
|
62
|
+
onSelect?: () => void; // 🔔
|
|
63
|
+
expanded?: boolean; // ♿ aria-expanded for sheet toggles
|
|
64
|
+
controls?: string; // ♿ aria-controls
|
|
65
|
+
disabled?: boolean; // 🚫 0.1.13 (Joseph #8, D24/D25): focusable, announced, inert (aria-disabled)
|
|
66
|
+
comingSoon?: boolean | string; // 🚧 0.1.13: inert + a "Coming soon" tag (string = your translated label)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** 🧩 Either kind. */
|
|
70
|
+
export type AbNavbarItem = AbNavbarLinkItem | AbNavbarButtonItem;
|
|
71
|
+
|
|
72
|
+
/** 🕰️ Legacy (≤ 0.1.12) link shape; still accepted via `links`. */
|
|
73
|
+
export type AbNavbarLink = {
|
|
74
|
+
href: string;
|
|
75
|
+
icon: string;
|
|
76
|
+
value: string;
|
|
77
|
+
label: string;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/** 🔣 What the view needs from an icon component. */
|
|
81
|
+
export type AbNavbarIconComponent = ComponentType<{ name: string; variant?: 'outlined' | 'filled'; size?: number; className?: string }>;
|
|
82
|
+
|
|
83
|
+
/** ⚙️ Props shared by both twins. */
|
|
84
|
+
export interface AbNavbarBaseProps<I extends AbNavbarItem = AbNavbarItem> {
|
|
85
|
+
className?: string; // 🏷️
|
|
86
|
+
items?: I[]; // 🧩 G41
|
|
87
|
+
activeHref?: string; // 🎯
|
|
88
|
+
locales?: readonly string[]; // 🌍 0.1.13: stripped from the pathname (default: AbLinkProvider's)
|
|
89
|
+
label?: string; // ♿ nav aria-label (default "Primary")
|
|
90
|
+
indicator?: 'pill' | 'none'; // 🎯 0.1.14 (P18): 'none' = no active pill; 25px icons, accent text (the Home bottom nav). Default 'pill'
|
|
91
|
+
blur?: boolean; // 🌫️ 0.1.14 (P18): translucent --bg + 12px backdrop blur + --div top hairline
|
|
92
|
+
// 🕰️ legacy
|
|
93
|
+
type?: 'customer' | 'admin';
|
|
94
|
+
page?: string;
|
|
95
|
+
links?: AbNavbarLink[];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** 🎯 exact match or a parent prefix ("/" only matches itself). */
|
|
99
|
+
export function isAbNavbarActive(href: string, activeHref?: string): boolean {
|
|
100
|
+
if (!activeHref) return false;
|
|
101
|
+
if (href === activeHref) return true;
|
|
102
|
+
return href !== '/' && activeHref.startsWith(`${href.replace(/\/$/, '')}/`);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** 🖼️ Render-only bottom bar used by both twins. */
|
|
106
|
+
export function AbNavbarView({ props, Icon, active }: {
|
|
107
|
+
props: AbNavbarBaseProps;
|
|
108
|
+
Icon: AbNavbarIconComponent;
|
|
109
|
+
active: (href: string, legacyValue?: string) => boolean;
|
|
110
|
+
}): ReactElement {
|
|
111
|
+
const { className, items, links, label = 'Primary', type = 'customer', indicator = 'pill', blur = false } = props;
|
|
112
|
+
const iconSize = indicator === 'none' ? 25 : 24; // 🔣 P18
|
|
113
|
+
// 🕰️ legacy links → link items
|
|
114
|
+
const list: AbNavbarItem[] = items?.length ? items : (links ?? []).map(({ href, icon, label: l }) => ({ kind: 'link', href, icon, label: l }));
|
|
115
|
+
const valueOf = (href: string) => links?.find((l) => l.href === href)?.value;
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<nav data-type={type} data-ab-part="bottomBar" className={clsx('AbNavbar', styles.abNavbar, className)} aria-label={label} data-indicator={indicator === 'none' ? 'none' : undefined} data-blur={blur ? 'true' : undefined}>
|
|
119
|
+
<ul className={styles.abNavbarList}>
|
|
120
|
+
{list.map((item) => {
|
|
121
|
+
if (item.kind === 'button') {
|
|
122
|
+
// 🔘 action (🚫 disabled / 🚧 coming soon: stays focusable for the tag, never fires)
|
|
123
|
+
const inert = !!item.disabled || !!item.comingSoon;
|
|
124
|
+
const soon = item.comingSoon ? (typeof item.comingSoon === 'string' ? item.comingSoon : 'Coming soon') : undefined;
|
|
125
|
+
return (
|
|
126
|
+
<li key={item.id}>
|
|
127
|
+
<button
|
|
128
|
+
type="button"
|
|
129
|
+
className={styles.abNavbarLink}
|
|
130
|
+
data-ab-part="item"
|
|
131
|
+
data-kind="button"
|
|
132
|
+
aria-expanded={item.expanded} // ♿
|
|
133
|
+
aria-controls={item.controls} // ♿
|
|
134
|
+
aria-disabled={inert || undefined} // 🚫
|
|
135
|
+
data-coming-soon={item.comingSoon ? 'true' : undefined} // 🚧
|
|
136
|
+
onClick={inert ? undefined : item.onSelect}
|
|
137
|
+
>
|
|
138
|
+
<span className={styles.abNavbarPill}><Icon name={item.icon} variant={item.expanded ? 'filled' : 'outlined'} size={iconSize} /></span>
|
|
139
|
+
<span className={styles.abNavbarLabel}>{item.label}</span>
|
|
140
|
+
{soon && <span className={styles.abNavbarSoon} data-ab-part="badge"><span className={styles.abNavbarSrOnly}>, </span>{soon}</span>}
|
|
141
|
+
</button>
|
|
142
|
+
</li>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
// 🔗 destination
|
|
146
|
+
const on = active(item.href, valueOf(item.href)); // 🎯
|
|
147
|
+
return (
|
|
148
|
+
<li key={item.href}>
|
|
149
|
+
<Link
|
|
150
|
+
href={item.href}
|
|
151
|
+
className={styles.abNavbarLink}
|
|
152
|
+
data-ab-part="item"
|
|
153
|
+
data-kind="link"
|
|
154
|
+
data-active={on ? 'true' : 'false'}
|
|
155
|
+
aria-current={on ? 'page' : undefined} // ♿
|
|
156
|
+
>
|
|
157
|
+
<span className={styles.abNavbarPill}><Icon name={item.icon} variant={on ? 'filled' : 'outlined'} size={iconSize} /></span>
|
|
158
|
+
<span className={styles.abNavbarLabel}>{item.label}</span>
|
|
159
|
+
</Link>
|
|
160
|
+
</li>
|
|
161
|
+
);
|
|
162
|
+
})}
|
|
163
|
+
</ul>
|
|
164
|
+
</nav>
|
|
165
|
+
);
|
|
166
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
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: AbPackageCard (G45)
|
|
28
|
+
* @file: ab-package-card/index.tsx
|
|
29
|
+
* @type: React Component (server-safe)
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*
|
|
32
|
+
* Example usage:
|
|
33
|
+
* <AbPackageCard name="ab-nextjs-hooks" href="/docs/hooks" version="0.1.7" description="React hooks." />
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/*
|
|
37
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
38
|
+
* MOTTO: We'll always do more 😜!!!
|
|
39
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
// ⚛️ React
|
|
43
|
+
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
44
|
+
// 🧵 classes
|
|
45
|
+
import clsx from 'clsx';
|
|
46
|
+
// 🃏 base card
|
|
47
|
+
import AbCard from '../ab-card';
|
|
48
|
+
// 🔗 G42 link
|
|
49
|
+
import Link from '../ab-link';
|
|
50
|
+
// 🏷️ footer chips (0.1.14)
|
|
51
|
+
import AbChip from '../ab-chip';
|
|
52
|
+
// 🔣 trailing arrow
|
|
53
|
+
import AbIcon from '../ab-icon';
|
|
54
|
+
// 🎬 motion classes (ab-nextjs-animations ≥ 0.2.4)
|
|
55
|
+
import { AB_MOTION } from 'ab-nextjs-animations/motion';
|
|
56
|
+
import 'ab-nextjs-animations/motion/styles.css';
|
|
57
|
+
// 🎨 styles
|
|
58
|
+
import styles from './styles.module.css';
|
|
59
|
+
|
|
60
|
+
/** ⚙️ props */
|
|
61
|
+
export interface AbPackageCardProps {
|
|
62
|
+
name: string; // 📦 e.g. "ab-nextjs-hooks"
|
|
63
|
+
href: string; // 🔗 docs page (the card's one link)
|
|
64
|
+
description?: ReactNode; // 📝
|
|
65
|
+
version?: string; // 🏷️ e.g. "0.1.7"
|
|
66
|
+
icon?: ReactNode; // 🔣 e.g. <AbIcon name="webhook" />
|
|
67
|
+
media?: ReactNode; // 🖼️ 0.1.13 (Joseph #14): any media (logo, image); wins over `icon`
|
|
68
|
+
id?: string; // 🆔 0.1.13: anchor target
|
|
69
|
+
badge?: ReactNode; // 🔴 e.g. "New"
|
|
70
|
+
tags?: string[]; // 🏷️ e.g. ['client', 'server']
|
|
71
|
+
headingLevel?: 2 | 3 | 4; // ♿
|
|
72
|
+
className?: string; // 🏷️
|
|
73
|
+
// 🏠 0.1.14 (P10, Home spec §4 package card). Passing `preview` or `title` switches to the Home layout:
|
|
74
|
+
// 56px preview tile · 30px icon tile + display title + mono name · clamped description · chips + →
|
|
75
|
+
preview?: ReactNode; // 🖼️ decorative preview tile content (Aa Aa Aa, swatches, a curve…), aria-hidden
|
|
76
|
+
title?: ReactNode; // 🏷️ display name (e.g. "Fonts"); `name` becomes the mono subtitle
|
|
77
|
+
descriptionLines?: number; // ✂️ clamp the description (Home: 2)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* 🧩 0.1.13 (Joseph): `ab-nextjs-components` → `ab-` `nextjs-` `components` with a `<wbr>` after each
|
|
82
|
+
* hyphen, so a narrow card wraps at a hyphen (never mid-word) instead of cutting the name off.
|
|
83
|
+
*/
|
|
84
|
+
export function toAbPackageNameParts(name: string): ReactNode[] {
|
|
85
|
+
return name.split(/(?<=-)/).flatMap((part, i) => (i ? [<wbr key={`w${i}`} />, part] : [part])); // ✂️ after each "-"
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** 📦 AbPackageCard (G45): a package tile on AbCard (one link, 2px lift on laptop+, none when reduced). */
|
|
89
|
+
const AbPackageCard = (props: AbPackageCardProps): ReactElement => (props.preview != null || props.title != null ? <AbPackageCardHome {...props} /> : <AbPackageCardLegacy {...props} />);
|
|
90
|
+
|
|
91
|
+
/** 🏠 0.1.14 (P10): the Home layout. One link (the title, stretched over the card), focus ring on the card. */
|
|
92
|
+
function AbPackageCardHome({ name, href, description, version, icon, media, id, badge, tags, headingLevel = 3, className, preview, title, descriptionLines }: AbPackageCardProps): ReactElement {
|
|
93
|
+
const H = `h${headingLevel}` as 'h2' | 'h3' | 'h4'; // ♿
|
|
94
|
+
const clamp = descriptionLines ? ({ '--ab-package-card-lines': descriptionLines } as CSSProperties) : undefined; // ✂️
|
|
95
|
+
return (
|
|
96
|
+
<article id={id} className={clsx('AbPackageCard', styles.home, AB_MOTION.interactive, className)} data-ab-part="package-card" data-variant="home">
|
|
97
|
+
{preview != null && <div className={styles.homePreview} aria-hidden="true">{preview}</div> /* 🖼️ decorative */}
|
|
98
|
+
<div className={styles.homeHead}>
|
|
99
|
+
{(media ?? icon) != null && <span className={styles.homeIcon} aria-hidden="true">{media ?? icon}</span>}
|
|
100
|
+
<div className={styles.homeTitles}>
|
|
101
|
+
<H className={styles.homeTitle}><Link href={href} className={styles.homeLink}>{title ?? name}</Link></H>
|
|
102
|
+
{title != null && <code className={styles.homeName}>{name}</code> /* ⌨️ the npm name */}
|
|
103
|
+
</div>
|
|
104
|
+
{badge != null && <span className={styles.homeBadge}>{badge}</span>}
|
|
105
|
+
</div>
|
|
106
|
+
{description != null && <p className={styles.homeDesc} data-clamp={descriptionLines ? 'true' : undefined} style={clamp}>{description}</p>}
|
|
107
|
+
{(version || tags?.length) ? (
|
|
108
|
+
<div className={styles.homeFoot}>
|
|
109
|
+
{version && <AbChip size="sm" shape="rounded" mono tone="accent">v{version}</AbChip>}
|
|
110
|
+
{tags?.map((t) => <AbChip key={t} size="sm" shape="rounded" mono tone="sage" className={styles.homeTag}>{t}</AbChip>)}
|
|
111
|
+
<span className={styles.homeGrow} />
|
|
112
|
+
<AbIcon name="arrow_forward" size={16} className={styles.homeGo} />
|
|
113
|
+
</div>
|
|
114
|
+
) : null}
|
|
115
|
+
</article>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** 🕰️ ≤ 0.1.13 layout on AbCard. */
|
|
120
|
+
const AbPackageCardLegacy = ({ name, href, description, version, icon, media, id, badge, tags, headingLevel, className }: AbPackageCardProps): ReactElement => (
|
|
121
|
+
<AbCard
|
|
122
|
+
id={id}
|
|
123
|
+
className={className}
|
|
124
|
+
href={href}
|
|
125
|
+
headingLevel={headingLevel}
|
|
126
|
+
media={media ?? icon}
|
|
127
|
+
title={<span className={styles.abPackageCardName} title={name}>{toAbPackageNameParts(name)}</span>}
|
|
128
|
+
eyebrow={badge}
|
|
129
|
+
description={description}
|
|
130
|
+
footer={(version || tags?.length) ? (
|
|
131
|
+
<>
|
|
132
|
+
{version && <code className={styles.abPackageCardVersion}>v{version}</code>}
|
|
133
|
+
{tags?.map((t) => <span key={t} className={styles.abPackageCardTag}>{t}</span>)}
|
|
134
|
+
</>
|
|
135
|
+
) : undefined}
|
|
136
|
+
/>
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
// 📦 exports
|
|
140
|
+
export default AbPackageCard;
|
|
141
|
+
export { AbPackageCard };
|
|
@@ -0,0 +1,81 @@
|
|
|
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: AbPackageCard - Styles (G45)
|
|
28
|
+
* @file: ab-package-card/styles.module.css
|
|
29
|
+
* @type: CSS Module
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/*
|
|
34
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
35
|
+
* MOTTO: We'll always do more 😜!!!
|
|
36
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
.abPackageCardName { font-family: var(--ab-font-code, var(--ab-font-mono, ui-monospace, monospace)); font-size: 16px; overflow-wrap: anywhere; word-break: normal; hyphens: none; display: block; min-width: 0; max-width: 100%; } /* 📦 0.1.13 (Joseph): wraps at the <wbr> after a hyphen first (ab-nextjs-/components); `anywhere` only splits a part that alone is wider than a very narrow card (animations at ~70px), so it never overflows */
|
|
40
|
+
.abPackageCardVersion { font-family: var(--ab-font-code, var(--ab-font-mono, ui-monospace, monospace)); opacity: 0.8; } /* 🏷️ */
|
|
41
|
+
.abPackageCardTag { padding: 0 8px; border-radius: 999px; line-height: 20px; background: var(--ab-color-surface-container-high, rgb(0 0 0 / 0.06)); } /* 🏷️ */
|
|
42
|
+
|
|
43
|
+
/* ===== 🏠 0.1.14 (P10, Home spec §4 package card) ===== */
|
|
44
|
+
.home {
|
|
45
|
+
position: relative; display: flex; flex-direction: column; min-width: 0; box-sizing: border-box; /* 📐 */
|
|
46
|
+
padding: 10px 10px 12px; border: 1px solid var(--ab-color-border, rgb(92 64 48 / 0.13)); border-radius: var(--ab-radius-card, 14px); /* 🔲 */
|
|
47
|
+
background: var(--ab-color-card, #fff); color: var(--ab-color-text, #211a16); box-shadow: var(--ab-shadow-card, 0 1px 2px rgb(33 26 22 / 0.05)); /* 🎨 */
|
|
48
|
+
/* 🎞️ the fade + lift timing comes from ab-nextjs-animations (.ab-motion-interactive on the element) */
|
|
49
|
+
}
|
|
50
|
+
.home:hover { border-color: color-mix(in srgb, var(--ab-color-accent, #a67c52) 40%, transparent); transform: translateY(-1px); } /* 🖱️ */
|
|
51
|
+
.home:has(.homeLink:focus-visible) { outline: 2px solid var(--ab-color-accent, #a67c52); outline-offset: 2px; } /* ♿ ring on the card */
|
|
52
|
+
.homeLink { color: inherit; text-decoration: none; outline: none; } /* 🔗 */
|
|
53
|
+
.homeLink::after { content: ''; position: absolute; inset: 0; border-radius: inherit; } /* 🖱️ the whole card clicks */
|
|
54
|
+
.homePreview {
|
|
55
|
+
height: 56px; border-radius: var(--ab-radius-tile, 9px); background: var(--ab-color-card2, #fbf3ec); /* 🖼️ */
|
|
56
|
+
display: flex; align-items: center; justify-content: center; gap: 10px; overflow: hidden; color: var(--ab-color-accent-text, #88603d);
|
|
57
|
+
}
|
|
58
|
+
.homeHead { display: flex; align-items: center; gap: 9px; margin-top: 11px; padding: 0 2px; min-width: 0; } /* 📐 */
|
|
59
|
+
.homeIcon {
|
|
60
|
+
flex: none; width: 30px; height: 30px; border-radius: var(--ab-radius-row, 8px); /* 🔲 */
|
|
61
|
+
background: var(--ab-color-tint, #f4e7db); color: var(--ab-color-accent-text, #88603d); display: flex; align-items: center; justify-content: center;
|
|
62
|
+
}
|
|
63
|
+
.homeIcon svg { width: 18px; height: 18px; } /* 🔣 */
|
|
64
|
+
.homeTitles { min-width: 0; } /* ✂️ */
|
|
65
|
+
.homeTitle { margin: 0; font-family: var(--ab-font-title, inherit); font-size: 14px; font-weight: 800; line-height: 1.2; letter-spacing: -0.005em; } /* 🏷️ Mulish */
|
|
66
|
+
.homeName { display: block; margin-top: 1px; font: 400 11px/1.3 var(--ab-font-code, ui-monospace, monospace); color: var(--ab-color-faint, #807062); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* ⌨️ */
|
|
67
|
+
.homeBadge { margin-inline-start: auto; flex: none; } /* 🔴 */
|
|
68
|
+
.homeDesc { margin: 8px 0 0; padding: 0 2px; font-size: 12.5px; line-height: 1.45; color: var(--ab-color-muted, #6b5b50); min-height: 36px; } /* 📝 */
|
|
69
|
+
.homeDesc[data-clamp='true'] { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--ab-package-card-lines, 2); line-clamp: var(--ab-package-card-lines, 2); overflow: hidden; } /* ✂️ */
|
|
70
|
+
.homeFoot { display: flex; align-items: center; margin-top: 10px; padding: 0 2px; } /* 🏷️ */
|
|
71
|
+
.homeTag { margin-inline-start: 6px; } /* 🌿 */
|
|
72
|
+
.homeGrow { flex: 1; } /* ↔️ */
|
|
73
|
+
.homeGo { width: 16px; height: 16px; color: var(--ab-color-faint, #807062); } /* → */
|
|
74
|
+
@media (max-width: 767px) {
|
|
75
|
+
.home { padding: 8px 8px 10px; border-radius: 13px; } /* 📱 */
|
|
76
|
+
.homePreview { height: 44px; }
|
|
77
|
+
.homeHead { margin-top: 9px; }
|
|
78
|
+
.homeDesc { margin-top: 6px; font-size: 12px; }
|
|
79
|
+
.homeFoot { margin-top: 8px; }
|
|
80
|
+
}
|
|
81
|
+
@media (prefers-reduced-motion: reduce) { .home:hover { transform: none; } } /* ♿ no lift */
|
|
@@ -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: ab-page-paginator/styles.module.css
|
|
29
|
+
* @type: CSS Stylesheet
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*/
|
|
32
|
+
|
|
1
33
|
.abPagePaginator {
|
|
2
34
|
display: flex;
|
|
3
35
|
width: fit-content;
|
|
@@ -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: ab-page-switcher/styles.module.css
|
|
29
|
+
* @type: CSS Stylesheet
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*/
|
|
32
|
+
|
|
1
33
|
.abPageSwitcher {
|
|
2
34
|
display: inline-flex;
|
|
3
35
|
align-items: center;
|
package/ab-preview/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: ab-preview/styles.module.css
|
|
29
|
+
* @type: CSS Stylesheet
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*/
|
|
32
|
+
|
|
1
33
|
.abPreview {
|
|
2
34
|
display: grid;
|
|
3
35
|
grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
|
package/ab-price/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: ab-price/styles.module.css
|
|
29
|
+
* @type: CSS Stylesheet
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*/
|
|
32
|
+
|
|
1
33
|
.abPrice {
|
|
2
34
|
display: inline-flex;
|
|
3
35
|
flex-direction: column;
|
package/ab-price-tag/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: ab-price-tag/styles.module.css
|
|
29
|
+
* @type: CSS Stylesheet
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*/
|
|
32
|
+
|
|
1
33
|
.abPriceTag {
|
|
2
34
|
display: flex;
|
|
3
35
|
flex-direction: row;
|
package/ab-product/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: ab-product/styles.module.css
|
|
29
|
+
* @type: CSS Stylesheet
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*/
|
|
32
|
+
|
|
1
33
|
.abProduct {
|
|
2
34
|
display: flex;
|
|
3
35
|
flex-direction: column;
|