@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,206 +1,344 @@
1
- import { DOCUMENT } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { Directive, inject, ElementRef, input, signal, computed, Component, booleanAttribute, contentChildren, effect, untracked, forwardRef } from '@angular/core';
4
- import { injectUniqueId, cn } from '@ojiepermana/angular/component/utils/core';
5
-
1
+ import { DOCUMENT } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, Directive, ElementRef, booleanAttribute, computed, contentChildren, effect, forwardRef, inject, input, signal, untracked } from "@angular/core";
4
+ import { cn, injectUniqueId } from "@ojiepermana/angular/component/utils/core";
6
5
  function clampResizableValue(value, min, max) {
7
- return Math.min(Math.max(value, min), max);
6
+ return Math.min(Math.max(value, min), max);
8
7
  }
9
8
  function parseResizablePercent(value) {
10
- if (value == null || value === '')
11
- return null;
12
- if (typeof value === 'number')
13
- return Number.isFinite(value) ? value : null;
14
- const parsed = Number.parseFloat(value);
15
- return Number.isFinite(parsed) ? parsed : null;
9
+ if (value == null || value === "") return null;
10
+ if (typeof value === "number") return Number.isFinite(value) ? value : null;
11
+ const parsed = Number.parseFloat(value);
12
+ return Number.isFinite(parsed) ? parsed : null;
16
13
  }
17
14
  function roundResizablePercentage(value) {
18
- return Math.round(value * 1000) / 1000;
15
+ return Math.round(value * 1e3) / 1e3;
19
16
  }
20
17
  function resolveInitialResizableSizes(preferred, minimums, maximums) {
21
- const unresolvedIndexes = preferred.flatMap((value, index) => (value == null ? [index] : []));
22
- const specifiedTotal = sum(preferred.flatMap((value) => (value == null ? [] : [value])));
23
- let sizes;
24
- if (preferred.every((value) => value == null)) {
25
- const equalSize = 100 / preferred.length;
26
- sizes = preferred.map(() => equalSize);
27
- }
28
- else {
29
- const share = unresolvedIndexes.length
30
- ? Math.max(100 - specifiedTotal, 0) / unresolvedIndexes.length
31
- : 0;
32
- sizes = preferred.map((value) => value ?? share);
33
- }
34
- sizes = sizes.map((size, index) => clampResizableValue(size, minimums[index], maximums[index]));
35
- sizes = rebalanceSizes(sizes, minimums, maximums);
36
- return sizes.map(roundResizablePercentage);
18
+ const unresolvedIndexes = preferred.flatMap((value, index) => value == null ? [index] : []);
19
+ const specifiedTotal = sum(preferred.flatMap((value) => value == null ? [] : [value]));
20
+ let sizes;
21
+ if (preferred.every((value) => value == null)) {
22
+ const equalSize = 100 / preferred.length;
23
+ sizes = preferred.map(() => equalSize);
24
+ } else {
25
+ const share = unresolvedIndexes.length ? Math.max(100 - specifiedTotal, 0) / unresolvedIndexes.length : 0;
26
+ sizes = preferred.map((value) => value ?? share);
27
+ }
28
+ sizes = sizes.map((size, index) => clampResizableValue(size, minimums[index], maximums[index]));
29
+ sizes = rebalanceSizes(sizes, minimums, maximums);
30
+ return sizes.map(roundResizablePercentage);
37
31
  }
38
32
  function toResizableAriaValue(value) {
39
- return value == null ? null : String(Math.round(value));
33
+ return value == null ? null : String(Math.round(value));
40
34
  }
41
35
  function sum(values) {
42
- return values.reduce((total, value) => total + value, 0);
36
+ return values.reduce((total, value) => total + value, 0);
43
37
  }
