@ojiepermana/angular-theme 22.0.32 → 22.0.34
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-theme-layout-services.mjs +7 -27
- package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +5 -6
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +577 -0
- package/fesm2022/ojiepermana-angular-theme-layout.mjs +147 -66
- package/layout/README.md +59 -57
- package/package.json +7 -3
- package/types/ojiepermana-angular-theme-layout-services.d.ts +6 -8
- package/types/ojiepermana-angular-theme-layout-types.d.ts +7 -9
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +175 -0
- package/types/ojiepermana-angular-theme-layout.d.ts +9 -4
|
@@ -3,8 +3,8 @@ import { inject, input, computed, DestroyRef, Component, effect, ChangeDetection
|
|
|
3
3
|
import { cn } from '@ojiepermana/angular-component/utils';
|
|
4
4
|
import { LayoutLoadingService, LayoutService } from '@ojiepermana/angular-theme/layout/services';
|
|
5
5
|
export { LAYOUT_LOADING_HIDE_DELAY_MS, LAYOUT_LOADING_INITIAL_PROGRESS, LAYOUT_LOADING_SKIP, LAYOUT_LOADING_TRICKLE_CEILING, LAYOUT_LOADING_TRICKLE_INTERVAL_MS, LayoutLoadingService, LayoutService, layoutLoadingInterceptor } from '@ojiepermana/angular-theme/layout/services';
|
|
6
|
-
import { LAYOUT_DEFAULT_SURFACE,
|
|
7
|
-
export { LAYOUT_APPEARANCE_STORAGE_KEY,
|
|
6
|
+
import { LAYOUT_DEFAULT_SURFACE, LAYOUT_DEFAULT_APPEARANCE, LAYOUT_DEFAULT_WIDTH } from '@ojiepermana/angular-theme/layout/types';
|
|
7
|
+
export { LAYOUT_APPEARANCES, LAYOUT_APPEARANCE_STORAGE_KEY, LAYOUT_DEFAULT_APPEARANCE, LAYOUT_DEFAULT_SURFACE, LAYOUT_DEFAULT_TYPE, LAYOUT_DEFAULT_WIDTH, LAYOUT_SURFACES, LAYOUT_SURFACE_STORAGE_KEY, LAYOUT_TYPES, LAYOUT_TYPE_STORAGE_KEY, LAYOUT_WIDTHS, LAYOUT_WIDTH_STORAGE_KEY, isUiLayoutAppearance, isUiLayoutSurface, isUiLayoutType, isUiLayoutWidth } from '@ojiepermana/angular-theme/layout/types';
|
|
8
8
|
import { NavigationContainerComponent } from '@ojiepermana/angular-navigation';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -92,27 +92,32 @@ class LayoutComponent {
|
|
|
92
92
|
...(ngDevMode ? [{ debugName: "surface" }] : /* istanbul ignore next */ []));
|
|
93
93
|
appearance = input(null, /* @ts-ignore */
|
|
94
94
|
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
95
|
-
|
|
95
|
+
layoutAppearanceAttribute = input(null, { ...(ngDevMode ? { debugName: "layoutAppearanceAttribute" } : /* istanbul ignore next */ {}), alias: 'layout-appearance' });
|
|
96
96
|
width = input(null, /* @ts-ignore */
|
|
97
97
|
...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
98
|
+
/**
|
|
99
|
+
* Tipe layout (`vertical` | `horizontal` | `empty` | `fluid`). Bila di-set, menjadi sumber
|
|
100
|
+
* kebenaran tipe (override variant `Layout*`); bila `null`, variant yang menetapkan.
|
|
101
|
+
*/
|
|
102
|
+
type = input(null, { ...(ngDevMode ? { debugName: "type" } : /* istanbul ignore next */ {}), alias: 'layout-type' });
|
|
98
103
|
class = input('', /* @ts-ignore */
|
|
99
104
|
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
100
|
-
appearanceInput = computed(() => this.appearance() ?? this.
|
|
105
|
+
appearanceInput = computed(() => this.appearance() ?? this.layoutAppearanceAttribute(), /* @ts-ignore */
|
|
101
106
|
...(ngDevMode ? [{ debugName: "appearanceInput" }] : /* istanbul ignore next */ []));
|
|
102
107
|
resolvedSurface = computed(() => this.surface() ?? this.layout.surface(), /* @ts-ignore */
|
|
103
108
|
...(ngDevMode ? [{ debugName: "resolvedSurface" }] : /* istanbul ignore next */ []));
|
|
104
109
|
resolvedAppearance = computed(() => this.appearanceInput() ?? this.layout.appearance(), /* @ts-ignore */
|
|
105
110
|
...(ngDevMode ? [{ debugName: "resolvedAppearance" }] : /* istanbul ignore next */ []));
|
|
106
|
-
resolvedStyle = computed(() => this.layout.appearance(), /* @ts-ignore */
|
|
107
|
-
...(ngDevMode ? [{ debugName: "resolvedStyle" }] : /* istanbul ignore next */ []));
|
|
108
111
|
resolvedWidth = computed(() => this.width() ?? this.layout.width(), /* @ts-ignore */
|
|
109
112
|
...(ngDevMode ? [{ debugName: "resolvedWidth" }] : /* istanbul ignore next */ []));
|
|
113
|
+
resolvedType = computed(() => this.type() ?? this.layout.type(), /* @ts-ignore */
|
|
114
|
+
...(ngDevMode ? [{ debugName: "resolvedType" }] : /* istanbul ignore next */ []));
|
|
110
115
|
isBorderRail = computed(() => this.resolvedAppearance() === 'border-rail', /* @ts-ignore */
|
|
111
116
|
...(ngDevMode ? [{ debugName: "isBorderRail" }] : /* istanbul ignore next */ []));
|
|
112
|
-
isFluidFrame = computed(() => this.resolvedWidth() === 'fluid' && this.
|
|
117
|
+
isFluidFrame = computed(() => this.resolvedWidth() === 'fluid' && this.resolvedType() === 'fluid', /* @ts-ignore */
|
|
113
118
|
...(ngDevMode ? [{ debugName: "isFluidFrame" }] : /* istanbul ignore next */ []));
|
|
114
119
|
showsInsetRails = computed(() => {
|
|
115
|
-
const layoutType = this.
|
|
120
|
+
const layoutType = this.resolvedType();
|
|
116
121
|
return this.isBorderRail() && (layoutType === 'horizontal' || layoutType === 'vertical');
|
|
117
122
|
}, /* @ts-ignore */
|
|
118
123
|
...(ngDevMode ? [{ debugName: "showsInsetRails" }] : /* istanbul ignore next */ []));
|
|
@@ -142,7 +147,7 @@ class LayoutComponent {
|
|
|
142
147
|
this.layout.setAppearance(appearance, { persist: false });
|
|
143
148
|
}
|
|
144
149
|
else {
|
|
145
|
-
this.layout.registerAppearance(
|
|
150
|
+
this.layout.registerAppearance(LAYOUT_DEFAULT_APPEARANCE);
|
|
146
151
|
}
|
|
147
152
|
const width = this.width();
|
|
148
153
|
if (width !== null) {
|
|
@@ -151,6 +156,13 @@ class LayoutComponent {
|
|
|
151
156
|
else {
|
|
152
157
|
this.layout.registerWidth(LAYOUT_DEFAULT_WIDTH);
|
|
153
158
|
}
|
|
159
|
+
// Type: bila consumer mendaftarkan `layout-type`, itu jadi sumber kebenaran (override
|
|
160
|
+
// variant). Bila null, dibiarkan — variant `Layout*` yang menetapkan (registerType default
|
|
161
|
+
// sengaja TIDAK dipanggil agar tidak menimpa type yang sudah di-set variant).
|
|
162
|
+
const type = this.type();
|
|
163
|
+
if (type !== null) {
|
|
164
|
+
this.layout.setType(type, { persist: false });
|
|
165
|
+
}
|
|
154
166
|
});
|
|
155
167
|
}
|
|
156
168
|
surfaceClasses() {
|
|
@@ -183,10 +195,12 @@ class LayoutComponent {
|
|
|
183
195
|
if (this.isFluidFrame()) {
|
|
184
196
|
return 'h-auto w-auto max-h-full max-w-full';
|
|
185
197
|
}
|
|
186
|
-
return this.resolvedWidth() === 'container'
|
|
198
|
+
return this.resolvedWidth() === 'container'
|
|
199
|
+
? 'h-full w-full lg:container lg:mx-auto'
|
|
200
|
+
: 'h-full w-full';
|
|
187
201
|
}
|
|
188
202
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: LayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
189
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: LayoutComponent, isStandalone: true, selector: "Layout", inputs: { surface: { classPropertyName: "surface", publicName: "surface", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null },
|
|
203
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: LayoutComponent, isStandalone: true, selector: "Layout", inputs: { surface: { classPropertyName: "surface", publicName: "surface", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, layoutAppearanceAttribute: { classPropertyName: "layoutAppearanceAttribute", publicName: "layout-appearance", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "layout-type", 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-width": "resolvedWidth()", "attr.data-layout-type": "resolvedType()" } }, ngImport: i0, template: `
|
|
190
204
|
<LayoutLoading />
|
|
191
205
|
|
|
192
206
|
<div data-layout-stage [class]="frameStageClasses()">
|
|
@@ -194,63 +208,92 @@ class LayoutComponent {
|
|
|
194
208
|
<div
|
|
195
209
|
aria-hidden="true"
|
|
196
210
|
data-layout-rail
|
|
197
|
-
class="pointer-events-none col-start-1 row-start-1 z-0 overflow-visible"
|
|
211
|
+
class="pointer-events-none col-start-1 row-start-1 z-0 overflow-visible"
|
|
212
|
+
>
|
|
198
213
|
<div data-layout-rail-anchor [class]="railAnchorClasses()">
|
|
199
214
|
<div
|
|
200
215
|
data-layout-rail-top-left-horizontal
|
|
201
|
-
class="absolute top-0 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
216
|
+
class="absolute top-0 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
217
|
+
></div>
|
|
202
218
|
<div
|
|
203
219
|
data-layout-rail-top-left-vertical
|
|
204
|
-
class="absolute bottom-full left-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
220
|
+
class="absolute bottom-full left-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
221
|
+
></div>
|
|
205
222
|
<div
|
|
206
223
|
data-layout-rail-top-right-horizontal
|
|
207
|
-
class="absolute top-0 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
224
|
+
class="absolute top-0 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
225
|
+
></div>
|
|
208
226
|
<div
|
|
209
227
|
data-layout-rail-top-right-vertical
|
|
210
|
-
class="absolute bottom-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
228
|
+
class="absolute bottom-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
229
|
+
></div>
|
|
211
230
|
<div
|
|
212
231
|
data-layout-rail-bottom-left-horizontal
|
|
213
|
-
class="absolute bottom-0 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
232
|
+
class="absolute bottom-0 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
233
|
+
></div>
|
|
214
234
|
<div
|
|
215
235
|
data-layout-rail-bottom-left-vertical
|
|
216
|
-
class="absolute top-full left-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
236
|
+
class="absolute top-full left-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
237
|
+
></div>
|
|
217
238
|
<div
|
|
218
239
|
data-layout-rail-bottom-right-horizontal
|
|
219
|
-
class="absolute bottom-0 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
240
|
+
class="absolute bottom-0 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
241
|
+
></div>
|
|
220
242
|
<div
|
|
221
243
|
data-layout-rail-bottom-right-vertical
|
|
222
|
-
class="absolute top-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
244
|
+
class="absolute top-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
245
|
+
></div>
|
|
223
246
|
|
|
224
247
|
@if (showsInsetRails()) {
|
|
225
|
-
<div
|
|
248
|
+
<div
|
|
249
|
+
data-layout-horizontal-top-rail
|
|
250
|
+
class="absolute inset-x-0 top-12 h-[1.5px] bg-border"
|
|
251
|
+
></div>
|
|
226
252
|
<div
|
|
227
253
|
data-layout-horizontal-top-left-extension
|
|
228
|
-
class="absolute top-12 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
254
|
+
class="absolute top-12 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
255
|
+
></div>
|
|
229
256
|
<div
|
|
230
257
|
data-layout-horizontal-top-right-extension
|
|
231
|
-
class="absolute top-12 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
232
|
-
|
|
258
|
+
class="absolute top-12 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
259
|
+
></div>
|
|
260
|
+
<div
|
|
261
|
+
data-layout-horizontal-bottom-rail
|
|
262
|
+
class="absolute inset-x-0 bottom-12 h-[1.5px] bg-border"
|
|
263
|
+
></div>
|
|
233
264
|
<div
|
|
234
265
|
data-layout-horizontal-bottom-left-extension
|
|
235
|
-
class="absolute bottom-12 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
266
|
+
class="absolute bottom-12 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
267
|
+
></div>
|
|
236
268
|
<div
|
|
237
269
|
data-layout-horizontal-bottom-right-extension
|
|
238
|
-
class="absolute bottom-12 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
270
|
+
class="absolute bottom-12 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
271
|
+
></div>
|
|
239
272
|
|
|
240
|
-
<div
|
|
273
|
+
<div
|
|
274
|
+
data-layout-vertical-left-rail
|
|
275
|
+
class="absolute inset-y-0 -left-4 w-[1.5px] bg-border"
|
|
276
|
+
></div>
|
|
241
277
|
<div
|
|
242
278
|
data-layout-vertical-left-top-extension
|
|
243
|
-
class="absolute bottom-full -left-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
279
|
+
class="absolute bottom-full -left-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
280
|
+
></div>
|
|
244
281
|
<div
|
|
245
282
|
data-layout-vertical-left-bottom-extension
|
|
246
|
-
class="absolute top-full -left-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
247
|
-
|
|
283
|
+
class="absolute top-full -left-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
284
|
+
></div>
|
|
285
|
+
<div
|
|
286
|
+
data-layout-vertical-right-rail
|
|
287
|
+
class="absolute inset-y-0 -right-4 w-[1.5px] bg-border"
|
|
288
|
+
></div>
|
|
248
289
|
<div
|
|
249
290
|
data-layout-vertical-right-top-extension
|
|
250
|
-
class="absolute bottom-full -right-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
291
|
+
class="absolute bottom-full -right-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
292
|
+
></div>
|
|
251
293
|
<div
|
|
252
294
|
data-layout-vertical-right-bottom-extension
|
|
253
|
-
class="absolute top-full -right-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
295
|
+
class="absolute top-full -right-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
296
|
+
></div>
|
|
254
297
|
}
|
|
255
298
|
</div>
|
|
256
299
|
</div>
|
|
@@ -274,9 +317,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
274
317
|
'[class]': 'hostClasses()',
|
|
275
318
|
'[attr.data-surface]': 'resolvedSurface()',
|
|
276
319
|
'[attr.data-layout-appearance]': 'resolvedAppearance()',
|
|
277
|
-
'[attr.data-layout-style]': 'resolvedStyle()',
|
|
278
320
|
'[attr.data-layout-width]': 'resolvedWidth()',
|
|
279
|
-
'[attr.data-layout-type]': '
|
|
321
|
+
'[attr.data-layout-type]': 'resolvedType()',
|
|
280
322
|
},
|
|
281
323
|
template: `
|
|
282
324
|
<LayoutLoading />
|
|
@@ -286,63 +328,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
286
328
|
<div
|
|
287
329
|
aria-hidden="true"
|
|
288
330
|
data-layout-rail
|
|
289
|
-
class="pointer-events-none col-start-1 row-start-1 z-0 overflow-visible"
|
|
331
|
+
class="pointer-events-none col-start-1 row-start-1 z-0 overflow-visible"
|
|
332
|
+
>
|
|
290
333
|
<div data-layout-rail-anchor [class]="railAnchorClasses()">
|
|
291
334
|
<div
|
|
292
335
|
data-layout-rail-top-left-horizontal
|
|
293
|
-
class="absolute top-0 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
336
|
+
class="absolute top-0 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
337
|
+
></div>
|
|
294
338
|
<div
|
|
295
339
|
data-layout-rail-top-left-vertical
|
|
296
|
-
class="absolute bottom-full left-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
340
|
+
class="absolute bottom-full left-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
341
|
+
></div>
|
|
297
342
|
<div
|
|
298
343
|
data-layout-rail-top-right-horizontal
|
|
299
|
-
class="absolute top-0 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
344
|
+
class="absolute top-0 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
345
|
+
></div>
|
|
300
346
|
<div
|
|
301
347
|
data-layout-rail-top-right-vertical
|
|
302
|
-
class="absolute bottom-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
348
|
+
class="absolute bottom-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
349
|
+
></div>
|
|
303
350
|
<div
|
|
304
351
|
data-layout-rail-bottom-left-horizontal
|
|
305
|
-
class="absolute bottom-0 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
352
|
+
class="absolute bottom-0 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
353
|
+
></div>
|
|
306
354
|
<div
|
|
307
355
|
data-layout-rail-bottom-left-vertical
|
|
308
|
-
class="absolute top-full left-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
356
|
+
class="absolute top-full left-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
357
|
+
></div>
|
|
309
358
|
<div
|
|
310
359
|
data-layout-rail-bottom-right-horizontal
|
|
311
|
-
class="absolute bottom-0 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
360
|
+
class="absolute bottom-0 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
361
|
+
></div>
|
|
312
362
|
<div
|
|
313
363
|
data-layout-rail-bottom-right-vertical
|
|
314
|
-
class="absolute top-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
364
|
+
class="absolute top-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
365
|
+
></div>
|
|
315
366
|
|
|
316
367
|
@if (showsInsetRails()) {
|
|
317
|
-
<div
|
|
368
|
+
<div
|
|
369
|
+
data-layout-horizontal-top-rail
|
|
370
|
+
class="absolute inset-x-0 top-12 h-[1.5px] bg-border"
|
|
371
|
+
></div>
|
|
318
372
|
<div
|
|
319
373
|
data-layout-horizontal-top-left-extension
|
|
320
|
-
class="absolute top-12 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
374
|
+
class="absolute top-12 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
375
|
+
></div>
|
|
321
376
|
<div
|
|
322
377
|
data-layout-horizontal-top-right-extension
|
|
323
|
-
class="absolute top-12 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
324
|
-
|
|
378
|
+
class="absolute top-12 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
379
|
+
></div>
|
|
380
|
+
<div
|
|
381
|
+
data-layout-horizontal-bottom-rail
|
|
382
|
+
class="absolute inset-x-0 bottom-12 h-[1.5px] bg-border"
|
|
383
|
+
></div>
|
|
325
384
|
<div
|
|
326
385
|
data-layout-horizontal-bottom-left-extension
|
|
327
|
-
class="absolute bottom-12 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
386
|
+
class="absolute bottom-12 right-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
387
|
+
></div>
|
|
328
388
|
<div
|
|
329
389
|
data-layout-horizontal-bottom-right-extension
|
|
330
|
-
class="absolute bottom-12 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
390
|
+
class="absolute bottom-12 left-full h-[1.5px] w-[calc((100vw-100%)/2)] bg-border"
|
|
391
|
+
></div>
|
|
331
392
|
|
|
332
|
-
<div
|
|
393
|
+
<div
|
|
394
|
+
data-layout-vertical-left-rail
|
|
395
|
+
class="absolute inset-y-0 -left-4 w-[1.5px] bg-border"
|
|
396
|
+
></div>
|
|
333
397
|
<div
|
|
334
398
|
data-layout-vertical-left-top-extension
|
|
335
|
-
class="absolute bottom-full -left-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
399
|
+
class="absolute bottom-full -left-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
400
|
+
></div>
|
|
336
401
|
<div
|
|
337
402
|
data-layout-vertical-left-bottom-extension
|
|
338
|
-
class="absolute top-full -left-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
339
|
-
|
|
403
|
+
class="absolute top-full -left-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
404
|
+
></div>
|
|
405
|
+
<div
|
|
406
|
+
data-layout-vertical-right-rail
|
|
407
|
+
class="absolute inset-y-0 -right-4 w-[1.5px] bg-border"
|
|
408
|
+
></div>
|
|
340
409
|
<div
|
|
341
410
|
data-layout-vertical-right-top-extension
|
|
342
|
-
class="absolute bottom-full -right-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
411
|
+
class="absolute bottom-full -right-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
412
|
+
></div>
|
|
343
413
|
<div
|
|
344
414
|
data-layout-vertical-right-bottom-extension
|
|
345
|
-
class="absolute top-full -right-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
415
|
+
class="absolute top-full -right-4 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
416
|
+
></div>
|
|
346
417
|
}
|
|
347
418
|
</div>
|
|
348
419
|
</div>
|
|
@@ -356,7 +427,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
356
427
|
</div>
|
|
357
428
|
`,
|
|
358
429
|
}]
|
|
359
|
-
}], ctorParameters: () => [], propDecorators: { surface: [{ type: i0.Input, args: [{ isSignal: true, alias: "surface", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }],
|
|
430
|
+
}], ctorParameters: () => [], propDecorators: { surface: [{ type: i0.Input, args: [{ isSignal: true, alias: "surface", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], layoutAppearanceAttribute: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout-appearance", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout-type", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
360
431
|
|
|
361
432
|
class LayoutVerticalComponent {
|
|
362
433
|
layout = inject(LayoutService);
|
|
@@ -480,24 +551,30 @@ class LayoutNavigationComponent {
|
|
|
480
551
|
// overflow-visible: clipping diatur host <Navigation>; overlay nav (aside
|
|
481
552
|
// drawer dockbar, preview rail) keluar dari kolom w-16 dan overflow-hidden
|
|
482
553
|
// di sini ikut ter-scroll oleh focus scroll-into-view sehingga rail hilang.
|
|
483
|
-
layoutType === 'vertical' && 'h-full w-max max-w-full shrink-0 overflow-visible',
|
|
554
|
+
layoutType === 'vertical' && 'h-full w-max max-w-full shrink-0 overflow-visible',
|
|
555
|
+
// empty & fluid = layout fokus-konten: slot nav boleh tetap diproyeksikan agar struktur
|
|
556
|
+
// konsumen seragam (`LayoutNavigation` + `LayoutContent`), tapi nav-nya disembunyikan.
|
|
557
|
+
(layoutType === 'empty' || layoutType === 'fluid') && 'hidden', this.class());
|
|
484
558
|
}, /* @ts-ignore */
|
|
485
559
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
486
560
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: LayoutNavigationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
487
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: LayoutNavigationComponent, isStandalone: true, selector: "LayoutNavigation", 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-
|
|
561
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: LayoutNavigationComponent, isStandalone: true, selector: "LayoutNavigation", 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-nav-rail-offset": "resolvedRailOffset()" } }, queries: [{ propertyName: "projectedNav", first: true, predicate: NavigationContainerComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
488
562
|
@if (showsVerticalRail()) {
|
|
489
563
|
<div
|
|
490
564
|
aria-hidden="true"
|
|
491
565
|
data-layout-nav-rail
|
|
492
566
|
class="pointer-events-none absolute inset-y-0 right-0 z-20 w-[1.5px] transition-transform duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none"
|
|
493
|
-
[style.transform]="railTransform()"
|
|
567
|
+
[style.transform]="railTransform()"
|
|
568
|
+
>
|
|
494
569
|
<div data-layout-nav-rail-line class="absolute inset-y-0 right-0 w-[1.5px] bg-border"></div>
|
|
495
570
|
<div
|
|
496
571
|
data-layout-nav-rail-top
|
|
497
|
-
class="absolute bottom-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
572
|
+
class="absolute bottom-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
573
|
+
></div>
|
|
498
574
|
<div
|
|
499
575
|
data-layout-nav-rail-bottom
|
|
500
|
-
class="absolute top-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
576
|
+
class="absolute top-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
577
|
+
></div>
|
|
501
578
|
</div>
|
|
502
579
|
}
|
|
503
580
|
|
|
@@ -515,7 +592,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
515
592
|
'[attr.aria-label]': 'ariaLabel() || null',
|
|
516
593
|
'[attr.data-layout-type]': 'layout.type()',
|
|
517
594
|
'[attr.data-layout-appearance]': 'layout.appearance()',
|
|
518
|
-
'[attr.data-layout-style]': 'layout.appearance()',
|
|
519
595
|
'[attr.data-layout-nav-rail-offset]': 'resolvedRailOffset()',
|
|
520
596
|
},
|
|
521
597
|
template: `
|
|
@@ -524,14 +600,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
524
600
|
aria-hidden="true"
|
|
525
601
|
data-layout-nav-rail
|
|
526
602
|
class="pointer-events-none absolute inset-y-0 right-0 z-20 w-[1.5px] transition-transform duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none"
|
|
527
|
-
[style.transform]="railTransform()"
|
|
603
|
+
[style.transform]="railTransform()"
|
|
604
|
+
>
|
|
528
605
|
<div data-layout-nav-rail-line class="absolute inset-y-0 right-0 w-[1.5px] bg-border"></div>
|
|
529
606
|
<div
|
|
530
607
|
data-layout-nav-rail-top
|
|
531
|
-
class="absolute bottom-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
608
|
+
class="absolute bottom-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
609
|
+
></div>
|
|
532
610
|
<div
|
|
533
611
|
data-layout-nav-rail-bottom
|
|
534
|
-
class="absolute top-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
612
|
+
class="absolute top-full right-0 h-[calc((100dvh-100%)/2)] w-[1.5px] bg-border"
|
|
613
|
+
></div>
|
|
535
614
|
</div>
|
|
536
615
|
}
|
|
537
616
|
|
|
@@ -546,7 +625,9 @@ class LayoutContentComponent {
|
|
|
546
625
|
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
547
626
|
classes = computed(() => {
|
|
548
627
|
const layoutType = this.layout.type();
|
|
549
|
-
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',
|
|
628
|
+
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',
|
|
629
|
+
// fluid: konten dipusatkan oleh LayoutFluid; batasi ke ukuran frame agar tetap scrollable.
|
|
630
|
+
layoutType === 'fluid' && 'max-h-full max-w-full', this.layout.width() === 'container' && 'w-full lg:container lg:mx-auto', this.class());
|
|
550
631
|
}, /* @ts-ignore */
|
|
551
632
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
552
633
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: LayoutContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|