@ojiepermana/angular 22.1.14 → 22.2.1

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 (252) hide show
  1. package/README.md +8 -6
  2. package/SUPPORT.md +3 -3
  3. package/chart/README.md +1 -1
  4. package/component/README.md +2 -2
  5. package/component/calendar/README.md +3 -15
  6. package/component/drawer/README.md +1 -2
  7. package/fesm2022/ojiepermana-angular-chart-area.mjs +352 -137
  8. package/fesm2022/ojiepermana-angular-chart-bar.mjs +744 -524
  9. package/fesm2022/ojiepermana-angular-chart-core.mjs +1140 -1344
  10. package/fesm2022/ojiepermana-angular-chart-line.mjs +393 -147
  11. package/fesm2022/ojiepermana-angular-chart-pie.mjs +408 -179
  12. package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1262 -920
  13. package/fesm2022/ojiepermana-angular-chart-radar.mjs +473 -205
  14. package/fesm2022/ojiepermana-angular-chart-radial.mjs +425 -182
  15. package/fesm2022/ojiepermana-angular-chart-scatter.mjs +386 -210
  16. package/fesm2022/ojiepermana-angular-chart.mjs +3 -19
  17. package/fesm2022/ojiepermana-angular-component-accordion.mjs +485 -243
  18. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +963 -325
  19. package/fesm2022/ojiepermana-angular-component-alert.mjs +266 -103
  20. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +80 -35
  21. package/fesm2022/ojiepermana-angular-component-avatar.mjs +402 -135
  22. package/fesm2022/ojiepermana-angular-component-badge.mjs +109 -59
  23. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +410 -142
  24. package/fesm2022/ojiepermana-angular-component-button-group.mjs +249 -96
  25. package/fesm2022/ojiepermana-angular-component-button.mjs +153 -75
  26. package/fesm2022/ojiepermana-angular-component-calendar.mjs +531 -418
  27. package/fesm2022/ojiepermana-angular-component-card.mjs +457 -171
  28. package/fesm2022/ojiepermana-angular-component-carousel.mjs +642 -272
  29. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +312 -108
  30. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +299 -115
  31. package/fesm2022/ojiepermana-angular-component-combobox.mjs +396 -183
  32. package/fesm2022/ojiepermana-angular-component-command.mjs +807 -347
  33. package/fesm2022/ojiepermana-angular-component-composer.mjs +807 -330
  34. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +196 -161
  35. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +650 -338
  36. package/fesm2022/ojiepermana-angular-component-dialog.mjs +710 -316
  37. package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -5
  38. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +1212 -646
  39. package/fesm2022/ojiepermana-angular-component-editor.mjs +987 -502
  40. package/fesm2022/ojiepermana-angular-component-empty.mjs +350 -137
  41. package/fesm2022/ojiepermana-angular-component-form.mjs +813 -434
  42. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +486 -277
  43. package/fesm2022/ojiepermana-angular-component-icon.mjs +241 -140
  44. package/fesm2022/ojiepermana-angular-component-input-group.mjs +449 -176
  45. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +891 -488
  46. package/fesm2022/ojiepermana-angular-component-input.mjs +86 -55
  47. package/fesm2022/ojiepermana-angular-component-item.mjs +713 -261
  48. package/fesm2022/ojiepermana-angular-component-kanban.mjs +714 -216
  49. package/fesm2022/ojiepermana-angular-component-kbd.mjs +124 -52
  50. package/fesm2022/ojiepermana-angular-component-label.mjs +82 -31
  51. package/fesm2022/ojiepermana-angular-component-menubar.mjs +479 -329
  52. package/fesm2022/ojiepermana-angular-component-native-select.mjs +167 -65
  53. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +683 -380
  54. package/fesm2022/ojiepermana-angular-component-pagination.mjs +277 -94
  55. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +1283 -607
  56. package/fesm2022/ojiepermana-angular-component-popover.mjs +291 -204
  57. package/fesm2022/ojiepermana-angular-component-progress.mjs +176 -53
  58. package/fesm2022/ojiepermana-angular-component-radio.mjs +449 -142
  59. package/fesm2022/ojiepermana-angular-component-resizable.mjs +659 -453
  60. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +117 -39
  61. package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +351 -172
  62. package/fesm2022/ojiepermana-angular-component-select.mjs +475 -345
  63. package/fesm2022/ojiepermana-angular-component-separator.mjs +102 -35
  64. package/fesm2022/ojiepermana-angular-component-sheet.mjs +797 -347
  65. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +62 -29
  66. package/fesm2022/ojiepermana-angular-component-slider.mjs +592 -376
  67. package/fesm2022/ojiepermana-angular-component-spinner.mjs +135 -38
  68. package/fesm2022/ojiepermana-angular-component-switch.mjs +315 -103
  69. package/fesm2022/ojiepermana-angular-component-table.mjs +440 -153
  70. package/fesm2022/ojiepermana-angular-component-tabs.mjs +590 -317
  71. package/fesm2022/ojiepermana-angular-component-textarea.mjs +85 -50
  72. package/fesm2022/ojiepermana-angular-component-timeline.mjs +609 -231
  73. package/fesm2022/ojiepermana-angular-component-toast.mjs +229 -243
  74. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +573 -288
  75. package/fesm2022/ojiepermana-angular-component-toggle.mjs +187 -78
  76. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +798 -517
  77. package/fesm2022/ojiepermana-angular-component-utils-core.mjs +159 -292
  78. package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +46 -58
  79. package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +76 -38
  80. package/fesm2022/ojiepermana-angular-component-utils.mjs +2 -8
  81. package/fesm2022/ojiepermana-angular-component.mjs +0 -10
  82. package/fesm2022/ojiepermana-angular-navigation-core.mjs +13 -23
  83. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +35 -24
  84. package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-DYuysKVf.mjs +129 -0
  85. package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-COiTaw34.mjs +812 -0
  86. package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-COQ-60DS.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-YIz0IsIb.mjs} +392 -207
  87. package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-D2vwEwBY.mjs +650 -0
  88. package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-B5D7yXfb.mjs +662 -0
  89. package/fesm2022/ojiepermana-angular-navigation-navigation-item.component-CUb68MZH.mjs +1219 -0
  90. package/fesm2022/ojiepermana-angular-navigation-navigation-list.component-CrK16trj.mjs +327 -0
  91. package/fesm2022/ojiepermana-angular-navigation-service.mjs +544 -724
  92. package/fesm2022/ojiepermana-angular-navigation-types.mjs +139 -56
  93. package/fesm2022/ojiepermana-angular-navigation.mjs +3256 -4
  94. package/fesm2022/ojiepermana-angular-sdk.mjs +91 -201
  95. package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1125 -737
  96. package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +245 -328
  97. package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +35 -38
  98. package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1928 -553
  99. package/fesm2022/ojiepermana-angular-theme-layout.mjs +847 -496
  100. package/fesm2022/ojiepermana-angular-theme-page-core.mjs +288 -358
  101. package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +362 -224
  102. package/fesm2022/ojiepermana-angular-theme-page-overview.mjs +88 -0
  103. package/fesm2022/ojiepermana-angular-theme-page-root.mjs +576 -254
  104. package/fesm2022/ojiepermana-angular-theme-page-side.mjs +317 -177
  105. package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +256 -112
  106. package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -12
  107. package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +215 -326
  108. package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +68 -129
  109. package/fesm2022/ojiepermana-angular-theme-shell.mjs +907 -378
  110. package/fesm2022/ojiepermana-angular-theme-styles.mjs +521 -720
  111. package/fesm2022/ojiepermana-angular-theme.mjs +0 -10
  112. package/fesm2022/ojiepermana-angular.mjs +5 -24
  113. package/navigation/README.md +69 -18
  114. package/package.json +16 -12
  115. package/sdk/README.md +1 -1
  116. package/sdk/src/writer/index.js +2 -2
  117. package/theme/README.md +1 -1
  118. package/theme/layout/README.md +2 -4
  119. package/theme/page/README.md +50 -0
  120. package/theme/styles/README.md +10 -10
  121. package/theme/styles/css/base/prefers-dark.css +1 -1
  122. package/theme/styles/css/base/status.css +1 -1
  123. package/theme/styles/css/color/amber.css +1 -1
  124. package/theme/styles/css/color/blue.css +1 -1
  125. package/theme/styles/css/color/cyan.css +1 -1
  126. package/theme/styles/css/color/emerald.css +1 -1
  127. package/theme/styles/css/color/fuchsia.css +1 -1
  128. package/theme/styles/css/color/green.css +1 -1
  129. package/theme/styles/css/color/indigo.css +1 -1
  130. package/theme/styles/css/color/lime.css +1 -1
  131. package/theme/styles/css/color/orange.css +1 -1
  132. package/theme/styles/css/color/pink.css +1 -1
  133. package/theme/styles/css/color/purple.css +1 -1
  134. package/theme/styles/css/color/red.css +1 -1
  135. package/theme/styles/css/color/rose.css +1 -1
  136. package/theme/styles/css/color/sky.css +1 -1
  137. package/theme/styles/css/color/teal.css +1 -1
  138. package/theme/styles/css/color/violet.css +1 -1
  139. package/theme/styles/css/color/yellow.css +1 -1
  140. package/theme/styles/css/neutral/gray.css +1 -1
  141. package/theme/styles/css/neutral/mauve.css +1 -1
  142. package/theme/styles/css/neutral/mist.css +1 -1
  143. package/theme/styles/css/neutral/neutral.css +1 -1
  144. package/theme/styles/css/neutral/olive.css +1 -1
  145. package/theme/styles/css/neutral/slate.css +1 -1
  146. package/theme/styles/css/neutral/stone.css +1 -1
  147. package/theme/styles/css/neutral/taupe.css +1 -1
  148. package/theme/styles/css/neutral/zinc.css +1 -1
  149. package/types/ojiepermana-angular-chart-area.d.ts +126 -63
  150. package/types/ojiepermana-angular-chart-bar.d.ts +244 -154
  151. package/types/ojiepermana-angular-chart-core.d.ts +409 -398
  152. package/types/ojiepermana-angular-chart-line.d.ts +141 -68
  153. package/types/ojiepermana-angular-chart-pie.d.ts +192 -121
  154. package/types/ojiepermana-angular-chart-primitives.d.ts +283 -214
  155. package/types/ojiepermana-angular-chart-radar.d.ts +189 -108
  156. package/types/ojiepermana-angular-chart-radial.d.ts +177 -106
  157. package/types/ojiepermana-angular-chart-scatter.d.ts +166 -110
  158. package/types/ojiepermana-angular-chart.d.ts +3 -2
  159. package/types/ojiepermana-angular-component-accordion.d.ts +135 -81
  160. package/types/ojiepermana-angular-component-alert-dialog.d.ts +271 -123
  161. package/types/ojiepermana-angular-component-alert.d.ts +69 -39
  162. package/types/ojiepermana-angular-component-aspect-ratio.d.ts +20 -12
  163. package/types/ojiepermana-angular-component-avatar.d.ts +103 -49
  164. package/types/ojiepermana-angular-component-badge.d.ts +36 -24
  165. package/types/ojiepermana-angular-component-breadcrumb.d.ts +79 -40
  166. package/types/ojiepermana-angular-component-button-group.d.ts +48 -24
  167. package/types/ojiepermana-angular-component-button.d.ts +44 -27
  168. package/types/ojiepermana-angular-component-calendar.d.ts +145 -107
  169. package/types/ojiepermana-angular-component-card.d.ts +112 -63
  170. package/types/ojiepermana-angular-component-carousel.d.ts +150 -81
  171. package/types/ojiepermana-angular-component-checkbox.d.ts +96 -38
  172. package/types/ojiepermana-angular-component-collapsible.d.ts +65 -39
  173. package/types/ojiepermana-angular-component-combobox.d.ts +100 -55
  174. package/types/ojiepermana-angular-component-command.d.ts +206 -121
  175. package/types/ojiepermana-angular-component-composer.d.ts +184 -84
  176. package/types/ojiepermana-angular-component-context-menu.d.ts +51 -41
  177. package/types/ojiepermana-angular-component-date-picker.d.ts +199 -109
  178. package/types/ojiepermana-angular-component-dialog.d.ts +200 -105
  179. package/types/ojiepermana-angular-component-drawer.d.ts +2 -1
  180. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +324 -202
  181. package/types/ojiepermana-angular-component-editor.d.ts +215 -117
  182. package/types/ojiepermana-angular-component-empty.d.ts +80 -45
  183. package/types/ojiepermana-angular-component-form.d.ts +185 -121
  184. package/types/ojiepermana-angular-component-hover-card.d.ts +130 -72
  185. package/types/ojiepermana-angular-component-icon.d.ts +87 -57
  186. package/types/ojiepermana-angular-component-input-group.d.ts +93 -46
  187. package/types/ojiepermana-angular-component-input-otp.d.ts +243 -150
  188. package/types/ojiepermana-angular-component-input.d.ts +27 -17
  189. package/types/ojiepermana-angular-component-item.d.ts +160 -84
  190. package/types/ojiepermana-angular-component-kanban.d.ts +157 -62
  191. package/types/ojiepermana-angular-component-kbd.d.ts +24 -15
  192. package/types/ojiepermana-angular-component-label.d.ts +19 -11
  193. package/types/ojiepermana-angular-component-menubar.d.ts +120 -90
  194. package/types/ojiepermana-angular-component-native-select.d.ts +37 -24
  195. package/types/ojiepermana-angular-component-navigation-menu.d.ts +157 -98
  196. package/types/ojiepermana-angular-component-pagination.d.ts +78 -28
  197. package/types/ojiepermana-angular-component-pillbox.d.ts +361 -204
  198. package/types/ojiepermana-angular-component-popover.d.ts +94 -64
  199. package/types/ojiepermana-angular-component-progress.d.ts +45 -17
  200. package/types/ojiepermana-angular-component-radio.d.ts +129 -53
  201. package/types/ojiepermana-angular-component-resizable.d.ts +160 -112
  202. package/types/ojiepermana-angular-component-scroll-area.d.ts +33 -15
  203. package/types/ojiepermana-angular-component-segmented-control.d.ts +94 -50
  204. package/types/ojiepermana-angular-component-select.d.ts +94 -77
  205. package/types/ojiepermana-angular-component-separator.d.ts +26 -14
  206. package/types/ojiepermana-angular-component-sheet.d.ts +226 -116
  207. package/types/ojiepermana-angular-component-skeleton.d.ts +13 -10
  208. package/types/ojiepermana-angular-component-slider.d.ts +140 -75
  209. package/types/ojiepermana-angular-component-spinner.d.ts +31 -13
  210. package/types/ojiepermana-angular-component-switch.d.ts +97 -40
  211. package/types/ojiepermana-angular-component-table.d.ts +102 -50
  212. package/types/ojiepermana-angular-component-tabs.d.ts +174 -115
  213. package/types/ojiepermana-angular-component-textarea.d.ts +27 -17
  214. package/types/ojiepermana-angular-component-timeline.d.ts +141 -59
  215. package/types/ojiepermana-angular-component-toast.d.ts +51 -55
  216. package/types/ojiepermana-angular-component-toggle-group.d.ts +159 -88
  217. package/types/ojiepermana-angular-component-toggle.d.ts +47 -25
  218. package/types/ojiepermana-angular-component-tooltip.d.ts +222 -132
  219. package/types/ojiepermana-angular-component-utils-core.d.ts +81 -90
  220. package/types/ojiepermana-angular-component-utils-overlay.d.ts +7 -11
  221. package/types/ojiepermana-angular-component-utils-scale.d.ts +20 -12
  222. package/types/ojiepermana-angular-component-utils.d.ts +2 -2
  223. package/types/ojiepermana-angular-component.d.ts +1 -2
  224. package/types/ojiepermana-angular-navigation-core.d.ts +46 -50
  225. package/types/ojiepermana-angular-navigation-icon.d.ts +9 -12
  226. package/types/ojiepermana-angular-navigation-service.d.ts +112 -115
  227. package/types/ojiepermana-angular-navigation-types.d.ts +166 -125
  228. package/types/ojiepermana-angular-navigation.d.ts +708 -375
  229. package/types/ojiepermana-angular-sdk.d.ts +69 -71
  230. package/types/ojiepermana-angular-theme-component-settings.d.ts +120 -86
  231. package/types/ojiepermana-angular-theme-layout-services.d.ts +119 -124
  232. package/types/ojiepermana-angular-theme-layout-types.d.ts +27 -31
  233. package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +446 -187
  234. package/types/ojiepermana-angular-theme-layout.d.ts +201 -113
  235. package/types/ojiepermana-angular-theme-page-core.d.ts +136 -142
  236. package/types/ojiepermana-angular-theme-page-filter.d.ts +112 -62
  237. package/types/ojiepermana-angular-theme-page-overview.d.ts +28 -0
  238. package/types/ojiepermana-angular-theme-page-root.d.ts +172 -88
  239. package/types/ojiepermana-angular-theme-page-side.d.ts +89 -49
  240. package/types/ojiepermana-angular-theme-page-slots.d.ts +58 -37
  241. package/types/ojiepermana-angular-theme-page.d.ts +7 -5
  242. package/types/ojiepermana-angular-theme-shell-services.d.ts +119 -125
  243. package/types/ojiepermana-angular-theme-shell-types.d.ts +38 -41
  244. package/types/ojiepermana-angular-theme-shell.d.ts +139 -61
  245. package/types/ojiepermana-angular-theme-styles.d.ts +184 -196
  246. package/types/ojiepermana-angular-theme.d.ts +1 -2
  247. package/types/ojiepermana-angular.d.ts +5 -5
  248. package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-Be3IqzG4.mjs +0 -91
  249. package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-Bc7DWK3R.mjs +0 -522
  250. package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-DA8VPEn7.mjs +0 -404
  251. package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-U2TJTzlW.mjs +0 -466
  252. package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-CIUhmytH.mjs +0 -2668
