@ojiepermana/angular 22.2.3 → 22.2.5
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-navigation-navigation-badge-count.component-4RIokl1C.mjs → ojiepermana-angular-navigation-navigation-badge-count.component-BYN_Vxm3.mjs} +36 -5
- package/fesm2022/{ojiepermana-angular-navigation-navigation-dockbar-menu.component-I-ln7fOq.mjs → ojiepermana-angular-navigation-navigation-dockbar-menu.component-Dlyt6eZr.mjs} +47 -34
- package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-meQb_EWZ.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-DeF_s1vE.mjs} +35 -20
- package/fesm2022/{ojiepermana-angular-navigation-navigation-flyout-menu.component-DRdw2G-c.mjs → ojiepermana-angular-navigation-navigation-flyout-menu.component-BOGL8MY0.mjs} +23 -4
- package/fesm2022/{ojiepermana-angular-navigation-navigation-horizontal.component-Bx1NcrWO.mjs → ojiepermana-angular-navigation-navigation-horizontal.component-Cb4bHM58.mjs} +29 -4
- package/fesm2022/{ojiepermana-angular-navigation-navigation-item.component-ERZNpmTZ.mjs → ojiepermana-angular-navigation-navigation-item.component-DLgcJQOC.mjs} +351 -108
- package/fesm2022/{ojiepermana-angular-navigation-navigation-list.component-DfG6_3eF.mjs → ojiepermana-angular-navigation-navigation-list.component-BYc3WCt8.mjs} +23 -3
- package/fesm2022/ojiepermana-angular-navigation.mjs +67 -17
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +152 -109
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +216 -79
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +4 -0
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +4 -0
- package/navigation/README.md +92 -3
- package/package.json +2 -2
- package/theme/component/settings/README.md +19 -0
- package/theme/layout/README.md +67 -0
- package/theme/styles/css/base/components.css +20 -0
- package/theme/styles/css/base/tokens.css +6 -0
- package/types/ojiepermana-angular-navigation-types.d.ts +3 -3
- package/types/ojiepermana-angular-navigation.d.ts +16 -0
- package/types/ojiepermana-angular-theme-component-settings.d.ts +18 -1
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +125 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { Component, InjectionToken, PLATFORM_ID, Service, computed, effect, inject, input, model, signal } from "@angular/core";
|
|
2
|
+
import { Component, InjectionToken, PLATFORM_ID, Service, booleanAttribute, computed, effect, inject, input, model, signal } from "@angular/core";
|
|
3
3
|
import { LucideAppWindow, LucideAppWindowMac, LucideBot, LucideBraces, LucideChevronsLeft, LucideCircle, LucideColumns3, LucideCpu, LucideDropletOff, LucideEarth, LucideExternalLink, LucideGalleryVertical, LucideGlobe, LucideGrid3x3, LucideHexagon, LucideLaptop, LucideLaptopMinimal, LucideLayoutGrid, LucideMaximize, LucideMenu, LucideMinimize, LucideMonitor, LucideMoon, LucideMoveHorizontal, LucidePalette, LucidePanelLeft, LucidePanelLeftClose, LucidePanelLeftDashed, LucidePanelLeftOpen, LucidePanelRight, LucideRatio, LucideRows2, LucideRows3, LucideRows4, LucideScan, LucideSlidersHorizontal, LucideSmartphone, LucideSquare, LucideSquareRoundCorner, LucideStretchHorizontal, LucideSun, LucideTablet, LucideTerminal, LucideUnfoldHorizontal } from "@lucide/angular";
|
|
4
4
|
import { DrawerCloseDirective, DrawerComponent, DrawerContentComponent, DrawerHeaderComponent, DrawerTitleComponent } from "@ojiepermana/angular/component/drawer";
|
|
5
5
|
import { IconComponent, provideIcons } from "@ojiepermana/angular/component/icon";
|
|
@@ -1187,6 +1187,8 @@ var ThemeSettingsThemeSectionComponent = class ThemeSettingsThemeSectionComponen
|
|
|
1187
1187
|
neutralLabelId = injectUniqueId("theme-settings-neutral");
|
|
1188
1188
|
spaceLabelId = injectUniqueId("theme-settings-space");
|
|
1189
1189
|
radiusLabelId = injectUniqueId("theme-settings-radius");
|
|
1190
|
+
accentGroupName = injectUniqueId("theme-settings-accent-group");
|
|
1191
|
+
neutralGroupName = injectUniqueId("theme-settings-neutral-group");
|
|
1190
1192
|
swatchClasses(active) {
|
|
1191
1193
|
return cn("inline-flex size-[18px] rounded-full ring-1 ring-black/10 transition-[transform,box-shadow] duration-normal peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background motion-reduce:transition-none", active ? "ring-2 ring-ring ring-offset-2 ring-offset-background shadow-sm" : "hover:scale-105");
|
|
1192
1194
|
}
|
|
@@ -1266,7 +1268,7 @@ var ThemeSettingsThemeSectionComponent = class ThemeSettingsThemeSectionComponen
|
|
|
1266
1268
|
><input
|
|
1267
1269
|
class="peer sr-only"
|
|
1268
1270
|
type="radio"
|
|
1269
|
-
name="
|
|
1271
|
+
[name]="accentGroupName"
|
|
1270
1272
|
[value]="accent"
|
|
1271
1273
|
[checked]="color() === accent"
|
|
1272
1274
|
(change)="setColor(accent)"
|
|
@@ -1288,7 +1290,7 @@ var ThemeSettingsThemeSectionComponent = class ThemeSettingsThemeSectionComponen
|
|
|
1288
1290
|
><input
|
|
1289
1291
|
class="peer sr-only"
|
|
1290
1292
|
type="radio"
|
|
1291
|
-
name="
|
|
1293
|
+
[name]="neutralGroupName"
|
|
1292
1294
|
[value]="neutral"
|
|
1293
1295
|
[checked]="neutralColor() === neutral"
|
|
1294
1296
|
(change)="setNeutral(neutral)"
|
|
@@ -1393,7 +1395,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1393
1395
|
><input
|
|
1394
1396
|
class="peer sr-only"
|
|
1395
1397
|
type="radio"
|
|
1396
|
-
name="
|
|
1398
|
+
[name]="accentGroupName"
|
|
1397
1399
|
[value]="accent"
|
|
1398
1400
|
[checked]="color() === accent"
|
|
1399
1401
|
(change)="setColor(accent)"
|
|
@@ -1415,7 +1417,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1415
1417
|
><input
|
|
1416
1418
|
class="peer sr-only"
|
|
1417
1419
|
type="radio"
|
|
1418
|
-
name="
|
|
1420
|
+
[name]="neutralGroupName"
|
|
1419
1421
|
[value]="neutral"
|
|
1420
1422
|
[checked]="neutralColor() === neutral"
|
|
1421
1423
|
(change)="setNeutral(neutral)"
|
|
@@ -1458,6 +1460,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1458
1460
|
var ThemeSettingsComponent = class ThemeSettingsComponent {
|
|
1459
1461
|
settings = inject(THEME_SETTINGS_ADAPTER, { optional: true });
|
|
1460
1462
|
open = model(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
|
|
1463
|
+
inline = input(false, {
|
|
1464
|
+
...ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {},
|
|
1465
|
+
transform: booleanAttribute
|
|
1466
|
+
});
|
|
1461
1467
|
trigger = input("button", ...ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []);
|
|
1462
1468
|
triggerLabel = input("Theme settings", ...ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []);
|
|
1463
1469
|
triggerIconOnly = input(false, {
|
|
@@ -1496,6 +1502,13 @@ var ThemeSettingsComponent = class ThemeSettingsComponent {
|
|
|
1496
1502
|
isRequired: false,
|
|
1497
1503
|
transformFunction: null
|
|
1498
1504
|
},
|
|
1505
|
+
inline: {
|
|
1506
|
+
classPropertyName: "inline",
|
|
1507
|
+
publicName: "inline",
|
|
1508
|
+
isSignal: true,
|
|
1509
|
+
isRequired: false,
|
|
1510
|
+
transformFunction: null
|
|
1511
|
+
},
|
|
1499
1512
|
trigger: {
|
|
1500
1513
|
classPropertyName: "trigger",
|
|
1501
1514
|
publicName: "trigger",
|
|
@@ -1544,63 +1557,74 @@ var ThemeSettingsComponent = class ThemeSettingsComponent {
|
|
|
1544
1557
|
providers: [provideIcons(LucidePalette)],
|
|
1545
1558
|
ngImport: i0,
|
|
1546
1559
|
template: `
|
|
1547
|
-
@if (
|
|
1548
|
-
<
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
[attr.aria-expanded]="open()"
|
|
1555
|
-
(click)="open.set(true)"
|
|
1556
|
-
>
|
|
1557
|
-
<Icon name="palette" [size]="18" />
|
|
1558
|
-
@if (triggerIconOnly()) {
|
|
1559
|
-
<span class="sr-only">{{ triggerLabel() }}</span>
|
|
1560
|
-
} @else {
|
|
1561
|
-
<span>{{ triggerLabel() }}</span>
|
|
1560
|
+
@if (inline()) {
|
|
1561
|
+
<div data-theme-settings-inline class="flex flex-col gap-8">
|
|
1562
|
+
<ThemeSettingsThemeSection />
|
|
1563
|
+
<ThemeSettingsShellSection />
|
|
1564
|
+
@if (settings) {
|
|
1565
|
+
<ThemeSettingsLayoutSection />
|
|
1566
|
+
<ThemeSettingsNavigationSection />
|
|
1562
1567
|
}
|
|
1563
|
-
</
|
|
1564
|
-
}
|
|
1568
|
+
</div>
|
|
1569
|
+
} @else {
|
|
1570
|
+
@if (showTrigger()) {
|
|
1571
|
+
<button
|
|
1572
|
+
type="button"
|
|
1573
|
+
[class]="triggerClasses()"
|
|
1574
|
+
[attr.aria-label]="triggerIconOnly() ? triggerLabel() : null"
|
|
1575
|
+
[attr.title]="triggerIconOnly() ? triggerLabel() : null"
|
|
1576
|
+
aria-haspopup="dialog"
|
|
1577
|
+
[attr.aria-expanded]="open()"
|
|
1578
|
+
(click)="open.set(true)"
|
|
1579
|
+
>
|
|
1580
|
+
<Icon name="palette" [size]="18" />
|
|
1581
|
+
@if (triggerIconOnly()) {
|
|
1582
|
+
<span class="sr-only">{{ triggerLabel() }}</span>
|
|
1583
|
+
} @else {
|
|
1584
|
+
<span>{{ triggerLabel() }}</span>
|
|
1585
|
+
}
|
|
1586
|
+
</button>
|
|
1587
|
+
}
|
|
1565
1588
|
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
>
|
|
1573
|
-
<DrawerHeader
|
|
1574
|
-
class="flex h-(--layout-topbar-height) shrink-0 flex-row items-center gap-3 border-b border-border bg-background px-3 text-left"
|
|
1589
|
+
@if (open()) {
|
|
1590
|
+
<Drawer
|
|
1591
|
+
[(open)]="open"
|
|
1592
|
+
[side]="side()"
|
|
1593
|
+
[showCloseButton]="false"
|
|
1594
|
+
class="ThemeSettings w-full max-w-md gap-0! p-0! sm:w-100"
|
|
1575
1595
|
>
|
|
1576
|
-
<
|
|
1577
|
-
|
|
1578
|
-
class="grid size-8 shrink-0 place-items-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/20"
|
|
1579
|
-
><Icon name="palette" [size]="18"
|
|
1580
|
-
/></span>
|
|
1581
|
-
<div class="min-w-0 flex-1">
|
|
1582
|
-
<DrawerTitle>Theme settings</DrawerTitle>
|
|
1583
|
-
</div>
|
|
1584
|
-
<button
|
|
1585
|
-
type="button"
|
|
1586
|
-
DrawerClose
|
|
1587
|
-
class="inline-flex h-8 shrink-0 items-center rounded-md bg-primary px-2 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:transition-none"
|
|
1596
|
+
<DrawerHeader
|
|
1597
|
+
class="flex h-(--layout-topbar-height) shrink-0 flex-row items-center gap-3 border-b border-border bg-background px-3 text-left"
|
|
1588
1598
|
>
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1599
|
+
<span
|
|
1600
|
+
aria-hidden="true"
|
|
1601
|
+
class="grid size-8 shrink-0 place-items-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/20"
|
|
1602
|
+
><Icon name="palette" [size]="18"
|
|
1603
|
+
/></span>
|
|
1604
|
+
<div class="min-w-0 flex-1">
|
|
1605
|
+
<DrawerTitle>Theme settings</DrawerTitle>
|
|
1606
|
+
</div>
|
|
1607
|
+
<button
|
|
1608
|
+
type="button"
|
|
1609
|
+
DrawerClose
|
|
1610
|
+
class="inline-flex h-8 shrink-0 items-center rounded-md bg-primary px-2 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:transition-none"
|
|
1611
|
+
>
|
|
1612
|
+
Done
|
|
1613
|
+
</button>
|
|
1614
|
+
</DrawerHeader>
|
|
1592
1615
|
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1616
|
+
<DrawerContent class="min-h-0 px-4 py-5 sm:px-5">
|
|
1617
|
+
<div class="flex flex-col gap-8">
|
|
1618
|
+
<ThemeSettingsThemeSection />
|
|
1619
|
+
<ThemeSettingsShellSection />
|
|
1620
|
+
@if (settings) {
|
|
1621
|
+
<ThemeSettingsLayoutSection />
|
|
1622
|
+
<ThemeSettingsNavigationSection />
|
|
1623
|
+
}
|
|
1624
|
+
</div>
|
|
1625
|
+
</DrawerContent>
|
|
1626
|
+
</Drawer>
|
|
1627
|
+
}
|
|
1604
1628
|
}
|
|
1605
1629
|
`,
|
|
1606
1630
|
isInline: true,
|
|
@@ -1708,63 +1732,74 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1708
1732
|
],
|
|
1709
1733
|
host: { class: "contents" },
|
|
1710
1734
|
template: `
|
|
1711
|
-
@if (
|
|
1712
|
-
<
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
[attr.aria-expanded]="open()"
|
|
1719
|
-
(click)="open.set(true)"
|
|
1720
|
-
>
|
|
1721
|
-
<Icon name="palette" [size]="18" />
|
|
1722
|
-
@if (triggerIconOnly()) {
|
|
1723
|
-
<span class="sr-only">{{ triggerLabel() }}</span>
|
|
1724
|
-
} @else {
|
|
1725
|
-
<span>{{ triggerLabel() }}</span>
|
|
1735
|
+
@if (inline()) {
|
|
1736
|
+
<div data-theme-settings-inline class="flex flex-col gap-8">
|
|
1737
|
+
<ThemeSettingsThemeSection />
|
|
1738
|
+
<ThemeSettingsShellSection />
|
|
1739
|
+
@if (settings) {
|
|
1740
|
+
<ThemeSettingsLayoutSection />
|
|
1741
|
+
<ThemeSettingsNavigationSection />
|
|
1726
1742
|
}
|
|
1727
|
-
</
|
|
1728
|
-
}
|
|
1743
|
+
</div>
|
|
1744
|
+
} @else {
|
|
1745
|
+
@if (showTrigger()) {
|
|
1746
|
+
<button
|
|
1747
|
+
type="button"
|
|
1748
|
+
[class]="triggerClasses()"
|
|
1749
|
+
[attr.aria-label]="triggerIconOnly() ? triggerLabel() : null"
|
|
1750
|
+
[attr.title]="triggerIconOnly() ? triggerLabel() : null"
|
|
1751
|
+
aria-haspopup="dialog"
|
|
1752
|
+
[attr.aria-expanded]="open()"
|
|
1753
|
+
(click)="open.set(true)"
|
|
1754
|
+
>
|
|
1755
|
+
<Icon name="palette" [size]="18" />
|
|
1756
|
+
@if (triggerIconOnly()) {
|
|
1757
|
+
<span class="sr-only">{{ triggerLabel() }}</span>
|
|
1758
|
+
} @else {
|
|
1759
|
+
<span>{{ triggerLabel() }}</span>
|
|
1760
|
+
}
|
|
1761
|
+
</button>
|
|
1762
|
+
}
|
|
1729
1763
|
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
>
|
|
1737
|
-
<DrawerHeader
|
|
1738
|
-
class="flex h-(--layout-topbar-height) shrink-0 flex-row items-center gap-3 border-b border-border bg-background px-3 text-left"
|
|
1764
|
+
@if (open()) {
|
|
1765
|
+
<Drawer
|
|
1766
|
+
[(open)]="open"
|
|
1767
|
+
[side]="side()"
|
|
1768
|
+
[showCloseButton]="false"
|
|
1769
|
+
class="ThemeSettings w-full max-w-md gap-0! p-0! sm:w-100"
|
|
1739
1770
|
>
|
|
1740
|
-
<
|
|
1741
|
-
|
|
1742
|
-
class="grid size-8 shrink-0 place-items-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/20"
|
|
1743
|
-
><Icon name="palette" [size]="18"
|
|
1744
|
-
/></span>
|
|
1745
|
-
<div class="min-w-0 flex-1">
|
|
1746
|
-
<DrawerTitle>Theme settings</DrawerTitle>
|
|
1747
|
-
</div>
|
|
1748
|
-
<button
|
|
1749
|
-
type="button"
|
|
1750
|
-
DrawerClose
|
|
1751
|
-
class="inline-flex h-8 shrink-0 items-center rounded-md bg-primary px-2 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:transition-none"
|
|
1771
|
+
<DrawerHeader
|
|
1772
|
+
class="flex h-(--layout-topbar-height) shrink-0 flex-row items-center gap-3 border-b border-border bg-background px-3 text-left"
|
|
1752
1773
|
>
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1774
|
+
<span
|
|
1775
|
+
aria-hidden="true"
|
|
1776
|
+
class="grid size-8 shrink-0 place-items-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/20"
|
|
1777
|
+
><Icon name="palette" [size]="18"
|
|
1778
|
+
/></span>
|
|
1779
|
+
<div class="min-w-0 flex-1">
|
|
1780
|
+
<DrawerTitle>Theme settings</DrawerTitle>
|
|
1781
|
+
</div>
|
|
1782
|
+
<button
|
|
1783
|
+
type="button"
|
|
1784
|
+
DrawerClose
|
|
1785
|
+
class="inline-flex h-8 shrink-0 items-center rounded-md bg-primary px-2 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:transition-none"
|
|
1786
|
+
>
|
|
1787
|
+
Done
|
|
1788
|
+
</button>
|
|
1789
|
+
</DrawerHeader>
|
|
1756
1790
|
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1791
|
+
<DrawerContent class="min-h-0 px-4 py-5 sm:px-5">
|
|
1792
|
+
<div class="flex flex-col gap-8">
|
|
1793
|
+
<ThemeSettingsThemeSection />
|
|
1794
|
+
<ThemeSettingsShellSection />
|
|
1795
|
+
@if (settings) {
|
|
1796
|
+
<ThemeSettingsLayoutSection />
|
|
1797
|
+
<ThemeSettingsNavigationSection />
|
|
1798
|
+
}
|
|
1799
|
+
</div>
|
|
1800
|
+
</DrawerContent>
|
|
1801
|
+
</Drawer>
|
|
1802
|
+
}
|
|
1768
1803
|
}
|
|
1769
1804
|
`
|
|
1770
1805
|
}]
|
|
@@ -1781,6 +1816,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1781
1816
|
type: i0.Output,
|
|
1782
1817
|
args: ["openChange"]
|
|
1783
1818
|
}],
|
|
1819
|
+
inline: [{
|
|
1820
|
+
type: i0.Input,
|
|
1821
|
+
args: [{
|
|
1822
|
+
isSignal: true,
|
|
1823
|
+
alias: "inline",
|
|
1824
|
+
required: false
|
|
1825
|
+
}]
|
|
1826
|
+
}],
|
|
1784
1827
|
trigger: [{
|
|
1785
1828
|
type: i0.Input,
|
|
1786
1829
|
args: [{
|