44
38
  function rebalanceSizes(sizes, minimums, maximums) {
45
- const next = [...sizes];
46
- for (let iteration = 0; iteration < next.length * 4; iteration += 1) {
47
- const difference = roundResizablePercentage(100 - sum(next));
48
- if (Math.abs(difference) <= 0.001)
49
- return next;
50
- const adjustableIndexes = next.flatMap((size, index) => {
51
- const room = difference > 0 ? maximums[index] - size : size - minimums[index];
52
- return room > 0.001 ? [index] : [];
53
- });
54
- if (!adjustableIndexes.length)
55
- return next;
56
- const perPanelDelta = difference / adjustableIndexes.length;
57
- adjustableIndexes.forEach((index) => {
58
- next[index] = clampResizableValue(next[index] + perPanelDelta, minimums[index], maximums[index]);
59
- });
60
- }
61
- return next;
62
- }
63
-
64
- class ResizableGroupContextBase {
65
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ResizableGroupContextBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
66
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: ResizableGroupContextBase, isStandalone: true, ngImport: i0 });
67
- }
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ResizableGroupContextBase, decorators: [{
69
- type: Directive
70
- }] });
71
- class ResizablePanelComponent {
72
- ctx = inject(ResizableGroupContextBase);
73
- host = inject((ElementRef));
74
- defaultSize = input(null, /* @ts-ignore */
75
- ...(ngDevMode ? [{ debugName: "defaultSize" }] : /* istanbul ignore next */ []));
76
- minSize = input('10%', /* @ts-ignore */
77
- ...(ngDevMode ? [{ debugName: "minSize" }] : /* istanbul ignore next */ []));
78
- maxSize = input('90%', /* @ts-ignore */
79
- ...(ngDevMode ? [{ debugName: "maxSize" }] : /* istanbul ignore next */ []));
80
- id = input(null, /* @ts-ignore */
81
- ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
82
- class = input('', /* @ts-ignore */
83
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
84
- generatedId = injectUniqueId('ResizablePanel');
85
- currentSize = signal(null, /* @ts-ignore */
86
- ...(ngDevMode ? [{ debugName: "currentSize" }] : /* istanbul ignore next */ []));
87
- resolvedId = computed(() => this.id() ?? this.generatedId, /* @ts-ignore */
88
- ...(ngDevMode ? [{ debugName: "resolvedId" }] : /* istanbul ignore next */ []));
89
- classes = computed(() => cn('relative block min-h-0 min-w-0 overflow-hidden', this.ctx.groupOrientation() === 'horizontal' ? 'h-full' : 'w-full', this.class()), /* @ts-ignore */
90
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
91
- flexStyle = computed(() => {
92
- const size = this.currentSize();
93
- return size == null ? '1 1 0%' : `0 0 ${size}%`;
94
- }, /* @ts-ignore */
95
- ...(ngDevMode ? [{ debugName: "flexStyle" }] : /* istanbul ignore next */ []));
96
- panelId() {
97
- return this.resolvedId();
98
- }
99
- preferredSizePercent() {
100
- return parseResizablePercent(this.defaultSize());
101
- }
102
- minSizePercent() {
103
- return clampResizableValue(parseResizablePercent(this.minSize()) ?? 10, 0, 100);
104
- }
105
- maxSizePercent() {
106
- return clampResizableValue(parseResizablePercent(this.maxSize()) ?? 90, this.minSizePercent(), 100);
107
- }
108
- size() {
109
- return this.currentSize() ?? 0;
110
- }
111
- setSize(size) {
112
- this.currentSize.set(roundResizablePercentage(clampResizableValue(size, 0, 100)));
113
- }
114
- nativeElement() {
115
- return this.host.nativeElement;
116
- }
117
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ResizablePanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
118
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: ResizablePanelComponent, isStandalone: true, selector: "ResizablePanel", inputs: { defaultSize: { classPropertyName: "defaultSize", publicName: "defaultSize", isSignal: true, isRequired: false, transformFunction: null }, minSize: { classPropertyName: "minSize", publicName: "minSize", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "resolvedId()", "style.flex": "flexStyle()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
39
+ const next = [...sizes];
40
+ for (let iteration = 0; iteration < next.length * 4; iteration += 1) {
41
+ const difference = roundResizablePercentage(100 - sum(next));
42
+ if (Math.abs(difference) <= .001) return next;
43
+ const adjustableIndexes = next.flatMap((size, index) => {
44
+ return (difference > 0 ? maximums[index] - size : size - minimums[index]) > .001 ? [index] : [];
45
+ });
46
+ if (!adjustableIndexes.length) return next;
47
+ const perPanelDelta = difference / adjustableIndexes.length;
48
+ adjustableIndexes.forEach((index) => {
49
+ next[index] = clampResizableValue(next[index] + perPanelDelta, minimums[index], maximums[index]);
50
+ });
51
+ }
52
+ return next;
119
53
  }
120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ResizablePanelComponent, decorators: [{
121
- type: Component,
122
- args: [{
123
- selector: 'ResizablePanel',
124
- host: {
125
- '[class]': 'classes()',
126
- '[attr.id]': 'resolvedId()',
127
- '[style.flex]': 'flexStyle()',
128
- },
129
- template: `<ng-content />`,
130
- }]
131
- }], propDecorators: { defaultSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultSize", required: false }] }], minSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "minSize", required: false }] }], maxSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSize", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
132
- class ResizableHandleComponent {
133
- ctx = inject(ResizableGroupContextBase);
134
- host = inject((ElementRef));
135
- withHandle = input(false, { ...(ngDevMode ? { debugName: "withHandle" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
136
- ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
137
- class = input('', /* @ts-ignore */
138
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
139
- lastExpandedPrimarySize = signal(null, /* @ts-ignore */
140
- ...(ngDevMode ? [{ debugName: "lastExpandedPrimarySize" }] : /* istanbul ignore next */ []));
141
- active = signal(false, /* @ts-ignore */
142
- ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
143
- state = computed(() => this.ctx.pairState(this), /* @ts-ignore */
144
- ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
145
- classes = computed(() => cn('group relative flex shrink-0 select-none items-center justify-center bg-transparent text-foreground transition-colors', 'touch-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background', this.ctx.groupOrientation() === 'horizontal'
146
- ? 'h-full w-2 cursor-col-resize before:absolute before:inset-y-0 before:left-1/2 before:w-px before:-translate-x-1/2 before:bg-border'
147
- : 'h-2 w-full cursor-row-resize before:absolute before:inset-x-0 before:top-1/2 before:h-px before:-translate-y-1/2 before:bg-border', this.active() ? 'before:bg-foreground/60' : 'hover:before:bg-foreground/40', this.class()), /* @ts-ignore */
148
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
149
- /**
150
- * Whether this handle sits between two panels it can actually resize.
151
- *
152
- * A handle with no adjacent pair -- a lone panel, or a handle at the edge of
153
- * the group -- changes nothing, so it is decorative and gives up `separator`
154
- * and its tab stop. A focusable `separator` owes `aria-valuenow`, and there is
155
- * no honest value to give: inventing one would satisfy axe while telling a
156
- * screen reader about a slider that does not exist. Dropping the role is the
157
- * truthful half of that trade, and it also stops the handle from soaking up a
158
- * Tab press that leads nowhere.
159
- */
160
- resizable = computed(() => this.state() !== null, /* @ts-ignore */
161
- ...(ngDevMode ? [{ debugName: "resizable" }] : /* istanbul ignore next */ []));
162
- separatorOrientation = computed(() => this.ctx.groupOrientation() === 'horizontal' ? 'vertical' : 'horizontal', /* @ts-ignore */
163
- ...(ngDevMode ? [{ debugName: "separatorOrientation" }] : /* istanbul ignore next */ []));
164
- controls = computed(() => this.state()?.panelId ?? null, /* @ts-ignore */
165
- ...(ngDevMode ? [{ debugName: "controls" }] : /* istanbul ignore next */ []));
166
- label = computed(() => this.ariaLabel() ?? 'Resize panel', /* @ts-ignore */
167
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
168
- valueNow = computed(() => toResizableAriaValue(this.state()?.valueNow), /* @ts-ignore */
169
- ...(ngDevMode ? [{ debugName: "valueNow" }] : /* istanbul ignore next */ []));
170
- valueMin = computed(() => toResizableAriaValue(this.state()?.valueMin), /* @ts-ignore */
171
- ...(ngDevMode ? [{ debugName: "valueMin" }] : /* istanbul ignore next */ []));
172
- valueMax = computed(() => toResizableAriaValue(this.state()?.valueMax), /* @ts-ignore */
173
- ...(ngDevMode ? [{ debugName: "valueMax" }] : /* istanbul ignore next */ []));
174
- valueText = computed(() => {
175
- const value = this.state()?.valueNow;
176
- return value == null ? null : `${Math.round(value)}%`;
177
- }, /* @ts-ignore */
178
- ...(ngDevMode ? [{ debugName: "valueText" }] : /* istanbul ignore next */ []));
179
- onPointerDown(event) {
180
- if (event.button !== 0) {
181
- return;
182
- }
183
- event.preventDefault();
184
- this.host.nativeElement.focus();
185
- this.ctx.beginPointerResize(this, event);
186
- }
187
- onKeydown(event) {
188
- this.ctx.handleKeydown(this, event);
189
- }
190
- setActive(active) {
191
- this.active.set(active);
192
- }
193
- rememberPrimarySize(size) {
194
- this.lastExpandedPrimarySize.set(roundResizablePercentage(size));
195
- }
196
- rememberedPrimarySize() {
197
- return this.lastExpandedPrimarySize();
198
- }
199
- nativeElement() {
200
- return this.host.nativeElement;
201
- }
202
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ResizableHandleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
203
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: ResizableHandleComponent, isStandalone: true, selector: "ResizableHandle", inputs: { withHandle: { classPropertyName: "withHandle", publicName: "withHandle", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "onKeydown($event)", "pointerdown": "onPointerDown($event)" }, properties: { "class": "classes()", "attr.role": "resizable() ? \"separator\" : null", "attr.tabindex": "resizable() ? 0 : null", "attr.data-active": "active() ? \"true\" : null", "attr.aria-controls": "controls()", "attr.aria-label": "resizable() ? label() : null", "attr.aria-orientation": "resizable() ? separatorOrientation() : null", "attr.aria-valuenow": "valueNow()", "attr.aria-valuemin": "valueMin()", "attr.aria-valuemax": "valueMax()", "attr.aria-valuetext": "valueText()" } }, ngImport: i0, template: `
54
+ var ResizableGroupContextBase = class ResizableGroupContextBase {
55
+ static ɵfac = i0.ɵɵngDeclareFactory({
56
+ minVersion: "12.0.0",
57
+ version: "22.2.2",
58
+ ngImport: i0,
59
+ type: ResizableGroupContextBase,
60
+ deps: [],
61
+ target: i0.ɵɵFactoryTarget.Directive
62
+ });
63
+ static ɵdir = i0.ɵɵngDeclareDirective({
64
+ minVersion: "14.0.0",
65
+ version: "22.2.2",
66
+ type: ResizableGroupContextBase,
67
+ isStandalone: true,
68
+ ngImport: i0
69
+ });
70
+ };
71
+ i0.ɵɵngDeclareClassMetadata({
72
+ minVersion: "12.0.0",
73
+ version: "22.2.2",
74
+ ngImport: i0,
75
+ type: ResizableGroupContextBase,
76
+ decorators: [{ type: Directive }]
77
+ });
78
+ var ResizablePanelComponent = class ResizablePanelComponent {
79
+ ctx = inject(ResizableGroupContextBase);
80
+ host = inject(ElementRef);
81
+ defaultSize = input(null, ...ngDevMode ? [{ debugName: "defaultSize" }] : /* istanbul ignore next */ []);
82
+ minSize = input("10%", ...ngDevMode ? [{ debugName: "minSize" }] : /* istanbul ignore next */ []);
83
+ maxSize = input("90%", ...ngDevMode ? [{ debugName: "maxSize" }] : /* istanbul ignore next */ []);
84
+ id = input(null, ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
85
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
86
+ generatedId = injectUniqueId("ResizablePanel");
87
+ currentSize = signal(null, ...ngDevMode ? [{ debugName: "currentSize" }] : /* istanbul ignore next */ []);
88
+ resolvedId = computed(() => this.id() ?? this.generatedId, ...ngDevMode ? [{ debugName: "resolvedId" }] : /* istanbul ignore next */ []);
89
+ classes = computed(() => cn("relative block min-h-0 min-w-0 overflow-hidden", this.ctx.groupOrientation() === "horizontal" ? "h-full" : "w-full", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
90
+ flexStyle = computed(() => {
91
+ const size = this.currentSize();
92
+ return size == null ? "1 1 0%" : `0 0 ${size}%`;
93
+ }, ...ngDevMode ? [{ debugName: "flexStyle" }] : /* istanbul ignore next */ []);
94
+ panelId() {
95
+ return this.resolvedId();
96
+ }
97
+ preferredSizePercent() {
98
+ return parseResizablePercent(this.defaultSize());
99
+ }
100
+ minSizePercent() {
101
+ return clampResizableValue(parseResizablePercent(this.minSize()) ?? 10, 0, 100);
102
+ }
103
+ maxSizePercent() {
104
+ return clampResizableValue(parseResizablePercent(this.maxSize()) ?? 90, this.minSizePercent(), 100);
105
+ }
106
+ size() {
107
+ return this.currentSize() ?? 0;
108
+ }
109
+ setSize(size) {
110
+ this.currentSize.set(roundResizablePercentage(clampResizableValue(size, 0, 100)));
111
+ }
112
+ nativeElement() {
113
+ return this.host.nativeElement;
114
+ }
115
+ static ɵfac = i0.ɵɵngDeclareFactory({
116
+ minVersion: "12.0.0",
117
+ version: "22.2.2",
118
+ ngImport: i0,
119
+ type: ResizablePanelComponent,
120
+ deps: [],
121
+ target: i0.ɵɵFactoryTarget.Component
122
+ });
123
+ static ɵcmp = i0.ɵɵngDeclareComponent({
124
+ minVersion: "17.1.0",
125
+ version: "22.2.2",
126
+ type: ResizablePanelComponent,
127
+ isStandalone: true,
128
+ selector: "ResizablePanel",
129
+ inputs: {
130
+ defaultSize: {
131
+ classPropertyName: "defaultSize",
132
+ publicName: "defaultSize",
133
+ isSignal: true,
134
+ isRequired: false,
135
+ transformFunction: null
136
+ },
137
+ minSize: {
138
+ classPropertyName: "minSize",
139
+ publicName: "minSize",
140
+ isSignal: true,
141
+ isRequired: false,
142
+ transformFunction: null
143
+ },
144
+ maxSize: {
145
+ classPropertyName: "maxSize",
146
+ publicName: "maxSize",
147
+ isSignal: true,
148
+ isRequired: false,
149
+ transformFunction: null
150
+ },
151
+ id: {
152
+ classPropertyName: "id",
153
+ publicName: "id",
154
+ isSignal: true,
155
+ isRequired: false,
156
+ transformFunction: null
157
+ },
158
+ class: {
159
+ classPropertyName: "class",
160
+ publicName: "class",
161
+ isSignal: true,
162
+ isRequired: false,
163
+ transformFunction: null
164
+ }
165
+ },
166
+ host: { properties: {
167
+ "class": "classes()",
168
+ "attr.id": "resolvedId()",
169
+ "style.flex": "flexStyle()"
170
+ } },
171
+ ngImport: i0,
172
+ template: `<ng-content />`,
173
+ isInline: true
174
+ });
175
+ };
176
+ i0.ɵɵngDeclareClassMetadata({
177
+ minVersion: "12.0.0",
178
+ version: "22.2.2",
179
+ ngImport: i0,
180
+ type: ResizablePanelComponent,
181
+ decorators: [{
182
+ type: Component,
183
+ args: [{
184
+ selector: "ResizablePanel",
185
+ host: {
186
+ "[class]": "classes()",
187
+ "[attr.id]": "resolvedId()",
188
+ "[style.flex]": "flexStyle()"
189
+ },
190
+ template: `<ng-content />`
191
+ }]
192
+ }],
193
+ propDecorators: {
194
+ defaultSize: [{
195
+ type: i0.Input,
196
+ args: [{
197
+ isSignal: true,
198
+ alias: "defaultSize",
199
+ required: false
200
+ }]
201
+ }],
202
+ minSize: [{
203
+ type: i0.Input,
204
+ args: [{
205
+ isSignal: true,
206
+ alias: "minSize",
207
+ required: false
208
+ }]
209
+ }],
210
+ maxSize: [{
211
+ type: i0.Input,
212
+ args: [{
213
+ isSignal: true,
214
+ alias: "maxSize",
215
+ required: false
216
+ }]
217
+ }],
218
+ id: [{
219
+ type: i0.Input,
220
+ args: [{
221
+ isSignal: true,
222
+ alias: "id",
223
+ required: false
224
+ }]
225
+ }],
226
+ class: [{
227
+ type: i0.Input,
228
+ args: [{
229
+ isSignal: true,
230
+ alias: "class",
231
+ required: false
232
+ }]
233
+ }]
234
+ }
235
+ });
236
+ var ResizableHandleComponent = class ResizableHandleComponent {
237
+ ctx = inject(ResizableGroupContextBase);
238
+ host = inject(ElementRef);
239
+ withHandle = input(false, {
240
+ ...ngDevMode ? { debugName: "withHandle" } : /* istanbul ignore next */ {},
241
+ transform: booleanAttribute
242
+ });
243
+ ariaLabel = input(null, {
244
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
245
+ alias: "aria-label"
246
+ });
247
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
248
+ lastExpandedPrimarySize = signal(null, ...ngDevMode ? [{ debugName: "lastExpandedPrimarySize" }] : /* istanbul ignore next */ []);
249
+ active = signal(false, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
250
+ state = computed(() => this.ctx.pairState(this), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
251
+ classes = computed(() => cn("group relative flex shrink-0 select-none items-center justify-center bg-transparent text-foreground transition-colors", "touch-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background", this.ctx.groupOrientation() === "horizontal" ? "h-full w-2 cursor-col-resize before:absolute before:inset-y-0 before:left-1/2 before:w-px before:-translate-x-1/2 before:bg-border" : "h-2 w-full cursor-row-resize before:absolute before:inset-x-0 before:top-1/2 before:h-px before:-translate-y-1/2 before:bg-border", this.active() ? "before:bg-foreground/60" : "hover:before:bg-foreground/40", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
252
+ resizable = computed(() => this.state() !== null, ...ngDevMode ? [{ debugName: "resizable" }] : /* istanbul ignore next */ []);
253
+ separatorOrientation = computed(() => this.ctx.groupOrientation() === "horizontal" ? "vertical" : "horizontal", ...ngDevMode ? [{ debugName: "separatorOrientation" }] : /* istanbul ignore next */ []);
254
+ controls = computed(() => this.state()?.panelId ?? null, ...ngDevMode ? [{ debugName: "controls" }] : /* istanbul ignore next */ []);
255
+ label = computed(() => this.ariaLabel() ?? "Resize panel", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
256
+ valueNow = computed(() => toResizableAriaValue(this.state()?.valueNow), ...ngDevMode ? [{ debugName: "valueNow" }] : /* istanbul ignore next */ []);
257
+ valueMin = computed(() => toResizableAriaValue(this.state()?.valueMin), ...ngDevMode ? [{ debugName: "valueMin" }] : /* istanbul ignore next */ []);
258
+ valueMax = computed(() => toResizableAriaValue(this.state()?.valueMax), ...ngDevMode ? [{ debugName: "valueMax" }] : /* istanbul ignore next */ []);
259
+ valueText = computed(() => {
260
+ const value = this.state()?.valueNow;
261
+ return value == null ? null : `${Math.round(value)}%`;
262
+ }, ...ngDevMode ? [{ debugName: "valueText" }] : /* istanbul ignore next */ []);
263
+ onPointerDown(event) {
264
+ if (event.button !== 0) return;
265
+ event.preventDefault();
266
+ this.host.nativeElement.focus();
267
+ this.ctx.beginPointerResize(this, event);
268
+ }
269
+ onKeydown(event) {
270
+ this.ctx.handleKeydown(this, event);
271
+ }
272
+ setActive(active) {
273
+ this.active.set(active);
274
+ }
275
+ rememberPrimarySize(size) {
276
+ this.lastExpandedPrimarySize.set(roundResizablePercentage(size));
277
+ }
278
+ rememberedPrimarySize() {
279
+ return this.lastExpandedPrimarySize();
280
+ }
281
+ nativeElement() {
282
+ return this.host.nativeElement;
283
+ }
284
+ static ɵfac = i0.ɵɵngDeclareFactory({
285
+ minVersion: "12.0.0",
286
+ version: "22.2.2",
287
+ ngImport: i0,
288
+ type: ResizableHandleComponent,
289
+ deps: [],
290
+ target: i0.ɵɵFactoryTarget.Component
291
+ });
292
+ static ɵcmp = i0.ɵɵngDeclareComponent({
293
+ minVersion: "17.0.0",
294
+ version: "22.2.2",
295
+ type: ResizableHandleComponent,
296
+ isStandalone: true,
297
+ selector: "ResizableHandle",
298
+ inputs: {
299
+ withHandle: {
300
+ classPropertyName: "withHandle",
301
+ publicName: "withHandle",
302
+ isSignal: true,
303
+ isRequired: false,
304
+ transformFunction: null
305
+ },
306
+ ariaLabel: {
307
+ classPropertyName: "ariaLabel",
308
+ publicName: "aria-label",
309
+ isSignal: true,
310
+ isRequired: false,
311
+ transformFunction: null
312
+ },
313
+ class: {
314
+ classPropertyName: "class",
315
+ publicName: "class",
316
+ isSignal: true,
317
+ isRequired: false,
318
+ transformFunction: null
319
+ }
320
+ },
321
+ host: {
322
+ listeners: {
323
+ "keydown": "onKeydown($event)",
324
+ "pointerdown": "onPointerDown($event)"
325
+ },
326
+ properties: {
327
+ "class": "classes()",
328
+ "attr.role": "resizable() ? \"separator\" : null",
329
+ "attr.tabindex": "resizable() ? 0 : null",
330
+ "attr.data-active": "active() ? \"true\" : null",
331
+ "attr.aria-controls": "controls()",
332
+ "attr.aria-label": "resizable() ? label() : null",
333
+ "attr.aria-orientation": "resizable() ? separatorOrientation() : null",
334
+ "attr.aria-valuenow": "valueNow()",
335
+ "attr.aria-valuemin": "valueMin()",
336
+ "attr.aria-valuemax": "valueMax()",
337
+ "attr.aria-valuetext": "valueText()"
338
+ }
339
+ },
340
+ ngImport: i0,
341
+ template: `
204
342
  @if (withHandle()) {
205
343
  <span
206
344
  aria-hidden="true"
@@ -216,28 +354,35 @@ class ResizableHandleComponent {
216
354
  </svg>
217
355
  </span>
218
356
  }
219
- `, isInline: true });
220
- }
221
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ResizableHandleComponent, decorators: [{
222
- type: Component,
223
- args: [{
224
- selector: 'ResizableHandle',
225
- host: {
226
- '[class]': 'classes()',
227
- '[attr.role]': 'resizable() ? "separator" : null',
228
- '[attr.tabindex]': 'resizable() ? 0 : null',
229
- '[attr.data-active]': 'active() ? "true" : null',
230
- '[attr.aria-controls]': 'controls()',
231
- '[attr.aria-label]': 'resizable() ? label() : null',
232
- '[attr.aria-orientation]': 'resizable() ? separatorOrientation() : null',
233
- '[attr.aria-valuenow]': 'valueNow()',
234
- '[attr.aria-valuemin]': 'valueMin()',
235
- '[attr.aria-valuemax]': 'valueMax()',
236
- '[attr.aria-valuetext]': 'valueText()',
237
- '(keydown)': 'onKeydown($event)',
238
- '(pointerdown)': 'onPointerDown($event)',
239
- },
240
- template: `
357
+ `,
358
+ isInline: true
359
+ });
360
+ };
361
+ i0.ɵɵngDeclareClassMetadata({
362
+ minVersion: "12.0.0",
363
+ version: "22.2.2",
364
+ ngImport: i0,
365
+ type: ResizableHandleComponent,
366
+ decorators: [{
367
+ type: Component,
368
+ args: [{
369
+ selector: "ResizableHandle",
370
+ host: {
371
+ "[class]": "classes()",
372
+ "[attr.role]": "resizable() ? \"separator\" : null",
373
+ "[attr.tabindex]": "resizable() ? 0 : null",
374
+ "[attr.data-active]": "active() ? \"true\" : null",
375
+ "[attr.aria-controls]": "controls()",
376
+ "[attr.aria-label]": "resizable() ? label() : null",
377
+ "[attr.aria-orientation]": "resizable() ? separatorOrientation() : null",
378
+ "[attr.aria-valuenow]": "valueNow()",
379
+ "[attr.aria-valuemin]": "valueMin()",
380
+ "[attr.aria-valuemax]": "valueMax()",
381
+ "[attr.aria-valuetext]": "valueText()",
382
+ "(keydown)": "onKeydown($event)",
383
+ "(pointerdown)": "onPointerDown($event)"
384
+ },
385
+ template: `
241
386
  @if (withHandle()) {
242
387
  <span
243
388
  aria-hidden="true"
@@ -253,245 +398,306 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
253
398
  </svg>
254
399
  </span>
255
400
  }
256
- `,
257
- }]
258
- }], propDecorators: { withHandle: [{ type: i0.Input, args: [{ isSignal: true, alias: "withHandle", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
259
- class ResizablePanelGroupComponent extends ResizableGroupContextBase {
260
- host = inject((ElementRef));
261
- document = inject(DOCUMENT);
262
- orientation = input('horizontal', /* @ts-ignore */
263
- ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
264
- class = input('', /* @ts-ignore */
265
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
266
- panels = contentChildren(ResizablePanelComponent, /* @ts-ignore */
267
- ...(ngDevMode ? [{ debugName: "panels" }] : /* istanbul ignore next */ []));
268
- handles = contentChildren(ResizableHandleComponent, /* @ts-ignore */
269
- ...(ngDevMode ? [{ debugName: "handles" }] : /* istanbul ignore next */ []));
270
- pointerSession = null;
271
- removePointerListeners = null;
272
- classes = computed(() => cn('flex w-full min-h-0 min-w-0 items-stretch', this.orientation() === 'horizontal' ? 'flex-row' : 'flex-col', this.class()), /* @ts-ignore */
273
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
274
- syncLayout = effect(() => {
275
- const panels = this.panels();
276
- void this.handles();
277
- if (!panels.length) {
278
- return;
279
- }
280
- untracked(() => this.initializeLayout(panels));
281
- }, /* @ts-ignore */
282
- ...(ngDevMode ? [{ debugName: "syncLayout" }] : /* istanbul ignore next */ []));
283
- groupOrientation() {
284
- return this.orientation();
285
- }
286
- panelDirection() {
287
- const view = this.document.defaultView;
288
- if (!view) {
289
- return 'ltr';
290
- }
291
- return view.getComputedStyle(this.host.nativeElement).direction === 'rtl' ? 'rtl' : 'ltr';
292
- }
293
- pairState(handle) {
294
- const pair = this.resolvePair(handle);
295
- if (!pair) {
296
- return null;
297
- }
298
- const bounds = this.boundsForPair(pair);
299
- return {
300
- panelId: pair.previous.panelId(),
301
- valueNow: pair.previous.size(),
302
- valueMin: bounds.min,
303
- valueMax: bounds.max,
304
- };
305
- }
306
- beginPointerResize(handle, event) {
307
- const pair = this.resolvePair(handle);
308
- if (!pair) {
309
- return;
310
- }
311
- this.finishPointerResize();
312
- handle.setActive(true);
313
- this.pointerSession = {
314
- handle,
315
- pair,
316
- startCoordinate: this.coordinateFromEvent(event),
317
- previousSize: pair.previous.size(),
318
- };
319
- const move = (nextEvent) => {
320
- const session = this.pointerSession;
321
- if (!session) {
322
- return;
323
- }
324
- const containerSize = this.containerSize();
325
- if (containerSize <= 0) {
326
- return;
327
- }
328
- const delta = this.coordinateFromEvent(nextEvent) - session.startCoordinate;
329
- const directionFactor = this.orientation() === 'horizontal' && this.panelDirection() === 'rtl' ? -1 : 1;
330
- const deltaPercent = (delta / containerSize) * 100 * directionFactor;
331
- this.applyPrimarySize(session.pair, session.previousSize + deltaPercent);
332
- };
333
- const end = () => this.finishPointerResize();
334
- this.document.addEventListener('pointermove', move);
335
- this.document.addEventListener('pointerup', end);
336
- this.document.addEventListener('pointercancel', end);
337
- this.removePointerListeners = () => {
338
- this.document.removeEventListener('pointermove', move);
339
- this.document.removeEventListener('pointerup', end);
340
- this.document.removeEventListener('pointercancel', end);
341
- };
342
- }
343
- handleKeydown(handle, event) {
344
- const pair = this.resolvePair(handle);
345
- if (!pair) {
346
- return;
347
- }
348
- const current = pair.previous.size();
349
- const bounds = this.boundsForPair(pair);
350
- const horizontalStep = this.panelDirection() === 'rtl' ? -10 : 10;
351
- switch (event.key) {
352
- case 'ArrowRight':
353
- if (this.orientation() !== 'horizontal') {
354
- return;
355
- }
356
- this.applyPrimarySize(pair, current + horizontalStep);
357
- break;
358
- case 'ArrowLeft':
359
- if (this.orientation() !== 'horizontal') {
360
- return;
361
- }
362
- this.applyPrimarySize(pair, current - horizontalStep);
363
- break;
364
- case 'ArrowDown':
365
- if (this.orientation() !== 'vertical') {
366
- return;
367
- }
368
- this.applyPrimarySize(pair, current + 10);
369
- break;
370
- case 'ArrowUp':
371
- if (this.orientation() !== 'vertical') {
372
- return;
373
- }
374
- this.applyPrimarySize(pair, current - 10);
375
- break;
376
- case 'Home':
377
- this.applyPrimarySize(pair, bounds.min);
378
- break;
379
- case 'End':
380
- this.applyPrimarySize(pair, bounds.max);
381
- break;
382
- case 'Enter': {
383
- const remembered = handle.rememberedPrimarySize();
384
- if (current > bounds.min + 0.5) {
385
- handle.rememberPrimarySize(current);
386
- this.applyPrimarySize(pair, bounds.min);
387
- }
388
- else if (remembered != null) {
389
- this.applyPrimarySize(pair, remembered);
390
- }
391
- else {
392
- this.applyPrimarySize(pair, (bounds.min + bounds.max) / 2);
393
- }
394
- break;
395
- }
396
- default:
397
- return;
398
- }
399
- event.preventDefault();
400
- }
401
- ngOnDestroy() {
402
- this.finishPointerResize();
403
- }
404
- finishPointerResize() {
405
- this.pointerSession?.handle.setActive(false);
406
- this.pointerSession = null;
407
- this.removePointerListeners?.();
408
- this.removePointerListeners = null;
409
- }
410
- initializeLayout(panels) {
411
- const minimums = panels.map((panel) => panel.minSizePercent());
412
- const maximums = panels.map((panel, index) => Math.max(minimums[index], panel.maxSizePercent()));
413
- const preferred = panels.map((panel) => panel.preferredSizePercent());
414
- const sizes = resolveInitialResizableSizes(preferred, minimums, maximums);
415
- panels.forEach((panel, index) => panel.setSize(sizes[index]));
416
- }
417
- resolvePair(handle) {
418
- const panels = new Map(this.panels().map((panel) => [panel.nativeElement(), panel]));
419
- const children = Array.from(this.host.nativeElement.children);
420
- const handleIndex = children.indexOf(handle.nativeElement());
421
- if (handleIndex === -1) {
422
- return null;
423
- }
424
- let previous = null;
425
- let next = null;
426
- for (let index = handleIndex - 1; index >= 0; index -= 1) {
427
- previous = panels.get(children[index]) ?? null;
428
- if (previous) {
429
- break;
430
- }
431
- }
432
- for (let index = handleIndex + 1; index < children.length; index += 1) {
433
- next = panels.get(children[index]) ?? null;
434
- if (next) {
435
- break;
436
- }
437
- }
438
- if (!previous || !next) {
439
- return null;
440
- }
441
- return { previous, next };
442
- }
443
- boundsForPair(pair) {
444
- const pairTotal = pair.previous.size() + pair.next.size();
445
- const min = Math.max(pair.previous.minSizePercent(), pairTotal - pair.next.maxSizePercent());
446
- const max = Math.min(pair.previous.maxSizePercent(), pairTotal - pair.next.minSizePercent());
447
- if (min > max) {
448
- return { min: pairTotal / 2, max: pairTotal / 2 };
449
- }
450
- return { min: roundResizablePercentage(min), max: roundResizablePercentage(max) };
451
- }
452
- applyPrimarySize(pair, nextPrimarySize) {
453
- const pairTotal = pair.previous.size() + pair.next.size();
454
- const bounds = this.boundsForPair(pair);
455
- const primarySize = roundResizablePercentage(clampResizableValue(nextPrimarySize, bounds.min, bounds.max));
456
- const secondarySize = roundResizablePercentage(pairTotal - primarySize);
457
- pair.previous.setSize(primarySize);
458
- pair.next.setSize(secondarySize);
459
- }
460
- containerSize() {
461
- const rect = this.host.nativeElement.getBoundingClientRect();
462
- return this.orientation() === 'horizontal' ? rect.width : rect.height;
463
- }
464
- coordinateFromEvent(event) {
465
- return this.orientation() === 'horizontal' ? event.clientX : event.clientY;
466
- }
467
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ResizablePanelGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
468
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: ResizablePanelGroupComponent, isStandalone: true, selector: "ResizablePanelGroup", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-orientation": "orientation()" } }, providers: [
469
- {
470
- provide: ResizableGroupContextBase,
471
- useExisting: forwardRef(() => ResizablePanelGroupComponent),
472
- },
473
- ], queries: [{ propertyName: "panels", predicate: ResizablePanelComponent, isSignal: true }, { propertyName: "handles", predicate: ResizableHandleComponent, isSignal: true }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true });
474
- }
475
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ResizablePanelGroupComponent, decorators: [{
476
- type: Component,
477
- args: [{
478
- selector: 'ResizablePanelGroup',
479
- providers: [
480
- {
481
- provide: ResizableGroupContextBase,
482
- useExisting: forwardRef(() => ResizablePanelGroupComponent),
483
- },
484
- ],
485
- host: {
486
- '[class]': 'classes()',
487
- '[attr.data-orientation]': 'orientation()',
488
- },
489
- template: `<ng-content />`,
490
- }]
491
- }], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], panels: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ResizablePanelComponent), { isSignal: true }] }], handles: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ResizableHandleComponent), { isSignal: true }] }] } });
492
-
493
- /**
494
- * Generated bundle index. Do not edit.
495
- */
496
-
497
- export { ResizableGroupContextBase, ResizableHandleComponent, ResizablePanelComponent, ResizablePanelGroupComponent, clampResizableValue, parseResizablePercent, resolveInitialResizableSizes, roundResizablePercentage, toResizableAriaValue };
401
+ `
402
+ }]
403
+ }],
404
+ propDecorators: {
405
+ withHandle: [{
406
+ type: i0.Input,
407
+ args: [{
408
+ isSignal: true,
409
+ alias: "withHandle",
410
+ required: false
411
+ }]
412
+ }],
413
+ ariaLabel: [{
414
+ type: i0.Input,
415
+ args: [{
416
+ isSignal: true,
417
+ alias: "aria-label",
418
+ required: false
419
+ }]
420
+ }],
421
+ class: [{
422
+ type: i0.Input,
423
+ args: [{
424
+ isSignal: true,
425
+ alias: "class",
426
+ required: false
427
+ }]
428
+ }]
429
+ }
430
+ });
431
+ var ResizablePanelGroupComponent = class ResizablePanelGroupComponent extends ResizableGroupContextBase {
432
+ host = inject(ElementRef);
433
+ document = inject(DOCUMENT);
434
+ orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
435
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
436
+ panels = contentChildren(ResizablePanelComponent, ...ngDevMode ? [{ debugName: "panels" }] : /* istanbul ignore next */ []);
437
+ handles = contentChildren(ResizableHandleComponent, ...ngDevMode ? [{ debugName: "handles" }] : /* istanbul ignore next */ []);
438
+ pointerSession = null;
439
+ removePointerListeners = null;
440
+ classes = computed(() => cn("flex w-full min-h-0 min-w-0 items-stretch", this.orientation() === "horizontal" ? "flex-row" : "flex-col", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
441
+ syncLayout = effect(() => {
442
+ const panels = this.panels();
443
+ this.handles();
444
+ if (!panels.length) return;
445
+ untracked(() => this.initializeLayout(panels));
446
+ }, ...ngDevMode ? [{ debugName: "syncLayout" }] : /* istanbul ignore next */ []);
447
+ groupOrientation() {
448
+ return this.orientation();
449
+ }
450
+ panelDirection() {
451
+ const view = this.document.defaultView;
452
+ if (!view) return "ltr";
453
+ return view.getComputedStyle(this.host.nativeElement).direction === "rtl" ? "rtl" : "ltr";
454
+ }
455
+ pairState(handle) {
456
+ const pair = this.resolvePair(handle);
457
+ if (!pair) return null;
458
+ const bounds = this.boundsForPair(pair);
459
+ return {
460
+ panelId: pair.previous.panelId(),
461
+ valueNow: pair.previous.size(),
462
+ valueMin: bounds.min,
463
+ valueMax: bounds.max
464
+ };
465
+ }
466
+ beginPointerResize(handle, event) {
467
+ const pair = this.resolvePair(handle);
468
+ if (!pair) return;
469
+ this.finishPointerResize();
470
+ handle.setActive(true);
471
+ this.pointerSession = {
472
+ handle,
473
+ pair,
474
+ startCoordinate: this.coordinateFromEvent(event),
475
+ previousSize: pair.previous.size()
476
+ };
477
+ const move = (nextEvent) => {
478
+ const session = this.pointerSession;
479
+ if (!session) return;
480
+ const containerSize = this.containerSize();
481
+ if (containerSize <= 0) return;
482
+ const delta = this.coordinateFromEvent(nextEvent) - session.startCoordinate;
483
+ const directionFactor = this.orientation() === "horizontal" && this.panelDirection() === "rtl" ? -1 : 1;
484
+ const deltaPercent = delta / containerSize * 100 * directionFactor;
485
+ this.applyPrimarySize(session.pair, session.previousSize + deltaPercent);
486
+ };
487
+ const end = () => this.finishPointerResize();
488
+ this.document.addEventListener("pointermove", move);
489
+ this.document.addEventListener("pointerup", end);
490
+ this.document.addEventListener("pointercancel", end);
491
+ this.removePointerListeners = () => {
492
+ this.document.removeEventListener("pointermove", move);
493
+ this.document.removeEventListener("pointerup", end);
494
+ this.document.removeEventListener("pointercancel", end);
495
+ };
496
+ }
497
+ handleKeydown(handle, event) {
498
+ const pair = this.resolvePair(handle);
499
+ if (!pair) return;
500
+ const current = pair.previous.size();
501
+ const bounds = this.boundsForPair(pair);
502
+ const horizontalStep = this.panelDirection() === "rtl" ? -10 : 10;
503
+ switch (event.key) {
504
+ case "ArrowRight":
505
+ if (this.orientation() !== "horizontal") return;
506
+ this.applyPrimarySize(pair, current + horizontalStep);
507
+ break;
508
+ case "ArrowLeft":
509
+ if (this.orientation() !== "horizontal") return;
510
+ this.applyPrimarySize(pair, current - horizontalStep);
511
+ break;
512
+ case "ArrowDown":
513
+ if (this.orientation() !== "vertical") return;
514
+ this.applyPrimarySize(pair, current + 10);
515
+ break;
516
+ case "ArrowUp":
517
+ if (this.orientation() !== "vertical") return;
518
+ this.applyPrimarySize(pair, current - 10);
519
+ break;
520
+ case "Home":
521
+ this.applyPrimarySize(pair, bounds.min);
522
+ break;
523
+ case "End":
524
+ this.applyPrimarySize(pair, bounds.max);
525
+ break;
526
+ case "Enter": {
527
+ const remembered = handle.rememberedPrimarySize();
528
+ if (current > bounds.min + .5) {
529
+ handle.rememberPrimarySize(current);
530
+ this.applyPrimarySize(pair, bounds.min);
531
+ } else if (remembered != null) this.applyPrimarySize(pair, remembered);
532
+ else this.applyPrimarySize(pair, (bounds.min + bounds.max) / 2);
533
+ break;
534
+ }
535
+ default: return;
536
+ }
537
+ event.preventDefault();
538
+ }
539
+ ngOnDestroy() {
540
+ this.finishPointerResize();
541
+ }
542
+ finishPointerResize() {
543
+ this.pointerSession?.handle.setActive(false);
544
+ this.pointerSession = null;
545
+ this.removePointerListeners?.();
546
+ this.removePointerListeners = null;
547
+ }
548
+ initializeLayout(panels) {
549
+ const minimums = panels.map((panel) => panel.minSizePercent());
550
+ const maximums = panels.map((panel, index) => Math.max(minimums[index], panel.maxSizePercent()));
551
+ const sizes = resolveInitialResizableSizes(panels.map((panel) => panel.preferredSizePercent()), minimums, maximums);
552
+ panels.forEach((panel, index) => panel.setSize(sizes[index]));
553
+ }
554
+ resolvePair(handle) {
555
+ const panels = new Map(this.panels().map((panel) => [panel.nativeElement(), panel]));
556
+ const children = Array.from(this.host.nativeElement.children);
557
+ const handleIndex = children.indexOf(handle.nativeElement());
558
+ if (handleIndex === -1) return null;
559
+ let previous = null;
560
+ let next = null;
561
+ for (let index = handleIndex - 1; index >= 0; index -= 1) {
562
+ previous = panels.get(children[index]) ?? null;
563
+ if (previous) break;
564
+ }
565
+ for (let index = handleIndex + 1; index < children.length; index += 1) {
566
+ next = panels.get(children[index]) ?? null;
567
+ if (next) break;
568
+ }
569
+ if (!previous || !next) return null;
570
+ return {
571
+ previous,
572
+ next
573
+ };
574
+ }
575
+ boundsForPair(pair) {
576
+ const pairTotal = pair.previous.size() + pair.next.size();
577
+ const min = Math.max(pair.previous.minSizePercent(), pairTotal - pair.next.maxSizePercent());
578
+ const max = Math.min(pair.previous.maxSizePercent(), pairTotal - pair.next.minSizePercent());
579
+ if (min > max) return {
580
+ min: pairTotal / 2,
581
+ max: pairTotal / 2
582
+ };
583
+ return {
584
+ min: roundResizablePercentage(min),
585
+ max: roundResizablePercentage(max)
586
+ };
587
+ }
588
+ applyPrimarySize(pair, nextPrimarySize) {
589
+ const pairTotal = pair.previous.size() + pair.next.size();
590
+ const bounds = this.boundsForPair(pair);
591
+ const primarySize = roundResizablePercentage(clampResizableValue(nextPrimarySize, bounds.min, bounds.max));
592
+ const secondarySize = roundResizablePercentage(pairTotal - primarySize);
593
+ pair.previous.setSize(primarySize);
594
+ pair.next.setSize(secondarySize);
595
+ }
596
+ containerSize() {
597
+ const rect = this.host.nativeElement.getBoundingClientRect();
598
+ return this.orientation() === "horizontal" ? rect.width : rect.height;
599
+ }
600
+ coordinateFromEvent(event) {
601
+ return this.orientation() === "horizontal" ? event.clientX : event.clientY;
602
+ }
603
+ static ɵfac = i0.ɵɵngDeclareFactory({
604
+ minVersion: "12.0.0",
605
+ version: "22.2.2",
606
+ ngImport: i0,
607
+ type: ResizablePanelGroupComponent,
608
+ deps: null,
609
+ target: i0.ɵɵFactoryTarget.Component
610
+ });
611
+ static ɵcmp = i0.ɵɵngDeclareComponent({
612
+ minVersion: "17.2.0",
613
+ version: "22.2.2",
614
+ type: ResizablePanelGroupComponent,
615
+ isStandalone: true,
616
+ selector: "ResizablePanelGroup",
617
+ inputs: {
618
+ orientation: {
619
+ classPropertyName: "orientation",
620
+ publicName: "orientation",
621
+ isSignal: true,
622
+ isRequired: false,
623
+ transformFunction: null
624
+ },
625
+ class: {
626
+ classPropertyName: "class",
627
+ publicName: "class",
628
+ isSignal: true,
629
+ isRequired: false,
630
+ transformFunction: null
631
+ }
632
+ },
633
+ host: { properties: {
634
+ "class": "classes()",
635
+ "attr.data-orientation": "orientation()"
636
+ } },
637
+ providers: [{
638
+ provide: ResizableGroupContextBase,
639
+ useExisting: forwardRef(() => ResizablePanelGroupComponent)
640
+ }],
641
+ queries: [{
642
+ propertyName: "panels",
643
+ predicate: ResizablePanelComponent,
644
+ isSignal: true
645
+ }, {
646
+ propertyName: "handles",
647
+ predicate: ResizableHandleComponent,
648
+ isSignal: true
649
+ }],
650
+ usesInheritance: true,
651
+ ngImport: i0,
652
+ template: `<ng-content />`,
653
+ isInline: true
654
+ });
655
+ };
656
+ i0.ɵɵngDeclareClassMetadata({
657
+ minVersion: "12.0.0",
658
+ version: "22.2.2",
659
+ ngImport: i0,
660
+ type: ResizablePanelGroupComponent,
661
+ decorators: [{
662
+ type: Component,
663
+ args: [{
664
+ selector: "ResizablePanelGroup",
665
+ providers: [{
666
+ provide: ResizableGroupContextBase,
667
+ useExisting: forwardRef(() => ResizablePanelGroupComponent)
668
+ }],
669
+ host: {
670
+ "[class]": "classes()",
671
+ "[attr.data-orientation]": "orientation()"
672
+ },
673
+ template: `<ng-content />`
674
+ }]
675
+ }],
676
+ propDecorators: {
677
+ orientation: [{
678
+ type: i0.Input,
679
+ args: [{
680
+ isSignal: true,
681
+ alias: "orientation",
682
+ required: false
683
+ }]
684
+ }],
685
+ class: [{
686
+ type: i0.Input,
687
+ args: [{
688
+ isSignal: true,
689
+ alias: "class",
690
+ required: false
691
+ }]
692
+ }],
693
+ panels: [{
694
+ type: i0.ContentChildren,
695
+ args: [i0.forwardRef(() => ResizablePanelComponent), { isSignal: true }]
696
+ }],
697
+ handles: [{
698
+ type: i0.ContentChildren,
699
+ args: [i0.forwardRef(() => ResizableHandleComponent), { isSignal: true }]
700
+ }]
701
+ }
702
+ });
703
+ export { ResizableGroupContextBase, ResizableHandleComponent, ResizablePanelComponent, ResizablePanelGroupComponent, clampResizableValue, parseResizablePercent, resolveInitialResizableSizes, roundResizablePercentage, toResizableAriaValue };