ab-nextjs-components 0.1.12 โ†’ 0.1.13

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 (119) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +22 -0
  3. package/ab-app-bar/index.tsx +181 -0
  4. package/ab-app-bar/styles.module.css +119 -0
  5. package/ab-avatar/index.tsx +2 -1
  6. package/ab-avatar/styles.module.css +32 -0
  7. package/ab-balloon/index.tsx +134 -23
  8. package/ab-balloon/styles.module.css +84 -7
  9. package/ab-brand/index.tsx +1 -1
  10. package/ab-button/index.tsx +15 -2
  11. package/ab-button/styles.module.css +31 -0
  12. package/ab-card/index.tsx +89 -0
  13. package/ab-card/styles.module.css +68 -0
  14. package/ab-collapsible/index.tsx +1 -1
  15. package/ab-color/index.tsx +1 -0
  16. package/ab-color/styles.module.css +32 -0
  17. package/ab-demo-box/index.tsx +1 -0
  18. package/ab-demo-box/styles.module.css +32 -0
  19. package/ab-demo-code/index.tsx +1 -0
  20. package/ab-demo-code/styles.module.css +32 -0
  21. package/ab-icon/builtin.ts +15 -1
  22. package/ab-icon/helpers.ts +37 -0
  23. package/ab-icon/index.tsx +14 -8
  24. package/ab-icon/registrar.tsx +68 -0
  25. package/ab-icon-button/index.tsx +8 -3
  26. package/ab-image/index.tsx +1 -0
  27. package/ab-image/styles.module.css +32 -0
  28. package/ab-info/index.tsx +2 -1
  29. package/ab-info/styles.module.css +32 -0
  30. package/ab-input/index.tsx +1 -0
  31. package/ab-input/styles.module.css +1 -0
  32. package/ab-install-snippet/styles.module.css +16 -2
  33. package/ab-kbd/index.tsx +65 -0
  34. package/ab-kbd/styles.module.css +55 -0
  35. package/ab-key-feature/index.tsx +2 -1
  36. package/ab-key-feature/styles.module.css +32 -0
  37. package/ab-like-button/index.tsx +1 -1
  38. package/ab-link/index.tsx +112 -0
  39. package/ab-link/locale.ts +53 -0
  40. package/ab-locale-switcher/index.tsx +17 -0
  41. package/ab-locale-switcher/styles.module.css +11 -0
  42. package/ab-main-headline/index.tsx +1 -0
  43. package/ab-main-headline/styles.module.css +32 -0
  44. package/ab-menu/index.tsx +6 -5
  45. package/ab-menu/styles.module.css +32 -0
  46. package/ab-name/index.tsx +1 -0
  47. package/ab-name/styles.module.css +32 -0
  48. package/ab-navbar/index.tsx +54 -46
  49. package/ab-navbar/styles.module.css +84 -28
  50. package/ab-navbar/view.tsx +163 -0
  51. package/ab-package-card/index.tsx +94 -0
  52. package/ab-package-card/styles.module.css +41 -0
  53. package/ab-page-paginator/index.tsx +1 -0
  54. package/ab-page-paginator/styles.module.css +32 -0
  55. package/ab-page-switcher/index.tsx +1 -0
  56. package/ab-page-switcher/styles.module.css +32 -0
  57. package/ab-preview/index.tsx +1 -0
  58. package/ab-preview/styles.module.css +32 -0
  59. package/ab-price/index.tsx +1 -0
  60. package/ab-price/styles.module.css +32 -0
  61. package/ab-price-tag/index.tsx +1 -0
  62. package/ab-price-tag/styles.module.css +32 -0
  63. package/ab-product/index.tsx +1 -0
  64. package/ab-product/styles.module.css +32 -0
  65. package/ab-product-item/index.tsx +1 -0
  66. package/ab-product-item/styles.module.css +32 -0
  67. package/ab-search-result/index.tsx +1 -0
  68. package/ab-search-result/styles.module.css +32 -0
  69. package/ab-search-trigger/index.tsx +142 -0
  70. package/ab-search-trigger/styles.module.css +70 -0
  71. package/ab-sidebar/index.tsx +88 -49
  72. package/ab-sidebar/styles.module.css +136 -31
  73. package/ab-sidebar/view.tsx +182 -0
  74. package/ab-switch-back/index.tsx +2 -1
  75. package/ab-switch-back/styles.module.css +32 -0
  76. package/ab-tab/index.tsx +2 -1
  77. package/ab-tab/styles.module.css +32 -0
  78. package/ab-tabs/index.tsx +1 -0
  79. package/ab-tabs/styles.module.css +32 -0
  80. package/ab-test-hello/index.tsx +1 -0
  81. package/ab-test-hello/styles.module.css +32 -0
  82. package/ab-text/index.tsx +1 -0
  83. package/ab-text/styles.module.css +32 -0
  84. package/ab-toc/index.tsx +124 -0
  85. package/ab-toc/styles.module.css +54 -0
  86. package/css/chrome-mq.css +32 -0
  87. package/css/doodle.css +32 -0
  88. package/css/logo.css +32 -0
  89. package/css/spinner.css +32 -0
  90. package/css/toast.css +32 -0
  91. package/index.ts +18 -0
  92. package/package.json +27 -10
  93. package/server/ab-avatar/index.tsx +2 -1
  94. package/server/ab-avatar/styles.module.css +32 -0
  95. package/server/ab-badge/index.tsx +1 -0
  96. package/server/ab-badge/styles.module.css +32 -0
  97. package/server/ab-brand/index.tsx +1 -1
  98. package/server/ab-icon/index.tsx +13 -8
  99. package/server/ab-key-feature/index.tsx +2 -1
  100. package/server/ab-key-feature/styles.module.css +32 -0
  101. package/server/ab-name/index.tsx +1 -0
  102. package/server/ab-name/styles.module.css +32 -0
  103. package/server/ab-nav-link/index.tsx +2 -1
  104. package/server/ab-nav-link/styles.module.css +32 -0
  105. package/server/ab-navbar/index.tsx +44 -45
  106. package/server/ab-polygon/index.tsx +1 -0
  107. package/server/ab-polygon/styles.module.css +32 -0
  108. package/server/ab-sidebar/index.tsx +44 -49
  109. package/server/ab-switch-back/index.tsx +2 -1
  110. package/server/ab-switch-back/styles.module.css +32 -0
  111. package/server/ab-test-hello/index.tsx +1 -0
  112. package/server/ab-test-hello/styles.module.css +32 -0
  113. package/server/ab-text/index.tsx +1 -0
  114. package/server/ab-text/styles.module.css +32 -0
  115. package/server/index.ts +1 -0
  116. package/styles.css +32 -0
  117. package/types/index.d.ts +35 -0
  118. package/server/ab-navbar/styles.module.css +0 -35
  119. package/server/ab-sidebar/styles.module.css +0 -41
