orbiq-neural-ui-kit 0.0.6 → 0.0.7
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.
|
@@ -1844,6 +1844,8 @@ class NeuralDropdownComponent {
|
|
|
1844
1844
|
hasTriggerSlot = input(false, /* @ts-ignore */
|
|
1845
1845
|
...(ngDevMode ? [{ debugName: "hasTriggerSlot" }] : /* istanbul ignore next */ []));
|
|
1846
1846
|
handleItemClick(option, event, popover) {
|
|
1847
|
+
if ('separator' in option)
|
|
1848
|
+
return;
|
|
1847
1849
|
if (option.disabled)
|
|
1848
1850
|
return;
|
|
1849
1851
|
if (option.onClick) {
|
|
@@ -1866,33 +1868,37 @@ class NeuralDropdownComponent {
|
|
|
1866
1868
|
@if (options().length === 0) {
|
|
1867
1869
|
<div class="p-2 text-sm text-ink-gray-5">No options</div>
|
|
1868
1870
|
} @else {
|
|
1869
|
-
@for (option of options(); track
|
|
1870
|
-
@if (option
|
|
1871
|
-
<
|
|
1872
|
-
[routerLink]="option.route"
|
|
1873
|
-
(click)="handleItemClick(option, $event, popover)"
|
|
1874
|
-
class="flex items-center gap-2 px-2 py-1.5 text-sm rounded-4 text-ink-gray-9 hover:bg-surface-gray-2 cursor-pointer transition-colors"
|
|
1875
|
-
[class.opacity-50]="option.disabled"
|
|
1876
|
-
[class.pointer-events-none]="option.disabled"
|
|
1877
|
-
>
|
|
1878
|
-
@if (option.icon) {
|
|
1879
|
-
<i [class]="option.icon" class="size-4 text-ink-gray-5"></i>
|
|
1880
|
-
}
|
|
1881
|
-
{{ option.label }}
|
|
1882
|
-
</a>
|
|
1871
|
+
@for (option of options(); track $index) {
|
|
1872
|
+
@if ('separator' in option) {
|
|
1873
|
+
<div class="h-px bg-outline-gray-2 my-1 mx-1"></div>
|
|
1883
1874
|
} @else {
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1875
|
+
@if (option.route) {
|
|
1876
|
+
<a
|
|
1877
|
+
[routerLink]="option.route"
|
|
1878
|
+
(click)="handleItemClick(option, $event, popover)"
|
|
1879
|
+
class="flex items-center gap-2 px-2 py-1.5 text-sm rounded-4 text-ink-gray-9 hover:bg-surface-gray-2 cursor-pointer transition-colors"
|
|
1880
|
+
[class.opacity-50]="option.disabled"
|
|
1881
|
+
[class.pointer-events-none]="option.disabled"
|
|
1882
|
+
>
|
|
1883
|
+
@if (option.icon) {
|
|
1884
|
+
<i [class]="option.icon" class="size-4 text-ink-gray-5"></i>
|
|
1885
|
+
}
|
|
1886
|
+
{{ option.label }}
|
|
1887
|
+
</a>
|
|
1888
|
+
} @else {
|
|
1889
|
+
<button
|
|
1890
|
+
(click)="handleItemClick(option, $event, popover)"
|
|
1891
|
+
class="flex items-center gap-2 px-2 py-1.5 text-sm rounded-4 text-ink-gray-9 hover:bg-surface-gray-2 cursor-pointer transition-colors text-left w-full"
|
|
1892
|
+
[disabled]="option.disabled"
|
|
1893
|
+
[class.opacity-50]="option.disabled"
|
|
1894
|
+
[class.cursor-not-allowed]="option.disabled"
|
|
1895
|
+
>
|
|
1896
|
+
@if (option.icon) {
|
|
1897
|
+
<i [class]="option.icon" class="size-4 text-ink-gray-5"></i>
|
|
1898
|
+
}
|
|
1899
|
+
{{ option.label }}
|
|
1900
|
+
</button>
|
|
1901
|
+
}
|
|
1896
1902
|
}
|
|
1897
1903
|
}
|
|
1898
1904
|
}
|
|
@@ -1921,33 +1927,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
1921
1927
|
@if (options().length === 0) {
|
|
1922
1928
|
<div class="p-2 text-sm text-ink-gray-5">No options</div>
|
|
1923
1929
|
} @else {
|
|
1924
|
-
@for (option of options(); track
|
|
1925
|
-
@if (option
|
|
1926
|
-
<
|
|
1927
|
-
[routerLink]="option.route"
|
|
1928
|
-
(click)="handleItemClick(option, $event, popover)"
|
|
1929
|
-
class="flex items-center gap-2 px-2 py-1.5 text-sm rounded-4 text-ink-gray-9 hover:bg-surface-gray-2 cursor-pointer transition-colors"
|
|
1930
|
-
[class.opacity-50]="option.disabled"
|
|
1931
|
-
[class.pointer-events-none]="option.disabled"
|
|
1932
|
-
>
|
|
1933
|
-
@if (option.icon) {
|
|
1934
|
-
<i [class]="option.icon" class="size-4 text-ink-gray-5"></i>
|
|
1935
|
-
}
|
|
1936
|
-
{{ option.label }}
|
|
1937
|
-
</a>
|
|
1930
|
+
@for (option of options(); track $index) {
|
|
1931
|
+
@if ('separator' in option) {
|
|
1932
|
+
<div class="h-px bg-outline-gray-2 my-1 mx-1"></div>
|
|
1938
1933
|
} @else {
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1934
|
+
@if (option.route) {
|
|
1935
|
+
<a
|
|
1936
|
+
[routerLink]="option.route"
|
|
1937
|
+
(click)="handleItemClick(option, $event, popover)"
|
|
1938
|
+
class="flex items-center gap-2 px-2 py-1.5 text-sm rounded-4 text-ink-gray-9 hover:bg-surface-gray-2 cursor-pointer transition-colors"
|
|
1939
|
+
[class.opacity-50]="option.disabled"
|
|
1940
|
+
[class.pointer-events-none]="option.disabled"
|
|
1941
|
+
>
|
|
1942
|
+
@if (option.icon) {
|
|
1943
|
+
<i [class]="option.icon" class="size-4 text-ink-gray-5"></i>
|
|
1944
|
+
}
|
|
1945
|
+
{{ option.label }}
|
|
1946
|
+
</a>
|
|
1947
|
+
} @else {
|
|
1948
|
+
<button
|
|
1949
|
+
(click)="handleItemClick(option, $event, popover)"
|
|
1950
|
+
class="flex items-center gap-2 px-2 py-1.5 text-sm rounded-4 text-ink-gray-9 hover:bg-surface-gray-2 cursor-pointer transition-colors text-left w-full"
|
|
1951
|
+
[disabled]="option.disabled"
|
|
1952
|
+
[class.opacity-50]="option.disabled"
|
|
1953
|
+
[class.cursor-not-allowed]="option.disabled"
|
|
1954
|
+
>
|
|
1955
|
+
@if (option.icon) {
|
|
1956
|
+
<i [class]="option.icon" class="size-4 text-ink-gray-5"></i>
|
|
1957
|
+
}
|
|
1958
|
+
{{ option.label }}
|
|
1959
|
+
</button>
|
|
1960
|
+
}
|
|
1951
1961
|
}
|
|
1952
1962
|
}
|
|
1953
1963
|
}
|