@ojiepermana/angular 21.2.4 → 21.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -11
- package/fesm2022/ojiepermana-angular-layout-theme.mjs +581 -0
- package/fesm2022/ojiepermana-angular-layout-theme.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-layout.mjs +2 -1
- package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +59 -0
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-navigation.mjs +6 -58
- package/fesm2022/ojiepermana-angular-navigation.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-theme.mjs +1 -1
- package/fesm2022/ojiepermana-angular-theme.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-ui-component-accordion.mjs +174 -0
- package/fesm2022/ojiepermana-angular-ui-component-accordion.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-alert-dialog.mjs +242 -0
- package/fesm2022/ojiepermana-angular-ui-component-alert-dialog.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-alert.mjs +90 -0
- package/fesm2022/ojiepermana-angular-ui-component-alert.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-aspect-ratio.mjs +33 -0
- package/fesm2022/ojiepermana-angular-ui-component-aspect-ratio.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-avatar.mjs +123 -0
- package/fesm2022/ojiepermana-angular-ui-component-avatar.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-badge.mjs +47 -0
- package/fesm2022/ojiepermana-angular-ui-component-badge.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-breadcrumb.mjs +186 -0
- package/fesm2022/ojiepermana-angular-ui-component-breadcrumb.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-button-group.mjs +95 -0
- package/fesm2022/ojiepermana-angular-ui-component-button-group.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-button.mjs +64 -0
- package/fesm2022/ojiepermana-angular-ui-component-button.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-calendar.mjs +78 -0
- package/fesm2022/ojiepermana-angular-ui-component-calendar.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-card.mjs +137 -0
- package/fesm2022/ojiepermana-angular-ui-component-card.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-carousel.mjs +310 -0
- package/fesm2022/ojiepermana-angular-ui-component-carousel.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-chart-area.mjs +6 -0
- package/fesm2022/ojiepermana-angular-ui-component-chart-area.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-chart-bar.mjs +6 -0
- package/fesm2022/ojiepermana-angular-ui-component-chart-bar.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-chart-line.mjs +6 -0
- package/fesm2022/ojiepermana-angular-ui-component-chart-line.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-chart-pie.mjs +6 -0
- package/fesm2022/ojiepermana-angular-ui-component-chart-pie.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-chart-radar.mjs +6 -0
- package/fesm2022/ojiepermana-angular-ui-component-chart-radar.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-chart-radial.mjs +6 -0
- package/fesm2022/ojiepermana-angular-ui-component-chart-radial.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-chart-scatter.mjs +6 -0
- package/fesm2022/ojiepermana-angular-ui-component-chart-scatter.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-chart.mjs → ojiepermana-angular-ui-component-chart.mjs} +2 -2
- package/fesm2022/ojiepermana-angular-ui-component-chart.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-checkbox.mjs +104 -0
- package/fesm2022/ojiepermana-angular-ui-component-checkbox.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-collapsible.mjs +116 -0
- package/fesm2022/ojiepermana-angular-ui-component-collapsible.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-combobox.mjs +263 -0
- package/fesm2022/ojiepermana-angular-ui-component-combobox.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-command.mjs +268 -0
- package/fesm2022/ojiepermana-angular-ui-component-command.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-context-menu.mjs +100 -0
- package/fesm2022/ojiepermana-angular-ui-component-context-menu.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-date-picker.mjs +155 -0
- package/fesm2022/ojiepermana-angular-ui-component-date-picker.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-dialog.mjs +262 -0
- package/fesm2022/ojiepermana-angular-ui-component-dialog.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-drawer.mjs +6 -0
- package/fesm2022/ojiepermana-angular-ui-component-drawer.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-dropdown-menu.mjs +458 -0
- package/fesm2022/ojiepermana-angular-ui-component-dropdown-menu.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-form.mjs +208 -0
- package/fesm2022/ojiepermana-angular-ui-component-form.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-input-group.mjs +164 -0
- package/fesm2022/ojiepermana-angular-ui-component-input-group.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-input.mjs +43 -0
- package/fesm2022/ojiepermana-angular-ui-component-input.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-item.mjs +241 -0
- package/fesm2022/ojiepermana-angular-ui-component-item.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-label.mjs +30 -0
- package/fesm2022/ojiepermana-angular-ui-component-label.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-pagination.mjs +192 -0
- package/fesm2022/ojiepermana-angular-ui-component-pagination.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-popover.mjs +163 -0
- package/fesm2022/ojiepermana-angular-ui-component-popover.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-progress.mjs +53 -0
- package/fesm2022/ojiepermana-angular-ui-component-progress.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-radio.mjs +92 -0
- package/fesm2022/ojiepermana-angular-ui-component-radio.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-scroll-area.mjs +48 -0
- package/fesm2022/ojiepermana-angular-ui-component-scroll-area.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-select.mjs +131 -0
- package/fesm2022/ojiepermana-angular-ui-component-select.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-separator.mjs +33 -0
- package/fesm2022/ojiepermana-angular-ui-component-separator.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-sheet.mjs +235 -0
- package/fesm2022/ojiepermana-angular-ui-component-sheet.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-skeleton.mjs +29 -0
- package/fesm2022/ojiepermana-angular-ui-component-skeleton.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-slider.mjs +29 -0
- package/fesm2022/ojiepermana-angular-ui-component-slider.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-switch.mjs +84 -0
- package/fesm2022/ojiepermana-angular-ui-component-switch.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-table.mjs +139 -0
- package/fesm2022/ojiepermana-angular-ui-component-table.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-tabs.mjs +252 -0
- package/fesm2022/ojiepermana-angular-ui-component-tabs.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-textarea.mjs +37 -0
- package/fesm2022/ojiepermana-angular-ui-component-textarea.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-toast.mjs +47 -0
- package/fesm2022/ojiepermana-angular-ui-component-toast.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-tooltip.mjs +56 -0
- package/fesm2022/ojiepermana-angular-ui-component-tooltip.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-ui-component-utils.mjs +13 -0
- package/fesm2022/ojiepermana-angular-ui-component-utils.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular.mjs +5 -3
- package/fesm2022/ojiepermana-angular.mjs.map +1 -1
- package/layout/theme/package.json +4 -0
- package/navigation-icon/package.json +4 -0
- package/package.json +212 -12
- package/types/ojiepermana-angular-layout-theme.d.ts +205 -0
- package/types/ojiepermana-angular-layout.d.ts +1 -1
- package/types/ojiepermana-angular-navigation-icon.d.ts +17 -0
- package/types/ojiepermana-angular-navigation.d.ts +2 -20
- package/types/ojiepermana-angular-ui-component-accordion.d.ts +51 -0
- package/types/ojiepermana-angular-ui-component-alert-dialog.d.ts +93 -0
- package/types/ojiepermana-angular-ui-component-alert.d.ts +37 -0
- package/types/ojiepermana-angular-ui-component-aspect-ratio.d.ts +12 -0
- package/types/ojiepermana-angular-ui-component-avatar.d.ts +51 -0
- package/types/ojiepermana-angular-ui-component-badge.d.ts +19 -0
- package/types/ojiepermana-angular-ui-component-breadcrumb.d.ts +46 -0
- package/types/ojiepermana-angular-ui-component-button-group.d.ts +26 -0
- package/types/ojiepermana-angular-ui-component-button.d.ts +22 -0
- package/types/ojiepermana-angular-ui-component-calendar.d.ts +33 -0
- package/types/ojiepermana-angular-ui-component-card.d.ts +60 -0
- package/types/ojiepermana-angular-ui-component-carousel.d.ts +86 -0
- package/types/ojiepermana-angular-ui-component-chart-area.d.ts +1 -0
- package/types/ojiepermana-angular-ui-component-chart-bar.d.ts +1 -0
- package/types/ojiepermana-angular-ui-component-chart-line.d.ts +1 -0
- package/types/ojiepermana-angular-ui-component-chart-pie.d.ts +1 -0
- package/types/ojiepermana-angular-ui-component-chart-radar.d.ts +1 -0
- package/types/ojiepermana-angular-ui-component-chart-radial.d.ts +1 -0
- package/types/ojiepermana-angular-ui-component-chart-scatter.d.ts +1 -0
- package/types/{ojiepermana-angular-chart.d.ts → ojiepermana-angular-ui-component-chart.d.ts} +15 -15
- package/types/ojiepermana-angular-ui-component-checkbox.d.ts +35 -0
- package/types/ojiepermana-angular-ui-component-collapsible.d.ts +42 -0
- package/types/ojiepermana-angular-ui-component-combobox.d.ts +51 -0
- package/types/ojiepermana-angular-ui-component-command.d.ts +99 -0
- package/types/ojiepermana-angular-ui-component-context-menu.d.ts +35 -0
- package/types/ojiepermana-angular-ui-component-date-picker.d.ts +41 -0
- package/types/ojiepermana-angular-ui-component-dialog.d.ts +87 -0
- package/types/ojiepermana-angular-ui-component-drawer.d.ts +1 -0
- package/types/ojiepermana-angular-ui-component-dropdown-menu.d.ts +135 -0
- package/types/ojiepermana-angular-ui-component-form.d.ts +92 -0
- package/types/ojiepermana-angular-ui-component-input-group.d.ts +51 -0
- package/types/ojiepermana-angular-ui-component-input.d.ts +16 -0
- package/types/ojiepermana-angular-ui-component-item.d.ts +88 -0
- package/types/ojiepermana-angular-ui-component-label.d.ts +11 -0
- package/types/ojiepermana-angular-ui-component-pagination.d.ts +27 -0
- package/types/ojiepermana-angular-ui-component-popover.d.ts +43 -0
- package/types/ojiepermana-angular-ui-component-progress.d.ts +17 -0
- package/types/ojiepermana-angular-ui-component-radio.d.ts +34 -0
- package/types/ojiepermana-angular-ui-component-scroll-area.d.ts +19 -0
- package/types/ojiepermana-angular-ui-component-select.d.ts +45 -0
- package/types/ojiepermana-angular-ui-component-separator.d.ts +14 -0
- package/types/ojiepermana-angular-ui-component-sheet.d.ts +74 -0
- package/types/ojiepermana-angular-ui-component-skeleton.d.ts +10 -0
- package/types/ojiepermana-angular-ui-component-slider.d.ts +16 -0
- package/types/ojiepermana-angular-ui-component-switch.d.ts +30 -0
- package/types/ojiepermana-angular-ui-component-table.d.ts +52 -0
- package/types/ojiepermana-angular-ui-component-tabs.d.ts +92 -0
- package/types/ojiepermana-angular-ui-component-textarea.d.ts +12 -0
- package/types/ojiepermana-angular-ui-component-toast.d.ts +29 -0
- package/types/ojiepermana-angular-ui-component-tooltip.d.ts +22 -0
- package/types/ojiepermana-angular-ui-component-utils.d.ts +5 -0
- package/ui/component/accordion/package.json +4 -0
- package/ui/component/alert/package.json +4 -0
- package/ui/component/alert-dialog/package.json +4 -0
- package/ui/component/aspect-ratio/package.json +4 -0
- package/ui/component/avatar/package.json +4 -0
- package/ui/component/badge/package.json +4 -0
- package/ui/component/breadcrumb/package.json +4 -0
- package/ui/component/button/package.json +4 -0
- package/ui/component/button-group/package.json +4 -0
- package/ui/component/calendar/package.json +4 -0
- package/ui/component/card/package.json +4 -0
- package/ui/component/carousel/package.json +4 -0
- package/ui/component/chart/README.md +249 -0
- package/ui/component/chart/area/package.json +4 -0
- package/ui/component/chart/bar/package.json +4 -0
- package/ui/component/chart/line/package.json +4 -0
- package/ui/component/chart/package.json +4 -0
- package/ui/component/chart/pie/package.json +4 -0
- package/ui/component/chart/radar/package.json +4 -0
- package/ui/component/chart/radial/package.json +4 -0
- package/ui/component/chart/scatter/package.json +4 -0
- package/ui/component/checkbox/package.json +4 -0
- package/ui/component/collapsible/package.json +4 -0
- package/ui/component/combobox/package.json +4 -0
- package/ui/component/command/package.json +4 -0
- package/ui/component/context-menu/package.json +4 -0
- package/ui/component/date-picker/package.json +4 -0
- package/ui/component/dialog/package.json +4 -0
- package/ui/component/drawer/package.json +4 -0
- package/ui/component/dropdown-menu/package.json +4 -0
- package/ui/component/form/package.json +4 -0
- package/ui/component/input/package.json +4 -0
- package/ui/component/input-group/package.json +4 -0
- package/ui/component/item/package.json +4 -0
- package/ui/component/label/package.json +4 -0
- package/ui/component/pagination/package.json +4 -0
- package/ui/component/popover/package.json +4 -0
- package/ui/component/progress/package.json +4 -0
- package/ui/component/radio/package.json +4 -0
- package/ui/component/scroll-area/package.json +4 -0
- package/ui/component/select/package.json +4 -0
- package/ui/component/separator/package.json +4 -0
- package/ui/component/sheet/package.json +4 -0
- package/ui/component/skeleton/package.json +4 -0
- package/ui/component/slider/package.json +4 -0
- package/ui/component/switch/package.json +4 -0
- package/ui/component/table/package.json +4 -0
- package/ui/component/tabs/package.json +4 -0
- package/ui/component/textarea/package.json +4 -0
- package/ui/component/toast/package.json +4 -0
- package/ui/component/tooltip/package.json +4 -0
- package/ui/component/utils/package.json +4 -0
- package/chart/README.md +0 -0
- package/chart/package.json +0 -4
- package/component/package.json +0 -4
- package/fesm2022/ojiepermana-angular-chart.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component.mjs +0 -5774
- package/fesm2022/ojiepermana-angular-component.mjs.map +0 -1
- package/types/ojiepermana-angular-component.d.ts +0 -1927
|
@@ -0,0 +1,581 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, input, output, signal, computed, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
|
+
import { ButtonComponent } from '@ojiepermana/angular/component/button';
|
|
5
|
+
import { cn } from '@ojiepermana/angular/component/utils';
|
|
6
|
+
|
|
7
|
+
const THEME_PANEL_THEME_PORT = new InjectionToken('THEME_PANEL_THEME_PORT');
|
|
8
|
+
const THEME_PANEL_LAYOUT_PORT = new InjectionToken('THEME_PANEL_LAYOUT_PORT');
|
|
9
|
+
const THEME_COLOR_OPTIONS = [
|
|
10
|
+
{ value: 'base', label: 'Base', swatchClass: 'bg-zinc-800' },
|
|
11
|
+
{ value: 'red', label: 'Red', swatchClass: 'bg-red-500' },
|
|
12
|
+
{ value: 'orange', label: 'Orange', swatchClass: 'bg-orange-500' },
|
|
13
|
+
{ value: 'amber', label: 'Amber', swatchClass: 'bg-amber-400' },
|
|
14
|
+
{ value: 'yellow', label: 'Yellow', swatchClass: 'bg-yellow-400' },
|
|
15
|
+
{ value: 'lime', label: 'Lime', swatchClass: 'bg-lime-400' },
|
|
16
|
+
{ value: 'green', label: 'Green', swatchClass: 'bg-green-600' },
|
|
17
|
+
{ value: 'emerald', label: 'Emerald', swatchClass: 'bg-emerald-600' },
|
|
18
|
+
{ value: 'teal', label: 'Teal', swatchClass: 'bg-teal-600' },
|
|
19
|
+
{ value: 'cyan', label: 'Cyan', swatchClass: 'bg-cyan-600' },
|
|
20
|
+
{ value: 'sky', label: 'Sky', swatchClass: 'bg-sky-600' },
|
|
21
|
+
{ value: 'blue', label: 'Blue', swatchClass: 'bg-blue-500' },
|
|
22
|
+
{ value: 'indigo', label: 'Indigo', swatchClass: 'bg-indigo-500' },
|
|
23
|
+
{ value: 'violet', label: 'Violet', swatchClass: 'bg-violet-500' },
|
|
24
|
+
{ value: 'purple', label: 'Purple', swatchClass: 'bg-purple-500' },
|
|
25
|
+
{ value: 'fuchsia', label: 'Fuchsia', swatchClass: 'bg-fuchsia-600' },
|
|
26
|
+
{ value: 'pink', label: 'Pink', swatchClass: 'bg-pink-600' },
|
|
27
|
+
{ value: 'rose', label: 'Rose', swatchClass: 'bg-rose-500' },
|
|
28
|
+
];
|
|
29
|
+
const THEME_MODE_OPTIONS = [
|
|
30
|
+
{ value: 'light', label: 'Light', icon: 'sun' },
|
|
31
|
+
{ value: 'dark', label: 'Dark', icon: 'moon' },
|
|
32
|
+
{ value: 'system', label: 'System', icon: 'system' },
|
|
33
|
+
];
|
|
34
|
+
const THEME_STYLE_OPTIONS = [
|
|
35
|
+
{ value: 'default', label: 'Default', icon: 'default-style' },
|
|
36
|
+
{ value: 'sharp', label: 'Sharp', icon: 'sharp-style' },
|
|
37
|
+
{ value: 'brutal', label: 'Brutal', icon: 'brutal-style' },
|
|
38
|
+
{ value: 'soft', label: 'Soft', icon: 'soft-style' },
|
|
39
|
+
];
|
|
40
|
+
const LAYOUT_MODE_OPTIONS = [
|
|
41
|
+
{ value: 'vertical', label: 'Vertical', icon: 'vertical-layout' },
|
|
42
|
+
{ value: 'horizontal', label: 'Horizontal', icon: 'horizontal-layout' },
|
|
43
|
+
{ value: 'empty', label: 'Empty', icon: 'empty-layout' },
|
|
44
|
+
];
|
|
45
|
+
const LAYOUT_WIDTH_OPTIONS = [
|
|
46
|
+
{ value: 'full', label: 'Full', icon: 'full-width' },
|
|
47
|
+
{ value: 'container', label: 'Container', icon: 'container-width' },
|
|
48
|
+
{ value: 'wide', label: 'Wide', icon: 'wide-width' },
|
|
49
|
+
];
|
|
50
|
+
class ThemePanelComponent {
|
|
51
|
+
sanitizer = inject(DomSanitizer);
|
|
52
|
+
themePort = inject(THEME_PANEL_THEME_PORT, { optional: true });
|
|
53
|
+
layoutPort = inject(THEME_PANEL_LAYOUT_PORT, { optional: true });
|
|
54
|
+
connected = input(true, ...(ngDevMode ? [{ debugName: "connected" }] : /* istanbul ignore next */ []));
|
|
55
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
56
|
+
title = input('Theme panel', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
57
|
+
description = input('', ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
58
|
+
userName = input('', ...(ngDevMode ? [{ debugName: "userName" }] : /* istanbul ignore next */ []));
|
|
59
|
+
userSubtitle = input('', ...(ngDevMode ? [{ debugName: "userSubtitle" }] : /* istanbul ignore next */ []));
|
|
60
|
+
userInitials = input('', ...(ngDevMode ? [{ debugName: "userInitials" }] : /* istanbul ignore next */ []));
|
|
61
|
+
themeColor = input('base', ...(ngDevMode ? [{ debugName: "themeColor" }] : /* istanbul ignore next */ []));
|
|
62
|
+
themeMode = input('light', ...(ngDevMode ? [{ debugName: "themeMode" }] : /* istanbul ignore next */ []));
|
|
63
|
+
themeStyle = input('default', ...(ngDevMode ? [{ debugName: "themeStyle" }] : /* istanbul ignore next */ []));
|
|
64
|
+
layoutMode = input('vertical', ...(ngDevMode ? [{ debugName: "layoutMode" }] : /* istanbul ignore next */ []));
|
|
65
|
+
layoutWidth = input('container', ...(ngDevMode ? [{ debugName: "layoutWidth" }] : /* istanbul ignore next */ []));
|
|
66
|
+
themeColorChange = output();
|
|
67
|
+
themeModeChange = output();
|
|
68
|
+
themeStyleChange = output();
|
|
69
|
+
layoutModeChange = output();
|
|
70
|
+
layoutWidthChange = output();
|
|
71
|
+
currentThemeColor = signal(this.themeColor(), ...(ngDevMode ? [{ debugName: "currentThemeColor" }] : /* istanbul ignore next */ []));
|
|
72
|
+
currentThemeMode = signal(this.themeMode(), ...(ngDevMode ? [{ debugName: "currentThemeMode" }] : /* istanbul ignore next */ []));
|
|
73
|
+
currentThemeStyle = signal(this.themeStyle(), ...(ngDevMode ? [{ debugName: "currentThemeStyle" }] : /* istanbul ignore next */ []));
|
|
74
|
+
currentLayoutMode = signal(this.layoutMode(), ...(ngDevMode ? [{ debugName: "currentLayoutMode" }] : /* istanbul ignore next */ []));
|
|
75
|
+
currentLayoutWidth = signal(this.layoutWidth(), ...(ngDevMode ? [{ debugName: "currentLayoutWidth" }] : /* istanbul ignore next */ []));
|
|
76
|
+
themeColorOptions = THEME_COLOR_OPTIONS;
|
|
77
|
+
themeModeOptions = THEME_MODE_OPTIONS;
|
|
78
|
+
themeStyleOptions = THEME_STYLE_OPTIONS;
|
|
79
|
+
layoutModeOptions = LAYOUT_MODE_OPTIONS;
|
|
80
|
+
layoutWidthOptions = LAYOUT_WIDTH_OPTIONS;
|
|
81
|
+
hostClasses = computed(() => cn('block overflow-hidden rounded-lg border border-border/70 bg-card text-card-foreground shadow-sm', this.class()), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
82
|
+
hasUserHeader = computed(() => !!this.userName().trim() || !!this.userSubtitle().trim(), ...(ngDevMode ? [{ debugName: "hasUserHeader" }] : /* istanbul ignore next */ []));
|
|
83
|
+
resolvedUserInitials = computed(() => this.userInitials().trim() || this.toInitials(this.userName() || this.title()), ...(ngDevMode ? [{ debugName: "resolvedUserInitials" }] : /* istanbul ignore next */ []));
|
|
84
|
+
currentThemeColorLabel = computed(() => this.themeColorOptions.find((option) => option.value === this.currentThemeColor())?.label ?? '', ...(ngDevMode ? [{ debugName: "currentThemeColorLabel" }] : /* istanbul ignore next */ []));
|
|
85
|
+
constructor() {
|
|
86
|
+
effect(() => {
|
|
87
|
+
this.currentThemeColor.set(this.connected() && this.themePort ? this.themePort.color() : this.themeColor());
|
|
88
|
+
});
|
|
89
|
+
effect(() => {
|
|
90
|
+
this.currentThemeMode.set(this.connected() && this.themePort ? this.themePort.scheme() : this.themeMode());
|
|
91
|
+
});
|
|
92
|
+
effect(() => {
|
|
93
|
+
this.currentThemeStyle.set(this.connected() && this.themePort ? this.themePort.style() : this.themeStyle());
|
|
94
|
+
});
|
|
95
|
+
effect(() => {
|
|
96
|
+
this.currentLayoutMode.set(this.connected() && this.layoutPort ? this.layoutPort.mode() : this.layoutMode());
|
|
97
|
+
});
|
|
98
|
+
effect(() => {
|
|
99
|
+
this.currentLayoutWidth.set(this.connected() && this.layoutPort ? this.layoutPort.width() : this.layoutWidth());
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
setThemeColor(color) {
|
|
103
|
+
this.currentThemeColor.set(color);
|
|
104
|
+
this.themePort?.setColor(color);
|
|
105
|
+
this.themeColorChange.emit(color);
|
|
106
|
+
}
|
|
107
|
+
setThemeMode(mode) {
|
|
108
|
+
this.currentThemeMode.set(mode);
|
|
109
|
+
this.themePort?.setScheme(mode);
|
|
110
|
+
this.themeModeChange.emit(mode);
|
|
111
|
+
}
|
|
112
|
+
setThemeStyle(style) {
|
|
113
|
+
this.currentThemeStyle.set(style);
|
|
114
|
+
this.themePort?.setStyle(style);
|
|
115
|
+
this.themeStyleChange.emit(style);
|
|
116
|
+
}
|
|
117
|
+
setLayoutMode(mode) {
|
|
118
|
+
this.currentLayoutMode.set(mode);
|
|
119
|
+
this.layoutPort?.setMode(mode);
|
|
120
|
+
this.layoutModeChange.emit(mode);
|
|
121
|
+
}
|
|
122
|
+
setLayoutWidth(width) {
|
|
123
|
+
this.currentLayoutWidth.set(width);
|
|
124
|
+
this.layoutPort?.setWidth(width);
|
|
125
|
+
this.layoutWidthChange.emit(width);
|
|
126
|
+
}
|
|
127
|
+
sectionEyebrowClasses() {
|
|
128
|
+
return 'text-[0.72rem] font-semibold uppercase tracking-[0.22em] text-muted-foreground';
|
|
129
|
+
}
|
|
130
|
+
segmentedOptionClasses(active) {
|
|
131
|
+
return cn('rounded-[calc(var(--layout-frame-radius)-2px)] px-3', active
|
|
132
|
+
? 'border border-border/70 bg-background shadow-sm hover:bg-background'
|
|
133
|
+
: 'text-muted-foreground hover:bg-background/70 hover:text-foreground');
|
|
134
|
+
}
|
|
135
|
+
swatchButtonClasses(active) {
|
|
136
|
+
return cn('size-9 rounded-full p-0', active
|
|
137
|
+
? 'border border-border/70 bg-background shadow-sm hover:bg-background'
|
|
138
|
+
: 'border border-transparent hover:bg-background/70');
|
|
139
|
+
}
|
|
140
|
+
optionIconClasses(active) {
|
|
141
|
+
return cn('inline-flex size-4 shrink-0 items-center justify-center [&_svg]:size-4', active ? 'text-foreground' : 'text-muted-foreground');
|
|
142
|
+
}
|
|
143
|
+
colorSwatchClasses(swatchClass, isActive) {
|
|
144
|
+
return cn('size-4 rounded-full border border-black/10 shadow-sm', swatchClass, isActive ? 'ring-2 ring-ring ring-offset-2 ring-offset-background' : '');
|
|
145
|
+
}
|
|
146
|
+
iconSvg(name) {
|
|
147
|
+
return this.sanitizer.bypassSecurityTrustHtml(this.rawIconSvg(name));
|
|
148
|
+
}
|
|
149
|
+
rawIconSvg(name) {
|
|
150
|
+
switch (name) {
|
|
151
|
+
case 'sun':
|
|
152
|
+
return '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"></circle><path d="M12 2.5v2.2"></path><path d="M12 19.3v2.2"></path><path d="M4.93 4.93 6.5 6.5"></path><path d="M17.5 17.5 19.07 19.07"></path><path d="M2.5 12h2.2"></path><path d="M19.3 12h2.2"></path><path d="M4.93 19.07 6.5 17.5"></path><path d="M17.5 6.5 19.07 4.93"></path></svg>';
|
|
153
|
+
case 'moon':
|
|
154
|
+
return '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M20.4 14.8A8.8 8.8 0 1 1 9.2 3.6a7.2 7.2 0 0 0 11.2 11.2Z"></path></svg>';
|
|
155
|
+
case 'system':
|
|
156
|
+
return '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="3.5" y="4.5" width="17" height="11.5" rx="1.8"></rect><path d="M9 19.5h6"></path><path d="M12 16v3.5"></path></svg>';
|
|
157
|
+
case 'default-style':
|
|
158
|
+
return '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="5" width="14" height="14" rx="4"></rect></svg>';
|
|
159
|
+
case 'sharp-style':
|
|
160
|
+
return '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="5" width="14" height="14" rx="1"></rect></svg>';
|
|
161
|
+
case 'brutal-style':
|
|
162
|
+
return '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M5 7.5h14"></path><path d="M5 12h14"></path><path d="M5 16.5h14"></path></svg>';
|
|
163
|
+
case 'soft-style':
|
|
164
|
+
return '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M7.5 9A4.5 4.5 0 0 1 12 4.5h1A4.5 4.5 0 0 1 17.5 9v1A4.5 4.5 0 0 1 13 14.5h-1A4.5 4.5 0 0 1 7.5 10Z"></path><path d="M6.5 15.5c1.3 2 3.2 3 5.5 3s4.2-1 5.5-3"></path></svg>';
|
|
165
|
+
case 'vertical-layout':
|
|
166
|
+
return '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="5" width="16" height="14" rx="2"></rect><path d="M9 5v14"></path></svg>';
|
|
167
|
+
case 'horizontal-layout':
|
|
168
|
+
return '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="5" width="16" height="14" rx="2"></rect><path d="M4 10h16"></path></svg>';
|
|
169
|
+
case 'empty-layout':
|
|
170
|
+
return '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="4.5" y="5.5" width="15" height="13" rx="2"></rect></svg>';
|
|
171
|
+
case 'full-width':
|
|
172
|
+
return '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 8V5h3"></path><path d="M20 8V5h-3"></path><path d="M4 16v3h3"></path><path d="M20 16v3h-3"></path><path d="M8 5H4"></path><path d="M20 5h-4"></path><path d="M8 19H4"></path><path d="M20 19h-4"></path></svg>';
|
|
173
|
+
case 'container-width':
|
|
174
|
+
return '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="6" width="16" height="12" rx="2"></rect><path d="M9 9.5h6"></path><path d="M9 14.5h6"></path></svg>';
|
|
175
|
+
case 'wide-width':
|
|
176
|
+
return '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="6" width="18" height="12" rx="2"></rect><path d="M7 9.5h10"></path><path d="M7 14.5h10"></path></svg>';
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
toInitials(value) {
|
|
180
|
+
const words = value
|
|
181
|
+
.split(/\s+/)
|
|
182
|
+
.map((item) => item.trim())
|
|
183
|
+
.filter(Boolean)
|
|
184
|
+
.slice(0, 2);
|
|
185
|
+
if (!words.length) {
|
|
186
|
+
return 'UI';
|
|
187
|
+
}
|
|
188
|
+
return words.map((word) => word[0]?.toUpperCase() ?? '').join('');
|
|
189
|
+
}
|
|
190
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThemePanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
191
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: ThemePanelComponent, isStandalone: true, selector: "ui-theme-panel", inputs: { connected: { classPropertyName: "connected", publicName: "connected", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, userName: { classPropertyName: "userName", publicName: "userName", isSignal: true, isRequired: false, transformFunction: null }, userSubtitle: { classPropertyName: "userSubtitle", publicName: "userSubtitle", isSignal: true, isRequired: false, transformFunction: null }, userInitials: { classPropertyName: "userInitials", publicName: "userInitials", isSignal: true, isRequired: false, transformFunction: null }, themeColor: { classPropertyName: "themeColor", publicName: "themeColor", isSignal: true, isRequired: false, transformFunction: null }, themeMode: { classPropertyName: "themeMode", publicName: "themeMode", isSignal: true, isRequired: false, transformFunction: null }, themeStyle: { classPropertyName: "themeStyle", publicName: "themeStyle", isSignal: true, isRequired: false, transformFunction: null }, layoutMode: { classPropertyName: "layoutMode", publicName: "layoutMode", isSignal: true, isRequired: false, transformFunction: null }, layoutWidth: { classPropertyName: "layoutWidth", publicName: "layoutWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { themeColorChange: "themeColorChange", themeModeChange: "themeModeChange", themeStyleChange: "themeStyleChange", layoutModeChange: "layoutModeChange", layoutWidthChange: "layoutWidthChange" }, host: { properties: { "class": "hostClasses()" } }, ngImport: i0, template: `
|
|
192
|
+
<div class="flex flex-col gap-4 p-4">
|
|
193
|
+
@if (hasUserHeader()) {
|
|
194
|
+
<header class="flex items-center gap-3 px-1 pt-1">
|
|
195
|
+
<span class="flex size-14 items-center justify-center rounded-full bg-primary/10 text-primary">
|
|
196
|
+
<span
|
|
197
|
+
class="flex size-11 items-center justify-center rounded-full bg-primary text-xs font-semibold tracking-[0.22em] text-primary-foreground">
|
|
198
|
+
{{ resolvedUserInitials() }}
|
|
199
|
+
</span>
|
|
200
|
+
</span>
|
|
201
|
+
|
|
202
|
+
<div class="min-w-0 flex-1">
|
|
203
|
+
<h2 class="truncate text-[1.05rem] font-semibold leading-none tracking-tight text-foreground">
|
|
204
|
+
{{ userName() }}
|
|
205
|
+
</h2>
|
|
206
|
+
@if (userSubtitle(); as subtitle) {
|
|
207
|
+
<p class="mt-1 text-sm leading-none text-muted-foreground">{{ subtitle }}</p>
|
|
208
|
+
}
|
|
209
|
+
</div>
|
|
210
|
+
</header>
|
|
211
|
+
} @else {
|
|
212
|
+
<header class="space-y-1 px-1 pt-1">
|
|
213
|
+
<h2 class="text-base font-semibold tracking-tight text-foreground">{{ title() }}</h2>
|
|
214
|
+
@if (description(); as text) {
|
|
215
|
+
<p class="text-sm leading-6 text-muted-foreground">{{ text }}</p>
|
|
216
|
+
}
|
|
217
|
+
</header>
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
<div class="grid gap-4">
|
|
221
|
+
<section data-setting="theme-mode" [attr.data-current]="currentThemeMode()" class="space-y-2">
|
|
222
|
+
<div class="px-1">
|
|
223
|
+
<p [class]="sectionEyebrowClasses()">Mode</p>
|
|
224
|
+
</div>
|
|
225
|
+
|
|
226
|
+
<div class="rounded-(--layout-frame-radius) bg-muted/65 p-0.5">
|
|
227
|
+
<div class="grid grid-cols-3 gap-1" role="group" aria-label="Theme mode">
|
|
228
|
+
@for (option of themeModeOptions; track option.value) {
|
|
229
|
+
<button
|
|
230
|
+
type="button"
|
|
231
|
+
ui-button
|
|
232
|
+
size="sm"
|
|
233
|
+
variant="ghost"
|
|
234
|
+
data-setting-option="theme-mode"
|
|
235
|
+
[attr.data-value]="option.value"
|
|
236
|
+
[attr.aria-pressed]="currentThemeMode() === option.value"
|
|
237
|
+
[class]="segmentedOptionClasses(currentThemeMode() === option.value)"
|
|
238
|
+
(click)="setThemeMode(option.value)">
|
|
239
|
+
<span class="inline-flex items-center gap-2.5">
|
|
240
|
+
<span
|
|
241
|
+
aria-hidden="true"
|
|
242
|
+
[class]="optionIconClasses(currentThemeMode() === option.value)"
|
|
243
|
+
[innerHTML]="iconSvg(option.icon!)"></span>
|
|
244
|
+
<span class="text-sm font-semibold leading-none">{{ option.label }}</span>
|
|
245
|
+
</span>
|
|
246
|
+
</button>
|
|
247
|
+
}
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
</section>
|
|
251
|
+
|
|
252
|
+
<section data-setting="theme-color" [attr.data-current]="currentThemeColor()" class="space-y-2">
|
|
253
|
+
<div class="flex items-center justify-between gap-3 px-1">
|
|
254
|
+
<p [class]="sectionEyebrowClasses()">Color</p>
|
|
255
|
+
<p class="text-xs font-semibold text-muted-foreground">{{ currentThemeColorLabel() }}</p>
|
|
256
|
+
</div>
|
|
257
|
+
|
|
258
|
+
<div class="rounded-(--layout-frame-radius) bg-muted/65 p-1">
|
|
259
|
+
<div class="grid grid-cols-6 justify-items-center gap-1" role="group" aria-label="Theme color">
|
|
260
|
+
@for (option of themeColorOptions; track option.value) {
|
|
261
|
+
<button
|
|
262
|
+
type="button"
|
|
263
|
+
ui-button
|
|
264
|
+
size="icon"
|
|
265
|
+
variant="ghost"
|
|
266
|
+
data-setting-option="theme-color"
|
|
267
|
+
[attr.data-value]="option.value"
|
|
268
|
+
[attr.aria-label]="'Theme color ' + option.label"
|
|
269
|
+
[attr.aria-pressed]="currentThemeColor() === option.value"
|
|
270
|
+
[class]="swatchButtonClasses(currentThemeColor() === option.value)"
|
|
271
|
+
(click)="setThemeColor(option.value)">
|
|
272
|
+
<span
|
|
273
|
+
aria-hidden="true"
|
|
274
|
+
[class]="colorSwatchClasses(option.swatchClass, currentThemeColor() === option.value)"></span>
|
|
275
|
+
<span class="sr-only">{{ option.label }}</span>
|
|
276
|
+
</button>
|
|
277
|
+
}
|
|
278
|
+
</div>
|
|
279
|
+
</div>
|
|
280
|
+
</section>
|
|
281
|
+
|
|
282
|
+
<section data-setting="theme-style" [attr.data-current]="currentThemeStyle()" class="space-y-2">
|
|
283
|
+
<div class="px-1">
|
|
284
|
+
<p [class]="sectionEyebrowClasses()">Style</p>
|
|
285
|
+
</div>
|
|
286
|
+
|
|
287
|
+
<div class="rounded-(--layout-frame-radius) bg-muted/65 p-0.5">
|
|
288
|
+
<div class="grid grid-cols-2 gap-1 sm:grid-cols-4" role="group" aria-label="Theme style">
|
|
289
|
+
@for (option of themeStyleOptions; track option.value) {
|
|
290
|
+
<button
|
|
291
|
+
type="button"
|
|
292
|
+
ui-button
|
|
293
|
+
size="sm"
|
|
294
|
+
variant="ghost"
|
|
295
|
+
data-setting-option="theme-style"
|
|
296
|
+
[attr.data-value]="option.value"
|
|
297
|
+
[attr.aria-pressed]="currentThemeStyle() === option.value"
|
|
298
|
+
[class]="segmentedOptionClasses(currentThemeStyle() === option.value)"
|
|
299
|
+
(click)="setThemeStyle(option.value)">
|
|
300
|
+
<span class="inline-flex items-center gap-2.5">
|
|
301
|
+
<span
|
|
302
|
+
aria-hidden="true"
|
|
303
|
+
[class]="optionIconClasses(currentThemeStyle() === option.value)"
|
|
304
|
+
[innerHTML]="iconSvg(option.icon!)"></span>
|
|
305
|
+
<span class="text-sm font-semibold leading-none">{{ option.label }}</span>
|
|
306
|
+
</span>
|
|
307
|
+
</button>
|
|
308
|
+
}
|
|
309
|
+
</div>
|
|
310
|
+
</div>
|
|
311
|
+
</section>
|
|
312
|
+
|
|
313
|
+
<section data-setting="layout-mode" [attr.data-current]="currentLayoutMode()" class="space-y-2">
|
|
314
|
+
<div class="px-1">
|
|
315
|
+
<p [class]="sectionEyebrowClasses()">Layout</p>
|
|
316
|
+
</div>
|
|
317
|
+
|
|
318
|
+
<div class="rounded-(--layout-frame-radius) bg-muted/65 p-0.5">
|
|
319
|
+
<div class="grid grid-cols-3 gap-1" role="group" aria-label="Layout mode">
|
|
320
|
+
@for (option of layoutModeOptions; track option.value) {
|
|
321
|
+
<button
|
|
322
|
+
type="button"
|
|
323
|
+
ui-button
|
|
324
|
+
size="sm"
|
|
325
|
+
variant="ghost"
|
|
326
|
+
data-setting-option="layout-mode"
|
|
327
|
+
[attr.data-value]="option.value"
|
|
328
|
+
[attr.aria-pressed]="currentLayoutMode() === option.value"
|
|
329
|
+
[class]="segmentedOptionClasses(currentLayoutMode() === option.value)"
|
|
330
|
+
(click)="setLayoutMode(option.value)">
|
|
331
|
+
<span class="inline-flex items-center gap-2.5">
|
|
332
|
+
<span
|
|
333
|
+
aria-hidden="true"
|
|
334
|
+
[class]="optionIconClasses(currentLayoutMode() === option.value)"
|
|
335
|
+
[innerHTML]="iconSvg(option.icon!)"></span>
|
|
336
|
+
<span class="text-sm font-semibold leading-none">{{ option.label }}</span>
|
|
337
|
+
</span>
|
|
338
|
+
</button>
|
|
339
|
+
}
|
|
340
|
+
</div>
|
|
341
|
+
</div>
|
|
342
|
+
</section>
|
|
343
|
+
|
|
344
|
+
<section data-setting="layout-width" [attr.data-current]="currentLayoutWidth()" class="space-y-2">
|
|
345
|
+
<div class="px-1">
|
|
346
|
+
<p [class]="sectionEyebrowClasses()">Width</p>
|
|
347
|
+
</div>
|
|
348
|
+
|
|
349
|
+
<div class="rounded-(--layout-frame-radius) bg-muted/65 p-0.5">
|
|
350
|
+
<div class="grid grid-cols-3 gap-1" role="group" aria-label="Layout width">
|
|
351
|
+
@for (option of layoutWidthOptions; track option.value) {
|
|
352
|
+
<button
|
|
353
|
+
type="button"
|
|
354
|
+
ui-button
|
|
355
|
+
size="sm"
|
|
356
|
+
variant="ghost"
|
|
357
|
+
data-setting-option="layout-width"
|
|
358
|
+
[attr.data-value]="option.value"
|
|
359
|
+
[attr.aria-pressed]="currentLayoutWidth() === option.value"
|
|
360
|
+
[class]="segmentedOptionClasses(currentLayoutWidth() === option.value)"
|
|
361
|
+
(click)="setLayoutWidth(option.value)">
|
|
362
|
+
<span class="inline-flex items-center gap-2.5">
|
|
363
|
+
<span
|
|
364
|
+
aria-hidden="true"
|
|
365
|
+
[class]="optionIconClasses(currentLayoutWidth() === option.value)"
|
|
366
|
+
[innerHTML]="iconSvg(option.icon!)"></span>
|
|
367
|
+
<span class="text-sm font-semibold leading-none">{{ option.label }}</span>
|
|
368
|
+
</span>
|
|
369
|
+
</button>
|
|
370
|
+
}
|
|
371
|
+
</div>
|
|
372
|
+
</div>
|
|
373
|
+
</section>
|
|
374
|
+
</div>
|
|
375
|
+
</div>
|
|
376
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[ui-button], a[ui-button]", inputs: ["variant", "size", "class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
377
|
+
}
|
|
378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThemePanelComponent, decorators: [{
|
|
379
|
+
type: Component,
|
|
380
|
+
args: [{
|
|
381
|
+
selector: 'ui-theme-panel',
|
|
382
|
+
imports: [ButtonComponent],
|
|
383
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
384
|
+
host: {
|
|
385
|
+
'[class]': 'hostClasses()',
|
|
386
|
+
},
|
|
387
|
+
template: `
|
|
388
|
+
<div class="flex flex-col gap-4 p-4">
|
|
389
|
+
@if (hasUserHeader()) {
|
|
390
|
+
<header class="flex items-center gap-3 px-1 pt-1">
|
|
391
|
+
<span class="flex size-14 items-center justify-center rounded-full bg-primary/10 text-primary">
|
|
392
|
+
<span
|
|
393
|
+
class="flex size-11 items-center justify-center rounded-full bg-primary text-xs font-semibold tracking-[0.22em] text-primary-foreground">
|
|
394
|
+
{{ resolvedUserInitials() }}
|
|
395
|
+
</span>
|
|
396
|
+
</span>
|
|
397
|
+
|
|
398
|
+
<div class="min-w-0 flex-1">
|
|
399
|
+
<h2 class="truncate text-[1.05rem] font-semibold leading-none tracking-tight text-foreground">
|
|
400
|
+
{{ userName() }}
|
|
401
|
+
</h2>
|
|
402
|
+
@if (userSubtitle(); as subtitle) {
|
|
403
|
+
<p class="mt-1 text-sm leading-none text-muted-foreground">{{ subtitle }}</p>
|
|
404
|
+
}
|
|
405
|
+
</div>
|
|
406
|
+
</header>
|
|
407
|
+
} @else {
|
|
408
|
+
<header class="space-y-1 px-1 pt-1">
|
|
409
|
+
<h2 class="text-base font-semibold tracking-tight text-foreground">{{ title() }}</h2>
|
|
410
|
+
@if (description(); as text) {
|
|
411
|
+
<p class="text-sm leading-6 text-muted-foreground">{{ text }}</p>
|
|
412
|
+
}
|
|
413
|
+
</header>
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
<div class="grid gap-4">
|
|
417
|
+
<section data-setting="theme-mode" [attr.data-current]="currentThemeMode()" class="space-y-2">
|
|
418
|
+
<div class="px-1">
|
|
419
|
+
<p [class]="sectionEyebrowClasses()">Mode</p>
|
|
420
|
+
</div>
|
|
421
|
+
|
|
422
|
+
<div class="rounded-(--layout-frame-radius) bg-muted/65 p-0.5">
|
|
423
|
+
<div class="grid grid-cols-3 gap-1" role="group" aria-label="Theme mode">
|
|
424
|
+
@for (option of themeModeOptions; track option.value) {
|
|
425
|
+
<button
|
|
426
|
+
type="button"
|
|
427
|
+
ui-button
|
|
428
|
+
size="sm"
|
|
429
|
+
variant="ghost"
|
|
430
|
+
data-setting-option="theme-mode"
|
|
431
|
+
[attr.data-value]="option.value"
|
|
432
|
+
[attr.aria-pressed]="currentThemeMode() === option.value"
|
|
433
|
+
[class]="segmentedOptionClasses(currentThemeMode() === option.value)"
|
|
434
|
+
(click)="setThemeMode(option.value)">
|
|
435
|
+
<span class="inline-flex items-center gap-2.5">
|
|
436
|
+
<span
|
|
437
|
+
aria-hidden="true"
|
|
438
|
+
[class]="optionIconClasses(currentThemeMode() === option.value)"
|
|
439
|
+
[innerHTML]="iconSvg(option.icon!)"></span>
|
|
440
|
+
<span class="text-sm font-semibold leading-none">{{ option.label }}</span>
|
|
441
|
+
</span>
|
|
442
|
+
</button>
|
|
443
|
+
}
|
|
444
|
+
</div>
|
|
445
|
+
</div>
|
|
446
|
+
</section>
|
|
447
|
+
|
|
448
|
+
<section data-setting="theme-color" [attr.data-current]="currentThemeColor()" class="space-y-2">
|
|
449
|
+
<div class="flex items-center justify-between gap-3 px-1">
|
|
450
|
+
<p [class]="sectionEyebrowClasses()">Color</p>
|
|
451
|
+
<p class="text-xs font-semibold text-muted-foreground">{{ currentThemeColorLabel() }}</p>
|
|
452
|
+
</div>
|
|
453
|
+
|
|
454
|
+
<div class="rounded-(--layout-frame-radius) bg-muted/65 p-1">
|
|
455
|
+
<div class="grid grid-cols-6 justify-items-center gap-1" role="group" aria-label="Theme color">
|
|
456
|
+
@for (option of themeColorOptions; track option.value) {
|
|
457
|
+
<button
|
|
458
|
+
type="button"
|
|
459
|
+
ui-button
|
|
460
|
+
size="icon"
|
|
461
|
+
variant="ghost"
|
|
462
|
+
data-setting-option="theme-color"
|
|
463
|
+
[attr.data-value]="option.value"
|
|
464
|
+
[attr.aria-label]="'Theme color ' + option.label"
|
|
465
|
+
[attr.aria-pressed]="currentThemeColor() === option.value"
|
|
466
|
+
[class]="swatchButtonClasses(currentThemeColor() === option.value)"
|
|
467
|
+
(click)="setThemeColor(option.value)">
|
|
468
|
+
<span
|
|
469
|
+
aria-hidden="true"
|
|
470
|
+
[class]="colorSwatchClasses(option.swatchClass, currentThemeColor() === option.value)"></span>
|
|
471
|
+
<span class="sr-only">{{ option.label }}</span>
|
|
472
|
+
</button>
|
|
473
|
+
}
|
|
474
|
+
</div>
|
|
475
|
+
</div>
|
|
476
|
+
</section>
|
|
477
|
+
|
|
478
|
+
<section data-setting="theme-style" [attr.data-current]="currentThemeStyle()" class="space-y-2">
|
|
479
|
+
<div class="px-1">
|
|
480
|
+
<p [class]="sectionEyebrowClasses()">Style</p>
|
|
481
|
+
</div>
|
|
482
|
+
|
|
483
|
+
<div class="rounded-(--layout-frame-radius) bg-muted/65 p-0.5">
|
|
484
|
+
<div class="grid grid-cols-2 gap-1 sm:grid-cols-4" role="group" aria-label="Theme style">
|
|
485
|
+
@for (option of themeStyleOptions; track option.value) {
|
|
486
|
+
<button
|
|
487
|
+
type="button"
|
|
488
|
+
ui-button
|
|
489
|
+
size="sm"
|
|
490
|
+
variant="ghost"
|
|
491
|
+
data-setting-option="theme-style"
|
|
492
|
+
[attr.data-value]="option.value"
|
|
493
|
+
[attr.aria-pressed]="currentThemeStyle() === option.value"
|
|
494
|
+
[class]="segmentedOptionClasses(currentThemeStyle() === option.value)"
|
|
495
|
+
(click)="setThemeStyle(option.value)">
|
|
496
|
+
<span class="inline-flex items-center gap-2.5">
|
|
497
|
+
<span
|
|
498
|
+
aria-hidden="true"
|
|
499
|
+
[class]="optionIconClasses(currentThemeStyle() === option.value)"
|
|
500
|
+
[innerHTML]="iconSvg(option.icon!)"></span>
|
|
501
|
+
<span class="text-sm font-semibold leading-none">{{ option.label }}</span>
|
|
502
|
+
</span>
|
|
503
|
+
</button>
|
|
504
|
+
}
|
|
505
|
+
</div>
|
|
506
|
+
</div>
|
|
507
|
+
</section>
|
|
508
|
+
|
|
509
|
+
<section data-setting="layout-mode" [attr.data-current]="currentLayoutMode()" class="space-y-2">
|
|
510
|
+
<div class="px-1">
|
|
511
|
+
<p [class]="sectionEyebrowClasses()">Layout</p>
|
|
512
|
+
</div>
|
|
513
|
+
|
|
514
|
+
<div class="rounded-(--layout-frame-radius) bg-muted/65 p-0.5">
|
|
515
|
+
<div class="grid grid-cols-3 gap-1" role="group" aria-label="Layout mode">
|
|
516
|
+
@for (option of layoutModeOptions; track option.value) {
|
|
517
|
+
<button
|
|
518
|
+
type="button"
|
|
519
|
+
ui-button
|
|
520
|
+
size="sm"
|
|
521
|
+
variant="ghost"
|
|
522
|
+
data-setting-option="layout-mode"
|
|
523
|
+
[attr.data-value]="option.value"
|
|
524
|
+
[attr.aria-pressed]="currentLayoutMode() === option.value"
|
|
525
|
+
[class]="segmentedOptionClasses(currentLayoutMode() === option.value)"
|
|
526
|
+
(click)="setLayoutMode(option.value)">
|
|
527
|
+
<span class="inline-flex items-center gap-2.5">
|
|
528
|
+
<span
|
|
529
|
+
aria-hidden="true"
|
|
530
|
+
[class]="optionIconClasses(currentLayoutMode() === option.value)"
|
|
531
|
+
[innerHTML]="iconSvg(option.icon!)"></span>
|
|
532
|
+
<span class="text-sm font-semibold leading-none">{{ option.label }}</span>
|
|
533
|
+
</span>
|
|
534
|
+
</button>
|
|
535
|
+
}
|
|
536
|
+
</div>
|
|
537
|
+
</div>
|
|
538
|
+
</section>
|
|
539
|
+
|
|
540
|
+
<section data-setting="layout-width" [attr.data-current]="currentLayoutWidth()" class="space-y-2">
|
|
541
|
+
<div class="px-1">
|
|
542
|
+
<p [class]="sectionEyebrowClasses()">Width</p>
|
|
543
|
+
</div>
|
|
544
|
+
|
|
545
|
+
<div class="rounded-(--layout-frame-radius) bg-muted/65 p-0.5">
|
|
546
|
+
<div class="grid grid-cols-3 gap-1" role="group" aria-label="Layout width">
|
|
547
|
+
@for (option of layoutWidthOptions; track option.value) {
|
|
548
|
+
<button
|
|
549
|
+
type="button"
|
|
550
|
+
ui-button
|
|
551
|
+
size="sm"
|
|
552
|
+
variant="ghost"
|
|
553
|
+
data-setting-option="layout-width"
|
|
554
|
+
[attr.data-value]="option.value"
|
|
555
|
+
[attr.aria-pressed]="currentLayoutWidth() === option.value"
|
|
556
|
+
[class]="segmentedOptionClasses(currentLayoutWidth() === option.value)"
|
|
557
|
+
(click)="setLayoutWidth(option.value)">
|
|
558
|
+
<span class="inline-flex items-center gap-2.5">
|
|
559
|
+
<span
|
|
560
|
+
aria-hidden="true"
|
|
561
|
+
[class]="optionIconClasses(currentLayoutWidth() === option.value)"
|
|
562
|
+
[innerHTML]="iconSvg(option.icon!)"></span>
|
|
563
|
+
<span class="text-sm font-semibold leading-none">{{ option.label }}</span>
|
|
564
|
+
</span>
|
|
565
|
+
</button>
|
|
566
|
+
}
|
|
567
|
+
</div>
|
|
568
|
+
</div>
|
|
569
|
+
</section>
|
|
570
|
+
</div>
|
|
571
|
+
</div>
|
|
572
|
+
`,
|
|
573
|
+
}]
|
|
574
|
+
}], ctorParameters: () => [], propDecorators: { connected: [{ type: i0.Input, args: [{ isSignal: true, alias: "connected", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], userName: [{ type: i0.Input, args: [{ isSignal: true, alias: "userName", required: false }] }], userSubtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "userSubtitle", required: false }] }], userInitials: [{ type: i0.Input, args: [{ isSignal: true, alias: "userInitials", required: false }] }], themeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "themeColor", required: false }] }], themeMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "themeMode", required: false }] }], themeStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "themeStyle", required: false }] }], layoutMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "layoutMode", required: false }] }], layoutWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "layoutWidth", required: false }] }], themeColorChange: [{ type: i0.Output, args: ["themeColorChange"] }], themeModeChange: [{ type: i0.Output, args: ["themeModeChange"] }], themeStyleChange: [{ type: i0.Output, args: ["themeStyleChange"] }], layoutModeChange: [{ type: i0.Output, args: ["layoutModeChange"] }], layoutWidthChange: [{ type: i0.Output, args: ["layoutWidthChange"] }] } });
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Generated bundle index. Do not edit.
|
|
578
|
+
*/
|
|
579
|
+
|
|
580
|
+
export { THEME_PANEL_LAYOUT_PORT, THEME_PANEL_THEME_PORT, ThemePanelComponent };
|
|
581
|
+
//# sourceMappingURL=ojiepermana-angular-layout-theme.mjs.map
|