@ojiepermana/angular 22.1.10 → 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,7 +1,613 @@
|
|
|
1
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, input, booleanAttribute, signal, viewChild, effect, forwardRef, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@ojiepermana/angular/component/utils/scale';
|
|
4
|
+
import { ComponentScaleDirective } from '@ojiepermana/angular/component/utils/scale';
|
|
5
|
+
import * as i2 from '@angular/cdk/overlay';
|
|
6
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
7
|
+
import { MAT_OPTION_PARENT_COMPONENT, MatOption, MatPseudoCheckbox, MatRipple } from '@angular/material/core';
|
|
8
|
+
import { MatSelect } from '@angular/material/select';
|
|
9
|
+
import { takeUntil } from 'rxjs';
|
|
10
|
+
import { FormFieldContext } from '@ojiepermana/angular/component/form';
|
|
2
11
|
|
|
3
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Compatibility boundary for the protected Material APIs required by the
|
|
14
|
+
* copied MatSelect template. Keep version-sensitive access in this file so a
|
|
15
|
+
* Material upgrade has one auditable failure surface.
|
|
16
|
+
*/
|
|
17
|
+
class SelectMaterialBridge extends MatSelect {
|
|
18
|
+
get materialValueId() {
|
|
19
|
+
return this._valueId;
|
|
20
|
+
}
|
|
21
|
+
get materialOverlayPanelClass() {
|
|
22
|
+
return this._overlayPanelClass;
|
|
23
|
+
}
|
|
24
|
+
get materialScrollStrategy() {
|
|
25
|
+
return this._scrollStrategy;
|
|
26
|
+
}
|
|
27
|
+
get materialPreferredOverlayOrigin() {
|
|
28
|
+
return this._preferredOverlayOrigin;
|
|
29
|
+
}
|
|
30
|
+
get materialPositions() {
|
|
31
|
+
return this._positions;
|
|
32
|
+
}
|
|
33
|
+
get materialOverlayWidth() {
|
|
34
|
+
return this._overlayWidth;
|
|
35
|
+
}
|
|
36
|
+
get materialPopoverLocation() {
|
|
37
|
+
return this._popoverLocation;
|
|
38
|
+
}
|
|
39
|
+
get materialAnimationsDisabled() {
|
|
40
|
+
return this._animationsDisabled;
|
|
41
|
+
}
|
|
42
|
+
get materialParentFormFieldColor() {
|
|
43
|
+
return this._parentFormField?.color;
|
|
44
|
+
}
|
|
45
|
+
get materialDestroyed() {
|
|
46
|
+
return this._destroy;
|
|
47
|
+
}
|
|
48
|
+
configureMaterialPositions(positions) {
|
|
49
|
+
this._positions = positions;
|
|
50
|
+
}
|
|
51
|
+
materialHandleOverlayKeydown(event) {
|
|
52
|
+
this._handleOverlayKeydown(event);
|
|
53
|
+
}
|
|
54
|
+
materialPanelAriaLabelledby() {
|
|
55
|
+
return this._getPanelAriaLabelledby();
|
|
56
|
+
}
|
|
57
|
+
materialHandleKeydown(event) {
|
|
58
|
+
this._handleKeydown(event);
|
|
59
|
+
}
|
|
60
|
+
materialConfigureSkipPredicate(predicate) {
|
|
61
|
+
this._keyManager.skipPredicate(predicate);
|
|
62
|
+
}
|
|
63
|
+
materialSetActiveItem(option) {
|
|
64
|
+
this._keyManager.setActiveItem(option);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/** Material does not currently expose an option host accessor publicly. */
|
|
68
|
+
function materialOptionHost(option) {
|
|
69
|
+
return option._getHostElement();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Keep the panel on top of the trigger, then let it grow toward the side of
|
|
74
|
+
* the viewport that has room. Logical `start`/`end` values preserve RTL.
|
|
75
|
+
*/
|
|
76
|
+
const ITEM_ALIGNED_POSITIONS = [
|
|
77
|
+
{
|
|
78
|
+
originX: 'start',
|
|
79
|
+
originY: 'top',
|
|
80
|
+
overlayX: 'start',
|
|
81
|
+
overlayY: 'top',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
originX: 'end',
|
|
85
|
+
originY: 'top',
|
|
86
|
+
overlayX: 'end',
|
|
87
|
+
overlayY: 'top',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
originX: 'start',
|
|
91
|
+
originY: 'bottom',
|
|
92
|
+
overlayX: 'start',
|
|
93
|
+
overlayY: 'bottom',
|
|
94
|
+
panelClass: 'mat-mdc-select-panel-above',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
originX: 'end',
|
|
98
|
+
originY: 'bottom',
|
|
99
|
+
overlayX: 'end',
|
|
100
|
+
overlayY: 'bottom',
|
|
101
|
+
panelClass: 'mat-mdc-select-panel-above',
|
|
102
|
+
},
|
|
103
|
+
];
|
|
104
|
+
/**
|
|
105
|
+
* Custom shadcn-styled select.
|
|
106
|
+
*
|
|
107
|
+
* IMPORTANT: this MUST extend `MatSelect` (with a copied template) rather than
|
|
108
|
+
* wrap `<mat-select>` in its own view. `mat-select` projects its options through
|
|
109
|
+
* an `<ng-content>` that lives inside the deferred `cdk-connected-overlay`
|
|
110
|
+
* `<ng-template>`. A wrapper that re-projects options into mat-select via its own
|
|
111
|
+
* `<ng-content>` creates a *double* projection into that deferred slot, and the
|
|
112
|
+
* projected options are never instantiated — `@ContentChildren(MatOption)` finds
|
|
113
|
+
* zero, the trigger shows the placeholder instead of the bound value, and
|
|
114
|
+
* `_canOpen()` refuses to open the panel. By BEING the mat-select, options are
|
|
115
|
+
* direct (single-projection) content and register normally.
|
|
116
|
+
*
|
|
117
|
+
* The full MatSelect public API (`value`, `multiple`, `required`, `disabled`,
|
|
118
|
+
* `placeholder`, `aria-*`, `open()/close()/focus()`, `selectionChange`,
|
|
119
|
+
* `openedChange`, `valueChange`, and `ControlValueAccessor` for `ngModel`/reactive
|
|
120
|
+
* forms) is inherited. Only the selector, template, styles, providers, and the
|
|
121
|
+
* optional `<FormField>` bridge are declared here.
|
|
122
|
+
*/
|
|
123
|
+
class SelectComponent extends SelectMaterialBridge {
|
|
124
|
+
componentScale = inject(ComponentScaleDirective);
|
|
125
|
+
radius = this.componentScale.radius;
|
|
126
|
+
density = this.componentScale.density;
|
|
127
|
+
/** Optional bridge to an enclosing edsis `<FormField>` (validation + a11y). */
|
|
128
|
+
formFieldContext = inject(FormFieldContext, { optional: true });
|
|
129
|
+
/** Per-component corner-radius override; `'inherit'` follows the global axis. */
|
|
130
|
+
/** Per-component spacing-density override; `'inherit'` follows the global axis. */
|
|
131
|
+
/** Adds an opt-in search field to the overlay. */
|
|
132
|
+
search = input(false, { ...(ngDevMode ? { debugName: "search" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
133
|
+
/** Accessible label and visible placeholder for the optional search field. */
|
|
134
|
+
searchPlaceholder = input('Search options', /* @ts-ignore */
|
|
135
|
+
...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
136
|
+
/** Message shown when the current search has no matching options. */
|
|
137
|
+
searchEmptyText = input('No options found.', /* @ts-ignore */
|
|
138
|
+
...(ngDevMode ? [{ debugName: "searchEmptyText" }] : /* istanbul ignore next */ []));
|
|
139
|
+
searchQuery = signal('', /* @ts-ignore */
|
|
140
|
+
...(ngDevMode ? [{ debugName: "searchQuery" }] : /* istanbul ignore next */ []));
|
|
141
|
+
visibleOptionCount = signal(0, /* @ts-ignore */
|
|
142
|
+
...(ngDevMode ? [{ debugName: "visibleOptionCount" }] : /* istanbul ignore next */ []));
|
|
143
|
+
searchInput = viewChild('searchInput', /* @ts-ignore */
|
|
144
|
+
...(ngDevMode ? [{ debugName: "searchInput" }] : /* istanbul ignore next */ []));
|
|
145
|
+
hiddenOptions = new Set();
|
|
146
|
+
constructor() {
|
|
147
|
+
super();
|
|
148
|
+
this.configureMaterialPositions(ITEM_ALIGNED_POSITIONS);
|
|
149
|
+
effect(() => {
|
|
150
|
+
if (!this.search() && this.searchQuery()) {
|
|
151
|
+
this.resetSearch();
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
const ctx = this.formFieldContext;
|
|
155
|
+
if (ctx) {
|
|
156
|
+
// Mirror the FormField invalid state onto mat-select's errorState.
|
|
157
|
+
this.errorStateMatcher = { isErrorState: () => ctx.invalid() };
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* `aria-describedby` for the combobox, written by this host binding and nothing
|
|
162
|
+
* else. `MatSelect` publishes ids only through `setDescribedByIds()`, which is
|
|
163
|
+
* the `MatFormField` protocol: outside one — and an edsis `<FormField>` is not
|
|
164
|
+
* one — nothing ever calls it, and assigning `userAriaDescribedBy` by hand
|
|
165
|
+
* reaches the DOM through no path at all. The binding clears the attribute as
|
|
166
|
+
* well as sets it, so a resolved error never outlives itself.
|
|
167
|
+
*/
|
|
168
|
+
resolvedDescribedBy() {
|
|
169
|
+
return this.formFieldContext?.describedBy() ?? this.userAriaDescribedBy ?? null;
|
|
170
|
+
}
|
|
171
|
+
ngOnInit() {
|
|
172
|
+
super.ngOnInit();
|
|
173
|
+
// Register the bound control so <FormField> can derive invalid/aria state.
|
|
174
|
+
this.publishControl();
|
|
175
|
+
}
|
|
176
|
+
ngAfterViewInit() {
|
|
177
|
+
// `formControlName` only assigns `.control` in FormControlName.ngOnChanges.
|
|
178
|
+
// Whether that lands before this ngOnInit depends on directive *creation*
|
|
179
|
+
// order: MatSelect injects NgControl in a field initializer, which
|
|
180
|
+
// instantiates FormControlName early, registers its hooks first, and happens
|
|
181
|
+
// to make the init read work today. Anything that moves that injection later
|
|
182
|
+
// parks `null` in the FormField forever, and the field can then never
|
|
183
|
+
// surface the control's invalid state. Re-resolving here removes the
|
|
184
|
+
// dependence on that ordering accident.
|
|
185
|
+
this.publishControl();
|
|
186
|
+
}
|
|
187
|
+
ngAfterContentInit() {
|
|
188
|
+
super.ngAfterContentInit();
|
|
189
|
+
// Material deliberately allows disabled options to receive active styles
|
|
190
|
+
// while the panel is open. Preserve that behavior and only add hidden
|
|
191
|
+
// search results to the key manager's skip predicate.
|
|
192
|
+
this.materialConfigureSkipPredicate((option) => this.hiddenOptions.has(option) || (!this.panelOpen && option.disabled));
|
|
193
|
+
this.options.changes.pipe(takeUntil(this.materialDestroyed)).subscribe(() => {
|
|
194
|
+
this.applySearch(this.searchQuery());
|
|
195
|
+
});
|
|
196
|
+
this.optionSelectionChanges.pipe(takeUntil(this.materialDestroyed)).subscribe((event) => {
|
|
197
|
+
if (event.isUserInput && this.multiple && this.search() && this.panelOpen) {
|
|
198
|
+
this.focusSearchInput();
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
this.visibleOptionCount.set(this.options.length);
|
|
202
|
+
}
|
|
203
|
+
open() {
|
|
204
|
+
const wasOpen = this.panelOpen;
|
|
205
|
+
super.open();
|
|
206
|
+
if (!wasOpen && this.panelOpen && this.search()) {
|
|
207
|
+
this.resetSearch();
|
|
208
|
+
this.focusSearchInput();
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
close() {
|
|
212
|
+
const wasOpen = this.panelOpen;
|
|
213
|
+
super.close();
|
|
214
|
+
if (wasOpen) {
|
|
215
|
+
this.resetSearch();
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
onSearchInput(event) {
|
|
219
|
+
const query = event.target.value;
|
|
220
|
+
this.searchQuery.set(query);
|
|
221
|
+
this.applySearch(query);
|
|
222
|
+
}
|
|
223
|
+
onSearchKeydown(event) {
|
|
224
|
+
switch (event.key) {
|
|
225
|
+
case 'ArrowDown':
|
|
226
|
+
case 'ArrowUp':
|
|
227
|
+
case 'PageDown':
|
|
228
|
+
case 'PageUp':
|
|
229
|
+
case 'Enter':
|
|
230
|
+
case 'Tab':
|
|
231
|
+
this.materialHandleKeydown(event);
|
|
232
|
+
event.stopPropagation();
|
|
233
|
+
break;
|
|
234
|
+
case 'Escape':
|
|
235
|
+
event.preventDefault();
|
|
236
|
+
event.stopPropagation();
|
|
237
|
+
this.close();
|
|
238
|
+
this.focus();
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
/** Idempotent bridge: only writes when the resolved control actually changed. */
|
|
243
|
+
publishControl() {
|
|
244
|
+
const context = this.formFieldContext;
|
|
245
|
+
if (!context) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
const control = this.ngControl?.control ?? null;
|
|
249
|
+
if (control !== context.control()) {
|
|
250
|
+
context.control.set(control);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
resetSearch() {
|
|
254
|
+
this.searchQuery.set('');
|
|
255
|
+
this.applySearch('');
|
|
256
|
+
}
|
|
257
|
+
focusSearchInput() {
|
|
258
|
+
queueMicrotask(() => this.searchInput()?.nativeElement.focus());
|
|
259
|
+
}
|
|
260
|
+
applySearch(query) {
|
|
261
|
+
if (!this.options) {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
265
|
+
const groupVisibility = new Map();
|
|
266
|
+
this.hiddenOptions.clear();
|
|
267
|
+
for (const option of this.options) {
|
|
268
|
+
const visible = !normalizedQuery || option.viewValue.toLocaleLowerCase().includes(normalizedQuery);
|
|
269
|
+
const optionElement = materialOptionHost(option);
|
|
270
|
+
optionElement.hidden = !visible;
|
|
271
|
+
if (!visible) {
|
|
272
|
+
this.hiddenOptions.add(option);
|
|
273
|
+
}
|
|
274
|
+
const groupElement = optionElement.closest('mat-optgroup');
|
|
275
|
+
if (groupElement) {
|
|
276
|
+
groupVisibility.set(groupElement, (groupVisibility.get(groupElement) ?? false) || visible);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
for (const [groupElement, visible] of groupVisibility) {
|
|
280
|
+
groupElement.hidden = !visible;
|
|
281
|
+
}
|
|
282
|
+
const visibleOptions = this.options.filter((option) => !this.hiddenOptions.has(option));
|
|
283
|
+
this.visibleOptionCount.set(visibleOptions.length);
|
|
284
|
+
if (normalizedQuery && this.panelOpen) {
|
|
285
|
+
const activeOption = visibleOptions.find((option) => option.selected && !option.disabled) ??
|
|
286
|
+
visibleOptions.find((option) => !option.disabled);
|
|
287
|
+
this.materialSetActiveItem(activeOption ?? -1);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
291
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: SelectComponent, isStandalone: true, selector: "SelectField", inputs: { search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, searchEmptyText: { classPropertyName: "searchEmptyText", publicName: "searchEmptyText", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "combobox", "aria-haspopup": "listbox" }, properties: { "attr.aria-describedby": "resolvedDescribedBy()" }, classAttribute: "mat-mdc-select" }, providers: [
|
|
292
|
+
{ provide: MatSelect, useExisting: forwardRef(() => SelectComponent) },
|
|
293
|
+
{ provide: MAT_OPTION_PARENT_COMPONENT, useExisting: forwardRef(() => SelectComponent) },
|
|
294
|
+
], viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], exportAs: ["matSelect"], usesInheritance: true, hostDirectives: [{ directive: i1.ComponentScaleDirective, inputs: ["radius", "radius", "density", "density"] }], ngImport: i0, template: `
|
|
295
|
+
<div
|
|
296
|
+
cdk-overlay-origin
|
|
297
|
+
class="mat-mdc-select-trigger"
|
|
298
|
+
tabindex="-1"
|
|
299
|
+
(click)="open()"
|
|
300
|
+
(keydown.enter)="open()"
|
|
301
|
+
#fallbackOverlayOrigin="cdkOverlayOrigin"
|
|
302
|
+
#trigger
|
|
303
|
+
>
|
|
304
|
+
<div class="mat-mdc-select-value" [attr.id]="materialValueId">
|
|
305
|
+
@if (empty) {
|
|
306
|
+
<span class="mat-mdc-select-placeholder mat-mdc-select-min-line">{{ placeholder }}</span>
|
|
307
|
+
} @else {
|
|
308
|
+
<span class="mat-mdc-select-value-text">
|
|
309
|
+
@if (customTrigger) {
|
|
310
|
+
<ng-content select="mat-select-trigger" />
|
|
311
|
+
} @else {
|
|
312
|
+
<span class="mat-mdc-select-min-line">{{ triggerValue }}</span>
|
|
313
|
+
}
|
|
314
|
+
</span>
|
|
315
|
+
}
|
|
316
|
+
</div>
|
|
317
|
+
|
|
318
|
+
<div class="mat-mdc-select-arrow-wrapper">
|
|
319
|
+
<div class="mat-mdc-select-arrow">
|
|
320
|
+
<!-- Use an inline SVG, because it works better than a CSS triangle in high contrast mode. -->
|
|
321
|
+
<svg viewBox="0 0 24 24" width="24px" height="24px" focusable="false" aria-hidden="true">
|
|
322
|
+
<path d="M7 10l5 5 5-5z" />
|
|
323
|
+
</svg>
|
|
324
|
+
</div>
|
|
325
|
+
</div>
|
|
326
|
+
</div>
|
|
327
|
+
|
|
328
|
+
<ng-template
|
|
329
|
+
cdk-connected-overlay
|
|
330
|
+
cdkConnectedOverlayHasBackdrop
|
|
331
|
+
cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop"
|
|
332
|
+
[cdkConnectedOverlayDisableClose]="true"
|
|
333
|
+
[cdkConnectedOverlayPanelClass]="materialOverlayPanelClass"
|
|
334
|
+
[cdkConnectedOverlayScrollStrategy]="materialScrollStrategy"
|
|
335
|
+
[cdkConnectedOverlayOrigin]="materialPreferredOverlayOrigin || fallbackOverlayOrigin"
|
|
336
|
+
[cdkConnectedOverlayPositions]="materialPositions"
|
|
337
|
+
[cdkConnectedOverlayWidth]="materialOverlayWidth"
|
|
338
|
+
[cdkConnectedOverlayFlexibleDimensions]="true"
|
|
339
|
+
[cdkConnectedOverlayUsePopover]="materialPopoverLocation"
|
|
340
|
+
(detach)="close()"
|
|
341
|
+
(backdropClick)="close()"
|
|
342
|
+
(overlayKeydown)="materialHandleOverlayKeydown($event)"
|
|
343
|
+
>
|
|
344
|
+
<!-- mat-undefined is weird, but we were using it internally -->
|
|
345
|
+
<div
|
|
346
|
+
class="mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open select-panel"
|
|
347
|
+
[class]="panelClass"
|
|
348
|
+
[style.--radius-base]="componentScale.radiusBase()"
|
|
349
|
+
[style.--spacing-base]="componentScale.densityBase()"
|
|
350
|
+
>
|
|
351
|
+
@if (search()) {
|
|
352
|
+
<div class="select-search">
|
|
353
|
+
<input
|
|
354
|
+
#searchInput
|
|
355
|
+
type="search"
|
|
356
|
+
class="select-search-input"
|
|
357
|
+
autocomplete="off"
|
|
358
|
+
spellcheck="false"
|
|
359
|
+
[value]="searchQuery()"
|
|
360
|
+
[placeholder]="searchPlaceholder()"
|
|
361
|
+
[attr.aria-label]="searchPlaceholder()"
|
|
362
|
+
[attr.aria-controls]="id + '-panel'"
|
|
363
|
+
(input)="onSearchInput($event)"
|
|
364
|
+
(keydown)="onSearchKeydown($event)"
|
|
365
|
+
/>
|
|
366
|
+
</div>
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
<div
|
|
370
|
+
#panel
|
|
371
|
+
role="listbox"
|
|
372
|
+
tabindex="-1"
|
|
373
|
+
class="select-options"
|
|
374
|
+
[class.mat-select-panel-animations-enabled]="!materialAnimationsDisabled"
|
|
375
|
+
[class.mat-primary]="materialParentFormFieldColor === 'primary'"
|
|
376
|
+
[class.mat-accent]="materialParentFormFieldColor === 'accent'"
|
|
377
|
+
[class.mat-warn]="materialParentFormFieldColor === 'warn'"
|
|
378
|
+
[class.mat-undefined]="!materialParentFormFieldColor"
|
|
379
|
+
[attr.id]="id + '-panel'"
|
|
380
|
+
[attr.aria-multiselectable]="multiple"
|
|
381
|
+
[attr.aria-label]="ariaLabel || null"
|
|
382
|
+
[attr.aria-labelledby]="materialPanelAriaLabelledby()"
|
|
383
|
+
(keydown)="materialHandleKeydown($event)"
|
|
384
|
+
>
|
|
385
|
+
<ng-content />
|
|
386
|
+
</div>
|
|
387
|
+
|
|
388
|
+
@if (searchQuery().trim() && visibleOptionCount() === 0) {
|
|
389
|
+
<div class="select-empty" role="status">{{ searchEmptyText() }}</div>
|
|
390
|
+
}
|
|
391
|
+
</div>
|
|
392
|
+
</ng-template>
|
|
393
|
+
`, isInline: true, styles: ["@keyframes _mat-select-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{0%{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var( --mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12) )}.mat-mdc-select-disabled,.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var( --mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent) )}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media(forced-colors:active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;box-sizing:border-box;transform-origin:top center;border-radius:0 0 4px 4px;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-radius:4px 4px 0 0;transform-origin:bottom center}@media(forced-colors:active){div.mat-mdc-select-panel{outline:solid 1px}}.mat-select-panel-animations-enabled{animation:_mat-select-enter .12s cubic-bezier(0,0,.2,1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit .1s linear}.mat-mdc-select-placeholder{transition:color .4s .1333333333333s cubic-bezier(.25,.8,.25,1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}\n", "selectfield.mat-mdc-select{display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--control-height-md);padding:0;border:1px solid hsl(var(--input));border-radius:var(--radius-base);background:transparent;color:hsl(var(--foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height);cursor:pointer}selectfield .mat-mdc-select-trigger{height:100%;padding:0 calc(var(--spacing-base) * 3)}selectfield.mat-mdc-select:focus:not(.mat-select-open){outline:none;border-color:hsl(var(--ring));box-shadow:0 0 0 1px hsl(var(--ring))}selectfield.mat-mdc-select-disabled{cursor:not-allowed;opacity:.5;background:hsl(var(--muted) / .4)}selectfield.mat-mdc-select-invalid{border-color:hsl(var(--destructive))}selectfield .mat-mdc-select-value{color:hsl(var(--foreground))}selectfield .mat-mdc-select-placeholder{color:hsl(var(--muted-foreground))}selectfield .mat-mdc-select-arrow{color:hsl(var(--muted-foreground))}div.mat-mdc-select-panel.select-panel{--mat-select-panel-background-color: hsl(var(--popover));display:flex;flex-direction:column;background-color:hsl(var(--popover));color:hsl(var(--popover-foreground));border:1px solid hsl(var(--ring));border-radius:var(--radius-base);box-shadow:0 0 0 1px hsl(var(--ring)),var(--shadow-md, 0 8px 18px -14px hsl(var(--foreground) / .24));padding:calc(var(--spacing-base) * 1);overflow:hidden}.select-panel .select-options{min-height:0;overflow:auto;outline:none}.select-search{flex:0 0 auto;margin-block-end:calc(var(--spacing-base) * 1)}.select-search-input{box-sizing:border-box;width:100%;height:var(--control-height-md);border:1px solid hsl(var(--input));border-radius:var(--radius-base);outline:none;background:transparent;color:hsl(var(--popover-foreground));padding-inline:calc(var(--spacing-base) * 3);font:inherit}.select-search-input::placeholder{color:hsl(var(--muted-foreground))}.select-search-input:focus-visible{border-color:hsl(var(--input));box-shadow:none}.select-search-input::-webkit-search-cancel-button{cursor:pointer}.select-empty{color:hsl(var(--muted-foreground));padding:calc(var(--spacing-base) * 2) calc(var(--spacing-base) * 3);font-size:var(--text-sm);line-height:var(--text-sm--line-height);text-align:center}.select-panel .mat-mdc-option{--mat-option-label-text-color: hsl(var(--popover-foreground));--mat-option-label-text-font: var(--font-sans);--mat-option-label-text-size: var(--text-sm);--mat-option-label-text-line-height: var(--text-sm--line-height);--mat-option-label-text-weight: 400;--mat-option-hover-state-layer-color: hsl(var(--accent));--mat-option-focus-state-layer-color: hsl(var(--accent));--mat-option-selected-state-layer-color: hsl(var(--accent));--mat-option-selected-state-label-text-color: hsl(var(--accent-foreground));min-height:var(--control-height-md);border-radius:var(--radius-base)}.select-panel .mat-mdc-option+.mat-mdc-option{margin-block-start:calc(var(--spacing-base) * .5)}.select-panel .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:hsl(var(--accent-foreground))}.select-panel .mat-mdc-optgroup-label{--mat-optgroup-label-text-color: hsl(var(--muted-foreground));--mat-optgroup-label-text-font: var(--font-sans);--mat-optgroup-label-text-size: var(--text-xs);min-height:var(--control-height-xs)}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
394
|
+
}
|
|
395
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: SelectComponent, decorators: [{
|
|
396
|
+
type: Component,
|
|
397
|
+
args: [{ selector: 'SelectField', hostDirectives: [
|
|
398
|
+
{
|
|
399
|
+
directive: ComponentScaleDirective,
|
|
400
|
+
inputs: ['radius', 'density'],
|
|
401
|
+
},
|
|
402
|
+
], exportAs: 'matSelect', encapsulation: ViewEncapsulation.None, imports: [OverlayModule], host: {
|
|
403
|
+
class: 'mat-mdc-select',
|
|
404
|
+
role: 'combobox',
|
|
405
|
+
'aria-haspopup': 'listbox',
|
|
406
|
+
'[attr.aria-describedby]': 'resolvedDescribedBy()',
|
|
407
|
+
}, providers: [
|
|
408
|
+
{ provide: MatSelect, useExisting: forwardRef(() => SelectComponent) },
|
|
409
|
+
{ provide: MAT_OPTION_PARENT_COMPONENT, useExisting: forwardRef(() => SelectComponent) },
|
|
410
|
+
], template: `
|
|
411
|
+
<div
|
|
412
|
+
cdk-overlay-origin
|
|
413
|
+
class="mat-mdc-select-trigger"
|
|
414
|
+
tabindex="-1"
|
|
415
|
+
(click)="open()"
|
|
416
|
+
(keydown.enter)="open()"
|
|
417
|
+
#fallbackOverlayOrigin="cdkOverlayOrigin"
|
|
418
|
+
#trigger
|
|
419
|
+
>
|
|
420
|
+
<div class="mat-mdc-select-value" [attr.id]="materialValueId">
|
|
421
|
+
@if (empty) {
|
|
422
|
+
<span class="mat-mdc-select-placeholder mat-mdc-select-min-line">{{ placeholder }}</span>
|
|
423
|
+
} @else {
|
|
424
|
+
<span class="mat-mdc-select-value-text">
|
|
425
|
+
@if (customTrigger) {
|
|
426
|
+
<ng-content select="mat-select-trigger" />
|
|
427
|
+
} @else {
|
|
428
|
+
<span class="mat-mdc-select-min-line">{{ triggerValue }}</span>
|
|
429
|
+
}
|
|
430
|
+
</span>
|
|
431
|
+
}
|
|
432
|
+
</div>
|
|
433
|
+
|
|
434
|
+
<div class="mat-mdc-select-arrow-wrapper">
|
|
435
|
+
<div class="mat-mdc-select-arrow">
|
|
436
|
+
<!-- Use an inline SVG, because it works better than a CSS triangle in high contrast mode. -->
|
|
437
|
+
<svg viewBox="0 0 24 24" width="24px" height="24px" focusable="false" aria-hidden="true">
|
|
438
|
+
<path d="M7 10l5 5 5-5z" />
|
|
439
|
+
</svg>
|
|
440
|
+
</div>
|
|
441
|
+
</div>
|
|
442
|
+
</div>
|
|
443
|
+
|
|
444
|
+
<ng-template
|
|
445
|
+
cdk-connected-overlay
|
|
446
|
+
cdkConnectedOverlayHasBackdrop
|
|
447
|
+
cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop"
|
|
448
|
+
[cdkConnectedOverlayDisableClose]="true"
|
|
449
|
+
[cdkConnectedOverlayPanelClass]="materialOverlayPanelClass"
|
|
450
|
+
[cdkConnectedOverlayScrollStrategy]="materialScrollStrategy"
|
|
451
|
+
[cdkConnectedOverlayOrigin]="materialPreferredOverlayOrigin || fallbackOverlayOrigin"
|
|
452
|
+
[cdkConnectedOverlayPositions]="materialPositions"
|
|
453
|
+
[cdkConnectedOverlayWidth]="materialOverlayWidth"
|
|
454
|
+
[cdkConnectedOverlayFlexibleDimensions]="true"
|
|
455
|
+
[cdkConnectedOverlayUsePopover]="materialPopoverLocation"
|
|
456
|
+
(detach)="close()"
|
|
457
|
+
(backdropClick)="close()"
|
|
458
|
+
(overlayKeydown)="materialHandleOverlayKeydown($event)"
|
|
459
|
+
>
|
|
460
|
+
<!-- mat-undefined is weird, but we were using it internally -->
|
|
461
|
+
<div
|
|
462
|
+
class="mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open select-panel"
|
|
463
|
+
[class]="panelClass"
|
|
464
|
+
[style.--radius-base]="componentScale.radiusBase()"
|
|
465
|
+
[style.--spacing-base]="componentScale.densityBase()"
|
|
466
|
+
>
|
|
467
|
+
@if (search()) {
|
|
468
|
+
<div class="select-search">
|
|
469
|
+
<input
|
|
470
|
+
#searchInput
|
|
471
|
+
type="search"
|
|
472
|
+
class="select-search-input"
|
|
473
|
+
autocomplete="off"
|
|
474
|
+
spellcheck="false"
|
|
475
|
+
[value]="searchQuery()"
|
|
476
|
+
[placeholder]="searchPlaceholder()"
|
|
477
|
+
[attr.aria-label]="searchPlaceholder()"
|
|
478
|
+
[attr.aria-controls]="id + '-panel'"
|
|
479
|
+
(input)="onSearchInput($event)"
|
|
480
|
+
(keydown)="onSearchKeydown($event)"
|
|
481
|
+
/>
|
|
482
|
+
</div>
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
<div
|
|
486
|
+
#panel
|
|
487
|
+
role="listbox"
|
|
488
|
+
tabindex="-1"
|
|
489
|
+
class="select-options"
|
|
490
|
+
[class.mat-select-panel-animations-enabled]="!materialAnimationsDisabled"
|
|
491
|
+
[class.mat-primary]="materialParentFormFieldColor === 'primary'"
|
|
492
|
+
[class.mat-accent]="materialParentFormFieldColor === 'accent'"
|
|
493
|
+
[class.mat-warn]="materialParentFormFieldColor === 'warn'"
|
|
494
|
+
[class.mat-undefined]="!materialParentFormFieldColor"
|
|
495
|
+
[attr.id]="id + '-panel'"
|
|
496
|
+
[attr.aria-multiselectable]="multiple"
|
|
497
|
+
[attr.aria-label]="ariaLabel || null"
|
|
498
|
+
[attr.aria-labelledby]="materialPanelAriaLabelledby()"
|
|
499
|
+
(keydown)="materialHandleKeydown($event)"
|
|
500
|
+
>
|
|
501
|
+
<ng-content />
|
|
502
|
+
</div>
|
|
503
|
+
|
|
504
|
+
@if (searchQuery().trim() && visibleOptionCount() === 0) {
|
|
505
|
+
<div class="select-empty" role="status">{{ searchEmptyText() }}</div>
|
|
506
|
+
}
|
|
507
|
+
</div>
|
|
508
|
+
</ng-template>
|
|
509
|
+
`, styles: ["@keyframes _mat-select-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{0%{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var( --mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12) )}.mat-mdc-select-disabled,.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var( --mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent) )}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media(forced-colors:active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;box-sizing:border-box;transform-origin:top center;border-radius:0 0 4px 4px;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-radius:4px 4px 0 0;transform-origin:bottom center}@media(forced-colors:active){div.mat-mdc-select-panel{outline:solid 1px}}.mat-select-panel-animations-enabled{animation:_mat-select-enter .12s cubic-bezier(0,0,.2,1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit .1s linear}.mat-mdc-select-placeholder{transition:color .4s .1333333333333s cubic-bezier(.25,.8,.25,1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}\n", "selectfield.mat-mdc-select{display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--control-height-md);padding:0;border:1px solid hsl(var(--input));border-radius:var(--radius-base);background:transparent;color:hsl(var(--foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height);cursor:pointer}selectfield .mat-mdc-select-trigger{height:100%;padding:0 calc(var(--spacing-base) * 3)}selectfield.mat-mdc-select:focus:not(.mat-select-open){outline:none;border-color:hsl(var(--ring));box-shadow:0 0 0 1px hsl(var(--ring))}selectfield.mat-mdc-select-disabled{cursor:not-allowed;opacity:.5;background:hsl(var(--muted) / .4)}selectfield.mat-mdc-select-invalid{border-color:hsl(var(--destructive))}selectfield .mat-mdc-select-value{color:hsl(var(--foreground))}selectfield .mat-mdc-select-placeholder{color:hsl(var(--muted-foreground))}selectfield .mat-mdc-select-arrow{color:hsl(var(--muted-foreground))}div.mat-mdc-select-panel.select-panel{--mat-select-panel-background-color: hsl(var(--popover));display:flex;flex-direction:column;background-color:hsl(var(--popover));color:hsl(var(--popover-foreground));border:1px solid hsl(var(--ring));border-radius:var(--radius-base);box-shadow:0 0 0 1px hsl(var(--ring)),var(--shadow-md, 0 8px 18px -14px hsl(var(--foreground) / .24));padding:calc(var(--spacing-base) * 1);overflow:hidden}.select-panel .select-options{min-height:0;overflow:auto;outline:none}.select-search{flex:0 0 auto;margin-block-end:calc(var(--spacing-base) * 1)}.select-search-input{box-sizing:border-box;width:100%;height:var(--control-height-md);border:1px solid hsl(var(--input));border-radius:var(--radius-base);outline:none;background:transparent;color:hsl(var(--popover-foreground));padding-inline:calc(var(--spacing-base) * 3);font:inherit}.select-search-input::placeholder{color:hsl(var(--muted-foreground))}.select-search-input:focus-visible{border-color:hsl(var(--input));box-shadow:none}.select-search-input::-webkit-search-cancel-button{cursor:pointer}.select-empty{color:hsl(var(--muted-foreground));padding:calc(var(--spacing-base) * 2) calc(var(--spacing-base) * 3);font-size:var(--text-sm);line-height:var(--text-sm--line-height);text-align:center}.select-panel .mat-mdc-option{--mat-option-label-text-color: hsl(var(--popover-foreground));--mat-option-label-text-font: var(--font-sans);--mat-option-label-text-size: var(--text-sm);--mat-option-label-text-line-height: var(--text-sm--line-height);--mat-option-label-text-weight: 400;--mat-option-hover-state-layer-color: hsl(var(--accent));--mat-option-focus-state-layer-color: hsl(var(--accent));--mat-option-selected-state-layer-color: hsl(var(--accent));--mat-option-selected-state-label-text-color: hsl(var(--accent-foreground));min-height:var(--control-height-md);border-radius:var(--radius-base)}.select-panel .mat-mdc-option+.mat-mdc-option{margin-block-start:calc(var(--spacing-base) * .5)}.select-panel .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:hsl(var(--accent-foreground))}.select-panel .mat-mdc-optgroup-label{--mat-optgroup-label-text-color: hsl(var(--muted-foreground));--mat-optgroup-label-text-font: var(--font-sans);--mat-optgroup-label-text-size: var(--text-xs);min-height:var(--control-height-xs)}\n"] }]
|
|
510
|
+
}], ctorParameters: () => [], propDecorators: { search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], searchEmptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchEmptyText", required: false }] }], searchInput: [{ type: i0.ViewChild, args: ['searchInput', { isSignal: true }] }] } });
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Option for `<SelectField>`.
|
|
514
|
+
*
|
|
515
|
+
* IMPORTANT: this MUST extend `MatOption` rather than wrap it in a child view.
|
|
516
|
+
* `mat-select` discovers options via `@ContentChildren(MatOption, { descendants: true })`,
|
|
517
|
+
* and Angular content queries do NOT cross into a child component's view. A
|
|
518
|
+
* previous version rendered `<mat-option>` inside this component's template, so
|
|
519
|
+
* mat-select found zero options — the trigger showed its placeholder instead of
|
|
520
|
+
* the bound value and `MatSelect._canOpen()` refused to open (it returns false
|
|
521
|
+
* when `options.length === 0`). By extending `MatOption` and re-providing it,
|
|
522
|
+
* the `<SelectItem>` element IS a real option that the query matches, working
|
|
523
|
+
* both at top level and nested inside `<mat-optgroup>`.
|
|
524
|
+
*
|
|
525
|
+
* Inputs (`value`, `disabled`, `id`), outputs, host bindings, and the internal
|
|
526
|
+
* `#text` view query are inherited from `MatOption`; only the template, styles,
|
|
527
|
+
* and the self-provider below are declared here. The template/styles mirror
|
|
528
|
+
* Material's own option so rendering stays pixel-identical.
|
|
529
|
+
*/
|
|
530
|
+
class OptionComponent extends MatOption {
|
|
531
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: OptionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
532
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: OptionComponent, isStandalone: true, selector: "SelectItem", providers: [{ provide: MatOption, useExisting: forwardRef(() => OptionComponent) }], exportAs: ["matOption"], usesInheritance: true, ngImport: i0, template: `
|
|
533
|
+
@if (multiple) {
|
|
534
|
+
<mat-pseudo-checkbox
|
|
535
|
+
class="mat-mdc-option-pseudo-checkbox"
|
|
536
|
+
[disabled]="disabled"
|
|
537
|
+
[state]="selected ? 'checked' : 'unchecked'"
|
|
538
|
+
aria-hidden="true"
|
|
539
|
+
/>
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
<ng-content select="mat-icon" />
|
|
543
|
+
|
|
544
|
+
<span class="mdc-list-item__primary-text" #text><ng-content /></span>
|
|
545
|
+
|
|
546
|
+
@if (!multiple && selected && !hideSingleSelectionIndicator) {
|
|
547
|
+
<mat-pseudo-checkbox
|
|
548
|
+
class="mat-mdc-option-pseudo-checkbox"
|
|
549
|
+
[disabled]="disabled"
|
|
550
|
+
state="checked"
|
|
551
|
+
aria-hidden="true"
|
|
552
|
+
appearance="minimal"
|
|
553
|
+
/>
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
@if (group && group._inert) {
|
|
557
|
+
<span class="cdk-visually-hidden">({{ group.label }})</span>
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
<div
|
|
561
|
+
class="mat-mdc-option-ripple mat-focus-indicator"
|
|
562
|
+
aria-hidden="true"
|
|
563
|
+
mat-ripple
|
|
564
|
+
[matRippleTrigger]="_getHostElement()"
|
|
565
|
+
[matRippleDisabled]="disabled || disableRipple"
|
|
566
|
+
></div>
|
|
567
|
+
`, isInline: true, styles: [".mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:transparent;color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var( --mat-option-hover-state-layer-color, color-mix( in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent ) )}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var( --mat-option-focus-state-layer-color, color-mix( in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent ) );outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-active,.mat-mdc-option-multiple,:focus,:hover){background-color:var( --mat-option-selected-state-layer-color, var(--mat-sys-secondary-container) )}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-active,.mat-mdc-option-multiple,:focus,:hover) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var( --mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container) )}.mat-mdc-option.mdc-list-item{align-items:center;background:transparent}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{inset:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors:active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox)):after{content:\"\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox)):after{right:auto;left:16px}}.mat-mdc-option-multiple{--mat-list-list-item-selected-container-color: var( --mat-list-list-item-container-color, transparent )}.mat-mdc-option-active .mat-focus-indicator:before{content:\"\"}\n"], dependencies: [{ kind: "component", type: MatPseudoCheckbox, selector: "mat-pseudo-checkbox", inputs: ["state", "disabled", "appearance"] }, { kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
568
|
+
}
|
|
569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: OptionComponent, decorators: [{
|
|
570
|
+
type: Component,
|
|
571
|
+
args: [{ selector: 'SelectItem', imports: [MatPseudoCheckbox, MatRipple], encapsulation: ViewEncapsulation.None, exportAs: 'matOption', providers: [{ provide: MatOption, useExisting: forwardRef(() => OptionComponent) }], template: `
|
|
572
|
+
@if (multiple) {
|
|
573
|
+
<mat-pseudo-checkbox
|
|
574
|
+
class="mat-mdc-option-pseudo-checkbox"
|
|
575
|
+
[disabled]="disabled"
|
|
576
|
+
[state]="selected ? 'checked' : 'unchecked'"
|
|
577
|
+
aria-hidden="true"
|
|
578
|
+
/>
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
<ng-content select="mat-icon" />
|
|
582
|
+
|
|
583
|
+
<span class="mdc-list-item__primary-text" #text><ng-content /></span>
|
|
584
|
+
|
|
585
|
+
@if (!multiple && selected && !hideSingleSelectionIndicator) {
|
|
586
|
+
<mat-pseudo-checkbox
|
|
587
|
+
class="mat-mdc-option-pseudo-checkbox"
|
|
588
|
+
[disabled]="disabled"
|
|
589
|
+
state="checked"
|
|
590
|
+
aria-hidden="true"
|
|
591
|
+
appearance="minimal"
|
|
592
|
+
/>
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
@if (group && group._inert) {
|
|
596
|
+
<span class="cdk-visually-hidden">({{ group.label }})</span>
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
<div
|
|
600
|
+
class="mat-mdc-option-ripple mat-focus-indicator"
|
|
601
|
+
aria-hidden="true"
|
|
602
|
+
mat-ripple
|
|
603
|
+
[matRippleTrigger]="_getHostElement()"
|
|
604
|
+
[matRippleDisabled]="disabled || disableRipple"
|
|
605
|
+
></div>
|
|
606
|
+
`, styles: [".mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:transparent;color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var( --mat-option-hover-state-layer-color, color-mix( in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent ) )}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var( --mat-option-focus-state-layer-color, color-mix( in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent ) );outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-active,.mat-mdc-option-multiple,:focus,:hover){background-color:var( --mat-option-selected-state-layer-color, var(--mat-sys-secondary-container) )}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-active,.mat-mdc-option-multiple,:focus,:hover) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var( --mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container) )}.mat-mdc-option.mdc-list-item{align-items:center;background:transparent}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{inset:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors:active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox)):after{content:\"\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox)):after{right:auto;left:16px}}.mat-mdc-option-multiple{--mat-list-list-item-selected-container-color: var( --mat-list-list-item-container-color, transparent )}.mat-mdc-option-active .mat-focus-indicator:before{content:\"\"}\n"] }]
|
|
607
|
+
}] });
|
|
4
608
|
|
|
5
609
|
/**
|
|
6
610
|
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
611
|
+
*/
|
|
612
|
+
|
|
613
|
+
export { OptionComponent, SelectComponent };
|