@vadem/ui 0.0.0-stage → 0.0.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.
- package/LICENSE-lucide.txt +43 -0
- package/README.md +19 -2
- package/fesm2022/vadem-ui-accordion.mjs +139 -0
- package/fesm2022/vadem-ui-accordion.mjs.map +1 -0
- package/fesm2022/vadem-ui-active-filters.mjs +355 -0
- package/fesm2022/vadem-ui-active-filters.mjs.map +1 -0
- package/fesm2022/vadem-ui-alert-dialog.mjs +433 -0
- package/fesm2022/vadem-ui-alert-dialog.mjs.map +1 -0
- package/fesm2022/vadem-ui-alert.mjs +266 -0
- package/fesm2022/vadem-ui-alert.mjs.map +1 -0
- package/fesm2022/vadem-ui-autocomplete.mjs +715 -0
- package/fesm2022/vadem-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/vadem-ui-avatar.mjs +219 -0
- package/fesm2022/vadem-ui-avatar.mjs.map +1 -0
- package/fesm2022/vadem-ui-badge.mjs +86 -0
- package/fesm2022/vadem-ui-badge.mjs.map +1 -0
- package/fesm2022/vadem-ui-breadcrumbs.mjs +61 -0
- package/fesm2022/vadem-ui-breadcrumbs.mjs.map +1 -0
- package/fesm2022/vadem-ui-button.mjs +220 -0
- package/fesm2022/vadem-ui-button.mjs.map +1 -0
- package/fesm2022/vadem-ui-calendar.mjs +1314 -0
- package/fesm2022/vadem-ui-calendar.mjs.map +1 -0
- package/fesm2022/vadem-ui-card.mjs +271 -0
- package/fesm2022/vadem-ui-card.mjs.map +1 -0
- package/fesm2022/vadem-ui-character-count.mjs +269 -0
- package/fesm2022/vadem-ui-character-count.mjs.map +1 -0
- package/fesm2022/vadem-ui-chart.mjs +1984 -0
- package/fesm2022/vadem-ui-chart.mjs.map +1 -0
- package/fesm2022/vadem-ui-checkbox.mjs +67 -0
- package/fesm2022/vadem-ui-checkbox.mjs.map +1 -0
- package/fesm2022/vadem-ui-color-picker.mjs +815 -0
- package/fesm2022/vadem-ui-color-picker.mjs.map +1 -0
- package/fesm2022/vadem-ui-command.mjs +735 -0
- package/fesm2022/vadem-ui-command.mjs.map +1 -0
- package/fesm2022/vadem-ui-copy-button.mjs +375 -0
- package/fesm2022/vadem-ui-copy-button.mjs.map +1 -0
- package/fesm2022/vadem-ui-date-range-picker.mjs +1011 -0
- package/fesm2022/vadem-ui-date-range-picker.mjs.map +1 -0
- package/fesm2022/vadem-ui-description-list.mjs +59 -0
- package/fesm2022/vadem-ui-description-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-dialog.mjs +587 -0
- package/fesm2022/vadem-ui-dialog.mjs.map +1 -0
- package/fesm2022/vadem-ui-dropzone.mjs +176 -0
- package/fesm2022/vadem-ui-dropzone.mjs.map +1 -0
- package/fesm2022/vadem-ui-editable-text.mjs +641 -0
- package/fesm2022/vadem-ui-editable-text.mjs.map +1 -0
- package/fesm2022/vadem-ui-empty-state.mjs +175 -0
- package/fesm2022/vadem-ui-empty-state.mjs.map +1 -0
- package/fesm2022/vadem-ui-expandable-text.mjs +244 -0
- package/fesm2022/vadem-ui-expandable-text.mjs.map +1 -0
- package/fesm2022/vadem-ui-field.mjs +583 -0
- package/fesm2022/vadem-ui-field.mjs.map +1 -0
- package/fesm2022/vadem-ui-file-preview.mjs +532 -0
- package/fesm2022/vadem-ui-file-preview.mjs.map +1 -0
- package/fesm2022/vadem-ui-file-size.mjs +83 -0
- package/fesm2022/vadem-ui-file-size.mjs.map +1 -0
- package/fesm2022/vadem-ui-form-error-summary.mjs +201 -0
- package/fesm2022/vadem-ui-form-error-summary.mjs.map +1 -0
- package/fesm2022/vadem-ui-icon.mjs +303 -0
- package/fesm2022/vadem-ui-icon.mjs.map +1 -0
- package/fesm2022/vadem-ui-input.mjs +120 -0
- package/fesm2022/vadem-ui-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-kbd.mjs +286 -0
- package/fesm2022/vadem-ui-kbd.mjs.map +1 -0
- package/fesm2022/vadem-ui-keyboard.mjs +105 -0
- package/fesm2022/vadem-ui-keyboard.mjs.map +1 -0
- package/fesm2022/vadem-ui-locale.mjs +443 -0
- package/fesm2022/vadem-ui-locale.mjs.map +1 -0
- package/fesm2022/vadem-ui-menu.mjs +637 -0
- package/fesm2022/vadem-ui-menu.mjs.map +1 -0
- package/fesm2022/vadem-ui-navigation-list.mjs +130 -0
- package/fesm2022/vadem-ui-navigation-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-number-input.mjs +264 -0
- package/fesm2022/vadem-ui-number-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-otp-input.mjs +86 -0
- package/fesm2022/vadem-ui-otp-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-pagination.mjs +353 -0
- package/fesm2022/vadem-ui-pagination.mjs.map +1 -0
- package/fesm2022/vadem-ui-password-input.mjs +213 -0
- package/fesm2022/vadem-ui-password-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-popover.mjs +178 -0
- package/fesm2022/vadem-ui-popover.mjs.map +1 -0
- package/fesm2022/vadem-ui-progress.mjs +331 -0
- package/fesm2022/vadem-ui-progress.mjs.map +1 -0
- package/fesm2022/vadem-ui-radio.mjs +39 -0
- package/fesm2022/vadem-ui-radio.mjs.map +1 -0
- package/fesm2022/vadem-ui-range-slider.mjs +561 -0
- package/fesm2022/vadem-ui-range-slider.mjs.map +1 -0
- package/fesm2022/vadem-ui-rating.mjs +404 -0
- package/fesm2022/vadem-ui-rating.mjs.map +1 -0
- package/fesm2022/vadem-ui-relative-time.mjs +217 -0
- package/fesm2022/vadem-ui-relative-time.mjs.map +1 -0
- package/fesm2022/vadem-ui-reorder-list.mjs +601 -0
- package/fesm2022/vadem-ui-reorder-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-scroll-area.mjs +65 -0
- package/fesm2022/vadem-ui-scroll-area.mjs.map +1 -0
- package/fesm2022/vadem-ui-search-input.mjs +307 -0
- package/fesm2022/vadem-ui-search-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-segmented.mjs +297 -0
- package/fesm2022/vadem-ui-segmented.mjs.map +1 -0
- package/fesm2022/vadem-ui-select.mjs +1462 -0
- package/fesm2022/vadem-ui-select.mjs.map +1 -0
- package/fesm2022/vadem-ui-sidebar.mjs +493 -0
- package/fesm2022/vadem-ui-sidebar.mjs.map +1 -0
- package/fesm2022/vadem-ui-skeleton.mjs +106 -0
- package/fesm2022/vadem-ui-skeleton.mjs.map +1 -0
- package/fesm2022/vadem-ui-slider.mjs +60 -0
- package/fesm2022/vadem-ui-slider.mjs.map +1 -0
- package/fesm2022/vadem-ui-splitter.mjs +438 -0
- package/fesm2022/vadem-ui-splitter.mjs.map +1 -0
- package/fesm2022/vadem-ui-stat.mjs +369 -0
- package/fesm2022/vadem-ui-stat.mjs.map +1 -0
- package/fesm2022/vadem-ui-stepper.mjs +483 -0
- package/fesm2022/vadem-ui-stepper.mjs.map +1 -0
- package/fesm2022/vadem-ui-switch.mjs +45 -0
- package/fesm2022/vadem-ui-switch.mjs.map +1 -0
- package/fesm2022/vadem-ui-table.mjs +593 -0
- package/fesm2022/vadem-ui-table.mjs.map +1 -0
- package/fesm2022/vadem-ui-tabs.mjs +405 -0
- package/fesm2022/vadem-ui-tabs.mjs.map +1 -0
- package/fesm2022/vadem-ui-tag-input.mjs +685 -0
- package/fesm2022/vadem-ui-tag-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-text-highlight.mjs +126 -0
- package/fesm2022/vadem-ui-text-highlight.mjs.map +1 -0
- package/fesm2022/vadem-ui-time-input.mjs +430 -0
- package/fesm2022/vadem-ui-time-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-timeline.mjs +313 -0
- package/fesm2022/vadem-ui-timeline.mjs.map +1 -0
- package/fesm2022/vadem-ui-toast.mjs +397 -0
- package/fesm2022/vadem-ui-toast.mjs.map +1 -0
- package/fesm2022/vadem-ui-toolbar.mjs +396 -0
- package/fesm2022/vadem-ui-toolbar.mjs.map +1 -0
- package/fesm2022/vadem-ui-tooltip.mjs +218 -0
- package/fesm2022/vadem-ui-tooltip.mjs.map +1 -0
- package/fesm2022/vadem-ui-tree.mjs +551 -0
- package/fesm2022/vadem-ui-tree.mjs.map +1 -0
- package/fesm2022/vadem-ui-upload-list.mjs +408 -0
- package/fesm2022/vadem-ui-upload-list.mjs.map +1 -0
- package/fesm2022/vadem-ui.mjs +4 -0
- package/fesm2022/vadem-ui.mjs.map +1 -0
- package/fonts/jetbrains-mono/OFL.txt +93 -0
- package/fonts/jetbrains-mono/jetbrains-mono-cyrillic.woff2 +0 -0
- package/fonts/jetbrains-mono/jetbrains-mono-latin.woff2 +0 -0
- package/fonts/manrope/OFL.txt +93 -0
- package/fonts/manrope/manrope-cyrillic.woff2 +0 -0
- package/fonts/manrope/manrope-latin.woff2 +0 -0
- package/package.json +306 -3
- package/styles/base.css +160 -0
- package/styles/components/accordion.css +130 -0
- package/styles/components/active-filters.css +42 -0
- package/styles/components/alert-dialog.css +34 -0
- package/styles/components/alert.css +159 -0
- package/styles/components/autocomplete.css +97 -0
- package/styles/components/avatar.css +90 -0
- package/styles/components/badge.css +91 -0
- package/styles/components/breadcrumbs.css +94 -0
- package/styles/components/button.css +174 -0
- package/styles/components/calendar.css +186 -0
- package/styles/components/card.css +206 -0
- package/styles/components/character-count.css +41 -0
- package/styles/components/chart.css +308 -0
- package/styles/components/checkbox.css +115 -0
- package/styles/components/color-picker.css +158 -0
- package/styles/components/command.css +175 -0
- package/styles/components/copy-button.css +58 -0
- package/styles/components/date-range-picker.css +153 -0
- package/styles/components/description-list.css +69 -0
- package/styles/components/dialog.css +334 -0
- package/styles/components/dropzone.css +89 -0
- package/styles/components/editable-text.css +58 -0
- package/styles/components/empty-state.css +72 -0
- package/styles/components/expandable-text.css +24 -0
- package/styles/components/field.css +148 -0
- package/styles/components/file-preview.css +65 -0
- package/styles/components/form-error-summary.css +71 -0
- package/styles/components/icon.css +38 -0
- package/styles/components/index.css +80 -0
- package/styles/components/input.css +171 -0
- package/styles/components/kbd.css +42 -0
- package/styles/components/menu.css +168 -0
- package/styles/components/multi-select.css +156 -0
- package/styles/components/navigation-list.css +147 -0
- package/styles/components/number-input.css +33 -0
- package/styles/components/otp-input.css +26 -0
- package/styles/components/pagination.css +127 -0
- package/styles/components/password-input.css +20 -0
- package/styles/components/popover.css +93 -0
- package/styles/components/progress-ring.css +112 -0
- package/styles/components/progress.css +162 -0
- package/styles/components/radio.css +117 -0
- package/styles/components/range-slider.css +158 -0
- package/styles/components/rating.css +100 -0
- package/styles/components/reorder-list.css +143 -0
- package/styles/components/scroll-area.css +39 -0
- package/styles/components/search-input.css +25 -0
- package/styles/components/segmented.css +136 -0
- package/styles/components/select.css +257 -0
- package/styles/components/sidebar.css +105 -0
- package/styles/components/skeleton.css +83 -0
- package/styles/components/slider.css +132 -0
- package/styles/components/splitter.css +83 -0
- package/styles/components/stat.css +62 -0
- package/styles/components/stepper.css +236 -0
- package/styles/components/switch.css +107 -0
- package/styles/components/table.css +195 -0
- package/styles/components/tabs.css +198 -0
- package/styles/components/tag-input.css +138 -0
- package/styles/components/text-highlight.css +22 -0
- package/styles/components/time-input.css +96 -0
- package/styles/components/timeline.css +182 -0
- package/styles/components/toast.css +146 -0
- package/styles/components/toolbar.css +72 -0
- package/styles/components/tooltip.css +93 -0
- package/styles/components/tree.css +88 -0
- package/styles/components/upload-list.css +113 -0
- package/styles/fonts.css +67 -0
- package/styles/index.css +14 -0
- package/styles/reset.css +57 -0
- package/styles/tokens/primitives.css +364 -0
- package/styles/tokens/semantic.css +233 -0
- package/types/vadem-ui-accordion.d.ts +43 -0
- package/types/vadem-ui-active-filters.d.ts +73 -0
- package/types/vadem-ui-alert-dialog.d.ts +87 -0
- package/types/vadem-ui-alert.d.ts +64 -0
- package/types/vadem-ui-autocomplete.d.ts +156 -0
- package/types/vadem-ui-avatar.d.ts +59 -0
- package/types/vadem-ui-badge.d.ts +25 -0
- package/types/vadem-ui-breadcrumbs.d.ts +22 -0
- package/types/vadem-ui-button.d.ts +52 -0
- package/types/vadem-ui-calendar.d.ts +327 -0
- package/types/vadem-ui-card.d.ts +58 -0
- package/types/vadem-ui-character-count.d.ts +71 -0
- package/types/vadem-ui-chart.d.ts +452 -0
- package/types/vadem-ui-checkbox.d.ts +20 -0
- package/types/vadem-ui-color-picker.d.ts +171 -0
- package/types/vadem-ui-command.d.ts +145 -0
- package/types/vadem-ui-copy-button.d.ts +90 -0
- package/types/vadem-ui-date-range-picker.d.ts +216 -0
- package/types/vadem-ui-description-list.d.ts +15 -0
- package/types/vadem-ui-dialog.d.ts +174 -0
- package/types/vadem-ui-dropzone.d.ts +73 -0
- package/types/vadem-ui-editable-text.d.ts +141 -0
- package/types/vadem-ui-empty-state.d.ts +34 -0
- package/types/vadem-ui-expandable-text.d.ts +52 -0
- package/types/vadem-ui-field.d.ts +180 -0
- package/types/vadem-ui-file-preview.d.ts +108 -0
- package/types/vadem-ui-file-size.d.ts +18 -0
- package/types/vadem-ui-form-error-summary.d.ts +46 -0
- package/types/vadem-ui-icon.d.ts +152 -0
- package/types/vadem-ui-input.d.ts +31 -0
- package/types/vadem-ui-kbd.d.ts +66 -0
- package/types/vadem-ui-keyboard.d.ts +61 -0
- package/types/vadem-ui-locale.d.ts +241 -0
- package/types/vadem-ui-menu.d.ts +132 -0
- package/types/vadem-ui-navigation-list.d.ts +28 -0
- package/types/vadem-ui-number-input.d.ts +39 -0
- package/types/vadem-ui-otp-input.d.ts +15 -0
- package/types/vadem-ui-pagination.d.ts +96 -0
- package/types/vadem-ui-password-input.d.ts +36 -0
- package/types/vadem-ui-popover.d.ts +48 -0
- package/types/vadem-ui-progress.d.ts +95 -0
- package/types/vadem-ui-radio.d.ts +11 -0
- package/types/vadem-ui-range-slider.d.ts +136 -0
- package/types/vadem-ui-rating.d.ts +95 -0
- package/types/vadem-ui-relative-time.d.ts +58 -0
- package/types/vadem-ui-reorder-list.d.ts +120 -0
- package/types/vadem-ui-scroll-area.d.ts +13 -0
- package/types/vadem-ui-search-input.d.ts +58 -0
- package/types/vadem-ui-segmented.d.ts +76 -0
- package/types/vadem-ui-select.d.ts +303 -0
- package/types/vadem-ui-sidebar.d.ts +70 -0
- package/types/vadem-ui-skeleton.d.ts +28 -0
- package/types/vadem-ui-slider.d.ts +17 -0
- package/types/vadem-ui-splitter.d.ts +99 -0
- package/types/vadem-ui-stat.d.ts +101 -0
- package/types/vadem-ui-stepper.d.ts +108 -0
- package/types/vadem-ui-switch.d.ts +10 -0
- package/types/vadem-ui-table.d.ts +172 -0
- package/types/vadem-ui-tabs.d.ts +101 -0
- package/types/vadem-ui-tag-input.d.ts +170 -0
- package/types/vadem-ui-text-highlight.d.ts +27 -0
- package/types/vadem-ui-time-input.d.ts +47 -0
- package/types/vadem-ui-timeline.d.ts +54 -0
- package/types/vadem-ui-toast.d.ts +104 -0
- package/types/vadem-ui-toolbar.d.ts +80 -0
- package/types/vadem-ui-tooltip.d.ts +71 -0
- package/types/vadem-ui-tree.d.ts +123 -0
- package/types/vadem-ui-upload-list.d.ts +70 -0
- package/types/vadem-ui.d.ts +1 -0
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { DestroyRef, Directive, ElementRef, afterRenderEffect, booleanAttribute, inject, input, model, output, signal } from "@angular/core";
|
|
3
|
+
import { vdUniqueId } from "@vadem/ui/field";
|
|
4
|
+
function vdIsOutside(rect, x, y) {
|
|
5
|
+
return x < rect.left || x > rect.right || y < rect.top || y > rect.bottom;
|
|
6
|
+
}
|
|
7
|
+
function vdViewportGutters(doc) {
|
|
8
|
+
const view = doc.defaultView;
|
|
9
|
+
if (!view || !doc.body) return {
|
|
10
|
+
left: 0,
|
|
11
|
+
right: 0
|
|
12
|
+
};
|
|
13
|
+
const probe = doc.createElement("div");
|
|
14
|
+
probe.style.cssText = "position:fixed;inset:0;visibility:hidden;pointer-events:none";
|
|
15
|
+
doc.body.append(probe);
|
|
16
|
+
const rect = probe.getBoundingClientRect();
|
|
17
|
+
probe.remove();
|
|
18
|
+
if (rect.width === 0) return {
|
|
19
|
+
left: 0,
|
|
20
|
+
right: 0
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
left: Math.max(0, Math.round(rect.left)),
|
|
24
|
+
right: Math.max(0, Math.round(view.innerWidth - rect.right))
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
var VdDialogController = class {
|
|
28
|
+
dialog;
|
|
29
|
+
options;
|
|
30
|
+
pressStartedOnBackdrop = false;
|
|
31
|
+
constructor(dialog, options) {
|
|
32
|
+
this.dialog = dialog;
|
|
33
|
+
this.options = options;
|
|
34
|
+
dialog.addEventListener("close", this.onClose);
|
|
35
|
+
dialog.addEventListener("cancel", this.onCancel);
|
|
36
|
+
dialog.addEventListener("pointerdown", this.onPointerDown);
|
|
37
|
+
dialog.addEventListener("click", this.onClick);
|
|
38
|
+
}
|
|
39
|
+
get isOpen() {
|
|
40
|
+
return this.dialog.open;
|
|
41
|
+
}
|
|
42
|
+
open() {
|
|
43
|
+
if (!this.dialog.open) {
|
|
44
|
+
const gutters = vdViewportGutters(this.dialog.ownerDocument);
|
|
45
|
+
this.dialog.style.setProperty("--vd-viewport-gutter-left", `${gutters.left}px`);
|
|
46
|
+
this.dialog.style.setProperty("--vd-viewport-gutter-right", `${gutters.right}px`);
|
|
47
|
+
this.dialog.returnValue = "";
|
|
48
|
+
this.dialog.showModal();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
close(returnValue = "") {
|
|
52
|
+
if (this.dialog.open) this.dialog.close(returnValue);
|
|
53
|
+
}
|
|
54
|
+
destroy() {
|
|
55
|
+
this.dialog.removeEventListener("close", this.onClose);
|
|
56
|
+
this.dialog.removeEventListener("cancel", this.onCancel);
|
|
57
|
+
this.dialog.removeEventListener("pointerdown", this.onPointerDown);
|
|
58
|
+
this.dialog.removeEventListener("click", this.onClick);
|
|
59
|
+
}
|
|
60
|
+
onClose = () => {
|
|
61
|
+
if (!this.dialog.open) this.options.onClose(this.dialog.returnValue);
|
|
62
|
+
};
|
|
63
|
+
onCancel = (event) => {
|
|
64
|
+
if (!this.options.dismissible()) event.preventDefault();
|
|
65
|
+
};
|
|
66
|
+
onPointerDown = (event) => {
|
|
67
|
+
this.pressStartedOnBackdrop = this.isBackdropEvent(event);
|
|
68
|
+
};
|
|
69
|
+
onClick = (event) => {
|
|
70
|
+
const fromBackdrop = this.pressStartedOnBackdrop && this.isBackdropEvent(event);
|
|
71
|
+
this.pressStartedOnBackdrop = false;
|
|
72
|
+
if (fromBackdrop && this.options.dismissible()) this.close();
|
|
73
|
+
};
|
|
74
|
+
isBackdropEvent(event) {
|
|
75
|
+
return event.target === this.dialog && vdIsOutside(this.dialog.getBoundingClientRect(), event.clientX, event.clientY);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const VD_SHEET_DRAG_THRESHOLD = 6;
|
|
79
|
+
const VD_SHEET_DISMISS_DISTANCE = .25;
|
|
80
|
+
const VD_SHEET_DISMISS_VELOCITY = .5;
|
|
81
|
+
const INTERACTIVE = "button, a[href], input, select, textarea, [contenteditable], [tabindex]";
|
|
82
|
+
function vdSheetShouldDismiss(offset, height, velocity) {
|
|
83
|
+
if (offset <= 0) return false;
|
|
84
|
+
return offset > height * .25 || velocity > .5;
|
|
85
|
+
}
|
|
86
|
+
var VdSheetDrag = class {
|
|
87
|
+
el;
|
|
88
|
+
options;
|
|
89
|
+
pointerId = null;
|
|
90
|
+
start = null;
|
|
91
|
+
samples = [];
|
|
92
|
+
dragging = false;
|
|
93
|
+
offset = 0;
|
|
94
|
+
height = 0;
|
|
95
|
+
constructor(el, options) {
|
|
96
|
+
this.el = el;
|
|
97
|
+
this.options = options;
|
|
98
|
+
el.addEventListener("pointerdown", this.onDown);
|
|
99
|
+
el.addEventListener("pointermove", this.onMove);
|
|
100
|
+
el.addEventListener("pointerup", this.onUp);
|
|
101
|
+
el.addEventListener("pointercancel", this.onCancel);
|
|
102
|
+
}
|
|
103
|
+
destroy() {
|
|
104
|
+
this.el.removeEventListener("pointerdown", this.onDown);
|
|
105
|
+
this.el.removeEventListener("pointermove", this.onMove);
|
|
106
|
+
this.el.removeEventListener("pointerup", this.onUp);
|
|
107
|
+
this.el.removeEventListener("pointercancel", this.onCancel);
|
|
108
|
+
this.reset();
|
|
109
|
+
}
|
|
110
|
+
onDown = (event) => {
|
|
111
|
+
if (event.button !== 0 || !this.options.isSheet() || !this.options.dismissible()) return;
|
|
112
|
+
const target = event.target;
|
|
113
|
+
const zone = target.closest(this.options.handleSelector);
|
|
114
|
+
if (!zone || !this.el.contains(zone)) return;
|
|
115
|
+
const interactive = target.closest(INTERACTIVE);
|
|
116
|
+
if (interactive && zone.contains(interactive)) return;
|
|
117
|
+
this.pointerId = event.pointerId;
|
|
118
|
+
this.start = {
|
|
119
|
+
y: event.clientY,
|
|
120
|
+
t: event.timeStamp
|
|
121
|
+
};
|
|
122
|
+
this.samples = [this.start];
|
|
123
|
+
this.height = this.el.getBoundingClientRect().height;
|
|
124
|
+
};
|
|
125
|
+
onMove = (event) => {
|
|
126
|
+
if (event.pointerId !== this.pointerId || !this.start) return;
|
|
127
|
+
const dy = event.clientY - this.start.y;
|
|
128
|
+
if (!this.dragging) {
|
|
129
|
+
if (Math.abs(dy) < 6) return;
|
|
130
|
+
this.dragging = true;
|
|
131
|
+
this.el.dataset["dragging"] = "";
|
|
132
|
+
this.el.setPointerCapture?.(event.pointerId);
|
|
133
|
+
}
|
|
134
|
+
this.offset = dy > 0 ? dy : dy * .15;
|
|
135
|
+
this.samples.push({
|
|
136
|
+
y: event.clientY,
|
|
137
|
+
t: event.timeStamp
|
|
138
|
+
});
|
|
139
|
+
if (this.samples.length > 6) this.samples.shift();
|
|
140
|
+
const progress = this.height > 0 ? Math.min(Math.max(this.offset, 0) / this.height, 1) : 0;
|
|
141
|
+
this.el.style.setProperty("--vd-sheet-offset", `${this.offset}px`);
|
|
142
|
+
this.el.style.setProperty("--vd-sheet-progress", progress.toFixed(3));
|
|
143
|
+
};
|
|
144
|
+
onUp = (event) => {
|
|
145
|
+
if (event.pointerId !== this.pointerId) return;
|
|
146
|
+
const dismiss = this.dragging && vdSheetShouldDismiss(this.offset, this.height, this.velocity());
|
|
147
|
+
this.reset();
|
|
148
|
+
if (dismiss) this.options.onDismiss();
|
|
149
|
+
};
|
|
150
|
+
onCancel = (event) => {
|
|
151
|
+
if (event.pointerId === this.pointerId) this.reset();
|
|
152
|
+
};
|
|
153
|
+
velocity() {
|
|
154
|
+
const first = this.samples[0];
|
|
155
|
+
const last = this.samples[this.samples.length - 1];
|
|
156
|
+
if (!first || !last || last.t === first.t) return 0;
|
|
157
|
+
return (last.y - first.y) / (last.t - first.t);
|
|
158
|
+
}
|
|
159
|
+
reset() {
|
|
160
|
+
if (this.pointerId !== null && this.el.hasPointerCapture?.(this.pointerId)) this.el.releasePointerCapture(this.pointerId);
|
|
161
|
+
this.pointerId = null;
|
|
162
|
+
this.start = null;
|
|
163
|
+
this.samples = [];
|
|
164
|
+
this.dragging = false;
|
|
165
|
+
this.offset = 0;
|
|
166
|
+
delete this.el.dataset["dragging"];
|
|
167
|
+
this.el.style.removeProperty("--vd-sheet-offset");
|
|
168
|
+
this.el.style.removeProperty("--vd-sheet-progress");
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
var VdDialog = class VdDialog {
|
|
172
|
+
open = model(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
|
|
173
|
+
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
174
|
+
placement = input("center", ...ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []);
|
|
175
|
+
dismissible = input(true, {
|
|
176
|
+
...ngDevMode ? { debugName: "dismissible" } : /* istanbul ignore next */ {},
|
|
177
|
+
transform: booleanAttribute
|
|
178
|
+
});
|
|
179
|
+
closed = output();
|
|
180
|
+
titleId = signal(null, ...ngDevMode ? [{ debugName: "titleId" }] : /* istanbul ignore next */ []);
|
|
181
|
+
descriptionId = signal(null, ...ngDevMode ? [{ debugName: "descriptionId" }] : /* istanbul ignore next */ []);
|
|
182
|
+
el = inject(ElementRef).nativeElement;
|
|
183
|
+
controller;
|
|
184
|
+
sheetDrag;
|
|
185
|
+
constructor() {
|
|
186
|
+
inject(DestroyRef).onDestroy(() => {
|
|
187
|
+
this.controller?.destroy();
|
|
188
|
+
this.sheetDrag?.destroy();
|
|
189
|
+
});
|
|
190
|
+
afterRenderEffect(() => {
|
|
191
|
+
const open = this.open();
|
|
192
|
+
this.controller ??= new VdDialogController(this.el, {
|
|
193
|
+
dismissible: () => this.dismissible(),
|
|
194
|
+
onClose: (value) => {
|
|
195
|
+
this.open.set(false);
|
|
196
|
+
this.closed.emit(value);
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
this.sheetDrag ??= new VdSheetDrag(this.el, {
|
|
200
|
+
handleSelector: ".vd-dialog__header",
|
|
201
|
+
isSheet: () => this.el.ownerDocument.defaultView?.getComputedStyle(this.el).getPropertyValue("--vd-dialog-sheet").trim() === "1",
|
|
202
|
+
dismissible: () => this.dismissible(),
|
|
203
|
+
onDismiss: () => this.controller?.close("")
|
|
204
|
+
});
|
|
205
|
+
if (open) this.controller.open();
|
|
206
|
+
else this.controller.close();
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
show() {
|
|
210
|
+
this.open.set(true);
|
|
211
|
+
}
|
|
212
|
+
close(returnValue = "") {
|
|
213
|
+
if (this.controller?.isOpen) this.controller.close(returnValue);
|
|
214
|
+
else this.open.set(false);
|
|
215
|
+
}
|
|
216
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
217
|
+
minVersion: "12.0.0",
|
|
218
|
+
version: "22.2.1",
|
|
219
|
+
ngImport: i0,
|
|
220
|
+
type: VdDialog,
|
|
221
|
+
deps: [],
|
|
222
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
223
|
+
});
|
|
224
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
225
|
+
minVersion: "17.1.0",
|
|
226
|
+
version: "22.2.1",
|
|
227
|
+
type: VdDialog,
|
|
228
|
+
isStandalone: true,
|
|
229
|
+
selector: "dialog[vdDialog]",
|
|
230
|
+
inputs: {
|
|
231
|
+
open: {
|
|
232
|
+
classPropertyName: "open",
|
|
233
|
+
publicName: "open",
|
|
234
|
+
isSignal: true,
|
|
235
|
+
isRequired: false,
|
|
236
|
+
transformFunction: null
|
|
237
|
+
},
|
|
238
|
+
size: {
|
|
239
|
+
classPropertyName: "size",
|
|
240
|
+
publicName: "size",
|
|
241
|
+
isSignal: true,
|
|
242
|
+
isRequired: false,
|
|
243
|
+
transformFunction: null
|
|
244
|
+
},
|
|
245
|
+
placement: {
|
|
246
|
+
classPropertyName: "placement",
|
|
247
|
+
publicName: "placement",
|
|
248
|
+
isSignal: true,
|
|
249
|
+
isRequired: false,
|
|
250
|
+
transformFunction: null
|
|
251
|
+
},
|
|
252
|
+
dismissible: {
|
|
253
|
+
classPropertyName: "dismissible",
|
|
254
|
+
publicName: "dismissible",
|
|
255
|
+
isSignal: true,
|
|
256
|
+
isRequired: false,
|
|
257
|
+
transformFunction: null
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
outputs: {
|
|
261
|
+
open: "openChange",
|
|
262
|
+
closed: "closed"
|
|
263
|
+
},
|
|
264
|
+
host: {
|
|
265
|
+
properties: {
|
|
266
|
+
"attr.data-size": "size()",
|
|
267
|
+
"attr.data-placement": "placement() === \"center\" ? null : placement()",
|
|
268
|
+
"attr.data-dismissible": "dismissible() ? \"\" : null",
|
|
269
|
+
"attr.aria-labelledby": "titleId()",
|
|
270
|
+
"attr.aria-describedby": "descriptionId()"
|
|
271
|
+
},
|
|
272
|
+
classAttribute: "vd-dialog"
|
|
273
|
+
},
|
|
274
|
+
exportAs: ["vdDialog"],
|
|
275
|
+
ngImport: i0
|
|
276
|
+
});
|
|
277
|
+
};
|
|
278
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
279
|
+
minVersion: "12.0.0",
|
|
280
|
+
version: "22.2.1",
|
|
281
|
+
ngImport: i0,
|
|
282
|
+
type: VdDialog,
|
|
283
|
+
decorators: [{
|
|
284
|
+
type: Directive,
|
|
285
|
+
args: [{
|
|
286
|
+
selector: "dialog[vdDialog]",
|
|
287
|
+
exportAs: "vdDialog",
|
|
288
|
+
host: {
|
|
289
|
+
class: "vd-dialog",
|
|
290
|
+
"[attr.data-size]": "size()",
|
|
291
|
+
"[attr.data-placement]": "placement() === \"center\" ? null : placement()",
|
|
292
|
+
"[attr.data-dismissible]": "dismissible() ? \"\" : null",
|
|
293
|
+
"[attr.aria-labelledby]": "titleId()",
|
|
294
|
+
"[attr.aria-describedby]": "descriptionId()"
|
|
295
|
+
}
|
|
296
|
+
}]
|
|
297
|
+
}],
|
|
298
|
+
ctorParameters: () => [],
|
|
299
|
+
propDecorators: {
|
|
300
|
+
open: [{
|
|
301
|
+
type: i0.Input,
|
|
302
|
+
args: [{
|
|
303
|
+
isSignal: true,
|
|
304
|
+
alias: "open",
|
|
305
|
+
required: false
|
|
306
|
+
}]
|
|
307
|
+
}, {
|
|
308
|
+
type: i0.Output,
|
|
309
|
+
args: ["openChange"]
|
|
310
|
+
}],
|
|
311
|
+
size: [{
|
|
312
|
+
type: i0.Input,
|
|
313
|
+
args: [{
|
|
314
|
+
isSignal: true,
|
|
315
|
+
alias: "size",
|
|
316
|
+
required: false
|
|
317
|
+
}]
|
|
318
|
+
}],
|
|
319
|
+
placement: [{
|
|
320
|
+
type: i0.Input,
|
|
321
|
+
args: [{
|
|
322
|
+
isSignal: true,
|
|
323
|
+
alias: "placement",
|
|
324
|
+
required: false
|
|
325
|
+
}]
|
|
326
|
+
}],
|
|
327
|
+
dismissible: [{
|
|
328
|
+
type: i0.Input,
|
|
329
|
+
args: [{
|
|
330
|
+
isSignal: true,
|
|
331
|
+
alias: "dismissible",
|
|
332
|
+
required: false
|
|
333
|
+
}]
|
|
334
|
+
}],
|
|
335
|
+
closed: [{
|
|
336
|
+
type: i0.Output,
|
|
337
|
+
args: ["closed"]
|
|
338
|
+
}]
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
var VdDialogHeader = class VdDialogHeader {
|
|
342
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
343
|
+
minVersion: "12.0.0",
|
|
344
|
+
version: "22.2.1",
|
|
345
|
+
ngImport: i0,
|
|
346
|
+
type: VdDialogHeader,
|
|
347
|
+
deps: [],
|
|
348
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
349
|
+
});
|
|
350
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
351
|
+
minVersion: "14.0.0",
|
|
352
|
+
version: "22.2.1",
|
|
353
|
+
type: VdDialogHeader,
|
|
354
|
+
isStandalone: true,
|
|
355
|
+
selector: "[vdDialogHeader]",
|
|
356
|
+
host: { classAttribute: "vd-dialog__header" },
|
|
357
|
+
ngImport: i0
|
|
358
|
+
});
|
|
359
|
+
};
|
|
360
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
361
|
+
minVersion: "12.0.0",
|
|
362
|
+
version: "22.2.1",
|
|
363
|
+
ngImport: i0,
|
|
364
|
+
type: VdDialogHeader,
|
|
365
|
+
decorators: [{
|
|
366
|
+
type: Directive,
|
|
367
|
+
args: [{
|
|
368
|
+
selector: "[vdDialogHeader]",
|
|
369
|
+
host: { class: "vd-dialog__header" }
|
|
370
|
+
}]
|
|
371
|
+
}]
|
|
372
|
+
});
|
|
373
|
+
var VdDialogTitle = class VdDialogTitle {
|
|
374
|
+
id = vdUniqueId("vd-dialog-title");
|
|
375
|
+
constructor() {
|
|
376
|
+
const dialog = inject(VdDialog);
|
|
377
|
+
dialog.titleId.set(this.id);
|
|
378
|
+
inject(DestroyRef).onDestroy(() => dialog.titleId.set(null));
|
|
379
|
+
}
|
|
380
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
381
|
+
minVersion: "12.0.0",
|
|
382
|
+
version: "22.2.1",
|
|
383
|
+
ngImport: i0,
|
|
384
|
+
type: VdDialogTitle,
|
|
385
|
+
deps: [],
|
|
386
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
387
|
+
});
|
|
388
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
389
|
+
minVersion: "14.0.0",
|
|
390
|
+
version: "22.2.1",
|
|
391
|
+
type: VdDialogTitle,
|
|
392
|
+
isStandalone: true,
|
|
393
|
+
selector: "[vdDialogTitle]",
|
|
394
|
+
host: {
|
|
395
|
+
properties: { "id": "id" },
|
|
396
|
+
classAttribute: "vd-dialog__title"
|
|
397
|
+
},
|
|
398
|
+
ngImport: i0
|
|
399
|
+
});
|
|
400
|
+
};
|
|
401
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
402
|
+
minVersion: "12.0.0",
|
|
403
|
+
version: "22.2.1",
|
|
404
|
+
ngImport: i0,
|
|
405
|
+
type: VdDialogTitle,
|
|
406
|
+
decorators: [{
|
|
407
|
+
type: Directive,
|
|
408
|
+
args: [{
|
|
409
|
+
selector: "[vdDialogTitle]",
|
|
410
|
+
host: {
|
|
411
|
+
class: "vd-dialog__title",
|
|
412
|
+
"[id]": "id"
|
|
413
|
+
}
|
|
414
|
+
}]
|
|
415
|
+
}],
|
|
416
|
+
ctorParameters: () => []
|
|
417
|
+
});
|
|
418
|
+
var VdDialogDescription = class VdDialogDescription {
|
|
419
|
+
id = vdUniqueId("vd-dialog-description");
|
|
420
|
+
constructor() {
|
|
421
|
+
const dialog = inject(VdDialog);
|
|
422
|
+
dialog.descriptionId.set(this.id);
|
|
423
|
+
inject(DestroyRef).onDestroy(() => dialog.descriptionId.set(null));
|
|
424
|
+
}
|
|
425
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
426
|
+
minVersion: "12.0.0",
|
|
427
|
+
version: "22.2.1",
|
|
428
|
+
ngImport: i0,
|
|
429
|
+
type: VdDialogDescription,
|
|
430
|
+
deps: [],
|
|
431
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
432
|
+
});
|
|
433
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
434
|
+
minVersion: "14.0.0",
|
|
435
|
+
version: "22.2.1",
|
|
436
|
+
type: VdDialogDescription,
|
|
437
|
+
isStandalone: true,
|
|
438
|
+
selector: "[vdDialogDescription]",
|
|
439
|
+
host: {
|
|
440
|
+
properties: { "id": "id" },
|
|
441
|
+
classAttribute: "vd-dialog__description"
|
|
442
|
+
},
|
|
443
|
+
ngImport: i0
|
|
444
|
+
});
|
|
445
|
+
};
|
|
446
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
447
|
+
minVersion: "12.0.0",
|
|
448
|
+
version: "22.2.1",
|
|
449
|
+
ngImport: i0,
|
|
450
|
+
type: VdDialogDescription,
|
|
451
|
+
decorators: [{
|
|
452
|
+
type: Directive,
|
|
453
|
+
args: [{
|
|
454
|
+
selector: "[vdDialogDescription]",
|
|
455
|
+
host: {
|
|
456
|
+
class: "vd-dialog__description",
|
|
457
|
+
"[id]": "id"
|
|
458
|
+
}
|
|
459
|
+
}]
|
|
460
|
+
}],
|
|
461
|
+
ctorParameters: () => []
|
|
462
|
+
});
|
|
463
|
+
var VdDialogBody = class VdDialogBody {
|
|
464
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
465
|
+
minVersion: "12.0.0",
|
|
466
|
+
version: "22.2.1",
|
|
467
|
+
ngImport: i0,
|
|
468
|
+
type: VdDialogBody,
|
|
469
|
+
deps: [],
|
|
470
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
471
|
+
});
|
|
472
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
473
|
+
minVersion: "14.0.0",
|
|
474
|
+
version: "22.2.1",
|
|
475
|
+
type: VdDialogBody,
|
|
476
|
+
isStandalone: true,
|
|
477
|
+
selector: "[vdDialogBody]",
|
|
478
|
+
host: { classAttribute: "vd-dialog__body" },
|
|
479
|
+
ngImport: i0
|
|
480
|
+
});
|
|
481
|
+
};
|
|
482
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
483
|
+
minVersion: "12.0.0",
|
|
484
|
+
version: "22.2.1",
|
|
485
|
+
ngImport: i0,
|
|
486
|
+
type: VdDialogBody,
|
|
487
|
+
decorators: [{
|
|
488
|
+
type: Directive,
|
|
489
|
+
args: [{
|
|
490
|
+
selector: "[vdDialogBody]",
|
|
491
|
+
host: { class: "vd-dialog__body" }
|
|
492
|
+
}]
|
|
493
|
+
}]
|
|
494
|
+
});
|
|
495
|
+
var VdDialogFooter = class VdDialogFooter {
|
|
496
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
497
|
+
minVersion: "12.0.0",
|
|
498
|
+
version: "22.2.1",
|
|
499
|
+
ngImport: i0,
|
|
500
|
+
type: VdDialogFooter,
|
|
501
|
+
deps: [],
|
|
502
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
503
|
+
});
|
|
504
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
505
|
+
minVersion: "14.0.0",
|
|
506
|
+
version: "22.2.1",
|
|
507
|
+
type: VdDialogFooter,
|
|
508
|
+
isStandalone: true,
|
|
509
|
+
selector: "[vdDialogFooter]",
|
|
510
|
+
host: { classAttribute: "vd-dialog__footer" },
|
|
511
|
+
ngImport: i0
|
|
512
|
+
});
|
|
513
|
+
};
|
|
514
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
515
|
+
minVersion: "12.0.0",
|
|
516
|
+
version: "22.2.1",
|
|
517
|
+
ngImport: i0,
|
|
518
|
+
type: VdDialogFooter,
|
|
519
|
+
decorators: [{
|
|
520
|
+
type: Directive,
|
|
521
|
+
args: [{
|
|
522
|
+
selector: "[vdDialogFooter]",
|
|
523
|
+
host: { class: "vd-dialog__footer" }
|
|
524
|
+
}]
|
|
525
|
+
}]
|
|
526
|
+
});
|
|
527
|
+
var VdDialogClose = class VdDialogClose {
|
|
528
|
+
vdDialogClose = input(void 0, ...ngDevMode ? [{ debugName: "vdDialogClose" }] : /* istanbul ignore next */ []);
|
|
529
|
+
dialog = inject(VdDialog);
|
|
530
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
531
|
+
minVersion: "12.0.0",
|
|
532
|
+
version: "22.2.1",
|
|
533
|
+
ngImport: i0,
|
|
534
|
+
type: VdDialogClose,
|
|
535
|
+
deps: [],
|
|
536
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
537
|
+
});
|
|
538
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
539
|
+
minVersion: "17.1.0",
|
|
540
|
+
version: "22.2.1",
|
|
541
|
+
type: VdDialogClose,
|
|
542
|
+
isStandalone: true,
|
|
543
|
+
selector: "button[vdDialogClose]",
|
|
544
|
+
inputs: { vdDialogClose: {
|
|
545
|
+
classPropertyName: "vdDialogClose",
|
|
546
|
+
publicName: "vdDialogClose",
|
|
547
|
+
isSignal: true,
|
|
548
|
+
isRequired: false,
|
|
549
|
+
transformFunction: null
|
|
550
|
+
} },
|
|
551
|
+
host: { listeners: { "click": "dialog.close(vdDialogClose() ?? \"\")" } },
|
|
552
|
+
ngImport: i0
|
|
553
|
+
});
|
|
554
|
+
};
|
|
555
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
556
|
+
minVersion: "12.0.0",
|
|
557
|
+
version: "22.2.1",
|
|
558
|
+
ngImport: i0,
|
|
559
|
+
type: VdDialogClose,
|
|
560
|
+
decorators: [{
|
|
561
|
+
type: Directive,
|
|
562
|
+
args: [{
|
|
563
|
+
selector: "button[vdDialogClose]",
|
|
564
|
+
host: { "(click)": "dialog.close(vdDialogClose() ?? \"\")" }
|
|
565
|
+
}]
|
|
566
|
+
}],
|
|
567
|
+
propDecorators: { vdDialogClose: [{
|
|
568
|
+
type: i0.Input,
|
|
569
|
+
args: [{
|
|
570
|
+
isSignal: true,
|
|
571
|
+
alias: "vdDialogClose",
|
|
572
|
+
required: false
|
|
573
|
+
}]
|
|
574
|
+
}] }
|
|
575
|
+
});
|
|
576
|
+
const VD_DIALOG = [
|
|
577
|
+
VdDialog,
|
|
578
|
+
VdDialogHeader,
|
|
579
|
+
VdDialogTitle,
|
|
580
|
+
VdDialogDescription,
|
|
581
|
+
VdDialogBody,
|
|
582
|
+
VdDialogFooter,
|
|
583
|
+
VdDialogClose
|
|
584
|
+
];
|
|
585
|
+
export { VD_DIALOG, VD_SHEET_DISMISS_DISTANCE, VD_SHEET_DISMISS_VELOCITY, VD_SHEET_DRAG_THRESHOLD, VdDialog, VdDialogBody, VdDialogClose, VdDialogController, VdDialogDescription, VdDialogFooter, VdDialogHeader, VdDialogTitle, VdSheetDrag, vdIsOutside, vdSheetShouldDismiss, vdViewportGutters };
|
|
586
|
+
|
|
587
|
+
//# sourceMappingURL=vadem-ui-dialog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vadem-ui-dialog.mjs","names":[],"sources":["../../../projects/ui/dialog/src/core/dialog-controller.ts","../../../projects/ui/dialog/src/core/sheet-drag.ts","../../../projects/ui/dialog/src/dialog.ts"],"sourcesContent":["/**\n * Framework-agnostic controller for a native modal `<dialog>`: opening/closing, Escape and\n * light-dismiss policy, and close notification. The platform handles focus trapping, inert\n * background, top layer and focus restoration.\n */\n\nexport interface VdDialogControllerOptions {\n /** Called after the dialog closed (any reason) with its `returnValue`. */\n onClose(returnValue: string): void;\n /** Whether Escape and backdrop clicks may close the dialog. Read on every attempt. */\n dismissible(): boolean;\n}\n\n/** True when the point lies outside the rectangle (i.e. on the ::backdrop). */\nexport function vdIsOutside(rect: DOMRectReadOnly, x: number, y: number): boolean {\n return x < rect.left || x > rect.right || y < rect.top || y > rect.bottom;\n}\n\n/**\n * Width of the root scrollbar gutter on each physical side. Fixed boxes (and top-layer\n * dialogs) stop at the gutter that `scrollbar-gutter: stable` keeps reserved; which side it is\n * on depends on the engine and direction, so it is measured with a fixed probe.\n */\nexport function vdViewportGutters(doc: Document): { left: number; right: number } {\n const view = doc.defaultView;\n if (!view || !doc.body) return { left: 0, right: 0 };\n const probe = doc.createElement('div');\n probe.style.cssText = 'position:fixed;inset:0;visibility:hidden;pointer-events:none';\n doc.body.append(probe);\n const rect = probe.getBoundingClientRect();\n probe.remove();\n // No layout (e.g. jsdom): nothing to compensate.\n if (rect.width === 0) return { left: 0, right: 0 };\n return {\n left: Math.max(0, Math.round(rect.left)),\n right: Math.max(0, Math.round(view.innerWidth - rect.right)),\n };\n}\n\nexport class VdDialogController {\n private pressStartedOnBackdrop = false;\n\n constructor(\n private readonly dialog: HTMLDialogElement,\n private readonly options: VdDialogControllerOptions,\n ) {\n dialog.addEventListener('close', this.onClose);\n dialog.addEventListener('cancel', this.onCancel);\n dialog.addEventListener('pointerdown', this.onPointerDown);\n dialog.addEventListener('click', this.onClick);\n }\n\n get isOpen(): boolean {\n return this.dialog.open;\n }\n\n open(): void {\n if (!this.dialog.open) {\n // Drawers reach over the scrollbar gutter to the real viewport edge (see dialog.css).\n const gutters = vdViewportGutters(this.dialog.ownerDocument);\n this.dialog.style.setProperty('--vd-viewport-gutter-left', `${gutters.left}px`);\n this.dialog.style.setProperty('--vd-viewport-gutter-right', `${gutters.right}px`);\n this.dialog.returnValue = '';\n this.dialog.showModal();\n }\n }\n\n close(returnValue = ''): void {\n if (this.dialog.open) this.dialog.close(returnValue);\n }\n\n destroy(): void {\n this.dialog.removeEventListener('close', this.onClose);\n this.dialog.removeEventListener('cancel', this.onCancel);\n this.dialog.removeEventListener('pointerdown', this.onPointerDown);\n this.dialog.removeEventListener('click', this.onClick);\n }\n\n private readonly onClose = () => {\n // A queued close event can arrive after the consumer has already reopened the dialog.\n if (!this.dialog.open) this.options.onClose(this.dialog.returnValue);\n };\n\n /** Escape. Prevented for non-dismissible dialogs. */\n private readonly onCancel = (event: Event) => {\n if (!this.options.dismissible()) event.preventDefault();\n };\n\n // Light dismiss: only when the press both starts and ends on the backdrop, so dragging a text\n // selection out of the dialog doesn't close it. Keyboard \"clicks\" target inner elements.\n private readonly onPointerDown = (event: PointerEvent) => {\n this.pressStartedOnBackdrop = this.isBackdropEvent(event);\n };\n\n private readonly onClick = (event: MouseEvent) => {\n const fromBackdrop = this.pressStartedOnBackdrop && this.isBackdropEvent(event);\n this.pressStartedOnBackdrop = false;\n if (fromBackdrop && this.options.dismissible()) this.close();\n };\n\n private isBackdropEvent(event: MouseEvent): boolean {\n return (\n event.target === this.dialog &&\n vdIsOutside(this.dialog.getBoundingClientRect(), event.clientX, event.clientY)\n );\n }\n}\n","/**\n * Framework-agnostic swipe-to-dismiss for a dialog laid out as a bottom sheet.\n * The element follows the pointer through two custom properties that CSS consumes:\n * --vd-sheet-offset (px, translate down)\n * --vd-sheet-progress (0..1, for fading the backdrop)\n * and gets `data-dragging` while a drag is active (CSS disables transitions then).\n */\n\nexport interface VdSheetDragOptions {\n /** True while the element is currently laid out as a sheet (read on every gesture). */\n isSheet(): boolean;\n dismissible(): boolean;\n /** Element(s) a drag may start from, e.g. the header that carries the handle. */\n handleSelector: string;\n onDismiss(): void;\n}\n\n/** Pointer travel before a press becomes a drag, so taps and clicks still work. */\nexport const VD_SHEET_DRAG_THRESHOLD = 6;\n/** Fraction of the sheet height that dismisses on release. */\nexport const VD_SHEET_DISMISS_DISTANCE = 0.25;\n/** Downward flick speed (px/ms) that dismisses regardless of distance. */\nexport const VD_SHEET_DISMISS_VELOCITY = 0.5;\n\nconst INTERACTIVE = 'button, a[href], input, select, textarea, [contenteditable], [tabindex]';\n\ninterface Sample {\n y: number;\n t: number;\n}\n\n/** Decides what a release does. Pure: exported for tests and other adapters. */\nexport function vdSheetShouldDismiss(offset: number, height: number, velocity: number): boolean {\n if (offset <= 0) return false;\n return offset > height * VD_SHEET_DISMISS_DISTANCE || velocity > VD_SHEET_DISMISS_VELOCITY;\n}\n\nexport class VdSheetDrag {\n private pointerId: number | null = null;\n private start: Sample | null = null;\n private samples: Sample[] = [];\n private dragging = false;\n private offset = 0;\n private height = 0;\n\n constructor(\n private readonly el: HTMLElement,\n private readonly options: VdSheetDragOptions,\n ) {\n el.addEventListener('pointerdown', this.onDown);\n el.addEventListener('pointermove', this.onMove);\n el.addEventListener('pointerup', this.onUp);\n el.addEventListener('pointercancel', this.onCancel);\n }\n\n destroy(): void {\n this.el.removeEventListener('pointerdown', this.onDown);\n this.el.removeEventListener('pointermove', this.onMove);\n this.el.removeEventListener('pointerup', this.onUp);\n this.el.removeEventListener('pointercancel', this.onCancel);\n this.reset();\n }\n\n private readonly onDown = (event: PointerEvent) => {\n if (event.button !== 0 || !this.options.isSheet() || !this.options.dismissible()) return;\n const target = event.target as Element;\n const zone = target.closest(this.options.handleSelector);\n if (!zone || !this.el.contains(zone)) return;\n const interactive = target.closest(INTERACTIVE);\n if (interactive && zone.contains(interactive)) return;\n\n this.pointerId = event.pointerId;\n this.start = { y: event.clientY, t: event.timeStamp };\n this.samples = [this.start];\n this.height = this.el.getBoundingClientRect().height;\n };\n\n private readonly onMove = (event: PointerEvent) => {\n if (event.pointerId !== this.pointerId || !this.start) return;\n const dy = event.clientY - this.start.y;\n\n if (!this.dragging) {\n if (Math.abs(dy) < VD_SHEET_DRAG_THRESHOLD) return;\n this.dragging = true;\n this.el.dataset['dragging'] = '';\n this.el.setPointerCapture?.(event.pointerId);\n }\n\n // Follow the finger downwards; resist upward pulls (rubber band).\n this.offset = dy > 0 ? dy : dy * 0.15;\n this.samples.push({ y: event.clientY, t: event.timeStamp });\n if (this.samples.length > 6) this.samples.shift();\n\n const progress = this.height > 0 ? Math.min(Math.max(this.offset, 0) / this.height, 1) : 0;\n this.el.style.setProperty('--vd-sheet-offset', `${this.offset}px`);\n this.el.style.setProperty('--vd-sheet-progress', progress.toFixed(3));\n };\n\n private readonly onUp = (event: PointerEvent) => {\n if (event.pointerId !== this.pointerId) return;\n const dismiss =\n this.dragging && vdSheetShouldDismiss(this.offset, this.height, this.velocity());\n this.reset();\n // With the drag state cleared, CSS transitions run from the current offset: to the closed\n // position when dismissing, back to 0 otherwise.\n if (dismiss) this.options.onDismiss();\n };\n\n private readonly onCancel = (event: PointerEvent) => {\n if (event.pointerId === this.pointerId) this.reset();\n };\n\n /** Downward speed over the most recent samples, px/ms. */\n private velocity(): number {\n const first = this.samples[0];\n const last = this.samples[this.samples.length - 1];\n if (!first || !last || last.t === first.t) return 0;\n return (last.y - first.y) / (last.t - first.t);\n }\n\n private reset(): void {\n if (this.pointerId !== null && this.el.hasPointerCapture?.(this.pointerId)) {\n this.el.releasePointerCapture(this.pointerId);\n }\n this.pointerId = null;\n this.start = null;\n this.samples = [];\n this.dragging = false;\n this.offset = 0;\n delete this.el.dataset['dragging'];\n this.el.style.removeProperty('--vd-sheet-offset');\n this.el.style.removeProperty('--vd-sheet-progress');\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n afterRenderEffect,\n booleanAttribute,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { vdUniqueId } from '@vadem/ui/field';\nimport { VdDialogController } from './core/dialog-controller';\nimport { VdSheetDrag } from './core/sheet-drag';\n\nexport type VdDialogSize = 'sm' | 'md' | 'lg';\n/** `center`: modal dialog. `start` / `end`: drawer attached to that inline edge. */\nexport type VdDialogPlacement = 'center' | 'start' | 'end';\n\n/**\n * Modal dialog on the native `<dialog>` element (top layer, focus trap, inert page and focus\n * restore come from the platform). Spec: specs/dialog.md\n */\n@Directive({\n selector: 'dialog[vdDialog]',\n exportAs: 'vdDialog',\n host: {\n class: 'vd-dialog',\n '[attr.data-size]': 'size()',\n '[attr.data-placement]': 'placement() === \"center\" ? null : placement()',\n '[attr.data-dismissible]': 'dismissible() ? \"\" : null',\n '[attr.aria-labelledby]': 'titleId()',\n '[attr.aria-describedby]': 'descriptionId()',\n },\n})\nexport class VdDialog {\n /** Two-way open state. Also controllable with `show()` / `close()`. */\n readonly open = model(false);\n readonly size = input<VdDialogSize>('md');\n /** Drawers slide in from an inline edge; below the sheet breakpoint every dialog is a sheet. */\n readonly placement = input<VdDialogPlacement>('center');\n /** Escape and backdrop click close the dialog. Turn off for flows that need an explicit choice. */\n readonly dismissible = input(true, { transform: booleanAttribute });\n /** Emits the dialog's `returnValue` ('' when dismissed) after it closes. */\n readonly closed = output<string>();\n\n readonly titleId = signal<string | null>(null);\n readonly descriptionId = signal<string | null>(null);\n\n private readonly el: HTMLDialogElement = inject(ElementRef).nativeElement;\n private controller?: VdDialogController;\n private sheetDrag?: VdSheetDrag;\n\n constructor() {\n inject(DestroyRef).onDestroy(() => {\n this.controller?.destroy();\n this.sheetDrag?.destroy();\n });\n // Browser-only: create the controller lazily and sync the model to the native element.\n afterRenderEffect(() => {\n const open = this.open();\n this.controller ??= new VdDialogController(this.el, {\n dismissible: () => this.dismissible(),\n onClose: (value) => {\n this.open.set(false);\n this.closed.emit(value);\n },\n });\n // Swipe down to dismiss when CSS lays the dialog out as a bottom sheet.\n this.sheetDrag ??= new VdSheetDrag(this.el, {\n handleSelector: '.vd-dialog__header',\n isSheet: () =>\n this.el.ownerDocument.defaultView\n ?.getComputedStyle(this.el)\n .getPropertyValue('--vd-dialog-sheet')\n .trim() === '1',\n dismissible: () => this.dismissible(),\n onDismiss: () => this.controller?.close(''),\n });\n if (open) this.controller.open();\n else this.controller.close();\n });\n }\n\n show(): void {\n this.open.set(true);\n }\n\n close(returnValue = ''): void {\n if (this.controller?.isOpen) this.controller.close(returnValue);\n else this.open.set(false);\n }\n}\n\n@Directive({ selector: '[vdDialogHeader]', host: { class: 'vd-dialog__header' } })\nexport class VdDialogHeader {}\n\n/** Dialog heading; becomes the dialog's accessible name. */\n@Directive({\n selector: '[vdDialogTitle]',\n host: { class: 'vd-dialog__title', '[id]': 'id' },\n})\nexport class VdDialogTitle {\n readonly id = vdUniqueId('vd-dialog-title');\n\n constructor() {\n const dialog = inject(VdDialog);\n dialog.titleId.set(this.id);\n inject(DestroyRef).onDestroy(() => dialog.titleId.set(null));\n }\n}\n\n/** Short description; becomes the dialog's accessible description. */\n@Directive({\n selector: '[vdDialogDescription]',\n host: { class: 'vd-dialog__description', '[id]': 'id' },\n})\nexport class VdDialogDescription {\n readonly id = vdUniqueId('vd-dialog-description');\n\n constructor() {\n const dialog = inject(VdDialog);\n dialog.descriptionId.set(this.id);\n inject(DestroyRef).onDestroy(() => dialog.descriptionId.set(null));\n }\n}\n\n@Directive({ selector: '[vdDialogBody]', host: { class: 'vd-dialog__body' } })\nexport class VdDialogBody {}\n\n@Directive({ selector: '[vdDialogFooter]', host: { class: 'vd-dialog__footer' } })\nexport class VdDialogFooter {}\n\n/** Closes the surrounding dialog with an optional return value. */\n@Directive({\n selector: 'button[vdDialogClose]',\n host: { '(click)': 'dialog.close(vdDialogClose() ?? \"\")' },\n})\nexport class VdDialogClose {\n readonly vdDialogClose = input<string | undefined>(undefined);\n protected readonly dialog = inject(VdDialog);\n}\n\nexport const VD_DIALOG = [\n VdDialog,\n VdDialogHeader,\n VdDialogTitle,\n VdDialogDescription,\n VdDialogBody,\n VdDialogFooter,\n VdDialogClose,\n] as const;\n"],"mappings":";;;AAcA,SAAgB,YAAY,MAAuB,GAAW,GAAS;CACrE,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,SAAS,IAAI,KAAK,OAAO,IAAI,KAAK;AACrE;AAOA,SAAgB,kBAAkB,KAAa;CAC7C,MAAM,OAAO,IAAI;CACjB,IAAI,CAAC,QAAQ,CAAC,IAAI,MAAM,OAAO;EAAE,MAAM;EAAG,OAAO;CAAC;CAClD,MAAM,QAAQ,IAAI,cAAc,KAAK;CACrC,MAAM,MAAM,UAAU;CACtB,IAAI,KAAK,OAAO,KAAK;CACrB,MAAM,OAAO,MAAM,sBAAqB;CACxC,MAAM,OAAM;CAEZ,IAAI,KAAK,UAAU,GAAG,OAAO;EAAE,MAAM;EAAG,OAAO;CAAC;CAChD,OAAO;EACL,MAAM,KAAK,IAAI,GAAG,KAAK,MAAM,KAAK,IAAI,CAAC;EACvC,OAAO,KAAK,IAAI,GAAG,KAAK,MAAM,KAAK,aAAa,KAAK,KAAK,CAAC;CAC5D;AACH;AAEA,IAAa,qBAAb,MAA+B;CAIV;CACA;CAJX,yBAAyB;CAEjC,YACmB,QACA,SAAkC;EADlC,KAAA,S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