ab-nextjs-components 0.1.8 → 0.1.10

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 (59) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/ab-brand/index.tsx +30 -1
  3. package/ab-brand/styles.module.css +40 -1
  4. package/ab-button/helpers.ts +90 -0
  5. package/ab-button/index.tsx +164 -87
  6. package/ab-button/styles.module.css +79 -1
  7. package/ab-carousel/helpers.ts +146 -0
  8. package/ab-carousel/index.tsx +643 -0
  9. package/ab-carousel/styles.module.css +206 -0
  10. package/ab-chip/index.tsx +75 -0
  11. package/ab-chip/styles.module.css +87 -0
  12. package/ab-collapsible/index.tsx +30 -1
  13. package/ab-collapsible/styles.module.css +40 -1
  14. package/ab-flow-diagram/helpers.ts +77 -0
  15. package/ab-flow-diagram/index.tsx +141 -0
  16. package/ab-flow-diagram/styles.module.css +141 -0
  17. package/ab-icon/builtin.ts +61 -0
  18. package/ab-icon/helpers.ts +102 -0
  19. package/ab-icon/index.tsx +77 -16
  20. package/ab-icon/styles.module.css +53 -9
  21. package/ab-icon-button/index.tsx +110 -46
  22. package/ab-icon-button/styles.module.css +28 -10
  23. package/ab-install-snippet/helpers.ts +62 -0
  24. package/ab-install-snippet/index.tsx +170 -0
  25. package/ab-install-snippet/styles.module.css +104 -0
  26. package/ab-like-button/index.tsx +33 -1
  27. package/ab-like-button/styles.module.css +41 -6
  28. package/ab-linear-progress/index.tsx +129 -0
  29. package/ab-linear-progress/styles.module.css +105 -0
  30. package/ab-locale-switcher/index.tsx +213 -0
  31. package/ab-locale-switcher/styles.module.css +127 -0
  32. package/ab-logo/index.tsx +88 -30
  33. package/ab-logo/styles.module.css +79 -11
  34. package/ab-pill/index.tsx +74 -0
  35. package/ab-progress-chips/index.tsx +30 -1
  36. package/ab-progress-chips/styles.module.css +40 -1
  37. package/ab-searchbar/index.tsx +33 -2
  38. package/ab-searchbar/styles.module.css +41 -5
  39. package/ab-splash/csp.d.ts +54 -0
  40. package/ab-splash/csp.mjs +82 -0
  41. package/ab-splash/csp.ts +60 -0
  42. package/ab-splash/gate.ts +216 -0
  43. package/ab-splash/index.tsx +140 -0
  44. package/ab-splash/styles.module.css +103 -0
  45. package/ab-theme-toggle/index.tsx +188 -0
  46. package/ab-theme-toggle/styles.module.css +89 -0
  47. package/css/dialog.css +38 -3
  48. package/index.ts +47 -0
  49. package/package.json +46 -18
  50. package/server/ab-brand/index.tsx +29 -1
  51. package/server/ab-brand/styles.module.css +40 -1
  52. package/server/ab-button/index.tsx +96 -79
  53. package/server/ab-button/styles.module.css +79 -1
  54. package/server/ab-icon/index.tsx +68 -16
  55. package/server/ab-icon/styles.module.css +53 -9
  56. package/server/ab-logo/index.tsx +88 -29
  57. package/server/ab-logo/styles.module.css +79 -11
  58. package/types/css.d.ts +43 -0
  59. package/types/index.d.ts +2 -0
