@edsis/angular 22.1.6 → 22.2.10
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/LICENSE +21 -0
- package/README.md +87 -399
- package/SECURITY.md +18 -0
- package/SUPPORT.md +15 -0
- package/chart/README.md +275 -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 +125 -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 +146 -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 +52 -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/edsis-angular-chart-area.mjs +508 -0
- package/fesm2022/edsis-angular-chart-bar.mjs +946 -0
- package/fesm2022/edsis-angular-chart-core.mjs +1319 -0
- package/fesm2022/edsis-angular-chart-line.mjs +544 -0
- package/fesm2022/edsis-angular-chart-pie.mjs +531 -0
- package/fesm2022/edsis-angular-chart-primitives.mjs +1647 -0
- package/fesm2022/edsis-angular-chart-radar.mjs +693 -0
- package/fesm2022/edsis-angular-chart-radial.mjs +542 -0
- package/fesm2022/edsis-angular-chart-scatter.mjs +486 -0
- package/fesm2022/edsis-angular-chart.mjs +3 -0
- package/fesm2022/edsis-angular-component-accordion.mjs +513 -0
- package/fesm2022/edsis-angular-component-alert-dialog.mjs +1001 -0
- package/fesm2022/edsis-angular-component-alert.mjs +268 -0
- package/fesm2022/edsis-angular-component-aspect-ratio.mjs +80 -0
- package/fesm2022/edsis-angular-component-avatar.mjs +410 -0
- package/fesm2022/edsis-angular-component-badge.mjs +111 -0
- package/fesm2022/edsis-angular-component-breadcrumb.mjs +464 -0
- package/fesm2022/edsis-angular-component-button-group.mjs +252 -0
- package/fesm2022/edsis-angular-component-button.mjs +155 -0
- package/fesm2022/edsis-angular-component-calendar.mjs +835 -0
- package/fesm2022/edsis-angular-component-card.mjs +460 -0
- package/fesm2022/edsis-angular-component-carousel.mjs +700 -0
- package/fesm2022/edsis-angular-component-checkbox.mjs +398 -0
- package/fesm2022/edsis-angular-component-collapsible.mjs +305 -0
- package/fesm2022/edsis-angular-component-combobox.mjs +544 -0
- package/fesm2022/edsis-angular-component-command.mjs +815 -0
- package/fesm2022/edsis-angular-component-composer.mjs +840 -0
- package/fesm2022/edsis-angular-component-context-menu.mjs +197 -0
- package/fesm2022/edsis-angular-component-date-picker.mjs +798 -0
- package/fesm2022/edsis-angular-component-dialog.mjs +798 -0
- package/fesm2022/edsis-angular-component-drawer.mjs +1 -0
- package/fesm2022/edsis-angular-component-dropdown-menu.mjs +1259 -0
- package/fesm2022/edsis-angular-component-editor.mjs +1000 -0
- package/fesm2022/edsis-angular-component-empty.mjs +351 -0
- package/fesm2022/edsis-angular-component-form.mjs +821 -0
- package/fesm2022/edsis-angular-component-hover-card.mjs +486 -0
- package/fesm2022/edsis-angular-component-icon.mjs +253 -0
- package/fesm2022/edsis-angular-component-input-group.mjs +453 -0
- package/fesm2022/edsis-angular-component-input-otp.mjs +957 -0
- package/fesm2022/edsis-angular-component-input.mjs +87 -0
- package/fesm2022/edsis-angular-component-item.mjs +720 -0
- package/fesm2022/edsis-angular-component-kanban.mjs +812 -0
- package/fesm2022/edsis-angular-component-kbd.mjs +124 -0
- package/fesm2022/edsis-angular-component-label.mjs +82 -0
- package/fesm2022/edsis-angular-component-menubar.mjs +481 -0
- package/fesm2022/edsis-angular-component-native-select.mjs +168 -0
- package/fesm2022/edsis-angular-component-navigation-menu.mjs +685 -0
- package/fesm2022/edsis-angular-component-pagination.mjs +425 -0
- package/fesm2022/edsis-angular-component-pillbox.mjs +1679 -0
- package/fesm2022/edsis-angular-component-popover.mjs +292 -0
- package/fesm2022/edsis-angular-component-progress.mjs +184 -0
- package/fesm2022/edsis-angular-component-radio.mjs +491 -0
- package/fesm2022/edsis-angular-component-resizable.mjs +703 -0
- package/fesm2022/edsis-angular-component-scroll-area.mjs +133 -0
- package/fesm2022/edsis-angular-component-segmented-control.mjs +408 -0
- package/fesm2022/edsis-angular-component-select.mjs +743 -0
- package/fesm2022/edsis-angular-component-separator.mjs +102 -0
- package/fesm2022/edsis-angular-component-sheet.mjs +874 -0
- package/fesm2022/edsis-angular-component-skeleton.mjs +62 -0
- package/fesm2022/edsis-angular-component-slider.mjs +676 -0
- package/fesm2022/edsis-angular-component-spinner.mjs +157 -0
- package/fesm2022/edsis-angular-component-switch.mjs +361 -0
- package/fesm2022/edsis-angular-component-table.mjs +446 -0
- package/fesm2022/edsis-angular-component-tabs.mjs +592 -0
- package/fesm2022/edsis-angular-component-textarea.mjs +85 -0
- package/fesm2022/edsis-angular-component-timeline.mjs +619 -0
- package/fesm2022/edsis-angular-component-toast.mjs +231 -0
- package/fesm2022/edsis-angular-component-toggle-group.mjs +579 -0
- package/fesm2022/edsis-angular-component-toggle.mjs +189 -0
- package/fesm2022/edsis-angular-component-tooltip.mjs +804 -0
- package/fesm2022/edsis-angular-component-utils-core.mjs +181 -0
- package/fesm2022/edsis-angular-component-utils-overlay.mjs +54 -0
- package/fesm2022/edsis-angular-component-utils-scale.mjs +76 -0
- package/fesm2022/edsis-angular-component-utils.mjs +2 -0
- package/fesm2022/edsis-angular-component.mjs +0 -0
- package/fesm2022/edsis-angular-navigation-core.mjs +15 -0
- package/fesm2022/edsis-angular-navigation-icon.mjs +35 -0
- package/fesm2022/edsis-angular-navigation-navigation-badge-count.component-D70Ju6_f.mjs +234 -0
- package/fesm2022/edsis-angular-navigation-navigation-dockbar-menu.component-BaFnh48V.mjs +834 -0
- package/fesm2022/edsis-angular-navigation-navigation-entry-grid.component-D39W0FQZ.mjs +823 -0
- package/fesm2022/edsis-angular-navigation-navigation-flyout-menu.component-CpmsY8hb.mjs +670 -0
- package/fesm2022/edsis-angular-navigation-navigation-horizontal.component-D35IfX6r.mjs +689 -0
- package/fesm2022/edsis-angular-navigation-navigation-item.component-X6JFy-ya.mjs +1522 -0
- package/fesm2022/edsis-angular-navigation-navigation-list.component-D6Ms8H5g.mjs +346 -0
- package/fesm2022/edsis-angular-navigation-service.mjs +558 -0
- package/fesm2022/edsis-angular-navigation-types.mjs +151 -0
- package/fesm2022/edsis-angular-navigation.mjs +3338 -0
- package/fesm2022/edsis-angular-sdk.mjs +100 -0
- package/fesm2022/edsis-angular-theme-component-settings.mjs +1863 -0
- package/fesm2022/edsis-angular-theme-layout-services.mjs +252 -0
- package/fesm2022/edsis-angular-theme-layout-types.mjs +45 -0
- package/fesm2022/edsis-angular-theme-layout-wrapper.mjs +2568 -0
- package/fesm2022/edsis-angular-theme-layout.mjs +1089 -0
- package/fesm2022/edsis-angular-theme-on-fill.mjs +89 -0
- package/fesm2022/edsis-angular-theme-page-core.mjs +315 -0
- package/fesm2022/edsis-angular-theme-page-filter.mjs +409 -0
- package/fesm2022/edsis-angular-theme-page-overview.mjs +88 -0
- package/fesm2022/edsis-angular-theme-page-root.mjs +693 -0
- package/fesm2022/edsis-angular-theme-page-side.mjs +342 -0
- package/fesm2022/edsis-angular-theme-page-slots.mjs +258 -0
- package/fesm2022/edsis-angular-theme-page.mjs +7 -0
- package/fesm2022/edsis-angular-theme-shell-services.mjs +231 -0
- package/fesm2022/edsis-angular-theme-shell-types.mjs +102 -0
- package/fesm2022/edsis-angular-theme-shell.mjs +1352 -0
- package/fesm2022/edsis-angular-theme-styles.mjs +605 -0
- package/fesm2022/edsis-angular-theme.mjs +0 -0
- package/fesm2022/edsis-angular.mjs +5 -8
- package/navigation/README.md +576 -0
- package/package.json +481 -52
- 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 +120 -0
- package/theme/component/settings/README.md +154 -0
- package/theme/layout/README.md +604 -0
- package/theme/page/README.md +505 -0
- package/theme/shell/README.md +344 -0
- package/theme/styles/README.md +251 -0
- package/theme/styles/css/base/components.css +577 -0
- package/theme/styles/css/base/index.css +14 -0
- package/theme/styles/css/base/on-fill.css +153 -0
- package/theme/styles/css/base/package.css +10 -0
- package/theme/styles/css/base/prefers-dark.css +81 -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 +208 -0
- package/theme/styles/css/base/theme.css +306 -0
- package/theme/styles/css/base/tokens.css +388 -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/fonts.css +85 -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/edsis-angular-chart-area.d.ts +139 -0
- package/types/edsis-angular-chart-bar.d.ts +291 -0
- package/types/edsis-angular-chart-core.d.ts +824 -0
- package/types/edsis-angular-chart-line.d.ts +148 -0
- package/types/edsis-angular-chart-pie.d.ts +207 -0
- package/types/edsis-angular-chart-primitives.d.ts +360 -0
- package/types/edsis-angular-chart-radar.d.ts +198 -0
- package/types/edsis-angular-chart-radial.d.ts +187 -0
- package/types/edsis-angular-chart-scatter.d.ts +181 -0
- package/types/edsis-angular-chart.d.ts +3 -0
- package/types/edsis-angular-component-accordion.d.ts +139 -0
- package/types/edsis-angular-component-alert-dialog.d.ts +288 -0
- package/types/edsis-angular-component-alert.d.ts +72 -0
- package/types/edsis-angular-component-aspect-ratio.d.ts +20 -0
- package/types/edsis-angular-component-avatar.d.ts +111 -0
- package/types/edsis-angular-component-badge.d.ts +36 -0
- package/types/edsis-angular-component-breadcrumb.d.ts +85 -0
- package/types/edsis-angular-component-button-group.d.ts +50 -0
- package/types/edsis-angular-component-button.d.ts +44 -0
- package/types/edsis-angular-component-calendar.d.ts +150 -0
- package/types/edsis-angular-component-card.d.ts +123 -0
- package/types/edsis-angular-component-carousel.d.ts +155 -0
- package/types/edsis-angular-component-checkbox.d.ts +100 -0
- package/types/edsis-angular-component-collapsible.d.ts +68 -0
- package/types/edsis-angular-component-combobox.d.ts +105 -0
- package/types/edsis-angular-component-command.d.ts +215 -0
- package/types/edsis-angular-component-composer.d.ts +190 -0
- package/types/edsis-angular-component-context-menu.d.ts +64 -0
- package/types/edsis-angular-component-date-picker.d.ts +199 -0
- package/types/edsis-angular-component-dialog.d.ts +231 -0
- package/types/edsis-angular-component-drawer.d.ts +2 -0
- package/types/edsis-angular-component-dropdown-menu.d.ts +370 -0
- package/types/edsis-angular-component-editor.d.ts +234 -0
- package/types/edsis-angular-component-empty.d.ts +85 -0
- package/types/edsis-angular-component-form.d.ts +223 -0
- package/types/edsis-angular-component-hover-card.d.ts +133 -0
- package/types/edsis-angular-component-icon.d.ts +90 -0
- package/types/edsis-angular-component-input-group.d.ts +98 -0
- package/types/edsis-angular-component-input-otp.d.ts +249 -0
- package/types/edsis-angular-component-input.d.ts +31 -0
- package/types/edsis-angular-component-item.d.ts +169 -0
- package/types/edsis-angular-component-kanban.d.ts +165 -0
- package/types/edsis-angular-component-kbd.d.ts +25 -0
- package/types/edsis-angular-component-label.d.ts +19 -0
- package/types/edsis-angular-component-menubar.d.ts +123 -0
- package/types/edsis-angular-component-native-select.d.ts +39 -0
- package/types/edsis-angular-component-navigation-menu.d.ts +163 -0
- package/types/edsis-angular-component-pagination.d.ts +83 -0
- package/types/edsis-angular-component-pillbox.d.ts +380 -0
- package/types/edsis-angular-component-popover.d.ts +96 -0
- package/types/edsis-angular-component-progress.d.ts +45 -0
- package/types/edsis-angular-component-radio.d.ts +137 -0
- package/types/edsis-angular-component-resizable.d.ts +166 -0
- package/types/edsis-angular-component-scroll-area.d.ts +37 -0
- package/types/edsis-angular-component-segmented-control.d.ts +102 -0
- package/types/edsis-angular-component-select.d.ts +138 -0
- package/types/edsis-angular-component-separator.d.ts +26 -0
- package/types/edsis-angular-component-sheet.d.ts +240 -0
- package/types/edsis-angular-component-skeleton.d.ts +13 -0
- package/types/edsis-angular-component-slider.d.ts +148 -0
- package/types/edsis-angular-component-spinner.d.ts +31 -0
- package/types/edsis-angular-component-switch.d.ts +101 -0
- package/types/edsis-angular-component-table.d.ts +109 -0
- package/types/edsis-angular-component-tabs.d.ts +183 -0
- package/types/edsis-angular-component-textarea.d.ts +27 -0
- package/types/edsis-angular-component-timeline.d.ts +146 -0
- package/types/edsis-angular-component-toast.d.ts +60 -0
- package/types/edsis-angular-component-toggle-group.d.ts +161 -0
- package/types/edsis-angular-component-toggle.d.ts +47 -0
- package/types/edsis-angular-component-tooltip.d.ts +233 -0
- package/types/edsis-angular-component-utils-core.d.ts +175 -0
- package/types/edsis-angular-component-utils-overlay.d.ts +17 -0
- package/types/edsis-angular-component-utils-scale.d.ts +27 -0
- package/types/edsis-angular-component-utils.d.ts +2 -0
- package/types/edsis-angular-component.d.ts +1 -0
- package/types/edsis-angular-navigation-core.d.ts +55 -0
- package/types/edsis-angular-navigation-icon.d.ts +9 -0
- package/types/edsis-angular-navigation-service.d.ts +121 -0
- package/types/edsis-angular-navigation-types.d.ts +185 -0
- package/types/edsis-angular-navigation.d.ts +862 -0
- package/types/edsis-angular-sdk.d.ts +87 -0
- package/types/edsis-angular-theme-component-settings.d.ts +205 -0
- package/types/edsis-angular-theme-layout-services.d.ts +143 -0
- package/types/edsis-angular-theme-layout-types.d.ts +36 -0
- package/types/edsis-angular-theme-layout-wrapper.d.ts +670 -0
- package/types/edsis-angular-theme-layout.d.ts +218 -0
- package/types/edsis-angular-theme-on-fill.d.ts +45 -0
- package/types/edsis-angular-theme-page-core.d.ts +151 -0
- package/types/edsis-angular-theme-page-filter.d.ts +127 -0
- package/types/edsis-angular-theme-page-overview.d.ts +28 -0
- package/types/edsis-angular-theme-page-root.d.ts +172 -0
- package/types/edsis-angular-theme-page-side.d.ts +90 -0
- package/types/edsis-angular-theme-page-slots.d.ts +61 -0
- package/types/edsis-angular-theme-page.d.ts +7 -0
- package/types/edsis-angular-theme-shell-services.d.ts +188 -0
- package/types/edsis-angular-theme-shell-types.d.ts +102 -0
- package/types/edsis-angular-theme-shell.d.ts +178 -0
- package/types/edsis-angular-theme-styles.d.ts +328 -0
- package/types/edsis-angular-theme.d.ts +1 -0
- package/types/edsis-angular.d.ts +5 -2
- package/fesm2022/edsis-angular-block-shell.mjs +0 -1329
- package/fesm2022/edsis-angular-block-shell.mjs.map +0 -1
- package/fesm2022/edsis-angular-block-themes.mjs +0 -1007
- package/fesm2022/edsis-angular-block-themes.mjs.map +0 -1
- package/fesm2022/edsis-angular-module-auth.mjs +0 -2582
- package/fesm2022/edsis-angular-module-auth.mjs.map +0 -1
- package/fesm2022/edsis-angular-platform-mfe.mjs +0 -329
- package/fesm2022/edsis-angular-platform-mfe.mjs.map +0 -1
- package/fesm2022/edsis-angular-services-runtime.mjs +0 -385
- package/fesm2022/edsis-angular-services-runtime.mjs.map +0 -1
- package/fesm2022/edsis-angular.mjs.map +0 -1
- package/types/edsis-angular-block-shell.d.ts +0 -190
- package/types/edsis-angular-block-themes.d.ts +0 -94
- package/types/edsis-angular-module-auth.d.ts +0 -533
- package/types/edsis-angular-platform-mfe.d.ts +0 -126
- package/types/edsis-angular-services-runtime.d.ts +0 -118
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, Directive, ElementRef, computed, forwardRef, inject, input, model, signal } from "@angular/core";
|
|
3
|
+
import { cn, injectUniqueId } from "@edsis/angular/component/utils/core";
|
|
4
|
+
import * as i1 from "@edsis/angular/component/utils/scale";
|
|
5
|
+
import { ComponentScaleDirective } from "@edsis/angular/component/utils/scale";
|
|
6
|
+
var TabsContextBase = class TabsContextBase {
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
8
|
+
minVersion: "12.0.0",
|
|
9
|
+
version: "22.2.4",
|
|
10
|
+
ngImport: i0,
|
|
11
|
+
type: TabsContextBase,
|
|
12
|
+
deps: [],
|
|
13
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
14
|
+
});
|
|
15
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
16
|
+
minVersion: "14.0.0",
|
|
17
|
+
version: "22.2.4",
|
|
18
|
+
type: TabsContextBase,
|
|
19
|
+
isStandalone: true,
|
|
20
|
+
ngImport: i0
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
24
|
+
minVersion: "12.0.0",
|
|
25
|
+
version: "22.2.4",
|
|
26
|
+
ngImport: i0,
|
|
27
|
+
type: TabsContextBase,
|
|
28
|
+
decorators: [{ type: Directive }]
|
|
29
|
+
});
|
|
30
|
+
var TabsListContextBase = class TabsListContextBase {
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
32
|
+
minVersion: "12.0.0",
|
|
33
|
+
version: "22.2.4",
|
|
34
|
+
ngImport: i0,
|
|
35
|
+
type: TabsListContextBase,
|
|
36
|
+
deps: [],
|
|
37
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
38
|
+
});
|
|
39
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
40
|
+
minVersion: "14.0.0",
|
|
41
|
+
version: "22.2.4",
|
|
42
|
+
type: TabsListContextBase,
|
|
43
|
+
isStandalone: true,
|
|
44
|
+
ngImport: i0
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
48
|
+
minVersion: "12.0.0",
|
|
49
|
+
version: "22.2.4",
|
|
50
|
+
ngImport: i0,
|
|
51
|
+
type: TabsListContextBase,
|
|
52
|
+
decorators: [{ type: Directive }]
|
|
53
|
+
});
|
|
54
|
+
var TabsComponent = class TabsComponent extends TabsContextBase {
|
|
55
|
+
componentScale = inject(ComponentScaleDirective);
|
|
56
|
+
radius = this.componentScale.radius;
|
|
57
|
+
density = this.componentScale.density;
|
|
58
|
+
value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
59
|
+
orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
60
|
+
class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
|
|
61
|
+
idPrefix = injectUniqueId("Tabs");
|
|
62
|
+
triggers = signal([], ...ngDevMode ? [{ debugName: "triggers" }] : /* istanbul ignore next */ []);
|
|
63
|
+
effectiveValue = computed(() => this.value() ?? this.enabledTriggers()[0]?.value() ?? null, ...ngDevMode ? [{ debugName: "effectiveValue" }] : /* istanbul ignore next */ []);
|
|
64
|
+
classes = computed(() => cn(this.orientation() === "vertical" ? "flex items-start gap-4" : "block", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
65
|
+
register(element, value, disabled) {
|
|
66
|
+
this.triggers.update((triggers) => [...triggers.filter((trigger) => trigger.element !== element), {
|
|
67
|
+
element,
|
|
68
|
+
value,
|
|
69
|
+
disabled
|
|
70
|
+
}].sort((a, b) => a.element.compareDocumentPosition(b.element) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1));
|
|
71
|
+
}
|
|
72
|
+
unregister(element) {
|
|
73
|
+
this.triggers.update((triggers) => triggers.filter((trigger) => trigger.element !== element));
|
|
74
|
+
}
|
|
75
|
+
tabIndexFor(element) {
|
|
76
|
+
const enabledTriggers = this.enabledTriggers();
|
|
77
|
+
const trigger = enabledTriggers.find((candidate) => candidate.element === element);
|
|
78
|
+
if (!trigger) return -1;
|
|
79
|
+
return (enabledTriggers.find((candidate) => candidate.value() === this.effectiveValue()) ?? enabledTriggers[0]) === trigger ? 0 : -1;
|
|
80
|
+
}
|
|
81
|
+
activate(value, focus = false) {
|
|
82
|
+
const trigger = this.triggerForValue(value);
|
|
83
|
+
if (!trigger || trigger.disabled()) return;
|
|
84
|
+
this.value.set(value);
|
|
85
|
+
if (focus) trigger.element.focus();
|
|
86
|
+
}
|
|
87
|
+
focusNext(from, offset) {
|
|
88
|
+
const enabledTriggers = this.enabledTriggers();
|
|
89
|
+
const currentIndex = enabledTriggers.findIndex((trigger) => trigger.element === from);
|
|
90
|
+
if (currentIndex < 0 || enabledTriggers.length === 0) return;
|
|
91
|
+
const nextTrigger = enabledTriggers[(currentIndex + offset + enabledTriggers.length) % enabledTriggers.length];
|
|
92
|
+
this.activate(nextTrigger.value(), true);
|
|
93
|
+
}
|
|
94
|
+
focusFirst() {
|
|
95
|
+
const firstTrigger = this.enabledTriggers()[0];
|
|
96
|
+
if (firstTrigger) this.activate(firstTrigger.value(), true);
|
|
97
|
+
}
|
|
98
|
+
focusLast() {
|
|
99
|
+
const enabledTriggers = this.enabledTriggers();
|
|
100
|
+
const lastTrigger = enabledTriggers[enabledTriggers.length - 1];
|
|
101
|
+
if (lastTrigger) this.activate(lastTrigger.value(), true);
|
|
102
|
+
}
|
|
103
|
+
triggerId(value) {
|
|
104
|
+
return `${this.idPrefix}-trigger-${this.normalizeValue(value)}`;
|
|
105
|
+
}
|
|
106
|
+
contentId(value) {
|
|
107
|
+
return `${this.idPrefix}-content-${this.normalizeValue(value)}`;
|
|
108
|
+
}
|
|
109
|
+
enabledTriggers() {
|
|
110
|
+
return this.triggers().filter((trigger) => !trigger.disabled());
|
|
111
|
+
}
|
|
112
|
+
triggerForValue(value) {
|
|
113
|
+
return this.triggers().find((trigger) => trigger.value() === value);
|
|
114
|
+
}
|
|
115
|
+
normalizeValue(value) {
|
|
116
|
+
return value.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "") || "tab";
|
|
117
|
+
}
|
|
118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
119
|
+
minVersion: "12.0.0",
|
|
120
|
+
version: "22.2.4",
|
|
121
|
+
ngImport: i0,
|
|
122
|
+
type: TabsComponent,
|
|
123
|
+
deps: null,
|
|
124
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
125
|
+
});
|
|
126
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
127
|
+
minVersion: "17.1.0",
|
|
128
|
+
version: "22.2.4",
|
|
129
|
+
type: TabsComponent,
|
|
130
|
+
isStandalone: true,
|
|
131
|
+
selector: "Tabs",
|
|
132
|
+
inputs: {
|
|
133
|
+
value: {
|
|
134
|
+
classPropertyName: "value",
|
|
135
|
+
publicName: "value",
|
|
136
|
+
isSignal: true,
|
|
137
|
+
isRequired: false,
|
|
138
|
+
transformFunction: null
|
|
139
|
+
},
|
|
140
|
+
orientation: {
|
|
141
|
+
classPropertyName: "orientation",
|
|
142
|
+
publicName: "orientation",
|
|
143
|
+
isSignal: true,
|
|
144
|
+
isRequired: false,
|
|
145
|
+
transformFunction: null
|
|
146
|
+
},
|
|
147
|
+
class: {
|
|
148
|
+
classPropertyName: "class",
|
|
149
|
+
publicName: "class",
|
|
150
|
+
isSignal: true,
|
|
151
|
+
isRequired: false,
|
|
152
|
+
transformFunction: null
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
outputs: { value: "valueChange" },
|
|
156
|
+
host: { properties: {
|
|
157
|
+
"class": "classes()",
|
|
158
|
+
"attr.data-orientation": "orientation()"
|
|
159
|
+
} },
|
|
160
|
+
providers: [{
|
|
161
|
+
provide: TabsContextBase,
|
|
162
|
+
useExisting: forwardRef(() => TabsComponent)
|
|
163
|
+
}],
|
|
164
|
+
usesInheritance: true,
|
|
165
|
+
hostDirectives: [{
|
|
166
|
+
directive: i1.ComponentScaleDirective,
|
|
167
|
+
inputs: [
|
|
168
|
+
"radius",
|
|
169
|
+
"radius",
|
|
170
|
+
"density",
|
|
171
|
+
"density"
|
|
172
|
+
]
|
|
173
|
+
}],
|
|
174
|
+
ngImport: i0,
|
|
175
|
+
template: `<ng-content />`,
|
|
176
|
+
isInline: true
|
|
177
|
+
});
|
|
178
|
+
};
|
|
179
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
180
|
+
minVersion: "12.0.0",
|
|
181
|
+
version: "22.2.4",
|
|
182
|
+
ngImport: i0,
|
|
183
|
+
type: TabsComponent,
|
|
184
|
+
decorators: [{
|
|
185
|
+
type: Component,
|
|
186
|
+
args: [{
|
|
187
|
+
selector: "Tabs",
|
|
188
|
+
hostDirectives: [{
|
|
189
|
+
directive: ComponentScaleDirective,
|
|
190
|
+
inputs: ["radius", "density"]
|
|
191
|
+
}],
|
|
192
|
+
providers: [{
|
|
193
|
+
provide: TabsContextBase,
|
|
194
|
+
useExisting: forwardRef(() => TabsComponent)
|
|
195
|
+
}],
|
|
196
|
+
host: {
|
|
197
|
+
"[class]": "classes()",
|
|
198
|
+
"[attr.data-orientation]": "orientation()"
|
|
199
|
+
},
|
|
200
|
+
template: `<ng-content />`
|
|
201
|
+
}]
|
|
202
|
+
}],
|
|
203
|
+
propDecorators: {
|
|
204
|
+
value: [{
|
|
205
|
+
type: i0.Input,
|
|
206
|
+
args: [{
|
|
207
|
+
isSignal: true,
|
|
208
|
+
alias: "value",
|
|
209
|
+
required: false
|
|
210
|
+
}]
|
|
211
|
+
}, {
|
|
212
|
+
type: i0.Output,
|
|
213
|
+
args: ["valueChange"]
|
|
214
|
+
}],
|
|
215
|
+
orientation: [{
|
|
216
|
+
type: i0.Input,
|
|
217
|
+
args: [{
|
|
218
|
+
isSignal: true,
|
|
219
|
+
alias: "orientation",
|
|
220
|
+
required: false
|
|
221
|
+
}]
|
|
222
|
+
}],
|
|
223
|
+
class: [{
|
|
224
|
+
type: i0.Input,
|
|
225
|
+
args: [{
|
|
226
|
+
isSignal: true,
|
|
227
|
+
alias: "class",
|
|
228
|
+
required: false
|
|
229
|
+
}]
|
|
230
|
+
}]
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
var TabsListComponent = class TabsListComponent extends TabsListContextBase {
|
|
234
|
+
ctx = inject(TabsComponent);
|
|
235
|
+
variant = input("default", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
236
|
+
class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
|
|
237
|
+
classes = computed(() => cn(this.variantClasses(), this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
238
|
+
listVariant() {
|
|
239
|
+
return this.variant();
|
|
240
|
+
}
|
|
241
|
+
variantClasses() {
|
|
242
|
+
if (this.variant() === "line") return this.ctx.orientation() === "vertical" ? "inline-flex flex-col items-stretch justify-start gap-1 border-e border-border bg-transparent p-0 pe-3 text-muted-foreground" : "inline-flex h-control-md items-center justify-start gap-4 border-b border-border bg-transparent p-0 text-muted-foreground";
|
|
243
|
+
return this.ctx.orientation() === "vertical" ? "inline-flex flex-col items-stretch justify-start rounded-md bg-muted p-1 text-muted-foreground" : "inline-flex h-control-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground";
|
|
244
|
+
}
|
|
245
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
246
|
+
minVersion: "12.0.0",
|
|
247
|
+
version: "22.2.4",
|
|
248
|
+
ngImport: i0,
|
|
249
|
+
type: TabsListComponent,
|
|
250
|
+
deps: null,
|
|
251
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
252
|
+
});
|
|
253
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
254
|
+
minVersion: "17.1.0",
|
|
255
|
+
version: "22.2.4",
|
|
256
|
+
type: TabsListComponent,
|
|
257
|
+
isStandalone: true,
|
|
258
|
+
selector: "TabsList",
|
|
259
|
+
inputs: {
|
|
260
|
+
variant: {
|
|
261
|
+
classPropertyName: "variant",
|
|
262
|
+
publicName: "variant",
|
|
263
|
+
isSignal: true,
|
|
264
|
+
isRequired: false,
|
|
265
|
+
transformFunction: null
|
|
266
|
+
},
|
|
267
|
+
class: {
|
|
268
|
+
classPropertyName: "class",
|
|
269
|
+
publicName: "class",
|
|
270
|
+
isSignal: true,
|
|
271
|
+
isRequired: false,
|
|
272
|
+
transformFunction: null
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
host: { properties: {
|
|
276
|
+
"class": "classes()",
|
|
277
|
+
"attr.role": "\"tablist\"",
|
|
278
|
+
"attr.aria-orientation": "ctx.orientation()",
|
|
279
|
+
"attr.data-variant": "variant()"
|
|
280
|
+
} },
|
|
281
|
+
providers: [{
|
|
282
|
+
provide: TabsListContextBase,
|
|
283
|
+
useExisting: forwardRef(() => TabsListComponent)
|
|
284
|
+
}],
|
|
285
|
+
usesInheritance: true,
|
|
286
|
+
ngImport: i0,
|
|
287
|
+
template: `<ng-content />`,
|
|
288
|
+
isInline: true
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
292
|
+
minVersion: "12.0.0",
|
|
293
|
+
version: "22.2.4",
|
|
294
|
+
ngImport: i0,
|
|
295
|
+
type: TabsListComponent,
|
|
296
|
+
decorators: [{
|
|
297
|
+
type: Component,
|
|
298
|
+
args: [{
|
|
299
|
+
selector: "TabsList",
|
|
300
|
+
providers: [{
|
|
301
|
+
provide: TabsListContextBase,
|
|
302
|
+
useExisting: forwardRef(() => TabsListComponent)
|
|
303
|
+
}],
|
|
304
|
+
host: {
|
|
305
|
+
"[class]": "classes()",
|
|
306
|
+
"[attr.role]": "\"tablist\"",
|
|
307
|
+
"[attr.aria-orientation]": "ctx.orientation()",
|
|
308
|
+
"[attr.data-variant]": "variant()"
|
|
309
|
+
},
|
|
310
|
+
template: `<ng-content />`
|
|
311
|
+
}]
|
|
312
|
+
}],
|
|
313
|
+
propDecorators: {
|
|
314
|
+
variant: [{
|
|
315
|
+
type: i0.Input,
|
|
316
|
+
args: [{
|
|
317
|
+
isSignal: true,
|
|
318
|
+
alias: "variant",
|
|
319
|
+
required: false
|
|
320
|
+
}]
|
|
321
|
+
}],
|
|
322
|
+
class: [{
|
|
323
|
+
type: i0.Input,
|
|
324
|
+
args: [{
|
|
325
|
+
isSignal: true,
|
|
326
|
+
alias: "class",
|
|
327
|
+
required: false
|
|
328
|
+
}]
|
|
329
|
+
}]
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
var TabsTriggerComponent = class TabsTriggerComponent {
|
|
333
|
+
ctx = inject(TabsComponent);
|
|
334
|
+
list = inject(TabsListContextBase, { optional: true });
|
|
335
|
+
el = inject(ElementRef);
|
|
336
|
+
value = input.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
337
|
+
disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
338
|
+
class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
|
|
339
|
+
selected = computed(() => this.ctx.effectiveValue() === this.value(), ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
|
|
340
|
+
tabIndex = computed(() => this.ctx.tabIndexFor(this.el.nativeElement), ...ngDevMode ? [{ debugName: "tabIndex" }] : /* istanbul ignore next */ []);
|
|
341
|
+
triggerId = computed(() => this.ctx.triggerId(this.value()), ...ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []);
|
|
342
|
+
contentId = computed(() => this.ctx.contentId(this.value()), ...ngDevMode ? [{ debugName: "contentId" }] : /* istanbul ignore next */ []);
|
|
343
|
+
classes = computed(() => cn("inline-flex items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium", "ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", "disabled:pointer-events-none disabled:opacity-50", this.variantClasses(), this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
344
|
+
ngOnInit() {
|
|
345
|
+
this.ctx.register(this.el.nativeElement, this.value, this.disabled);
|
|
346
|
+
}
|
|
347
|
+
ngOnDestroy() {
|
|
348
|
+
this.ctx.unregister(this.el.nativeElement);
|
|
349
|
+
}
|
|
350
|
+
onClick() {
|
|
351
|
+
if (this.disabled()) return;
|
|
352
|
+
this.ctx.activate(this.value());
|
|
353
|
+
}
|
|
354
|
+
onArrow(e, delta, axis) {
|
|
355
|
+
if (this.ctx.orientation() !== axis) return;
|
|
356
|
+
e.preventDefault();
|
|
357
|
+
this.ctx.focusNext(this.el.nativeElement, delta);
|
|
358
|
+
}
|
|
359
|
+
onHome(e) {
|
|
360
|
+
e.preventDefault();
|
|
361
|
+
this.ctx.focusFirst();
|
|
362
|
+
}
|
|
363
|
+
onEnd(e) {
|
|
364
|
+
e.preventDefault();
|
|
365
|
+
this.ctx.focusLast();
|
|
366
|
+
}
|
|
367
|
+
variantClasses() {
|
|
368
|
+
if ((this.list?.listVariant() ?? "default") === "line") return this.ctx.orientation() === "vertical" ? "w-full justify-start rounded-none border-e-2 border-transparent px-3 py-2 data-[state=active]:border-foreground data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none" : "rounded-none border-b-2 border-transparent px-2 py-2 data-[state=active]:border-foreground data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none";
|
|
369
|
+
return cn("rounded-sm px-3 py-1.5 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", this.ctx.orientation() === "vertical" && "w-full justify-start");
|
|
370
|
+
}
|
|
371
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
372
|
+
minVersion: "12.0.0",
|
|
373
|
+
version: "22.2.4",
|
|
374
|
+
ngImport: i0,
|
|
375
|
+
type: TabsTriggerComponent,
|
|
376
|
+
deps: [],
|
|
377
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
378
|
+
});
|
|
379
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
380
|
+
minVersion: "17.1.0",
|
|
381
|
+
version: "22.2.4",
|
|
382
|
+
type: TabsTriggerComponent,
|
|
383
|
+
isStandalone: true,
|
|
384
|
+
selector: "button[TabsTrigger]",
|
|
385
|
+
inputs: {
|
|
386
|
+
value: {
|
|
387
|
+
classPropertyName: "value",
|
|
388
|
+
publicName: "value",
|
|
389
|
+
isSignal: true,
|
|
390
|
+
isRequired: true,
|
|
391
|
+
transformFunction: null
|
|
392
|
+
},
|
|
393
|
+
disabled: {
|
|
394
|
+
classPropertyName: "disabled",
|
|
395
|
+
publicName: "disabled",
|
|
396
|
+
isSignal: true,
|
|
397
|
+
isRequired: false,
|
|
398
|
+
transformFunction: null
|
|
399
|
+
},
|
|
400
|
+
class: {
|
|
401
|
+
classPropertyName: "class",
|
|
402
|
+
publicName: "class",
|
|
403
|
+
isSignal: true,
|
|
404
|
+
isRequired: false,
|
|
405
|
+
transformFunction: null
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
host: {
|
|
409
|
+
attributes: { "type": "button" },
|
|
410
|
+
listeners: {
|
|
411
|
+
"click": "onClick()",
|
|
412
|
+
"keydown.arrowRight": "onArrow($any($event), 1, \"horizontal\")",
|
|
413
|
+
"keydown.arrowLeft": "onArrow($any($event), -1, \"horizontal\")",
|
|
414
|
+
"keydown.arrowDown": "onArrow($any($event), 1, \"vertical\")",
|
|
415
|
+
"keydown.arrowUp": "onArrow($any($event), -1, \"vertical\")",
|
|
416
|
+
"keydown.home": "onHome($any($event))",
|
|
417
|
+
"keydown.end": "onEnd($any($event))"
|
|
418
|
+
},
|
|
419
|
+
properties: {
|
|
420
|
+
"class": "classes()",
|
|
421
|
+
"id": "triggerId()",
|
|
422
|
+
"attr.role": "\"tab\"",
|
|
423
|
+
"attr.aria-selected": "selected()",
|
|
424
|
+
"attr.aria-controls": "contentId()",
|
|
425
|
+
"attr.aria-disabled": "disabled() ? \"true\" : null",
|
|
426
|
+
"attr.tabindex": "tabIndex()",
|
|
427
|
+
"attr.data-state": "selected() ? \"active\" : \"inactive\"",
|
|
428
|
+
"disabled": "disabled() || null"
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
ngImport: i0,
|
|
432
|
+
template: `<ng-content />`,
|
|
433
|
+
isInline: true
|
|
434
|
+
});
|
|
435
|
+
};
|
|
436
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
437
|
+
minVersion: "12.0.0",
|
|
438
|
+
version: "22.2.4",
|
|
439
|
+
ngImport: i0,
|
|
440
|
+
type: TabsTriggerComponent,
|
|
441
|
+
decorators: [{
|
|
442
|
+
type: Component,
|
|
443
|
+
args: [{
|
|
444
|
+
selector: "button[TabsTrigger]",
|
|
445
|
+
host: {
|
|
446
|
+
"[class]": "classes()",
|
|
447
|
+
"[id]": "triggerId()",
|
|
448
|
+
type: "button",
|
|
449
|
+
"[attr.role]": "\"tab\"",
|
|
450
|
+
"[attr.aria-selected]": "selected()",
|
|
451
|
+
"[attr.aria-controls]": "contentId()",
|
|
452
|
+
"[attr.aria-disabled]": "disabled() ? \"true\" : null",
|
|
453
|
+
"[attr.tabindex]": "tabIndex()",
|
|
454
|
+
"[attr.data-state]": "selected() ? \"active\" : \"inactive\"",
|
|
455
|
+
"[disabled]": "disabled() || null",
|
|
456
|
+
"(click)": "onClick()",
|
|
457
|
+
"(keydown.arrowRight)": "onArrow($any($event), 1, \"horizontal\")",
|
|
458
|
+
"(keydown.arrowLeft)": "onArrow($any($event), -1, \"horizontal\")",
|
|
459
|
+
"(keydown.arrowDown)": "onArrow($any($event), 1, \"vertical\")",
|
|
460
|
+
"(keydown.arrowUp)": "onArrow($any($event), -1, \"vertical\")",
|
|
461
|
+
"(keydown.home)": "onHome($any($event))",
|
|
462
|
+
"(keydown.end)": "onEnd($any($event))"
|
|
463
|
+
},
|
|
464
|
+
template: `<ng-content />`
|
|
465
|
+
}]
|
|
466
|
+
}],
|
|
467
|
+
propDecorators: {
|
|
468
|
+
value: [{
|
|
469
|
+
type: i0.Input,
|
|
470
|
+
args: [{
|
|
471
|
+
isSignal: true,
|
|
472
|
+
alias: "value",
|
|
473
|
+
required: true
|
|
474
|
+
}]
|
|
475
|
+
}],
|
|
476
|
+
disabled: [{
|
|
477
|
+
type: i0.Input,
|
|
478
|
+
args: [{
|
|
479
|
+
isSignal: true,
|
|
480
|
+
alias: "disabled",
|
|
481
|
+
required: false
|
|
482
|
+
}]
|
|
483
|
+
}],
|
|
484
|
+
class: [{
|
|
485
|
+
type: i0.Input,
|
|
486
|
+
args: [{
|
|
487
|
+
isSignal: true,
|
|
488
|
+
alias: "class",
|
|
489
|
+
required: false
|
|
490
|
+
}]
|
|
491
|
+
}]
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
var TabsContentComponent = class TabsContentComponent {
|
|
495
|
+
ctx = inject(TabsComponent);
|
|
496
|
+
value = input.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
497
|
+
class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
|
|
498
|
+
active = computed(() => this.ctx.effectiveValue() === this.value(), ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
|
|
499
|
+
triggerId = computed(() => this.ctx.triggerId(this.value()), ...ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []);
|
|
500
|
+
contentId = computed(() => this.ctx.contentId(this.value()), ...ngDevMode ? [{ debugName: "contentId" }] : /* istanbul ignore next */ []);
|
|
501
|
+
classes = computed(() => cn("mt-2 block ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
502
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
503
|
+
minVersion: "12.0.0",
|
|
504
|
+
version: "22.2.4",
|
|
505
|
+
ngImport: i0,
|
|
506
|
+
type: TabsContentComponent,
|
|
507
|
+
deps: [],
|
|
508
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
509
|
+
});
|
|
510
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
511
|
+
minVersion: "17.0.0",
|
|
512
|
+
version: "22.2.4",
|
|
513
|
+
type: TabsContentComponent,
|
|
514
|
+
isStandalone: true,
|
|
515
|
+
selector: "TabsContent",
|
|
516
|
+
inputs: {
|
|
517
|
+
value: {
|
|
518
|
+
classPropertyName: "value",
|
|
519
|
+
publicName: "value",
|
|
520
|
+
isSignal: true,
|
|
521
|
+
isRequired: true,
|
|
522
|
+
transformFunction: null
|
|
523
|
+
},
|
|
524
|
+
class: {
|
|
525
|
+
classPropertyName: "class",
|
|
526
|
+
publicName: "class",
|
|
527
|
+
isSignal: true,
|
|
528
|
+
isRequired: false,
|
|
529
|
+
transformFunction: null
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
host: {
|
|
533
|
+
attributes: { "tabindex": "0" },
|
|
534
|
+
properties: {
|
|
535
|
+
"class": "classes()",
|
|
536
|
+
"id": "contentId()",
|
|
537
|
+
"attr.role": "\"tabpanel\"",
|
|
538
|
+
"attr.aria-labelledby": "triggerId()",
|
|
539
|
+
"attr.data-state": "active() ? \"active\" : \"inactive\"",
|
|
540
|
+
"hidden": "!active()"
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
ngImport: i0,
|
|
544
|
+
template: `@if (active()) {
|
|
545
|
+
<ng-content />
|
|
546
|
+
}`,
|
|
547
|
+
isInline: true
|
|
548
|
+
});
|
|
549
|
+
};
|
|
550
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
551
|
+
minVersion: "12.0.0",
|
|
552
|
+
version: "22.2.4",
|
|
553
|
+
ngImport: i0,
|
|
554
|
+
type: TabsContentComponent,
|
|
555
|
+
decorators: [{
|
|
556
|
+
type: Component,
|
|
557
|
+
args: [{
|
|
558
|
+
selector: "TabsContent",
|
|
559
|
+
host: {
|
|
560
|
+
"[class]": "classes()",
|
|
561
|
+
"[id]": "contentId()",
|
|
562
|
+
"[attr.role]": "\"tabpanel\"",
|
|
563
|
+
"[attr.aria-labelledby]": "triggerId()",
|
|
564
|
+
"[attr.data-state]": "active() ? \"active\" : \"inactive\"",
|
|
565
|
+
"[hidden]": "!active()",
|
|
566
|
+
tabindex: "0"
|
|
567
|
+
},
|
|
568
|
+
template: `@if (active()) {
|
|
569
|
+
<ng-content />
|
|
570
|
+
}`
|
|
571
|
+
}]
|
|
572
|
+
}],
|
|
573
|
+
propDecorators: {
|
|
574
|
+
value: [{
|
|
575
|
+
type: i0.Input,
|
|
576
|
+
args: [{
|
|
577
|
+
isSignal: true,
|
|
578
|
+
alias: "value",
|
|
579
|
+
required: true
|
|
580
|
+
}]
|
|
581
|
+
}],
|
|
582
|
+
class: [{
|
|
583
|
+
type: i0.Input,
|
|
584
|
+
args: [{
|
|
585
|
+
isSignal: true,
|
|
586
|
+
alias: "class",
|
|
587
|
+
required: false
|
|
588
|
+
}]
|
|
589
|
+
}]
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
export { TabsComponent, TabsContentComponent, TabsContextBase, TabsListComponent, TabsListContextBase, TabsTriggerComponent };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, ElementRef, computed, inject, input } from "@angular/core";
|
|
3
|
+
import { cn } from "@edsis/angular/component/utils/core";
|
|
4
|
+
import * as i1 from "@edsis/angular/component/utils/scale";
|
|
5
|
+
import { ComponentScaleDirective } from "@edsis/angular/component/utils/scale";
|
|
6
|
+
var TextareaComponent = class TextareaComponent {
|
|
7
|
+
componentScale = inject(ComponentScaleDirective);
|
|
8
|
+
radius = this.componentScale.radius;
|
|
9
|
+
density = this.componentScale.density;
|
|
10
|
+
el = inject(ElementRef);
|
|
11
|
+
class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
|
|
12
|
+
classes = computed(() => cn([
|
|
13
|
+
"flex min-h-15 w-full resize-y rounded-md border border-input bg-transparent px-3 py-2",
|
|
14
|
+
"text-sm transition-colors",
|
|
15
|
+
"placeholder:text-muted-foreground",
|
|
16
|
+
"focus-ring",
|
|
17
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
18
|
+
"aria-[invalid=true]:border-destructive aria-[invalid=true]:[--focus-ring-color:hsl(var(--destructive))]"
|
|
19
|
+
].join(" "), this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
20
|
+
focus() {
|
|
21
|
+
this.el.nativeElement.focus();
|
|
22
|
+
}
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
24
|
+
minVersion: "12.0.0",
|
|
25
|
+
version: "22.2.4",
|
|
26
|
+
ngImport: i0,
|
|
27
|
+
type: TextareaComponent,
|
|
28
|
+
deps: [],
|
|
29
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
30
|
+
});
|
|
31
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
32
|
+
minVersion: "17.1.0",
|
|
33
|
+
version: "22.2.4",
|
|
34
|
+
type: TextareaComponent,
|
|
35
|
+
isStandalone: true,
|
|
36
|
+
selector: "textarea[Textarea]",
|
|
37
|
+
inputs: { class: {
|
|
38
|
+
classPropertyName: "class",
|
|
39
|
+
publicName: "class",
|
|
40
|
+
isSignal: true,
|
|
41
|
+
isRequired: false,
|
|
42
|
+
transformFunction: null
|
|
43
|
+
} },
|
|
44
|
+
host: { properties: { "class": "classes()" } },
|
|
45
|
+
hostDirectives: [{
|
|
46
|
+
directive: i1.ComponentScaleDirective,
|
|
47
|
+
inputs: [
|
|
48
|
+
"radius",
|
|
49
|
+
"radius",
|
|
50
|
+
"density",
|
|
51
|
+
"density"
|
|
52
|
+
]
|
|
53
|
+
}],
|
|
54
|
+
ngImport: i0,
|
|
55
|
+
template: "",
|
|
56
|
+
isInline: true
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
60
|
+
minVersion: "12.0.0",
|
|
61
|
+
version: "22.2.4",
|
|
62
|
+
ngImport: i0,
|
|
63
|
+
type: TextareaComponent,
|
|
64
|
+
decorators: [{
|
|
65
|
+
type: Component,
|
|
66
|
+
args: [{
|
|
67
|
+
selector: "textarea[Textarea]",
|
|
68
|
+
hostDirectives: [{
|
|
69
|
+
directive: ComponentScaleDirective,
|
|
70
|
+
inputs: ["radius", "density"]
|
|
71
|
+
}],
|
|
72
|
+
host: { "[class]": "classes()" },
|
|
73
|
+
template: ""
|
|
74
|
+
}]
|
|
75
|
+
}],
|
|
76
|
+
propDecorators: { class: [{
|
|
77
|
+
type: i0.Input,
|
|
78
|
+
args: [{
|
|
79
|
+
isSignal: true,
|
|
80
|
+
alias: "class",
|
|
81
|
+
required: false
|
|
82
|
+
}]
|
|
83
|
+
}] }
|
|
84
|
+
});
|
|
85
|
+
export { TextareaComponent };
|