@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,530 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Directive, ElementRef, booleanAttribute, computed, inject, input } from "@angular/core";
|
|
3
|
+
import { buttonVariants } from "@loomui-ng/ui/button";
|
|
4
|
+
import * as i1 from "@loomui-ng/ui/utils";
|
|
5
|
+
import { UiElementHost, UiModalContentBase, UiModalRoot, cn } from "@loomui-ng/ui/utils";
|
|
6
|
+
import { LIB_ICONS, iconToSvg } from "@loomui-ng/ui/icon";
|
|
7
|
+
const OVERLAY_CLASS = "fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0";
|
|
8
|
+
const CONTENT_CLASS = "fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10";
|
|
9
|
+
var UiSheet = class UiSheet extends UiModalRoot {
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
11
|
+
minVersion: "12.0.0",
|
|
12
|
+
version: "22.2.2",
|
|
13
|
+
ngImport: i0,
|
|
14
|
+
type: UiSheet,
|
|
15
|
+
deps: null,
|
|
16
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
17
|
+
});
|
|
18
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
19
|
+
minVersion: "14.0.0",
|
|
20
|
+
version: "22.2.2",
|
|
21
|
+
type: UiSheet,
|
|
22
|
+
isStandalone: true,
|
|
23
|
+
selector: "[uiSheet], ui-sheet",
|
|
24
|
+
exportAs: ["uiSheet"],
|
|
25
|
+
usesInheritance: true,
|
|
26
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
27
|
+
ngImport: i0
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
31
|
+
minVersion: "12.0.0",
|
|
32
|
+
version: "22.2.2",
|
|
33
|
+
ngImport: i0,
|
|
34
|
+
type: UiSheet,
|
|
35
|
+
decorators: [{
|
|
36
|
+
type: Directive,
|
|
37
|
+
args: [{
|
|
38
|
+
selector: "[uiSheet], ui-sheet",
|
|
39
|
+
hostDirectives: [UiElementHost],
|
|
40
|
+
exportAs: "uiSheet"
|
|
41
|
+
}]
|
|
42
|
+
}]
|
|
43
|
+
});
|
|
44
|
+
var UiSheetTrigger = class UiSheetTrigger {
|
|
45
|
+
root = inject(UiSheet);
|
|
46
|
+
constructor() {
|
|
47
|
+
this.root.trigger.set(inject(ElementRef).nativeElement);
|
|
48
|
+
}
|
|
49
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
50
|
+
minVersion: "12.0.0",
|
|
51
|
+
version: "22.2.2",
|
|
52
|
+
ngImport: i0,
|
|
53
|
+
type: UiSheetTrigger,
|
|
54
|
+
deps: [],
|
|
55
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
56
|
+
});
|
|
57
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
58
|
+
minVersion: "14.0.0",
|
|
59
|
+
version: "22.2.2",
|
|
60
|
+
type: UiSheetTrigger,
|
|
61
|
+
isStandalone: true,
|
|
62
|
+
selector: "[uiSheetTrigger], ui-sheet-trigger",
|
|
63
|
+
host: {
|
|
64
|
+
attributes: {
|
|
65
|
+
"data-slot": "sheet-trigger",
|
|
66
|
+
"aria-haspopup": "dialog"
|
|
67
|
+
},
|
|
68
|
+
listeners: { "click": "root.toggle()" },
|
|
69
|
+
properties: {
|
|
70
|
+
"attr.aria-expanded": "root.open()",
|
|
71
|
+
"attr.aria-controls": "root.id",
|
|
72
|
+
"attr.data-state": "root.open() ? \"open\" : \"closed\""
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
76
|
+
ngImport: i0
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
80
|
+
minVersion: "12.0.0",
|
|
81
|
+
version: "22.2.2",
|
|
82
|
+
ngImport: i0,
|
|
83
|
+
type: UiSheetTrigger,
|
|
84
|
+
decorators: [{
|
|
85
|
+
type: Directive,
|
|
86
|
+
args: [{
|
|
87
|
+
selector: "[uiSheetTrigger], ui-sheet-trigger",
|
|
88
|
+
hostDirectives: [UiElementHost],
|
|
89
|
+
host: {
|
|
90
|
+
"data-slot": "sheet-trigger",
|
|
91
|
+
"aria-haspopup": "dialog",
|
|
92
|
+
"[attr.aria-expanded]": "root.open()",
|
|
93
|
+
"[attr.aria-controls]": "root.id",
|
|
94
|
+
"[attr.data-state]": "root.open() ? \"open\" : \"closed\"",
|
|
95
|
+
"(click)": "root.toggle()"
|
|
96
|
+
}
|
|
97
|
+
}]
|
|
98
|
+
}],
|
|
99
|
+
ctorParameters: () => []
|
|
100
|
+
});
|
|
101
|
+
var UiSheetContent = class UiSheetContent extends UiModalContentBase {
|
|
102
|
+
root = inject(UiSheet);
|
|
103
|
+
config = {
|
|
104
|
+
slot: "sheet",
|
|
105
|
+
backdropClass: OVERLAY_CLASS
|
|
106
|
+
};
|
|
107
|
+
side = input("right", ...ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []);
|
|
108
|
+
showCloseButton = input(true, {
|
|
109
|
+
...ngDevMode ? { debugName: "showCloseButton" } : /* istanbul ignore next */ {},
|
|
110
|
+
transform: booleanAttribute
|
|
111
|
+
});
|
|
112
|
+
classes = computed(() => cn(CONTENT_CLASS, this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
113
|
+
constructor() {
|
|
114
|
+
super();
|
|
115
|
+
this.init();
|
|
116
|
+
queueMicrotask(() => {
|
|
117
|
+
if (this.showCloseButton()) this.el.appendChild(this.createCloseButton());
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
createCloseButton() {
|
|
121
|
+
const btn = document.createElement("button");
|
|
122
|
+
btn.type = "button";
|
|
123
|
+
btn.setAttribute("data-slot", "sheet-close");
|
|
124
|
+
btn.setAttribute("data-variant", "ghost");
|
|
125
|
+
btn.setAttribute("data-size", "icon-sm");
|
|
126
|
+
btn.className = cn(buttonVariants({
|
|
127
|
+
variant: "ghost",
|
|
128
|
+
size: "icon-sm"
|
|
129
|
+
}), "absolute end-3 top-3");
|
|
130
|
+
btn.innerHTML = iconToSvg(LIB_ICONS["X"], { size: 16 }).replace("<svg ", "<svg class=\"size-4\" aria-hidden=\"true\" ") + "<span class=\"sr-only\">Close</span>";
|
|
131
|
+
btn.addEventListener("click", () => this.root.close());
|
|
132
|
+
return btn;
|
|
133
|
+
}
|
|
134
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
135
|
+
minVersion: "12.0.0",
|
|
136
|
+
version: "22.2.2",
|
|
137
|
+
ngImport: i0,
|
|
138
|
+
type: UiSheetContent,
|
|
139
|
+
deps: [],
|
|
140
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
141
|
+
});
|
|
142
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
143
|
+
minVersion: "17.1.0",
|
|
144
|
+
version: "22.2.2",
|
|
145
|
+
type: UiSheetContent,
|
|
146
|
+
isStandalone: true,
|
|
147
|
+
selector: "[uiSheetContent], ui-sheet-content",
|
|
148
|
+
inputs: {
|
|
149
|
+
side: {
|
|
150
|
+
classPropertyName: "side",
|
|
151
|
+
publicName: "side",
|
|
152
|
+
isSignal: true,
|
|
153
|
+
isRequired: false,
|
|
154
|
+
transformFunction: null
|
|
155
|
+
},
|
|
156
|
+
showCloseButton: {
|
|
157
|
+
classPropertyName: "showCloseButton",
|
|
158
|
+
publicName: "showCloseButton",
|
|
159
|
+
isSignal: true,
|
|
160
|
+
isRequired: false,
|
|
161
|
+
transformFunction: null
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
host: {
|
|
165
|
+
attributes: {
|
|
166
|
+
"role": "dialog",
|
|
167
|
+
"data-slot": "sheet-content",
|
|
168
|
+
"tabindex": "-1"
|
|
169
|
+
},
|
|
170
|
+
properties: {
|
|
171
|
+
"id": "root.id",
|
|
172
|
+
"attr.aria-labelledby": "root.titleId",
|
|
173
|
+
"attr.aria-describedby": "root.descriptionId",
|
|
174
|
+
"attr.data-state": "root.state()",
|
|
175
|
+
"attr.data-side": "side()",
|
|
176
|
+
"attr.class": "classes()"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
usesInheritance: true,
|
|
180
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
181
|
+
ngImport: i0
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
185
|
+
minVersion: "12.0.0",
|
|
186
|
+
version: "22.2.2",
|
|
187
|
+
ngImport: i0,
|
|
188
|
+
type: UiSheetContent,
|
|
189
|
+
decorators: [{
|
|
190
|
+
type: Directive,
|
|
191
|
+
args: [{
|
|
192
|
+
selector: "[uiSheetContent], ui-sheet-content",
|
|
193
|
+
hostDirectives: [UiElementHost],
|
|
194
|
+
host: {
|
|
195
|
+
role: "dialog",
|
|
196
|
+
"data-slot": "sheet-content",
|
|
197
|
+
tabindex: "-1",
|
|
198
|
+
"[id]": "root.id",
|
|
199
|
+
"[attr.aria-labelledby]": "root.titleId",
|
|
200
|
+
"[attr.aria-describedby]": "root.descriptionId",
|
|
201
|
+
"[attr.data-state]": "root.state()",
|
|
202
|
+
"[attr.data-side]": "side()",
|
|
203
|
+
"[attr.class]": "classes()"
|
|
204
|
+
}
|
|
205
|
+
}]
|
|
206
|
+
}],
|
|
207
|
+
ctorParameters: () => [],
|
|
208
|
+
propDecorators: {
|
|
209
|
+
side: [{
|
|
210
|
+
type: i0.Input,
|
|
211
|
+
args: [{
|
|
212
|
+
isSignal: true,
|
|
213
|
+
alias: "side",
|
|
214
|
+
required: false
|
|
215
|
+
}]
|
|
216
|
+
}],
|
|
217
|
+
showCloseButton: [{
|
|
218
|
+
type: i0.Input,
|
|
219
|
+
args: [{
|
|
220
|
+
isSignal: true,
|
|
221
|
+
alias: "showCloseButton",
|
|
222
|
+
required: false
|
|
223
|
+
}]
|
|
224
|
+
}]
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
var UiSheetHeader = class UiSheetHeader {
|
|
228
|
+
userClass = input("", {
|
|
229
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
230
|
+
alias: "class"
|
|
231
|
+
});
|
|
232
|
+
classes = computed(() => cn("flex flex-col gap-0.5 p-4", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
233
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
234
|
+
minVersion: "12.0.0",
|
|
235
|
+
version: "22.2.2",
|
|
236
|
+
ngImport: i0,
|
|
237
|
+
type: UiSheetHeader,
|
|
238
|
+
deps: [],
|
|
239
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
240
|
+
});
|
|
241
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
242
|
+
minVersion: "17.1.0",
|
|
243
|
+
version: "22.2.2",
|
|
244
|
+
type: UiSheetHeader,
|
|
245
|
+
isStandalone: true,
|
|
246
|
+
selector: "[uiSheetHeader], ui-sheet-header",
|
|
247
|
+
inputs: { userClass: {
|
|
248
|
+
classPropertyName: "userClass",
|
|
249
|
+
publicName: "class",
|
|
250
|
+
isSignal: true,
|
|
251
|
+
isRequired: false,
|
|
252
|
+
transformFunction: null
|
|
253
|
+
} },
|
|
254
|
+
host: {
|
|
255
|
+
attributes: { "data-slot": "sheet-header" },
|
|
256
|
+
properties: { "attr.class": "classes()" }
|
|
257
|
+
},
|
|
258
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
259
|
+
ngImport: i0
|
|
260
|
+
});
|
|
261
|
+
};
|
|
262
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
263
|
+
minVersion: "12.0.0",
|
|
264
|
+
version: "22.2.2",
|
|
265
|
+
ngImport: i0,
|
|
266
|
+
type: UiSheetHeader,
|
|
267
|
+
decorators: [{
|
|
268
|
+
type: Directive,
|
|
269
|
+
args: [{
|
|
270
|
+
selector: "[uiSheetHeader], ui-sheet-header",
|
|
271
|
+
hostDirectives: [UiElementHost],
|
|
272
|
+
host: {
|
|
273
|
+
"data-slot": "sheet-header",
|
|
274
|
+
"[attr.class]": "classes()"
|
|
275
|
+
}
|
|
276
|
+
}]
|
|
277
|
+
}],
|
|
278
|
+
propDecorators: { userClass: [{
|
|
279
|
+
type: i0.Input,
|
|
280
|
+
args: [{
|
|
281
|
+
isSignal: true,
|
|
282
|
+
alias: "class",
|
|
283
|
+
required: false
|
|
284
|
+
}]
|
|
285
|
+
}] }
|
|
286
|
+
});
|
|
287
|
+
var UiSheetFooter = class UiSheetFooter {
|
|
288
|
+
userClass = input("", {
|
|
289
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
290
|
+
alias: "class"
|
|
291
|
+
});
|
|
292
|
+
classes = computed(() => cn("mt-auto flex flex-col gap-2 p-4", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
293
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
294
|
+
minVersion: "12.0.0",
|
|
295
|
+
version: "22.2.2",
|
|
296
|
+
ngImport: i0,
|
|
297
|
+
type: UiSheetFooter,
|
|
298
|
+
deps: [],
|
|
299
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
300
|
+
});
|
|
301
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
302
|
+
minVersion: "17.1.0",
|
|
303
|
+
version: "22.2.2",
|
|
304
|
+
type: UiSheetFooter,
|
|
305
|
+
isStandalone: true,
|
|
306
|
+
selector: "[uiSheetFooter], ui-sheet-footer",
|
|
307
|
+
inputs: { userClass: {
|
|
308
|
+
classPropertyName: "userClass",
|
|
309
|
+
publicName: "class",
|
|
310
|
+
isSignal: true,
|
|
311
|
+
isRequired: false,
|
|
312
|
+
transformFunction: null
|
|
313
|
+
} },
|
|
314
|
+
host: {
|
|
315
|
+
attributes: { "data-slot": "sheet-footer" },
|
|
316
|
+
properties: { "attr.class": "classes()" }
|
|
317
|
+
},
|
|
318
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
319
|
+
ngImport: i0
|
|
320
|
+
});
|
|
321
|
+
};
|
|
322
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
323
|
+
minVersion: "12.0.0",
|
|
324
|
+
version: "22.2.2",
|
|
325
|
+
ngImport: i0,
|
|
326
|
+
type: UiSheetFooter,
|
|
327
|
+
decorators: [{
|
|
328
|
+
type: Directive,
|
|
329
|
+
args: [{
|
|
330
|
+
selector: "[uiSheetFooter], ui-sheet-footer",
|
|
331
|
+
hostDirectives: [UiElementHost],
|
|
332
|
+
host: {
|
|
333
|
+
"data-slot": "sheet-footer",
|
|
334
|
+
"[attr.class]": "classes()"
|
|
335
|
+
}
|
|
336
|
+
}]
|
|
337
|
+
}],
|
|
338
|
+
propDecorators: { userClass: [{
|
|
339
|
+
type: i0.Input,
|
|
340
|
+
args: [{
|
|
341
|
+
isSignal: true,
|
|
342
|
+
alias: "class",
|
|
343
|
+
required: false
|
|
344
|
+
}]
|
|
345
|
+
}] }
|
|
346
|
+
});
|
|
347
|
+
var UiSheetTitle = class UiSheetTitle {
|
|
348
|
+
root = inject(UiSheet);
|
|
349
|
+
userClass = input("", {
|
|
350
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
351
|
+
alias: "class"
|
|
352
|
+
});
|
|
353
|
+
classes = computed(() => cn("text-base font-medium text-foreground", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
354
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
355
|
+
minVersion: "12.0.0",
|
|
356
|
+
version: "22.2.2",
|
|
357
|
+
ngImport: i0,
|
|
358
|
+
type: UiSheetTitle,
|
|
359
|
+
deps: [],
|
|
360
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
361
|
+
});
|
|
362
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
363
|
+
minVersion: "17.1.0",
|
|
364
|
+
version: "22.2.2",
|
|
365
|
+
type: UiSheetTitle,
|
|
366
|
+
isStandalone: true,
|
|
367
|
+
selector: "[uiSheetTitle], ui-sheet-title",
|
|
368
|
+
inputs: { userClass: {
|
|
369
|
+
classPropertyName: "userClass",
|
|
370
|
+
publicName: "class",
|
|
371
|
+
isSignal: true,
|
|
372
|
+
isRequired: false,
|
|
373
|
+
transformFunction: null
|
|
374
|
+
} },
|
|
375
|
+
host: {
|
|
376
|
+
attributes: { "data-slot": "sheet-title" },
|
|
377
|
+
properties: {
|
|
378
|
+
"id": "root.titleId",
|
|
379
|
+
"attr.class": "classes()"
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
383
|
+
ngImport: i0
|
|
384
|
+
});
|
|
385
|
+
};
|
|
386
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
387
|
+
minVersion: "12.0.0",
|
|
388
|
+
version: "22.2.2",
|
|
389
|
+
ngImport: i0,
|
|
390
|
+
type: UiSheetTitle,
|
|
391
|
+
decorators: [{
|
|
392
|
+
type: Directive,
|
|
393
|
+
args: [{
|
|
394
|
+
selector: "[uiSheetTitle], ui-sheet-title",
|
|
395
|
+
hostDirectives: [UiElementHost],
|
|
396
|
+
host: {
|
|
397
|
+
"data-slot": "sheet-title",
|
|
398
|
+
"[id]": "root.titleId",
|
|
399
|
+
"[attr.class]": "classes()"
|
|
400
|
+
}
|
|
401
|
+
}]
|
|
402
|
+
}],
|
|
403
|
+
propDecorators: { userClass: [{
|
|
404
|
+
type: i0.Input,
|
|
405
|
+
args: [{
|
|
406
|
+
isSignal: true,
|
|
407
|
+
alias: "class",
|
|
408
|
+
required: false
|
|
409
|
+
}]
|
|
410
|
+
}] }
|
|
411
|
+
});
|
|
412
|
+
var UiSheetDescription = class UiSheetDescription {
|
|
413
|
+
root = inject(UiSheet);
|
|
414
|
+
userClass = input("", {
|
|
415
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
416
|
+
alias: "class"
|
|
417
|
+
});
|
|
418
|
+
classes = computed(() => cn("text-sm text-muted-foreground", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
419
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
420
|
+
minVersion: "12.0.0",
|
|
421
|
+
version: "22.2.2",
|
|
422
|
+
ngImport: i0,
|
|
423
|
+
type: UiSheetDescription,
|
|
424
|
+
deps: [],
|
|
425
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
426
|
+
});
|
|
427
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
428
|
+
minVersion: "17.1.0",
|
|
429
|
+
version: "22.2.2",
|
|
430
|
+
type: UiSheetDescription,
|
|
431
|
+
isStandalone: true,
|
|
432
|
+
selector: "[uiSheetDescription], ui-sheet-description",
|
|
433
|
+
inputs: { userClass: {
|
|
434
|
+
classPropertyName: "userClass",
|
|
435
|
+
publicName: "class",
|
|
436
|
+
isSignal: true,
|
|
437
|
+
isRequired: false,
|
|
438
|
+
transformFunction: null
|
|
439
|
+
} },
|
|
440
|
+
host: {
|
|
441
|
+
attributes: { "data-slot": "sheet-description" },
|
|
442
|
+
properties: {
|
|
443
|
+
"id": "root.descriptionId",
|
|
444
|
+
"attr.class": "classes()"
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
448
|
+
ngImport: i0
|
|
449
|
+
});
|
|
450
|
+
};
|
|
451
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
452
|
+
minVersion: "12.0.0",
|
|
453
|
+
version: "22.2.2",
|
|
454
|
+
ngImport: i0,
|
|
455
|
+
type: UiSheetDescription,
|
|
456
|
+
decorators: [{
|
|
457
|
+
type: Directive,
|
|
458
|
+
args: [{
|
|
459
|
+
selector: "[uiSheetDescription], ui-sheet-description",
|
|
460
|
+
hostDirectives: [UiElementHost],
|
|
461
|
+
host: {
|
|
462
|
+
"data-slot": "sheet-description",
|
|
463
|
+
"[id]": "root.descriptionId",
|
|
464
|
+
"[attr.class]": "classes()"
|
|
465
|
+
}
|
|
466
|
+
}]
|
|
467
|
+
}],
|
|
468
|
+
propDecorators: { userClass: [{
|
|
469
|
+
type: i0.Input,
|
|
470
|
+
args: [{
|
|
471
|
+
isSignal: true,
|
|
472
|
+
alias: "class",
|
|
473
|
+
required: false
|
|
474
|
+
}]
|
|
475
|
+
}] }
|
|
476
|
+
});
|
|
477
|
+
var UiSheetClose = class UiSheetClose {
|
|
478
|
+
root = inject(UiSheet);
|
|
479
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
480
|
+
minVersion: "12.0.0",
|
|
481
|
+
version: "22.2.2",
|
|
482
|
+
ngImport: i0,
|
|
483
|
+
type: UiSheetClose,
|
|
484
|
+
deps: [],
|
|
485
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
486
|
+
});
|
|
487
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
488
|
+
minVersion: "14.0.0",
|
|
489
|
+
version: "22.2.2",
|
|
490
|
+
type: UiSheetClose,
|
|
491
|
+
isStandalone: true,
|
|
492
|
+
selector: "[uiSheetClose], ui-sheet-close",
|
|
493
|
+
host: {
|
|
494
|
+
attributes: { "data-slot": "sheet-close" },
|
|
495
|
+
listeners: { "click": "root.close()" }
|
|
496
|
+
},
|
|
497
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
498
|
+
ngImport: i0
|
|
499
|
+
});
|
|
500
|
+
};
|
|
501
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
502
|
+
minVersion: "12.0.0",
|
|
503
|
+
version: "22.2.2",
|
|
504
|
+
ngImport: i0,
|
|
505
|
+
type: UiSheetClose,
|
|
506
|
+
decorators: [{
|
|
507
|
+
type: Directive,
|
|
508
|
+
args: [{
|
|
509
|
+
selector: "[uiSheetClose], ui-sheet-close",
|
|
510
|
+
hostDirectives: [UiElementHost],
|
|
511
|
+
host: {
|
|
512
|
+
"data-slot": "sheet-close",
|
|
513
|
+
"(click)": "root.close()"
|
|
514
|
+
}
|
|
515
|
+
}]
|
|
516
|
+
}]
|
|
517
|
+
});
|
|
518
|
+
const UI_SHEET = [
|
|
519
|
+
UiSheet,
|
|
520
|
+
UiSheetTrigger,
|
|
521
|
+
UiSheetContent,
|
|
522
|
+
UiSheetHeader,
|
|
523
|
+
UiSheetFooter,
|
|
524
|
+
UiSheetTitle,
|
|
525
|
+
UiSheetDescription,
|
|
526
|
+
UiSheetClose
|
|
527
|
+
];
|
|
528
|
+
export { UI_SHEET, UiSheet, UiSheetClose, UiSheetContent, UiSheetDescription, UiSheetFooter, UiSheetHeader, UiSheetTitle, UiSheetTrigger };
|
|
529
|
+
|
|
530
|
+
//# sourceMappingURL=loomui-ng-ui-sheet.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loomui-ng-ui-sheet.mjs","names":[],"sources":["../../../libs/ui/sheet/sheet.ts"],"sourcesContent":["import { computed, Directive, ElementRef, inject, input, booleanAttribute } from '@angular/core';\nimport { buttonVariants } from '@loomui-ng/ui/button';\nimport { cn } from '@loomui-ng/ui/utils';\nimport { UiModalContentBase, UiModalRoot, type ModalContentConfig } from '@loomui-ng/ui/utils';\nimport { iconToSvg, LIB_ICONS } from '@loomui-ng/ui/icon';\nimport { UiElementHost } from '@loomui-ng/ui/utils';\n\nconst OVERLAY_CLASS =\n 'fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0';\n\n// Observed classes use physical left-0/right-0 with border-e/border-s (logical). In RTL a \"left\" sheet would\n// stay on the left; we keep the observed physical positioning (deviation note in docs/behavior-specs/sheet.md).\nconst CONTENT_CLASS =\n 'fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10';\n\n/** <div uiSheet [(open)]=\"o\"> <button uiSheetTrigger/> <div uiSheetContent side=\"right\">…</div> </div> */\n@Directive({ selector: '[uiSheet], ui-sheet', hostDirectives: [UiElementHost], exportAs: 'uiSheet' })\nexport class UiSheet extends UiModalRoot {}\n\n@Directive({\n selector: '[uiSheetTrigger], ui-sheet-trigger', hostDirectives: [UiElementHost],\n host: {\n 'data-slot': 'sheet-trigger',\n 'aria-haspopup': 'dialog',\n '[attr.aria-expanded]': 'root.open()',\n '[attr.aria-controls]': 'root.id',\n '[attr.data-state]': 'root.open() ? \"open\" : \"closed\"',\n '(click)': 'root.toggle()',\n },\n})\nexport class UiSheetTrigger {\n protected readonly root = inject(UiSheet);\n constructor() {\n this.root.trigger.set(inject<ElementRef<HTMLElement>>(ElementRef).nativeElement);\n }\n}\n\n@Directive({\n selector: '[uiSheetContent], ui-sheet-content', hostDirectives: [UiElementHost],\n host: {\n role: 'dialog',\n 'data-slot': 'sheet-content',\n tabindex: '-1',\n '[id]': 'root.id',\n '[attr.aria-labelledby]': 'root.titleId',\n '[attr.aria-describedby]': 'root.descriptionId',\n '[attr.data-state]': 'root.state()',\n '[attr.data-side]': 'side()',\n '[attr.class]': 'classes()',\n },\n})\nexport class UiSheetContent extends UiModalContentBase {\n protected readonly root = inject(UiSheet);\n protected readonly config: ModalContentConfig = { slot: 'sheet', backdropClass: OVERLAY_CLASS };\n readonly side = input<'top' | 'right' | 'bottom' | 'left'>('right');\n readonly showCloseButton = input(true, { transform: booleanAttribute });\n protected readonly classes = computed(() => cn(CONTENT_CLASS, this.userClass()));\n\n constructor() {\n super();\n this.init();\n queueMicrotask(() => {\n if (this.showCloseButton()) this.el.appendChild(this.createCloseButton());\n });\n }\n\n private createCloseButton(): HTMLButtonElement {\n const btn = document.createElement('button');\n btn.type = 'button';\n btn.setAttribute('data-slot', 'sheet-close');\n btn.setAttribute('data-variant', 'ghost');\n btn.setAttribute('data-size', 'icon-sm');\n btn.className = cn(buttonVariants({ variant: 'ghost', size: 'icon-sm' }), 'absolute end-3 top-3');\n btn.innerHTML = iconToSvg(LIB_ICONS['X'], { size: 16 }).replace('<svg ', '<svg class=\"size-4\" aria-hidden=\"true\" ') + '<span class=\"sr-only\">Close</span>';\n btn.addEventListener('click', () => this.root.close());\n return btn;\n }\n}\n\n@Directive({\n selector: '[uiSheetHeader], ui-sheet-header', hostDirectives: [UiElementHost],\n host: { 'data-slot': 'sheet-header', '[attr.class]': 'classes()' },\n})\nexport class UiSheetHeader {\n readonly userClass = input<string>('', { alias: 'class' });\n protected readonly classes = computed(() => cn('flex flex-col gap-0.5 p-4', this.userClass()));\n}\n\n@Directive({\n selector: '[uiSheetFooter], ui-sheet-footer', hostDirectives: [UiElementHost],\n host: { 'data-slot': 'sheet-footer', '[attr.class]': 'classes()' },\n})\nexport class UiSheetFooter {\n readonly userClass = input<string>('', { alias: 'class' });\n protected readonly classes = computed(() => cn('mt-auto flex flex-col gap-2 p-4', this.userClass()));\n}\n\n@Directive({\n selector: '[uiSheetTitle], ui-sheet-title', hostDirectives: [UiElementHost],\n host: { 'data-slot': 'sheet-title', '[id]': 'root.titleId', '[attr.class]': 'classes()' },\n})\nexport class UiSheetTitle {\n protected readonly root = inject(UiSheet);\n readonly userClass = input<string>('', { alias: 'class' });\n protected readonly classes = computed(() => cn('text-base font-medium text-foreground', this.userClass()));\n}\n\n@Directive({\n selector: '[uiSheetDescription], ui-sheet-description', hostDirectives: [UiElementHost],\n host: { 'data-slot': 'sheet-description', '[id]': 'root.descriptionId', '[attr.class]': 'classes()' },\n})\nexport class UiSheetDescription {\n protected readonly root = inject(UiSheet);\n readonly userClass = input<string>('', { alias: 'class' });\n protected readonly classes = computed(() => cn('text-sm text-muted-foreground', this.userClass()));\n}\n\n@Directive({\n selector: '[uiSheetClose], ui-sheet-close', hostDirectives: [UiElementHost],\n host: { 'data-slot': 'sheet-close', '(click)': 'root.close()' },\n})\nexport class UiSheetClose {\n protected readonly root = inject(UiSheet);\n}\n\nexport const UI_SHEET = [\n UiSheet,\n UiSheetTrigger,\n UiSheetContent,\n UiSheetHeader,\n UiSheetFooter,\n UiSheetTitle,\n UiSheetDescription,\n UiSheetClose,\n] as const;\n"],"mappings":";;;;;;AAOA,MAAM,gBACJ;AAIF,MAAM,gBACJ;AAIF,IAAa,UAAb,MAAa,gBAAgB,YAAW;CAA3B,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAO,MAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAP,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAO,cAAA;EAAA,UAAA;EAAA,UAAA,CAAA,SAAA;EAAA,iBAAA;EAAA,gBAAA,CAAA,EAAA,WAAA,GAAA,cAAA,CAAA;EAAA,UAAA;CAAA,CAAA;;AAAP,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAO,YAAA,CAAA;EADnB,MAAA;EAAU,MAAA,CAAA;GAAE,UAAU;GAAuB,gBAAgB,CAAC,aAAa;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