@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,121 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Directive, model, input, computed, forwardRef, ChangeDetectionStrategy, Component, inject } from '@angular/core';
|
|
3
|
+
import { uniqueId, cn } from '@ojiepermana/angular-component/utils';
|
|
4
|
+
|
|
5
|
+
class CollapsibleContextBase {
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CollapsibleContextBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
7
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: CollapsibleContextBase, isStandalone: true, ngImport: i0 });
|
|
8
|
+
}
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CollapsibleContextBase, decorators: [{
|
|
10
|
+
type: Directive
|
|
11
|
+
}] });
|
|
12
|
+
class CollapsibleComponent extends CollapsibleContextBase {
|
|
13
|
+
open = model(false, /* @ts-ignore */
|
|
14
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
15
|
+
disabled = input(false, /* @ts-ignore */
|
|
16
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
17
|
+
class = input('', /* @ts-ignore */
|
|
18
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
19
|
+
instanceId = uniqueId('Collapsible');
|
|
20
|
+
triggerId = `collapsible-trigger-${this.instanceId}`;
|
|
21
|
+
contentId = `collapsible-content-${this.instanceId}`;
|
|
22
|
+
classes = computed(() => cn('block', this.class()), /* @ts-ignore */
|
|
23
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
24
|
+
isOpen() {
|
|
25
|
+
return this.open();
|
|
26
|
+
}
|
|
27
|
+
isDisabled() {
|
|
28
|
+
return this.disabled();
|
|
29
|
+
}
|
|
30
|
+
toggle() {
|
|
31
|
+
if (!this.disabled())
|
|
32
|
+
this.open.update((value) => !value);
|
|
33
|
+
}
|
|
34
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CollapsibleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
35
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: CollapsibleComponent, isStandalone: true, selector: "Collapsible", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { properties: { "class": "classes()", "attr.data-state": "open() ? \"open\" : \"closed\"", "attr.data-disabled": "disabled() ? \"\" : null" } }, providers: [{ provide: CollapsibleContextBase, useExisting: forwardRef(() => CollapsibleComponent) }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
36
|
+
}
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CollapsibleComponent, decorators: [{
|
|
38
|
+
type: Component,
|
|
39
|
+
args: [{
|
|
40
|
+
selector: 'Collapsible',
|
|
41
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
42
|
+
providers: [{ provide: CollapsibleContextBase, useExisting: forwardRef(() => CollapsibleComponent) }],
|
|
43
|
+
host: {
|
|
44
|
+
'[class]': 'classes()',
|
|
45
|
+
'[attr.data-state]': 'open() ? "open" : "closed"',
|
|
46
|
+
'[attr.data-disabled]': 'disabled() ? "" : null',
|
|
47
|
+
},
|
|
48
|
+
template: `<ng-content />`,
|
|
49
|
+
}]
|
|
50
|
+
}], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
51
|
+
class CollapsibleTriggerDirective {
|
|
52
|
+
ctx = inject(CollapsibleContextBase);
|
|
53
|
+
toggle() {
|
|
54
|
+
this.ctx.toggle();
|
|
55
|
+
}
|
|
56
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CollapsibleTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
57
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: CollapsibleTriggerDirective, isStandalone: true, selector: "button[CollapsibleTrigger]", host: { attributes: { "type": "button" }, listeners: { "click": "toggle()" }, properties: { "attr.id": "ctx.triggerId", "attr.aria-controls": "ctx.contentId", "attr.aria-expanded": "ctx.isOpen()", "attr.data-state": "ctx.isOpen() ? \"open\" : \"closed\"", "attr.data-disabled": "ctx.isDisabled() ? \"\" : null", "disabled": "ctx.isDisabled() || null" }, classAttribute: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" }, ngImport: i0 });
|
|
58
|
+
}
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CollapsibleTriggerDirective, decorators: [{
|
|
60
|
+
type: Directive,
|
|
61
|
+
args: [{
|
|
62
|
+
selector: 'button[CollapsibleTrigger]',
|
|
63
|
+
host: {
|
|
64
|
+
class: 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',
|
|
65
|
+
type: 'button',
|
|
66
|
+
'[attr.id]': 'ctx.triggerId',
|
|
67
|
+
'[attr.aria-controls]': 'ctx.contentId',
|
|
68
|
+
'[attr.aria-expanded]': 'ctx.isOpen()',
|
|
69
|
+
'[attr.data-state]': 'ctx.isOpen() ? "open" : "closed"',
|
|
70
|
+
'[attr.data-disabled]': 'ctx.isDisabled() ? "" : null',
|
|
71
|
+
'[disabled]': 'ctx.isDisabled() || null',
|
|
72
|
+
'(click)': 'toggle()',
|
|
73
|
+
},
|
|
74
|
+
}]
|
|
75
|
+
}] });
|
|
76
|
+
class CollapsibleContentComponent {
|
|
77
|
+
ctx = inject(CollapsibleContextBase);
|
|
78
|
+
forceMount = input(false, /* @ts-ignore */
|
|
79
|
+
...(ngDevMode ? [{ debugName: "forceMount" }] : /* istanbul ignore next */ []));
|
|
80
|
+
class = input('', /* @ts-ignore */
|
|
81
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
82
|
+
classes = computed(() => cn('block overflow-hidden text-sm', this.class()), /* @ts-ignore */
|
|
83
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
84
|
+
renderContent = computed(() => this.ctx.isOpen() || this.forceMount(), /* @ts-ignore */
|
|
85
|
+
...(ngDevMode ? [{ debugName: "renderContent" }] : /* istanbul ignore next */ []));
|
|
86
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CollapsibleContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
87
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: CollapsibleContentComponent, isStandalone: true, selector: "CollapsibleContent", inputs: { forceMount: { classPropertyName: "forceMount", publicName: "forceMount", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "ctx.contentId", "attr.role": "\"region\"", "attr.aria-labelledby": "ctx.triggerId", "attr.data-state": "ctx.isOpen() ? \"open\" : \"closed\"", "attr.data-disabled": "ctx.isDisabled() ? \"\" : null", "hidden": "!ctx.isOpen()" } }, ngImport: i0, template: `
|
|
88
|
+
@if (renderContent()) {
|
|
89
|
+
<ng-content />
|
|
90
|
+
}
|
|
91
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
92
|
+
}
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CollapsibleContentComponent, decorators: [{
|
|
94
|
+
type: Component,
|
|
95
|
+
args: [{
|
|
96
|
+
selector: 'CollapsibleContent',
|
|
97
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
98
|
+
host: {
|
|
99
|
+
'[class]': 'classes()',
|
|
100
|
+
'[attr.id]': 'ctx.contentId',
|
|
101
|
+
'[attr.role]': '"region"',
|
|
102
|
+
'[attr.aria-labelledby]': 'ctx.triggerId',
|
|
103
|
+
'[attr.data-state]': 'ctx.isOpen() ? "open" : "closed"',
|
|
104
|
+
'[attr.data-disabled]': 'ctx.isDisabled() ? "" : null',
|
|
105
|
+
'[hidden]': '!ctx.isOpen()',
|
|
106
|
+
},
|
|
107
|
+
template: `
|
|
108
|
+
@if (renderContent()) {
|
|
109
|
+
<ng-content />
|
|
110
|
+
}
|
|
111
|
+
`,
|
|
112
|
+
}]
|
|
113
|
+
}], propDecorators: { forceMount: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceMount", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
114
|
+
let _id = 0;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Generated bundle index. Do not edit.
|
|
118
|
+
*/
|
|
119
|
+
|
|
120
|
+
export { CollapsibleComponent, CollapsibleContentComponent, CollapsibleContextBase, CollapsibleTriggerDirective };
|
|
121
|
+
//# sourceMappingURL=ojiepermana-angular-component-collapsible.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ojiepermana-angular-component-collapsible.mjs","sources":["../../../library/component/collapsible/collapsible.component.ts","../../../library/component/collapsible/ojiepermana-angular-component-collapsible.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n computed,\n forwardRef,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { cn, uniqueId } from '@ojiepermana/angular-component/utils';\n\n@Directive()\nexport abstract class CollapsibleContextBase {\n abstract readonly triggerId: string;\n abstract readonly contentId: string;\n\n abstract isOpen(): boolean;\n abstract isDisabled(): boolean;\n abstract toggle(): void;\n}\n\n@Component({\n selector: 'Collapsible',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: CollapsibleContextBase, useExisting: forwardRef(() => CollapsibleComponent) }],\n host: {\n '[class]': 'classes()',\n '[attr.data-state]': 'open() ? \"open\" : \"closed\"',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n },\n template: `<ng-content />`,\n})\nexport class CollapsibleComponent extends CollapsibleContextBase {\n readonly open = model<boolean>(false);\n readonly disabled = input<boolean>(false);\n readonly class = input<string>('');\n\n private readonly instanceId = uniqueId('Collapsible');\n\n readonly triggerId = `collapsible-trigger-${this.instanceId}`;\n readonly contentId = `collapsible-content-${this.instanceId}`;\n\n protected readonly classes = computed(() => cn('block', this.class()));\n\n override isOpen(): boolean {\n return this.open();\n }\n\n override isDisabled(): boolean {\n return this.disabled();\n }\n\n override toggle(): void {\n if (!this.disabled()) this.open.update((value) => !value);\n }\n}\n\n@Directive({\n selector: 'button[CollapsibleTrigger]',\n host: {\n class:\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',\n type: 'button',\n '[attr.id]': 'ctx.triggerId',\n '[attr.aria-controls]': 'ctx.contentId',\n '[attr.aria-expanded]': 'ctx.isOpen()',\n '[attr.data-state]': 'ctx.isOpen() ? \"open\" : \"closed\"',\n '[attr.data-disabled]': 'ctx.isDisabled() ? \"\" : null',\n '[disabled]': 'ctx.isDisabled() || null',\n '(click)': 'toggle()',\n },\n})\nexport class CollapsibleTriggerDirective {\n protected readonly ctx = inject(CollapsibleContextBase);\n\n protected toggle(): void {\n this.ctx.toggle();\n }\n}\n\n@Component({\n selector: 'CollapsibleContent',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.id]': 'ctx.contentId',\n '[attr.role]': '\"region\"',\n '[attr.aria-labelledby]': 'ctx.triggerId',\n '[attr.data-state]': 'ctx.isOpen() ? \"open\" : \"closed\"',\n '[attr.data-disabled]': 'ctx.isDisabled() ? \"\" : null',\n '[hidden]': '!ctx.isOpen()',\n },\n template: `\n @if (renderContent()) {\n <ng-content />\n }\n `,\n})\nexport class CollapsibleContentComponent {\n protected readonly ctx = inject(CollapsibleContextBase);\n readonly forceMount = input<boolean>(false);\n readonly class = input<string>('');\n\n protected readonly classes = computed(() => cn('block overflow-hidden text-sm', this.class()));\n protected readonly renderContent = computed(() => this.ctx.isOpen() || this.forceMount());\n}\n\nlet _id = 0;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAasB,sBAAsB,CAAA;uGAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAD3C;;AAqBK,MAAO,oBAAqB,SAAQ,sBAAsB,CAAA;IACrD,IAAI,GAAG,KAAK,CAAU,KAAK;6EAAC;IAC5B,QAAQ,GAAG,KAAK,CAAU,KAAK;iFAAC;IAChC,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;AAEjB,IAAA,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC;AAE5C,IAAA,SAAS,GAAG,CAAA,oBAAA,EAAuB,IA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A,EAAA,oBAAA,EAAA,gCAAA,EAAA,QAAA,EAAA,eAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAN5B;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEU,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAlBvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;oBAC9B,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,WAAW,EAAE,eAAe;AAC5B,wBAAA,aAAa,EAAE,UAAU;AACzB,wBAAA,wBAAwB,EAAE,eAAe;AACzC,wBAAA,mBAAmB,EAAE,kCAAkC;AACvD,wBAAA,sBAAsB,EAAE,8BAA8B;AACtD,wBAAA,UAAU,EAAE,eAAe;AAC5B,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;AAIT,EAAA,CAAA;AACF,iBAAA;;AAUD,IAAI,GAAG,GAAG,CAAC;;AC5GX;;AAEG;;;;"}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
2
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { inject, ViewContainerRef, DestroyRef, input, model, signal, computed, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
|
+
import { uniqueId, cn, overlayDismissals } from '@ojiepermana/angular-component/utils';
|
|
8
|
+
import { buttonVariants } from '@ojiepermana/angular-component/button';
|
|
9
|
+
import { CommandComponent, CommandInputComponent, CommandListComponent, CommandEmptyComponent, CommandGroupComponent, CommandItemComponent } from '@ojiepermana/angular-component/command';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Combobox with searchable option list. Options passed via `[options]`.
|
|
13
|
+
* Emits two-way `value` and supports forms via ControlValueAccessor.
|
|
14
|
+
*/
|
|
15
|
+
class ComboboxComponent {
|
|
16
|
+
overlay = inject(Overlay);
|
|
17
|
+
vcr = inject(ViewContainerRef);
|
|
18
|
+
destroyRef = inject(DestroyRef);
|
|
19
|
+
instanceId = uniqueId('Combobox');
|
|
20
|
+
options = input([], /* @ts-ignore */
|
|
21
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
22
|
+
value = model(null, /* @ts-ignore */
|
|
23
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
24
|
+
placeholder = input('Select…', /* @ts-ignore */
|
|
25
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
26
|
+
searchPlaceholder = input('Search…', /* @ts-ignore */
|
|
27
|
+
...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
28
|
+
emptyText = input('No results found.', /* @ts-ignore */
|
|
29
|
+
...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
|
|
30
|
+
disabled = model(false, /* @ts-ignore */
|
|
31
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
32
|
+
class = input('', /* @ts-ignore */
|
|
33
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
34
|
+
/** Disabled state pushed by the Forms API; kept separate so it never clobbers the `disabled` binding. */
|
|
35
|
+
cvaDisabled = signal(false, /* @ts-ignore */
|
|
36
|
+
...(ngDevMode ? [{ debugName: "cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
37
|
+
isDisabled = computed(() => this.disabled() || this.cvaDisabled(), /* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
39
|
+
trigger = viewChild.required('trigger');
|
|
40
|
+
panel = viewChild.required('panel');
|
|
41
|
+
overlayRef = null;
|
|
42
|
+
isOpen = signal(false, /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
44
|
+
triggerId = `${this.instanceId}-trigger`;
|
|
45
|
+
panelId = `${this.instanceId}-panel`;
|
|
46
|
+
classes = computed(() => cn('inline-block min-w-[200px]', this.class()), /* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
48
|
+
triggerClasses = computed(() => cn(buttonVariants({ variant: 'outline', size: 'default' }), 'w-full justify-between'), /* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "triggerClasses" }] : /* istanbul ignore next */ []));
|
|
50
|
+
selectedLabel = computed(() => {
|
|
51
|
+
const v = this.value();
|
|
52
|
+
return this.options().find((o) => o.value === v)?.label ?? '';
|
|
53
|
+
}, /* @ts-ignore */
|
|
54
|
+
...(ngDevMode ? [{ debugName: "selectedLabel" }] : /* istanbul ignore next */ []));
|
|
55
|
+
onChangeFn = () => { };
|
|
56
|
+
onTouchedFn = () => { };
|
|
57
|
+
isSelected(opt) {
|
|
58
|
+
return opt.value === this.value();
|
|
59
|
+
}
|
|
60
|
+
toggle() {
|
|
61
|
+
if (this.isDisabled())
|
|
62
|
+
return;
|
|
63
|
+
this.isOpen() ? this.close() : this.open();
|
|
64
|
+
}
|
|
65
|
+
open() {
|
|
66
|
+
if (this.isOpen())
|
|
67
|
+
return;
|
|
68
|
+
const triggerEl = this.trigger().nativeElement;
|
|
69
|
+
triggerEl.style.setProperty('--combobox-trigger-width', triggerEl.offsetWidth + 'px');
|
|
70
|
+
this.overlayRef = this.overlay.create({
|
|
71
|
+
positionStrategy: this.overlay
|
|
72
|
+
.position()
|
|
73
|
+
.flexibleConnectedTo(triggerEl)
|
|
74
|
+
.withPositions([
|
|
75
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },
|
|
76
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },
|
|
77
|
+
]),
|
|
78
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
79
|
+
hasBackdrop: false,
|
|
80
|
+
panelClass: 'combobox-panel',
|
|
81
|
+
minWidth: triggerEl.offsetWidth,
|
|
82
|
+
});
|
|
83
|
+
const portal = new TemplatePortal(this.panel(), this.vcr);
|
|
84
|
+
this.overlayRef.attach(portal);
|
|
85
|
+
overlayDismissals(this.overlayRef, triggerEl)
|
|
86
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
87
|
+
.subscribe(() => this.close());
|
|
88
|
+
this.isOpen.set(true);
|
|
89
|
+
// Focus search input after attach tick
|
|
90
|
+
queueMicrotask(() => this.overlayRef?.overlayElement.querySelector('input')?.focus());
|
|
91
|
+
}
|
|
92
|
+
close() {
|
|
93
|
+
if (!this.isOpen())
|
|
94
|
+
return;
|
|
95
|
+
this.overlayRef?.dispose();
|
|
96
|
+
this.overlayRef = null;
|
|
97
|
+
this.isOpen.set(false);
|
|
98
|
+
this.trigger().nativeElement.focus();
|
|
99
|
+
this.onTouchedFn();
|
|
100
|
+
}
|
|
101
|
+
pick(opt) {
|
|
102
|
+
if (opt.disabled)
|
|
103
|
+
return;
|
|
104
|
+
const next = opt.value === this.value() ? null : opt.value;
|
|
105
|
+
this.value.set(next);
|
|
106
|
+
this.onChangeFn(next);
|
|
107
|
+
this.close();
|
|
108
|
+
}
|
|
109
|
+
writeValue(v) {
|
|
110
|
+
this.value.set(v);
|
|
111
|
+
}
|
|
112
|
+
registerOnChange(fn) {
|
|
113
|
+
this.onChangeFn = fn;
|
|
114
|
+
}
|
|
115
|
+
registerOnTouched(fn) {
|
|
116
|
+
this.onTouchedFn = fn;
|
|
117
|
+
}
|
|
118
|
+
setDisabledState(state) {
|
|
119
|
+
this.cvaDisabled.set(state);
|
|
120
|
+
}
|
|
121
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ComboboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
122
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: ComboboxComponent, isStandalone: true, selector: "Combobox", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange" }, host: { properties: { "class": "classes()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => ComboboxComponent), multi: true }], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
123
|
+
<button
|
|
124
|
+
#trigger
|
|
125
|
+
type="button"
|
|
126
|
+
[attr.id]="triggerId"
|
|
127
|
+
role="combobox"
|
|
128
|
+
aria-haspopup="listbox"
|
|
129
|
+
[attr.aria-expanded]="isOpen()"
|
|
130
|
+
[attr.aria-controls]="isOpen() ? panelId : null"
|
|
131
|
+
[class]="triggerClasses()"
|
|
132
|
+
[disabled]="isDisabled() || null"
|
|
133
|
+
(click)="toggle()">
|
|
134
|
+
<span [class.text-muted-foreground]="!selectedLabel()">
|
|
135
|
+
{{ selectedLabel() || placeholder() }}
|
|
136
|
+
</span>
|
|
137
|
+
<svg
|
|
138
|
+
class="ml-2 h-4 w-4 shrink-0 opacity-50"
|
|
139
|
+
viewBox="0 0 24 24"
|
|
140
|
+
fill="none"
|
|
141
|
+
stroke="currentColor"
|
|
142
|
+
stroke-width="2"
|
|
143
|
+
stroke-linecap="round"
|
|
144
|
+
stroke-linejoin="round">
|
|
145
|
+
<polyline points="6 9 12 15 18 9" />
|
|
146
|
+
</svg>
|
|
147
|
+
</button>
|
|
148
|
+
|
|
149
|
+
<ng-template #panel>
|
|
150
|
+
<div
|
|
151
|
+
[attr.id]="panelId"
|
|
152
|
+
class="w-(--combobox-trigger-width) rounded-md border bg-popover text-popover-foreground shadow-md">
|
|
153
|
+
<Command>
|
|
154
|
+
<input CommandInput [placeholder]="searchPlaceholder()" />
|
|
155
|
+
<CommandList>
|
|
156
|
+
<CommandEmpty>{{ emptyText() }}</CommandEmpty>
|
|
157
|
+
<CommandGroup>
|
|
158
|
+
@for (opt of options(); track opt.value) {
|
|
159
|
+
<button
|
|
160
|
+
type="button"
|
|
161
|
+
CommandItem
|
|
162
|
+
[value]="opt.label"
|
|
163
|
+
[disabled]="!!opt.disabled"
|
|
164
|
+
(selected)="pick(opt)">
|
|
165
|
+
{{ opt.label }}
|
|
166
|
+
@if (isSelected(opt)) {
|
|
167
|
+
<svg
|
|
168
|
+
class="ml-auto h-4 w-4"
|
|
169
|
+
viewBox="0 0 24 24"
|
|
170
|
+
fill="none"
|
|
171
|
+
stroke="currentColor"
|
|
172
|
+
stroke-width="2"
|
|
173
|
+
stroke-linecap="round"
|
|
174
|
+
stroke-linejoin="round">
|
|
175
|
+
<polyline points="20 6 9 17 4 12" />
|
|
176
|
+
</svg>
|
|
177
|
+
}
|
|
178
|
+
</button>
|
|
179
|
+
}
|
|
180
|
+
</CommandGroup>
|
|
181
|
+
</CommandList>
|
|
182
|
+
</Command>
|
|
183
|
+
</div>
|
|
184
|
+
</ng-template>
|
|
185
|
+
`, isInline: true, dependencies: [{ kind: "component", type: CommandComponent, selector: "Command", inputs: ["query", "class"], outputs: ["queryChange"] }, { kind: "component", type: CommandInputComponent, selector: "input[CommandInput]", inputs: ["placeholder", "class"] }, { kind: "component", type: CommandListComponent, selector: "CommandList", inputs: ["class"] }, { kind: "component", type: CommandEmptyComponent, selector: "CommandEmpty", inputs: ["class"] }, { kind: "component", type: CommandGroupComponent, selector: "CommandGroup", inputs: ["heading", "class"] }, { kind: "component", type: CommandItemComponent, selector: "CommandItem, button[CommandItem]", inputs: ["value", "disabled", "class"], outputs: ["selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
186
|
+
}
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ComboboxComponent, decorators: [{
|
|
188
|
+
type: Component,
|
|
189
|
+
args: [{
|
|
190
|
+
selector: 'Combobox',
|
|
191
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
192
|
+
imports: [
|
|
193
|
+
CommandComponent,
|
|
194
|
+
CommandInputComponent,
|
|
195
|
+
CommandListComponent,
|
|
196
|
+
CommandEmptyComponent,
|
|
197
|
+
CommandGroupComponent,
|
|
198
|
+
CommandItemComponent,
|
|
199
|
+
],
|
|
200
|
+
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => ComboboxComponent), multi: true }],
|
|
201
|
+
host: { '[class]': 'classes()' },
|
|
202
|
+
template: `
|
|
203
|
+
<button
|
|
204
|
+
#trigger
|
|
205
|
+
type="button"
|
|
206
|
+
[attr.id]="triggerId"
|
|
207
|
+
role="combobox"
|
|
208
|
+
aria-haspopup="listbox"
|
|
209
|
+
[attr.aria-expanded]="isOpen()"
|
|
210
|
+
[attr.aria-controls]="isOpen() ? panelId : null"
|
|
211
|
+
[class]="triggerClasses()"
|
|
212
|
+
[disabled]="isDisabled() || null"
|
|
213
|
+
(click)="toggle()">
|
|
214
|
+
<span [class.text-muted-foreground]="!selectedLabel()">
|
|
215
|
+
{{ selectedLabel() || placeholder() }}
|
|
216
|
+
</span>
|
|
217
|
+
<svg
|
|
218
|
+
class="ml-2 h-4 w-4 shrink-0 opacity-50"
|
|
219
|
+
viewBox="0 0 24 24"
|
|
220
|
+
fill="none"
|
|
221
|
+
stroke="currentColor"
|
|
222
|
+
stroke-width="2"
|
|
223
|
+
stroke-linecap="round"
|
|
224
|
+
stroke-linejoin="round">
|
|
225
|
+
<polyline points="6 9 12 15 18 9" />
|
|
226
|
+
</svg>
|
|
227
|
+
</button>
|
|
228
|
+
|
|
229
|
+
<ng-template #panel>
|
|
230
|
+
<div
|
|
231
|
+
[attr.id]="panelId"
|
|
232
|
+
class="w-(--combobox-trigger-width) rounded-md border bg-popover text-popover-foreground shadow-md">
|
|
233
|
+
<Command>
|
|
234
|
+
<input CommandInput [placeholder]="searchPlaceholder()" />
|
|
235
|
+
<CommandList>
|
|
236
|
+
<CommandEmpty>{{ emptyText() }}</CommandEmpty>
|
|
237
|
+
<CommandGroup>
|
|
238
|
+
@for (opt of options(); track opt.value) {
|
|
239
|
+
<button
|
|
240
|
+
type="button"
|
|
241
|
+
CommandItem
|
|
242
|
+
[value]="opt.label"
|
|
243
|
+
[disabled]="!!opt.disabled"
|
|
244
|
+
(selected)="pick(opt)">
|
|
245
|
+
{{ opt.label }}
|
|
246
|
+
@if (isSelected(opt)) {
|
|
247
|
+
<svg
|
|
248
|
+
class="ml-auto h-4 w-4"
|
|
249
|
+
viewBox="0 0 24 24"
|
|
250
|
+
fill="none"
|
|
251
|
+
stroke="currentColor"
|
|
252
|
+
stroke-width="2"
|
|
253
|
+
stroke-linecap="round"
|
|
254
|
+
stroke-linejoin="round">
|
|
255
|
+
<polyline points="20 6 9 17 4 12" />
|
|
256
|
+
</svg>
|
|
257
|
+
}
|
|
258
|
+
</button>
|
|
259
|
+
}
|
|
260
|
+
</CommandGroup>
|
|
261
|
+
</CommandList>
|
|
262
|
+
</Command>
|
|
263
|
+
</div>
|
|
264
|
+
</ng-template>
|
|
265
|
+
`,
|
|
266
|
+
}]
|
|
267
|
+
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panel: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Generated bundle index. Do not edit.
|
|
271
|
+
*/
|
|
272
|
+
|
|
273
|
+
export { ComboboxComponent };
|
|
274
|
+
//# sourceMappingURL=ojiepermana-angular-component-combobox.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ojiepermana-angular-component-combobox.mjs","sources":["../../../library/component/combobox/combobox.component.ts","../../../library/component/combobox/ojiepermana-angular-component-combobox.ts"],"sourcesContent":["import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n TemplateRef,\n ViewContainerRef,\n computed,\n forwardRef,\n inject,\n input,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { cn, overlayDismissals, uniqueId } from '@ojiepermana/angular-component/utils';\nimport { buttonVariants } from '@ojiepermana/angular-component/button';\nimport {\n CommandComponent,\n CommandEmptyComponent,\n CommandGroupComponent,\n CommandInputComponent,\n CommandItemComponent,\n CommandListComponent,\n} from '@ojiepermana/angular-component/command';\n\nexport interface ComboboxOption<T = unknown> {\n readonly value: T;\n readonly label: string;\n readonly disabled?: boolean;\n}\n\n/**\n * Combobox with searchable option list. Options passed via `[options]`.\n * Emits two-way `value` and supports forms via ControlValueAccessor.\n */\n@Component({\n selector: 'Combobox',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommandComponent,\n CommandInputComponent,\n CommandListComponent,\n CommandEmptyComponent,\n CommandGroupComponent,\n CommandItemComponent,\n ],\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => ComboboxComponent), multi: true }],\n host: { '[class]': 'classes()' },\n template: `\n <button\n #trigger\n type=\"button\"\n [attr.id]=\"triggerId\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n [class]=\"triggerClasses()\"\n [disabled]=\"isDisabled() || null\"\n (click)=\"toggle()\">\n <span [class.text-muted-foreground]=\"!selectedLabel()\">\n {{ selectedLabel() || placeholder() }}\n </span>\n <svg\n class=\"ml-2 h-4 w-4 shrink-0 opacity-50\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </button>\n\n <ng-template #panel>\n <div\n [attr.id]=\"panelId\"\n class=\"w-(--combobox-trigger-width) rounded-md border bg-popover text-popover-foreground shadow-md\">\n <Command>\n <input CommandInput [placeholder]=\"searchPlaceholder()\" />\n <CommandList>\n <CommandEmpty>{{ emptyText() }}</CommandEmpty>\n <CommandGroup>\n @for (opt of options(); track opt.value) {\n <button\n type=\"button\"\n CommandItem\n [value]=\"opt.label\"\n [disabled]=\"!!opt.disabled\"\n (selected)=\"pick(opt)\">\n {{ opt.label }}\n @if (isSelected(opt)) {\n <svg\n class=\"ml-auto h-4 w-4\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n }\n </button>\n }\n </CommandGroup>\n </CommandList>\n </Command>\n </div>\n </ng-template>\n `,\n})\nexport class ComboboxComponent<T = unknown> implements ControlValueAccessor {\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly instanceId = uniqueId('Combobox');\n\n readonly options = input<ReadonlyArray<ComboboxOption<T>>>([]);\n readonly value = model<T | null>(null);\n readonly placeholder = input<string>('Select…');\n readonly searchPlaceholder = input<string>('Search…');\n readonly emptyText = input<string>('No results found.');\n readonly disabled = model<boolean>(false);\n readonly class = input<string>('');\n\n /** Disabled state pushed by the Forms API; kept separate so it never clobbers the `disabled` binding. */\n private readonly cvaDisabled = signal(false);\n protected readonly isDisabled = computed(() => this.disabled() || this.cvaDisabled());\n\n private readonly trigger = viewChild.required<ElementRef<HTMLButtonElement>>('trigger');\n private readonly panel = viewChild.required<TemplateRef<unknown>>('panel');\n private overlayRef: OverlayRef | null = null;\n readonly isOpen = signal(false);\n protected readonly triggerId = `${this.instanceId}-trigger`;\n protected readonly panelId = `${this.instanceId}-panel`;\n\n protected readonly classes = computed(() => cn('inline-block min-w-[200px]', this.class()));\n\n protected readonly triggerClasses = computed(() =>\n cn(buttonVariants({ variant: 'outline', size: 'default' }), 'w-full justify-between'),\n );\n\n protected readonly selectedLabel = computed(() => {\n const v = this.value();\n return this.options().find((o) => o.value === v)?.label ?? '';\n });\n\n private onChangeFn: (v: T | null) => void = () => {};\n private onTouchedFn: () => void = () => {};\n\n protected isSelected(opt: ComboboxOption<T>): boolean {\n return opt.value === this.value();\n }\n\n protected toggle(): void {\n if (this.isDisabled()) return;\n this.isOpen() ? this.close() : this.open();\n }\n\n protected open(): void {\n if (this.isOpen()) return;\n const triggerEl = this.trigger().nativeElement;\n triggerEl.style.setProperty('--combobox-trigger-width', triggerEl.offsetWidth + 'px');\n\n this.overlayRef = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(triggerEl)\n .withPositions([\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },\n ]),\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n hasBackdrop: false,\n panelClass: 'combobox-panel',\n minWidth: triggerEl.offsetWidth,\n });\n\n const portal = new TemplatePortal(this.panel(), this.vcr);\n this.overlayRef.attach(portal);\n\n overlayDismissals(this.overlayRef, triggerEl)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.close());\n\n this.isOpen.set(true);\n // Focus search input after attach tick\n queueMicrotask(() => this.overlayRef?.overlayElement.querySelector<HTMLInputElement>('input')?.focus());\n }\n\n protected close(): void {\n if (!this.isOpen()) return;\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.isOpen.set(false);\n this.trigger().nativeElement.focus();\n this.onTouchedFn();\n }\n\n protected pick(opt: ComboboxOption<T>): void {\n if (opt.disabled) return;\n const next = opt.value === this.value() ? null : opt.value;\n this.value.set(next);\n this.onChangeFn(next);\n this.close();\n }\n\n writeValue(v: T | null): void {\n this.value.set(v);\n }\n\n registerOnChange(fn: (v: T | null) => void): void {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn;\n }\n\n setDisabledState(state: boolean): void {\n this.cvaDisabled.set(state);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport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