@@ -1,314 +1,181 @@
1
- import { clsx } from 'clsx';
2
- import { twMerge } from 'tailwind-merge';
3
- import { InjectionToken, inject, APP_ID, signal } from '@angular/core';
4
-
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+ import { APP_ID, InjectionToken, inject, signal } from "@angular/core";
5
4
  function cn(...inputs) {
6
- return twMerge(clsx(inputs));
5
+ return twMerge(clsx(inputs));
7
6
  }
8
-
9
- /** Request/application-scoped DOM id generator with deterministic sequencing. */
10
- class UiIdGenerator {
11
- counter = 0;
12
- appInfix;
13
- constructor(appId = 'ng') {
14
- const safeAppId = appId.replace(/[^a-zA-Z0-9_-]/g, '');
15
- this.appInfix = appId === 'ng' || !safeAppId ? '' : `-${safeAppId}`;
16
- }
17
- next(prefix) {
18
- this.counter += 1;
19
- return `${prefix}${this.appInfix}-${this.counter}`;
20
- }
21
- }
22
- /**
23
- * One generator per Angular application injector. Separate SSR requests and a
24
- * hydrating browser application therefore start from the same deterministic
25
- * sequence instead of sharing process-global state.
26
- */
27
- const UI_ID_GENERATOR = new InjectionToken('UI_ID_GENERATOR', {
28
- providedIn: 'root',
29
- factory: () => new UiIdGenerator(inject(APP_ID)),
7
+ var UiIdGenerator = class {
8
+ counter = 0;
9
+ appInfix;
10
+ constructor(appId = "ng") {
11
+ const safeAppId = appId.replace(/[^a-zA-Z0-9_-]/g, "");
12
+ this.appInfix = appId === "ng" || !safeAppId ? "" : `-${safeAppId}`;
13
+ }
14
+ next(prefix) {
15
+ this.counter += 1;
16
+ return `${prefix}${this.appInfix}-${this.counter}`;
17
+ }
18
+ };
19
+ const UI_ID_GENERATOR = new InjectionToken("UI_ID_GENERATOR", {
20
+ providedIn: "root",
21
+ factory: () => new UiIdGenerator(inject(APP_ID))
30
22
  });
31
- /** Generates an id during component/directive construction. */
32
23
  function injectUniqueId(prefix) {
33
- return inject(UI_ID_GENERATOR).next(prefix);
24
+ return inject(UI_ID_GENERATOR).next(prefix);
34
25
  }
35
-
36
- /**
37
- * Roving focus across one horizontal row of items, with at most one open
38
- * disclosure among them.
39
- *
40
- * Shared by `Menubar` and `NavigationMenu`: both walk a single row with the
41
- * arrow keys plus Home/End, hold exactly one tab stop, and keep at most one
42
- * panel open. Everything that differs between the two -- roles, ARIA, and what
43
- * happens to an open panel when focus moves on -- stays in the components.
44
- */
45
- class RovingRow {
46
- config;
47
- activeItem = signal(null, /* @ts-ignore */
48
- ...(ngDevMode ? [{ debugName: "activeItem" }] : /* istanbul ignore next */ []));
49
- open = signal(null, /* @ts-ignore */
50
- ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
51
- constructor(config) {
52
- this.config = config;
53
- }
54
- items() {
55
- return this.config.items();
56
- }
57
- enabledItems() {
58
- return this.items().filter((item) => !item.disabled());
59
- }
60
- setActive(item) {
61
- if (item.disabled()) {
62
- return;
63
- }
64
- this.activeItem.set(item);
65
- }
66
- /**
67
- * The roving `tabindex` for one row item.
68
- *
69
- * A composite widget carries exactly one tab stop: normally the active item
70
- * owns it, falling back to the first enabled one. When EVERY item is disabled
71
- * there is no enabled candidate, and leaving them all at `-1` drops the whole
72
- * widget out of the tab order -- it becomes unreachable and a keyboard user
73
- * cannot even discover that it is there. The first item keeps the tab stop
74
- * instead and announces its state through `aria-disabled`, which is the APG
75
- * focusable-disabled-item approach.
76
- */
77
- tabIndexFor(item) {
78
- const enabledItems = this.enabledItems();
79
- if (enabledItems.length === 0) {
80
- return this.items()[0] === item ? 0 : -1;
81
- }
82
- if (item.disabled()) {
83
- return -1;
84
- }
85
- const activeItem = this.activeItem();
86
- const resolvedActiveItem = activeItem && enabledItems.includes(activeItem) ? activeItem : enabledItems[0];
87
- return resolvedActiveItem === item ? 0 : -1;
88
- }
89
- openTrigger() {
90
- return this.open();
91
- }
92
- hasOpenTrigger(except) {
93
- const currentOpenTrigger = this.open();
94
- return !!currentOpenTrigger && currentOpenTrigger !== except;
95
- }
96
- notifyOpen(trigger) {
97
- const currentOpenTrigger = this.open();
98
- if (currentOpenTrigger && currentOpenTrigger !== trigger) {
99
- currentOpenTrigger.close({ restoreFocus: false });
100
- }
101
- this.open.set(trigger);
102
- this.setActive(trigger);
103
- }
104
- notifyClosed(trigger) {
105
- if (this.open() === trigger) {
106
- this.open.set(null);
107
- }
108
- }
109
- /** The row item an event came from, or `null` when it came from outside the row. */
110
- itemFrom(target, scope) {
111
- const candidates = scope === 'all' ? this.items() : this.enabledItems();
112
- return candidates.find((item) => item.containsTarget(target)) ?? null;
113
- }
114
- /**
115
- * Handles the keys that walk the row itself -- Home, End and the horizontal
116
- * arrows -- and reports whether it claimed the event, so a component can add
117
- * its own keys around this without restating the row model.
118
- */
119
- handleNavigationKey(item, event) {
120
- if (event.key === 'Home' || event.key === 'End') {
121
- event.preventDefault();
122
- this.move(item, event.key === 'Home' ? 'start' : 'end');
123
- return true;
124
- }
125
- if (event.key === 'ArrowRight' || event.key === 'ArrowLeft') {
126
- event.preventDefault();
127
- this.move(item, event.key === 'ArrowRight' ? 'next' : 'previous');
128
- return true;
129
- }
130
- return false;
131
- }
132
- move(currentItem, direction) {
133
- const enabledItems = this.enabledItems();
134
- if (enabledItems.length === 0) {
135
- return;
136
- }
137
- const currentIndex = enabledItems.indexOf(currentItem);
138
- if (currentIndex === -1) {
139
- enabledItems[0]?.focus();
140
- return;
141
- }
142
- const nextItem = direction === 'start'
143
- ? enabledItems[0]
144
- : direction === 'end'
145
- ? enabledItems[enabledItems.length - 1]
146
- : enabledItems[this.nextIndex(currentIndex, direction === 'next' ? this.horizontalStep() : -this.horizontalStep(), enabledItems.length)];
147
- if (!nextItem || nextItem === currentItem) {
148
- return;
149
- }
150
- this.config.enter(nextItem);
151
- }
152
- nextIndex(currentIndex, delta, length) {
153
- const rawIndex = currentIndex + delta;
154
- if (this.config.loop()) {
155
- return (rawIndex + length) % length;
156
- }
157
- return Math.max(0, Math.min(length - 1, rawIndex));
158
- }
159
- horizontalStep() {
160
- return getComputedStyle(this.config.host()).direction === 'rtl' ? -1 : 1;
161
- }
162
- }
163
-
164
- /**
165
- * Per-component corner-radius / spacing-density override helpers.
166
- *
167
- * These mirror the global `theme-radius` / `theme-space` preset values from
168
- * `@ojiepermana/angular/theme` — kept as a local copy so this package stays
169
- * decoupled from the theme package (see its empty peer/deps on -theme).
170
- *
171
- * A component that accepts a `radius` / `density` input binds the resolved value
172
- * onto its surface element via `[style.--radius-base]` / `[style.--spacing-base]`.
173
- * Tailwind's `rounded-*` utilities resolve `calc(var(--radius-base) * n)` and the
174
- * spacing utilities resolve `calc(var(--spacing-base) * n)` (see the theme's
175
- * `base/tailwind.css` `@theme inline` mapping), so the override rescales that
176
- * subtree and shadows the global `<html theme-radius|theme-space>` axis. The
177
- * `'inherit'` preset binds nothing, so the component keeps following the axis.
178
- */
179
- /** Corner-radius presets for a per-component `radius` input. */
180
- const COMPONENT_RADII = ['inherit', 'none', 'xs', 'sm', 'md', 'xl', 'full'];
181
- /** Spacing-density presets for a per-component `density` input. */
182
- const COMPONENT_DENSITIES = ['inherit', 'compact', 'normal', 'relaxed', 'spacious'];
183
- /**
184
- * `--radius-base` knob value per preset; mirrors theme `radius/index.css`, which
185
- * takes Tailwind's stock radius for each name.
186
- */
26
+ var RovingRow = class {
27
+ config;
28
+ activeItem = signal(null, ...ngDevMode ? [{ debugName: "activeItem" }] : /* istanbul ignore next */ []);
29
+ open = signal(null, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
30
+ constructor(config) {
31
+ this.config = config;
32
+ }
33
+ items() {
34
+ return this.config.items();
35
+ }
36
+ enabledItems() {
37
+ return this.items().filter((item) => !item.disabled());
38
+ }
39
+ setActive(item) {
40
+ if (item.disabled()) return;
41
+ this.activeItem.set(item);
42
+ }
43
+ tabIndexFor(item) {
44
+ const enabledItems = this.enabledItems();
45
+ if (enabledItems.length === 0) return this.items()[0] === item ? 0 : -1;
46
+ if (item.disabled()) return -1;
47
+ const activeItem = this.activeItem();
48
+ return (activeItem && enabledItems.includes(activeItem) ? activeItem : enabledItems[0]) === item ? 0 : -1;
49
+ }
50
+ openTrigger() {
51
+ return this.open();
52
+ }
53
+ hasOpenTrigger(except) {
54
+ const currentOpenTrigger = this.open();
55
+ return !!currentOpenTrigger && currentOpenTrigger !== except;
56
+ }
57
+ notifyOpen(trigger) {
58
+ const currentOpenTrigger = this.open();
59
+ if (currentOpenTrigger && currentOpenTrigger !== trigger) currentOpenTrigger.close({ restoreFocus: false });
60
+ this.open.set(trigger);
61
+ this.setActive(trigger);
62
+ }
63
+ notifyClosed(trigger) {
64
+ if (this.open() === trigger) this.open.set(null);
65
+ }
66
+ itemFrom(target, scope) {
67
+ return (scope === "all" ? this.items() : this.enabledItems()).find((item) => item.containsTarget(target)) ?? null;
68
+ }
69
+ handleNavigationKey(item, event) {
70
+ if (event.key === "Home" || event.key === "End") {
71
+ event.preventDefault();
72
+ this.move(item, event.key === "Home" ? "start" : "end");
73
+ return true;
74
+ }
75
+ if (event.key === "ArrowRight" || event.key === "ArrowLeft") {
76
+ event.preventDefault();
77
+ this.move(item, event.key === "ArrowRight" ? "next" : "previous");
78
+ return true;
79
+ }
80
+ return false;
81
+ }
82
+ move(currentItem, direction) {
83
+ const enabledItems = this.enabledItems();
84
+ if (enabledItems.length === 0) return;
85
+ const currentIndex = enabledItems.indexOf(currentItem);
86
+ if (currentIndex === -1) {
87
+ enabledItems[0]?.focus();
88
+ return;
89
+ }
90
+ const nextItem = direction === "start" ? enabledItems[0] : direction === "end" ? enabledItems[enabledItems.length - 1] : enabledItems[this.nextIndex(currentIndex, direction === "next" ? this.horizontalStep() : -this.horizontalStep(), enabledItems.length)];
91
+ if (!nextItem || nextItem === currentItem) return;
92
+ this.config.enter(nextItem);
93
+ }
94
+ nextIndex(currentIndex, delta, length) {
95
+ const rawIndex = currentIndex + delta;
96
+ if (this.config.loop()) return (rawIndex + length) % length;
97
+ return Math.max(0, Math.min(length - 1, rawIndex));
98
+ }
99
+ horizontalStep() {
100
+ return getComputedStyle(this.config.host()).direction === "rtl" ? -1 : 1;
101
+ }
102
+ };
103
+ const COMPONENT_RADII = [
104
+ "inherit",
105
+ "none",
106
+ "xs",
107
+ "sm",
108
+ "md",
109
+ "xl",
110
+ "full"
111
+ ];
112
+ const COMPONENT_DENSITIES = [
113
+ "inherit",
114
+ "compact",
115
+ "normal",
116
+ "relaxed",
117
+ "spacious"
118
+ ];
187
119
  const RADIUS_BASE_VALUES = {
188
- none: '0px',
189
- xs: '0.125rem',
190
- sm: '0.25rem',
191
- md: '0.375rem',
192
- xl: '0.75rem',
193
- full: 'calc(infinity * 1px)',
120
+ none: "0px",
121
+ xs: "0.125rem",
122
+ sm: "0.25rem",
123
+ md: "0.375rem",
124
+ xl: "0.75rem",
125
+ full: "calc(infinity * 1px)"
194
126
  };
195
- /** `--spacing-base` knob value per preset; mirrors theme `space/index.css`. */
196
127
  const DENSITY_BASE_VALUES = {
197
- compact: '0.2rem',
198
- normal: '0.25rem',
199
- relaxed: '0.28rem',
200
- spacious: '0.32rem',
128
+ compact: "0.2rem",
129
+ normal: "0.25rem",
130
+ relaxed: "0.28rem",
131
+ spacious: "0.32rem"
201
132
  };
202
- /**
203
- * Resolves a `radius` input to a `--radius-base` value, or `null` to inherit the
204
- * global axis. Bind the result to the surface host: `[style.--radius-base]`.
205
- */
206
133
  function radiusBaseValue(radius) {
207
- return radius === 'inherit' ? null : RADIUS_BASE_VALUES[radius];
134
+ return radius === "inherit" ? null : RADIUS_BASE_VALUES[radius];
208
135
  }
209
- /**
210
- * Resolves a `density` input to a `--spacing-base` value, or `null` to inherit
211
- * the global axis. Bind the result to the surface host: `[style.--spacing-base]`.
212
- */
213
136
  function densityBaseValue(density) {
214
- return density === 'inherit' ? null : DENSITY_BASE_VALUES[density];
137
+ return density === "inherit" ? null : DENSITY_BASE_VALUES[density];
215
138
  }
216
-
217
139
  let counter = 0;
218
- /**
219
- * Returns a document-unique id with the given prefix, e.g. `uniqueId('Checkbox')`
220
- * → `"checkbox-1"`. Single shared counter for every component in the library.
221
- *
222
- * @deprecated Use `injectUniqueId` or inject `UI_ID_GENERATOR`. This legacy
223
- * function cannot isolate concurrent server-rendering requests.
224
- */
225
140
  function uniqueId(prefix) {
226
- counter += 1;
227
- return `${prefix}-${counter}`;
141
+ counter += 1;
142
+ return `${prefix}-${counter}`;
228
143
  }
229
-
230
- /**
231
- * One safe way to touch `localStorage`, for every library that persists a
232
- * preference.
233
- *
234
- * The same "reach localStorage through the document's window, wrap everything in
235
- * try/catch" block was hand-copied across the theme axes and the navigation
236
- * persistence unit. Every copy had to get three things right:
237
- *
238
- * 1. there may be no document at all (server side rendering),
239
- * 2. `window.localStorage` can THROW on property access, not just on `getItem`
240
- * (a blocked or partitioned storage), so the getter itself needs guarding,
241
- * 3. a quota error on write must never break the caller.
242
- *
243
- * This lives in `component/utils/core` rather than in the theme package on
244
- * purpose: `navigation` also needs it, and navigation must not depend on
245
- * `theme`, which already depends on navigation. Both already depend on this
246
- * entry point.
247
- */
248
- /** Shared no-op, used whenever storage cannot be reached at all. */
249
144
  const UNAVAILABLE = {
250
- read: () => null,
251
- write: () => { },
252
- remove: () => { },
145
+ read: () => null,
146
+ write: () => {},
147
+ remove: () => {}
253
148
  };
254
- /**
255
- * `localStorage` reached through a document's own window.
256
- *
257
- * Resolved lazily on every call and never cached: the property access is the
258
- * part that can throw, and a storage that is blocked now may be available later
259
- * (or the other way round).
260
- */
261
149
  function documentLocalStorage(documentRef) {
262
- const resolve = () => {
263
- try {
264
- return documentRef?.defaultView?.localStorage ?? null;
265
- }
266
- catch {
267
- return null;
268
- }
269
- };
270
- return {
271
- read: (key) => {
272
- try {
273
- return resolve()?.getItem(key) ?? null;
274
- }
275
- catch {
276
- return null;
277
- }
278
- },
279
- write: (key, value) => {
280
- try {
281
- resolve()?.setItem(key, value);
282
- }
283
- catch {
284
- // A full or blocked storage must never break the caller: the preference
285
- // simply does not survive the reload.
286
- }
287
- },
288
- remove: (key) => {
289
- try {
290
- resolve()?.removeItem(key);
291
- }
292
- catch {
293
- // Same reasoning as write.
294
- }
295
- },
296
- };
150
+ const resolve = () => {
151
+ try {
152
+ return documentRef?.defaultView?.localStorage ?? null;
153
+ } catch {
154
+ return null;
155
+ }
156
+ };
157
+ return {
158
+ read: (key) => {
159
+ try {
160
+ return resolve()?.getItem(key) ?? null;
161
+ } catch {
162
+ return null;
163
+ }
164
+ },
165
+ write: (key, value) => {
166
+ try {
167
+ resolve()?.setItem(key, value);
168
+ } catch {}
169
+ },
170
+ remove: (key) => {
171
+ try {
172
+ resolve()?.removeItem(key);
173
+ } catch {}
174
+ }
175
+ };
297
176
  }
298
- /**
299
- * `localStorage` from the global scope, for callers that only know whether they
300
- * are in a browser (the `isPlatformBrowser` flavour) rather than holding a
301
- * `Document`.
302
- */
303
177
  function globalLocalStorage(isBrowser) {
304
- if (!isBrowser) {
305
- return UNAVAILABLE;
306
- }
307
- return documentLocalStorage(typeof document === 'undefined' ? null : document);
178
+ if (!isBrowser) return UNAVAILABLE;
179
+ return documentLocalStorage(typeof document === "undefined" ? null : document);
308
180
  }
309
-
310
- /**
311
- * Generated bundle index. Do not edit.
312
- */
313
-
314
- export { COMPONENT_DENSITIES, COMPONENT_RADII, RovingRow, UI_ID_GENERATOR, UiIdGenerator, cn, densityBaseValue, documentLocalStorage, globalLocalStorage, injectUniqueId, radiusBaseValue, uniqueId };
181
+ export { COMPONENT_DENSITIES, COMPONENT_RADII, RovingRow, UI_ID_GENERATOR, UiIdGenerator, cn, densityBaseValue, documentLocalStorage, globalLocalStorage, injectUniqueId, radiusBaseValue, uniqueId };
@@ -1,66 +1,54 @@
1
- import { merge } from 'rxjs';
2
- import { filter } from 'rxjs/operators';
3
-
1
+ import { merge } from "rxjs";
2
+ import { filter } from "rxjs/operators";
4
3
  const POSITION_ANCHORS = {
5
- top: (align) => ({
6
- originX: align === 'start' ? 'start' : align === 'end' ? 'end' : 'center',
7
- originY: 'top',
8
- overlayX: align === 'start' ? 'start' : align === 'end' ? 'end' : 'center',
9
- overlayY: 'bottom',
10
- }),
11
- bottom: (align) => ({
12
- originX: align === 'start' ? 'start' : align === 'end' ? 'end' : 'center',
13
- originY: 'bottom',
14
- overlayX: align === 'start' ? 'start' : align === 'end' ? 'end' : 'center',
15
- overlayY: 'top',
16
- }),
17
- left: (align) => ({
18
- originX: 'start',
19
- originY: align === 'start' ? 'top' : align === 'end' ? 'bottom' : 'center',
20
- overlayX: 'end',
21
- overlayY: align === 'start' ? 'top' : align === 'end' ? 'bottom' : 'center',
22
- }),
23
- right: (align) => ({
24
- originX: 'end',
25
- originY: align === 'start' ? 'top' : align === 'end' ? 'bottom' : 'center',
26
- overlayX: 'start',
27
- overlayY: align === 'start' ? 'top' : align === 'end' ? 'bottom' : 'center',
28
- }),
4
+ top: (align) => ({
5
+ originX: align === "start" ? "start" : align === "end" ? "end" : "center",
6
+ originY: "top",
7
+ overlayX: align === "start" ? "start" : align === "end" ? "end" : "center",
8
+ overlayY: "bottom"
9
+ }),
10
+ bottom: (align) => ({
11
+ originX: align === "start" ? "start" : align === "end" ? "end" : "center",
12
+ originY: "bottom",
13
+ overlayX: align === "start" ? "start" : align === "end" ? "end" : "center",
14
+ overlayY: "top"
15
+ }),
16
+ left: (align) => ({
17
+ originX: "start",
18
+ originY: align === "start" ? "top" : align === "end" ? "bottom" : "center",
19
+ overlayX: "end",
20
+ overlayY: align === "start" ? "top" : align === "end" ? "bottom" : "center"
21
+ }),
22
+ right: (align) => ({
23
+ originX: "end",
24
+ originY: align === "start" ? "top" : align === "end" ? "bottom" : "center",
25
+ overlayX: "start",
26
+ overlayY: align === "start" ? "top" : align === "end" ? "bottom" : "center"
27
+ })
29
28
  };
30
- /**
31
- * Builds the CDK `ConnectedPosition` for a shadcn-style `side`/`align`/`sideOffset`
32
- * triple. Shared by every anchored overlay in the library (popover, tooltip,
33
- * hover-card, menus, combobox).
34
- */
35
29
  function connectedPositionFor(side, align, sideOffset) {
36
- const anchor = POSITION_ANCHORS[side](align);
37
- if (side === 'top') {
38
- return { ...anchor, offsetY: -sideOffset };
39
- }
40
- if (side === 'bottom') {
41
- return { ...anchor, offsetY: sideOffset };
42
- }
43
- if (side === 'left') {
44
- return { ...anchor, offsetX: -sideOffset };
45
- }
46
- return { ...anchor, offsetX: sideOffset };
30
+ const anchor = POSITION_ANCHORS[side](align);
31
+ if (side === "top") return {
32
+ ...anchor,
33
+ offsetY: -sideOffset
34
+ };
35
+ if (side === "bottom") return {
36
+ ...anchor,
37
+ offsetY: sideOffset
38
+ };
39
+ if (side === "left") return {
40
+ ...anchor,
41
+ offsetX: -sideOffset
42
+ };
43
+ return {
44
+ ...anchor,
45
+ offsetX: sideOffset
46
+ };
47
47
  }
48
48
  function oppositeSide(side) {
49
- return side === 'top' ? 'bottom' : side === 'bottom' ? 'top' : side === 'left' ? 'right' : 'left';
49
+ return side === "top" ? "bottom" : side === "bottom" ? "top" : side === "left" ? "right" : "left";
50
50
  }
51
- /**
52
- * Emits whenever the user dismisses the overlay: pointer down outside (ignoring
53
- * the origin element so trigger clicks keep toggling), Escape, or detachment.
54
- * Subscribers decide how to close.
55
- */
56
51
  function overlayDismissals(overlayRef, origin) {
57
- return merge(overlayRef
58
- .outsidePointerEvents()
59
- .pipe(filter((event) => !origin || !origin.contains(event.target))), overlayRef.keydownEvents().pipe(filter((event) => event.key === 'Escape')), overlayRef.detachments());
52
+ return merge(overlayRef.outsidePointerEvents().pipe(filter((event) => !origin || !origin.contains(event.target))), overlayRef.keydownEvents().pipe(filter((event) => event.key === "Escape")), overlayRef.detachments());
60
53
  }
61
-
62
- /**
63
- * Generated bundle index. Do not edit.
64
- */
65
-
66
- export { connectedPositionFor, oppositeSide, overlayDismissals };
54
+ export { connectedPositionFor, oppositeSide, overlayDismissals };