@@ -0,0 +1,41 @@
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)); } /* ๐Ÿท๏ธ */
@@ -8,6 +8,7 @@
8
8
  * @project: ab-nextjs-components
9
9
  * @name: AbPagePaginator - Client (port of lyd-page-paginator)
10
10
  * @file: ab-page-paginator/index.tsx
11
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
12
  */
12
13
 
13
14
  'use client';
@@ -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;
@@ -8,6 +8,7 @@
8
8
  * @project: ab-nextjs-components
9
9
  * @name: AbPageSwitcher - Client (port of lyd-page-switcher)
10
10
  * @file: ab-page-switcher/index.tsx
11
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
12
  */
12
13
 
13
14
  'use client';
@@ -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;
@@ -8,6 +8,7 @@
8
8
  * @project: ab-nextjs-components
9
9
  * @name: AbPreview - Client (Adapt of lyd-preview; db/providers stripped)
10
10
  * @file: ab-preview/index.tsx
11
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
12
  */
12
13
 
13
14
  'use client';
@@ -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));
@@ -8,6 +8,7 @@
8
8
  * @project: ab-nextjs-components
9
9
  * @name: AbPrice - Client (port of lyd-price)
10
10
  * @file: ab-price/index.tsx
11
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
12
  */
12
13
 