@@ -0,0 +1,127 @@
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: AbLocaleSwitcher - Styles
28
+ * @file: ab-locale-switcher/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
+ /* 📦 anchor for the menu */
40
+ .root {
41
+ position: relative; /* 📌 */
42
+ display: inline-block; /* 📐 */
43
+ }
44
+
45
+ /* 🌐 trigger (40px round, 44px on coarse pointers) */
46
+ .trigger {
47
+ display: inline-flex; /* 📐 */
48
+ align-items: center; /* ↕️ */
49
+ justify-content: center; /* ↔️ */
50
+ gap: 0.375rem; /* 🧱 */
51
+ min-width: 40px; /* 📏 */
52
+ height: 40px; /* 📏 */
53
+ padding: 0 0.5rem; /* 🧱 */
54
+ border: 0; /* 🧹 */
55
+ border-radius: 9999px; /* 💊 */
56
+ background: transparent; /* 🫥 */
57
+ color: inherit; /* 🎨 */
58
+ font: inherit; /* 🔤 */
59
+ cursor: pointer; /* 👆 */
60
+ }
61
+ .withText {
62
+ padding: 0 0.75rem; /* 🧱 room for the endonym */
63
+ }
64
+ .trigger:hover,
65
+ .trigger[aria-expanded='true'] {
66
+ background: color-mix(in srgb, currentColor 10%, transparent); /* 🌫️ */
67
+ }
68
+ .trigger:focus-visible,
69
+ .item:focus-visible {
70
+ outline: 2px solid var(--ab-focus-ring, var(--ab-color-primary, #A67C52)); /* 💍 */
71
+ outline-offset: 2px; /* ↔️ */
72
+ }
73
+ @media (pointer: coarse) {
74
+ .trigger { min-width: 44px; height: 44px; } /* 👆 mobile target */
75
+ }
76
+
77
+ /* 📜 menu */
78
+ .menu {
79
+ position: absolute; /* 📌 */
80
+ top: calc(100% + 0.25rem); /* ⬇️ */
81
+ inset-inline-end: 0; /* ↔️ align end (RTL-aware) */
82
+ z-index: 50; /* 🧱 above content */
83
+ min-width: 11rem; /* 📏 */
84
+ margin: 0; /* 🧹 */
85
+ padding: 0.25rem; /* 🧱 */
86
+ list-style: none; /* 🧹 */
87
+ border-radius: 0.75rem; /* 🔲 */
88
+ border: 1px solid var(--ab-color-outline-variant, rgb(0 0 0 / 0.12)); /* 🖊️ */
89
+ background: var(--ab-color-surface, #fff); /* 🎨 */
90
+ box-shadow: 0 8px 24px rgb(0 0 0 / 0.12); /* 🌫️ */
91
+ }
92
+ .root[data-align='start'] .menu {
93
+ inset-inline-start: 0; /* ↔️ */
94
+ inset-inline-end: auto; /* 🧹 */
95
+ }
96
+ .menu[hidden] {
97
+ display: none; /* 🙈 */
98
+ }
99
+
100
+ /* 🗣️ item */
101
+ .item {
102
+ display: flex; /* 📐 */
103
+ align-items: center; /* ↕️ */
104
+ gap: 0.5rem; /* 🧱 */
105
+ width: 100%; /* ↔️ */
106
+ min-height: 40px; /* 📏 */
107
+ padding: 0 0.75rem; /* 🧱 */
108
+ border: 0; /* 🧹 */
109
+ border-radius: 0.5rem; /* 🔲 */
110
+ background: transparent; /* 🫥 */
111
+ color: inherit; /* 🎨 */
112
+ font: inherit; /* 🔤 */
113
+ text-align: start; /* ↔️ */
114
+ text-decoration: none; /* 🧹 links */
115
+ cursor: pointer; /* 👆 */
116
+ }
117
+ .item:hover,
118
+ .item:focus-visible {
119
+ background: color-mix(in srgb, currentColor 8%, transparent); /* 🌫️ */
120
+ }
121
+ .item[aria-checked='true'] {
122
+ font-weight: 600; /* 💪 */
123
+ }
124
+ .check {
125
+ width: 1em; /* 📏 fixed column */
126
+ color: var(--ab-color-bronze-text, #8A6440); /* ♿ */
127
+ }
package/ab-logo/index.tsx CHANGED
@@ -27,70 +27,128 @@
27
27
  * @project: ab-nextjs-components
28
28
  * @name: AbLogo - Client
29
29
  * @file: ab-logo/index.tsx
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
30
31
  */
31
32
 
32
- 'use client';
33
+ /*
34
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
35
+ * MOTTO: We'll always do more 😜!!!
36
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
37
+ */
38
+
39
+ 'use client'; // 💧 client build (the server twin lives in `server/ab-logo`)
33
40
 
34
- import type { ReactElement } from 'react';
41
+ // 🧩 React types only
42
+ import type { CSSProperties, ReactElement } from 'react';
43
+ // 🧵 class-name joiner
35
44
  import clsx from 'clsx';
45
+ // 🎨 package-shipped CSS module (Tailwind-independent)
36
46
  import styles from './styles.module.css';
37
47
 
48
+ // 🅰️ the four logo looks
38
49
  export type AbLogoType = 'contained' | 'outlined' | 'hollow' | 'naked';
39
50
 
51
+ // 📐 public props
40
52
  export interface AbLogoProps {
53
+ // 🅰️ look of the mark (default: naked)
41
54
  type?: AbLogoType;
55
+ // 🏷️ consumer classes
42
56
  className?: string;
43
- /** Optional image src (contained). Defaults to the Ab logo shipped in this package (data URI). */
57
+ /** 🖼️ Optional image src. Defaults to the Ab mark shipped in this package (data URI). */
44
58
  src?: string;
45
- /** Optional CSS mask value for outlined/hollow/naked. */
59
+ /** 🎭 Optional CSS mask value for outlined/hollow/naked. */
46
60
  mask?: string;
61
+ // 🗣️ accessible name of the mark
47
62
  alt?: string;
63
+ // 📏 mark size (or wordmark font-size when `wordmark` is on)
48
64
  size?: number | string;
65
+ /** 🔤 Show the wordmark next to the mark: `true` → "Elements", or any string. */
66
+ wordmark?: boolean | string;
67
+ /** 🎨 Mark + wordmark color (CSS color). Defaults to bronze (light) / #FFF8F5 (dark). */
68
+ color?: string;
49
69
  }
50
70
 
51
- /** Inlined Ab logo shipped with this package (also at `ab-logo/ab-logo.svg`). */
52
- const DEFAULT_SRC = 'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xml%3Aspace%3D%22preserve%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23A67C52%22%20d%3D%22m1.8%2020.5%209.3-17v17zM22.2%207.7l-9.3-4.2v17l9.3-4.2-4.7-4.3z%22/%3E%3Cpath%20d%3D%22m12.9%2020.5%209.3-4.2-9.3-8.6z%22%20opacity%3D%22.1%22/%3E%3C/svg%3E';
71
+ /** 🅰️ Inlined Ab logo shipped with this package (also at `ab-logo/ab-logo.svg`). */
72
+ export const AB_LOGO_DEFAULT_SRC = 'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xml%3Aspace%3D%22preserve%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23A67C52%22%20d%3D%22m1.8%2020.5%209.3-17v17zM22.2%207.7l-9.3-4.2v17l9.3-4.2-4.7-4.3z%22/%3E%3Cpath%20d%3D%22m12.9%2020.5%209.3-4.2-9.3-8.6z%22%20opacity%3D%22.1%22/%3E%3C/svg%3E';
73
+
74
+ // 🔤 the default wordmark text (a brand name, never translated)
75
+ export const AB_LOGO_DEFAULT_WORDMARK = 'Elements';
76
+
77
+ // 📏 number → px, string → as is
78
+ const toCssSize = (size?: number | string): string | undefined =>
79
+ size != null ? (typeof size === 'number' ? `${size}px` : size) : undefined;
53
80
 
54
81
  const AbLogo = ({
55
- type = 'naked',
56
- className,
57
- src,
58
- mask,
59
- alt = 'Ab',
60
- size,
82
+ type = 'naked', // 🅰️ naked by default
83
+ className, // 🏷️ consumer classes
84
+ src, // 🖼️ optional image
85
+ mask, // 🎭 optional mask
86
+ alt = 'Ab', // 🗣️ default name
87
+ size, // 📏 optional size
88
+ wordmark, // 🔤 optional wordmark
89
+ color, // 🎨 optional color
61
90
  }: AbLogoProps): ReactElement => {
62
- const dim = size != null ? (typeof size === 'number' ? `${size}px` : size) : undefined;
91
+ // 📏 normalized size
92
+ const dim = toCssSize(size);
93
+ // 🔤 wordmark text (null = no wordmark)
94
+ const text = wordmark === true ? AB_LOGO_DEFAULT_WORDMARK : typeof wordmark === 'string' && wordmark ? wordmark : null;
95
+ // 🎨 color as a custom property consumed by the CSS module
96
+ const colorVar = (color ? { '--ab-logo-color': color } : {}) as CSSProperties;
63
97
 
98
+ // 🖼️ build the mark
99
+ let mark: ReactElement;
64
100
  if (type === 'contained') {
65
- return (
101
+ // 🖼️ contained = a real <img>
102
+ mark = (
103
+ // eslint-disable-next-line @next/next/no-img-element -- 🖼️ the default src is an inline data-URI SVG (nothing for next/image to optimize), and this package must not require next/image's loader config in consumer apps
66
104
  <img
67
- className={clsx('AbLogo', 'app-logo', styles.abLogoContained, className)}
68
- src={src ?? DEFAULT_SRC}
69
- alt={alt}
105
+ className={clsx(!text && ['AbLogo', 'app-logo', className], styles.abLogoContained, text && styles.abLogo__mark)}
106
+ src={src ?? AB_LOGO_DEFAULT_SRC}
107
+ alt={text ? '' : alt}
108
+ aria-hidden={text ? true : undefined}
70
109
  data-type="contained"
71
- style={dim ? { width: dim, height: dim } : undefined}
110
+ style={!text && dim ? { width: dim, height: dim } : undefined}
111
+ />
112
+ );
113
+ } else {
114
+ // 🎭 explicit mask/src wins; otherwise the CSS module masks with `--app-logo-url` or the shipped mark (no brown square ✅)
115
+ const maskValue = mask ?? (src ? `url('${src}') no-repeat 50% 50%` : undefined);
116
+ mark = (
117
+ <span
118
+ className={clsx(!text && ['AbLogo', 'app-logo', className], styles.abLogo, text && styles.abLogo__mark)}
119
+ data-type={type}
120
+ role={text ? undefined : 'img'}
121
+ aria-label={text ? undefined : alt}
122
+ aria-hidden={text ? true : undefined}
123
+ style={{
124
+ ...(!text ? colorVar : {}), // 🎨 color (standalone mark only; lockup sets it on the wrapper)
125
+ ...(!text && dim ? { width: dim, height: dim } : {}), // 📏 size
126
+ ...(maskValue ? { WebkitMask: maskValue, mask: maskValue, WebkitMaskSize: 'cover', maskSize: 'cover' } : {}), // 🎭 custom mask
127
+ }}
72
128
  />
73
129
  );
74
130
  }
75
131
 
76
- // With no `mask`/`src`, leave the mask to `ab-nextjs-components` chrome (`--app-logo-url` / `.app-logo`).
77
- // When `mask` or `src` is set, apply it inline (src becomes a CSS mask url).
78
- const maskValue = mask ?? (src ? `url('${src}') no-repeat 50% 50%` : undefined);
132
+ // 🅰️ no wordmark → just the mark (unchanged API)
133
+ if (!text) return mark;
134
+
135
+ // 🔤 lockup: mark + wordmark, one accessible image
79
136
  return (
80
137
  <span
81
- className={clsx('AbLogo', 'app-logo', styles.abLogo, className)}
138
+ className={clsx('AbLogo', 'AbLogo--wordmark', styles.abLogo__lockup, className)}
82
139
  data-type={type}
83
140
  role="img"
84
- aria-label={alt}
85
- style={{
86
- ...(dim ? { width: dim, height: dim } : {}),
87
- ...(maskValue
88
- ? { WebkitMask: maskValue, mask: maskValue, WebkitMaskSize: 'cover', maskSize: 'cover' }
89
- : {}),
90
- }}
91
- />
141
+ aria-label={`${alt} ${text}`.trim()}
142
+ style={{ ...colorVar, ...(dim ? { fontSize: dim } : {}) }}
143
+ >
144
+ {/* 🅰️ the mark */}
145
+ {mark}
146
+ {/* 🔤 the wordmark — Quicksand Bold from ab-nextjs-fonts */}
147
+ <span className={clsx('font-quicksand-bold', styles.abLogo__wordmark)} aria-hidden="true">{text}</span>
148
+ </span>
92
149
  );
93
150
  };
94
151
 
152
+ // 📦 exports
95
153
  export default AbLogo;
96
154
  export { AbLogo };
@@ -4,7 +4,31 @@
4
4
  * ab-nextjs-components
5
5
  * ~~~~~~~~~~~~
6
6
  * Copyright (c) 2026 Abraham Ukachi. The abElements Project.
7
- * Plain CSS modules — no Tailwind Tailwind apply (Turbopack-safe).
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the 'Software'), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all
16
+ * copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ * SOFTWARE.
25
+
26
+ *
27
+ * @project: ab-nextjs-components
28
+ * @name: AbLogo - Component Stylesheet (plain CSS, Tailwind-independent)
29
+ * @file: ab-logo/styles.module.css
30
+ * @type: CSS Module
31
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
8
32
  */
9
33
 
10
34
  /*
@@ -13,18 +37,62 @@
13
37
  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
38
  */
15
39
 
40
+ /* 🅰️ masked mark (naked / outlined / hollow) */
16
41
  .abLogo {
17
- display: block;
18
- position: relative;
19
- width: 1.5rem;
20
- height: 1.5rem;
21
- background-color: var(--app-logo-color, #a67c52);
42
+ display: block; /* 🧱 block box */
43
+ position: relative; /* 📌 positioning context */
44
+ width: 1.5rem; /* ↔️ default size */
45
+ height: 1.5rem; /* ↕️ default size */
46
+ /* 🎨 bronze by default; `--app-logo-color` (chrome) or `--ab-logo-color` (prop) override */
47
+ background-color: var(--app-logo-color, var(--ab-logo-color, #A67C52));
48
+ /* 🎭 the shipped Ab mark as mask → no brown square without chrome CSS ✅ */
49
+ -webkit-mask: var(--app-logo-url, url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xml%3Aspace%3D%22preserve%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23A67C52%22%20d%3D%22m1.8%2020.5%209.3-17v17zM22.2%207.7l-9.3-4.2v17l9.3-4.2-4.7-4.3z%22/%3E%3Cpath%20d%3D%22m12.9%2020.5%209.3-4.2-9.3-8.6z%22%20opacity%3D%22.1%22/%3E%3C/svg%3E")) no-repeat 50% 50%;
50
+ mask: var(--app-logo-url, url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xml%3Aspace%3D%22preserve%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23A67C52%22%20d%3D%22m1.8%2020.5%209.3-17v17zM22.2%207.7l-9.3-4.2v17l9.3-4.2-4.7-4.3z%22/%3E%3Cpath%20d%3D%22m12.9%2020.5%209.3-4.2-9.3-8.6z%22%20opacity%3D%22.1%22/%3E%3C/svg%3E")) no-repeat 50% 50%;
51
+ -webkit-mask-size: contain; /* 📐 keep proportions */
52
+ mask-size: contain; /* 📐 keep proportions */
53
+ }
54
+
55
+ /* 🌙 dark: light mark on dark surfaces */
56
+ :global(html.dark) .abLogo:not(.abLogo__mark) {
57
+ background-color: var(--app-logo-color, var(--ab-logo-color, #FFF8F5));
22
58
  }
23
59
 
60
+ /* 🖼️ contained mark (a real <img>) */
24
61
  .abLogoContained {
25
- display: block;
26
- position: relative;
27
- width: 1.5rem;
28
- height: 1.5rem;
29
- object-fit: contain;
62
+ display: block; /* 🧱 block box */
63
+ position: relative; /* 📌 positioning context */
64
+ width: 1.5rem; /* ↔️ default size */
65
+ height: 1.5rem; /* ↕️ default size */
66
+ object-fit: contain; /* 📐 keep proportions */
67
+ }
68
+
69
+ /* 🔤 lockup = mark + wordmark */
70
+ .abLogo__lockup {
71
+ display: inline-flex; /* ➡️ one row */
72
+ align-items: center; /* ↕️ centered */
73
+ gap: 0.28em; /* ↔️ gap scales with the text */
74
+ font-size: 2rem; /* 📏 default lockup size (override with `size`) */
75
+ line-height: 1; /* 📐 tight */
76
+ color: var(--ab-logo-color, #A67C52); /* 🎨 bronze */
77
+ }
78
+
79
+ /* 🌙 dark lockup */
80
+ :global(html.dark) .abLogo__lockup {
81
+ color: var(--ab-logo-color, #FFF8F5);
82
+ }
83
+
84
+ /* 🅰️ the mark inside a lockup follows the text size & color */
85
+ .abLogo__mark {
86
+ width: 1.15em; /* ↔️ ≈ cap height + descender, as in the splash mock */
87
+ height: 1.15em; /* ↕️ square */
88
+ flex: none; /* 🚫 never shrink */
89
+ background-color: currentColor; /* 🎨 same as the wordmark */
90
+ }
91
+
92
+ /* 🔤 the wordmark — Quicksand Bold (font files ship with ab-nextjs-fonts/quicksand/styles.css) */
93
+ .abLogo__wordmark {
94
+ font-family: 'Quicksand-Bold', 'Quicksand', ui-rounded, system-ui, sans-serif; /* 🔤 */
95
+ font-weight: 700; /* 💪 bold */
96
+ letter-spacing: 0.01em; /* ↔️ as in the mock */
97
+ white-space: nowrap; /* 🚫 no wrap */
30
98
  }
@@ -0,0 +1,74 @@
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: AbPill - Server (G36)
28
+ * @file: ab-pill/index.tsx
29
+ * @type: Server component (static, no JS)
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
31
+ *
32
+ * Example usage:
33
+ * 1+|> <AbPill dot="sage">Free forever · MIT</AbPill>
34
+ * -|> <AbPill mono>ab-nextjs-core</AbPill>
35
+ */
36
+
37
+ /*
38
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
39
+ * MOTTO: We'll always do more 😜!!!
40
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
41
+ */
42
+
43
+ // ⚛️ types
44
+ import type { CSSProperties, ReactElement, ReactNode } from 'react';
45
+ // 🧵 classes
46
+ import clsx from 'clsx';
47
+ // 🎨 shares the chip stylesheet (pill composes chip)
48
+ import styles from '../ab-chip/styles.module.css';
49
+ // 🎨 dot colours
50
+ import type { AbChipDot } from '../ab-chip';
51
+
52
+ // ⚙️ props
53
+ export interface AbPillProps {
54
+ children: ReactNode; // 🏷️ eyebrow text
55
+ dot?: AbChipDot; // 🟢 leading dot
56
+ icon?: ReactNode; // 🖼️ decorative icon
57
+ mono?: boolean; // ⌨️ monospace (package names)
58
+ className?: string; // 🏷️
59
+ style?: CSSProperties; // 🎨
60
+ }
61
+
62
+ /** 💊 Eyebrow pill above a title. Static text; dot + icon are decorative. */
63
+ export function AbPill({ children, dot, icon, mono = false, className, style }: AbPillProps): ReactElement {
64
+ return (
65
+ <span className={clsx('AbPill', styles.pill, mono && styles.mono, className)} style={style} data-ab-part="pill">
66
+ {dot ? <span className={styles.dot} data-tone={dot} aria-hidden="true" /> : null /* 🟢 */}
67
+ {icon ? <span className={styles.icon} aria-hidden="true">{icon}</span> : null /* 🖼️ */}
68
+ <span>{children}</span>
69
+ </span>
70
+ );
71
+ }
72
+
73
+ // 📦 default export
74
+ export default AbPill;
@@ -5,17 +5,46 @@
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
27
  * @name: AbProgressChips - Client (port of lyd-progress-chips)
10
28
  * @file: ab-progress-chips/index.tsx
29
+ * @type: TypeScript (React)
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
31
  */
12
32
 
33
+ /*
34
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
35
+ * MOTTO: We'll always do more 😜!!!
36
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
37
+ */
38
+
39
+
13
40
  'use client';
14
41
 
15
42
  import type { CSSProperties, ReactElement } from 'react';
16
43
  import { useState } from 'react';
17
44
  import clsx from 'clsx';
18
45
  import styles from './styles.module.css';
46
+ import { AB_MOTION } from 'ab-nextjs-animations/motion'; // 🎬 transition class names (ab-nextjs-animations >= 0.2.4)
47
+ import 'ab-nextjs-animations/motion/styles.css'; // 🎨 .ab-motion-*
19
48
 
20
49
  export interface AbProgressChip {
21
50
  id: number;
@@ -91,7 +120,7 @@ const AbProgressChips = ({
91
120
  onChipClick?.(chip.id, chip.code, chip.name, chip.duration);
92
121
  }}
93
122
  >
94
- <span className={styles.abProgressChipBar} aria-hidden />
123
+ <span className={clsx(styles.abProgressChipBar, AB_MOTION.size)} aria-hidden />{/* 📏 width fill = .ab-motion-size */}
95
124
  <span className={styles.abProgressChipCode}>{chip.code}</span>
96
125
  {!isChipNameHidden ? <span className={styles.abProgressChipName}>{chip.name}</span> : null}
97
126
  </button>
@@ -1,3 +1,42 @@
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: ab-progress-chips - styles
28
+ * @file: ab-progress-chips/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
+
1
40
  .abProgressChips {
2
41
  display: flex;
3
42
  flex-wrap: wrap;
@@ -29,7 +68,7 @@
29
68
  height: 3px;
30
69
  background: var(--ab-primary, #6750a4);
31
70
  width: var(--chip-progress, 0%);
32
- transition: width 0.2s linear;
71
+ --ab-motion-easing: linear; /* 📏 fill motion = .ab-motion-size (ab-nextjs-animations) */
33
72
  }
34
73
  .abProgressChipName {
35
74
  font-size: 0.8125rem;
@@ -5,17 +5,48 @@
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
27
  * @name: AbSearchbar - Client (port of lyd-searchbar)
10
28
  * @file: ab-searchbar/index.tsx
29
+ * @type: TypeScript (React)
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
31
  */
12
32
 
33
+ /*
34
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
35
+ * MOTTO: We'll always do more 😜!!!
36
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
37
+ */
38
+
39
+
13
40
  'use client';
14
41
 
15
42
  import type { CSSProperties, KeyboardEvent, ReactElement } from 'react';
16
43
  import { useId, useRef, useState } from 'react';
17
44
  import clsx from 'clsx';
18
45
  import styles from './styles.module.css';
46
+ import { AB_MOTION } from 'ab-nextjs-animations/motion'; // 🎬 transition class names (ab-nextjs-animations >= 0.2.4)
47
+ import 'ab-nextjs-animations/motion/styles.css'; // 🎨 .ab-motion-*
48
+ import { AB_SPIN_CLASS } from 'ab-nextjs-animations/spin'; // 🌀 spinner (ab-nextjs-animations >= 0.2.4)
49
+ import 'ab-nextjs-animations/spin/styles.css'; // 🌀 .ab-spin
19
50
 
20
51
  export interface AbSearchbarProps {
21
52
  className?: string;
@@ -99,7 +130,7 @@ const AbSearchbar = ({
99
130
  <div
100
131
  hidden={hidden}
101
132
  style={style}
102
- className={clsx('AbSearchbar', styles.abSearchbar, disabled && styles.isDisabled, className)}
133
+ className={clsx('AbSearchbar', styles.abSearchbar, AB_MOTION.colors, disabled && styles.isDisabled, className)}
103
134
  data-busy={busy ? 'true' : 'false'}
104
135
  >
105
136
  <span className={clsx('material-symbols-rounded', styles.abSearchbarIcon)} aria-hidden>
@@ -124,7 +155,7 @@ const AbSearchbar = ({
124
155
  }}
125
156
  onKeyUp={(e) => onKeyUp?.(e.currentTarget.value, e)}
126
157
  />
127
- {busy ? <span className={styles.abSearchbarSpinner} aria-hidden /> : null}
158
+ {busy ? <span className={clsx(styles.abSearchbarSpinner, AB_SPIN_CLASS)} aria-hidden /> : null}
128
159
  {current && !disabled ? (
129
160
  <button type="button" className={styles.abSearchbarClear} aria-label={clearLabel} onClick={clear}>
130
161
  <span className="material-symbols-rounded" aria-hidden>close</span>