@loomui-ng/ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +46 -2
- package/accordion/README.md +38 -0
- package/alert/README.md +32 -0
- package/alert-dialog/README.md +37 -0
- package/aspect-ratio/README.md +24 -0
- package/attachment/README.md +40 -0
- package/avatar/README.md +34 -0
- package/badge/README.md +29 -0
- package/breadcrumb/README.md +33 -0
- package/bubble/README.md +32 -0
- package/button/README.md +31 -0
- package/button-group/README.md +30 -0
- package/calendar/README.md +35 -0
- package/card/README.md +41 -0
- package/carousel/README.md +41 -0
- package/chart/README.md +25 -0
- package/checkbox/README.md +31 -0
- package/collapsible/README.md +31 -0
- package/combobox/README.md +47 -0
- package/command/README.md +44 -0
- package/context-menu/README.md +36 -0
- package/data-table/README.md +39 -0
- package/date-picker/README.md +23 -0
- package/dialog/README.md +52 -0
- package/direction/README.md +19 -0
- package/drawer/README.md +37 -0
- package/dropdown-menu/README.md +46 -0
- package/empty/README.md +38 -0
- package/fesm2022/loomui-ng-ui-accordion.mjs +555 -0
- package/fesm2022/loomui-ng-ui-accordion.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-alert-dialog.mjs +652 -0
- package/fesm2022/loomui-ng-ui-alert-dialog.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-alert.mjs +286 -0
- package/fesm2022/loomui-ng-ui-alert.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-aspect-ratio.mjs +97 -0
- package/fesm2022/loomui-ng-ui-aspect-ratio.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-attachment.mjs +713 -0
- package/fesm2022/loomui-ng-ui-attachment.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-avatar.mjs +561 -0
- package/fesm2022/loomui-ng-ui-avatar.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-badge.mjs +102 -0
- package/fesm2022/loomui-ng-ui-badge.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-breadcrumb.mjs +520 -0
- package/fesm2022/loomui-ng-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-bubble.mjs +386 -0
- package/fesm2022/loomui-ng-ui-bubble.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-button-group.mjs +193 -0
- package/fesm2022/loomui-ng-ui-button-group.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-button.mjs +162 -0
- package/fesm2022/loomui-ng-ui-button.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-calendar.mjs +681 -0
- package/fesm2022/loomui-ng-ui-calendar.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-card.mjs +461 -0
- package/fesm2022/loomui-ng-ui-card.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-carousel.mjs +532 -0
- package/fesm2022/loomui-ng-ui-carousel.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-chart.mjs +373 -0
- package/fesm2022/loomui-ng-ui-chart.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-checkbox.mjs +265 -0
- package/fesm2022/loomui-ng-ui-checkbox.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-collapsible.mjs +274 -0
- package/fesm2022/loomui-ng-ui-collapsible.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-combobox.mjs +971 -0
- package/fesm2022/loomui-ng-ui-combobox.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-command.mjs +982 -0
- package/fesm2022/loomui-ng-ui-command.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-context-menu.mjs +1359 -0
- package/fesm2022/loomui-ng-ui-context-menu.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-data-table.mjs +535 -0
- package/fesm2022/loomui-ng-ui-data-table.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-date-picker.mjs +312 -0
- package/fesm2022/loomui-ng-ui-date-picker.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-dialog.mjs +508 -0
- package/fesm2022/loomui-ng-ui-dialog.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-direction.mjs +112 -0
- package/fesm2022/loomui-ng-ui-direction.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-drawer.mjs +590 -0
- package/fesm2022/loomui-ng-ui-drawer.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-dropdown-menu.mjs +1322 -0
- package/fesm2022/loomui-ng-ui-dropdown-menu.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-empty.mjs +408 -0
- package/fesm2022/loomui-ng-ui-empty.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-field.mjs +630 -0
- package/fesm2022/loomui-ng-ui-field.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-hover-card.mjs +230 -0
- package/fesm2022/loomui-ng-ui-hover-card.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-icon.mjs +498 -0
- package/fesm2022/loomui-ng-ui-icon.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-input-group.mjs +463 -0
- package/fesm2022/loomui-ng-ui-input-group.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-input-otp.mjs +586 -0
- package/fesm2022/loomui-ng-ui-input-otp.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-input.mjs +289 -0
- package/fesm2022/loomui-ng-ui-input.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-item.mjs +598 -0
- package/fesm2022/loomui-ng-ui-item.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-kbd.mjs +129 -0
- package/fesm2022/loomui-ng-ui-kbd.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-label.mjs +68 -0
- package/fesm2022/loomui-ng-ui-label.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-marker.mjs +234 -0
- package/fesm2022/loomui-ng-ui-marker.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-menubar.mjs +1523 -0
- package/fesm2022/loomui-ng-ui-menubar.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-message-scroller.mjs +519 -0
- package/fesm2022/loomui-ng-ui-message-scroller.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-message.mjs +408 -0
- package/fesm2022/loomui-ng-ui-message.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-native-select.mjs +389 -0
- package/fesm2022/loomui-ng-ui-native-select.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-navigation-menu.mjs +609 -0
- package/fesm2022/loomui-ng-ui-navigation-menu.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-pagination.mjs +611 -0
- package/fesm2022/loomui-ng-ui-pagination.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-popover.mjs +358 -0
- package/fesm2022/loomui-ng-ui-popover.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-progress.mjs +159 -0
- package/fesm2022/loomui-ng-ui-progress.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-questionnaire.mjs +1012 -0
- package/fesm2022/loomui-ng-ui-questionnaire.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-radio-group.mjs +399 -0
- package/fesm2022/loomui-ng-ui-radio-group.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-resizable.mjs +518 -0
- package/fesm2022/loomui-ng-ui-resizable.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-scroll-area.mjs +135 -0
- package/fesm2022/loomui-ng-ui-scroll-area.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-select.mjs +863 -0
- package/fesm2022/loomui-ng-ui-select.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-separator.mjs +114 -0
- package/fesm2022/loomui-ng-ui-separator.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-sheet.mjs +530 -0
- package/fesm2022/loomui-ng-ui-sheet.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-sidebar.mjs +1918 -0
- package/fesm2022/loomui-ng-ui-sidebar.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-skeleton.mjs +69 -0
- package/fesm2022/loomui-ng-ui-skeleton.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-slider.mjs +390 -0
- package/fesm2022/loomui-ng-ui-slider.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-spinner.mjs +85 -0
- package/fesm2022/loomui-ng-ui-spinner.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-switch.mjs +212 -0
- package/fesm2022/loomui-ng-ui-switch.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-table.mjs +559 -0
- package/fesm2022/loomui-ng-ui-table.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-tabs.mjs +544 -0
- package/fesm2022/loomui-ng-ui-tabs.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-textarea.mjs +206 -0
- package/fesm2022/loomui-ng-ui-textarea.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-toast.mjs +432 -0
- package/fesm2022/loomui-ng-ui-toast.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-toggle-group.mjs +477 -0
- package/fesm2022/loomui-ng-ui-toggle-group.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-toggle.mjs +219 -0
- package/fesm2022/loomui-ng-ui-toggle.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-tooltip.mjs +240 -0
- package/fesm2022/loomui-ng-ui-tooltip.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-typography.mjs +129 -0
- package/fesm2022/loomui-ng-ui-typography.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-utils.mjs +1533 -0
- package/fesm2022/loomui-ng-ui-utils.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui.mjs +4 -0
- package/fesm2022/loomui-ng-ui.mjs.map +1 -0
- package/field/README.md +43 -0
- package/hover-card/README.md +31 -0
- package/icon/README.md +42 -0
- package/input/README.md +26 -0
- package/input-group/README.md +40 -0
- package/input-otp/README.md +35 -0
- package/item/README.md +33 -0
- package/kbd/README.md +21 -0
- package/label/README.md +24 -0
- package/marker/README.md +24 -0
- package/menubar/README.md +40 -0
- package/message/README.md +32 -0
- package/message-scroller/README.md +40 -0
- package/native-select/README.md +26 -0
- package/navigation-menu/README.md +39 -0
- package/package.json +325 -3
- package/pagination/README.md +37 -0
- package/popover/README.md +37 -0
- package/progress/README.md +25 -0
- package/questionnaire/README.md +52 -0
- package/radio-group/README.md +33 -0
- package/resizable/README.md +37 -0
- package/scroll-area/README.md +25 -0
- package/select/README.md +45 -0
- package/separator/README.md +28 -0
- package/sheet/README.md +38 -0
- package/sidebar/README.md +60 -0
- package/skeleton/README.md +21 -0
- package/slider/README.md +29 -0
- package/spinner/README.md +15 -0
- package/styles/loomui.css +330 -0
- package/switch/README.md +29 -0
- package/table/README.md +31 -0
- package/tabs/README.md +42 -0
- package/textarea/README.md +28 -0
- package/toast/README.md +27 -0
- package/toggle/README.md +27 -0
- package/toggle-group/README.md +37 -0
- package/tooltip/README.md +31 -0
- package/types/loomui-ng-ui-accordion.d.ts +141 -0
- package/types/loomui-ng-ui-alert-dialog.d.ts +175 -0
- package/types/loomui-ng-ui-alert.d.ts +77 -0
- package/types/loomui-ng-ui-aspect-ratio.d.ts +31 -0
- package/types/loomui-ng-ui-attachment.d.ts +192 -0
- package/types/loomui-ng-ui-avatar.d.ts +147 -0
- package/types/loomui-ng-ui-badge.d.ts +32 -0
- package/types/loomui-ng-ui-breadcrumb.d.ts +118 -0
- package/types/loomui-ng-ui-bubble.d.ts +100 -0
- package/types/loomui-ng-ui-button-group.d.ts +51 -0
- package/types/loomui-ng-ui-button.d.ts +57 -0
- package/types/loomui-ng-ui-calendar.d.ts +171 -0
- package/types/loomui-ng-ui-card.d.ts +123 -0
- package/types/loomui-ng-ui-carousel.d.ts +140 -0
- package/types/loomui-ng-ui-chart.d.ts +95 -0
- package/types/loomui-ng-ui-checkbox.d.ts +62 -0
- package/types/loomui-ng-ui-collapsible.d.ts +74 -0
- package/types/loomui-ng-ui-combobox.d.ts +229 -0
- package/types/loomui-ng-ui-command.d.ts +231 -0
- package/types/loomui-ng-ui-context-menu.d.ts +288 -0
- package/types/loomui-ng-ui-data-table.d.ts +111 -0
- package/types/loomui-ng-ui-date-picker.d.ts +63 -0
- package/types/loomui-ng-ui-dialog.d.ts +127 -0
- package/types/loomui-ng-ui-direction.d.ts +42 -0
- package/types/loomui-ng-ui-drawer.d.ts +149 -0
- package/types/loomui-ng-ui-dropdown-menu.d.ts +258 -0
- package/types/loomui-ng-ui-empty.d.ts +109 -0
- package/types/loomui-ng-ui-field.d.ts +169 -0
- package/types/loomui-ng-ui-hover-card.d.ts +62 -0
- package/types/loomui-ng-ui-icon.d.ts +156 -0
- package/types/loomui-ng-ui-input-group.d.ts +130 -0
- package/types/loomui-ng-ui-input-otp.d.ts +149 -0
- package/types/loomui-ng-ui-input.d.ts +89 -0
- package/types/loomui-ng-ui-item.d.ts +157 -0
- package/types/loomui-ng-ui-kbd.d.ts +36 -0
- package/types/loomui-ng-ui-label.d.ts +19 -0
- package/types/loomui-ng-ui-marker.d.ts +61 -0
- package/types/loomui-ng-ui-menubar.d.ts +321 -0
- package/types/loomui-ng-ui-message-scroller.d.ts +138 -0
- package/types/loomui-ng-ui-message.d.ts +109 -0
- package/types/loomui-ng-ui-native-select.d.ts +84 -0
- package/types/loomui-ng-ui-navigation-menu.d.ts +160 -0
- package/types/loomui-ng-ui-pagination.d.ts +130 -0
- package/types/loomui-ng-ui-popover.d.ts +90 -0
- package/types/loomui-ng-ui-progress.d.ts +39 -0
- package/types/loomui-ng-ui-questionnaire.d.ts +274 -0
- package/types/loomui-ng-ui-radio-group.d.ts +109 -0
- package/types/loomui-ng-ui-resizable.d.ts +121 -0
- package/types/loomui-ng-ui-scroll-area.d.ts +44 -0
- package/types/loomui-ng-ui-select.d.ts +204 -0
- package/types/loomui-ng-ui-separator.d.ts +35 -0
- package/types/loomui-ng-ui-sheet.d.ts +124 -0
- package/types/loomui-ng-ui-sidebar.d.ts +485 -0
- package/types/loomui-ng-ui-skeleton.d.ts +20 -0
- package/types/loomui-ng-ui-slider.d.ts +103 -0
- package/types/loomui-ng-ui-spinner.d.ts +19 -0
- package/types/loomui-ng-ui-switch.d.ts +56 -0
- package/types/loomui-ng-ui-table.d.ts +148 -0
- package/types/loomui-ng-ui-tabs.d.ts +148 -0
- package/types/loomui-ng-ui-textarea.d.ts +52 -0
- package/types/loomui-ng-ui-toast.d.ts +97 -0
- package/types/loomui-ng-ui-toggle-group.d.ts +138 -0
- package/types/loomui-ng-ui-toggle.d.ts +63 -0
- package/types/loomui-ng-ui-tooltip.d.ts +63 -0
- package/types/loomui-ng-ui-typography.d.ts +42 -0
- package/types/loomui-ng-ui-utils.d.ts +392 -0
- package/types/loomui-ng-ui.d.ts +5 -0
- package/typography/README.md +29 -0
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
import { Directionality } from "@angular/cdk/bidi";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, Directive, ElementRef, booleanAttribute, computed, contentChildren, effect, forwardRef, inject, input, numberAttribute, signal, untracked } from "@angular/core";
|
|
4
|
+
import * as i1 from "@loomui-ng/ui/utils";
|
|
5
|
+
import { UiElementHost, cn } from "@loomui-ng/ui/utils";
|
|
6
|
+
import { UiIconSvg } from "@loomui-ng/ui/icon";
|
|
7
|
+
const resizablePanelGroupClass = "flex h-full w-full aria-[orientation=vertical]:flex-col";
|
|
8
|
+
const resizableHandleClass = "relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:start-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90 after:start-1/2 rtl:after:translate-x-1/2 rtl:aria-[orientation=horizontal]:after:-translate-x-0";
|
|
9
|
+
const UI_RESIZABLE_GENERATED = [];
|
|
10
|
+
var UiResizablePanelGroup = class UiResizablePanelGroup {
|
|
11
|
+
direction = input("horizontal", ...ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []);
|
|
12
|
+
userClass = input("", {
|
|
13
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
14
|
+
alias: "class"
|
|
15
|
+
});
|
|
16
|
+
dir = inject(Directionality);
|
|
17
|
+
el = inject(ElementRef).nativeElement;
|
|
18
|
+
panels = contentChildren(forwardRef(() => UiResizablePanel), {
|
|
19
|
+
...ngDevMode ? { debugName: "panels" } : /* istanbul ignore next */ {},
|
|
20
|
+
descendants: false
|
|
21
|
+
});
|
|
22
|
+
sizes = signal([], ...ngDevMode ? [{ debugName: "sizes" }] : /* istanbul ignore next */ []);
|
|
23
|
+
classes = computed(() => cn(resizablePanelGroupClass, this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
24
|
+
constructor() {
|
|
25
|
+
effect(() => {
|
|
26
|
+
const panels = this.panels();
|
|
27
|
+
untracked(() => {
|
|
28
|
+
if (this.sizes().length === panels.length) return;
|
|
29
|
+
const fixed = panels.map((p) => p.defaultSize());
|
|
30
|
+
const set = fixed.filter((s) => s !== void 0);
|
|
31
|
+
const rest = 100 - set.reduce((a, b) => a + b, 0);
|
|
32
|
+
const unset = fixed.length - set.length;
|
|
33
|
+
this.sizes.set(fixed.map((s) => s ?? (unset ? rest / unset : 0)));
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
resize(i, delta) {
|
|
38
|
+
const panels = this.panels();
|
|
39
|
+
const sizes = [...this.sizes()];
|
|
40
|
+
const a = panels[i];
|
|
41
|
+
const b = panels[i + 1];
|
|
42
|
+
if (!a || !b) return;
|
|
43
|
+
let d = delta;
|
|
44
|
+
d = Math.min(d, a.maxSize() - sizes[i], sizes[i + 1] - b.minSize());
|
|
45
|
+
d = Math.max(d, a.minSize() - sizes[i], sizes[i + 1] - b.maxSize());
|
|
46
|
+
sizes[i] += d;
|
|
47
|
+
sizes[i + 1] -= d;
|
|
48
|
+
this.sizes.set(sizes);
|
|
49
|
+
}
|
|
50
|
+
isRtl() {
|
|
51
|
+
return this.dir.value === "rtl" && this.direction() === "horizontal";
|
|
52
|
+
}
|
|
53
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
54
|
+
minVersion: "12.0.0",
|
|
55
|
+
version: "22.2.2",
|
|
56
|
+
ngImport: i0,
|
|
57
|
+
type: UiResizablePanelGroup,
|
|
58
|
+
deps: [],
|
|
59
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
60
|
+
});
|
|
61
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
62
|
+
minVersion: "17.2.0",
|
|
63
|
+
version: "22.2.2",
|
|
64
|
+
type: UiResizablePanelGroup,
|
|
65
|
+
isStandalone: true,
|
|
66
|
+
selector: "[uiResizablePanelGroup], ui-resizable-panel-group",
|
|
67
|
+
inputs: {
|
|
68
|
+
direction: {
|
|
69
|
+
classPropertyName: "direction",
|
|
70
|
+
publicName: "direction",
|
|
71
|
+
isSignal: true,
|
|
72
|
+
isRequired: false,
|
|
73
|
+
transformFunction: null
|
|
74
|
+
},
|
|
75
|
+
userClass: {
|
|
76
|
+
classPropertyName: "userClass",
|
|
77
|
+
publicName: "class",
|
|
78
|
+
isSignal: true,
|
|
79
|
+
isRequired: false,
|
|
80
|
+
transformFunction: null
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
host: {
|
|
84
|
+
attributes: {
|
|
85
|
+
"data-slot": "resizable-panel-group",
|
|
86
|
+
"data-group": "true"
|
|
87
|
+
},
|
|
88
|
+
properties: {
|
|
89
|
+
"attr.aria-orientation": "direction()",
|
|
90
|
+
"attr.data-panel-group-direction": "direction()",
|
|
91
|
+
"attr.class": "classes()"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
queries: [{
|
|
95
|
+
propertyName: "panels",
|
|
96
|
+
predicate: i0.forwardRef(() => UiResizablePanel),
|
|
97
|
+
isSignal: true
|
|
98
|
+
}],
|
|
99
|
+
exportAs: ["uiResizablePanelGroup"],
|
|
100
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
101
|
+
ngImport: i0
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
105
|
+
minVersion: "12.0.0",
|
|
106
|
+
version: "22.2.2",
|
|
107
|
+
ngImport: i0,
|
|
108
|
+
type: UiResizablePanelGroup,
|
|
109
|
+
decorators: [{
|
|
110
|
+
type: Directive,
|
|
111
|
+
args: [{
|
|
112
|
+
selector: "[uiResizablePanelGroup], ui-resizable-panel-group",
|
|
113
|
+
hostDirectives: [UiElementHost],
|
|
114
|
+
exportAs: "uiResizablePanelGroup",
|
|
115
|
+
host: {
|
|
116
|
+
"data-slot": "resizable-panel-group",
|
|
117
|
+
"data-group": "true",
|
|
118
|
+
"[attr.aria-orientation]": "direction()",
|
|
119
|
+
"[attr.data-panel-group-direction]": "direction()",
|
|
120
|
+
"[attr.class]": "classes()"
|
|
121
|
+
}
|
|
122
|
+
}]
|
|
123
|
+
}],
|
|
124
|
+
ctorParameters: () => [],
|
|
125
|
+
propDecorators: {
|
|
126
|
+
direction: [{
|
|
127
|
+
type: i0.Input,
|
|
128
|
+
args: [{
|
|
129
|
+
isSignal: true,
|
|
130
|
+
alias: "direction",
|
|
131
|
+
required: false
|
|
132
|
+
}]
|
|
133
|
+
}],
|
|
134
|
+
userClass: [{
|
|
135
|
+
type: i0.Input,
|
|
136
|
+
args: [{
|
|
137
|
+
isSignal: true,
|
|
138
|
+
alias: "class",
|
|
139
|
+
required: false
|
|
140
|
+
}]
|
|
141
|
+
}],
|
|
142
|
+
panels: [{
|
|
143
|
+
type: i0.ContentChildren,
|
|
144
|
+
args: [forwardRef(() => UiResizablePanel), {
|
|
145
|
+
descendants: false,
|
|
146
|
+
isSignal: true
|
|
147
|
+
}]
|
|
148
|
+
}]
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
var UiResizablePanel = class UiResizablePanel {
|
|
152
|
+
group = inject(UiResizablePanelGroup);
|
|
153
|
+
defaultSize = input(void 0, {
|
|
154
|
+
...ngDevMode ? { debugName: "defaultSize" } : /* istanbul ignore next */ {},
|
|
155
|
+
transform: (v) => v === void 0 || v === null || v === "" ? void 0 : numberAttribute(v)
|
|
156
|
+
});
|
|
157
|
+
minSize = input(0, {
|
|
158
|
+
...ngDevMode ? { debugName: "minSize" } : /* istanbul ignore next */ {},
|
|
159
|
+
transform: numberAttribute
|
|
160
|
+
});
|
|
161
|
+
maxSize = input(100, {
|
|
162
|
+
...ngDevMode ? { debugName: "maxSize" } : /* istanbul ignore next */ {},
|
|
163
|
+
transform: numberAttribute
|
|
164
|
+
});
|
|
165
|
+
userClass = input("", {
|
|
166
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
167
|
+
alias: "class"
|
|
168
|
+
});
|
|
169
|
+
index = computed(() => this.group.panels().indexOf(this), ...ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []);
|
|
170
|
+
size = computed(() => this.group.sizes()[this.index()] ?? this.defaultSize() ?? 0, ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
171
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
172
|
+
minVersion: "12.0.0",
|
|
173
|
+
version: "22.2.2",
|
|
174
|
+
ngImport: i0,
|
|
175
|
+
type: UiResizablePanel,
|
|
176
|
+
deps: [],
|
|
177
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
178
|
+
});
|
|
179
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
180
|
+
minVersion: "17.1.0",
|
|
181
|
+
version: "22.2.2",
|
|
182
|
+
type: UiResizablePanel,
|
|
183
|
+
isStandalone: true,
|
|
184
|
+
selector: "[uiResizablePanel], ui-resizable-panel",
|
|
185
|
+
inputs: {
|
|
186
|
+
defaultSize: {
|
|
187
|
+
classPropertyName: "defaultSize",
|
|
188
|
+
publicName: "defaultSize",
|
|
189
|
+
isSignal: true,
|
|
190
|
+
isRequired: false,
|
|
191
|
+
transformFunction: null
|
|
192
|
+
},
|
|
193
|
+
minSize: {
|
|
194
|
+
classPropertyName: "minSize",
|
|
195
|
+
publicName: "minSize",
|
|
196
|
+
isSignal: true,
|
|
197
|
+
isRequired: false,
|
|
198
|
+
transformFunction: null
|
|
199
|
+
},
|
|
200
|
+
maxSize: {
|
|
201
|
+
classPropertyName: "maxSize",
|
|
202
|
+
publicName: "maxSize",
|
|
203
|
+
isSignal: true,
|
|
204
|
+
isRequired: false,
|
|
205
|
+
transformFunction: null
|
|
206
|
+
},
|
|
207
|
+
userClass: {
|
|
208
|
+
classPropertyName: "userClass",
|
|
209
|
+
publicName: "class",
|
|
210
|
+
isSignal: true,
|
|
211
|
+
isRequired: false,
|
|
212
|
+
transformFunction: null
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
host: {
|
|
216
|
+
attributes: {
|
|
217
|
+
"data-slot": "resizable-panel",
|
|
218
|
+
"data-panel": "true"
|
|
219
|
+
},
|
|
220
|
+
properties: {
|
|
221
|
+
"attr.data-panel-size": "size().toFixed(1)",
|
|
222
|
+
"style.flex": "size() + \" 1 0px\"",
|
|
223
|
+
"style.overflow": "\"hidden\"",
|
|
224
|
+
"attr.class": "userClass()"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
228
|
+
ngImport: i0
|
|
229
|
+
});
|
|
230
|
+
};
|
|
231
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
232
|
+
minVersion: "12.0.0",
|
|
233
|
+
version: "22.2.2",
|
|
234
|
+
ngImport: i0,
|
|
235
|
+
type: UiResizablePanel,
|
|
236
|
+
decorators: [{
|
|
237
|
+
type: Directive,
|
|
238
|
+
args: [{
|
|
239
|
+
selector: "[uiResizablePanel], ui-resizable-panel",
|
|
240
|
+
hostDirectives: [UiElementHost],
|
|
241
|
+
host: {
|
|
242
|
+
"data-slot": "resizable-panel",
|
|
243
|
+
"data-panel": "true",
|
|
244
|
+
"[attr.data-panel-size]": "size().toFixed(1)",
|
|
245
|
+
"[style.flex]": "size() + \" 1 0px\"",
|
|
246
|
+
"[style.overflow]": "\"hidden\"",
|
|
247
|
+
"[attr.class]": "userClass()"
|
|
248
|
+
}
|
|
249
|
+
}]
|
|
250
|
+
}],
|
|
251
|
+
propDecorators: {
|
|
252
|
+
defaultSize: [{
|
|
253
|
+
type: i0.Input,
|
|
254
|
+
args: [{
|
|
255
|
+
isSignal: true,
|
|
256
|
+
alias: "defaultSize",
|
|
257
|
+
required: false
|
|
258
|
+
}]
|
|
259
|
+
}],
|
|
260
|
+
minSize: [{
|
|
261
|
+
type: i0.Input,
|
|
262
|
+
args: [{
|
|
263
|
+
isSignal: true,
|
|
264
|
+
alias: "minSize",
|
|
265
|
+
required: false
|
|
266
|
+
}]
|
|
267
|
+
}],
|
|
268
|
+
maxSize: [{
|
|
269
|
+
type: i0.Input,
|
|
270
|
+
args: [{
|
|
271
|
+
isSignal: true,
|
|
272
|
+
alias: "maxSize",
|
|
273
|
+
required: false
|
|
274
|
+
}]
|
|
275
|
+
}],
|
|
276
|
+
userClass: [{
|
|
277
|
+
type: i0.Input,
|
|
278
|
+
args: [{
|
|
279
|
+
isSignal: true,
|
|
280
|
+
alias: "class",
|
|
281
|
+
required: false
|
|
282
|
+
}]
|
|
283
|
+
}]
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
var UiResizableHandle = class UiResizableHandle {
|
|
287
|
+
group = inject(UiResizablePanelGroup);
|
|
288
|
+
el = inject(ElementRef).nativeElement;
|
|
289
|
+
withHandle = input(false, {
|
|
290
|
+
...ngDevMode ? { debugName: "withHandle" } : /* istanbul ignore next */ {},
|
|
291
|
+
transform: booleanAttribute
|
|
292
|
+
});
|
|
293
|
+
keyboardStep = input(10, {
|
|
294
|
+
...ngDevMode ? { debugName: "keyboardStep" } : /* istanbul ignore next */ {},
|
|
295
|
+
transform: numberAttribute
|
|
296
|
+
});
|
|
297
|
+
userClass = input("", {
|
|
298
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
299
|
+
alias: "class"
|
|
300
|
+
});
|
|
301
|
+
hover = signal(false, ...ngDevMode ? [{ debugName: "hover" }] : /* istanbul ignore next */ []);
|
|
302
|
+
dragging = signal(false, ...ngDevMode ? [{ debugName: "dragging" }] : /* istanbul ignore next */ []);
|
|
303
|
+
state = computed(() => this.dragging() ? "drag" : this.hover() ? "hover" : "inactive", ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
304
|
+
classes = computed(() => cn(resizableHandleClass, this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
305
|
+
index() {
|
|
306
|
+
return Array.from(this.group.el.querySelectorAll(":scope > [data-slot=resizable-handle]")).indexOf(this.el);
|
|
307
|
+
}
|
|
308
|
+
valueNow() {
|
|
309
|
+
return Math.round(this.group.sizes()[this.index()] ?? 0);
|
|
310
|
+
}
|
|
311
|
+
onPointerDown(e) {
|
|
312
|
+
if (e.button !== 0) return;
|
|
313
|
+
e.preventDefault();
|
|
314
|
+
const horizontal = this.group.direction() === "horizontal";
|
|
315
|
+
const rect = this.group.el.getBoundingClientRect();
|
|
316
|
+
const total = horizontal ? rect.width : rect.height;
|
|
317
|
+
let last = horizontal ? e.clientX : e.clientY;
|
|
318
|
+
const sign = this.group.isRtl() ? -1 : 1;
|
|
319
|
+
const i = this.index();
|
|
320
|
+
this.dragging.set(true);
|
|
321
|
+
this.el.setPointerCapture?.(e.pointerId);
|
|
322
|
+
const move = (ev) => {
|
|
323
|
+
const cur = horizontal ? ev.clientX : ev.clientY;
|
|
324
|
+
this.group.resize(i, sign * (cur - last) * 100 / total);
|
|
325
|
+
last = cur;
|
|
326
|
+
};
|
|
327
|
+
const up = () => {
|
|
328
|
+
this.dragging.set(false);
|
|
329
|
+
this.el.removeEventListener("pointermove", move);
|
|
330
|
+
this.el.removeEventListener("pointerup", up);
|
|
331
|
+
this.el.removeEventListener("pointercancel", up);
|
|
332
|
+
};
|
|
333
|
+
this.el.addEventListener("pointermove", move);
|
|
334
|
+
this.el.addEventListener("pointerup", up);
|
|
335
|
+
this.el.addEventListener("pointercancel", up);
|
|
336
|
+
}
|
|
337
|
+
onKeydown(e) {
|
|
338
|
+
const horizontal = this.group.direction() === "horizontal";
|
|
339
|
+
const step = this.keyboardStep();
|
|
340
|
+
const sign = this.group.isRtl() ? -1 : 1;
|
|
341
|
+
const i = this.index();
|
|
342
|
+
let handled = true;
|
|
343
|
+
switch (e.key) {
|
|
344
|
+
case horizontal ? "ArrowLeft" : "ArrowUp":
|
|
345
|
+
this.group.resize(i, -step * sign);
|
|
346
|
+
break;
|
|
347
|
+
case horizontal ? "ArrowRight" : "ArrowDown":
|
|
348
|
+
this.group.resize(i, step * sign);
|
|
349
|
+
break;
|
|
350
|
+
case "Home":
|
|
351
|
+
this.group.resize(i, -100);
|
|
352
|
+
break;
|
|
353
|
+
case "End":
|
|
354
|
+
this.group.resize(i, 100);
|
|
355
|
+
break;
|
|
356
|
+
default: handled = false;
|
|
357
|
+
}
|
|
358
|
+
if (handled) e.preventDefault();
|
|
359
|
+
}
|
|
360
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
361
|
+
minVersion: "12.0.0",
|
|
362
|
+
version: "22.2.2",
|
|
363
|
+
ngImport: i0,
|
|
364
|
+
type: UiResizableHandle,
|
|
365
|
+
deps: [],
|
|
366
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
367
|
+
});
|
|
368
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
369
|
+
minVersion: "17.0.0",
|
|
370
|
+
version: "22.2.2",
|
|
371
|
+
type: UiResizableHandle,
|
|
372
|
+
isStandalone: true,
|
|
373
|
+
selector: "[uiResizableHandle], ui-resizable-handle",
|
|
374
|
+
inputs: {
|
|
375
|
+
withHandle: {
|
|
376
|
+
classPropertyName: "withHandle",
|
|
377
|
+
publicName: "withHandle",
|
|
378
|
+
isSignal: true,
|
|
379
|
+
isRequired: false,
|
|
380
|
+
transformFunction: null
|
|
381
|
+
},
|
|
382
|
+
keyboardStep: {
|
|
383
|
+
classPropertyName: "keyboardStep",
|
|
384
|
+
publicName: "keyboardStep",
|
|
385
|
+
isSignal: true,
|
|
386
|
+
isRequired: false,
|
|
387
|
+
transformFunction: null
|
|
388
|
+
},
|
|
389
|
+
userClass: {
|
|
390
|
+
classPropertyName: "userClass",
|
|
391
|
+
publicName: "class",
|
|
392
|
+
isSignal: true,
|
|
393
|
+
isRequired: false,
|
|
394
|
+
transformFunction: null
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
host: {
|
|
398
|
+
attributes: {
|
|
399
|
+
"role": "separator",
|
|
400
|
+
"tabindex": "0",
|
|
401
|
+
"data-slot": "resizable-handle"
|
|
402
|
+
},
|
|
403
|
+
listeners: {
|
|
404
|
+
"pointerdown": "onPointerDown($event)",
|
|
405
|
+
"pointerenter": "hover.set(true)",
|
|
406
|
+
"pointerleave": "hover.set(false)",
|
|
407
|
+
"keydown": "onKeydown($event)"
|
|
408
|
+
},
|
|
409
|
+
properties: {
|
|
410
|
+
"attr.aria-orientation": "group.direction() === \"horizontal\" ? \"vertical\" : \"horizontal\"",
|
|
411
|
+
"attr.aria-valuemin": "0",
|
|
412
|
+
"attr.aria-valuemax": "100",
|
|
413
|
+
"attr.aria-valuenow": "valueNow()",
|
|
414
|
+
"attr.data-separator": "state()",
|
|
415
|
+
"attr.data-panel-group-direction": "group.direction()",
|
|
416
|
+
"attr.class": "classes()"
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
420
|
+
ngImport: i0,
|
|
421
|
+
template: `
|
|
422
|
+
@if (withHandle()) {
|
|
423
|
+
<div class="z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border">
|
|
424
|
+
<svg uiIcon="grip-vertical" class="size-2.5"></svg>
|
|
425
|
+
</div>
|
|
426
|
+
}
|
|
427
|
+
`,
|
|
428
|
+
isInline: true,
|
|
429
|
+
dependencies: [{
|
|
430
|
+
kind: "directive",
|
|
431
|
+
type: UiIconSvg,
|
|
432
|
+
selector: "svg[uiIcon]",
|
|
433
|
+
inputs: [
|
|
434
|
+
"uiIcon",
|
|
435
|
+
"icon",
|
|
436
|
+
"size",
|
|
437
|
+
"strokeWidth",
|
|
438
|
+
"absoluteStrokeWidth",
|
|
439
|
+
"color",
|
|
440
|
+
"label",
|
|
441
|
+
"class"
|
|
442
|
+
]
|
|
443
|
+
}],
|
|
444
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
445
|
+
});
|
|
446
|
+
};
|
|
447
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
448
|
+
minVersion: "12.0.0",
|
|
449
|
+
version: "22.2.2",
|
|
450
|
+
ngImport: i0,
|
|
451
|
+
type: UiResizableHandle,
|
|
452
|
+
decorators: [{
|
|
453
|
+
type: Component,
|
|
454
|
+
args: [{
|
|
455
|
+
selector: "[uiResizableHandle], ui-resizable-handle",
|
|
456
|
+
hostDirectives: [UiElementHost],
|
|
457
|
+
imports: [UiIconSvg],
|
|
458
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
459
|
+
host: {
|
|
460
|
+
role: "separator",
|
|
461
|
+
tabindex: "0",
|
|
462
|
+
"data-slot": "resizable-handle",
|
|
463
|
+
"[attr.aria-orientation]": "group.direction() === \"horizontal\" ? \"vertical\" : \"horizontal\"",
|
|
464
|
+
"[attr.aria-valuemin]": "0",
|
|
465
|
+
"[attr.aria-valuemax]": "100",
|
|
466
|
+
"[attr.aria-valuenow]": "valueNow()",
|
|
467
|
+
"[attr.data-separator]": "state()",
|
|
468
|
+
"[attr.data-panel-group-direction]": "group.direction()",
|
|
469
|
+
"[attr.class]": "classes()",
|
|
470
|
+
"(pointerdown)": "onPointerDown($event)",
|
|
471
|
+
"(pointerenter)": "hover.set(true)",
|
|
472
|
+
"(pointerleave)": "hover.set(false)",
|
|
473
|
+
"(keydown)": "onKeydown($event)"
|
|
474
|
+
},
|
|
475
|
+
template: `
|
|
476
|
+
@if (withHandle()) {
|
|
477
|
+
<div class="z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border">
|
|
478
|
+
<svg uiIcon="grip-vertical" class="size-2.5"></svg>
|
|
479
|
+
</div>
|
|
480
|
+
}
|
|
481
|
+
`
|
|
482
|
+
}]
|
|
483
|
+
}],
|
|
484
|
+
propDecorators: {
|
|
485
|
+
withHandle: [{
|
|
486
|
+
type: i0.Input,
|
|
487
|
+
args: [{
|
|
488
|
+
isSignal: true,
|
|
489
|
+
alias: "withHandle",
|
|
490
|
+
required: false
|
|
491
|
+
}]
|
|
492
|
+
}],
|
|
493
|
+
keyboardStep: [{
|
|
494
|
+
type: i0.Input,
|
|
495
|
+
args: [{
|
|
496
|
+
isSignal: true,
|
|
497
|
+
alias: "keyboardStep",
|
|
498
|
+
required: false
|
|
499
|
+
}]
|
|
500
|
+
}],
|
|
501
|
+
userClass: [{
|
|
502
|
+
type: i0.Input,
|
|
503
|
+
args: [{
|
|
504
|
+
isSignal: true,
|
|
505
|
+
alias: "class",
|
|
506
|
+
required: false
|
|
507
|
+
}]
|
|
508
|
+
}]
|
|
509
|
+
}
|
|
510
|
+
});
|
|
511
|
+
const UI_RESIZABLE = [
|
|
512
|
+
UiResizablePanelGroup,
|
|
513
|
+
UiResizablePanel,
|
|
514
|
+
UiResizableHandle
|
|
515
|
+
];
|
|
516
|
+
export { UI_RESIZABLE, UI_RESIZABLE_GENERATED, UiResizableHandle, UiResizablePanel, UiResizablePanelGroup, resizableHandleClass, resizablePanelGroupClass };
|
|
517
|
+
|
|
518
|
+
//# sourceMappingURL=loomui-ng-ui-resizable.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loomui-ng-ui-resizable.mjs","names":[],"sources":["../../../libs/ui/resizable/resizable.ts","../../../libs/ui/resizable/resizable.manual.ts"],"sourcesContent":["// GENERATED by tools/gen-ui.mjs from docs/evidence/slots/resizable.json.\n// Change tools/ui-specs.mjs and regenerate; hand-written parts live in ./resizable.manual.ts.\nimport { Directive, computed, input } from '@angular/core';\nimport { cn } from '@loomui-ng/ui/utils';\n\nexport const resizablePanelGroupClass =\n 'flex h-full w-full aria-[orientation=vertical]:flex-col';\n\nexport const resizableHandleClass =\n 'relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:start-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90 after:start-1/2 rtl:after:translate-x-1/2 rtl:aria-[orientation=horizontal]:after:-translate-x-0';\n\nexport const UI_RESIZABLE_GENERATED = [] as const;\n","import { Directionality } from '@angular/cdk/bidi';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n numberAttribute,\n signal,\n untracked,\n} from '@angular/core';\nimport { cn } from '@loomui-ng/ui/utils';\nimport { resizableHandleClass, resizablePanelGroupClass } from './resizable';\nimport { UiIconSvg } from '@loomui-ng/ui/icon';\nimport { UiElementHost } from '@loomui-ng/ui/utils';\n\n/**\n * <div uiResizablePanelGroup direction=\"horizontal\" class=\"max-w-sm rounded-lg border\">\n * <div uiResizablePanel [defaultSize]=\"50\">One</div>\n * <div uiResizableHandle withHandle></div>\n * <div uiResizablePanel [defaultSize]=\"50\">Two</div>\n * </div>\n * Observed (react-resizable-panels): group `data-group`, panel `data-panel`, handle role=\"separator\" tabindex=0\n * aria-valuemin/max/now, aria-orientation (perpendicular to the group), data-separator inactive|hover|active.\n * Own implementation (the original wraps a React library): pointer drag + keyboard (arrows ±step, Home/End).\n */\n@Directive({\n selector: '[uiResizablePanelGroup], ui-resizable-panel-group', hostDirectives: [UiElementHost],\n exportAs: 'uiResizablePanelGroup',\n host: {\n 'data-slot': 'resizable-panel-group',\n 'data-group': 'true',\n '[attr.aria-orientation]': 'direction()',\n '[attr.data-panel-group-direction]': 'direction()',\n '[attr.class]': 'classes()',\n },\n})\nexport class UiResizablePanelGroup {\n readonly direction = input<'horizontal' | 'vertical'>('horizontal');\n readonly userClass = input<string>('', { alias: 'class' });\n readonly dir = inject(Directionality);\n readonly el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n readonly panels = contentChildren(forwardRef(() => UiResizablePanel), { descendants: false });\n readonly sizes = signal<number[]>([]);\n protected readonly classes = computed(() => cn(resizablePanelGroupClass, this.userClass()));\n\n constructor() {\n effect(() => {\n const panels = this.panels();\n untracked(() => {\n if (this.sizes().length === panels.length) return;\n const fixed = panels.map((p) => p.defaultSize());\n const set = fixed.filter((s): s is number => s !== undefined);\n const rest = 100 - set.reduce((a, b) => a + b, 0);\n const unset = fixed.length - set.length;\n this.sizes.set(fixed.map((s) => s ?? (unset ? rest / unset : 0)));\n });\n });\n }\n\n /** Move the boundary after panel `i` by `delta` percent (positive grows panel i). */\n resize(i: number, delta: number): void {\n const panels = this.panels();\n const sizes = [...this.sizes()];\n const a = panels[i];\n const b = panels[i + 1];\n if (!a || !b) return;\n let d = delta;\n d = Math.min(d, a.maxSize() - sizes[i], sizes[i + 1] - b.minSize());\n d = Math.max(d, a.minSize() - sizes[i], sizes[i + 1] - b.maxSize());\n sizes[i] += d;\n sizes[i + 1] -= d;\n this.sizes.set(sizes);\n }\n\n isRtl(): boolean {\n return this.dir.value === 'rtl' && this.direction() === 'horizontal';\n }\n}\n\n@Directive({\n selector: '[uiResizablePanel], ui-resizable-panel', hostDirectives: [UiElementHost],\n host: {\n 'data-slot': 'resizable-panel',\n 'data-panel': 'true',\n '[attr.data-panel-size]': 'size().toFixed(1)',\n '[style.flex]': 'size() + \" 1 0px\"',\n '[style.overflow]': '\"hidden\"',\n '[attr.class]': 'userClass()',\n },\n})\nexport class UiResizablePanel {\n private readonly group = inject(UiResizablePanelGroup);\n readonly defaultSize = input<number | undefined, unknown>(undefined, {\n transform: (v: unknown) => (v === undefined || v === null || v === '' ? undefined : numberAttribute(v)),\n });\n readonly minSize = input(0, { transform: numberAttribute });\n readonly maxSize = input(100, { transform: numberAttribute });\n readonly userClass = input<string>('', { alias: 'class' });\n readonly index = computed(() => this.group.panels().indexOf(this));\n readonly size = computed(() => this.group.sizes()[this.index()] ?? this.defaultSize() ?? 0);\n}\n\n@Component({\n selector: '[uiResizableHandle], ui-resizable-handle', hostDirectives: [UiElementHost],\n imports: [UiIconSvg],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n role: 'separator',\n tabindex: '0',\n 'data-slot': 'resizable-handle',\n '[attr.aria-orientation]': 'group.direction() === \"horizontal\" ? \"vertical\" : \"horizontal\"',\n '[attr.aria-valuemin]': '0',\n '[attr.aria-valuemax]': '100',\n '[attr.aria-valuenow]': 'valueNow()',\n '[attr.data-separator]': 'state()',\n '[attr.data-panel-group-direction]': 'group.direction()',\n '[attr.class]': 'classes()',\n '(pointerdown)': 'onPointerDown($event)',\n '(pointerenter)': 'hover.set(true)',\n '(pointerleave)': 'hover.set(false)',\n '(keydown)': 'onKeydown($event)',\n },\n template: `\n @if (withHandle()) {\n <div class=\"z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border\">\n <svg uiIcon=\"grip-vertical\" class=\"size-2.5\"></svg>\n </div>\n }\n `,\n})\nexport class UiResizableHandle {\n protected readonly group = inject(UiResizablePanelGroup);\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n readonly withHandle = input(false, { transform: booleanAttribute });\n readonly keyboardStep = input(10, { transform: numberAttribute });\n readonly userClass = input<string>('', { alias: 'class' });\n protected readonly hover = signal(false);\n private readonly dragging = signal(false);\n protected readonly state = computed(() => (this.dragging() ? 'drag' : this.hover() ? 'hover' : 'inactive'));\n protected readonly classes = computed(() => cn(resizableHandleClass, this.userClass()));\n\n /** Handle i sits between panel i and i+1: index = number of handles before it. */\n private index(): number {\n const handles = Array.from(this.group.el.querySelectorAll(':scope > [data-slot=resizable-handle]'));\n return handles.indexOf(this.el);\n }\n protected valueNow(): number {\n return Math.round(this.group.sizes()[this.index()] ?? 0);\n }\n\n protected onPointerDown(e: PointerEvent): void {\n if (e.button !== 0) return;\n e.preventDefault();\n const horizontal = this.group.direction() === 'horizontal';\n const rect = this.group.el.getBoundingClientRect();\n const total = horizontal ? rect.width : rect.height;\n let last = horizontal ? e.clientX : e.clientY;\n const sign = this.group.isRtl() ? -1 : 1;\n const i = this.index();\n this.dragging.set(true);\n this.el.setPointerCapture?.(e.pointerId);\n const move = (ev: PointerEvent) => {\n const cur = horizontal ? ev.clientX : ev.clientY;\n this.group.resize(i, (sign * (cur - last) * 100) / total);\n last = cur;\n };\n const up = () => {\n this.dragging.set(false);\n this.el.removeEventListener('pointermove', move);\n this.el.removeEventListener('pointerup', up);\n this.el.removeEventListener('pointercancel', up);\n };\n this.el.addEventListener('pointermove', move);\n this.el.addEventListener('pointerup', up);\n this.el.addEventListener('pointercancel', up);\n }\n\n protected onKeydown(e: KeyboardEvent): void {\n const horizontal = this.group.direction() === 'horizontal';\n const step = this.keyboardStep();\n const sign = this.group.isRtl() ? -1 : 1;\n const i = this.index();\n let handled = true;\n switch (e.key) {\n case horizontal ? 'ArrowLeft' : 'ArrowUp':\n this.group.resize(i, -step * sign);\n break;\n case horizontal ? 'ArrowRight' : 'ArrowDown':\n this.group.resize(i, step * sign);\n break;\n case 'Home':\n this.group.resize(i, -100);\n break;\n case 'End':\n this.group.resize(i, 100);\n break;\n default:\n handled = false;\n }\n if (handled) e.preventDefault();\n }\n}\n\nexport const UI_RESIZABLE = [UiResizablePanelGroup, UiResizablePanel, UiResizableHandle] as const;\n"],"mappings":";;;;;;AAKA,MAAa,2BACX;AAEF,MAAa,uBACX;AAEF,MAAa,yBAAyB,CAAA;ACgCtC,IAAa,wBAAb,MAAa,sBAAqB;CACvB,YAAY,MAAiC,cAAa,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAC1D,YAAY,MAAc,IAAE;EAAA,GAAA,YAAA,EAAA,WAAA,YAAA,+BAAA,CAAA;EAAI,OAAO;CAAO,CAAA;CAC9C,MAAM,OAAO,cAAc;CAC3B,KAAK,OAAgC,UAAU,CAAC,CAAC;CACjD,SAAS,gBAAgB,iBAAiB,gBAAgB,GAAC;EAAA,GAAA,YAAA,EAAA,WAAA,SAAA,+BAAA,CAAA;EAAI,aAAa;CAAK,CAAA;CACjF,QAAQ,OAAiB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAClB,UAAU,eAAe,GAAG,0BAA0B,KAAK,UAAS,CAAE,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAE3F,cAAA;EACE,aAAY;GACV,MAAM,SAAS,KAAK,OAAM;GAC1B,gBAAe;IACb,IAAI,KAAK,MAAK,CAAE,CAAC,WAAW,OAAO,QAAQ;IAC3C,MAAM,QAAQ,OAAO,KAAK,MAAM,EAAE,YAAW,CAAE;IAC/C,MAAM,MAAM,MAAM,QAAQ,MAAmB,MAAM,MAAS;IAC5D,MAAM,OAAO,MAAM,IAAI,QAAQ,GAAG,MAAM,IAAI,GAAG,CAAC;IAChD,MAAM,QAAQ,MAAM,SAAS,IAAI;IACjC,KAAK,MAAM,IAAI,MAAM,KAA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AA,CAAA;EA5B7B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GAA4C,gBAAgB,CAAC,aAAa;GACpF,SAAS,CAAC,SAAS;GACnB,iBAAiB,wBAAwB;GACzC,MAAM;IACJ,MAAM;IACN,UAAU;IACV,aAAa;IACb,2BAA2B;IAC3B,wBAAwB;IACxB,wBAAwB;IACxB,wBAAwB;IACxB,yBAAyB;IACzB,qCAAqC;IACrC,gBAAgB;IAChB,iBAAiB;IACjB,kBAAkB;IAClB,kBAAkB;IAClB,aAAa;GACd;GACD,UAAU;;;;;;;EAOX,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0ED,MAAa,eAAe;CAAC;CAAuB;CAAkB;AAAiB"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Directive, computed, input } from "@angular/core";
|
|
3
|
+
import * as i1 from "@loomui-ng/ui/utils";
|
|
4
|
+
import { UiElementHost, cn } from "@loomui-ng/ui/utils";
|
|
5
|
+
const scrollAreaClass = "relative w-96 whitespace-nowrap";
|
|
6
|
+
const scrollAreaViewportClass = "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1";
|
|
7
|
+
const UI_SCROLL_AREA_GENERATED = [];
|
|
8
|
+
var UiScrollArea = class UiScrollArea {
|
|
9
|
+
userClass = input("", {
|
|
10
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
11
|
+
alias: "class"
|
|
12
|
+
});
|
|
13
|
+
classes = computed(() => cn(scrollAreaClass, this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
14
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
15
|
+
minVersion: "12.0.0",
|
|
16
|
+
version: "22.2.2",
|
|
17
|
+
ngImport: i0,
|
|
18
|
+
type: UiScrollArea,
|
|
19
|
+
deps: [],
|
|
20
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
21
|
+
});
|
|
22
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
23
|
+
minVersion: "17.1.0",
|
|
24
|
+
version: "22.2.2",
|
|
25
|
+
type: UiScrollArea,
|
|
26
|
+
isStandalone: true,
|
|
27
|
+
selector: "[uiScrollArea], ui-scroll-area",
|
|
28
|
+
inputs: { userClass: {
|
|
29
|
+
classPropertyName: "userClass",
|
|
30
|
+
publicName: "class",
|
|
31
|
+
isSignal: true,
|
|
32
|
+
isRequired: false,
|
|
33
|
+
transformFunction: null
|
|
34
|
+
} },
|
|
35
|
+
host: {
|
|
36
|
+
attributes: { "data-slot": "scroll-area" },
|
|
37
|
+
properties: { "attr.class": "classes()" }
|
|
38
|
+
},
|
|
39
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
40
|
+
ngImport: i0
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
44
|
+
minVersion: "12.0.0",
|
|
45
|
+
version: "22.2.2",
|
|
46
|
+
ngImport: i0,
|
|
47
|
+
type: UiScrollArea,
|
|
48
|
+
decorators: [{
|
|
49
|
+
type: Directive,
|
|
50
|
+
args: [{
|
|
51
|
+
selector: "[uiScrollArea], ui-scroll-area",
|
|
52
|
+
hostDirectives: [UiElementHost],
|
|
53
|
+
host: {
|
|
54
|
+
"data-slot": "scroll-area",
|
|
55
|
+
"[attr.class]": "classes()"
|
|
56
|
+
}
|
|
57
|
+
}]
|
|
58
|
+
}],
|
|
59
|
+
propDecorators: { userClass: [{
|
|
60
|
+
type: i0.Input,
|
|
61
|
+
args: [{
|
|
62
|
+
isSignal: true,
|
|
63
|
+
alias: "class",
|
|
64
|
+
required: false
|
|
65
|
+
}]
|
|
66
|
+
}] }
|
|
67
|
+
});
|
|
68
|
+
var UiScrollAreaViewport = class UiScrollAreaViewport {
|
|
69
|
+
userClass = input("", {
|
|
70
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
71
|
+
alias: "class"
|
|
72
|
+
});
|
|
73
|
+
classes = computed(() => cn(scrollAreaViewportClass, "overflow-auto [scrollbar-color:var(--border)_transparent] [scrollbar-width:thin]", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
74
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
75
|
+
minVersion: "12.0.0",
|
|
76
|
+
version: "22.2.2",
|
|
77
|
+
ngImport: i0,
|
|
78
|
+
type: UiScrollAreaViewport,
|
|
79
|
+
deps: [],
|
|
80
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
81
|
+
});
|
|
82
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
83
|
+
minVersion: "17.1.0",
|
|
84
|
+
version: "22.2.2",
|
|
85
|
+
type: UiScrollAreaViewport,
|
|
86
|
+
isStandalone: true,
|
|
87
|
+
selector: "[uiScrollAreaViewport], ui-scroll-area-viewport",
|
|
88
|
+
inputs: { userClass: {
|
|
89
|
+
classPropertyName: "userClass",
|
|
90
|
+
publicName: "class",
|
|
91
|
+
isSignal: true,
|
|
92
|
+
isRequired: false,
|
|
93
|
+
transformFunction: null
|
|
94
|
+
} },
|
|
95
|
+
host: {
|
|
96
|
+
attributes: {
|
|
97
|
+
"data-slot": "scroll-area-viewport",
|
|
98
|
+
"tabindex": "0"
|
|
99
|
+
},
|
|
100
|
+
properties: { "attr.class": "classes()" }
|
|
101
|
+
},
|
|
102
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
103
|
+
ngImport: i0
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
107
|
+
minVersion: "12.0.0",
|
|
108
|
+
version: "22.2.2",
|
|
109
|
+
ngImport: i0,
|
|
110
|
+
type: UiScrollAreaViewport,
|
|
111
|
+
decorators: [{
|
|
112
|
+
type: Directive,
|
|
113
|
+
args: [{
|
|
114
|
+
selector: "[uiScrollAreaViewport], ui-scroll-area-viewport",
|
|
115
|
+
hostDirectives: [UiElementHost],
|
|
116
|
+
host: {
|
|
117
|
+
"data-slot": "scroll-area-viewport",
|
|
118
|
+
tabindex: "0",
|
|
119
|
+
"[attr.class]": "classes()"
|
|
120
|
+
}
|
|
121
|
+
}]
|
|
122
|
+
}],
|
|
123
|
+
propDecorators: { userClass: [{
|
|
124
|
+
type: i0.Input,
|
|
125
|
+
args: [{
|
|
126
|
+
isSignal: true,
|
|
127
|
+
alias: "class",
|
|
128
|
+
required: false
|
|
129
|
+
}]
|
|
130
|
+
}] }
|
|
131
|
+
});
|
|
132
|
+
const UI_SCROLL_AREA = [UiScrollArea, UiScrollAreaViewport];
|
|
133
|
+
export { UI_SCROLL_AREA, UI_SCROLL_AREA_GENERATED, UiScrollArea, UiScrollAreaViewport, scrollAreaClass, scrollAreaViewportClass };
|
|
134
|
+
|
|
135
|
+
//# sourceMappingURL=loomui-ng-ui-scroll-area.mjs.map
|