@ojiepermana/angular-component 22.0.27
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/README.md +82 -0
- package/accordion/README.md +193 -0
- package/alert/README.md +180 -0
- package/alert-dialog/README.md +239 -0
- package/aspect-ratio/README.md +112 -0
- package/avatar/README.md +176 -0
- package/badge/README.md +133 -0
- package/breadcrumb/README.md +216 -0
- package/button/README.md +139 -0
- package/button-group/README.md +208 -0
- package/calendar/README.md +135 -0
- package/card/README.md +220 -0
- package/carousel/README.md +276 -0
- package/checkbox/README.md +149 -0
- package/collapsible/README.md +195 -0
- package/combobox/README.md +198 -0
- package/command/README.md +275 -0
- package/composer/README.md +235 -0
- package/context-menu/README.md +267 -0
- package/date-picker/README.md +179 -0
- package/dialog/README.md +235 -0
- package/drawer/README.md +145 -0
- package/dropdown-menu/README.md +311 -0
- package/editor/README.md +136 -0
- package/empty/README.md +183 -0
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +186 -0
- package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +276 -0
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-alert.mjs +99 -0
- package/fesm2022/ojiepermana-angular-component-alert.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +37 -0
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +139 -0
- package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-badge.mjs +50 -0
- package/fesm2022/ojiepermana-angular-component-badge.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +200 -0
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +103 -0
- package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-button.mjs +68 -0
- package/fesm2022/ojiepermana-angular-component-button.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +103 -0
- package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-card.mjs +152 -0
- package/fesm2022/ojiepermana-angular-component-card.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +334 -0
- package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +165 -0
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +121 -0
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +274 -0
- package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-command.mjs +297 -0
- package/fesm2022/ojiepermana-angular-component-command.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-composer.mjs +352 -0
- package/fesm2022/ojiepermana-angular-component-composer.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +108 -0
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +186 -0
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +283 -0
- package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +6 -0
- package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +494 -0
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-editor.mjs +680 -0
- package/fesm2022/ojiepermana-angular-component-editor.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-empty.mjs +145 -0
- package/fesm2022/ojiepermana-angular-component-empty.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-form.mjs +364 -0
- package/fesm2022/ojiepermana-angular-component-form.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +275 -0
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-icon.mjs +86 -0
- package/fesm2022/ojiepermana-angular-component-icon.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +179 -0
- package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +517 -0
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-input.mjs +45 -0
- package/fesm2022/ojiepermana-angular-component-input.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-item.mjs +264 -0
- package/fesm2022/ojiepermana-angular-component-item.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +314 -0
- package/fesm2022/ojiepermana-angular-component-kanban.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +55 -0
- package/fesm2022/ojiepermana-angular-component-kbd.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-label.mjs +33 -0
- package/fesm2022/ojiepermana-angular-component-label.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +311 -0
- package/fesm2022/ojiepermana-angular-component-menubar.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +67 -0
- package/fesm2022/ojiepermana-angular-component-native-select.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +408 -0
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +226 -0
- package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +810 -0
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-popover.mjs +145 -0
- package/fesm2022/ojiepermana-angular-component-popover.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-progress.mjs +60 -0
- package/fesm2022/ojiepermana-angular-component-progress.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-radio.mjs +173 -0
- package/fesm2022/ojiepermana-angular-component-radio.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +478 -0
- package/fesm2022/ojiepermana-angular-component-resizable.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +54 -0
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-select.mjs +297 -0
- package/fesm2022/ojiepermana-angular-component-select.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-separator.mjs +37 -0
- package/fesm2022/ojiepermana-angular-component-separator.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +297 -0
- package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +31 -0
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-slider.mjs +423 -0
- package/fesm2022/ojiepermana-angular-component-slider.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +60 -0
- package/fesm2022/ojiepermana-angular-component-spinner.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-switch.mjs +140 -0
- package/fesm2022/ojiepermana-angular-component-switch.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-table.mjs +155 -0
- package/fesm2022/ojiepermana-angular-component-table.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +271 -0
- package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +39 -0
- package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -0
- package/fesm2022/ojiepermana-angular-component-timeline.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-toast.mjs +161 -0
- package/fesm2022/ojiepermana-angular-component-toast.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +289 -0
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +82 -0
- package/fesm2022/ojiepermana-angular-component-toggle.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +410 -0
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-utils.mjs +81 -0
- package/fesm2022/ojiepermana-angular-component-utils.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component.mjs +11 -0
- package/fesm2022/ojiepermana-angular-component.mjs.map +1 -0
- package/form/README.md +210 -0
- package/hover-card/README.md +142 -0
- package/icon/README.md +25 -0
- package/input/README.md +159 -0
- package/input-group/README.md +237 -0
- package/input-otp/README.md +278 -0
- package/item/README.md +247 -0
- package/kanban/README.md +81 -0
- package/kbd/README.md +139 -0
- package/label/README.md +135 -0
- package/menubar/README.md +269 -0
- package/native-select/README.md +176 -0
- package/navigation-menu/README.md +160 -0
- package/package.json +291 -0
- package/pagination/README.md +144 -0
- package/pillbox/README.md +67 -0
- package/popover/README.md +43 -0
- package/progress/README.md +160 -0
- package/radio/README.md +209 -0
- package/resizable/README.md +168 -0
- package/scroll-area/README.md +143 -0
- package/select/README.md +174 -0
- package/separator/README.md +170 -0
- package/sheet/README.md +183 -0
- package/skeleton/README.md +158 -0
- package/slider/README.md +207 -0
- package/spinner/README.md +160 -0
- package/switch/README.md +166 -0
- package/table/README.md +291 -0
- package/tabs/README.md +214 -0
- package/textarea/README.md +153 -0
- package/timeline/README.md +94 -0
- package/toast/README.md +321 -0
- package/toggle/README.md +131 -0
- package/toggle-group/README.md +206 -0
- package/tooltip/README.md +207 -0
- package/types/ojiepermana-angular-component-accordion.d.ts +51 -0
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +93 -0
- package/types/ojiepermana-angular-component-alert.d.ts +37 -0
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +12 -0
- package/types/ojiepermana-angular-component-avatar.d.ts +51 -0
- package/types/ojiepermana-angular-component-badge.d.ts +19 -0
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +46 -0
- package/types/ojiepermana-angular-component-button-group.d.ts +26 -0
- package/types/ojiepermana-angular-component-button.d.ts +22 -0
- package/types/ojiepermana-angular-component-calendar.d.ts +39 -0
- package/types/ojiepermana-angular-component-card.d.ts +60 -0
- package/types/ojiepermana-angular-component-carousel.d.ts +86 -0
- package/types/ojiepermana-angular-component-checkbox.d.ts +42 -0
- package/types/ojiepermana-angular-component-collapsible.d.ts +42 -0
- package/types/ojiepermana-angular-component-combobox.d.ts +53 -0
- package/types/ojiepermana-angular-component-command.d.ts +102 -0
- package/types/ojiepermana-angular-component-composer.d.ts +90 -0
- package/types/ojiepermana-angular-component-context-menu.d.ts +36 -0
- package/types/ojiepermana-angular-component-date-picker.d.ts +48 -0
- package/types/ojiepermana-angular-component-dialog.d.ts +87 -0
- package/types/ojiepermana-angular-component-drawer.d.ts +1 -0
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +140 -0
- package/types/ojiepermana-angular-component-editor.d.ts +126 -0
- package/types/ojiepermana-angular-component-empty.d.ts +50 -0
- package/types/ojiepermana-angular-component-form.d.ts +140 -0
- package/types/ojiepermana-angular-component-hover-card.d.ts +75 -0
- package/types/ojiepermana-angular-component-icon.d.ts +31 -0
- package/types/ojiepermana-angular-component-input-group.d.ts +51 -0
- package/types/ojiepermana-angular-component-input-otp.d.ts +142 -0
- package/types/ojiepermana-angular-component-input.d.ts +16 -0
- package/types/ojiepermana-angular-component-item.d.ts +88 -0
- package/types/ojiepermana-angular-component-kanban.d.ts +70 -0
- package/types/ojiepermana-angular-component-kbd.d.ts +16 -0
- package/types/ojiepermana-angular-component-label.d.ts +11 -0
- package/types/ojiepermana-angular-component-menubar.d.ts +69 -0
- package/types/ojiepermana-angular-component-native-select.d.ts +26 -0
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +98 -0
- package/types/ojiepermana-angular-component-pagination.d.ts +33 -0
- package/types/ojiepermana-angular-component-pillbox.d.ts +156 -0
- package/types/ojiepermana-angular-component-popover.d.ts +50 -0
- package/types/ojiepermana-angular-component-progress.d.ts +17 -0
- package/types/ojiepermana-angular-component-radio.d.ts +57 -0
- package/types/ojiepermana-angular-component-resizable.d.ts +99 -0
- package/types/ojiepermana-angular-component-scroll-area.d.ts +19 -0
- package/types/ojiepermana-angular-component-select.d.ts +56 -0
- package/types/ojiepermana-angular-component-separator.d.ts +14 -0
- package/types/ojiepermana-angular-component-sheet.d.ts +78 -0
- package/types/ojiepermana-angular-component-skeleton.d.ts +10 -0
- package/types/ojiepermana-angular-component-slider.d.ts +74 -0
- package/types/ojiepermana-angular-component-spinner.d.ts +13 -0
- package/types/ojiepermana-angular-component-switch.d.ts +44 -0
- package/types/ojiepermana-angular-component-table.d.ts +52 -0
- package/types/ojiepermana-angular-component-tabs.d.ts +92 -0
- package/types/ojiepermana-angular-component-textarea.d.ts +12 -0
- package/types/ojiepermana-angular-component-timeline.d.ts +63 -0
- package/types/ojiepermana-angular-component-toast.d.ts +51 -0
- package/types/ojiepermana-angular-component-toggle-group.d.ts +89 -0
- package/types/ojiepermana-angular-component-toggle.d.ts +25 -0
- package/types/ojiepermana-angular-component-tooltip.d.ts +101 -0
- package/types/ojiepermana-angular-component-utils.d.ts +30 -0
- package/types/ojiepermana-angular-component.d.ts +2 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { model, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { cn } from '@ojiepermana/angular-component/utils';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
const toggleVariants = cva([
|
|
7
|
+
'group/toggle inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md',
|
|
8
|
+
'text-sm font-medium transition-colors',
|
|
9
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
10
|
+
'disabled:pointer-events-none disabled:opacity-50',
|
|
11
|
+
'[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
12
|
+
].join(' '), {
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
default: [
|
|
16
|
+
'bg-transparent text-foreground',
|
|
17
|
+
'hover:bg-muted hover:text-muted-foreground',
|
|
18
|
+
'data-[state=on]:bg-accent data-[state=on]:text-accent-foreground',
|
|
19
|
+
].join(' '),
|
|
20
|
+
outline: [
|
|
21
|
+
'border border-input bg-transparent text-foreground shadow-sm',
|
|
22
|
+
'hover:bg-accent hover:text-accent-foreground',
|
|
23
|
+
'data-[state=on]:bg-accent data-[state=on]:text-accent-foreground',
|
|
24
|
+
].join(' '),
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
sm: 'h-8 min-w-8 px-2.5 text-xs',
|
|
28
|
+
default: 'h-9 min-w-9 px-3',
|
|
29
|
+
lg: 'h-10 min-w-10 px-3.5',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: { variant: 'default', size: 'default' },
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
class ToggleComponent {
|
|
36
|
+
pressed = model(false, /* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [{ debugName: "pressed" }] : /* istanbul ignore next */ []));
|
|
38
|
+
disabled = input(false, /* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
40
|
+
variant = input('default', /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
42
|
+
size = input('default', /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
44
|
+
class = input('', /* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
46
|
+
classes = computed(() => cn(toggleVariants({ variant: this.variant(), size: this.size() }), this.class()), /* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
48
|
+
toggle() {
|
|
49
|
+
if (this.disabled()) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this.pressed.update((pressed) => !pressed);
|
|
53
|
+
}
|
|
54
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
55
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: ToggleComponent, isStandalone: true, selector: "button[Toggle]", inputs: { pressed: { classPropertyName: "pressed", publicName: "pressed", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressedChange" }, host: { attributes: { "type": "button" }, listeners: { "click": "toggle()" }, properties: { "class": "classes()", "attr.aria-pressed": "pressed()", "attr.data-disabled": "disabled() ? \"\" : null", "attr.data-size": "size()", "attr.data-state": "pressed() ? \"on\" : \"off\"", "attr.data-variant": "variant()", "disabled": "disabled() || null" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
56
|
+
}
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ToggleComponent, decorators: [{
|
|
58
|
+
type: Component,
|
|
59
|
+
args: [{
|
|
60
|
+
selector: 'button[Toggle]',
|
|
61
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
62
|
+
host: {
|
|
63
|
+
'[class]': 'classes()',
|
|
64
|
+
type: 'button',
|
|
65
|
+
'[attr.aria-pressed]': 'pressed()',
|
|
66
|
+
'[attr.data-disabled]': 'disabled() ? "" : null',
|
|
67
|
+
'[attr.data-size]': 'size()',
|
|
68
|
+
'[attr.data-state]': 'pressed() ? "on" : "off"',
|
|
69
|
+
'[attr.data-variant]': 'variant()',
|
|
70
|
+
'[disabled]': 'disabled() || null',
|
|
71
|
+
'(click)': 'toggle()',
|
|
72
|
+
},
|
|
73
|
+
template: `<ng-content />`,
|
|
74
|
+
}]
|
|
75
|
+
}], propDecorators: { pressed: [{ type: i0.Input, args: [{ isSignal: true, alias: "pressed", required: false }] }, { type: i0.Output, args: ["pressedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Generated bundle index. Do not edit.
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
export { ToggleComponent, toggleVariants };
|
|
82
|
+
//# sourceMappingURL=ojiepermana-angular-component-toggle.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ojiepermana-angular-component-toggle.mjs","sources":["../../../library/component/toggle/toggle.variants.ts","../../../library/component/toggle/toggle.component.ts","../../../library/component/toggle/ojiepermana-angular-component-toggle.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const toggleVariants = cva(\n [\n 'group/toggle inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md',\n 'text-sm font-medium transition-colors',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n 'disabled:pointer-events-none disabled:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n ].join(' '),\n {\n variants: {\n variant: {\n default: [\n 'bg-transparent text-foreground',\n 'hover:bg-muted hover:text-muted-foreground',\n 'data-[state=on]:bg-accent data-[state=on]:text-accent-foreground',\n ].join(' '),\n outline: [\n 'border border-input bg-transparent text-foreground shadow-sm',\n 'hover:bg-accent hover:text-accent-foreground',\n 'data-[state=on]:bg-accent data-[state=on]:text-accent-foreground',\n ].join(' '),\n },\n size: {\n sm: 'h-8 min-w-8 px-2.5 text-xs',\n default: 'h-9 min-w-9 px-3',\n lg: 'h-10 min-w-10 px-3.5',\n },\n },\n defaultVariants: { variant: 'default', size: 'default' },\n },\n);\n\nexport type ToggleVariant = NonNullable<VariantProps<typeof toggleVariants>['variant']>;\nexport type ToggleSize = NonNullable<VariantProps<typeof toggleVariants>['size']>;\n","import { ChangeDetectionStrategy, Component, computed, input, model } from '@angular/core';\nimport { cn } from '@ojiepermana/angular-component/utils';\nimport { type ToggleSize, toggleVariants, type ToggleVariant } from './toggle.variants';\n\n@Component({\n selector: 'button[Toggle]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n type: 'button',\n '[attr.aria-pressed]': 'pressed()',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n '[attr.data-size]': 'size()',\n '[attr.data-state]': 'pressed() ? \"on\" : \"off\"',\n '[attr.data-variant]': 'variant()',\n '[disabled]': 'disabled() || null',\n '(click)': 'toggle()',\n },\n template: `<ng-content />`,\n})\nexport class ToggleComponent {\n readonly pressed = model(false);\n readonly disabled = input(false);\n readonly variant = input<ToggleVariant>('default');\n readonly size = input<ToggleSize>('default');\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn(toggleVariants({ variant: this.variant(), size: this.size() }), this.class()),\n );\n\n toggle(): void {\n if (this.disabled()) {\n return;\n }\n\n this.pressed.update((pressed) => !pressed);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAEO,MAAM,cAAc,GAAG,GAAG,CAC/B;IACE,wGAAwG;IACxG,uCAAuC;IACvC,yEAAyE;IACzE,kDAAkD;IAClD,6DAA6D;AAC9D,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC,EACX;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE;gBACP,gCAAgC;gBAChC,4CAA4C;gBAC5C,kEAAkE;aACnE,CAAC,IAAI,CAAC,GAAG,CAAC;AACX,YAAA,OAAO,EAAE;gBACP,8DAA8D;gBAC9D,8CAA8C;gBAC9C,kEAAkE;aACnE,CAAC,IAAI,CAAC,GAAG,CAAC;AACZ,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,4BAA4B;AAChC,YAAA,OAAO,EAAE,kBAAkB;AAC3B,YAAA,EAAE,EAAE,sBAAsB;AAC3B,SAAA;AACF,KAAA;IACD,eAAe,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;AACzD,CAAA;;MCXU,eAAe,CAAA;IACjB,OAAO,GAAG,KAAK,CAAC,KAAK;gFAAC;IACtB,QAAQ,GAAG,KAAK,CAAC,KAAK;iFAAC;IACvB,OAAO,GAAG,KAAK,CAAgB,SAAS;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;AAClC,wBAAA,YAAY,EAAE,oBAAoB;AAClC,wBAAA,SAAS,EAAE,UAAU;AACtB,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, input, forwardRef, ChangeDetectionStrategy, Component, inject, TemplateRef, Directive, ViewContainerRef, ElementRef, DestroyRef, output, signal, computed, effect } from '@angular/core';
|
|
3
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
4
|
+
import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
|
|
5
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
+
import { connectedPositionFor, oppositeSide, uniqueId, overlayDismissals } from '@ojiepermana/angular-component/utils';
|
|
7
|
+
|
|
8
|
+
const TOOLTIP_DEFAULTS = new InjectionToken('TOOLTIP_DEFAULTS');
|
|
9
|
+
class TooltipComponent {
|
|
10
|
+
side = input('top', /* @ts-ignore */
|
|
11
|
+
...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
|
|
12
|
+
align = input('center', /* @ts-ignore */
|
|
13
|
+
...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
14
|
+
sideOffset = input(4, /* @ts-ignore */
|
|
15
|
+
...(ngDevMode ? [{ debugName: "sideOffset" }] : /* istanbul ignore next */ []));
|
|
16
|
+
openDelay = input(150, /* @ts-ignore */
|
|
17
|
+
...(ngDevMode ? [{ debugName: "openDelay" }] : /* istanbul ignore next */ []));
|
|
18
|
+
closeDelay = input(0, /* @ts-ignore */
|
|
19
|
+
...(ngDevMode ? [{ debugName: "closeDelay" }] : /* istanbul ignore next */ []));
|
|
20
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: TooltipComponent, isStandalone: true, selector: "Tooltip", inputs: { side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, sideOffset: { classPropertyName: "sideOffset", publicName: "sideOffset", isSignal: true, isRequired: false, transformFunction: null }, openDelay: { classPropertyName: "openDelay", publicName: "openDelay", isSignal: true, isRequired: false, transformFunction: null }, closeDelay: { classPropertyName: "closeDelay", publicName: "closeDelay", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, providers: [{ provide: TOOLTIP_DEFAULTS, useExisting: forwardRef(() => TooltipComponent) }], ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
22
|
+
}
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
24
|
+
type: Component,
|
|
25
|
+
args: [{
|
|
26
|
+
selector: 'Tooltip',
|
|
27
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
28
|
+
providers: [{ provide: TOOLTIP_DEFAULTS, useExisting: forwardRef(() => TooltipComponent) }],
|
|
29
|
+
host: {
|
|
30
|
+
class: 'contents',
|
|
31
|
+
},
|
|
32
|
+
template: '<ng-content />',
|
|
33
|
+
}]
|
|
34
|
+
}], propDecorators: { side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], sideOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "sideOffset", required: false }] }], openDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "openDelay", required: false }] }], closeDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeDelay", required: false }] }] } });
|
|
35
|
+
|
|
36
|
+
class TooltipContentDirective {
|
|
37
|
+
template = inject(TemplateRef);
|
|
38
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: TooltipContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
39
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: TooltipContentDirective, isStandalone: true, selector: "ng-template[TooltipContent]", exportAs: ["TooltipContent"], ngImport: i0 });
|
|
40
|
+
}
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: TooltipContentDirective, decorators: [{
|
|
42
|
+
type: Directive,
|
|
43
|
+
args: [{
|
|
44
|
+
selector: 'ng-template[TooltipContent]',
|
|
45
|
+
exportAs: 'TooltipContent',
|
|
46
|
+
}]
|
|
47
|
+
}] });
|
|
48
|
+
|
|
49
|
+
const TOOLTIP_PANEL_CLASSES = [
|
|
50
|
+
'tooltip-panel',
|
|
51
|
+
'pointer-events-none',
|
|
52
|
+
'z-50',
|
|
53
|
+
'max-w-xs',
|
|
54
|
+
'overflow-hidden',
|
|
55
|
+
'rounded-md',
|
|
56
|
+
'border',
|
|
57
|
+
'border-border',
|
|
58
|
+
'bg-primary',
|
|
59
|
+
'px-3',
|
|
60
|
+
'py-1.5',
|
|
61
|
+
'text-xs',
|
|
62
|
+
'font-medium',
|
|
63
|
+
'leading-none',
|
|
64
|
+
'text-primary-foreground',
|
|
65
|
+
'shadow-md',
|
|
66
|
+
'select-none',
|
|
67
|
+
];
|
|
68
|
+
class TooltipTriggerDirective {
|
|
69
|
+
overlay = inject(Overlay);
|
|
70
|
+
vcr = inject(ViewContainerRef);
|
|
71
|
+
el = inject(ElementRef);
|
|
72
|
+
destroyRef = inject(DestroyRef);
|
|
73
|
+
defaults = inject(TOOLTIP_DEFAULTS, { optional: true });
|
|
74
|
+
TooltipTrigger = input.required(/* @ts-ignore */
|
|
75
|
+
...(ngDevMode ? [{ debugName: "TooltipTrigger" }] : /* istanbul ignore next */ []));
|
|
76
|
+
side = input(undefined, /* @ts-ignore */
|
|
77
|
+
...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
|
|
78
|
+
align = input(undefined, /* @ts-ignore */
|
|
79
|
+
...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
80
|
+
sideOffset = input(undefined, /* @ts-ignore */
|
|
81
|
+
...(ngDevMode ? [{ debugName: "sideOffset" }] : /* istanbul ignore next */ []));
|
|
82
|
+
openDelay = input(undefined, /* @ts-ignore */
|
|
83
|
+
...(ngDevMode ? [{ debugName: "openDelay" }] : /* istanbul ignore next */ []));
|
|
84
|
+
closeDelay = input(undefined, /* @ts-ignore */
|
|
85
|
+
...(ngDevMode ? [{ debugName: "closeDelay" }] : /* istanbul ignore next */ []));
|
|
86
|
+
disabled = input(false, /* @ts-ignore */
|
|
87
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
88
|
+
openedChange = output();
|
|
89
|
+
isOpen = signal(false, /* @ts-ignore */
|
|
90
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
91
|
+
contentId = signal(null, /* @ts-ignore */
|
|
92
|
+
...(ngDevMode ? [{ debugName: "contentId" }] : /* istanbul ignore next */ []));
|
|
93
|
+
overlayRef = null;
|
|
94
|
+
openTimeoutId = null;
|
|
95
|
+
closeTimeoutId = null;
|
|
96
|
+
isPointerInsideTrigger = false;
|
|
97
|
+
isTriggerFocused = false;
|
|
98
|
+
isDestroying = false;
|
|
99
|
+
constructor() {
|
|
100
|
+
this.destroyRef.onDestroy(() => {
|
|
101
|
+
this.isDestroying = true;
|
|
102
|
+
this.clearOpenTimeout();
|
|
103
|
+
this.clearCloseTimeout();
|
|
104
|
+
this.contentId.set(null);
|
|
105
|
+
this.isOpen.set(false);
|
|
106
|
+
this.overlayRef?.dispose();
|
|
107
|
+
this.overlayRef = null;
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
handlePointerEnter() {
|
|
111
|
+
if (this.disabled()) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
this.isPointerInsideTrigger = true;
|
|
115
|
+
this.clearCloseTimeout();
|
|
116
|
+
this.scheduleOpen();
|
|
117
|
+
}
|
|
118
|
+
handlePointerLeave(event) {
|
|
119
|
+
if (this.el.nativeElement.contains(event.relatedTarget)) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
this.isPointerInsideTrigger = false;
|
|
123
|
+
this.scheduleClose();
|
|
124
|
+
}
|
|
125
|
+
handleFocusIn() {
|
|
126
|
+
if (this.disabled()) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
this.isTriggerFocused = true;
|
|
130
|
+
this.clearCloseTimeout();
|
|
131
|
+
this.scheduleOpen();
|
|
132
|
+
}
|
|
133
|
+
handleFocusOut(event) {
|
|
134
|
+
if (this.el.nativeElement.contains(event.relatedTarget)) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
this.isTriggerFocused = false;
|
|
138
|
+
this.scheduleClose();
|
|
139
|
+
}
|
|
140
|
+
open() {
|
|
141
|
+
if (this.isOpen() || this.disabled()) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
const side = this.side() ?? this.defaults?.side() ?? 'top';
|
|
145
|
+
const align = this.align() ?? this.defaults?.align() ?? 'center';
|
|
146
|
+
const sideOffset = this.sideOffset() ?? this.defaults?.sideOffset() ?? 4;
|
|
147
|
+
const primary = connectedPositionFor(side, align, sideOffset);
|
|
148
|
+
const fallback = connectedPositionFor(oppositeSide(side), align, sideOffset);
|
|
149
|
+
const positionStrategy = this.overlay
|
|
150
|
+
.position()
|
|
151
|
+
.flexibleConnectedTo(this.el)
|
|
152
|
+
.withPositions([primary, fallback])
|
|
153
|
+
.withPush(false)
|
|
154
|
+
.withFlexibleDimensions(false);
|
|
155
|
+
this.overlayRef = this.overlay.create({
|
|
156
|
+
positionStrategy,
|
|
157
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
158
|
+
hasBackdrop: false,
|
|
159
|
+
panelClass: [...TOOLTIP_PANEL_CLASSES],
|
|
160
|
+
});
|
|
161
|
+
const tooltipId = uniqueId('Tooltip');
|
|
162
|
+
this.overlayRef.overlayElement.id = tooltipId;
|
|
163
|
+
this.overlayRef.overlayElement.setAttribute('role', 'tooltip');
|
|
164
|
+
const portal = new TemplatePortal(this.TooltipTrigger().template, this.vcr);
|
|
165
|
+
this.overlayRef.attach(portal);
|
|
166
|
+
this.bindOverlayLifecycle();
|
|
167
|
+
this.contentId.set(tooltipId);
|
|
168
|
+
this.isOpen.set(true);
|
|
169
|
+
if (!this.isDestroying) {
|
|
170
|
+
this.openedChange.emit(true);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
close() {
|
|
174
|
+
this.clearOpenTimeout();
|
|
175
|
+
this.clearCloseTimeout();
|
|
176
|
+
if (!this.isOpen()) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
this.overlayRef?.dispose();
|
|
180
|
+
this.overlayRef = null;
|
|
181
|
+
this.contentId.set(null);
|
|
182
|
+
this.isOpen.set(false);
|
|
183
|
+
if (!this.isDestroying) {
|
|
184
|
+
this.openedChange.emit(false);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
bindOverlayLifecycle() {
|
|
188
|
+
if (!this.overlayRef) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
overlayDismissals(this.overlayRef, this.el.nativeElement)
|
|
192
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
193
|
+
.subscribe(() => this.close());
|
|
194
|
+
}
|
|
195
|
+
scheduleOpen() {
|
|
196
|
+
this.clearCloseTimeout();
|
|
197
|
+
if (this.isOpen()) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
this.clearOpenTimeout();
|
|
201
|
+
this.openTimeoutId = window.setTimeout(() => {
|
|
202
|
+
this.openTimeoutId = null;
|
|
203
|
+
if (this.disabled() || (!this.isPointerInsideTrigger && !this.isTriggerFocused)) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
this.open();
|
|
207
|
+
}, this.openDelay() ?? this.defaults?.openDelay() ?? 150);
|
|
208
|
+
}
|
|
209
|
+
scheduleClose() {
|
|
210
|
+
this.clearOpenTimeout();
|
|
211
|
+
if (!this.isOpen()) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
this.clearCloseTimeout();
|
|
215
|
+
this.closeTimeoutId = window.setTimeout(() => {
|
|
216
|
+
this.closeTimeoutId = null;
|
|
217
|
+
if (this.isPointerInsideTrigger || this.isTriggerFocused) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
this.close();
|
|
221
|
+
}, this.closeDelay() ?? this.defaults?.closeDelay() ?? 0);
|
|
222
|
+
}
|
|
223
|
+
clearOpenTimeout() {
|
|
224
|
+
if (this.openTimeoutId !== null) {
|
|
225
|
+
window.clearTimeout(this.openTimeoutId);
|
|
226
|
+
this.openTimeoutId = null;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
clearCloseTimeout() {
|
|
230
|
+
if (this.closeTimeoutId !== null) {
|
|
231
|
+
window.clearTimeout(this.closeTimeoutId);
|
|
232
|
+
this.closeTimeoutId = null;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: TooltipTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
236
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: TooltipTriggerDirective, isStandalone: true, selector: "[TooltipTrigger]", inputs: { TooltipTrigger: { classPropertyName: "TooltipTrigger", publicName: "TooltipTrigger", isSignal: true, isRequired: true, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, sideOffset: { classPropertyName: "sideOffset", publicName: "sideOffset", isSignal: true, isRequired: false, transformFunction: null }, openDelay: { classPropertyName: "openDelay", publicName: "openDelay", isSignal: true, isRequired: false, transformFunction: null }, closeDelay: { classPropertyName: "closeDelay", publicName: "closeDelay", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedChange: "openedChange" }, host: { listeners: { "pointerenter": "handlePointerEnter()", "pointerleave": "handlePointerLeave($event)", "focusin": "handleFocusIn()", "focusout": "handleFocusOut($event)", "keydown.escape": "close()" }, properties: { "attr.aria-describedby": "contentId()", "attr.data-state": "isOpen() ? \"open\" : \"closed\"" } }, exportAs: ["TooltipTrigger"], ngImport: i0 });
|
|
237
|
+
}
|
|
238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: TooltipTriggerDirective, decorators: [{
|
|
239
|
+
type: Directive,
|
|
240
|
+
args: [{
|
|
241
|
+
selector: '[TooltipTrigger]',
|
|
242
|
+
exportAs: 'TooltipTrigger',
|
|
243
|
+
host: {
|
|
244
|
+
'[attr.aria-describedby]': 'contentId()',
|
|
245
|
+
'[attr.data-state]': 'isOpen() ? "open" : "closed"',
|
|
246
|
+
'(pointerenter)': 'handlePointerEnter()',
|
|
247
|
+
'(pointerleave)': 'handlePointerLeave($event)',
|
|
248
|
+
'(focusin)': 'handleFocusIn()',
|
|
249
|
+
'(focusout)': 'handleFocusOut($event)',
|
|
250
|
+
'(keydown.escape)': 'close()',
|
|
251
|
+
},
|
|
252
|
+
}]
|
|
253
|
+
}], ctorParameters: () => [], propDecorators: { TooltipTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "TooltipTrigger", required: true }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], sideOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "sideOffset", required: false }] }], openDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "openDelay", required: false }] }], closeDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeDelay", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }] } });
|
|
254
|
+
|
|
255
|
+
const POSITION_TO_SIDE = {
|
|
256
|
+
above: 'top',
|
|
257
|
+
below: 'bottom',
|
|
258
|
+
left: 'left',
|
|
259
|
+
right: 'right',
|
|
260
|
+
before: 'left',
|
|
261
|
+
after: 'right',
|
|
262
|
+
};
|
|
263
|
+
const PANEL_CLASSES = [
|
|
264
|
+
'tooltip-panel',
|
|
265
|
+
'pointer-events-none',
|
|
266
|
+
'z-50',
|
|
267
|
+
'max-w-xs',
|
|
268
|
+
'overflow-hidden',
|
|
269
|
+
'rounded-md',
|
|
270
|
+
'border',
|
|
271
|
+
'border-border',
|
|
272
|
+
'bg-primary',
|
|
273
|
+
'px-3',
|
|
274
|
+
'py-1.5',
|
|
275
|
+
'text-xs',
|
|
276
|
+
'font-medium',
|
|
277
|
+
'leading-none',
|
|
278
|
+
'text-primary-foreground',
|
|
279
|
+
'shadow-md',
|
|
280
|
+
'select-none',
|
|
281
|
+
];
|
|
282
|
+
class TooltipTextComponent {
|
|
283
|
+
text = signal('', /* @ts-ignore */
|
|
284
|
+
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
285
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: TooltipTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
286
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.2", type: TooltipTextComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `{{ text() }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
287
|
+
}
|
|
288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: TooltipTextComponent, decorators: [{
|
|
289
|
+
type: Component,
|
|
290
|
+
args: [{
|
|
291
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
292
|
+
template: `{{ text() }}`,
|
|
293
|
+
}]
|
|
294
|
+
}] });
|
|
295
|
+
/**
|
|
296
|
+
* Shadcn-styled text tooltip — CDK overlay, tanpa dependensi Material.
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* <button Button [Tooltip]="'Save changes'" TooltipPosition="above">Save</button>
|
|
300
|
+
*/
|
|
301
|
+
class TooltipDirective {
|
|
302
|
+
overlay = inject(Overlay);
|
|
303
|
+
el = inject(ElementRef);
|
|
304
|
+
destroyRef = inject(DestroyRef);
|
|
305
|
+
Tooltip = input('', /* @ts-ignore */
|
|
306
|
+
...(ngDevMode ? [{ debugName: "Tooltip" }] : /* istanbul ignore next */ []));
|
|
307
|
+
TooltipPosition = input('above', /* @ts-ignore */
|
|
308
|
+
...(ngDevMode ? [{ debugName: "TooltipPosition" }] : /* istanbul ignore next */ []));
|
|
309
|
+
TooltipDisabled = input(false, /* @ts-ignore */
|
|
310
|
+
...(ngDevMode ? [{ debugName: "TooltipDisabled" }] : /* istanbul ignore next */ []));
|
|
311
|
+
TooltipShowDelay = input(150, /* @ts-ignore */
|
|
312
|
+
...(ngDevMode ? [{ debugName: "TooltipShowDelay" }] : /* istanbul ignore next */ []));
|
|
313
|
+
TooltipHideDelay = input(0, /* @ts-ignore */
|
|
314
|
+
...(ngDevMode ? [{ debugName: "TooltipHideDelay" }] : /* istanbul ignore next */ []));
|
|
315
|
+
overlayRef = null;
|
|
316
|
+
contentRef = null;
|
|
317
|
+
showTimeoutId = null;
|
|
318
|
+
hideTimeoutId = null;
|
|
319
|
+
side = computed(() => POSITION_TO_SIDE[this.TooltipPosition()], /* @ts-ignore */
|
|
320
|
+
...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
|
|
321
|
+
constructor() {
|
|
322
|
+
this.destroyRef.onDestroy(() => {
|
|
323
|
+
this.clearTimers();
|
|
324
|
+
this.hide();
|
|
325
|
+
});
|
|
326
|
+
// Update teks saat pesan berubah ketika tooltip sedang tampil.
|
|
327
|
+
effect(() => {
|
|
328
|
+
const message = this.Tooltip();
|
|
329
|
+
this.contentRef?.instance.text.set(message);
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
show() {
|
|
333
|
+
if (this.overlayRef || this.TooltipDisabled() || !this.Tooltip()) {
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
const side = this.side();
|
|
337
|
+
const positionStrategy = this.overlay
|
|
338
|
+
.position()
|
|
339
|
+
.flexibleConnectedTo(this.el)
|
|
340
|
+
.withPositions([connectedPositionFor(side, 'center', 4), connectedPositionFor(oppositeSide(side), 'center', 4)])
|
|
341
|
+
.withPush(false)
|
|
342
|
+
.withFlexibleDimensions(false);
|
|
343
|
+
this.overlayRef = this.overlay.create({
|
|
344
|
+
positionStrategy,
|
|
345
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
346
|
+
hasBackdrop: false,
|
|
347
|
+
panelClass: [...PANEL_CLASSES],
|
|
348
|
+
});
|
|
349
|
+
this.contentRef = this.overlayRef.attach(new ComponentPortal(TooltipTextComponent));
|
|
350
|
+
this.contentRef.instance.text.set(this.Tooltip());
|
|
351
|
+
const pane = this.overlayRef.overlayElement;
|
|
352
|
+
pane.id = uniqueId('Tooltip');
|
|
353
|
+
pane.setAttribute('role', 'tooltip');
|
|
354
|
+
this.el.nativeElement.setAttribute('aria-describedby', pane.id);
|
|
355
|
+
}
|
|
356
|
+
hide() {
|
|
357
|
+
this.clearTimers();
|
|
358
|
+
this.el.nativeElement.removeAttribute('aria-describedby');
|
|
359
|
+
this.contentRef = null;
|
|
360
|
+
this.overlayRef?.dispose();
|
|
361
|
+
this.overlayRef = null;
|
|
362
|
+
}
|
|
363
|
+
scheduleShow() {
|
|
364
|
+
this.clearTimers();
|
|
365
|
+
this.showTimeoutId = window.setTimeout(() => {
|
|
366
|
+
this.showTimeoutId = null;
|
|
367
|
+
this.show();
|
|
368
|
+
}, this.TooltipShowDelay());
|
|
369
|
+
}
|
|
370
|
+
scheduleHide() {
|
|
371
|
+
this.clearTimers();
|
|
372
|
+
this.hideTimeoutId = window.setTimeout(() => {
|
|
373
|
+
this.hideTimeoutId = null;
|
|
374
|
+
this.hide();
|
|
375
|
+
}, this.TooltipHideDelay());
|
|
376
|
+
}
|
|
377
|
+
clearTimers() {
|
|
378
|
+
if (this.showTimeoutId !== null) {
|
|
379
|
+
window.clearTimeout(this.showTimeoutId);
|
|
380
|
+
this.showTimeoutId = null;
|
|
381
|
+
}
|
|
382
|
+
if (this.hideTimeoutId !== null) {
|
|
383
|
+
window.clearTimeout(this.hideTimeoutId);
|
|
384
|
+
this.hideTimeoutId = null;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
388
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: TooltipDirective, isStandalone: true, selector: "[Tooltip]", inputs: { Tooltip: { classPropertyName: "Tooltip", publicName: "Tooltip", isSignal: true, isRequired: false, transformFunction: null }, TooltipPosition: { classPropertyName: "TooltipPosition", publicName: "TooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, TooltipDisabled: { classPropertyName: "TooltipDisabled", publicName: "TooltipDisabled", isSignal: true, isRequired: false, transformFunction: null }, TooltipShowDelay: { classPropertyName: "TooltipShowDelay", publicName: "TooltipShowDelay", isSignal: true, isRequired: false, transformFunction: null }, TooltipHideDelay: { classPropertyName: "TooltipHideDelay", publicName: "TooltipHideDelay", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "pointerenter": "scheduleShow()", "pointerleave": "scheduleHide()", "focusin": "scheduleShow()", "focusout": "scheduleHide()", "keydown.escape": "hide()" } }, exportAs: ["Tooltip"], ngImport: i0 });
|
|
389
|
+
}
|
|
390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
391
|
+
type: Directive,
|
|
392
|
+
args: [{
|
|
393
|
+
selector: '[Tooltip]',
|
|
394
|
+
exportAs: 'Tooltip',
|
|
395
|
+
host: {
|
|
396
|
+
'(pointerenter)': 'scheduleShow()',
|
|
397
|
+
'(pointerleave)': 'scheduleHide()',
|
|
398
|
+
'(focusin)': 'scheduleShow()',
|
|
399
|
+
'(focusout)': 'scheduleHide()',
|
|
400
|
+
'(keydown.escape)': 'hide()',
|
|
401
|
+
},
|
|
402
|
+
}]
|
|
403
|
+
}], ctorParameters: () => [], propDecorators: { Tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "Tooltip", required: false }] }], TooltipPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "TooltipPosition", required: false }] }], TooltipDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "TooltipDisabled", required: false }] }], TooltipShowDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "TooltipShowDelay", required: false }] }], TooltipHideDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "TooltipHideDelay", required: false }] }] } });
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Generated bundle index. Do not edit.
|
|
407
|
+
*/
|
|
408
|
+
|
|
409
|
+
export { TOOLTIP_DEFAULTS, TooltipComponent, TooltipContentDirective, TooltipDirective, TooltipTriggerDirective };
|
|
410
|
+
//# sourceMappingURL=ojiepermana-angular-component-tooltip.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ojiepermana-angular-component-tooltip.mjs","sources":["../../../library/component/tooltip/tooltip.component.ts","../../../library/component/tooltip/tooltip-content.directive.ts","../../../library/component/tooltip/tooltip-trigger.directive.ts","../../../library/component/tooltip/tooltip.directive.ts","../../../library/component/tooltip/ojiepermana-angular-component-tooltip.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, InjectionToken, Signal, forwardRef, input } from '@angular/core';\n\nexport type TooltipSide = 'top' | 'right' | 'bottom' | 'left';\nexport type TooltipAlign = 'start' | 'center' | 'end';\n\nexport interface TooltipDefaults {\n readonly side: Signal<TooltipSide>;\n readonly align: Signal<TooltipAlign>;\n readonly sideOffset: Signal<number>;\n readonly openDelay: Signal<number>;\n readonly closeDelay: Signal<number>;\n}\n\nexport const TOOLTIP_DEFAULTS = new InjectionToken<TooltipDefaults>('TOOLTIP_DEFAULTS');\n\n@Component({\n selector: 'Tooltip',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: TOOLTIP_DEFAULTS, useExisting: forwardRef(() => TooltipComponent) }],\n host: {\n class: 'contents',\n },\n template: '<ng-content />',\n})\nexport class TooltipComponent implements TooltipDefaults {\n readonly side = input<TooltipSide>('top');\n readonly align = input<TooltipAlign>('center');\n readonly sideOffset = input(4);\n readonly openDelay = input(150);\n readonly closeDelay = input(0);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: 'ng-template[TooltipContent]',\n exportAs: 'TooltipContent',\n})\nexport class TooltipContentDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { DestroyRef, Directive, ElementRef, ViewContainerRef, inject, input, output, signal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { connectedPositionFor, oppositeSide, overlayDismissals, uniqueId } from '@ojiepermana/angular-component/utils';\n\nimport { TOOLTIP_DEFAULTS, type TooltipAlign, type TooltipSide } from './tooltip.component';\nimport type { TooltipContentDirective } from './tooltip-content.directive';\n\nconst TOOLTIP_PANEL_CLASSES = [\n 'tooltip-panel',\n 'pointer-events-none',\n 'z-50',\n 'max-w-xs',\n 'overflow-hidden',\n 'rounded-md',\n 'border',\n 'border-border',\n 'bg-primary',\n 'px-3',\n 'py-1.5',\n 'text-xs',\n 'font-medium',\n 'leading-none',\n 'text-primary-foreground',\n 'shadow-md',\n 'select-none',\n] as const;\n\n@Directive({\n selector: '[TooltipTrigger]',\n exportAs: 'TooltipTrigger',\n host: {\n '[attr.aria-describedby]': 'contentId()',\n '[attr.data-state]': 'isOpen() ? \"open\" : \"closed\"',\n '(pointerenter)': 'handlePointerEnter()',\n '(pointerleave)': 'handlePointerLeave($event)',\n '(focusin)': 'handleFocusIn()',\n '(focusout)': 'handleFocusOut($event)',\n '(keydown.escape)': 'close()',\n },\n})\nexport class TooltipTriggerDirective {\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly defaults = inject(TOOLTIP_DEFAULTS, { optional: true });\n\n readonly TooltipTrigger = input.required<TooltipContentDirective>();\n readonly side = input<TooltipSide | undefined>(undefined);\n readonly align = input<TooltipAlign | undefined>(undefined);\n readonly sideOffset = input<number | undefined>(undefined);\n readonly openDelay = input<number | undefined>(undefined);\n readonly closeDelay = input<number | undefined>(undefined);\n readonly disabled = input(false);\n\n readonly openedChange = output<boolean>();\n\n readonly isOpen = signal(false);\n protected readonly contentId = signal<string | null>(null);\n\n private overlayRef: OverlayRef | null = null;\n private openTimeoutId: number | null = null;\n private closeTimeoutId: number | null = null;\n private isPointerInsideTrigger = false;\n private isTriggerFocused = false;\n private isDestroying = false;\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n this.isDestroying = true;\n this.clearOpenTimeout();\n this.clearCloseTimeout();\n this.contentId.set(null);\n this.isOpen.set(false);\n this.overlayRef?.dispose();\n this.overlayRef = null;\n });\n }\n\n handlePointerEnter(): void {\n if (this.disabled()) {\n return;\n }\n\n this.isPointerInsideTrigger = true;\n this.clearCloseTimeout();\n this.scheduleOpen();\n }\n\n handlePointerLeave(event: PointerEvent): void {\n if (this.el.nativeElement.contains(event.relatedTarget as Node | null)) {\n return;\n }\n\n this.isPointerInsideTrigger = false;\n this.scheduleClose();\n }\n\n handleFocusIn(): void {\n if (this.disabled()) {\n return;\n }\n\n this.isTriggerFocused = true;\n this.clearCloseTimeout();\n this.scheduleOpen();\n }\n\n handleFocusOut(event: FocusEvent): void {\n if (this.el.nativeElement.contains(event.relatedTarget as Node | null)) {\n return;\n }\n\n this.isTriggerFocused = false;\n this.scheduleClose();\n }\n\n open(): void {\n if (this.isOpen() || this.disabled()) {\n return;\n }\n\n const side = this.side() ?? this.defaults?.side() ?? 'top';\n const align = this.align() ?? this.defaults?.align() ?? 'center';\n const sideOffset = this.sideOffset() ?? this.defaults?.sideOffset() ?? 4;\n\n const primary = connectedPositionFor(side, align, sideOffset);\n const fallback = connectedPositionFor(oppositeSide(side), align, sideOffset);\n\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.el)\n .withPositions([primary, fallback])\n .withPush(false)\n .withFlexibleDimensions(false);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n hasBackdrop: false,\n panelClass: [...TOOLTIP_PANEL_CLASSES],\n });\n\n const tooltipId = uniqueId('Tooltip');\n this.overlayRef.overlayElement.id = tooltipId;\n this.overlayRef.overlayElement.setAttribute('role', 'tooltip');\n\n const portal = new TemplatePortal(this.TooltipTrigger().template, this.vcr);\n this.overlayRef.attach(portal);\n this.bindOverlayLifecycle();\n\n this.contentId.set(tooltipId);\n this.isOpen.set(true);\n\n if (!this.isDestroying) {\n this.openedChange.emit(true);\n }\n }\n\n close(): void {\n this.clearOpenTimeout();\n this.clearCloseTimeout();\n\n if (!this.isOpen()) {\n return;\n }\n\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.contentId.set(null);\n this.isOpen.set(false);\n\n if (!this.isDestroying) {\n this.openedChange.emit(false);\n }\n }\n\n private bindOverlayLifecycle(): void {\n if (!this.overlayRef) {\n return;\n }\n\n overlayDismissals(this.overlayRef, this.el.nativeElement)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.close());\n }\n\n private scheduleOpen(): void {\n this.clearCloseTimeout();\n\n if (this.isOpen()) {\n return;\n }\n\n this.clearOpenTimeout();\n this.openTimeoutId = window.setTimeout(\n () => {\n this.openTimeoutId = null;\n\n if (this.disabled() || (!this.isPointerInsideTrigger && !this.isTriggerFocused)) {\n return;\n }\n\n this.open();\n },\n this.openDelay() ?? this.defaults?.openDelay() ?? 150,\n );\n }\n\n private scheduleClose(): void {\n this.clearOpenTimeout();\n\n if (!this.isOpen()) {\n return;\n }\n\n this.clearCloseTimeout();\n this.closeTimeoutId = window.setTimeout(\n () => {\n this.closeTimeoutId = null;\n\n if (this.isPointerInsideTrigger || this.isTriggerFocused) {\n return;\n }\n\n this.close();\n },\n this.closeDelay() ?? this.defaults?.closeDelay() ?? 0,\n );\n }\n\n private clearOpenTimeout(): void {\n if (this.openTimeoutId !== null) {\n window.clearTimeout(this.openTimeoutId);\n this.openTimeoutId = null;\n }\n }\n\n private clearCloseTimeout(): void {\n if (this.closeTimeoutId !== null) {\n window.clearTimeout(this.closeTimeoutId);\n this.closeTimeoutId = null;\n }\n }\n}\n","import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n DestroyRef,\n Directive,\n ElementRef,\n computed,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { connectedPositionFor, oppositeSide, uniqueId, type OverlaySide } from '@ojiepermana/angular-component/utils';\n\n/** Posisi tooltip; kompatibel dengan nilai `matTooltipPosition` lama. */\nexport type TooltipPosition = 'left' | 'right' | 'above' | 'below' | 'before' | 'after';\n\nconst POSITION_TO_SIDE: Record<TooltipPosition, OverlaySide> = {\n above: 'top',\n below: 'bottom',\n left: 'left',\n right: 'right',\n before: 'left',\n after: 'right',\n};\n\nconst PANEL_CLASSES = [\n 'tooltip-panel',\n 'pointer-events-none',\n 'z-50',\n 'max-w-xs',\n 'overflow-hidden',\n 'rounded-md',\n 'border',\n 'border-border',\n 'bg-primary',\n 'px-3',\n 'py-1.5',\n 'text-xs',\n 'font-medium',\n 'leading-none',\n 'text-primary-foreground',\n 'shadow-md',\n 'select-none',\n] as const;\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `{{ text() }}`,\n})\nclass TooltipTextComponent {\n readonly text = signal('');\n}\n\n/**\n * Shadcn-styled text tooltip — CDK overlay, tanpa dependensi Material.\n *\n * @example\n * <button Button [Tooltip]=\"'Save changes'\" TooltipPosition=\"above\">Save</button>\n */\n@Directive({\n selector: '[Tooltip]',\n exportAs: 'Tooltip',\n host: {\n '(pointerenter)': 'scheduleShow()',\n '(pointerleave)': 'scheduleHide()',\n '(focusin)': 'scheduleShow()',\n '(focusout)': 'scheduleHide()',\n '(keydown.escape)': 'hide()',\n },\n})\nexport class TooltipDirective {\n private readonly overlay = inject(Overlay);\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n\n readonly Tooltip = input<string>('');\n readonly TooltipPosition = input<TooltipPosition>('above');\n readonly TooltipDisabled = input<boolean>(false);\n readonly TooltipShowDelay = input<number>(150);\n readonly TooltipHideDelay = input<number>(0);\n\n private overlayRef: OverlayRef | null = null;\n private contentRef: ComponentRef<TooltipTextComponent> | null = null;\n private showTimeoutId: number | null = null;\n private hideTimeoutId: number | null = null;\n\n private readonly side = computed(() => POSITION_TO_SIDE[this.TooltipPosition()]);\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n this.clearTimers();\n this.hide();\n });\n\n // Update teks saat pesan berubah ketika tooltip sedang tampil.\n effect(() => {\n const message = this.Tooltip();\n this.contentRef?.instance.text.set(message);\n });\n }\n\n show(): void {\n if (this.overlayRef || this.TooltipDisabled() || !this.Tooltip()) {\n return;\n }\n\n const side = this.side();\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.el)\n .withPositions([connectedPositionFor(side, 'center', 4), connectedPositionFor(oppositeSide(side), 'center', 4)])\n .withPush(false)\n .withFlexibleDimensions(false);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n hasBackdrop: false,\n panelClass: [...PANEL_CLASSES],\n });\n\n this.contentRef = this.overlayRef.attach(new ComponentPortal(TooltipTextComponent));\n this.contentRef.instance.text.set(this.Tooltip());\n\n const pane = this.overlayRef.overlayElement;\n pane.id = uniqueId('Tooltip');\n pane.setAttribute('role', 'tooltip');\n this.el.nativeElement.setAttribute('aria-describedby', pane.id);\n }\n\n hide(): void {\n this.clearTimers();\n this.el.nativeElement.removeAttribute('aria-describedby');\n this.contentRef = null;\n this.overlayRef?.dispose();\n this.overlayRef = null;\n }\n\n protected scheduleShow(): void {\n this.clearTimers();\n this.showTimeoutId = window.setTimeout(() => {\n this.showTimeoutId = null;\n this.show();\n }, this.TooltipShowDelay());\n }\n\n protected scheduleHide(): void {\n this.clearTimers();\n this.hideTimeoutId = window.setTimeout(() => {\n this.hideTimeoutId = null;\n this.hide();\n }, this.TooltipHideDelay());\n }\n\n private clearTimers(): void {\n if (this.showTimeoutId !== null) {\n window.clearTimeout(this.showTimeoutId);\n this.showTimeoutId = null;\n }\n if (this.hideTimeoutId !== null) {\n window.clearTimeout(this.hideTimeoutId);\n this.hideTimeoutId = null;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAaa,gBAAgB,GAAG,IAAI,cAAc,CAAkB,kBAAkB;MAWzE,gBA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