@ojiepermana/angular 22.1.11 → 22.1.12
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 +32 -26
- package/chart/README.md +272 -0
- package/component/README.md +89 -0
- package/component/accordion/README.md +195 -0
- package/component/alert/README.md +184 -0
- package/component/alert-dialog/README.md +255 -0
- package/component/aspect-ratio/README.md +116 -0
- package/component/avatar/README.md +182 -0
- package/component/badge/README.md +143 -0
- package/component/breadcrumb/README.md +223 -0
- package/component/button/README.md +141 -0
- package/component/button-group/README.md +214 -0
- package/component/calendar/README.md +137 -0
- package/component/card/README.md +232 -0
- package/component/carousel/README.md +276 -0
- package/component/checkbox/README.md +153 -0
- package/component/collapsible/README.md +216 -0
- package/component/combobox/README.md +202 -0
- package/component/command/README.md +287 -0
- package/component/composer/README.md +241 -0
- package/component/context-menu/README.md +268 -0
- package/component/date-picker/README.md +202 -0
- package/component/dialog/README.md +276 -0
- package/component/drawer/README.md +147 -0
- package/component/dropdown-menu/README.md +336 -0
- package/component/editor/README.md +152 -0
- package/component/empty/README.md +193 -0
- package/component/form/README.md +216 -0
- package/component/hover-card/README.md +150 -0
- package/component/icon/README.md +25 -0
- package/component/input/README.md +160 -0
- package/component/input-group/README.md +245 -0
- package/component/input-otp/README.md +331 -0
- package/component/item/README.md +254 -0
- package/component/kanban/README.md +81 -0
- package/component/kbd/README.md +141 -0
- package/component/label/README.md +137 -0
- package/component/menubar/README.md +270 -0
- package/component/native-select/README.md +176 -0
- package/component/navigation-menu/README.md +165 -0
- package/component/pagination/README.md +151 -0
- package/component/pillbox/README.md +68 -0
- package/component/popover/README.md +54 -0
- package/component/progress/README.md +160 -0
- package/component/radio/README.md +212 -0
- package/component/resizable/README.md +178 -0
- package/component/scroll-area/README.md +150 -0
- package/component/select/README.md +228 -0
- package/component/separator/README.md +175 -0
- package/component/sheet/README.md +190 -0
- package/component/skeleton/README.md +158 -0
- package/component/slider/README.md +207 -0
- package/component/spinner/README.md +160 -0
- package/component/switch/README.md +170 -0
- package/component/table/README.md +292 -0
- package/component/tabs/README.md +220 -0
- package/component/textarea/README.md +169 -0
- package/component/timeline/README.md +94 -0
- package/component/toast/README.md +173 -0
- package/component/toggle/README.md +133 -0
- package/component/toggle-group/README.md +234 -0
- package/component/tooltip/README.md +230 -0
- package/fesm2022/ojiepermana-angular-chart-area.mjs +289 -3
- package/fesm2022/ojiepermana-angular-chart-bar.mjs +722 -3
- package/fesm2022/ojiepermana-angular-chart-core.mjs +1482 -3
- package/fesm2022/ojiepermana-angular-chart-line.mjs +294 -3
- package/fesm2022/ojiepermana-angular-chart-pie.mjs +291 -3
- package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1301 -3
- package/fesm2022/ojiepermana-angular-chart-radar.mjs +421 -3
- package/fesm2022/ojiepermana-angular-chart-radial.mjs +295 -3
- package/fesm2022/ojiepermana-angular-chart-scatter.mjs +306 -3
- package/fesm2022/ojiepermana-angular-chart.mjs +12 -3
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +267 -3
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +359 -3
- package/fesm2022/ojiepermana-angular-component-alert.mjs +101 -3
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +31 -3
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +139 -3
- package/fesm2022/ojiepermana-angular-component-badge.mjs +57 -3
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +192 -3
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +95 -3
- package/fesm2022/ojiepermana-angular-component-button.mjs +73 -3
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +718 -3
- package/fesm2022/ojiepermana-angular-component-card.mjs +167 -3
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +326 -3
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +190 -3
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +117 -3
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +327 -3
- package/fesm2022/ojiepermana-angular-component-command.mjs +351 -3
- package/fesm2022/ojiepermana-angular-component-composer.mjs +359 -3
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +158 -3
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +482 -3
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +400 -3
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -3
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +689 -3
- package/fesm2022/ojiepermana-angular-component-editor.mjs +511 -3
- package/fesm2022/ojiepermana-angular-component-empty.mjs +134 -3
- package/fesm2022/ojiepermana-angular-component-form.mjs +438 -3
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +273 -3
- package/fesm2022/ojiepermana-angular-component-icon.mjs +139 -3
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +176 -3
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +550 -3
- package/fesm2022/ojiepermana-angular-component-input.mjs +52 -3
- package/fesm2022/ojiepermana-angular-component-item.mjs +264 -3
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +310 -3
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +48 -3
- package/fesm2022/ojiepermana-angular-component-label.mjs +27 -3
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +327 -3
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +62 -3
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +378 -3
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +238 -3
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +999 -3
- package/fesm2022/ojiepermana-angular-component-popover.mjs +201 -3
- package/fesm2022/ojiepermana-angular-component-progress.mjs +57 -3
- package/fesm2022/ojiepermana-angular-component-radio.mjs +180 -3
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +493 -3
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +51 -3
- package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +227 -3
- package/fesm2022/ojiepermana-angular-component-select.mjs +609 -3
- package/fesm2022/ojiepermana-angular-component-separator.mjs +31 -3
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +407 -3
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +25 -3
- package/fesm2022/ojiepermana-angular-component-slider.mjs +456 -3
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +56 -3
- package/fesm2022/ojiepermana-angular-component-switch.mjs +145 -3
- package/fesm2022/ojiepermana-angular-component-table.mjs +155 -3
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +315 -3
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +46 -3
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -3
- package/fesm2022/ojiepermana-angular-component-toast.mjs +241 -3
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +290 -3
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +76 -3
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +519 -3
- package/fesm2022/ojiepermana-angular-component-utils-core.mjs +310 -3
- package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +62 -3
- package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +34 -3
- package/fesm2022/ojiepermana-angular-component-utils.mjs +3 -2
- package/fesm2022/ojiepermana-angular-component.mjs +4 -4
- package/fesm2022/ojiepermana-angular-navigation-core.mjs +21 -3
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +20 -3
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-CDBxQ8rk.mjs +91 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DBQHdvGa.mjs +512 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-entry-grid.component-Cd-jh6tg.mjs +623 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BCGvhoYj.mjs +404 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-Dk_03e-6.mjs +466 -0
- package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs +2642 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +725 -3
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +65 -4
- package/fesm2022/ojiepermana-angular-navigation.mjs +4 -10
- package/fesm2022/ojiepermana-angular-sdk.mjs +204 -4
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1387 -3
- package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +331 -3
- package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +45 -4
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1044 -3
- package/fesm2022/ojiepermana-angular-theme-layout.mjs +729 -3
- package/fesm2022/ojiepermana-angular-theme-page-core.mjs +381 -3
- package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +267 -3
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +361 -3
- package/fesm2022/ojiepermana-angular-theme-page-side.mjs +198 -3
- package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +110 -3
- package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -2
- package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +338 -3
- package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +160 -4
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +811 -3
- package/fesm2022/ojiepermana-angular-theme-styles.mjs +783 -3
- package/fesm2022/ojiepermana-angular-theme.mjs +4 -4
- package/fesm2022/ojiepermana-angular.mjs +6 -11
- package/navigation/README.md +374 -0
- package/package.json +81 -20
- package/sdk/README.md +212 -0
- package/sdk/schematics/collection.json +20 -0
- package/sdk/schematics/init/index.js +83 -0
- package/sdk/schematics/init/schema.json +19 -0
- package/sdk/schematics/ng-add/index.js +147 -0
- package/sdk/schematics/ng-add/schema.json +14 -0
- package/sdk/schematics/package.json +3 -0
- package/sdk/schematics/sdk/index.js +175 -0
- package/sdk/schematics/sdk/schema.json +19 -0
- package/sdk/sdk.config.example.json +24 -0
- package/sdk/src/config/loader.js +43 -0
- package/sdk/src/config/schema.js +59 -0
- package/sdk/src/emit/client.js +251 -0
- package/sdk/src/emit/metadata.js +310 -0
- package/sdk/src/emit/models.js +104 -0
- package/sdk/src/emit/navigation.js +56 -0
- package/sdk/src/emit/operations.js +118 -0
- package/sdk/src/emit/public-api.js +54 -0
- package/sdk/src/emit/services.js +110 -0
- package/sdk/src/engine.js +67 -0
- package/sdk/src/layout/per-domain.js +360 -0
- package/sdk/src/package.json +3 -0
- package/sdk/src/parser/bundle.js +25 -0
- package/sdk/src/parser/ir.js +429 -0
- package/sdk/src/parser/types.js +7 -0
- package/sdk/src/render/template.js +152 -0
- package/sdk/src/writer/index.js +286 -0
- package/theme/README.md +126 -0
- package/theme/component/settings/README.md +135 -0
- package/theme/layout/README.md +539 -0
- package/theme/page/README.md +453 -0
- package/theme/shell/README.md +340 -0
- package/theme/styles/README.md +178 -0
- package/theme/styles/css/base/components.css +553 -0
- package/theme/styles/css/base/index.css +14 -0
- package/theme/styles/css/base/package.css +9 -0
- package/theme/styles/css/base/prefers-dark.css +86 -0
- package/theme/styles/css/base/print.css +62 -0
- package/theme/styles/css/base/status.css +38 -0
- package/theme/styles/css/base/tailwind.css +165 -0
- package/theme/styles/css/base/theme.css +373 -0
- package/theme/styles/css/base/tokens.css +361 -0
- package/theme/styles/css/color/amber.css +72 -0
- package/theme/styles/css/color/blue.css +72 -0
- package/theme/styles/css/color/brand.css +38 -0
- package/theme/styles/css/color/cyan.css +72 -0
- package/theme/styles/css/color/emerald.css +72 -0
- package/theme/styles/css/color/fuchsia.css +72 -0
- package/theme/styles/css/color/green.css +72 -0
- package/theme/styles/css/color/index.css +19 -0
- package/theme/styles/css/color/indigo.css +72 -0
- package/theme/styles/css/color/lime.css +72 -0
- package/theme/styles/css/color/orange.css +72 -0
- package/theme/styles/css/color/pink.css +72 -0
- package/theme/styles/css/color/purple.css +72 -0
- package/theme/styles/css/color/red.css +72 -0
- package/theme/styles/css/color/rose.css +72 -0
- package/theme/styles/css/color/sky.css +72 -0
- package/theme/styles/css/color/teal.css +72 -0
- package/theme/styles/css/color/violet.css +72 -0
- package/theme/styles/css/color/yellow.css +72 -0
- package/theme/styles/css/index.css +18 -0
- package/theme/styles/css/neutral/gray.css +63 -0
- package/theme/styles/css/neutral/index.css +11 -0
- package/theme/styles/css/neutral/mauve.css +63 -0
- package/theme/styles/css/neutral/mist.css +63 -0
- package/theme/styles/css/neutral/neutral.css +63 -0
- package/theme/styles/css/neutral/olive.css +63 -0
- package/theme/styles/css/neutral/slate.css +63 -0
- package/theme/styles/css/neutral/stone.css +63 -0
- package/theme/styles/css/neutral/taupe.css +63 -0
- package/theme/styles/css/neutral/zinc.css +63 -0
- package/theme/styles/css/radius/index.css +30 -0
- package/theme/styles/css/space/index.css +20 -0
- package/types/ojiepermana-angular-chart-area.d.ts +76 -1
- package/types/ojiepermana-angular-chart-bar.d.ts +201 -1
- package/types/ojiepermana-angular-chart-core.d.ts +811 -1
- package/types/ojiepermana-angular-chart-line.d.ts +75 -1
- package/types/ojiepermana-angular-chart-pie.d.ts +131 -1
- package/types/ojiepermana-angular-chart-primitives.d.ts +291 -1
- package/types/ojiepermana-angular-chart-radar.d.ts +116 -1
- package/types/ojiepermana-angular-chart-radial.d.ts +116 -1
- package/types/ojiepermana-angular-chart-scatter.d.ts +125 -1
- package/types/ojiepermana-angular-chart.d.ts +2 -1
- package/types/ojiepermana-angular-component-accordion.d.ts +85 -1
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +140 -1
- package/types/ojiepermana-angular-component-alert.d.ts +42 -1
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +12 -1
- package/types/ojiepermana-angular-component-avatar.d.ts +56 -1
- package/types/ojiepermana-angular-component-badge.d.ts +24 -1
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +46 -1
- package/types/ojiepermana-angular-component-button-group.d.ts +26 -1
- package/types/ojiepermana-angular-component-button.d.ts +27 -1
- package/types/ojiepermana-angular-component-calendar.d.ts +111 -1
- package/types/ojiepermana-angular-component-card.d.ts +69 -1
- package/types/ojiepermana-angular-component-carousel.d.ts +86 -1
- package/types/ojiepermana-angular-component-checkbox.d.ts +42 -1
- package/types/ojiepermana-angular-component-collapsible.d.ts +42 -1
- package/types/ojiepermana-angular-component-combobox.d.ts +60 -1
- package/types/ojiepermana-angular-component-command.d.ts +130 -1
- package/types/ojiepermana-angular-component-composer.d.ts +90 -1
- package/types/ojiepermana-angular-component-context-menu.d.ts +54 -1
- package/types/ojiepermana-angular-component-date-picker.d.ts +109 -1
- package/types/ojiepermana-angular-component-dialog.d.ts +136 -1
- package/types/ojiepermana-angular-component-drawer.d.ts +1 -1
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +248 -1
- package/types/ojiepermana-angular-component-editor.d.ts +135 -1
- package/types/ojiepermana-angular-component-empty.d.ts +50 -1
- package/types/ojiepermana-angular-component-form.d.ts +159 -1
- package/types/ojiepermana-angular-component-hover-card.d.ts +75 -1
- package/types/ojiepermana-angular-component-icon.d.ts +89 -1
- package/types/ojiepermana-angular-component-input-group.d.ts +51 -1
- package/types/ojiepermana-angular-component-input-otp.d.ts +155 -1
- package/types/ojiepermana-angular-component-input.d.ts +21 -1
- package/types/ojiepermana-angular-component-item.d.ts +93 -1
- package/types/ojiepermana-angular-component-kanban.d.ts +70 -1
- package/types/ojiepermana-angular-component-kbd.d.ts +16 -1
- package/types/ojiepermana-angular-component-label.d.ts +11 -1
- package/types/ojiepermana-angular-component-menubar.d.ts +93 -1
- package/types/ojiepermana-angular-component-native-select.d.ts +26 -1
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +104 -1
- package/types/ojiepermana-angular-component-pagination.d.ts +33 -1
- package/types/ojiepermana-angular-component-pillbox.d.ts +222 -1
- package/types/ojiepermana-angular-component-popover.d.ts +66 -1
- package/types/ojiepermana-angular-component-progress.d.ts +17 -1
- package/types/ojiepermana-angular-component-radio.d.ts +60 -1
- package/types/ojiepermana-angular-component-resizable.d.ts +117 -1
- package/types/ojiepermana-angular-component-scroll-area.d.ts +19 -1
- package/types/ojiepermana-angular-component-segmented-control.d.ts +58 -1
- package/types/ojiepermana-angular-component-select.d.ts +122 -1
- package/types/ojiepermana-angular-component-separator.d.ts +14 -1
- package/types/ojiepermana-angular-component-sheet.d.ts +130 -1
- package/types/ojiepermana-angular-component-skeleton.d.ts +10 -1
- package/types/ojiepermana-angular-component-slider.d.ts +83 -1
- package/types/ojiepermana-angular-component-spinner.d.ts +13 -1
- package/types/ojiepermana-angular-component-switch.d.ts +44 -1
- package/types/ojiepermana-angular-component-table.d.ts +57 -1
- package/types/ojiepermana-angular-component-tabs.d.ts +124 -1
- package/types/ojiepermana-angular-component-textarea.d.ts +17 -1
- package/types/ojiepermana-angular-component-timeline.d.ts +64 -1
- package/types/ojiepermana-angular-component-toast.d.ts +64 -1
- package/types/ojiepermana-angular-component-toggle-group.d.ts +90 -1
- package/types/ojiepermana-angular-component-toggle.d.ts +25 -1
- package/types/ojiepermana-angular-component-tooltip.d.ts +143 -1
- package/types/ojiepermana-angular-component-utils-core.d.ts +184 -1
- package/types/ojiepermana-angular-component-utils-overlay.d.ts +21 -1
- package/types/ojiepermana-angular-component-utils-scale.d.ts +19 -1
- package/types/ojiepermana-angular-component-utils.d.ts +2 -1
- package/types/ojiepermana-angular-component.d.ts +2 -1
- package/types/ojiepermana-angular-navigation-core.d.ts +59 -1
- package/types/ojiepermana-angular-navigation-icon.d.ts +12 -1
- package/types/ojiepermana-angular-navigation-service.d.ts +116 -1
- package/types/ojiepermana-angular-navigation-types.d.ts +144 -1
- package/types/ojiepermana-angular-navigation.d.ts +507 -1
- package/types/ojiepermana-angular-sdk.d.ts +89 -1
- package/types/ojiepermana-angular-theme-component-settings.d.ts +154 -1
- package/types/ojiepermana-angular-theme-layout-services.d.ts +147 -1
- package/types/ojiepermana-angular-theme-layout-types.d.ts +40 -1
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +299 -1
- package/types/ojiepermana-angular-theme-layout.d.ts +129 -1
- package/types/ojiepermana-angular-theme-page-core.d.ts +157 -1
- package/types/ojiepermana-angular-theme-page-filter.d.ts +77 -1
- package/types/ojiepermana-angular-theme-page-root.d.ts +88 -1
- package/types/ojiepermana-angular-theme-page-side.d.ts +50 -1
- package/types/ojiepermana-angular-theme-page-slots.d.ts +40 -1
- package/types/ojiepermana-angular-theme-page.d.ts +5 -1
- package/types/ojiepermana-angular-theme-shell-services.d.ts +193 -1
- package/types/ojiepermana-angular-theme-shell-types.d.ts +105 -1
- package/types/ojiepermana-angular-theme-shell.d.ts +100 -1
- package/types/ojiepermana-angular-theme-styles.d.ts +319 -1
- package/types/ojiepermana-angular-theme.d.ts +2 -1
- package/types/ojiepermana-angular.d.ts +5 -5
|
@@ -1 +1,143 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, Signal, TemplateRef } from '@angular/core';
|
|
3
|
+
import * as i1 from '@ojiepermana/angular/component/utils/scale';
|
|
4
|
+
import { ComponentScaleDirective } from '@ojiepermana/angular/component/utils/scale';
|
|
5
|
+
|
|
6
|
+
type TooltipSide = 'top' | 'right' | 'bottom' | 'left';
|
|
7
|
+
type TooltipAlign = 'start' | 'center' | 'end';
|
|
8
|
+
interface TooltipDefaults {
|
|
9
|
+
readonly side: Signal<TooltipSide>;
|
|
10
|
+
readonly align: Signal<TooltipAlign>;
|
|
11
|
+
readonly sideOffset: Signal<number>;
|
|
12
|
+
readonly openDelay: Signal<number>;
|
|
13
|
+
readonly closeDelay: Signal<number>;
|
|
14
|
+
}
|
|
15
|
+
declare const TOOLTIP_DEFAULTS: InjectionToken<TooltipDefaults>;
|
|
16
|
+
declare class TooltipComponent implements TooltipDefaults {
|
|
17
|
+
readonly side: _angular_core.InputSignal<TooltipSide>;
|
|
18
|
+
readonly align: _angular_core.InputSignal<TooltipAlign>;
|
|
19
|
+
readonly sideOffset: _angular_core.InputSignal<number>;
|
|
20
|
+
readonly openDelay: _angular_core.InputSignal<number>;
|
|
21
|
+
/**
|
|
22
|
+
* Delay before the tooltip hides after the pointer leaves.
|
|
23
|
+
*
|
|
24
|
+
* It matches `openDelay` rather than being zero so the pointer has time to
|
|
25
|
+
* cross the `sideOffset` gap and land on the panel. That is what makes the
|
|
26
|
+
* panel reachable, which WCAG 1.4.13 (hoverable) asks for. Set it to `0` for
|
|
27
|
+
* an instant hide, accepting that the panel then cannot be hovered.
|
|
28
|
+
*/
|
|
29
|
+
readonly closeDelay: _angular_core.InputSignal<number>;
|
|
30
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TooltipComponent, never>;
|
|
31
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TooltipComponent, "Tooltip", never, { "side": { "alias": "side"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "sideOffset": { "alias": "sideOffset"; "required": false; "isSignal": true; }; "openDelay": { "alias": "openDelay"; "required": false; "isSignal": true; }; "closeDelay": { "alias": "closeDelay"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare class TooltipContentDirective {
|
|
35
|
+
protected readonly componentScale: ComponentScaleDirective;
|
|
36
|
+
readonly radius: _angular_core.InputSignal<"inherit" | "none" | "xs" | "sm" | "md" | "xl" | "full">;
|
|
37
|
+
readonly density: _angular_core.InputSignal<"inherit" | "compact" | "normal" | "relaxed" | "spacious">;
|
|
38
|
+
readonly template: TemplateRef<unknown>;
|
|
39
|
+
/**
|
|
40
|
+
* Resolved `--radius-base` / `--spacing-base` knob values (or `null` to
|
|
41
|
+
* inherit the global axis). Public so {@link TooltipTriggerDirective} can mirror
|
|
42
|
+
* them onto the CDK overlay panel — the element that actually paints the rounded
|
|
43
|
+
* background + padding — since this directive sits on an `<ng-template>` whose
|
|
44
|
+
* host bindings never reach the imperatively-created overlay subtree.
|
|
45
|
+
*/
|
|
46
|
+
readonly radiusBase: _angular_core.Signal<string | null>;
|
|
47
|
+
readonly densityBase: _angular_core.Signal<string | null>;
|
|
48
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TooltipContentDirective, never>;
|
|
49
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TooltipContentDirective, "ng-template[TooltipContent]", ["TooltipContent"], {}, {}, never, never, true, [{ directive: typeof i1.ComponentScaleDirective; inputs: { "radius": "radius"; "density": "density"; }; outputs: {}; }]>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare class TooltipTriggerDirective {
|
|
53
|
+
private readonly overlay;
|
|
54
|
+
private readonly vcr;
|
|
55
|
+
private readonly el;
|
|
56
|
+
private readonly destroyRef;
|
|
57
|
+
private readonly defaults;
|
|
58
|
+
private readonly idGenerator;
|
|
59
|
+
readonly TooltipTrigger: _angular_core.InputSignal<TooltipContentDirective>;
|
|
60
|
+
readonly side: _angular_core.InputSignal<TooltipSide | undefined>;
|
|
61
|
+
readonly align: _angular_core.InputSignal<TooltipAlign | undefined>;
|
|
62
|
+
readonly sideOffset: _angular_core.InputSignal<number | undefined>;
|
|
63
|
+
readonly openDelay: _angular_core.InputSignal<number | undefined>;
|
|
64
|
+
readonly closeDelay: _angular_core.InputSignal<number | undefined>;
|
|
65
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
66
|
+
readonly openedChange: _angular_core.OutputEmitterRef<boolean>;
|
|
67
|
+
readonly isOpen: _angular_core.WritableSignal<boolean>;
|
|
68
|
+
protected readonly contentId: _angular_core.WritableSignal<string | null>;
|
|
69
|
+
private overlayRef;
|
|
70
|
+
private openTimeoutId;
|
|
71
|
+
private closeTimeoutId;
|
|
72
|
+
private isPointerInsideTrigger;
|
|
73
|
+
private isPointerInsidePanel;
|
|
74
|
+
private isTriggerFocused;
|
|
75
|
+
private isDestroying;
|
|
76
|
+
/**
|
|
77
|
+
* Holds the tooltip open while the pointer rests on the panel, so a user can
|
|
78
|
+
* move onto it to read or copy the content (WCAG 1.4.13, hoverable).
|
|
79
|
+
*/
|
|
80
|
+
private readonly onPanelPointerEnter;
|
|
81
|
+
private readonly onPanelPointerLeave;
|
|
82
|
+
constructor();
|
|
83
|
+
handlePointerEnter(): void;
|
|
84
|
+
handlePointerLeave(event: PointerEvent): void;
|
|
85
|
+
handleFocusIn(): void;
|
|
86
|
+
handleFocusOut(event: FocusEvent): void;
|
|
87
|
+
open(): void;
|
|
88
|
+
close(): void;
|
|
89
|
+
private applySurfaceVars;
|
|
90
|
+
private bindOverlayLifecycle;
|
|
91
|
+
private scheduleOpen;
|
|
92
|
+
private scheduleClose;
|
|
93
|
+
private releasePanel;
|
|
94
|
+
private clearOpenTimeout;
|
|
95
|
+
private clearCloseTimeout;
|
|
96
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TooltipTriggerDirective, never>;
|
|
97
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TooltipTriggerDirective, "[TooltipTrigger]", ["TooltipTrigger"], { "TooltipTrigger": { "alias": "TooltipTrigger"; "required": true; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "sideOffset": { "alias": "sideOffset"; "required": false; "isSignal": true; }; "openDelay": { "alias": "openDelay"; "required": false; "isSignal": true; }; "closeDelay": { "alias": "closeDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "openedChange": "openedChange"; }, never, never, true, never>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** Posisi tooltip; kompatibel dengan nilai `matTooltipPosition` lama. */
|
|
101
|
+
type TooltipPosition = 'left' | 'right' | 'above' | 'below' | 'before' | 'after';
|
|
102
|
+
/**
|
|
103
|
+
* Shadcn-styled text tooltip — CDK overlay, tanpa dependensi Material.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* <button Button [Tooltip]="'Save changes'" TooltipPosition="above">Save</button>
|
|
107
|
+
*/
|
|
108
|
+
declare class TooltipDirective {
|
|
109
|
+
private readonly overlay;
|
|
110
|
+
private readonly el;
|
|
111
|
+
private readonly destroyRef;
|
|
112
|
+
private readonly idGenerator;
|
|
113
|
+
readonly Tooltip: _angular_core.InputSignal<string>;
|
|
114
|
+
readonly TooltipPosition: _angular_core.InputSignal<TooltipPosition>;
|
|
115
|
+
readonly TooltipDisabled: _angular_core.InputSignal<boolean>;
|
|
116
|
+
readonly TooltipShowDelay: _angular_core.InputSignal<number>;
|
|
117
|
+
/**
|
|
118
|
+
* Delay before hiding. It matches the show delay rather than being zero so the
|
|
119
|
+
* pointer can cross the offset gap and land on the panel, which is what makes
|
|
120
|
+
* the panel reachable (WCAG 1.4.13, hoverable). Set `0` for an instant hide,
|
|
121
|
+
* accepting that the panel then cannot be hovered.
|
|
122
|
+
*/
|
|
123
|
+
readonly TooltipHideDelay: _angular_core.InputSignal<number>;
|
|
124
|
+
private overlayRef;
|
|
125
|
+
private contentRef;
|
|
126
|
+
private showTimeoutId;
|
|
127
|
+
private hideTimeoutId;
|
|
128
|
+
private isPointerInsidePanel;
|
|
129
|
+
private readonly onPanelPointerEnter;
|
|
130
|
+
private readonly onPanelPointerLeave;
|
|
131
|
+
private readonly side;
|
|
132
|
+
constructor();
|
|
133
|
+
show(): void;
|
|
134
|
+
hide(): void;
|
|
135
|
+
protected scheduleShow(): void;
|
|
136
|
+
protected scheduleHide(): void;
|
|
137
|
+
private clearTimers;
|
|
138
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TooltipDirective, never>;
|
|
139
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TooltipDirective, "[Tooltip]", ["Tooltip"], { "Tooltip": { "alias": "Tooltip"; "required": false; "isSignal": true; }; "TooltipPosition": { "alias": "TooltipPosition"; "required": false; "isSignal": true; }; "TooltipDisabled": { "alias": "TooltipDisabled"; "required": false; "isSignal": true; }; "TooltipShowDelay": { "alias": "TooltipShowDelay"; "required": false; "isSignal": true; }; "TooltipHideDelay": { "alias": "TooltipHideDelay"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export { TOOLTIP_DEFAULTS, TooltipComponent, TooltipContentDirective, TooltipDirective, TooltipTriggerDirective };
|
|
143
|
+
export type { TooltipAlign, TooltipDefaults, TooltipPosition, TooltipSide };
|
|
@@ -1 +1,184 @@
|
|
|
1
|
-
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
5
|
+
|
|
6
|
+
/** Request/application-scoped DOM id generator with deterministic sequencing. */
|
|
7
|
+
declare class UiIdGenerator {
|
|
8
|
+
private counter;
|
|
9
|
+
private readonly appInfix;
|
|
10
|
+
constructor(appId?: string);
|
|
11
|
+
next(prefix: string): string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* One generator per Angular application injector. Separate SSR requests and a
|
|
15
|
+
* hydrating browser application therefore start from the same deterministic
|
|
16
|
+
* sequence instead of sharing process-global state.
|
|
17
|
+
*/
|
|
18
|
+
declare const UI_ID_GENERATOR: InjectionToken<UiIdGenerator>;
|
|
19
|
+
/** Generates an id during component/directive construction. */
|
|
20
|
+
declare function injectUniqueId(prefix: string): string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* One item of a horizontal roving row: a trigger that discloses an overlay, or
|
|
24
|
+
* a plain link sitting beside one. The row only ever asks an item whether it is
|
|
25
|
+
* disabled, moves focus to it, and matches it against an event target -- it
|
|
26
|
+
* never touches roles or ARIA, so a real `menubar` and a disclosure navigation
|
|
27
|
+
* can share it without either inheriting the other's semantics.
|
|
28
|
+
*/
|
|
29
|
+
interface RovingRowItem {
|
|
30
|
+
disabled(): boolean;
|
|
31
|
+
focus(): void;
|
|
32
|
+
containsTarget(target: EventTarget | null): boolean;
|
|
33
|
+
}
|
|
34
|
+
/** The subset of a disclosure trigger the row needs to hand one panel over. */
|
|
35
|
+
interface RovingRowTrigger extends RovingRowItem {
|
|
36
|
+
close(options: {
|
|
37
|
+
restoreFocus: boolean;
|
|
38
|
+
}): void;
|
|
39
|
+
}
|
|
40
|
+
type RovingRowDirection = 'previous' | 'next' | 'start' | 'end';
|
|
41
|
+
/** Which items answer for a keyboard event: every one, or only the enabled ones. */
|
|
42
|
+
type RovingRowScope = 'all' | 'enabled';
|
|
43
|
+
interface RovingRowConfig<TItem extends RovingRowItem> {
|
|
44
|
+
/** Every row item in DOM order, disabled ones included. */
|
|
45
|
+
items: () => readonly TItem[];
|
|
46
|
+
/** The row element; its resolved writing direction decides which way an arrow steps. */
|
|
47
|
+
host: () => HTMLElement;
|
|
48
|
+
/** Whether arrows wrap around at the ends instead of clamping. */
|
|
49
|
+
loop: () => boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Commits a resolved move. The row has already picked the neighbour and
|
|
52
|
+
* ruled out the no-op cases; what focusing it means for an open panel is the
|
|
53
|
+
* owning component's decision, so it lands here.
|
|
54
|
+
*/
|
|
55
|
+
enter: (item: TItem) => void;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Roving focus across one horizontal row of items, with at most one open
|
|
59
|
+
* disclosure among them.
|
|
60
|
+
*
|
|
61
|
+
* Shared by `Menubar` and `NavigationMenu`: both walk a single row with the
|
|
62
|
+
* arrow keys plus Home/End, hold exactly one tab stop, and keep at most one
|
|
63
|
+
* panel open. Everything that differs between the two -- roles, ARIA, and what
|
|
64
|
+
* happens to an open panel when focus moves on -- stays in the components.
|
|
65
|
+
*/
|
|
66
|
+
declare class RovingRow<TItem extends RovingRowItem, TTrigger extends TItem & RovingRowTrigger> {
|
|
67
|
+
private readonly config;
|
|
68
|
+
private readonly activeItem;
|
|
69
|
+
private readonly open;
|
|
70
|
+
constructor(config: RovingRowConfig<TItem>);
|
|
71
|
+
items(): readonly TItem[];
|
|
72
|
+
enabledItems(): TItem[];
|
|
73
|
+
setActive(item: TItem): void;
|
|
74
|
+
/**
|
|
75
|
+
* The roving `tabindex` for one row item.
|
|
76
|
+
*
|
|
77
|
+
* A composite widget carries exactly one tab stop: normally the active item
|
|
78
|
+
* owns it, falling back to the first enabled one. When EVERY item is disabled
|
|
79
|
+
* there is no enabled candidate, and leaving them all at `-1` drops the whole
|
|
80
|
+
* widget out of the tab order -- it becomes unreachable and a keyboard user
|
|
81
|
+
* cannot even discover that it is there. The first item keeps the tab stop
|
|
82
|
+
* instead and announces its state through `aria-disabled`, which is the APG
|
|
83
|
+
* focusable-disabled-item approach.
|
|
84
|
+
*/
|
|
85
|
+
tabIndexFor(item: TItem): number;
|
|
86
|
+
openTrigger(): TTrigger | null;
|
|
87
|
+
hasOpenTrigger(except?: TTrigger): boolean;
|
|
88
|
+
notifyOpen(trigger: TTrigger): void;
|
|
89
|
+
notifyClosed(trigger: TTrigger): void;
|
|
90
|
+
/** The row item an event came from, or `null` when it came from outside the row. */
|
|
91
|
+
itemFrom(target: EventTarget | null, scope: RovingRowScope): TItem | null;
|
|
92
|
+
/**
|
|
93
|
+
* Handles the keys that walk the row itself -- Home, End and the horizontal
|
|
94
|
+
* arrows -- and reports whether it claimed the event, so a component can add
|
|
95
|
+
* its own keys around this without restating the row model.
|
|
96
|
+
*/
|
|
97
|
+
handleNavigationKey(item: TItem, event: KeyboardEvent): boolean;
|
|
98
|
+
move(currentItem: TItem, direction: RovingRowDirection): void;
|
|
99
|
+
private nextIndex;
|
|
100
|
+
private horizontalStep;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Per-component corner-radius / spacing-density override helpers.
|
|
105
|
+
*
|
|
106
|
+
* These mirror the global `theme-radius` / `theme-space` preset values from
|
|
107
|
+
* `@ojiepermana/angular/theme` — kept as a local copy so this package stays
|
|
108
|
+
* decoupled from the theme package (see its empty peer/deps on -theme).
|
|
109
|
+
*
|
|
110
|
+
* A component that accepts a `radius` / `density` input binds the resolved value
|
|
111
|
+
* onto its surface element via `[style.--radius-base]` / `[style.--spacing-base]`.
|
|
112
|
+
* Tailwind's `rounded-*` utilities resolve `calc(var(--radius-base) * n)` and the
|
|
113
|
+
* spacing utilities resolve `calc(var(--spacing-base) * n)` (see the theme's
|
|
114
|
+
* `base/tailwind.css` `@theme inline` mapping), so the override rescales that
|
|
115
|
+
* subtree and shadows the global `<html theme-radius|theme-space>` axis. The
|
|
116
|
+
* `'inherit'` preset binds nothing, so the component keeps following the axis.
|
|
117
|
+
*/
|
|
118
|
+
/** Corner-radius presets for a per-component `radius` input. */
|
|
119
|
+
declare const COMPONENT_RADII: readonly ["inherit", "none", "xs", "sm", "md", "xl", "full"];
|
|
120
|
+
type ComponentRadius = (typeof COMPONENT_RADII)[number];
|
|
121
|
+
/** Spacing-density presets for a per-component `density` input. */
|
|
122
|
+
declare const COMPONENT_DENSITIES: readonly ["inherit", "compact", "normal", "relaxed", "spacious"];
|
|
123
|
+
type ComponentDensity = (typeof COMPONENT_DENSITIES)[number];
|
|
124
|
+
/**
|
|
125
|
+
* Resolves a `radius` input to a `--radius-base` value, or `null` to inherit the
|
|
126
|
+
* global axis. Bind the result to the surface host: `[style.--radius-base]`.
|
|
127
|
+
*/
|
|
128
|
+
declare function radiusBaseValue(radius: ComponentRadius): string | null;
|
|
129
|
+
/**
|
|
130
|
+
* Resolves a `density` input to a `--spacing-base` value, or `null` to inherit
|
|
131
|
+
* the global axis. Bind the result to the surface host: `[style.--spacing-base]`.
|
|
132
|
+
*/
|
|
133
|
+
declare function densityBaseValue(density: ComponentDensity): string | null;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Returns a document-unique id with the given prefix, e.g. `uniqueId('Checkbox')`
|
|
137
|
+
* → `"checkbox-1"`. Single shared counter for every component in the library.
|
|
138
|
+
*
|
|
139
|
+
* @deprecated Use `injectUniqueId` or inject `UI_ID_GENERATOR`. This legacy
|
|
140
|
+
* function cannot isolate concurrent server-rendering requests.
|
|
141
|
+
*/
|
|
142
|
+
declare function uniqueId(prefix: string): string;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* One safe way to touch `localStorage`, for every library that persists a
|
|
146
|
+
* preference.
|
|
147
|
+
*
|
|
148
|
+
* The same "reach localStorage through the document's window, wrap everything in
|
|
149
|
+
* try/catch" block was hand-copied across the theme axes and the navigation
|
|
150
|
+
* persistence unit. Every copy had to get three things right:
|
|
151
|
+
*
|
|
152
|
+
* 1. there may be no document at all (server side rendering),
|
|
153
|
+
* 2. `window.localStorage` can THROW on property access, not just on `getItem`
|
|
154
|
+
* (a blocked or partitioned storage), so the getter itself needs guarding,
|
|
155
|
+
* 3. a quota error on write must never break the caller.
|
|
156
|
+
*
|
|
157
|
+
* This lives in `component/utils/core` rather than in the theme package on
|
|
158
|
+
* purpose: `navigation` also needs it, and navigation must not depend on
|
|
159
|
+
* `theme`, which already depends on navigation. Both already depend on this
|
|
160
|
+
* entry point.
|
|
161
|
+
*/
|
|
162
|
+
/** A storage that never throws. Missing storage reads as `null` and writes are dropped. */
|
|
163
|
+
interface WebStorageRef {
|
|
164
|
+
read(key: string): string | null;
|
|
165
|
+
write(key: string, value: string): void;
|
|
166
|
+
remove(key: string): void;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* `localStorage` reached through a document's own window.
|
|
170
|
+
*
|
|
171
|
+
* Resolved lazily on every call and never cached: the property access is the
|
|
172
|
+
* part that can throw, and a storage that is blocked now may be available later
|
|
173
|
+
* (or the other way round).
|
|
174
|
+
*/
|
|
175
|
+
declare function documentLocalStorage(documentRef: Document | null | undefined): WebStorageRef;
|
|
176
|
+
/**
|
|
177
|
+
* `localStorage` from the global scope, for callers that only know whether they
|
|
178
|
+
* are in a browser (the `isPlatformBrowser` flavour) rather than holding a
|
|
179
|
+
* `Document`.
|
|
180
|
+
*/
|
|
181
|
+
declare function globalLocalStorage(isBrowser: boolean): WebStorageRef;
|
|
182
|
+
|
|
183
|
+
export { COMPONENT_DENSITIES, COMPONENT_RADII, RovingRow, UI_ID_GENERATOR, UiIdGenerator, cn, densityBaseValue, documentLocalStorage, globalLocalStorage, injectUniqueId, radiusBaseValue, uniqueId };
|
|
184
|
+
export type { ComponentDensity, ComponentRadius, RovingRowConfig, RovingRowDirection, RovingRowItem, RovingRowScope, RovingRowTrigger, WebStorageRef };
|
|
@@ -1 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
import { ConnectedPosition, OverlayRef } from '@angular/cdk/overlay';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
|
|
4
|
+
type OverlaySide = 'top' | 'right' | 'bottom' | 'left';
|
|
5
|
+
type OverlayAlign = 'start' | 'center' | 'end';
|
|
6
|
+
/**
|
|
7
|
+
* Builds the CDK `ConnectedPosition` for a shadcn-style `side`/`align`/`sideOffset`
|
|
8
|
+
* triple. Shared by every anchored overlay in the library (popover, tooltip,
|
|
9
|
+
* hover-card, menus, combobox).
|
|
10
|
+
*/
|
|
11
|
+
declare function connectedPositionFor(side: OverlaySide, align: OverlayAlign, sideOffset: number): ConnectedPosition;
|
|
12
|
+
declare function oppositeSide(side: OverlaySide): OverlaySide;
|
|
13
|
+
/**
|
|
14
|
+
* Emits whenever the user dismisses the overlay: pointer down outside (ignoring
|
|
15
|
+
* the origin element so trigger clicks keep toggling), Escape, or detachment.
|
|
16
|
+
* Subscribers decide how to close.
|
|
17
|
+
*/
|
|
18
|
+
declare function overlayDismissals(overlayRef: OverlayRef, origin?: HTMLElement): Observable<unknown>;
|
|
19
|
+
|
|
20
|
+
export { connectedPositionFor, oppositeSide, overlayDismissals };
|
|
21
|
+
export type { OverlayAlign, OverlaySide };
|
|
@@ -1 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shared host behavior for the per-component radius and density axes.
|
|
5
|
+
*
|
|
6
|
+
* Components expose the directive inputs through `hostDirectives`, preserving
|
|
7
|
+
* their public `radius`/`density` API while keeping the CSS-variable mapping in
|
|
8
|
+
* one implementation.
|
|
9
|
+
*/
|
|
10
|
+
declare class ComponentScaleDirective {
|
|
11
|
+
readonly radius: _angular_core.InputSignal<"inherit" | "none" | "xs" | "sm" | "md" | "xl" | "full">;
|
|
12
|
+
readonly density: _angular_core.InputSignal<"inherit" | "compact" | "normal" | "relaxed" | "spacious">;
|
|
13
|
+
readonly radiusBase: _angular_core.Signal<string | null>;
|
|
14
|
+
readonly densityBase: _angular_core.Signal<string | null>;
|
|
15
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComponentScaleDirective, never>;
|
|
16
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComponentScaleDirective, never, never, { "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { ComponentScaleDirective };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from '@ojiepermana/angular
|
|
1
|
+
export * from '@ojiepermana/angular/component/utils/core';
|
|
2
|
+
export * from '@ojiepermana/angular/component/utils/overlay';
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
export { };
|
|
@@ -1 +1,59 @@
|
|
|
1
|
-
|
|
1
|
+
import { InjectionToken, Signal } from '@angular/core';
|
|
2
|
+
import { IsActiveMatchOptions, ActivatedRoute } from '@angular/router';
|
|
3
|
+
import { NavigationRegisterInput, NavigationState, NavigationItem, NavigationType, NavigationPosition, NavigationDockbarMode, NavigationNormalizedItem, NavigationOrientation, NavigationIconContext, NavigationResolvedRouteContext } from '@ojiepermana/angular/navigation/types';
|
|
4
|
+
|
|
5
|
+
/** Stable contract consumed by navigation UI, independently of its state implementation. */
|
|
6
|
+
interface NavigationAdapter {
|
|
7
|
+
register(input: NavigationRegisterInput, owner?: object): NavigationState;
|
|
8
|
+
unregister(id: string, owner?: object): void;
|
|
9
|
+
state(id: string): Signal<NavigationState | null>;
|
|
10
|
+
currentState(id: string): NavigationState | null;
|
|
11
|
+
data(id: string): Signal<readonly NavigationItem[]>;
|
|
12
|
+
publishData(id: string, data: readonly NavigationItem[], owner?: object): void;
|
|
13
|
+
clearData(id: string, owner?: object): void;
|
|
14
|
+
currentPanelKey(id: string): string | null;
|
|
15
|
+
update(id: string, patch: Partial<NavigationRegisterInput>): NavigationState;
|
|
16
|
+
setType(id: string, type: NavigationType): NavigationState;
|
|
17
|
+
setPosition(id: string, position: NavigationPosition): NavigationState;
|
|
18
|
+
setCollapsed(id: string, collapsed: boolean): NavigationState;
|
|
19
|
+
toggleCollapsed(id: string): NavigationState;
|
|
20
|
+
setDockbarMode(id: string, mode: NavigationDockbarMode): NavigationState;
|
|
21
|
+
isRouterItem(item: NavigationNormalizedItem): boolean;
|
|
22
|
+
hrefFor(item: NavigationNormalizedItem): string | null;
|
|
23
|
+
relFor(item: NavigationNormalizedItem): string | null;
|
|
24
|
+
routerLinkActiveOptions(item: NavigationNormalizedItem): IsActiveMatchOptions;
|
|
25
|
+
itemRole(orientation: NavigationOrientation, level: number): 'menuitem' | null;
|
|
26
|
+
compactLabel(item: NavigationNormalizedItem, compact: boolean): string | null;
|
|
27
|
+
titleFor(item: NavigationNormalizedItem, compact: boolean): string | null;
|
|
28
|
+
compactFallback(item: NavigationNormalizedItem): string;
|
|
29
|
+
iconContext(item: NavigationNormalizedItem, active: boolean, level: number, orientation: NavigationOrientation): NavigationIconContext;
|
|
30
|
+
isItemActive(item: NavigationNormalizedItem, activeIds: ReadonlySet<string>, explicitActiveUrl: string | null): boolean;
|
|
31
|
+
isPanelOpen(item: NavigationNormalizedItem): boolean;
|
|
32
|
+
isPanelOpen(navId: string, item: NavigationNormalizedItem): boolean;
|
|
33
|
+
openPanel(item: NavigationNormalizedItem): void;
|
|
34
|
+
openPanel(navId: string, item: NavigationNormalizedItem): void;
|
|
35
|
+
togglePanel(item: NavigationNormalizedItem): void;
|
|
36
|
+
togglePanel(navId: string, item: NavigationNormalizedItem): void;
|
|
37
|
+
closePanel(id?: string): void;
|
|
38
|
+
dockbarGroups(items: readonly NavigationNormalizedItem[]): readonly NavigationNormalizedItem[];
|
|
39
|
+
resolveDockbarGroup(id: string, items: readonly NavigationNormalizedItem[], mode: NavigationDockbarMode, activeIds: ReadonlySet<string>, activeUrl: string | null): NavigationNormalizedItem | null;
|
|
40
|
+
isDrawerOpen(id: string): boolean;
|
|
41
|
+
openDrawer(id: string): void;
|
|
42
|
+
toggleDrawer(id: string): void;
|
|
43
|
+
closeDrawer(id: string): void;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Kontrak terpisah untuk Router context agar custom `NavigationAdapter` lama
|
|
47
|
+
* tidak perlu mengimplementasikan method baru.
|
|
48
|
+
*/
|
|
49
|
+
interface NavigationRouteContextAdapter {
|
|
50
|
+
readonly routeContext: Signal<NavigationResolvedRouteContext>;
|
|
51
|
+
isItemRouteActive(item: NavigationNormalizedItem, explicitActiveUrl: string | null, relativeTo?: ActivatedRoute | null): boolean;
|
|
52
|
+
}
|
|
53
|
+
/** Override this token to supply a custom state/persistence adapter. */
|
|
54
|
+
declare const NAVIGATION_ADAPTER: InjectionToken<NavigationAdapter>;
|
|
55
|
+
/** Override token ini untuk memasok route context dari router/state host lain. */
|
|
56
|
+
declare const NAVIGATION_ROUTE_CONTEXT_ADAPTER: InjectionToken<NavigationRouteContextAdapter>;
|
|
57
|
+
|
|
58
|
+
export { NAVIGATION_ADAPTER, NAVIGATION_ROUTE_CONTEXT_ADAPTER };
|
|
59
|
+
export type { NavigationAdapter, NavigationRouteContextAdapter };
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { NavigationIconContext } from '@ojiepermana/angular/navigation/types';
|
|
4
|
+
|
|
5
|
+
declare class NavigationIconDirective {
|
|
6
|
+
readonly template: TemplateRef<NavigationIconContext>;
|
|
7
|
+
static ngTemplateContextGuard(_directive: NavigationIconDirective, context: unknown): context is NavigationIconContext;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationIconDirective, never>;
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NavigationIconDirective, "ng-template[NavigationIcon]", never, {}, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { NavigationIconDirective };
|
|
@@ -1 +1,116 @@
|
|
|
1
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Signal } from '@angular/core';
|
|
3
|
+
import { IsActiveMatchOptions, ActivatedRoute } from '@angular/router';
|
|
4
|
+
import { NavigationResolvedRouteContext, NavigationRegisterInput, NavigationState, NavigationItem, NavigationType, NavigationPosition, NavigationDockbarMode, NavigationNormalizedItem, NavigationOrientation, NavigationIconContext } from '@ojiepermana/angular/navigation/types';
|
|
5
|
+
export { NavigationDockbarMode, NavigationIconContext, NavigationItem, NavigationLink, NavigationNormalizedItem, NavigationOrientation, NavigationPosition, NavigationRegisterInput, NavigationState, NavigationType } from '@ojiepermana/angular/navigation/types';
|
|
6
|
+
|
|
7
|
+
declare class NavigationService {
|
|
8
|
+
private readonly documentRef;
|
|
9
|
+
private readonly persistence;
|
|
10
|
+
private readonly router;
|
|
11
|
+
private readonly urlResolver;
|
|
12
|
+
private readonly routerUrl;
|
|
13
|
+
private readonly states;
|
|
14
|
+
private readonly openPanelKeys;
|
|
15
|
+
private readonly drawerOpenState;
|
|
16
|
+
/** Data mentah per id, dipublikasikan oleh `<Navigation>` agar surface lain (mis. apps-launcher di `Page`) bisa membaca nav by id tanpa mendaftarkan ulang id yang sama. */
|
|
17
|
+
private readonly dataById;
|
|
18
|
+
/** Semua publisher hidup per data id. Publisher terakhir menjadi sumber aktif; cleanup owner lama tidak boleh menghapus publisher baru. */
|
|
19
|
+
private readonly dataPublishers;
|
|
20
|
+
/** Token stabil untuk pemanggil legacy yang tidak mengirim owner. */
|
|
21
|
+
private readonly ownerlessDataPublisher;
|
|
22
|
+
/** id navigasi → token owner instance, untuk menjaga setiap id hanya dipakai satu <Navigation> hidup. */
|
|
23
|
+
private readonly idOwners;
|
|
24
|
+
readonly openPanelKey: Signal<string | null>;
|
|
25
|
+
/** Route aktif yang sudah dinormalisasi untuk consumer dockbar route-aware. */
|
|
26
|
+
readonly routeContext: Signal<NavigationResolvedRouteContext>;
|
|
27
|
+
readonly exactMatchOptions: IsActiveMatchOptions;
|
|
28
|
+
readonly subsetMatchOptions: IsActiveMatchOptions;
|
|
29
|
+
constructor();
|
|
30
|
+
/**
|
|
31
|
+
* Panel eksplisit (klik trigger rail/navbar) adalah state telusur sementara.
|
|
32
|
+
* Perpindahan path harus mengembalikan panel ke resolusi URL: tanpa pelepasan
|
|
33
|
+
* ini, dockbar sticky terkunci pada group lama sampai browser di-refresh,
|
|
34
|
+
* karena `resolveDockbarGroup` memprioritaskan panel key di atas pencocokan
|
|
35
|
+
* URL. Navigasi yang hanya mengubah query/fragment tidak melepas panel agar
|
|
36
|
+
* penelusuran group lain tidak tersentak oleh update background (mis. sort
|
|
37
|
+
* state yang ditulis ke query params).
|
|
38
|
+
*/
|
|
39
|
+
private releasePanelsAfterNavigation;
|
|
40
|
+
private urlPath;
|
|
41
|
+
private readRouteContext;
|
|
42
|
+
private optionalString;
|
|
43
|
+
register(input: NavigationRegisterInput, owner?: object): NavigationState;
|
|
44
|
+
unregister(id: string, owner?: object): void;
|
|
45
|
+
/**
|
|
46
|
+
* Validasi keunikan id navigasi: setiap instance `<Navigation>` wajib memakai id unik.
|
|
47
|
+
* `owner` adalah token unik per instance — klaim ulang oleh owner yang sama (mis. perubahan
|
|
48
|
+
* input) diizinkan, tetapi dua instance hidup dengan id sama dianggap salah konfigurasi dan
|
|
49
|
+
* melempar error di mode dev. Pemanggil tanpa owner (akses langsung service) dilewati.
|
|
50
|
+
*/
|
|
51
|
+
private claimId;
|
|
52
|
+
private releaseId;
|
|
53
|
+
state(id: string): Signal<NavigationState | null>;
|
|
54
|
+
currentState(id: string): NavigationState | null;
|
|
55
|
+
/** Data terdaftar untuk sebuah id sebagai signal; `[]` bila belum ada `<Navigation>` dengan id tersebut. */
|
|
56
|
+
data(id: string): Signal<readonly NavigationItem[]>;
|
|
57
|
+
/** Dipanggil `<Navigation>` untuk mempublikasikan datanya ke registry by id. */
|
|
58
|
+
publishData(id: string, data: readonly NavigationItem[], owner?: object): void;
|
|
59
|
+
/** Dipanggil `<Navigation>` saat destroy untuk melepas datanya dari registry. */
|
|
60
|
+
clearData(id: string, owner?: object): void;
|
|
61
|
+
currentPanelKey(id: string): string | null;
|
|
62
|
+
update(id: string, patch: Partial<NavigationRegisterInput>): NavigationState;
|
|
63
|
+
setType(id: string, type: NavigationType): NavigationState;
|
|
64
|
+
setPosition(id: string, position: NavigationPosition): NavigationState;
|
|
65
|
+
setCollapsed(id: string, collapsed: boolean): NavigationState;
|
|
66
|
+
toggleCollapsed(id: string): NavigationState;
|
|
67
|
+
setDockbarMode(id: string, mode: NavigationDockbarMode): NavigationState;
|
|
68
|
+
isRouterItem(item: NavigationNormalizedItem): boolean;
|
|
69
|
+
hrefFor(item: NavigationNormalizedItem): string | null;
|
|
70
|
+
/**
|
|
71
|
+
* A consumer `rel` is unioned with the safe default rather than replacing it:
|
|
72
|
+
* returning `rel="external"` verbatim on a `_blank` link dropped `noopener`
|
|
73
|
+
* and handed the opened page a live `window.opener`.
|
|
74
|
+
*/
|
|
75
|
+
relFor(item: NavigationNormalizedItem): string | null;
|
|
76
|
+
routerLinkActiveOptions(item: NavigationNormalizedItem): IsActiveMatchOptions;
|
|
77
|
+
itemRole(orientation: NavigationOrientation, level: number): 'menuitem' | null;
|
|
78
|
+
compactLabel(item: NavigationNormalizedItem, compact: boolean): string | null;
|
|
79
|
+
titleFor(item: NavigationNormalizedItem, compact: boolean): string | null;
|
|
80
|
+
compactFallback(item: NavigationNormalizedItem): string;
|
|
81
|
+
iconContext(item: NavigationNormalizedItem, active: boolean, level: number, orientation: NavigationOrientation): NavigationIconContext;
|
|
82
|
+
isItemActive(item: NavigationNormalizedItem, activeIds: ReadonlySet<string>, explicitActiveUrl: string | null): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Pencocokan route murni untuk state dockbar berbasis Router. Berbeda dari
|
|
85
|
+
* `isItemActive`, konfigurasi legacy `item.active` dan `activeIds` sengaja
|
|
86
|
+
* tidak ikut menentukan group route aktif.
|
|
87
|
+
*/
|
|
88
|
+
isItemRouteActive(item: NavigationNormalizedItem, explicitActiveUrl: string | null, relativeTo?: ActivatedRoute | null): boolean;
|
|
89
|
+
private matchesActiveTreeDeep;
|
|
90
|
+
/**
|
|
91
|
+
* The active URL is parsed once per top-level call and handed down the
|
|
92
|
+
* recursion; re-parsing it at every node turned one navigation into hundreds
|
|
93
|
+
* of identical `parseUrl` calls.
|
|
94
|
+
*/
|
|
95
|
+
private activeMatch;
|
|
96
|
+
isPanelOpen(item: NavigationNormalizedItem): boolean;
|
|
97
|
+
isPanelOpen(navId: string, item: NavigationNormalizedItem): boolean;
|
|
98
|
+
openPanel(item: NavigationNormalizedItem): void;
|
|
99
|
+
openPanel(navId: string, item: NavigationNormalizedItem): void;
|
|
100
|
+
togglePanel(item: NavigationNormalizedItem): void;
|
|
101
|
+
togglePanel(navId: string, item: NavigationNormalizedItem): void;
|
|
102
|
+
closePanel(id?: string): void;
|
|
103
|
+
dockbarGroups(items: readonly NavigationNormalizedItem[]): readonly NavigationNormalizedItem[];
|
|
104
|
+
resolveDockbarGroup(id: string, items: readonly NavigationNormalizedItem[], mode: NavigationDockbarMode, activeIds: ReadonlySet<string>, activeUrl: string | null): NavigationNormalizedItem | null;
|
|
105
|
+
isDrawerOpen(id: string): boolean;
|
|
106
|
+
openDrawer(id: string): void;
|
|
107
|
+
toggleDrawer(id: string): void;
|
|
108
|
+
closeDrawer(id: string): void;
|
|
109
|
+
private matchesActiveTree;
|
|
110
|
+
private withoutKey;
|
|
111
|
+
private resolvePanelArgs;
|
|
112
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationService, never>;
|
|
113
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NavigationService>;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export { NavigationService };
|