@edsis/ui 0.0.2 → 21.3.6
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/empty/README.md +1 -1
- package/fesm2022/edsis-ui-accordion.mjs +15 -15
- package/fesm2022/edsis-ui-alert-dialog.mjs +27 -27
- package/fesm2022/edsis-ui-alert.mjs +12 -12
- package/fesm2022/edsis-ui-aspect-ratio.mjs +3 -3
- package/fesm2022/edsis-ui-avatar.mjs +18 -18
- package/fesm2022/edsis-ui-badge.mjs +3 -3
- package/fesm2022/edsis-ui-breadcrumb.mjs +21 -21
- package/fesm2022/edsis-ui-button-group.mjs +9 -9
- package/fesm2022/edsis-ui-button.mjs +3 -3
- package/fesm2022/edsis-ui-calendar.mjs +3 -3
- package/fesm2022/edsis-ui-card.mjs +21 -21
- package/fesm2022/edsis-ui-carousel.mjs +18 -18
- package/fesm2022/edsis-ui-chart.mjs +80 -78
- package/fesm2022/edsis-ui-chart.mjs.map +1 -1
- package/fesm2022/edsis-ui-checkbox.mjs +3 -3
- package/fesm2022/edsis-ui-collapsible.mjs +12 -12
- package/fesm2022/edsis-ui-combobox.mjs +3 -3
- package/fesm2022/edsis-ui-command.mjs +41 -35
- package/fesm2022/edsis-ui-command.mjs.map +1 -1
- package/fesm2022/edsis-ui-composer.mjs +21 -21
- package/fesm2022/edsis-ui-context-menu.mjs +13 -7
- package/fesm2022/edsis-ui-context-menu.mjs.map +1 -1
- package/fesm2022/edsis-ui-date-picker.mjs +3 -3
- package/fesm2022/edsis-ui-dialog.mjs +27 -23
- package/fesm2022/edsis-ui-dialog.mjs.map +1 -1
- package/fesm2022/edsis-ui-dropdown-menu.mjs +58 -46
- package/fesm2022/edsis-ui-dropdown-menu.mjs.map +1 -1
- package/fesm2022/edsis-ui-editor.mjs +22 -20
- package/fesm2022/edsis-ui-editor.mjs.map +1 -1
- package/fesm2022/edsis-ui-empty.mjs +18 -18
- package/fesm2022/edsis-ui-form.mjs +38 -38
- package/fesm2022/edsis-ui-form.mjs.map +1 -1
- package/fesm2022/edsis-ui-hover-card.mjs +34 -13
- package/fesm2022/edsis-ui-hover-card.mjs.map +1 -1
- package/fesm2022/edsis-ui-input-group.mjs +18 -18
- package/fesm2022/edsis-ui-input-otp.mjs +15 -15
- package/fesm2022/edsis-ui-input.mjs +3 -3
- package/fesm2022/edsis-ui-item.mjs +30 -30
- package/fesm2022/edsis-ui-kanban.mjs +27 -27
- package/fesm2022/edsis-ui-kbd.mjs +6 -6
- package/fesm2022/edsis-ui-label.mjs +3 -3
- package/fesm2022/edsis-ui-layout-services.mjs +6 -0
- package/fesm2022/edsis-ui-layout-services.mjs.map +1 -0
- package/fesm2022/edsis-ui-layout-types.mjs +6 -0
- package/fesm2022/edsis-ui-layout-types.mjs.map +1 -0
- package/fesm2022/edsis-ui-layout.mjs +572 -0
- package/fesm2022/edsis-ui-layout.mjs.map +1 -0
- package/fesm2022/edsis-ui-menubar.mjs +22 -16
- package/fesm2022/edsis-ui-menubar.mjs.map +1 -1
- package/fesm2022/edsis-ui-native-select.mjs +9 -9
- package/fesm2022/edsis-ui-nav-service.mjs +343 -0
- package/fesm2022/edsis-ui-nav-service.mjs.map +1 -0
- package/fesm2022/edsis-ui-nav.mjs +2340 -0
- package/fesm2022/edsis-ui-nav.mjs.map +1 -0
- package/fesm2022/edsis-ui-navigation-menu.mjs +30 -24
- package/fesm2022/edsis-ui-navigation-menu.mjs.map +1 -1
- package/fesm2022/edsis-ui-page.mjs +397 -0
- package/fesm2022/edsis-ui-page.mjs.map +1 -0
- package/fesm2022/edsis-ui-pagination.mjs +3 -3
- package/fesm2022/edsis-ui-pillbox.mjs +16 -16
- package/fesm2022/edsis-ui-pillbox.mjs.map +1 -1
- package/fesm2022/edsis-ui-popover.mjs +16 -10
- package/fesm2022/edsis-ui-popover.mjs.map +1 -1
- package/fesm2022/edsis-ui-progress.mjs +3 -3
- package/fesm2022/edsis-ui-radio.mjs +6 -6
- package/fesm2022/edsis-ui-resizable.mjs +12 -12
- package/fesm2022/edsis-ui-scroll-area.mjs +3 -3
- package/fesm2022/edsis-ui-select.mjs +6 -6
- package/fesm2022/edsis-ui-separator.mjs +3 -3
- package/fesm2022/edsis-ui-sheet.mjs +27 -23
- package/fesm2022/edsis-ui-sheet.mjs.map +1 -1
- package/fesm2022/edsis-ui-skeleton.mjs +3 -3
- package/fesm2022/edsis-ui-slider.mjs +6 -6
- package/fesm2022/edsis-ui-spinner.mjs +3 -3
- package/fesm2022/edsis-ui-switch.mjs +3 -3
- package/fesm2022/edsis-ui-table.mjs +24 -24
- package/fesm2022/edsis-ui-tabs.mjs +18 -18
- package/fesm2022/edsis-ui-textarea.mjs +3 -3
- package/fesm2022/edsis-ui-theme.mjs +209 -0
- package/fesm2022/edsis-ui-theme.mjs.map +1 -0
- package/fesm2022/edsis-ui-timeline.mjs +18 -18
- package/fesm2022/edsis-ui-toast.mjs +3 -3
- package/fesm2022/edsis-ui-toggle-group.mjs +9 -9
- package/fesm2022/edsis-ui-toggle.mjs +3 -3
- package/fesm2022/edsis-ui-tooltip.mjs +12 -12
- package/layout/README.md +454 -0
- package/nav/README.md +96 -0
- package/package.json +31 -2
- package/page/README.md +46 -0
- package/types/edsis-ui-command.d.ts +4 -1
- package/types/edsis-ui-context-menu.d.ts +2 -1
- package/types/edsis-ui-dropdown-menu.d.ts +4 -1
- package/types/edsis-ui-editor.d.ts +1 -0
- package/types/edsis-ui-hover-card.d.ts +3 -1
- package/types/edsis-ui-layout-services.d.ts +1 -0
- package/types/edsis-ui-layout-types.d.ts +1 -0
- package/types/edsis-ui-layout.d.ts +153 -0
- package/types/edsis-ui-menubar.d.ts +2 -0
- package/types/edsis-ui-nav-service.d.ts +138 -0
- package/types/edsis-ui-nav.d.ts +205 -0
- package/types/edsis-ui-navigation-menu.d.ts +2 -0
- package/types/edsis-ui-page.d.ts +137 -0
- package/types/edsis-ui-popover.d.ts +2 -1
- package/types/edsis-ui-theme.d.ts +71 -0
|
@@ -6,10 +6,10 @@ class LabelComponent {
|
|
|
6
6
|
for = input(null, ...(ngDevMode ? [{ debugName: "for" }] : /* istanbul ignore next */ []));
|
|
7
7
|
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
8
8
|
classes = computed(() => cn('text-sm font-medium leading-none text-foreground', 'peer-disabled:cursor-not-allowed peer-disabled:opacity-70', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
9
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
10
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
9
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: LabelComponent, isStandalone: true, selector: "ui-label, label[ui-label]", inputs: { for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.for": "for() || null" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LabelComponent, decorators: [{
|
|
13
13
|
type: Component,
|
|
14
14
|
args: [{
|
|
15
15
|
selector: 'ui-label, label[ui-label]',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edsis-ui-layout-services.mjs","sources":["../../../library/ui/layout/services/edsis-ui-layout-services.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;AAEG"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { UI_LAYOUT_APPEARANCE_STORAGE_KEY, UI_LAYOUT_DEFAULT_STYLE, UI_LAYOUT_DEFAULT_SURFACE, UI_LAYOUT_DEFAULT_TYPE, UI_LAYOUT_DEFAULT_WIDTH, UI_LAYOUT_STYLES, UI_LAYOUT_STYLE_STORAGE_KEY, UI_LAYOUT_SURFACES, UI_LAYOUT_SURFACE_STORAGE_KEY, UI_LAYOUT_TYPES, UI_LAYOUT_TYPE_STORAGE_KEY, UI_LAYOUT_WIDTHS, UI_LAYOUT_WIDTH_STORAGE_KEY, isUiLayoutStyle, isUiLayoutSurface, isUiLayoutType, isUiLayoutWidth } from '@edsis/ui/layout';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Generated bundle index. Do not edit.
|
|
5
|
+
*/
|
|
6
|
+
//# sourceMappingURL=edsis-ui-layout-types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edsis-ui-layout-types.mjs","sources":["../../../library/ui/layout/types/edsis-ui-layout-types.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;AAEG"}
|
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, PLATFORM_ID, signal, Injectable, input, computed, effect, ChangeDetectionStrategy, Component, contentChild } from '@angular/core';
|
|
3
|
+
import { cn } from '@edsis/ui/utils';
|
|
4
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
5
|
+
import { UiNavComponent } from '@edsis/ui/nav';
|
|
6
|
+
|
|
7
|
+
const UI_LAYOUT_TYPES = ['vertical', 'horizontal', 'empty'];
|
|
8
|
+
const UI_LAYOUT_SURFACES = ['flat', 'grid', 'honeycome', 'line-vertical', 'line-horizontal'];
|
|
9
|
+
const UI_LAYOUT_STYLES = ['flat', 'border-rail'];
|
|
10
|
+
const UI_LAYOUT_WIDTHS = ['full', 'wide', 'container'];
|
|
11
|
+
const UI_LAYOUT_DEFAULT_SURFACE = 'flat';
|
|
12
|
+
const UI_LAYOUT_DEFAULT_TYPE = 'vertical';
|
|
13
|
+
const UI_LAYOUT_DEFAULT_STYLE = 'flat';
|
|
14
|
+
const UI_LAYOUT_DEFAULT_WIDTH = 'full';
|
|
15
|
+
const UI_LAYOUT_SURFACE_STORAGE_KEY = 'layout-surface';
|
|
16
|
+
const UI_LAYOUT_APPEARANCE_STORAGE_KEY = 'layout-appearance';
|
|
17
|
+
const UI_LAYOUT_TYPE_STORAGE_KEY = 'layout-type';
|
|
18
|
+
const UI_LAYOUT_STYLE_STORAGE_KEY = 'layout-style';
|
|
19
|
+
const UI_LAYOUT_WIDTH_STORAGE_KEY = 'layout-width';
|
|
20
|
+
function isUiLayoutSurface(value) {
|
|
21
|
+
return value !== null && UI_LAYOUT_SURFACES.includes(value);
|
|
22
|
+
}
|
|
23
|
+
function isUiLayoutType(value) {
|
|
24
|
+
return value !== null && UI_LAYOUT_TYPES.includes(value);
|
|
25
|
+
}
|
|
26
|
+
function isUiLayoutStyle(value) {
|
|
27
|
+
return value !== null && UI_LAYOUT_STYLES.includes(value);
|
|
28
|
+
}
|
|
29
|
+
function isUiLayoutWidth(value) {
|
|
30
|
+
return value !== null && UI_LAYOUT_WIDTHS.includes(value);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
class LayoutService {
|
|
34
|
+
platformId = inject(PLATFORM_ID);
|
|
35
|
+
surfaceState = signal(this.getStoredSurface(), ...(ngDevMode ? [{ debugName: "surfaceState" }] : /* istanbul ignore next */ []));
|
|
36
|
+
typeState = signal(this.getStoredType(), ...(ngDevMode ? [{ debugName: "typeState" }] : /* istanbul ignore next */ []));
|
|
37
|
+
styleState = signal(this.getStoredStyle(), ...(ngDevMode ? [{ debugName: "styleState" }] : /* istanbul ignore next */ []));
|
|
38
|
+
widthState = signal(this.getStoredWidth(), ...(ngDevMode ? [{ debugName: "widthState" }] : /* istanbul ignore next */ []));
|
|
39
|
+
surface = this.surfaceState.asReadonly();
|
|
40
|
+
type = this.typeState.asReadonly();
|
|
41
|
+
appearance = this.styleState.asReadonly();
|
|
42
|
+
style = this.styleState.asReadonly();
|
|
43
|
+
width = this.widthState.asReadonly();
|
|
44
|
+
registerDefaults(defaults) {
|
|
45
|
+
if (defaults.surface !== undefined) {
|
|
46
|
+
this.registerSurface(defaults.surface);
|
|
47
|
+
}
|
|
48
|
+
if (defaults.appearance !== undefined) {
|
|
49
|
+
this.registerAppearance(defaults.appearance);
|
|
50
|
+
}
|
|
51
|
+
if (defaults.type !== undefined) {
|
|
52
|
+
this.registerType(defaults.type);
|
|
53
|
+
}
|
|
54
|
+
if (defaults.width !== undefined) {
|
|
55
|
+
this.registerWidth(defaults.width);
|
|
56
|
+
}
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
registerSurface(surface) {
|
|
60
|
+
const storedSurface = this.readStorage(UI_LAYOUT_SURFACE_STORAGE_KEY);
|
|
61
|
+
if (isUiLayoutSurface(storedSurface)) {
|
|
62
|
+
this.surfaceState.set(storedSurface);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
this.setSurface(surface);
|
|
66
|
+
}
|
|
67
|
+
registerType(type) {
|
|
68
|
+
const storedType = this.readStorage(UI_LAYOUT_TYPE_STORAGE_KEY);
|
|
69
|
+
if (isUiLayoutType(storedType)) {
|
|
70
|
+
this.typeState.set(storedType);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
this.setType(type);
|
|
74
|
+
}
|
|
75
|
+
registerAppearance(appearance) {
|
|
76
|
+
this.setAppearance(this.getStoredAppearanceOrDefault(appearance));
|
|
77
|
+
}
|
|
78
|
+
registerStyle(style) {
|
|
79
|
+
this.registerAppearance(style);
|
|
80
|
+
}
|
|
81
|
+
registerWidth(width) {
|
|
82
|
+
const storedWidth = this.readStorage(UI_LAYOUT_WIDTH_STORAGE_KEY);
|
|
83
|
+
if (isUiLayoutWidth(storedWidth)) {
|
|
84
|
+
this.widthState.set(storedWidth);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
this.setWidth(width);
|
|
88
|
+
}
|
|
89
|
+
setSurface(surface) {
|
|
90
|
+
this.surfaceState.set(surface);
|
|
91
|
+
this.writeStorage(UI_LAYOUT_SURFACE_STORAGE_KEY, surface);
|
|
92
|
+
}
|
|
93
|
+
setType(type) {
|
|
94
|
+
this.typeState.set(type);
|
|
95
|
+
this.writeStorage(UI_LAYOUT_TYPE_STORAGE_KEY, type);
|
|
96
|
+
}
|
|
97
|
+
setAppearance(appearance) {
|
|
98
|
+
this.styleState.set(appearance);
|
|
99
|
+
this.writeStorage(UI_LAYOUT_APPEARANCE_STORAGE_KEY, appearance);
|
|
100
|
+
this.removeStorage(UI_LAYOUT_STYLE_STORAGE_KEY);
|
|
101
|
+
}
|
|
102
|
+
setStyle(style) {
|
|
103
|
+
this.setAppearance(style);
|
|
104
|
+
}
|
|
105
|
+
setWidth(width) {
|
|
106
|
+
this.widthState.set(width);
|
|
107
|
+
this.writeStorage(UI_LAYOUT_WIDTH_STORAGE_KEY, width);
|
|
108
|
+
}
|
|
109
|
+
getStoredSurface() {
|
|
110
|
+
const value = this.readStorage(UI_LAYOUT_SURFACE_STORAGE_KEY);
|
|
111
|
+
return isUiLayoutSurface(value) ? value : UI_LAYOUT_DEFAULT_SURFACE;
|
|
112
|
+
}
|
|
113
|
+
getStoredType() {
|
|
114
|
+
const value = this.readStorage(UI_LAYOUT_TYPE_STORAGE_KEY);
|
|
115
|
+
return isUiLayoutType(value) ? value : UI_LAYOUT_DEFAULT_TYPE;
|
|
116
|
+
}
|
|
117
|
+
getStoredAppearance() {
|
|
118
|
+
const value = this.readStoredAppearance();
|
|
119
|
+
return value ?? UI_LAYOUT_DEFAULT_STYLE;
|
|
120
|
+
}
|
|
121
|
+
getStoredStyle() {
|
|
122
|
+
return this.getStoredAppearance();
|
|
123
|
+
}
|
|
124
|
+
getStoredWidth() {
|
|
125
|
+
const value = this.readStorage(UI_LAYOUT_WIDTH_STORAGE_KEY);
|
|
126
|
+
return isUiLayoutWidth(value) ? value : UI_LAYOUT_DEFAULT_WIDTH;
|
|
127
|
+
}
|
|
128
|
+
readStorage(key) {
|
|
129
|
+
const storage = this.getStorage();
|
|
130
|
+
if (!storage) {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
try {
|
|
134
|
+
return storage.getItem(key);
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
removeStorage(key) {
|
|
141
|
+
const storage = this.getStorage();
|
|
142
|
+
if (!storage) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
try {
|
|
146
|
+
storage.removeItem(key);
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
writeStorage(key, value) {
|
|
153
|
+
const storage = this.getStorage();
|
|
154
|
+
if (!storage) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
try {
|
|
158
|
+
storage.setItem(key, value);
|
|
159
|
+
}
|
|
160
|
+
catch {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
getStorage() {
|
|
165
|
+
if (!isPlatformBrowser(this.platformId)) {
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
try {
|
|
169
|
+
return localStorage;
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
readStoredAppearance() {
|
|
176
|
+
const appearance = this.readStorage(UI_LAYOUT_APPEARANCE_STORAGE_KEY);
|
|
177
|
+
if (isUiLayoutStyle(appearance)) {
|
|
178
|
+
return appearance;
|
|
179
|
+
}
|
|
180
|
+
const legacyStyle = this.readStorage(UI_LAYOUT_STYLE_STORAGE_KEY);
|
|
181
|
+
return isUiLayoutStyle(legacyStyle) ? legacyStyle : null;
|
|
182
|
+
}
|
|
183
|
+
getStoredAppearanceOrDefault(fallback) {
|
|
184
|
+
return this.readStoredAppearance() ?? fallback;
|
|
185
|
+
}
|
|
186
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
187
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LayoutService, providedIn: 'root' });
|
|
188
|
+
}
|
|
189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LayoutService, decorators: [{
|
|
190
|
+
type: Injectable,
|
|
191
|
+
args: [{ providedIn: 'root' }]
|
|
192
|
+
}] });
|
|
193
|
+
|
|
194
|
+
class UiLayoutComponent {
|
|
195
|
+
layout = inject(LayoutService);
|
|
196
|
+
surface = input(null, ...(ngDevMode ? [{ debugName: "surface" }] : /* istanbul ignore next */ []));
|
|
197
|
+
appearance = input(null, ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
198
|
+
layoutStyleAttribute = input(null, { ...(ngDevMode ? { debugName: "layoutStyleAttribute" } : /* istanbul ignore next */ {}), alias: 'layout-style' });
|
|
199
|
+
width = input(null, ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
200
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
201
|
+
appearanceInput = computed(() => this.appearance() ?? this.layoutStyleAttribute(), ...(ngDevMode ? [{ debugName: "appearanceInput" }] : /* istanbul ignore next */ []));
|
|
202
|
+
resolvedSurface = computed(() => this.surface() ?? this.layout.surface(), ...(ngDevMode ? [{ debugName: "resolvedSurface" }] : /* istanbul ignore next */ []));
|
|
203
|
+
resolvedAppearance = computed(() => this.appearanceInput() ?? this.layout.appearance(), ...(ngDevMode ? [{ debugName: "resolvedAppearance" }] : /* istanbul ignore next */ []));
|
|
204
|
+
resolvedStyle = computed(() => this.layout.style(), ...(ngDevMode ? [{ debugName: "resolvedStyle" }] : /* istanbul ignore next */ []));
|
|
205
|
+
resolvedWidth = computed(() => this.width() ?? this.layout.width(), ...(ngDevMode ? [{ debugName: "resolvedWidth" }] : /* istanbul ignore next */ []));
|
|
206
|
+
isBorderRail = computed(() => this.resolvedAppearance() === 'border-rail', ...(ngDevMode ? [{ debugName: "isBorderRail" }] : /* istanbul ignore next */ []));
|
|
207
|
+
showsHorizontalInsetRails = computed(() => {
|
|
208
|
+
const layoutType = this.layout.type();
|
|
209
|
+
return this.isBorderRail() && (layoutType === 'horizontal' || layoutType === 'vertical');
|
|
210
|
+
}, ...(ngDevMode ? [{ debugName: "showsHorizontalInsetRails" }] : /* istanbul ignore next */ []));
|
|
211
|
+
railPaddingClasses = computed(() => cn('h-full w-full', this.widthClasses()), ...(ngDevMode ? [{ debugName: "railPaddingClasses" }] : /* istanbul ignore next */ []));
|
|
212
|
+
railAnchorClasses = computed(() => cn('relative h-full min-h-0 min-w-0', this.frameWidthClasses()), ...(ngDevMode ? [{ debugName: "railAnchorClasses" }] : /* istanbul ignore next */ []));
|
|
213
|
+
contentShellClasses = computed(() => cn('relative z-10 h-full min-h-0 w-full min-w-0', this.isBorderRail() ? 'overflow-visible' : 'overflow-hidden'), ...(ngDevMode ? [{ debugName: "contentShellClasses" }] : /* istanbul ignore next */ []));
|
|
214
|
+
hostClasses = computed(() => cn('relative isolate block h-dvh w-full min-w-0 box-border overflow-hidden text-foreground', this.surfaceClasses(), this.widthClasses(), this.class()), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
215
|
+
frameClasses = computed(() => cn('relative h-full min-h-0 min-w-0 border-border bg-background/55 backdrop-blur-xs', this.frameWidthClasses(), this.isBorderRail() ? 'overflow-visible border-2' : 'overflow-hidden border'), ...(ngDevMode ? [{ debugName: "frameClasses" }] : /* istanbul ignore next */ []));
|
|
216
|
+
constructor() {
|
|
217
|
+
effect(() => {
|
|
218
|
+
const surface = this.surface();
|
|
219
|
+
if (surface !== null) {
|
|
220
|
+
this.layout.setSurface(surface);
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
this.layout.registerSurface(UI_LAYOUT_DEFAULT_SURFACE);
|
|
224
|
+
}
|
|
225
|
+
const appearance = this.appearanceInput();
|
|
226
|
+
if (appearance !== null) {
|
|
227
|
+
this.layout.setAppearance(appearance);
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
this.layout.registerAppearance(UI_LAYOUT_DEFAULT_STYLE);
|
|
231
|
+
}
|
|
232
|
+
const width = this.width();
|
|
233
|
+
if (width !== null) {
|
|
234
|
+
this.layout.setWidth(width);
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
this.layout.registerWidth(UI_LAYOUT_DEFAULT_WIDTH);
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
surfaceClasses() {
|
|
242
|
+
switch (this.resolvedSurface()) {
|
|
243
|
+
case 'grid':
|
|
244
|
+
return '[--ui-layout-grid-size:2rem] bg-background bg-[linear-gradient(rgba(148,163,184,0.18)_1px,transparent_1px),linear-gradient(to_right,rgba(148,163,184,0.18)_1px,transparent_1px)] bg-position-[center_center] bg-size-[var(--ui-layout-grid-size)_var(--ui-layout-grid-size)]';
|
|
245
|
+
case 'honeycome':
|
|
246
|
+
return 'bg-background bg-[radial-gradient(circle_at_0_0,rgba(148,163,184,0.22)_1px,transparent_1.5px)] bg-position-[center_center] bg-size-[1.25rem_1.25rem]';
|
|
247
|
+
case 'line-vertical':
|
|
248
|
+
return 'bg-background bg-[linear-gradient(to_right,rgba(148,163,184,0.22)_1px,transparent_1px)] bg-position-[center_center] bg-size-[2rem_2rem]';
|
|
249
|
+
case 'line-horizontal':
|
|
250
|
+
return 'bg-background bg-[linear-gradient(rgba(148,163,184,0.22)_1px,transparent_1px)] bg-position-[center_center] bg-size-[2rem_2rem]';
|
|
251
|
+
default:
|
|
252
|
+
return 'bg-background';
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
widthClasses() {
|
|
256
|
+
switch (this.resolvedWidth()) {
|
|
257
|
+
case 'wide':
|
|
258
|
+
return 'p-4 lg:p-12';
|
|
259
|
+
case 'container':
|
|
260
|
+
return 'p-4 lg:px-0 lg:py-16';
|
|
261
|
+
default:
|
|
262
|
+
return 'p-4';
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
frameWidthClasses() {
|
|
266
|
+
return this.resolvedWidth() === 'container' ? 'w-full lg:container lg:mx-auto' : 'w-full';
|
|
267
|
+
}
|
|
268
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
269
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: UiLayoutComponent, isStandalone: true, selector: "ui-layout", inputs: { surface: { classPropertyName: "surface", publicName: "surface", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, layoutStyleAttribute: { classPropertyName: "layoutStyleAttribute", publicName: "layout-style", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()", "attr.data-surface": "resolvedSurface()", "attr.data-layout-appearance": "resolvedAppearance()", "attr.data-layout-style": "resolvedStyle()", "attr.data-layout-width": "resolvedWidth()", "attr.data-layout-type": "layout.type()" } }, ngImport: i0, template: `
|
|
270
|
+
@if (isBorderRail()) {
|
|
271
|
+
<div aria-hidden="true" data-layout-rail class="pointer-events-none absolute inset-0 z-0">
|
|
272
|
+
<div [class]="railPaddingClasses()">
|
|
273
|
+
<div data-layout-rail-anchor [class]="railAnchorClasses()">
|
|
274
|
+
<div
|
|
275
|
+
data-layout-rail-top-left-horizontal
|
|
276
|
+
class="absolute top-0 right-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
277
|
+
<div
|
|
278
|
+
data-layout-rail-top-left-vertical
|
|
279
|
+
class="absolute bottom-full left-0 h-[calc((100dvh-100%)/2)] w-0.5 bg-border"></div>
|
|
280
|
+
<div
|
|
281
|
+
data-layout-rail-top-right-horizontal
|
|
282
|
+
class="absolute top-0 left-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
283
|
+
<div
|
|
284
|
+
data-layout-rail-top-right-vertical
|
|
285
|
+
class="absolute bottom-full right-0 h-[calc((100dvh-100%)/2)] w-0.5 bg-border"></div>
|
|
286
|
+
<div
|
|
287
|
+
data-layout-rail-bottom-left-horizontal
|
|
288
|
+
class="absolute bottom-0 right-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
289
|
+
<div
|
|
290
|
+
data-layout-rail-bottom-left-vertical
|
|
291
|
+
class="absolute top-full left-0 h-[calc((100dvh-100%)/2)] w-0.5 bg-border"></div>
|
|
292
|
+
<div
|
|
293
|
+
data-layout-rail-bottom-right-horizontal
|
|
294
|
+
class="absolute bottom-0 left-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
295
|
+
<div
|
|
296
|
+
data-layout-rail-bottom-right-vertical
|
|
297
|
+
class="absolute top-full right-0 h-[calc((100dvh-100%)/2)] w-0.5 bg-border"></div>
|
|
298
|
+
|
|
299
|
+
@if (showsHorizontalInsetRails()) {
|
|
300
|
+
<div data-layout-horizontal-top-rail class="absolute inset-x-0 top-12 h-0.5 bg-border"></div>
|
|
301
|
+
<div
|
|
302
|
+
data-layout-horizontal-top-left-extension
|
|
303
|
+
class="absolute top-12 right-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
304
|
+
<div
|
|
305
|
+
data-layout-horizontal-top-right-extension
|
|
306
|
+
class="absolute top-12 left-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
307
|
+
<div data-layout-horizontal-bottom-rail class="absolute inset-x-0 bottom-12 h-0.5 bg-border"></div>
|
|
308
|
+
<div
|
|
309
|
+
data-layout-horizontal-bottom-left-extension
|
|
310
|
+
class="absolute bottom-12 right-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
311
|
+
<div
|
|
312
|
+
data-layout-horizontal-bottom-right-extension
|
|
313
|
+
class="absolute bottom-12 left-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
314
|
+
}
|
|
315
|
+
</div>
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
<div [class]="frameClasses()">
|
|
321
|
+
<div [class]="contentShellClasses()">
|
|
322
|
+
<ng-content />
|
|
323
|
+
</div>
|
|
324
|
+
</div>
|
|
325
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
326
|
+
}
|
|
327
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiLayoutComponent, decorators: [{
|
|
328
|
+
type: Component,
|
|
329
|
+
args: [{
|
|
330
|
+
selector: 'ui-layout',
|
|
331
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
332
|
+
host: {
|
|
333
|
+
'[class]': 'hostClasses()',
|
|
334
|
+
'[attr.data-surface]': 'resolvedSurface()',
|
|
335
|
+
'[attr.data-layout-appearance]': 'resolvedAppearance()',
|
|
336
|
+
'[attr.data-layout-style]': 'resolvedStyle()',
|
|
337
|
+
'[attr.data-layout-width]': 'resolvedWidth()',
|
|
338
|
+
'[attr.data-layout-type]': 'layout.type()',
|
|
339
|
+
},
|
|
340
|
+
template: `
|
|
341
|
+
@if (isBorderRail()) {
|
|
342
|
+
<div aria-hidden="true" data-layout-rail class="pointer-events-none absolute inset-0 z-0">
|
|
343
|
+
<div [class]="railPaddingClasses()">
|
|
344
|
+
<div data-layout-rail-anchor [class]="railAnchorClasses()">
|
|
345
|
+
<div
|
|
346
|
+
data-layout-rail-top-left-horizontal
|
|
347
|
+
class="absolute top-0 right-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
348
|
+
<div
|
|
349
|
+
data-layout-rail-top-left-vertical
|
|
350
|
+
class="absolute bottom-full left-0 h-[calc((100dvh-100%)/2)] w-0.5 bg-border"></div>
|
|
351
|
+
<div
|
|
352
|
+
data-layout-rail-top-right-horizontal
|
|
353
|
+
class="absolute top-0 left-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
354
|
+
<div
|
|
355
|
+
data-layout-rail-top-right-vertical
|
|
356
|
+
class="absolute bottom-full right-0 h-[calc((100dvh-100%)/2)] w-0.5 bg-border"></div>
|
|
357
|
+
<div
|
|
358
|
+
data-layout-rail-bottom-left-horizontal
|
|
359
|
+
class="absolute bottom-0 right-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
360
|
+
<div
|
|
361
|
+
data-layout-rail-bottom-left-vertical
|
|
362
|
+
class="absolute top-full left-0 h-[calc((100dvh-100%)/2)] w-0.5 bg-border"></div>
|
|
363
|
+
<div
|
|
364
|
+
data-layout-rail-bottom-right-horizontal
|
|
365
|
+
class="absolute bottom-0 left-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
366
|
+
<div
|
|
367
|
+
data-layout-rail-bottom-right-vertical
|
|
368
|
+
class="absolute top-full right-0 h-[calc((100dvh-100%)/2)] w-0.5 bg-border"></div>
|
|
369
|
+
|
|
370
|
+
@if (showsHorizontalInsetRails()) {
|
|
371
|
+
<div data-layout-horizontal-top-rail class="absolute inset-x-0 top-12 h-0.5 bg-border"></div>
|
|
372
|
+
<div
|
|
373
|
+
data-layout-horizontal-top-left-extension
|
|
374
|
+
class="absolute top-12 right-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
375
|
+
<div
|
|
376
|
+
data-layout-horizontal-top-right-extension
|
|
377
|
+
class="absolute top-12 left-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
378
|
+
<div data-layout-horizontal-bottom-rail class="absolute inset-x-0 bottom-12 h-0.5 bg-border"></div>
|
|
379
|
+
<div
|
|
380
|
+
data-layout-horizontal-bottom-left-extension
|
|
381
|
+
class="absolute bottom-12 right-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
382
|
+
<div
|
|
383
|
+
data-layout-horizontal-bottom-right-extension
|
|
384
|
+
class="absolute bottom-12 left-full h-0.5 w-[calc((100vw-100%)/2)] bg-border"></div>
|
|
385
|
+
}
|
|
386
|
+
</div>
|
|
387
|
+
</div>
|
|
388
|
+
</div>
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
<div [class]="frameClasses()">
|
|
392
|
+
<div [class]="contentShellClasses()">
|
|
393
|
+
<ng-content />
|
|
394
|
+
</div>
|
|
395
|
+
</div>
|
|
396
|
+
`,
|
|
397
|
+
}]
|
|
398
|
+
}], ctorParameters: () => [], propDecorators: { surface: [{ type: i0.Input, args: [{ isSignal: true, alias: "surface", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], layoutStyleAttribute: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout-style", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
399
|
+
|
|
400
|
+
class UiLayoutVerticalComponent {
|
|
401
|
+
layout = inject(LayoutService);
|
|
402
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
403
|
+
classes = computed(() => cn('grid h-full min-h-0 w-full min-w-0 grid-cols-[auto_minmax(0,1fr)]', this.layout.style() === 'border-rail' ? 'overflow-visible' : 'overflow-hidden', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
404
|
+
constructor() {
|
|
405
|
+
this.layout.setType('vertical');
|
|
406
|
+
}
|
|
407
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiLayoutVerticalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
408
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: UiLayoutVerticalComponent, isStandalone: true, selector: "ui-layout-vertical", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-layout-type": "vertical" }, properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
409
|
+
}
|
|
410
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiLayoutVerticalComponent, decorators: [{
|
|
411
|
+
type: Component,
|
|
412
|
+
args: [{
|
|
413
|
+
selector: 'ui-layout-vertical',
|
|
414
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
415
|
+
host: {
|
|
416
|
+
'[class]': 'classes()',
|
|
417
|
+
'data-layout-type': 'vertical',
|
|
418
|
+
},
|
|
419
|
+
template: `<ng-content />`,
|
|
420
|
+
}]
|
|
421
|
+
}], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
422
|
+
|
|
423
|
+
class UiLayoutHorizontalComponent {
|
|
424
|
+
layout = inject(LayoutService);
|
|
425
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
426
|
+
classes = computed(() => cn('flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
427
|
+
constructor() {
|
|
428
|
+
this.layout.setType('horizontal');
|
|
429
|
+
}
|
|
430
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiLayoutHorizontalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
431
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: UiLayoutHorizontalComponent, isStandalone: true, selector: "ui-layout-horizontal", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-layout-type": "horizontal" }, properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
432
|
+
}
|
|
433
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiLayoutHorizontalComponent, decorators: [{
|
|
434
|
+
type: Component,
|
|
435
|
+
args: [{
|
|
436
|
+
selector: 'ui-layout-horizontal',
|
|
437
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
438
|
+
host: {
|
|
439
|
+
'[class]': 'classes()',
|
|
440
|
+
'data-layout-type': 'horizontal',
|
|
441
|
+
},
|
|
442
|
+
template: `<ng-content />`,
|
|
443
|
+
}]
|
|
444
|
+
}], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
445
|
+
|
|
446
|
+
class UiLayoutEmptyComponent {
|
|
447
|
+
layout = inject(LayoutService);
|
|
448
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
449
|
+
classes = computed(() => cn('h-full min-h-0 w-full min-w-0 overflow-hidden', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
450
|
+
constructor() {
|
|
451
|
+
this.layout.setType('empty');
|
|
452
|
+
}
|
|
453
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiLayoutEmptyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
454
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: UiLayoutEmptyComponent, isStandalone: true, selector: "ui-layout-empty", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-layout-type": "empty" }, properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
455
|
+
}
|
|
456
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiLayoutEmptyComponent, decorators: [{
|
|
457
|
+
type: Component,
|
|
458
|
+
args: [{
|
|
459
|
+
selector: 'ui-layout-empty',
|
|
460
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
461
|
+
host: {
|
|
462
|
+
'[class]': 'classes()',
|
|
463
|
+
'data-layout-type': 'empty',
|
|
464
|
+
},
|
|
465
|
+
template: `<ng-content />`,
|
|
466
|
+
}]
|
|
467
|
+
}], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
468
|
+
|
|
469
|
+
class UiLayoutNavComponent {
|
|
470
|
+
layout = inject(LayoutService);
|
|
471
|
+
projectedNav = contentChild(UiNavComponent, ...(ngDevMode ? [{ debugName: "projectedNav" }] : /* istanbul ignore next */ []));
|
|
472
|
+
ariaLabel = input('Layout navigation', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
473
|
+
railOffset = input(null, ...(ngDevMode ? [{ debugName: "railOffset" }] : /* istanbul ignore next */ []));
|
|
474
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
475
|
+
showsVerticalRail = computed(() => this.layout.type() === 'vertical' && this.layout.appearance() === 'border-rail', ...(ngDevMode ? [{ debugName: "showsVerticalRail" }] : /* istanbul ignore next */ []));
|
|
476
|
+
resolvedRailOffset = computed(() => this.railOffset() ?? this.projectedNav()?.previewRailOffset() ?? '0px', ...(ngDevMode ? [{ debugName: "resolvedRailOffset" }] : /* istanbul ignore next */ []));
|
|
477
|
+
railTransform = computed(() => `translateX(${this.resolvedRailOffset()})`, ...(ngDevMode ? [{ debugName: "railTransform" }] : /* istanbul ignore next */ []));
|
|
478
|
+
classes = computed(() => {
|
|
479
|
+
const layoutType = this.layout.type();
|
|
480
|
+
const showsVerticalRail = this.showsVerticalRail();
|
|
481
|
+
return cn('relative block min-h-0 min-w-0', layoutType === 'horizontal' && 'h-12 min-h-12 w-full shrink-0 overflow-visible', layoutType === 'vertical' &&
|
|
482
|
+
(showsVerticalRail
|
|
483
|
+
? 'h-full w-max max-w-full shrink-0 overflow-visible'
|
|
484
|
+
: 'h-full w-max max-w-full shrink-0 overflow-hidden'), layoutType === 'empty' && 'hidden', this.class());
|
|
485
|
+
}, ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
486
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiLayoutNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
487
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: UiLayoutNavComponent, isStandalone: true, selector: "ui-layout-nav", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, railOffset: { classPropertyName: "railOffset", publicName: "railOffset", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "navigation" }, properties: { "class": "classes()", "attr.aria-label": "ariaLabel() || null", "attr.data-layout-type": "layout.type()", "attr.data-layout-appearance": "layout.appearance()", "attr.data-layout-style": "layout.style()", "attr.data-layout-nav-rail-offset": "resolvedRailOffset()" } }, queries: [{ propertyName: "projectedNav", first: true, predicate: UiNavComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
488
|
+
@if (showsVerticalRail()) {
|
|
489
|
+
<div
|
|
490
|
+
aria-hidden="true"
|
|
491
|
+
data-layout-nav-rail
|
|
492
|
+
class="pointer-events-none absolute inset-y-0 right-0 z-20 w-0.5 transition-transform duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none"
|
|
493
|
+
[style.transform]="railTransform()">
|
|
494
|
+
<div data-layout-nav-rail-line class="absolute inset-y-0 right-0 w-0.5 bg-border"></div>
|
|
495
|
+
<div
|
|
496
|
+
data-layout-nav-rail-top
|
|
497
|
+
class="absolute bottom-full right-0 h-[calc((100dvh-100%)/2)] w-0.5 bg-border"></div>
|
|
498
|
+
<div
|
|
499
|
+
data-layout-nav-rail-bottom
|
|
500
|
+
class="absolute top-full right-0 h-[calc((100dvh-100%)/2)] w-0.5 bg-border"></div>
|
|
501
|
+
</div>
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
<ng-content />
|
|
505
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
506
|
+
}
|
|
507
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiLayoutNavComponent, decorators: [{
|
|
508
|
+
type: Component,
|
|
509
|
+
args: [{
|
|
510
|
+
selector: 'ui-layout-nav',
|
|
511
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
512
|
+
host: {
|
|
513
|
+
'[class]': 'classes()',
|
|
514
|
+
role: 'navigation',
|
|
515
|
+
'[attr.aria-label]': 'ariaLabel() || null',
|
|
516
|
+
'[attr.data-layout-type]': 'layout.type()',
|
|
517
|
+
'[attr.data-layout-appearance]': 'layout.appearance()',
|
|
518
|
+
'[attr.data-layout-style]': 'layout.style()',
|
|
519
|
+
'[attr.data-layout-nav-rail-offset]': 'resolvedRailOffset()',
|
|
520
|
+
},
|
|
521
|
+
template: `
|
|
522
|
+
@if (showsVerticalRail()) {
|
|
523
|
+
<div
|
|
524
|
+
aria-hidden="true"
|
|
525
|
+
data-layout-nav-rail
|
|
526
|
+
class="pointer-events-none absolute inset-y-0 right-0 z-20 w-0.5 transition-transform duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none"
|
|
527
|
+
[style.transform]="railTransform()">
|
|
528
|
+
<div data-layout-nav-rail-line class="absolute inset-y-0 right-0 w-0.5 bg-border"></div>
|
|
529
|
+
<div
|
|
530
|
+
data-layout-nav-rail-top
|
|
531
|
+
class="absolute bottom-full right-0 h-[calc((100dvh-100%)/2)] w-0.5 bg-border"></div>
|
|
532
|
+
<div
|
|
533
|
+
data-layout-nav-rail-bottom
|
|
534
|
+
class="absolute top-full right-0 h-[calc((100dvh-100%)/2)] w-0.5 bg-border"></div>
|
|
535
|
+
</div>
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
<ng-content />
|
|
539
|
+
`,
|
|
540
|
+
}]
|
|
541
|
+
}], propDecorators: { projectedNav: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UiNavComponent), { isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], railOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "railOffset", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
542
|
+
|
|
543
|
+
class UiLayoutContentComponent {
|
|
544
|
+
layout = inject(LayoutService);
|
|
545
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
546
|
+
classes = computed(() => {
|
|
547
|
+
const layoutType = this.layout.type();
|
|
548
|
+
return cn('block min-h-0 min-w-0 overflow-auto', layoutType === 'horizontal' && 'flex-1', layoutType === 'vertical' && 'h-full', layoutType === 'empty' && 'h-full w-full', this.layout.width() === 'container' && 'w-full lg:container lg:mx-auto', this.class());
|
|
549
|
+
}, ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
550
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiLayoutContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
551
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: UiLayoutContentComponent, isStandalone: true, selector: "ui-layout-content", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-layout-type": "layout.type()", "attr.data-layout-width": "layout.width()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
552
|
+
}
|
|
553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiLayoutContentComponent, decorators: [{
|
|
554
|
+
type: Component,
|
|
555
|
+
args: [{
|
|
556
|
+
selector: 'ui-layout-content',
|
|
557
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
558
|
+
host: {
|
|
559
|
+
'[class]': 'classes()',
|
|
560
|
+
'[attr.data-layout-type]': 'layout.type()',
|
|
561
|
+
'[attr.data-layout-width]': 'layout.width()',
|
|
562
|
+
},
|
|
563
|
+
template: `<ng-content />`,
|
|
564
|
+
}]
|
|
565
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Generated bundle index. Do not edit.
|
|
569
|
+
*/
|
|
570
|
+
|
|
571
|
+
export { LayoutService, UI_LAYOUT_APPEARANCE_STORAGE_KEY, UI_LAYOUT_DEFAULT_STYLE, UI_LAYOUT_DEFAULT_SURFACE, UI_LAYOUT_DEFAULT_TYPE, UI_LAYOUT_DEFAULT_WIDTH, UI_LAYOUT_STYLES, UI_LAYOUT_STYLE_STORAGE_KEY, UI_LAYOUT_SURFACES, UI_LAYOUT_SURFACE_STORAGE_KEY, UI_LAYOUT_TYPES, UI_LAYOUT_TYPE_STORAGE_KEY, UI_LAYOUT_WIDTHS, UI_LAYOUT_WIDTH_STORAGE_KEY, UiLayoutComponent, UiLayoutContentComponent, UiLayoutEmptyComponent, UiLayoutHorizontalComponent, UiLayoutNavComponent, UiLayoutVerticalComponent, isUiLayoutStyle, isUiLayoutSurface, isUiLayoutType, isUiLayoutWidth };
|
|
572
|
+
//# sourceMappingURL=edsis-ui-layout.mjs.map
|