@ojiepermana/angular 22.1.14 → 22.2.1
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 +8 -6
- package/SUPPORT.md +3 -3
- package/chart/README.md +1 -1
- package/component/README.md +2 -2
- package/component/calendar/README.md +3 -15
- package/component/drawer/README.md +1 -2
- package/fesm2022/ojiepermana-angular-chart-area.mjs +352 -137
- package/fesm2022/ojiepermana-angular-chart-bar.mjs +744 -524
- package/fesm2022/ojiepermana-angular-chart-core.mjs +1140 -1344
- package/fesm2022/ojiepermana-angular-chart-line.mjs +393 -147
- package/fesm2022/ojiepermana-angular-chart-pie.mjs +408 -179
- package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1262 -920
- package/fesm2022/ojiepermana-angular-chart-radar.mjs +473 -205
- package/fesm2022/ojiepermana-angular-chart-radial.mjs +425 -182
- package/fesm2022/ojiepermana-angular-chart-scatter.mjs +386 -210
- package/fesm2022/ojiepermana-angular-chart.mjs +3 -19
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +485 -243
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +963 -325
- package/fesm2022/ojiepermana-angular-component-alert.mjs +266 -103
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +80 -35
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +402 -135
- package/fesm2022/ojiepermana-angular-component-badge.mjs +109 -59
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +410 -142
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +249 -96
- package/fesm2022/ojiepermana-angular-component-button.mjs +153 -75
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +531 -418
- package/fesm2022/ojiepermana-angular-component-card.mjs +457 -171
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +642 -272
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +312 -108
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +299 -115
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +396 -183
- package/fesm2022/ojiepermana-angular-component-command.mjs +807 -347
- package/fesm2022/ojiepermana-angular-component-composer.mjs +807 -330
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +196 -161
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +650 -338
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +710 -316
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -5
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +1212 -646
- package/fesm2022/ojiepermana-angular-component-editor.mjs +987 -502
- package/fesm2022/ojiepermana-angular-component-empty.mjs +350 -137
- package/fesm2022/ojiepermana-angular-component-form.mjs +813 -434
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +486 -277
- package/fesm2022/ojiepermana-angular-component-icon.mjs +241 -140
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +449 -176
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +891 -488
- package/fesm2022/ojiepermana-angular-component-input.mjs +86 -55
- package/fesm2022/ojiepermana-angular-component-item.mjs +713 -261
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +714 -216
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +124 -52
- package/fesm2022/ojiepermana-angular-component-label.mjs +82 -31
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +479 -329
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +167 -65
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +683 -380
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +277 -94
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +1283 -607
- package/fesm2022/ojiepermana-angular-component-popover.mjs +291 -204
- package/fesm2022/ojiepermana-angular-component-progress.mjs +176 -53
- package/fesm2022/ojiepermana-angular-component-radio.mjs +449 -142
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +659 -453
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +117 -39
- package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +351 -172
- package/fesm2022/ojiepermana-angular-component-select.mjs +475 -345
- package/fesm2022/ojiepermana-angular-component-separator.mjs +102 -35
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +797 -347
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +62 -29
- package/fesm2022/ojiepermana-angular-component-slider.mjs +592 -376
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +135 -38
- package/fesm2022/ojiepermana-angular-component-switch.mjs +315 -103
- package/fesm2022/ojiepermana-angular-component-table.mjs +440 -153
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +590 -317
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +85 -50
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +609 -231
- package/fesm2022/ojiepermana-angular-component-toast.mjs +229 -243
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +573 -288
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +187 -78
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +798 -517
- package/fesm2022/ojiepermana-angular-component-utils-core.mjs +159 -292
- package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +46 -58
- package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +76 -38
- package/fesm2022/ojiepermana-angular-component-utils.mjs +2 -8
- package/fesm2022/ojiepermana-angular-component.mjs +0 -10
- package/fesm2022/ojiepermana-angular-navigation-core.mjs +13 -23
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +35 -24
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-DYuysKVf.mjs +129 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-COiTaw34.mjs +812 -0
- package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-COQ-60DS.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-YIz0IsIb.mjs} +392 -207
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-D2vwEwBY.mjs +650 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-B5D7yXfb.mjs +662 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-item.component-CUb68MZH.mjs +1219 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-list.component-CrK16trj.mjs +327 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +544 -724
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +139 -56
- package/fesm2022/ojiepermana-angular-navigation.mjs +3256 -4
- package/fesm2022/ojiepermana-angular-sdk.mjs +91 -201
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1125 -737
- package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +245 -328
- package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +35 -38
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1928 -553
- package/fesm2022/ojiepermana-angular-theme-layout.mjs +847 -496
- package/fesm2022/ojiepermana-angular-theme-page-core.mjs +288 -358
- package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +362 -224
- package/fesm2022/ojiepermana-angular-theme-page-overview.mjs +88 -0
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +576 -254
- package/fesm2022/ojiepermana-angular-theme-page-side.mjs +317 -177
- package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +256 -112
- package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -12
- package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +215 -326
- package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +68 -129
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +907 -378
- package/fesm2022/ojiepermana-angular-theme-styles.mjs +521 -720
- package/fesm2022/ojiepermana-angular-theme.mjs +0 -10
- package/fesm2022/ojiepermana-angular.mjs +5 -24
- package/navigation/README.md +69 -18
- package/package.json +16 -12
- package/sdk/README.md +1 -1
- package/sdk/src/writer/index.js +2 -2
- package/theme/README.md +1 -1
- package/theme/layout/README.md +2 -4
- package/theme/page/README.md +50 -0
- package/theme/styles/README.md +10 -10
- package/theme/styles/css/base/prefers-dark.css +1 -1
- package/theme/styles/css/base/status.css +1 -1
- package/theme/styles/css/color/amber.css +1 -1
- package/theme/styles/css/color/blue.css +1 -1
- package/theme/styles/css/color/cyan.css +1 -1
- package/theme/styles/css/color/emerald.css +1 -1
- package/theme/styles/css/color/fuchsia.css +1 -1
- package/theme/styles/css/color/green.css +1 -1
- package/theme/styles/css/color/indigo.css +1 -1
- package/theme/styles/css/color/lime.css +1 -1
- package/theme/styles/css/color/orange.css +1 -1
- package/theme/styles/css/color/pink.css +1 -1
- package/theme/styles/css/color/purple.css +1 -1
- package/theme/styles/css/color/red.css +1 -1
- package/theme/styles/css/color/rose.css +1 -1
- package/theme/styles/css/color/sky.css +1 -1
- package/theme/styles/css/color/teal.css +1 -1
- package/theme/styles/css/color/violet.css +1 -1
- package/theme/styles/css/color/yellow.css +1 -1
- package/theme/styles/css/neutral/gray.css +1 -1
- package/theme/styles/css/neutral/mauve.css +1 -1
- package/theme/styles/css/neutral/mist.css +1 -1
- package/theme/styles/css/neutral/neutral.css +1 -1
- package/theme/styles/css/neutral/olive.css +1 -1
- package/theme/styles/css/neutral/slate.css +1 -1
- package/theme/styles/css/neutral/stone.css +1 -1
- package/theme/styles/css/neutral/taupe.css +1 -1
- package/theme/styles/css/neutral/zinc.css +1 -1
- package/types/ojiepermana-angular-chart-area.d.ts +126 -63
- package/types/ojiepermana-angular-chart-bar.d.ts +244 -154
- package/types/ojiepermana-angular-chart-core.d.ts +409 -398
- package/types/ojiepermana-angular-chart-line.d.ts +141 -68
- package/types/ojiepermana-angular-chart-pie.d.ts +192 -121
- package/types/ojiepermana-angular-chart-primitives.d.ts +283 -214
- package/types/ojiepermana-angular-chart-radar.d.ts +189 -108
- package/types/ojiepermana-angular-chart-radial.d.ts +177 -106
- package/types/ojiepermana-angular-chart-scatter.d.ts +166 -110
- package/types/ojiepermana-angular-chart.d.ts +3 -2
- package/types/ojiepermana-angular-component-accordion.d.ts +135 -81
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +271 -123
- package/types/ojiepermana-angular-component-alert.d.ts +69 -39
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +20 -12
- package/types/ojiepermana-angular-component-avatar.d.ts +103 -49
- package/types/ojiepermana-angular-component-badge.d.ts +36 -24
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +79 -40
- package/types/ojiepermana-angular-component-button-group.d.ts +48 -24
- package/types/ojiepermana-angular-component-button.d.ts +44 -27
- package/types/ojiepermana-angular-component-calendar.d.ts +145 -107
- package/types/ojiepermana-angular-component-card.d.ts +112 -63
- package/types/ojiepermana-angular-component-carousel.d.ts +150 -81
- package/types/ojiepermana-angular-component-checkbox.d.ts +96 -38
- package/types/ojiepermana-angular-component-collapsible.d.ts +65 -39
- package/types/ojiepermana-angular-component-combobox.d.ts +100 -55
- package/types/ojiepermana-angular-component-command.d.ts +206 -121
- package/types/ojiepermana-angular-component-composer.d.ts +184 -84
- package/types/ojiepermana-angular-component-context-menu.d.ts +51 -41
- package/types/ojiepermana-angular-component-date-picker.d.ts +199 -109
- package/types/ojiepermana-angular-component-dialog.d.ts +200 -105
- package/types/ojiepermana-angular-component-drawer.d.ts +2 -1
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +324 -202
- package/types/ojiepermana-angular-component-editor.d.ts +215 -117
- package/types/ojiepermana-angular-component-empty.d.ts +80 -45
- package/types/ojiepermana-angular-component-form.d.ts +185 -121
- package/types/ojiepermana-angular-component-hover-card.d.ts +130 -72
- package/types/ojiepermana-angular-component-icon.d.ts +87 -57
- package/types/ojiepermana-angular-component-input-group.d.ts +93 -46
- package/types/ojiepermana-angular-component-input-otp.d.ts +243 -150
- package/types/ojiepermana-angular-component-input.d.ts +27 -17
- package/types/ojiepermana-angular-component-item.d.ts +160 -84
- package/types/ojiepermana-angular-component-kanban.d.ts +157 -62
- package/types/ojiepermana-angular-component-kbd.d.ts +24 -15
- package/types/ojiepermana-angular-component-label.d.ts +19 -11
- package/types/ojiepermana-angular-component-menubar.d.ts +120 -90
- package/types/ojiepermana-angular-component-native-select.d.ts +37 -24
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +157 -98
- package/types/ojiepermana-angular-component-pagination.d.ts +78 -28
- package/types/ojiepermana-angular-component-pillbox.d.ts +361 -204
- package/types/ojiepermana-angular-component-popover.d.ts +94 -64
- package/types/ojiepermana-angular-component-progress.d.ts +45 -17
- package/types/ojiepermana-angular-component-radio.d.ts +129 -53
- package/types/ojiepermana-angular-component-resizable.d.ts +160 -112
- package/types/ojiepermana-angular-component-scroll-area.d.ts +33 -15
- package/types/ojiepermana-angular-component-segmented-control.d.ts +94 -50
- package/types/ojiepermana-angular-component-select.d.ts +94 -77
- package/types/ojiepermana-angular-component-separator.d.ts +26 -14
- package/types/ojiepermana-angular-component-sheet.d.ts +226 -116
- package/types/ojiepermana-angular-component-skeleton.d.ts +13 -10
- package/types/ojiepermana-angular-component-slider.d.ts +140 -75
- package/types/ojiepermana-angular-component-spinner.d.ts +31 -13
- package/types/ojiepermana-angular-component-switch.d.ts +97 -40
- package/types/ojiepermana-angular-component-table.d.ts +102 -50
- package/types/ojiepermana-angular-component-tabs.d.ts +174 -115
- package/types/ojiepermana-angular-component-textarea.d.ts +27 -17
- package/types/ojiepermana-angular-component-timeline.d.ts +141 -59
- package/types/ojiepermana-angular-component-toast.d.ts +51 -55
- package/types/ojiepermana-angular-component-toggle-group.d.ts +159 -88
- package/types/ojiepermana-angular-component-toggle.d.ts +47 -25
- package/types/ojiepermana-angular-component-tooltip.d.ts +222 -132
- package/types/ojiepermana-angular-component-utils-core.d.ts +81 -90
- package/types/ojiepermana-angular-component-utils-overlay.d.ts +7 -11
- package/types/ojiepermana-angular-component-utils-scale.d.ts +20 -12
- package/types/ojiepermana-angular-component-utils.d.ts +2 -2
- package/types/ojiepermana-angular-component.d.ts +1 -2
- package/types/ojiepermana-angular-navigation-core.d.ts +46 -50
- package/types/ojiepermana-angular-navigation-icon.d.ts +9 -12
- package/types/ojiepermana-angular-navigation-service.d.ts +112 -115
- package/types/ojiepermana-angular-navigation-types.d.ts +166 -125
- package/types/ojiepermana-angular-navigation.d.ts +708 -375
- package/types/ojiepermana-angular-sdk.d.ts +69 -71
- package/types/ojiepermana-angular-theme-component-settings.d.ts +120 -86
- package/types/ojiepermana-angular-theme-layout-services.d.ts +119 -124
- package/types/ojiepermana-angular-theme-layout-types.d.ts +27 -31
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +446 -187
- package/types/ojiepermana-angular-theme-layout.d.ts +201 -113
- package/types/ojiepermana-angular-theme-page-core.d.ts +136 -142
- package/types/ojiepermana-angular-theme-page-filter.d.ts +112 -62
- package/types/ojiepermana-angular-theme-page-overview.d.ts +28 -0
- package/types/ojiepermana-angular-theme-page-root.d.ts +172 -88
- package/types/ojiepermana-angular-theme-page-side.d.ts +89 -49
- package/types/ojiepermana-angular-theme-page-slots.d.ts +58 -37
- package/types/ojiepermana-angular-theme-page.d.ts +7 -5
- package/types/ojiepermana-angular-theme-shell-services.d.ts +119 -125
- package/types/ojiepermana-angular-theme-shell-types.d.ts +38 -41
- package/types/ojiepermana-angular-theme-shell.d.ts +139 -61
- package/types/ojiepermana-angular-theme-styles.d.ts +184 -196
- package/types/ojiepermana-angular-theme.d.ts +1 -2
- package/types/ojiepermana-angular.d.ts +5 -5
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-Be3IqzG4.mjs +0 -91
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-Bc7DWK3R.mjs +0 -522
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-DA8VPEn7.mjs +0 -404
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-U2TJTzlW.mjs +0 -466
- package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-CIUhmytH.mjs +0 -2668
|
@@ -1,314 +1,181 @@
|
|
|
1
|
-
import { clsx } from
|
|
2
|
-
import { twMerge } from
|
|
3
|
-
import { InjectionToken, inject,
|
|
4
|
-
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
import { APP_ID, InjectionToken, inject, signal } from "@angular/core";
|
|
5
4
|
function cn(...inputs) {
|
|
6
|
-
|
|
5
|
+
return twMerge(clsx(inputs));
|
|
7
6
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
* One generator per Angular application injector. Separate SSR requests and a
|
|
24
|
-
* hydrating browser application therefore start from the same deterministic
|
|
25
|
-
* sequence instead of sharing process-global state.
|
|
26
|
-
*/
|
|
27
|
-
const UI_ID_GENERATOR = new InjectionToken('UI_ID_GENERATOR', {
|
|
28
|
-
providedIn: 'root',
|
|
29
|
-
factory: () => new UiIdGenerator(inject(APP_ID)),
|
|
7
|
+
var UiIdGenerator = class {
|
|
8
|
+
counter = 0;
|
|
9
|
+
appInfix;
|
|
10
|
+
constructor(appId = "ng") {
|
|
11
|
+
const safeAppId = appId.replace(/[^a-zA-Z0-9_-]/g, "");
|
|
12
|
+
this.appInfix = appId === "ng" || !safeAppId ? "" : `-${safeAppId}`;
|
|
13
|
+
}
|
|
14
|
+
next(prefix) {
|
|
15
|
+
this.counter += 1;
|
|
16
|
+
return `${prefix}${this.appInfix}-${this.counter}`;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const UI_ID_GENERATOR = new InjectionToken("UI_ID_GENERATOR", {
|
|
20
|
+
providedIn: "root",
|
|
21
|
+
factory: () => new UiIdGenerator(inject(APP_ID))
|
|
30
22
|
});
|
|
31
|
-
/** Generates an id during component/directive construction. */
|
|
32
23
|
function injectUniqueId(prefix) {
|
|
33
|
-
|
|
24
|
+
return inject(UI_ID_GENERATOR).next(prefix);
|
|
34
25
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
return true;
|
|
129
|
-
}
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
|
-
move(currentItem, direction) {
|
|
133
|
-
const enabledItems = this.enabledItems();
|
|
134
|
-
if (enabledItems.length === 0) {
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
const currentIndex = enabledItems.indexOf(currentItem);
|
|
138
|
-
if (currentIndex === -1) {
|
|
139
|
-
enabledItems[0]?.focus();
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
const nextItem = direction === 'start'
|
|
143
|
-
? enabledItems[0]
|
|
144
|
-
: direction === 'end'
|
|
145
|
-
? enabledItems[enabledItems.length - 1]
|
|
146
|
-
: enabledItems[this.nextIndex(currentIndex, direction === 'next' ? this.horizontalStep() : -this.horizontalStep(), enabledItems.length)];
|
|
147
|
-
if (!nextItem || nextItem === currentItem) {
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
this.config.enter(nextItem);
|
|
151
|
-
}
|
|
152
|
-
nextIndex(currentIndex, delta, length) {
|
|
153
|
-
const rawIndex = currentIndex + delta;
|
|
154
|
-
if (this.config.loop()) {
|
|
155
|
-
return (rawIndex + length) % length;
|
|
156
|
-
}
|
|
157
|
-
return Math.max(0, Math.min(length - 1, rawIndex));
|
|
158
|
-
}
|
|
159
|
-
horizontalStep() {
|
|
160
|
-
return getComputedStyle(this.config.host()).direction === 'rtl' ? -1 : 1;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Per-component corner-radius / spacing-density override helpers.
|
|
166
|
-
*
|
|
167
|
-
* These mirror the global `theme-radius` / `theme-space` preset values from
|
|
168
|
-
* `@ojiepermana/angular/theme` — kept as a local copy so this package stays
|
|
169
|
-
* decoupled from the theme package (see its empty peer/deps on -theme).
|
|
170
|
-
*
|
|
171
|
-
* A component that accepts a `radius` / `density` input binds the resolved value
|
|
172
|
-
* onto its surface element via `[style.--radius-base]` / `[style.--spacing-base]`.
|
|
173
|
-
* Tailwind's `rounded-*` utilities resolve `calc(var(--radius-base) * n)` and the
|
|
174
|
-
* spacing utilities resolve `calc(var(--spacing-base) * n)` (see the theme's
|
|
175
|
-
* `base/tailwind.css` `@theme inline` mapping), so the override rescales that
|
|
176
|
-
* subtree and shadows the global `<html theme-radius|theme-space>` axis. The
|
|
177
|
-
* `'inherit'` preset binds nothing, so the component keeps following the axis.
|
|
178
|
-
*/
|
|
179
|
-
/** Corner-radius presets for a per-component `radius` input. */
|
|
180
|
-
const COMPONENT_RADII = ['inherit', 'none', 'xs', 'sm', 'md', 'xl', 'full'];
|
|
181
|
-
/** Spacing-density presets for a per-component `density` input. */
|
|
182
|
-
const COMPONENT_DENSITIES = ['inherit', 'compact', 'normal', 'relaxed', 'spacious'];
|
|
183
|
-
/**
|
|
184
|
-
* `--radius-base` knob value per preset; mirrors theme `radius/index.css`, which
|
|
185
|
-
* takes Tailwind's stock radius for each name.
|
|
186
|
-
*/
|
|
26
|
+
var RovingRow = class {
|
|
27
|
+
config;
|
|
28
|
+
activeItem = signal(null, ...ngDevMode ? [{ debugName: "activeItem" }] : /* istanbul ignore next */ []);
|
|
29
|
+
open = signal(null, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
|
|
30
|
+
constructor(config) {
|
|
31
|
+
this.config = config;
|
|
32
|
+
}
|
|
33
|
+
items() {
|
|
34
|
+
return this.config.items();
|
|
35
|
+
}
|
|
36
|
+
enabledItems() {
|
|
37
|
+
return this.items().filter((item) => !item.disabled());
|
|
38
|
+
}
|
|
39
|
+
setActive(item) {
|
|
40
|
+
if (item.disabled()) return;
|
|
41
|
+
this.activeItem.set(item);
|
|
42
|
+
}
|
|
43
|
+
tabIndexFor(item) {
|
|
44
|
+
const enabledItems = this.enabledItems();
|
|
45
|
+
if (enabledItems.length === 0) return this.items()[0] === item ? 0 : -1;
|
|
46
|
+
if (item.disabled()) return -1;
|
|
47
|
+
const activeItem = this.activeItem();
|
|
48
|
+
return (activeItem && enabledItems.includes(activeItem) ? activeItem : enabledItems[0]) === item ? 0 : -1;
|
|
49
|
+
}
|
|
50
|
+
openTrigger() {
|
|
51
|
+
return this.open();
|
|
52
|
+
}
|
|
53
|
+
hasOpenTrigger(except) {
|
|
54
|
+
const currentOpenTrigger = this.open();
|
|
55
|
+
return !!currentOpenTrigger && currentOpenTrigger !== except;
|
|
56
|
+
}
|
|
57
|
+
notifyOpen(trigger) {
|
|
58
|
+
const currentOpenTrigger = this.open();
|
|
59
|
+
if (currentOpenTrigger && currentOpenTrigger !== trigger) currentOpenTrigger.close({ restoreFocus: false });
|
|
60
|
+
this.open.set(trigger);
|
|
61
|
+
this.setActive(trigger);
|
|
62
|
+
}
|
|
63
|
+
notifyClosed(trigger) {
|
|
64
|
+
if (this.open() === trigger) this.open.set(null);
|
|
65
|
+
}
|
|
66
|
+
itemFrom(target, scope) {
|
|
67
|
+
return (scope === "all" ? this.items() : this.enabledItems()).find((item) => item.containsTarget(target)) ?? null;
|
|
68
|
+
}
|
|
69
|
+
handleNavigationKey(item, event) {
|
|
70
|
+
if (event.key === "Home" || event.key === "End") {
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
this.move(item, event.key === "Home" ? "start" : "end");
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
if (event.key === "ArrowRight" || event.key === "ArrowLeft") {
|
|
76
|
+
event.preventDefault();
|
|
77
|
+
this.move(item, event.key === "ArrowRight" ? "next" : "previous");
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
move(currentItem, direction) {
|
|
83
|
+
const enabledItems = this.enabledItems();
|
|
84
|
+
if (enabledItems.length === 0) return;
|
|
85
|
+
const currentIndex = enabledItems.indexOf(currentItem);
|
|
86
|
+
if (currentIndex === -1) {
|
|
87
|
+
enabledItems[0]?.focus();
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const nextItem = direction === "start" ? enabledItems[0] : direction === "end" ? enabledItems[enabledItems.length - 1] : enabledItems[this.nextIndex(currentIndex, direction === "next" ? this.horizontalStep() : -this.horizontalStep(), enabledItems.length)];
|
|
91
|
+
if (!nextItem || nextItem === currentItem) return;
|
|
92
|
+
this.config.enter(nextItem);
|
|
93
|
+
}
|
|
94
|
+
nextIndex(currentIndex, delta, length) {
|
|
95
|
+
const rawIndex = currentIndex + delta;
|
|
96
|
+
if (this.config.loop()) return (rawIndex + length) % length;
|
|
97
|
+
return Math.max(0, Math.min(length - 1, rawIndex));
|
|
98
|
+
}
|
|
99
|
+
horizontalStep() {
|
|
100
|
+
return getComputedStyle(this.config.host()).direction === "rtl" ? -1 : 1;
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const COMPONENT_RADII = [
|
|
104
|
+
"inherit",
|
|
105
|
+
"none",
|
|
106
|
+
"xs",
|
|
107
|
+
"sm",
|
|
108
|
+
"md",
|
|
109
|
+
"xl",
|
|
110
|
+
"full"
|
|
111
|
+
];
|
|
112
|
+
const COMPONENT_DENSITIES = [
|
|
113
|
+
"inherit",
|
|
114
|
+
"compact",
|
|
115
|
+
"normal",
|
|
116
|
+
"relaxed",
|
|
117
|
+
"spacious"
|
|
118
|
+
];
|
|
187
119
|
const RADIUS_BASE_VALUES = {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
120
|
+
none: "0px",
|
|
121
|
+
xs: "0.125rem",
|
|
122
|
+
sm: "0.25rem",
|
|
123
|
+
md: "0.375rem",
|
|
124
|
+
xl: "0.75rem",
|
|
125
|
+
full: "calc(infinity * 1px)"
|
|
194
126
|
};
|
|
195
|
-
/** `--spacing-base` knob value per preset; mirrors theme `space/index.css`. */
|
|
196
127
|
const DENSITY_BASE_VALUES = {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
128
|
+
compact: "0.2rem",
|
|
129
|
+
normal: "0.25rem",
|
|
130
|
+
relaxed: "0.28rem",
|
|
131
|
+
spacious: "0.32rem"
|
|
201
132
|
};
|
|
202
|
-
/**
|
|
203
|
-
* Resolves a `radius` input to a `--radius-base` value, or `null` to inherit the
|
|
204
|
-
* global axis. Bind the result to the surface host: `[style.--radius-base]`.
|
|
205
|
-
*/
|
|
206
133
|
function radiusBaseValue(radius) {
|
|
207
|
-
|
|
134
|
+
return radius === "inherit" ? null : RADIUS_BASE_VALUES[radius];
|
|
208
135
|
}
|
|
209
|
-
/**
|
|
210
|
-
* Resolves a `density` input to a `--spacing-base` value, or `null` to inherit
|
|
211
|
-
* the global axis. Bind the result to the surface host: `[style.--spacing-base]`.
|
|
212
|
-
*/
|
|
213
136
|
function densityBaseValue(density) {
|
|
214
|
-
|
|
137
|
+
return density === "inherit" ? null : DENSITY_BASE_VALUES[density];
|
|
215
138
|
}
|
|
216
|
-
|
|
217
139
|
let counter = 0;
|
|
218
|
-
/**
|
|
219
|
-
* Returns a document-unique id with the given prefix, e.g. `uniqueId('Checkbox')`
|
|
220
|
-
* → `"checkbox-1"`. Single shared counter for every component in the library.
|
|
221
|
-
*
|
|
222
|
-
* @deprecated Use `injectUniqueId` or inject `UI_ID_GENERATOR`. This legacy
|
|
223
|
-
* function cannot isolate concurrent server-rendering requests.
|
|
224
|
-
*/
|
|
225
140
|
function uniqueId(prefix) {
|
|
226
|
-
|
|
227
|
-
|
|
141
|
+
counter += 1;
|
|
142
|
+
return `${prefix}-${counter}`;
|
|
228
143
|
}
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* One safe way to touch `localStorage`, for every library that persists a
|
|
232
|
-
* preference.
|
|
233
|
-
*
|
|
234
|
-
* The same "reach localStorage through the document's window, wrap everything in
|
|
235
|
-
* try/catch" block was hand-copied across the theme axes and the navigation
|
|
236
|
-
* persistence unit. Every copy had to get three things right:
|
|
237
|
-
*
|
|
238
|
-
* 1. there may be no document at all (server side rendering),
|
|
239
|
-
* 2. `window.localStorage` can THROW on property access, not just on `getItem`
|
|
240
|
-
* (a blocked or partitioned storage), so the getter itself needs guarding,
|
|
241
|
-
* 3. a quota error on write must never break the caller.
|
|
242
|
-
*
|
|
243
|
-
* This lives in `component/utils/core` rather than in the theme package on
|
|
244
|
-
* purpose: `navigation` also needs it, and navigation must not depend on
|
|
245
|
-
* `theme`, which already depends on navigation. Both already depend on this
|
|
246
|
-
* entry point.
|
|
247
|
-
*/
|
|
248
|
-
/** Shared no-op, used whenever storage cannot be reached at all. */
|
|
249
144
|
const UNAVAILABLE = {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
145
|
+
read: () => null,
|
|
146
|
+
write: () => {},
|
|
147
|
+
remove: () => {}
|
|
253
148
|
};
|
|
254
|
-
/**
|
|
255
|
-
* `localStorage` reached through a document's own window.
|
|
256
|
-
*
|
|
257
|
-
* Resolved lazily on every call and never cached: the property access is the
|
|
258
|
-
* part that can throw, and a storage that is blocked now may be available later
|
|
259
|
-
* (or the other way round).
|
|
260
|
-
*/
|
|
261
149
|
function documentLocalStorage(documentRef) {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
remove: (key) => {
|
|
289
|
-
try {
|
|
290
|
-
resolve()?.removeItem(key);
|
|
291
|
-
}
|
|
292
|
-
catch {
|
|
293
|
-
// Same reasoning as write.
|
|
294
|
-
}
|
|
295
|
-
},
|
|
296
|
-
};
|
|
150
|
+
const resolve = () => {
|
|
151
|
+
try {
|
|
152
|
+
return documentRef?.defaultView?.localStorage ?? null;
|
|
153
|
+
} catch {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
return {
|
|
158
|
+
read: (key) => {
|
|
159
|
+
try {
|
|
160
|
+
return resolve()?.getItem(key) ?? null;
|
|
161
|
+
} catch {
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
write: (key, value) => {
|
|
166
|
+
try {
|
|
167
|
+
resolve()?.setItem(key, value);
|
|
168
|
+
} catch {}
|
|
169
|
+
},
|
|
170
|
+
remove: (key) => {
|
|
171
|
+
try {
|
|
172
|
+
resolve()?.removeItem(key);
|
|
173
|
+
} catch {}
|
|
174
|
+
}
|
|
175
|
+
};
|
|
297
176
|
}
|
|
298
|
-
/**
|
|
299
|
-
* `localStorage` from the global scope, for callers that only know whether they
|
|
300
|
-
* are in a browser (the `isPlatformBrowser` flavour) rather than holding a
|
|
301
|
-
* `Document`.
|
|
302
|
-
*/
|
|
303
177
|
function globalLocalStorage(isBrowser) {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
}
|
|
307
|
-
return documentLocalStorage(typeof document === 'undefined' ? null : document);
|
|
178
|
+
if (!isBrowser) return UNAVAILABLE;
|
|
179
|
+
return documentLocalStorage(typeof document === "undefined" ? null : document);
|
|
308
180
|
}
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* Generated bundle index. Do not edit.
|
|
312
|
-
*/
|
|
313
|
-
|
|
314
|
-
export { COMPONENT_DENSITIES, COMPONENT_RADII, RovingRow, UI_ID_GENERATOR, UiIdGenerator, cn, densityBaseValue, documentLocalStorage, globalLocalStorage, injectUniqueId, radiusBaseValue, uniqueId };
|
|
181
|
+
export { COMPONENT_DENSITIES, COMPONENT_RADII, RovingRow, UI_ID_GENERATOR, UiIdGenerator, cn, densityBaseValue, documentLocalStorage, globalLocalStorage, injectUniqueId, radiusBaseValue, uniqueId };
|
|
@@ -1,66 +1,54 @@
|
|
|
1
|
-
import { merge } from
|
|
2
|
-
import { filter } from
|
|
3
|
-
|
|
1
|
+
import { merge } from "rxjs";
|
|
2
|
+
import { filter } from "rxjs/operators";
|
|
4
3
|
const POSITION_ANCHORS = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
4
|
+
top: (align) => ({
|
|
5
|
+
originX: align === "start" ? "start" : align === "end" ? "end" : "center",
|
|
6
|
+
originY: "top",
|
|
7
|
+
overlayX: align === "start" ? "start" : align === "end" ? "end" : "center",
|
|
8
|
+
overlayY: "bottom"
|
|
9
|
+
}),
|
|
10
|
+
bottom: (align) => ({
|
|
11
|
+
originX: align === "start" ? "start" : align === "end" ? "end" : "center",
|
|
12
|
+
originY: "bottom",
|
|
13
|
+
overlayX: align === "start" ? "start" : align === "end" ? "end" : "center",
|
|
14
|
+
overlayY: "top"
|
|
15
|
+
}),
|
|
16
|
+
left: (align) => ({
|
|
17
|
+
originX: "start",
|
|
18
|
+
originY: align === "start" ? "top" : align === "end" ? "bottom" : "center",
|
|
19
|
+
overlayX: "end",
|
|
20
|
+
overlayY: align === "start" ? "top" : align === "end" ? "bottom" : "center"
|
|
21
|
+
}),
|
|
22
|
+
right: (align) => ({
|
|
23
|
+
originX: "end",
|
|
24
|
+
originY: align === "start" ? "top" : align === "end" ? "bottom" : "center",
|
|
25
|
+
overlayX: "start",
|
|
26
|
+
overlayY: align === "start" ? "top" : align === "end" ? "bottom" : "center"
|
|
27
|
+
})
|
|
29
28
|
};
|
|
30
|
-
/**
|
|
31
|
-
* Builds the CDK `ConnectedPosition` for a shadcn-style `side`/`align`/`sideOffset`
|
|
32
|
-
* triple. Shared by every anchored overlay in the library (popover, tooltip,
|
|
33
|
-
* hover-card, menus, combobox).
|
|
34
|
-
*/
|
|
35
29
|
function connectedPositionFor(side, align, sideOffset) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
30
|
+
const anchor = POSITION_ANCHORS[side](align);
|
|
31
|
+
if (side === "top") return {
|
|
32
|
+
...anchor,
|
|
33
|
+
offsetY: -sideOffset
|
|
34
|
+
};
|
|
35
|
+
if (side === "bottom") return {
|
|
36
|
+
...anchor,
|
|
37
|
+
offsetY: sideOffset
|
|
38
|
+
};
|
|
39
|
+
if (side === "left") return {
|
|
40
|
+
...anchor,
|
|
41
|
+
offsetX: -sideOffset
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
...anchor,
|
|
45
|
+
offsetX: sideOffset
|
|
46
|
+
};
|
|
47
47
|
}
|
|
48
48
|
function oppositeSide(side) {
|
|
49
|
-
|
|
49
|
+
return side === "top" ? "bottom" : side === "bottom" ? "top" : side === "left" ? "right" : "left";
|
|
50
50
|
}
|
|
51
|
-
/**
|
|
52
|
-
* Emits whenever the user dismisses the overlay: pointer down outside (ignoring
|
|
53
|
-
* the origin element so trigger clicks keep toggling), Escape, or detachment.
|
|
54
|
-
* Subscribers decide how to close.
|
|
55
|
-
*/
|
|
56
51
|
function overlayDismissals(overlayRef, origin) {
|
|
57
|
-
|
|
58
|
-
.outsidePointerEvents()
|
|
59
|
-
.pipe(filter((event) => !origin || !origin.contains(event.target))), overlayRef.keydownEvents().pipe(filter((event) => event.key === 'Escape')), overlayRef.detachments());
|
|
52
|
+
return merge(overlayRef.outsidePointerEvents().pipe(filter((event) => !origin || !origin.contains(event.target))), overlayRef.keydownEvents().pipe(filter((event) => event.key === "Escape")), overlayRef.detachments());
|
|
60
53
|
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Generated bundle index. Do not edit.
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
|
-
export { connectedPositionFor, oppositeSide, overlayDismissals };
|
|
54
|
+
export { connectedPositionFor, oppositeSide, overlayDismissals };
|