@ojiepermana/angular-component 22.0.44 → 22.0.46
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/fesm2022/ojiepermana-angular-component-accordion.mjs +9 -11
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +100 -32
- package/fesm2022/ojiepermana-angular-component-alert.mjs +5 -9
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +7 -13
- package/fesm2022/ojiepermana-angular-component-badge.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +16 -19
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +4 -7
- package/fesm2022/ojiepermana-angular-component-button.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +7 -5
- package/fesm2022/ojiepermana-angular-component-card.mjs +8 -15
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +15 -18
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +40 -11
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +8 -6
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +36 -16
- package/fesm2022/ojiepermana-angular-component-command.mjs +25 -21
- package/fesm2022/ojiepermana-angular-component-composer.mjs +15 -18
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +36 -11
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +85 -30
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +31 -26
- package/fesm2022/ojiepermana-angular-component-editor.mjs +37 -28
- package/fesm2022/ojiepermana-angular-component-empty.mjs +7 -13
- package/fesm2022/ojiepermana-angular-component-form.mjs +32 -24
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-icon.mjs +51 -6
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +17 -15
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +15 -14
- package/fesm2022/ojiepermana-angular-component-input.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-item.mjs +11 -21
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +27 -26
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +3 -5
- package/fesm2022/ojiepermana-angular-component-label.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +6 -6
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +25 -12
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +22 -13
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +70 -36
- package/fesm2022/ojiepermana-angular-component-progress.mjs +7 -5
- package/fesm2022/ojiepermana-angular-component-radio.mjs +21 -10
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +22 -11
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +8 -6
- package/fesm2022/ojiepermana-angular-component-select.mjs +29 -17
- package/fesm2022/ojiepermana-angular-component-separator.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +89 -30
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-slider.mjs +25 -13
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +6 -5
- package/fesm2022/ojiepermana-angular-component-switch.mjs +17 -8
- package/fesm2022/ojiepermana-angular-component-table.mjs +9 -17
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +5 -9
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +22 -17
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +12 -6
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +7 -6
- package/package.json +10 -1
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +42 -3
- package/types/ojiepermana-angular-component-combobox.d.ts +4 -1
- package/types/ojiepermana-angular-component-command.d.ts +7 -2
- package/types/ojiepermana-angular-component-dialog.d.ts +33 -3
- package/types/ojiepermana-angular-component-form.d.ts +9 -0
- package/types/ojiepermana-angular-component-icon.d.ts +48 -1
- package/types/ojiepermana-angular-component-radio.d.ts +4 -1
- package/types/ojiepermana-angular-component-sheet.d.ts +33 -3
- package/types/ojiepermana-angular-component-timeline.d.ts +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, numberAttribute, computed,
|
|
2
|
+
import { input, numberAttribute, computed, Component } from '@angular/core';
|
|
3
3
|
import { cn } from '@ojiepermana/angular-component/utils';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -26,24 +26,26 @@ class ScrollAreaComponent {
|
|
|
26
26
|
[class]="viewportClasses()"
|
|
27
27
|
[attr.aria-label]="viewportAriaLabel()"
|
|
28
28
|
[attr.role]="viewportRole()"
|
|
29
|
-
[attr.tabindex]="viewportTabIndex()"
|
|
29
|
+
[attr.tabindex]="viewportTabIndex()"
|
|
30
|
+
>
|
|
30
31
|
<ng-content />
|
|
31
32
|
</div>
|
|
32
|
-
`, isInline: true, styles: [":host{display:block;overflow:hidden;position:relative}.scroll-area-viewport{overflow:auto;scrollbar-width:thin;scrollbar-color:var(--tw-scrollbar-thumb, hsl(var(--scrollbar-thumb))) var(--tw-scrollbar-track, hsl(var(--scrollbar-track)))}.scroll-area-viewport::-webkit-scrollbar{width:var(--scrollbar-size, .5rem);height:var(--scrollbar-size, .5rem)}.scroll-area-viewport::-webkit-scrollbar-track{background:var(--tw-scrollbar-track, hsl(var(--scrollbar-track)))}.scroll-area-viewport::-webkit-scrollbar-thumb{background:var(--tw-scrollbar-thumb, hsl(var(--scrollbar-thumb)));border:var(--border-width) solid transparent;background-clip:padding-box;border-radius:var(--scrollbar-radius, 9999px)}.scroll-area-viewport::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover, var(--tw-scrollbar-thumb, hsl(var(--scrollbar-thumb-hover))));background-clip:padding-box}@media(forced-colors:active){.scroll-area-viewport{scrollbar-width:auto;scrollbar-color:auto}.scroll-area-viewport::-webkit-scrollbar-thumb{background:CanvasText;border-color:transparent}}\n"]
|
|
33
|
+
`, isInline: true, styles: [":host{display:block;overflow:hidden;position:relative}.scroll-area-viewport{overflow:auto;scrollbar-width:thin;scrollbar-color:var(--tw-scrollbar-thumb, hsl(var(--scrollbar-thumb))) var(--tw-scrollbar-track, hsl(var(--scrollbar-track)))}.scroll-area-viewport::-webkit-scrollbar{width:var(--scrollbar-size, .5rem);height:var(--scrollbar-size, .5rem)}.scroll-area-viewport::-webkit-scrollbar-track{background:var(--tw-scrollbar-track, hsl(var(--scrollbar-track)))}.scroll-area-viewport::-webkit-scrollbar-thumb{background:var(--tw-scrollbar-thumb, hsl(var(--scrollbar-thumb)));border:var(--border-width) solid transparent;background-clip:padding-box;border-radius:var(--scrollbar-radius, 9999px)}.scroll-area-viewport::-webkit-scrollbar-thumb:hover{background:var( --scrollbar-thumb-hover, var(--tw-scrollbar-thumb, hsl(var(--scrollbar-thumb-hover))) );background-clip:padding-box}@media(forced-colors:active){.scroll-area-viewport{scrollbar-width:auto;scrollbar-color:auto}.scroll-area-viewport::-webkit-scrollbar-thumb{background:CanvasText;border-color:transparent}}\n"] });
|
|
33
34
|
}
|
|
34
35
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: ScrollAreaComponent, decorators: [{
|
|
35
36
|
type: Component,
|
|
36
|
-
args: [{ selector: 'ScrollArea',
|
|
37
|
+
args: [{ selector: 'ScrollArea', host: {
|
|
37
38
|
'[class]': 'classes()',
|
|
38
39
|
}, template: `
|
|
39
40
|
<div
|
|
40
41
|
[class]="viewportClasses()"
|
|
41
42
|
[attr.aria-label]="viewportAriaLabel()"
|
|
42
43
|
[attr.role]="viewportRole()"
|
|
43
|
-
[attr.tabindex]="viewportTabIndex()"
|
|
44
|
+
[attr.tabindex]="viewportTabIndex()"
|
|
45
|
+
>
|
|
44
46
|
<ng-content />
|
|
45
47
|
</div>
|
|
46
|
-
`, styles: [":host{display:block;overflow:hidden;position:relative}.scroll-area-viewport{overflow:auto;scrollbar-width:thin;scrollbar-color:var(--tw-scrollbar-thumb, hsl(var(--scrollbar-thumb))) var(--tw-scrollbar-track, hsl(var(--scrollbar-track)))}.scroll-area-viewport::-webkit-scrollbar{width:var(--scrollbar-size, .5rem);height:var(--scrollbar-size, .5rem)}.scroll-area-viewport::-webkit-scrollbar-track{background:var(--tw-scrollbar-track, hsl(var(--scrollbar-track)))}.scroll-area-viewport::-webkit-scrollbar-thumb{background:var(--tw-scrollbar-thumb, hsl(var(--scrollbar-thumb)));border:var(--border-width) solid transparent;background-clip:padding-box;border-radius:var(--scrollbar-radius, 9999px)}.scroll-area-viewport::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover, var(--tw-scrollbar-thumb, hsl(var(--scrollbar-thumb-hover))));background-clip:padding-box}@media(forced-colors:active){.scroll-area-viewport{scrollbar-width:auto;scrollbar-color:auto}.scroll-area-viewport::-webkit-scrollbar-thumb{background:CanvasText;border-color:transparent}}\n"] }]
|
|
48
|
+
`, styles: [":host{display:block;overflow:hidden;position:relative}.scroll-area-viewport{overflow:auto;scrollbar-width:thin;scrollbar-color:var(--tw-scrollbar-thumb, hsl(var(--scrollbar-thumb))) var(--tw-scrollbar-track, hsl(var(--scrollbar-track)))}.scroll-area-viewport::-webkit-scrollbar{width:var(--scrollbar-size, .5rem);height:var(--scrollbar-size, .5rem)}.scroll-area-viewport::-webkit-scrollbar-track{background:var(--tw-scrollbar-track, hsl(var(--scrollbar-track)))}.scroll-area-viewport::-webkit-scrollbar-thumb{background:var(--tw-scrollbar-thumb, hsl(var(--scrollbar-thumb)));border:var(--border-width) solid transparent;background-clip:padding-box;border-radius:var(--scrollbar-radius, 9999px)}.scroll-area-viewport::-webkit-scrollbar-thumb:hover{background:var( --scrollbar-thumb-hover, var(--tw-scrollbar-thumb, hsl(var(--scrollbar-thumb-hover))) );background-clip:padding-box}@media(forced-colors:active){.scroll-area-viewport{scrollbar-width:auto;scrollbar-color:auto}.scroll-area-viewport::-webkit-scrollbar-thumb{background:CanvasText;border-color:transparent}}\n"] }]
|
|
47
49
|
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], viewportClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewportClass", required: false }] }], viewportAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewportAriaLabel", required: false }] }], viewportTabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewportTabIndex", required: false }] }] } });
|
|
48
50
|
|
|
49
51
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, input, computed, effect, forwardRef, ViewEncapsulation,
|
|
2
|
+
import { inject, input, computed, effect, forwardRef, ViewEncapsulation, Component } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/cdk/overlay';
|
|
4
4
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
5
5
|
import { MAT_OPTION_PARENT_COMPONENT, MatOption, MatPseudoCheckbox, MatRipple } from '@angular/material/core';
|
|
@@ -69,7 +69,8 @@ class SelectComponent extends MatSelect {
|
|
|
69
69
|
class="mat-mdc-select-trigger"
|
|
70
70
|
(click)="open()"
|
|
71
71
|
#fallbackOverlayOrigin="cdkOverlayOrigin"
|
|
72
|
-
#trigger
|
|
72
|
+
#trigger
|
|
73
|
+
>
|
|
73
74
|
<div class="mat-mdc-select-value" [attr.id]="_valueId">
|
|
74
75
|
@if (empty) {
|
|
75
76
|
<span class="mat-mdc-select-placeholder mat-mdc-select-min-line">{{ placeholder }}</span>
|
|
@@ -108,7 +109,8 @@ class SelectComponent extends MatSelect {
|
|
|
108
109
|
[cdkConnectedOverlayUsePopover]="_popoverLocation"
|
|
109
110
|
(detach)="close()"
|
|
110
111
|
(backdropClick)="close()"
|
|
111
|
-
(overlayKeydown)="_handleOverlayKeydown($event)"
|
|
112
|
+
(overlayKeydown)="_handleOverlayKeydown($event)"
|
|
113
|
+
>
|
|
112
114
|
<!-- mat-undefined is weird, but we were using it internally -->
|
|
113
115
|
<div
|
|
114
116
|
#panel
|
|
@@ -127,15 +129,16 @@ class SelectComponent extends MatSelect {
|
|
|
127
129
|
[attr.aria-multiselectable]="multiple"
|
|
128
130
|
[attr.aria-label]="ariaLabel || null"
|
|
129
131
|
[attr.aria-labelledby]="_getPanelAriaLabelledby()"
|
|
130
|
-
(keydown)="_handleKeydown($event)"
|
|
132
|
+
(keydown)="_handleKeydown($event)"
|
|
133
|
+
>
|
|
131
134
|
<ng-content></ng-content>
|
|
132
135
|
</div>
|
|
133
136
|
</ng-template>
|
|
134
|
-
`, isInline: true, styles: ["@keyframes _mat-select-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{0%{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var( --mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12) )}.mat-mdc-select-disabled,.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media(forced-colors:active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;box-sizing:border-box;transform-origin:top center;border-radius:0 0 4px 4px;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-radius:4px 4px 0 0;transform-origin:bottom center}@media(forced-colors:active){div.mat-mdc-select-panel{outline:solid 1px}}.mat-select-panel-animations-enabled{animation:_mat-select-enter .12s cubic-bezier(0,0,.2,1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit .1s linear}.mat-mdc-select-placeholder{transition:color .4s .1333333333333s cubic-bezier(.25,.8,.25,1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}selectfield.mat-mdc-select{display:flex;align-items:center;box-sizing:border-box;width:100%;height:2.25rem;padding:0 calc(var(--spacing-base) * 3);border:1px solid hsl(var(--input));border-radius:calc(var(--radius-base) - .125rem);background:transparent;color:hsl(var(--foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height);cursor:pointer}selectfield.mat-mdc-select:focus,selectfield.mat-mdc-select.mat-select-open{outline:none;border-color:hsl(var(--ring));box-shadow:0 0 0 1px hsl(var(--ring))}selectfield.mat-mdc-select-disabled{cursor:not-allowed;opacity:.5;background:hsl(var(--muted) / .4)}selectfield.mat-mdc-select-invalid{border-color:hsl(var(--destructive))}selectfield .mat-mdc-select-value{color:hsl(var(--foreground))}selectfield .mat-mdc-select-placeholder{color:hsl(var(--muted-foreground))}selectfield .mat-mdc-select-arrow{color:hsl(var(--muted-foreground))}.mat-mdc-select-panel.select-panel{--mat-select-panel-background-color: hsl(var(--popover));background-color:hsl(var(--popover));color:hsl(var(--popover-foreground));border:1px solid hsl(var(--border));border-radius:var(--radius-base);box-shadow:var(--shadow-md, 0 8px 18px -14px hsl(var(--foreground) / .24));padding:calc(var(--spacing-base) * 1)}.select-panel .mat-mdc-option{--mat-option-label-text-color: hsl(var(--popover-foreground));--mat-option-label-text-font: var(--font-sans);--mat-option-label-text-size: var(--text-sm);--mat-option-label-text-line-height: var(--text-sm--line-height);--mat-option-label-text-weight: 400;--mat-option-hover-state-layer-color: hsl(var(--accent));--mat-option-focus-state-layer-color: hsl(var(--accent));--mat-option-selected-state-layer-color: hsl(var(--accent));--mat-option-selected-state-label-text-color: hsl(var(--accent-foreground));min-height:2.25rem;border-radius:calc(var(--radius-base) - .125rem)}.select-panel .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:hsl(var(--accent-foreground))}.select-panel .mat-mdc-optgroup-label{--mat-optgroup-label-text-color: hsl(var(--muted-foreground));--mat-optgroup-label-text-font: var(--font-sans);--mat-optgroup-label-text-size: var(--text-xs);min-height:1.75rem}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }],
|
|
137
|
+
`, isInline: true, styles: ["@keyframes _mat-select-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{0%{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var( --mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12) )}.mat-mdc-select-disabled,.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media(forced-colors:active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;box-sizing:border-box;transform-origin:top center;border-radius:0 0 4px 4px;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-radius:4px 4px 0 0;transform-origin:bottom center}@media(forced-colors:active){div.mat-mdc-select-panel{outline:solid 1px}}.mat-select-panel-animations-enabled{animation:_mat-select-enter .12s cubic-bezier(0,0,.2,1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit .1s linear}.mat-mdc-select-placeholder{transition:color .4s .1333333333333s cubic-bezier(.25,.8,.25,1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}selectfield.mat-mdc-select{display:flex;align-items:center;box-sizing:border-box;width:100%;height:2.25rem;padding:0 calc(var(--spacing-base) * 3);border:1px solid hsl(var(--input));border-radius:calc(var(--radius-base) - .125rem);background:transparent;color:hsl(var(--foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height);cursor:pointer}selectfield.mat-mdc-select:focus,selectfield.mat-mdc-select.mat-select-open{outline:none;border-color:hsl(var(--ring));box-shadow:0 0 0 1px hsl(var(--ring))}selectfield.mat-mdc-select-disabled{cursor:not-allowed;opacity:.5;background:hsl(var(--muted) / .4)}selectfield.mat-mdc-select-invalid{border-color:hsl(var(--destructive))}selectfield .mat-mdc-select-value{color:hsl(var(--foreground))}selectfield .mat-mdc-select-placeholder{color:hsl(var(--muted-foreground))}selectfield .mat-mdc-select-arrow{color:hsl(var(--muted-foreground))}.mat-mdc-select-panel.select-panel{--mat-select-panel-background-color: hsl(var(--popover));background-color:hsl(var(--popover));color:hsl(var(--popover-foreground));border:1px solid hsl(var(--border));border-radius:var(--radius-base);box-shadow:var(--shadow-md, 0 8px 18px -14px hsl(var(--foreground) / .24));padding:calc(var(--spacing-base) * 1)}.select-panel .mat-mdc-option{--mat-option-label-text-color: hsl(var(--popover-foreground));--mat-option-label-text-font: var(--font-sans);--mat-option-label-text-size: var(--text-sm);--mat-option-label-text-line-height: var(--text-sm--line-height);--mat-option-label-text-weight: 400;--mat-option-hover-state-layer-color: hsl(var(--accent));--mat-option-focus-state-layer-color: hsl(var(--accent));--mat-option-selected-state-layer-color: hsl(var(--accent));--mat-option-selected-state-label-text-color: hsl(var(--accent-foreground));min-height:2.25rem;border-radius:calc(var(--radius-base) - .125rem)}.select-panel .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:hsl(var(--accent-foreground))}.select-panel .mat-mdc-optgroup-label{--mat-optgroup-label-text-color: hsl(var(--muted-foreground));--mat-optgroup-label-text-font: var(--font-sans);--mat-optgroup-label-text-size: var(--text-xs);min-height:1.75rem}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
135
138
|
}
|
|
136
139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SelectComponent, decorators: [{
|
|
137
140
|
type: Component,
|
|
138
|
-
args: [{ selector: 'SelectField', exportAs: 'matSelect',
|
|
141
|
+
args: [{ selector: 'SelectField', exportAs: 'matSelect', encapsulation: ViewEncapsulation.None, imports: [OverlayModule], host: {
|
|
139
142
|
class: 'mat-mdc-select',
|
|
140
143
|
role: 'combobox',
|
|
141
144
|
'aria-haspopup': 'listbox',
|
|
@@ -150,7 +153,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
150
153
|
class="mat-mdc-select-trigger"
|
|
151
154
|
(click)="open()"
|
|
152
155
|
#fallbackOverlayOrigin="cdkOverlayOrigin"
|
|
153
|
-
#trigger
|
|
156
|
+
#trigger
|
|
157
|
+
>
|
|
154
158
|
<div class="mat-mdc-select-value" [attr.id]="_valueId">
|
|
155
159
|
@if (empty) {
|
|
156
160
|
<span class="mat-mdc-select-placeholder mat-mdc-select-min-line">{{ placeholder }}</span>
|
|
@@ -189,7 +193,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
189
193
|
[cdkConnectedOverlayUsePopover]="_popoverLocation"
|
|
190
194
|
(detach)="close()"
|
|
191
195
|
(backdropClick)="close()"
|
|
192
|
-
(overlayKeydown)="_handleOverlayKeydown($event)"
|
|
196
|
+
(overlayKeydown)="_handleOverlayKeydown($event)"
|
|
197
|
+
>
|
|
193
198
|
<!-- mat-undefined is weird, but we were using it internally -->
|
|
194
199
|
<div
|
|
195
200
|
#panel
|
|
@@ -208,7 +213,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
208
213
|
[attr.aria-multiselectable]="multiple"
|
|
209
214
|
[attr.aria-label]="ariaLabel || null"
|
|
210
215
|
[attr.aria-labelledby]="_getPanelAriaLabelledby()"
|
|
211
|
-
(keydown)="_handleKeydown($event)"
|
|
216
|
+
(keydown)="_handleKeydown($event)"
|
|
217
|
+
>
|
|
212
218
|
<ng-content></ng-content>
|
|
213
219
|
</div>
|
|
214
220
|
</ng-template>
|
|
@@ -241,7 +247,8 @@ class OptionComponent extends MatOption {
|
|
|
241
247
|
class="mat-mdc-option-pseudo-checkbox"
|
|
242
248
|
[disabled]="disabled"
|
|
243
249
|
[state]="selected ? 'checked' : 'unchecked'"
|
|
244
|
-
aria-hidden="true"
|
|
250
|
+
aria-hidden="true"
|
|
251
|
+
/>
|
|
245
252
|
}
|
|
246
253
|
|
|
247
254
|
<ng-content select="mat-icon" />
|
|
@@ -254,7 +261,8 @@ class OptionComponent extends MatOption {
|
|
|
254
261
|
[disabled]="disabled"
|
|
255
262
|
state="checked"
|
|
256
263
|
aria-hidden="true"
|
|
257
|
-
appearance="minimal"
|
|
264
|
+
appearance="minimal"
|
|
265
|
+
/>
|
|
258
266
|
}
|
|
259
267
|
|
|
260
268
|
@if (group && group._inert) {
|
|
@@ -266,18 +274,20 @@ class OptionComponent extends MatOption {
|
|
|
266
274
|
aria-hidden="true"
|
|
267
275
|
mat-ripple
|
|
268
276
|
[matRippleTrigger]="_getHostElement()"
|
|
269
|
-
[matRippleDisabled]="disabled || disableRipple"
|
|
270
|
-
|
|
277
|
+
[matRippleDisabled]="disabled || disableRipple"
|
|
278
|
+
></div>
|
|
279
|
+
`, isInline: true, styles: [".mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:transparent;color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var( --mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent) )}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var( --mat-option-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent) );outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-active,.mat-mdc-option-multiple,:focus,:hover){background-color:var(--mat-option-selected-state-layer-color, var(--mat-sys-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-active,.mat-mdc-option-multiple,:focus,:hover) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var( --mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container) )}.mat-mdc-option.mdc-list-item{align-items:center;background:transparent}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{inset:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors:active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox)):after{content:\"\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox)):after{right:auto;left:16px}}.mat-mdc-option-multiple{--mat-list-list-item-selected-container-color: var(--mat-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-focus-indicator:before{content:\"\"}\n"], dependencies: [{ kind: "component", type: MatPseudoCheckbox, selector: "mat-pseudo-checkbox", inputs: ["state", "disabled", "appearance"] }, { kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
271
280
|
}
|
|
272
281
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: OptionComponent, decorators: [{
|
|
273
282
|
type: Component,
|
|
274
|
-
args: [{ selector: 'SelectItem', imports: [MatPseudoCheckbox, MatRipple],
|
|
283
|
+
args: [{ selector: 'SelectItem', imports: [MatPseudoCheckbox, MatRipple], encapsulation: ViewEncapsulation.None, exportAs: 'matOption', providers: [{ provide: MatOption, useExisting: forwardRef(() => OptionComponent) }], template: `
|
|
275
284
|
@if (multiple) {
|
|
276
285
|
<mat-pseudo-checkbox
|
|
277
286
|
class="mat-mdc-option-pseudo-checkbox"
|
|
278
287
|
[disabled]="disabled"
|
|
279
288
|
[state]="selected ? 'checked' : 'unchecked'"
|
|
280
|
-
aria-hidden="true"
|
|
289
|
+
aria-hidden="true"
|
|
290
|
+
/>
|
|
281
291
|
}
|
|
282
292
|
|
|
283
293
|
<ng-content select="mat-icon" />
|
|
@@ -290,7 +300,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
290
300
|
[disabled]="disabled"
|
|
291
301
|
state="checked"
|
|
292
302
|
aria-hidden="true"
|
|
293
|
-
appearance="minimal"
|
|
303
|
+
appearance="minimal"
|
|
304
|
+
/>
|
|
294
305
|
}
|
|
295
306
|
|
|
296
307
|
@if (group && group._inert) {
|
|
@@ -302,7 +313,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
302
313
|
aria-hidden="true"
|
|
303
314
|
mat-ripple
|
|
304
315
|
[matRippleTrigger]="_getHostElement()"
|
|
305
|
-
[matRippleDisabled]="disabled || disableRipple"
|
|
316
|
+
[matRippleDisabled]="disabled || disableRipple"
|
|
317
|
+
></div>
|
|
306
318
|
`, styles: [".mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:transparent;color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var( --mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent) )}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var( --mat-option-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent) );outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-active,.mat-mdc-option-multiple,:focus,:hover){background-color:var(--mat-option-selected-state-layer-color, var(--mat-sys-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-active,.mat-mdc-option-multiple,:focus,:hover) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var( --mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container) )}.mat-mdc-option.mdc-list-item{align-items:center;background:transparent}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{inset:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors:active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox)):after{content:\"\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox)):after{right:auto;left:16px}}.mat-mdc-option-multiple{--mat-list-list-item-selected-container-color: var(--mat-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-focus-indicator:before{content:\"\"}\n"] }]
|
|
307
319
|
}] });
|
|
308
320
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed,
|
|
2
|
+
import { input, computed, Component } from '@angular/core';
|
|
3
3
|
import { cn } from '@ojiepermana/angular-component/utils';
|
|
4
4
|
|
|
5
5
|
class SeparatorComponent {
|
|
@@ -12,13 +12,12 @@ class SeparatorComponent {
|
|
|
12
12
|
classes = computed(() => cn('block shrink-0 bg-border', this.orientation() === 'horizontal' ? 'h-px w-full' : 'h-full w-px', this.class()), /* @ts-ignore */
|
|
13
13
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
14
14
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SeparatorComponent, isStandalone: true, selector: "Separator", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.role": "decorative() ? \"none\" : \"separator\"", "attr.aria-orientation": "decorative() ? null : orientation()", "attr.data-orientation": "orientation()" } }, ngImport: i0, template: '', isInline: true
|
|
15
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SeparatorComponent, isStandalone: true, selector: "Separator", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.role": "decorative() ? \"none\" : \"separator\"", "attr.aria-orientation": "decorative() ? null : orientation()", "attr.data-orientation": "orientation()" } }, ngImport: i0, template: '', isInline: true });
|
|
16
16
|
}
|
|
17
17
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SeparatorComponent, decorators: [{
|
|
18
18
|
type: Component,
|
|
19
19
|
args: [{
|
|
20
20
|
selector: 'Separator',
|
|
21
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
21
|
host: {
|
|
23
22
|
'[class]': 'classes()',
|
|
24
23
|
'[attr.role]': 'decorative() ? "none" : "separator"',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ViewContainerRef, DestroyRef, ElementRef, model, input, output,
|
|
2
|
+
import { inject, ViewContainerRef, DestroyRef, ElementRef, model, input, output, signal, computed, viewChild, effect, Component, Directive } from '@angular/core';
|
|
3
3
|
import { Overlay } from '@angular/cdk/overlay';
|
|
4
4
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
5
5
|
import { FocusTrapFactory } from '@angular/cdk/a11y';
|
|
@@ -7,7 +7,7 @@ import { DOCUMENT } from '@angular/common';
|
|
|
7
7
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
8
8
|
import { filter } from 'rxjs/operators';
|
|
9
9
|
import { ButtonComponent } from '@ojiepermana/angular-component/button';
|
|
10
|
-
import { cn, radiusBaseValue, densityBaseValue } from '@ojiepermana/angular-component/utils';
|
|
10
|
+
import { cn, radiusBaseValue, densityBaseValue, uniqueId } from '@ojiepermana/angular-component/utils';
|
|
11
11
|
|
|
12
12
|
const SIDE_BASE = {
|
|
13
13
|
top: 'inset-x-0 top-0 border-b border-border',
|
|
@@ -51,6 +51,9 @@ class SheetComponent {
|
|
|
51
51
|
...(ngDevMode ? [{ debugName: "closeButtonLabel" }] : /* istanbul ignore next */ []));
|
|
52
52
|
labelledBy = input(null, { ...(ngDevMode ? { debugName: "labelledBy" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
53
53
|
describedBy = input(null, { ...(ngDevMode ? { debugName: "describedBy" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
|
|
54
|
+
/** ARIA role for the surface. Defaults to `'dialog'`. */
|
|
55
|
+
role = input('dialog', /* @ts-ignore */
|
|
56
|
+
...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
|
|
54
57
|
class = input('', /* @ts-ignore */
|
|
55
58
|
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
56
59
|
radius = input('inherit', /* @ts-ignore */
|
|
@@ -58,6 +61,16 @@ class SheetComponent {
|
|
|
58
61
|
density = input('inherit', /* @ts-ignore */
|
|
59
62
|
...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
|
|
60
63
|
openedChange = output();
|
|
64
|
+
registeredTitleId = signal(null, /* @ts-ignore */
|
|
65
|
+
...(ngDevMode ? [{ debugName: "registeredTitleId" }] : /* istanbul ignore next */ []));
|
|
66
|
+
registeredDescriptionId = signal(null, /* @ts-ignore */
|
|
67
|
+
...(ngDevMode ? [{ debugName: "registeredDescriptionId" }] : /* istanbul ignore next */ []));
|
|
68
|
+
/** Explicit `aria-labelledby` wins; otherwise a projected `SheetTitle` supplies the id. */
|
|
69
|
+
resolvedLabelledBy = computed(() => this.labelledBy() ?? this.registeredTitleId(), /* @ts-ignore */
|
|
70
|
+
...(ngDevMode ? [{ debugName: "resolvedLabelledBy" }] : /* istanbul ignore next */ []));
|
|
71
|
+
/** Explicit `aria-describedby` wins; otherwise a projected `SheetDescription` supplies the id. */
|
|
72
|
+
resolvedDescribedBy = computed(() => this.describedBy() ?? this.registeredDescriptionId(), /* @ts-ignore */
|
|
73
|
+
...(ngDevMode ? [{ debugName: "resolvedDescribedBy" }] : /* istanbul ignore next */ []));
|
|
61
74
|
tpl = viewChild.required('tpl');
|
|
62
75
|
overlayRef = null;
|
|
63
76
|
focusTrap = null;
|
|
@@ -124,6 +137,26 @@ class SheetComponent {
|
|
|
124
137
|
close() {
|
|
125
138
|
this.open.set(false);
|
|
126
139
|
}
|
|
140
|
+
/** Called by a projected `SheetTitle` so default usage has an accessible name (AXE-safe). */
|
|
141
|
+
registerTitleId(id) {
|
|
142
|
+
this.registeredTitleId.set(id);
|
|
143
|
+
}
|
|
144
|
+
/** Cleared by a `SheetTitle` on destroy so a closed/reopened sheet never points at a stale id. */
|
|
145
|
+
unregisterTitleId(id) {
|
|
146
|
+
if (this.registeredTitleId() === id) {
|
|
147
|
+
this.registeredTitleId.set(null);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/** Called by a projected `SheetDescription`. */
|
|
151
|
+
registerDescriptionId(id) {
|
|
152
|
+
this.registeredDescriptionId.set(id);
|
|
153
|
+
}
|
|
154
|
+
/** Cleared by a `SheetDescription` on destroy. */
|
|
155
|
+
unregisterDescriptionId(id) {
|
|
156
|
+
if (this.registeredDescriptionId() === id) {
|
|
157
|
+
this.registeredDescriptionId.set(null);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
127
160
|
isDrawerHost() {
|
|
128
161
|
const variant = this.variant();
|
|
129
162
|
if (variant) {
|
|
@@ -134,18 +167,19 @@ class SheetComponent {
|
|
|
134
167
|
return this.host.nativeElement.localName === 'drawer';
|
|
135
168
|
}
|
|
136
169
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
137
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: SheetComponent, isStandalone: true, selector: "Sheet, Drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, closeButtonLabel: { classPropertyName: "closeButtonLabel", publicName: "closeButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, labelledBy: { classPropertyName: "labelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, describedBy: { classPropertyName: "describedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", openedChange: "openedChange" }, viewQueries: [{ propertyName: "tpl", first: true, predicate: ["tpl"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
170
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: SheetComponent, isStandalone: true, selector: "Sheet, Drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, closeButtonLabel: { classPropertyName: "closeButtonLabel", publicName: "closeButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, labelledBy: { classPropertyName: "labelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, describedBy: { classPropertyName: "describedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", openedChange: "openedChange" }, host: { properties: { "attr.aria-labelledby": "null", "attr.aria-describedby": "null" } }, viewQueries: [{ propertyName: "tpl", first: true, predicate: ["tpl"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
138
171
|
<ng-template #tpl>
|
|
139
172
|
<div
|
|
140
173
|
class="sheet-surface fixed z-50 bg-background shadow-lg transition ease-in-out"
|
|
141
|
-
role="
|
|
174
|
+
[attr.role]="role()"
|
|
142
175
|
aria-modal="true"
|
|
143
|
-
[attr.aria-labelledby]="
|
|
144
|
-
[attr.aria-describedby]="
|
|
176
|
+
[attr.aria-labelledby]="resolvedLabelledBy()"
|
|
177
|
+
[attr.aria-describedby]="resolvedDescribedBy()"
|
|
145
178
|
[class]="surfaceClasses()"
|
|
146
179
|
[style.--sheet-from]="enterFrom()"
|
|
147
180
|
[style.--radius-base]="radiusBase()"
|
|
148
|
-
[style.--spacing-base]="densityBase()"
|
|
181
|
+
[style.--spacing-base]="densityBase()"
|
|
182
|
+
>
|
|
149
183
|
@if (showCloseButton()) {
|
|
150
184
|
<button
|
|
151
185
|
type="button"
|
|
@@ -154,7 +188,8 @@ class SheetComponent {
|
|
|
154
188
|
size="icon-sm"
|
|
155
189
|
class="sheet-close-button absolute right-4 top-4 h-8 w-8 rounded-md p-0 text-muted-foreground opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring"
|
|
156
190
|
[attr.aria-label]="closeButtonLabel()"
|
|
157
|
-
(click)="close()"
|
|
191
|
+
(click)="close()"
|
|
192
|
+
>
|
|
158
193
|
<span aria-hidden="true">X</span>
|
|
159
194
|
<span class="sr-only">{{ closeButtonLabel() }}</span>
|
|
160
195
|
</button>
|
|
@@ -162,22 +197,26 @@ class SheetComponent {
|
|
|
162
197
|
<ng-content />
|
|
163
198
|
</div>
|
|
164
199
|
</ng-template>
|
|
165
|
-
`, isInline: true, styles: [".sheet-surface{animation:sheet-in .3s cubic-bezier(.2,0,0,1)}@keyframes sheet-in{0%{transform:var(--sheet-from)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sheet-surface{animation-duration:0ms}}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[Button], a[Button]", inputs: ["variant", "size", "class", "radius", "density"] }]
|
|
200
|
+
`, isInline: true, styles: [".sheet-surface{animation:sheet-in .3s cubic-bezier(.2,0,0,1)}@keyframes sheet-in{0%{transform:var(--sheet-from)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sheet-surface{animation-duration:0ms}}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[Button], a[Button]", inputs: ["variant", "size", "class", "radius", "density"] }] });
|
|
166
201
|
}
|
|
167
202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetComponent, decorators: [{
|
|
168
203
|
type: Component,
|
|
169
|
-
args: [{ selector: 'Sheet, Drawer',
|
|
204
|
+
args: [{ selector: 'Sheet, Drawer', host: {
|
|
205
|
+
'[attr.aria-labelledby]': 'null',
|
|
206
|
+
'[attr.aria-describedby]': 'null',
|
|
207
|
+
}, imports: [ButtonComponent], template: `
|
|
170
208
|
<ng-template #tpl>
|
|
171
209
|
<div
|
|
172
210
|
class="sheet-surface fixed z-50 bg-background shadow-lg transition ease-in-out"
|
|
173
|
-
role="
|
|
211
|
+
[attr.role]="role()"
|
|
174
212
|
aria-modal="true"
|
|
175
|
-
[attr.aria-labelledby]="
|
|
176
|
-
[attr.aria-describedby]="
|
|
213
|
+
[attr.aria-labelledby]="resolvedLabelledBy()"
|
|
214
|
+
[attr.aria-describedby]="resolvedDescribedBy()"
|
|
177
215
|
[class]="surfaceClasses()"
|
|
178
216
|
[style.--sheet-from]="enterFrom()"
|
|
179
217
|
[style.--radius-base]="radiusBase()"
|
|
180
|
-
[style.--spacing-base]="densityBase()"
|
|
218
|
+
[style.--spacing-base]="densityBase()"
|
|
219
|
+
>
|
|
181
220
|
@if (showCloseButton()) {
|
|
182
221
|
<button
|
|
183
222
|
type="button"
|
|
@@ -186,7 +225,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
186
225
|
size="icon-sm"
|
|
187
226
|
class="sheet-close-button absolute right-4 top-4 h-8 w-8 rounded-md p-0 text-muted-foreground opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring"
|
|
188
227
|
[attr.aria-label]="closeButtonLabel()"
|
|
189
|
-
(click)="close()"
|
|
228
|
+
(click)="close()"
|
|
229
|
+
>
|
|
190
230
|
<span aria-hidden="true">X</span>
|
|
191
231
|
<span class="sr-only">{{ closeButtonLabel() }}</span>
|
|
192
232
|
</button>
|
|
@@ -195,7 +235,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
195
235
|
</div>
|
|
196
236
|
</ng-template>
|
|
197
237
|
`, styles: [".sheet-surface{animation:sheet-in .3s cubic-bezier(.2,0,0,1)}@keyframes sheet-in{0%{transform:var(--sheet-from)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sheet-surface{animation-duration:0ms}}\n"] }]
|
|
198
|
-
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], closeButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeButtonLabel", required: false }] }], labelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], describedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }], tpl: [{ type: i0.ViewChild, args: ['tpl', { isSignal: true }] }] } });
|
|
238
|
+
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], closeButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeButtonLabel", required: false }] }], labelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], describedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }], tpl: [{ type: i0.ViewChild, args: ['tpl', { isSignal: true }] }] } });
|
|
199
239
|
|
|
200
240
|
class SheetCloseDirective {
|
|
201
241
|
sheet = inject(SheetComponent);
|
|
@@ -221,64 +261,84 @@ class SheetHeaderComponent {
|
|
|
221
261
|
classes = computed(() => cn('flex flex-col gap-2 text-center sm:text-left', this.class()), /* @ts-ignore */
|
|
222
262
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
223
263
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
224
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SheetHeaderComponent, isStandalone: true, selector: "SheetHeader, DrawerHeader", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true
|
|
264
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SheetHeaderComponent, isStandalone: true, selector: "SheetHeader, DrawerHeader", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
225
265
|
}
|
|
226
266
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetHeaderComponent, decorators: [{
|
|
227
267
|
type: Component,
|
|
228
268
|
args: [{
|
|
229
269
|
selector: 'SheetHeader, DrawerHeader',
|
|
230
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
231
270
|
host: { '[class]': 'classes()' },
|
|
232
271
|
template: `<ng-content />`,
|
|
233
272
|
}]
|
|
234
273
|
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
235
274
|
class SheetTitleComponent {
|
|
275
|
+
/** Explicit id override; when omitted a document-unique id is generated. */
|
|
276
|
+
id = input(null, /* @ts-ignore */
|
|
277
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
236
278
|
class = input('', /* @ts-ignore */
|
|
237
279
|
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
280
|
+
autoId = uniqueId('sheet-title');
|
|
281
|
+
sheet = inject(SheetComponent, { optional: true });
|
|
282
|
+
/** The id rendered on the element, used by the parent sheet for aria-labelledby. */
|
|
283
|
+
resolvedId = computed(() => this.id() ?? this.autoId, /* @ts-ignore */
|
|
284
|
+
...(ngDevMode ? [{ debugName: "resolvedId" }] : /* istanbul ignore next */ []));
|
|
238
285
|
classes = computed(() => cn('text-lg font-semibold text-foreground', this.class()), /* @ts-ignore */
|
|
239
286
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
287
|
+
constructor() {
|
|
288
|
+
effect(() => this.sheet?.registerTitleId(this.resolvedId()));
|
|
289
|
+
inject(DestroyRef).onDestroy(() => this.sheet?.unregisterTitleId(this.resolvedId()));
|
|
290
|
+
}
|
|
240
291
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
241
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SheetTitleComponent, isStandalone: true, selector: "SheetTitle, DrawerTitle, h2[SheetTitle], h2[DrawerTitle]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true
|
|
292
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SheetTitleComponent, isStandalone: true, selector: "SheetTitle, DrawerTitle, h2[SheetTitle], h2[DrawerTitle]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "resolvedId()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
242
293
|
}
|
|
243
294
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetTitleComponent, decorators: [{
|
|
244
295
|
type: Component,
|
|
245
296
|
args: [{
|
|
246
297
|
selector: 'SheetTitle, DrawerTitle, h2[SheetTitle], h2[DrawerTitle]',
|
|
247
|
-
|
|
248
|
-
host: { '[class]': 'classes()' },
|
|
298
|
+
host: { '[class]': 'classes()', '[attr.id]': 'resolvedId()' },
|
|
249
299
|
template: `<ng-content />`,
|
|
250
300
|
}]
|
|
251
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
301
|
+
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
252
302
|
class SheetDescriptionComponent {
|
|
303
|
+
/** Explicit id override; when omitted a document-unique id is generated. */
|
|
304
|
+
id = input(null, /* @ts-ignore */
|
|
305
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
253
306
|
class = input('', /* @ts-ignore */
|
|
254
307
|
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
308
|
+
autoId = uniqueId('sheet-description');
|
|
309
|
+
sheet = inject(SheetComponent, { optional: true });
|
|
310
|
+
/** The id rendered on the element, used by the parent sheet for aria-describedby. */
|
|
311
|
+
resolvedId = computed(() => this.id() ?? this.autoId, /* @ts-ignore */
|
|
312
|
+
...(ngDevMode ? [{ debugName: "resolvedId" }] : /* istanbul ignore next */ []));
|
|
255
313
|
classes = computed(() => cn('text-sm text-muted-foreground', this.class()), /* @ts-ignore */
|
|
256
314
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
315
|
+
constructor() {
|
|
316
|
+
effect(() => this.sheet?.registerDescriptionId(this.resolvedId()));
|
|
317
|
+
inject(DestroyRef).onDestroy(() => this.sheet?.unregisterDescriptionId(this.resolvedId()));
|
|
318
|
+
}
|
|
257
319
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
258
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SheetDescriptionComponent, isStandalone: true, selector: "SheetDescription, DrawerDescription, p[SheetDescription], p[DrawerDescription]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true
|
|
320
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SheetDescriptionComponent, isStandalone: true, selector: "SheetDescription, DrawerDescription, p[SheetDescription], p[DrawerDescription]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "resolvedId()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
259
321
|
}
|
|
260
322
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetDescriptionComponent, decorators: [{
|
|
261
323
|
type: Component,
|
|
262
324
|
args: [{
|
|
263
325
|
selector: 'SheetDescription, DrawerDescription, p[SheetDescription], p[DrawerDescription]',
|
|
264
|
-
|
|
265
|
-
host: { '[class]': 'classes()' },
|
|
326
|
+
host: { '[class]': 'classes()', '[attr.id]': 'resolvedId()' },
|
|
266
327
|
template: `<ng-content />`,
|
|
267
328
|
}]
|
|
268
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
329
|
+
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
269
330
|
class SheetContentComponent {
|
|
270
331
|
class = input('', /* @ts-ignore */
|
|
271
332
|
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
272
333
|
classes = computed(() => cn('flex-1 overflow-auto', this.class()), /* @ts-ignore */
|
|
273
334
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
274
335
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
275
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SheetContentComponent, isStandalone: true, selector: "SheetContent, DrawerContent", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true
|
|
336
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SheetContentComponent, isStandalone: true, selector: "SheetContent, DrawerContent", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
276
337
|
}
|
|
277
338
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetContentComponent, decorators: [{
|
|
278
339
|
type: Component,
|
|
279
340
|
args: [{
|
|
280
341
|
selector: 'SheetContent, DrawerContent',
|
|
281
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
282
342
|
host: { '[class]': 'classes()' },
|
|
283
343
|
template: `<ng-content />`,
|
|
284
344
|
}]
|
|
@@ -289,13 +349,12 @@ class SheetFooterComponent {
|
|
|
289
349
|
classes = computed(() => cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', this.class()), /* @ts-ignore */
|
|
290
350
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
291
351
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
292
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SheetFooterComponent, isStandalone: true, selector: "SheetFooter, DrawerFooter", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true
|
|
352
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SheetFooterComponent, isStandalone: true, selector: "SheetFooter, DrawerFooter", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
293
353
|
}
|
|
294
354
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetFooterComponent, decorators: [{
|
|
295
355
|
type: Component,
|
|
296
356
|
args: [{
|
|
297
357
|
selector: 'SheetFooter, DrawerFooter',
|
|
298
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
299
358
|
host: { '[class]': 'classes()' },
|
|
300
359
|
template: `<ng-content />`,
|
|
301
360
|
}]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed,
|
|
2
|
+
import { input, computed, Component } from '@angular/core';
|
|
3
3
|
import { cn } from '@ojiepermana/angular-component/utils';
|
|
4
4
|
|
|
5
5
|
class SkeletonComponent {
|
|
@@ -8,13 +8,12 @@ class SkeletonComponent {
|
|
|
8
8
|
classes = computed(() => cn('block animate-pulse rounded-md bg-muted', this.class()), /* @ts-ignore */
|
|
9
9
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
10
10
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SkeletonComponent, isStandalone: true, selector: "Skeleton", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.aria-hidden": "\"true\"" } }, ngImport: i0, template: '', isInline: true
|
|
11
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SkeletonComponent, isStandalone: true, selector: "Skeleton", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.aria-hidden": "\"true\"" } }, ngImport: i0, template: '', isInline: true });
|
|
12
12
|
}
|
|
13
13
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SkeletonComponent, decorators: [{
|
|
14
14
|
type: Component,
|
|
15
15
|
args: [{
|
|
16
16
|
selector: 'Skeleton',
|
|
17
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
17
|
host: {
|
|
19
18
|
'[class]': 'classes()',
|
|
20
19
|
'[attr.aria-hidden]': '"true"',
|