13
14
  'use client';
@@ -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;
@@ -8,6 +8,7 @@
8
8
  * @project: ab-nextjs-components
9
9
  * @name: AbPriceTag - Client (port of lyd-price-tag)
10
10
  * @file: ab-price-tag/index.tsx
11
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
12
  */
12
13
 
13
14
  'use client';
@@ -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;
@@ -8,6 +8,7 @@
8
8
  * @project: ab-nextjs-components
9
9
  * @name: AbProduct - Client (Adapt of lyd-product; db/hooks stripped)
10
10
  * @file: ab-product/index.tsx
11
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
12
  */
12
13
 
13
14
  'use client';
@@ -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;
@@ -8,6 +8,7 @@
8
8
  * @project: ab-nextjs-components
9
9
  * @name: AbProductItem - Client (Adapt of lyd-product-item; providers stripped)
10
10
  * @file: ab-product-item/index.tsx
11
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
12
  */
12
13
 
13
14
  'use client';
@@ -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-item/styles.module.css
29
+ * @type: CSS Stylesheet
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
31
+ */
32
+
1
33
  .abProductItem {
2
34
  display: flex;
3
35
  gap: 0.75rem;
@@ -8,6 +8,7 @@
8
8
  * @project: ab-nextjs-components
9
9
  * @name: AbSearchResult - Client (port of lyd-search-result)
10
10
  * @file: ab-search-result/index.tsx
11
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
11
12
  */
12
13
 
13
14
  'use client';
@@ -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-search-result/styles.module.css
29
+ * @type: CSS Stylesheet
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
31
+ */
32
+
1
33
  .abSearchResult {
2
34
  position: relative;
3
35
  display: flex;
@@ -0,0 +1,142 @@
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.tsx
28
+ * @file: ab-search-trigger/index.tsx
29
+ * @type: Component
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
31
+ */
32
+
33
+ /*
34
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
35
+ * MOTTO: We'll always do more ๐Ÿ˜œ!!!
36
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
37
+ */
38
+
39
+ 'use client';
40
+
41
+ // โš›๏ธ React
42
+ import { useEffect, useSyncExternalStore, type MouseEvent, type ReactElement } from 'react';
43
+ // ๐Ÿงต classes
44
+ import clsx from 'clsx';
45
+ // ๐Ÿ”— G42 link (href fallback)
46
+ import Link from '../ab-link';
47
+ // ๐Ÿ”ฃ icon (search is a built-in)
48
+ import AbIcon from '../ab-icon';
49
+ // โŒจ๏ธ key hint
50
+ import AbKbd from '../ab-kbd';
51
+ // ๐ŸŽฌ hover / press motion from the package
52
+ import 'ab-nextjs-animations/motion/styles.css';
53
+ // ๐ŸŽจ styles
54
+ import styles from './styles.module.css';
55
+
56
+ /** โš™๏ธ props */
57
+ export interface AbSearchTriggerProps {
58
+ label?: string; // ๐Ÿท๏ธ placeholder text (default "Search")
59
+ onOpen?: () => void; // ๐Ÿ”” opens your search dialog (button mode)
60
+ href?: string; // ๐Ÿ”— no onOpen โ†’ a link to a search page (also the JS-off path)
61
+ hotkey?: boolean; // โŒจ๏ธ listen for โŒ˜K / Ctrl+K (default true when onOpen is set)
62
+ shortcut?: boolean; // โŒจ๏ธ alias of `hotkey` (Joseph's spec name); `hotkey` wins when both are set
63
+ compact?: boolean; // ๐Ÿ“ฑ icon-only pill (the label stays for screen readers), e.g. the mobile app bar
64
+ comingSoon?: boolean; // ๐Ÿšง visible but inert: aria-disabled, no hotkey
65
+ comingSoonLabel?: string; // ๐Ÿท๏ธ default "Coming soon"
66
+ className?: string; // ๐Ÿท๏ธ
67
+ }
68
+
69
+ // ๐Ÿ”• nothing to subscribe to
70
+ const noopSubscribe = () => () => {};
71
+
72
+ /** ๐ŸŽ Apple platforms show โŒ˜, everyone else Ctrl. */
73
+ export function isAbApplePlatform(nav?: { platform?: string; userAgent?: string; userAgentData?: { platform?: string } }): boolean {
74
+ const p = nav?.userAgentData?.platform ?? nav?.platform ?? nav?.userAgent ?? ''; // ๐Ÿ”
75
+ return /mac|iphone|ipad|ipod/i.test(p); // ๐ŸŽ
76
+ }
77
+
78
+ /**
79
+ * ๐Ÿ”Ž AbSearchTrigger (G44): a search "field" that opens your dialog. Shows โŒ˜K on Apple, Ctrl K elsewhere,
80
+ * announces `aria-keyshortcuts="Meta+K Control+K"`, and falls back to a link when there's no `onOpen`.
81
+ * Note: the hotkey is a local listener; G48 `useAbHotkey` is deliberately not in hooks 0.1.7.
82
+ */
83
+ const AbSearchTrigger = ({ label = 'Search', onOpen, href, hotkey, shortcut, compact = false, comingSoon = false, comingSoonLabel = 'Coming soon', className }: AbSearchTriggerProps): ReactElement => {
84
+ // ๐ŸŽ SSR renders "Ctrl"; hydration then reads the platform (useSyncExternalStore: no mismatch, no effect)
85
+ const apple = useSyncExternalStore(
86
+ noopSubscribe, // ๐Ÿ”• the platform never changes
87
+ () => isAbApplePlatform(navigator as Navigator & { userAgentData?: { platform?: string } }), // ๐Ÿ–ฅ๏ธ client
88
+ () => false, // ๐Ÿ–จ๏ธ server
89
+ );
90
+ // โŒจ๏ธ โŒ˜K / Ctrl+K
91
+ const listen = !comingSoon && !!onOpen && (hotkey ?? shortcut ?? true);
92
+ useEffect(() => {
93
+ if (!listen) return;
94
+ const onKey = (e: KeyboardEvent) => {
95
+ if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === 'k') {
96
+ e.preventDefault(); // ๐Ÿšซ browser search bar
97
+ onOpen?.(); // ๐Ÿ””
98
+ }
99
+ };
100
+ window.addEventListener('keydown', onKey); // ๐Ÿ‘‚
101
+ return () => window.removeEventListener('keydown', onKey); // ๐Ÿงน
102
+ }, [listen, onOpen]);
103
+
104
+ // ๐Ÿงฉ inner content
105
+ const inner = (
106
+ <>
107
+ <AbIcon name="search" size={20} className={styles.abSearchTriggerIcon} />
108
+ <span className={clsx(styles.abSearchTriggerLabel, compact && styles.abSearchTriggerSrOnly)}>{label}</span>
109
+ {/* ๐Ÿšง coming soon tag, or โŒจ๏ธ the key hint ONLY while a hotkey is really listening (James #3, D24a) */}
110
+ {comingSoon
111
+ ? !compact && <span className={styles.abSearchTriggerSoon}>{comingSoonLabel}</span>
112
+ : listen && !compact && <AbKbd keys={[apple ? 'โŒ˜' : 'Ctrl', 'K']} className={styles.abSearchTriggerKbd} />}
113
+ </>
114
+ );
115
+ const common = {
116
+ className: clsx('AbSearchTrigger', styles.abSearchTrigger, !comingSoon && 'ab-motion-interactive', className), // ๐Ÿท๏ธ
117
+ 'data-ab-part': 'search-trigger', // ๐Ÿงฉ
118
+ 'aria-keyshortcuts': listen ? 'Meta+K Control+K' : undefined, // โ™ฟ only announced when bound (James #3)
119
+ 'data-compact': compact ? 'true' : undefined, // ๐Ÿ“ฑ
120
+ };
121
+
122
+ // ๐Ÿšง coming soon: focusable, announced, inert
123
+ if (comingSoon) return <button type="button" {...common} aria-disabled="true" data-coming-soon="true">{inner}</button>;
124
+ // ๐Ÿ”— href โ†’ ALWAYS a real link, so it works with JS off (D24a: /docs). With onOpen too, JS intercepts
125
+ // the click and opens the dialog instead (James #4); modified clicks (new tab, โ€ฆ) keep the link.
126
+ if (href) {
127
+ const onClick = onOpen
128
+ ? (e: MouseEvent<HTMLAnchorElement>) => {
129
+ if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return; // ๐Ÿ–ฑ๏ธ let the browser handle it
130
+ e.preventDefault(); // ๐Ÿšซ navigation
131
+ onOpen(); // ๐Ÿ””
132
+ }
133
+ : undefined;
134
+ return <Link href={href} {...common} onClick={onClick} aria-haspopup={onOpen ? 'dialog' : undefined}>{inner}</Link>;
135
+ }
136
+ // ๐Ÿ”˜ dialog opener
137
+ return <button type="button" {...common} aria-haspopup="dialog" onClick={onOpen}>{inner}</button>;
138
+ };
139
+
140
+ // ๐Ÿ“ฆ exports
141
+ export default AbSearchTrigger;
142
+ export { AbSearchTrigger };
@@ -0,0 +1,70 @@
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: AbSearchTrigger - Styles (G44)
28
+ * @file: ab-search-trigger/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
+ /* ๐Ÿ”Ž pill "field" */
40
+ .abSearchTrigger {
41
+ display: inline-flex; /* ๐Ÿ“ */
42
+ align-items: center; /* โ†•๏ธ */
43
+ gap: 8px; /* โ†”๏ธ */
44
+ min-width: 0; /* ๐Ÿ“ */
45
+ width: 100%; /* ๐Ÿ“ */
46
+ max-width: 360px; /* ๐Ÿ“ */
47
+ height: 40px; /* ๐Ÿ“ */
48
+ padding: 0 8px 0 12px; /* ๐Ÿ“ฆ */
49
+ border: 0; /* ๐Ÿšซ */
50
+ border-radius: 999px; /* ๐ŸŸข */
51
+ background: var(--ab-color-surface-container-high, rgb(0 0 0 / 0.06)); /* ๐ŸŽจ */
52
+ color: var(--ab-color-on-surface-variant, inherit); /* ๐Ÿ–‹๏ธ */
53
+ font: inherit; /* ๐Ÿ”ค */
54
+ text-decoration: none; /* ๐Ÿšซ */
55
+ cursor: pointer; /* ๐Ÿ‘† */
56
+ box-sizing: border-box; /* ๐Ÿ“ฆ */
57
+ }
58
+ .abSearchTrigger:focus-visible {
59
+ outline: var(--ab-focus-ring-width, 2px) solid var(--ab-color-primary, #8f4c38); /* โ™ฟ */
60
+ outline-offset: var(--ab-focus-ring-offset, 2px); /* โ™ฟ */
61
+ }
62
+ .abSearchTrigger[aria-disabled='true'] { cursor: default; opacity: 0.72; } /* ๐Ÿšง */
63
+ .abSearchTriggerLabel { flex: 1; text-align: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* ๐Ÿท๏ธ */
64
+ .abSearchTriggerIcon { flex: none; } /* ๐Ÿ”ฃ */
65
+ .abSearchTriggerSoon { font-size: 12px; opacity: 0.8; } /* ๐Ÿšง */
66
+
67
+ /* ๐Ÿ“ฑ compact (Joseph #3/#16): icon-only round pill for small app bars, no overflow at 390px */
68
+ .abSearchTrigger[data-compact='true'] { flex: none; width: 40px; min-width: 40px; padding: 0; justify-content: center; } /* ๐Ÿ”˜ */
69
+ /* ๐Ÿ•ถ๏ธ visually hidden, still read by screen readers */
70
+ .abSearchTriggerSrOnly { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; flex: none; }