@egose/shadcn-theme-ng 0.0.26 → 0.0.28
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 +201 -0
- package/README.md +107 -2
- package/accordion/fesm2022/accordion.mjs +42 -37
- package/accordion/fesm2022/accordion.mjs.map +1 -1
- package/accordion/package.json +25 -0
- package/accordion/{index.d.ts → types/accordion.d.ts} +1 -1
- package/alert/fesm2022/alert.mjs +32 -27
- package/alert/fesm2022/alert.mjs.map +1 -1
- package/alert/package.json +25 -0
- package/alert-dialog/README.md +11 -0
- package/alert-dialog/fesm2022/alert-dialog.mjs +287 -0
- package/alert-dialog/fesm2022/alert-dialog.mjs.map +1 -0
- package/alert-dialog/package.json +25 -0
- package/alert-dialog/types/alert-dialog.d.ts +90 -0
- package/aspect-ratio/README.md +11 -0
- package/aspect-ratio/fesm2022/aspect-ratio.mjs +62 -0
- package/aspect-ratio/fesm2022/aspect-ratio.mjs.map +1 -0
- package/aspect-ratio/package.json +25 -0
- package/aspect-ratio/types/aspect-ratio.d.ts +21 -0
- package/autocomplete/fesm2022/autocomplete.mjs +323 -457
- package/autocomplete/fesm2022/autocomplete.mjs.map +1 -1
- package/autocomplete/package.json +24 -0
- package/autocomplete/types/autocomplete.d.ts +96 -0
- package/avatar/README.md +11 -0
- package/avatar/fesm2022/avatar.mjs +178 -0
- package/avatar/fesm2022/avatar.mjs.map +1 -0
- package/avatar/package.json +25 -0
- package/avatar/types/avatar.d.ts +50 -0
- package/badge/fesm2022/badge.mjs +16 -10
- package/badge/fesm2022/badge.mjs.map +1 -1
- package/badge/package.json +25 -0
- package/basic-alert/fesm2022/basic-alert.mjs +12 -8
- package/basic-alert/fesm2022/basic-alert.mjs.map +1 -1
- package/basic-alert/package.json +24 -0
- package/breadcrumb/README.md +11 -0
- package/breadcrumb/fesm2022/breadcrumb.mjs +224 -0
- package/breadcrumb/fesm2022/breadcrumb.mjs.map +1 -0
- package/breadcrumb/package.json +25 -0
- package/breadcrumb/types/breadcrumb.d.ts +57 -0
- package/button/fesm2022/button.mjs +100 -26
- package/button/fesm2022/button.mjs.map +1 -1
- package/button/package.json +25 -0
- package/button/{index.d.ts → types/button.d.ts} +30 -9
- package/button-group/README.md +11 -0
- package/button-group/fesm2022/button-group.mjs +102 -0
- package/button-group/fesm2022/button-group.mjs.map +1 -0
- package/button-group/package.json +25 -0
- package/button-group/types/button-group.d.ts +30 -0
- package/calendar/fesm2022/calendar.mjs +868 -546
- package/calendar/fesm2022/calendar.mjs.map +1 -1
- package/calendar/package.json +24 -0
- package/calendar/types/calendar.d.ts +94 -0
- package/card/README.md +11 -0
- package/card/fesm2022/card.mjs +169 -0
- package/card/fesm2022/card.mjs.map +1 -0
- package/card/package.json +25 -0
- package/card/types/card.d.ts +54 -0
- package/carousel/README.md +11 -0
- package/carousel/fesm2022/carousel.mjs +309 -0
- package/carousel/fesm2022/carousel.mjs.map +1 -0
- package/carousel/package.json +25 -0
- package/carousel/types/carousel.d.ts +84 -0
- package/checkbox/fesm2022/checkbox.mjs +25 -20
- package/checkbox/fesm2022/checkbox.mjs.map +1 -1
- package/checkbox/package.json +24 -0
- package/collapsible/README.md +11 -0
- package/collapsible/fesm2022/collapsible.mjs +77 -0
- package/collapsible/fesm2022/collapsible.mjs.map +1 -0
- package/collapsible/package.json +25 -0
- package/collapsible/types/collapsible.d.ts +27 -0
- package/combobox/README.md +11 -0
- package/combobox/fesm2022/combobox.mjs +683 -0
- package/combobox/fesm2022/combobox.mjs.map +1 -0
- package/combobox/package.json +25 -0
- package/combobox/types/combobox.d.ts +151 -0
- package/command/README.md +11 -0
- package/command/fesm2022/command.mjs +361 -0
- package/command/fesm2022/command.mjs.map +1 -0
- package/command/package.json +25 -0
- package/command/types/command.d.ts +89 -0
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +19 -8
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +1 -1
- package/confirmation-dialog/package.json +24 -0
- package/context-menu/README.md +11 -0
- package/context-menu/fesm2022/context-menu.mjs +89 -0
- package/context-menu/fesm2022/context-menu.mjs.map +1 -0
- package/context-menu/package.json +25 -0
- package/context-menu/types/context-menu.d.ts +34 -0
- package/date-picker/fesm2022/date-picker.mjs +1262 -307
- package/date-picker/fesm2022/date-picker.mjs.map +1 -1
- package/date-picker/package.json +24 -0
- package/date-picker/types/date-picker.d.ts +551 -0
- package/dialog/fesm2022/dialog.mjs +137 -108
- package/dialog/fesm2022/dialog.mjs.map +1 -1
- package/dialog/package.json +24 -0
- package/dialog/types/dialog.d.ts +95 -0
- package/drawer/README.md +11 -0
- package/drawer/fesm2022/drawer.mjs +271 -0
- package/drawer/fesm2022/drawer.mjs.map +1 -0
- package/drawer/package.json +25 -0
- package/drawer/types/drawer.d.ts +76 -0
- package/dropdown-menu/README.md +11 -0
- package/dropdown-menu/fesm2022/dropdown-menu.mjs +542 -0
- package/dropdown-menu/fesm2022/dropdown-menu.mjs.map +1 -0
- package/dropdown-menu/package.json +25 -0
- package/dropdown-menu/types/dropdown-menu.d.ts +176 -0
- package/empty/README.md +11 -0
- package/empty/fesm2022/empty.mjs +151 -0
- package/empty/fesm2022/empty.mjs.map +1 -0
- package/empty/package.json +25 -0
- package/empty/types/empty.d.ts +54 -0
- package/field/README.md +11 -0
- package/field/fesm2022/field.mjs +367 -0
- package/field/fesm2022/field.mjs.map +1 -0
- package/field/package.json +25 -0
- package/field/types/field.d.ts +107 -0
- package/form-checkbox/fesm2022/form-checkbox.mjs +39 -22
- package/form-checkbox/fesm2022/form-checkbox.mjs.map +1 -1
- package/form-checkbox/package.json +24 -0
- package/form-date-picker/fesm2022/form-date-picker.mjs +58 -51
- package/form-date-picker/fesm2022/form-date-picker.mjs.map +1 -1
- package/form-date-picker/package.json +24 -0
- package/form-field/fesm2022/form-field.mjs +39 -27
- package/form-field/fesm2022/form-field.mjs.map +1 -1
- package/form-field/package.json +25 -0
- package/form-field/{index.d.ts → types/form-field.d.ts} +4 -3
- package/form-field-simple/fesm2022/form-field-simple.mjs +15 -10
- package/form-field-simple/fesm2022/form-field-simple.mjs.map +1 -1
- package/form-field-simple/package.json +24 -0
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +44 -25
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +1 -1
- package/form-searchable-multiselect/package.json +24 -0
- package/form-select/fesm2022/form-select.mjs +132 -71
- package/form-select/fesm2022/form-select.mjs.map +1 -1
- package/form-select/package.json +24 -0
- package/form-text-input/fesm2022/form-text-input.mjs +68 -39
- package/form-text-input/fesm2022/form-text-input.mjs.map +1 -1
- package/form-text-input/package.json +24 -0
- package/form-textarea/fesm2022/form-textarea.mjs +54 -30
- package/form-textarea/fesm2022/form-textarea.mjs.map +1 -1
- package/form-textarea/package.json +24 -0
- package/hover-card/README.md +11 -0
- package/hover-card/fesm2022/hover-card.mjs +123 -0
- package/hover-card/fesm2022/hover-card.mjs.map +1 -0
- package/hover-card/package.json +25 -0
- package/hover-card/types/hover-card.d.ts +36 -0
- package/icon/fesm2022/icon.mjs +12 -10
- package/icon/fesm2022/icon.mjs.map +1 -1
- package/icon/package.json +25 -0
- package/input/fesm2022/input.mjs +20 -70
- package/input/fesm2022/input.mjs.map +1 -1
- package/input/package.json +25 -0
- package/input/types/input.d.ts +18 -0
- package/input-group/README.md +11 -0
- package/input-group/fesm2022/input-group.mjs +199 -0
- package/input-group/fesm2022/input-group.mjs.map +1 -0
- package/input-group/package.json +25 -0
- package/input-group/types/input-group.d.ts +52 -0
- package/input-otp/README.md +11 -0
- package/input-otp/fesm2022/input-otp.mjs +141 -0
- package/input-otp/fesm2022/input-otp.mjs.map +1 -0
- package/input-otp/package.json +25 -0
- package/input-otp/types/input-otp.d.ts +43 -0
- package/item/README.md +11 -0
- package/item/fesm2022/item.mjs +278 -0
- package/item/fesm2022/item.mjs.map +1 -0
- package/item/package.json +25 -0
- package/item/types/item.d.ts +101 -0
- package/kbd/README.md +11 -0
- package/kbd/fesm2022/kbd.mjs +61 -0
- package/kbd/fesm2022/kbd.mjs.map +1 -0
- package/kbd/package.json +25 -0
- package/kbd/types/kbd.d.ts +22 -0
- package/label/fesm2022/label.mjs +11 -10
- package/label/fesm2022/label.mjs.map +1 -1
- package/label/package.json +25 -0
- package/layout-simple/fesm2022/layout-simple.mjs +438 -325
- package/layout-simple/fesm2022/layout-simple.mjs.map +1 -1
- package/layout-simple/package.json +24 -0
- package/layout-simple/{index.d.ts → types/layout-simple.d.ts} +28 -17
- package/menubar/README.md +11 -0
- package/menubar/fesm2022/menubar.mjs +108 -0
- package/menubar/fesm2022/menubar.mjs.map +1 -0
- package/menubar/package.json +25 -0
- package/menubar/types/menubar.d.ts +40 -0
- package/native-select/README.md +11 -0
- package/native-select/fesm2022/native-select.mjs +207 -0
- package/native-select/fesm2022/native-select.mjs.map +1 -0
- package/native-select/package.json +25 -0
- package/native-select/types/native-select.d.ts +70 -0
- package/navigation-menu/README.md +11 -0
- package/navigation-menu/fesm2022/navigation-menu.mjs +206 -0
- package/navigation-menu/fesm2022/navigation-menu.mjs.map +1 -0
- package/navigation-menu/package.json +25 -0
- package/navigation-menu/types/navigation-menu.d.ts +54 -0
- package/package.json +223 -81
- package/pagination/README.md +11 -0
- package/pagination/fesm2022/pagination.mjs +808 -0
- package/pagination/fesm2022/pagination.mjs.map +1 -0
- package/pagination/package.json +25 -0
- package/pagination/types/pagination.d.ts +192 -0
- package/popover/fesm2022/popover.mjs +121 -27
- package/popover/fesm2022/popover.mjs.map +1 -1
- package/popover/package.json +24 -0
- package/popover/types/popover.d.ts +54 -0
- package/progress/README.md +11 -0
- package/progress/fesm2022/progress.mjs +77 -0
- package/progress/fesm2022/progress.mjs.map +1 -0
- package/progress/package.json +25 -0
- package/progress/types/progress.d.ts +27 -0
- package/radio-group/fesm2022/radio-group.mjs +96 -62
- package/radio-group/fesm2022/radio-group.mjs.map +1 -1
- package/radio-group/package.json +25 -0
- package/radio-group/{index.d.ts → types/radio-group.d.ts} +22 -14
- package/resizable/README.md +11 -0
- package/resizable/fesm2022/resizable.mjs +111 -0
- package/resizable/fesm2022/resizable.mjs.map +1 -0
- package/resizable/package.json +25 -0
- package/resizable/types/resizable.d.ts +32 -0
- package/scroll-area/README.md +11 -0
- package/scroll-area/fesm2022/scroll-area.mjs +51 -0
- package/scroll-area/fesm2022/scroll-area.mjs.map +1 -0
- package/scroll-area/package.json +25 -0
- package/scroll-area/types/scroll-area.d.ts +16 -0
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +92 -88
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs.map +1 -1
- package/searchable-multiselect/package.json +24 -0
- package/searchable-multiselect/{index.d.ts → types/searchable-multiselect.d.ts} +13 -24
- package/select/fesm2022/select.mjs +371 -189
- package/select/fesm2022/select.mjs.map +1 -1
- package/select/package.json +25 -0
- package/select/types/select.d.ts +119 -0
- package/separator/fesm2022/separator.mjs +16 -14
- package/separator/fesm2022/separator.mjs.map +1 -1
- package/separator/package.json +24 -0
- package/separator/{index.d.ts → types/separator.d.ts} +4 -5
- package/sheet/fesm2022/sheet.mjs +57 -51
- package/sheet/fesm2022/sheet.mjs.map +1 -1
- package/sheet/package.json +24 -0
- package/sidebar/README.md +11 -0
- package/sidebar/fesm2022/sidebar.mjs +948 -0
- package/sidebar/fesm2022/sidebar.mjs.map +1 -0
- package/sidebar/package.json +25 -0
- package/sidebar/types/sidebar.d.ts +237 -0
- package/skeleton/README.md +11 -0
- package/skeleton/fesm2022/skeleton.mjs +44 -0
- package/skeleton/fesm2022/skeleton.mjs.map +1 -0
- package/skeleton/package.json +25 -0
- package/skeleton/types/skeleton.d.ts +16 -0
- package/slider/README.md +11 -0
- package/slider/fesm2022/slider.mjs +144 -0
- package/slider/fesm2022/slider.mjs.map +1 -0
- package/slider/package.json +25 -0
- package/slider/types/slider.d.ts +19 -0
- package/sonner/fesm2022/sonner.mjs +30 -35
- package/sonner/fesm2022/sonner.mjs.map +1 -1
- package/sonner/package.json +25 -0
- package/spinner/fesm2022/spinner.mjs +18 -14
- package/spinner/fesm2022/spinner.mjs.map +1 -1
- package/spinner/package.json +25 -0
- package/switch/fesm2022/switch.mjs +29 -26
- package/switch/fesm2022/switch.mjs.map +1 -1
- package/switch/package.json +25 -0
- package/table/README.md +11 -0
- package/table/fesm2022/table.mjs +211 -0
- package/table/fesm2022/table.mjs.map +1 -0
- package/table/package.json +25 -0
- package/table/types/table.d.ts +87 -0
- package/tabs/fesm2022/tabs.mjs +131 -103
- package/tabs/fesm2022/tabs.mjs.map +1 -1
- package/tabs/package.json +25 -0
- package/tabs/types/tabs.d.ts +71 -0
- package/textarea/README.md +11 -0
- package/textarea/fesm2022/textarea.mjs +47 -0
- package/textarea/fesm2022/textarea.mjs.map +1 -0
- package/textarea/package.json +25 -0
- package/textarea/types/textarea.d.ts +18 -0
- package/toggle/README.md +11 -0
- package/toggle/fesm2022/toggle.mjs +78 -0
- package/toggle/fesm2022/toggle.mjs.map +1 -0
- package/toggle/package.json +25 -0
- package/toggle/types/toggle.d.ts +27 -0
- package/toggle-group/README.md +11 -0
- package/toggle-group/fesm2022/toggle-group.mjs +117 -0
- package/toggle-group/fesm2022/toggle-group.mjs.map +1 -0
- package/toggle-group/package.json +25 -0
- package/toggle-group/types/toggle-group.d.ts +39 -0
- package/tooltip/fesm2022/tooltip.mjs +33 -54
- package/tooltip/fesm2022/tooltip.mjs.map +1 -1
- package/tooltip/package.json +25 -0
- package/tooltip/types/tooltip.d.ts +22 -0
- package/typography/README.md +11 -0
- package/typography/fesm2022/typography.mjs +242 -0
- package/typography/fesm2022/typography.mjs.map +1 -0
- package/typography/package.json +25 -0
- package/typography/types/typography.d.ts +94 -0
- package/utils/fesm2022/utils.mjs +184 -1
- package/utils/fesm2022/utils.mjs.map +1 -1
- package/utils/package.json +25 -0
- package/utils/types/utils.d.ts +13 -0
- package/autocomplete/index.d.ts +0 -162
- package/calendar/index.d.ts +0 -111
- package/date-picker/index.d.ts +0 -227
- package/dialog/index.d.ts +0 -89
- package/exports.json +0 -1
- package/input/index.d.ts +0 -41
- package/menu/README.md +0 -64
- package/menu/fesm2022/menu.mjs +0 -449
- package/menu/fesm2022/menu.mjs.map +0 -1
- package/menu/index.d.ts +0 -137
- package/popover/index.d.ts +0 -30
- package/select/index.d.ts +0 -92
- package/tabs/index.d.ts +0 -71
- package/tooltip/index.d.ts +0 -21
- package/utils/index.d.ts +0 -5
- /package/alert/{index.d.ts → types/alert.d.ts} +0 -0
- /package/badge/{index.d.ts → types/badge.d.ts} +0 -0
- /package/basic-alert/{index.d.ts → types/basic-alert.d.ts} +0 -0
- /package/checkbox/{index.d.ts → types/checkbox.d.ts} +0 -0
- /package/confirmation-dialog/{index.d.ts → types/confirmation-dialog.d.ts} +0 -0
- /package/form-checkbox/{index.d.ts → types/form-checkbox.d.ts} +0 -0
- /package/form-date-picker/{index.d.ts → types/form-date-picker.d.ts} +0 -0
- /package/form-field-simple/{index.d.ts → types/form-field-simple.d.ts} +0 -0
- /package/form-searchable-multiselect/{index.d.ts → types/form-searchable-multiselect.d.ts} +0 -0
- /package/form-select/{index.d.ts → types/form-select.d.ts} +0 -0
- /package/form-text-input/{index.d.ts → types/form-text-input.d.ts} +0 -0
- /package/form-textarea/{index.d.ts → types/form-textarea.d.ts} +0 -0
- /package/icon/{index.d.ts → types/icon.d.ts} +0 -0
- /package/label/{index.d.ts → types/label.d.ts} +0 -0
- /package/sheet/{index.d.ts → types/sheet.d.ts} +0 -0
- /package/sonner/{index.d.ts → types/sonner.d.ts} +0 -0
- /package/spinner/{index.d.ts → types/spinner.d.ts} +0 -0
- /package/switch/{index.d.ts → types/switch.d.ts} +0 -0
|
@@ -1,533 +1,399 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
|
-
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
6
|
-
import { lucideChevronDown, lucideSearch } from '@ng-icons/lucide';
|
|
2
|
+
import { Directive, input, booleanAttribute, ChangeDetectionStrategy, Component, inject, NgModule } from '@angular/core';
|
|
7
3
|
import * as i1 from '@spartan-ng/brain/autocomplete';
|
|
8
|
-
import { BrnAutocompleteGroup, BrnAutocompleteItem, BrnAutocompleteList,
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
4
|
+
import { BrnAutocomplete, BrnAutocompleteContent, BrnAutocompleteEmpty, BrnAutocompleteGroup, BrnAutocompleteClear, BrnAutocompleteInput, BrnAutocompleteAnchor, BrnAutocompleteItem, BrnAutocompleteLabel, BrnAutocompleteList, BrnAutocompleteSearch, BrnAutocompleteSeparator, BrnAutocompleteStatus } from '@spartan-ng/brain/autocomplete';
|
|
5
|
+
import * as i2 from '@spartan-ng/brain/popover';
|
|
6
|
+
import { provideBrnPopoverConfig, provideBrnPopoverDefaultOptions, BrnPopover, BrnPopoverContent } from '@spartan-ng/brain/popover';
|
|
7
|
+
import { classes } from '@egose/shadcn-theme-ng/utils';
|
|
8
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
9
|
+
import { lucideX, lucideSearch, lucideCheck } from '@ng-icons/lucide';
|
|
10
|
+
import * as i2$1 from '@egose/shadcn-theme-ng/input-group';
|
|
11
|
+
import { HlmInputGroup, HlmInputGroupImports } from '@egose/shadcn-theme-ng/input-group';
|
|
14
12
|
|
|
15
|
-
class
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
static
|
|
13
|
+
class HlmAutocomplete {
|
|
14
|
+
constructor() {
|
|
15
|
+
classes(() => 'block');
|
|
16
|
+
}
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocomplete, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
18
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmAutocomplete, isStandalone: true, selector: "[hlmAutocomplete],hlm-autocomplete", host: { attributes: { "data-slot": "autocomplete" } }, providers: [
|
|
19
|
+
provideBrnPopoverConfig({
|
|
20
|
+
align: 'start',
|
|
21
|
+
sideOffset: 6,
|
|
22
|
+
}),
|
|
23
|
+
provideBrnPopoverDefaultOptions({ role: null }),
|
|
24
|
+
], hostDirectives: [{ directive: i1.BrnAutocomplete, inputs: ["autoHighlight", "autoHighlight", "disabled", "disabled", "value", "value", "search", "search", "itemToString", "itemToString", "isItemEqualToValue", "isItemEqualToValue"], outputs: ["valueChange", "valueChange", "searchChange", "searchChange"] }, { directive: i2.BrnPopover, inputs: ["align", "align", "closeOnOutsidePointerEvents", "closeOnOutsidePointerEvents", "sideOffset", "sideOffset", "state", "state", "offsetX", "offsetX"], outputs: ["stateChanged", "stateChanged", "closed", "closed"] }], ngImport: i0 });
|
|
20
25
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocomplete, decorators: [{
|
|
22
27
|
type: Directive,
|
|
23
28
|
args: [{
|
|
24
|
-
selector: '[
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class HlmAutocompleteGroup {
|
|
32
|
-
/** The user defined class */
|
|
33
|
-
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
34
|
-
/** The styles to apply */
|
|
35
|
-
_computedClass = computed(() => hlm('text-foreground block overflow-hidden p-1', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
36
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAutocompleteGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
37
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmAutocompleteGroup, isStandalone: true, selector: "hlm-autocomplete-group", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnAutocompleteGroup, inputs: ["id", "id"] }], ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
38
|
-
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAutocompleteGroup, decorators: [{
|
|
40
|
-
type: Component,
|
|
41
|
-
args: [{
|
|
42
|
-
selector: 'hlm-autocomplete-group',
|
|
43
|
-
template: '<ng-content />',
|
|
44
|
-
hostDirectives: [
|
|
45
|
-
{
|
|
46
|
-
directive: BrnAutocompleteGroup,
|
|
47
|
-
inputs: ['id'],
|
|
48
|
-
},
|
|
29
|
+
selector: '[hlmAutocomplete],hlm-autocomplete',
|
|
30
|
+
providers: [
|
|
31
|
+
provideBrnPopoverConfig({
|
|
32
|
+
align: 'start',
|
|
33
|
+
sideOffset: 6,
|
|
34
|
+
}),
|
|
35
|
+
provideBrnPopoverDefaultOptions({ role: null }),
|
|
49
36
|
],
|
|
50
|
-
host: {
|
|
51
|
-
'[class]': '_computedClass()',
|
|
52
|
-
},
|
|
53
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
54
|
-
}]
|
|
55
|
-
}] });
|
|
56
|
-
|
|
57
|
-
class HlmAutocompleteItem {
|
|
58
|
-
/** The user defined class */
|
|
59
|
-
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
60
|
-
/** The styles to apply */
|
|
61
|
-
_computedClass = computed(() => hlm('data-[selected]:bg-accent data-[selected]:text-accent-foreground [&>ng-icon]:text-muted-foreground outline-hidden relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[hidden]:hidden data-[disabled]:opacity-50 [&>ng-icon]:pointer-events-none [&>ng-icon]:shrink-0 [&>ng-icon]:text-base', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
62
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAutocompleteItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
63
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmAutocompleteItem, isStandalone: true, selector: "button[hlm-autocomplete-item]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnAutocompleteItem, inputs: ["value", "value", "disabled", "disabled", "id", "id"], outputs: ["selected", "selected"] }], ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
64
|
-
}
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAutocompleteItem, decorators: [{
|
|
66
|
-
type: Component,
|
|
67
|
-
args: [{
|
|
68
|
-
selector: 'button[hlm-autocomplete-item]',
|
|
69
|
-
template: ` <ng-content /> `,
|
|
70
37
|
hostDirectives: [
|
|
71
38
|
{
|
|
72
|
-
directive:
|
|
73
|
-
inputs: ['
|
|
74
|
-
outputs: ['
|
|
39
|
+
directive: BrnAutocomplete,
|
|
40
|
+
inputs: ['autoHighlight', 'disabled', 'value', 'search', 'itemToString', 'isItemEqualToValue'],
|
|
41
|
+
outputs: ['valueChange', 'searchChange'],
|
|
75
42
|
},
|
|
76
|
-
],
|
|
77
|
-
host: {
|
|
78
|
-
'[class]': '_computedClass()',
|
|
79
|
-
},
|
|
80
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
81
|
-
}]
|
|
82
|
-
}] });
|
|
83
|
-
|
|
84
|
-
class HlmAutocompleteList {
|
|
85
|
-
/** The user defined class */
|
|
86
|
-
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
87
|
-
/** The styles to apply */
|
|
88
|
-
_computedClass = computed(() => hlm('block max-h-60 overflow-y-auto overflow-x-hidden', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
89
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAutocompleteList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
90
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmAutocompleteList, isStandalone: true, selector: "hlm-autocomplete-list", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnAutocompleteList, inputs: ["id", "id"] }], ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
91
|
-
}
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAutocompleteList, decorators: [{
|
|
93
|
-
type: Component,
|
|
94
|
-
args: [{
|
|
95
|
-
selector: 'hlm-autocomplete-list',
|
|
96
|
-
template: '<ng-content />',
|
|
97
|
-
host: {
|
|
98
|
-
'[class]': '_computedClass()',
|
|
99
|
-
},
|
|
100
|
-
hostDirectives: [
|
|
101
43
|
{
|
|
102
|
-
directive:
|
|
103
|
-
inputs: ['
|
|
44
|
+
directive: BrnPopover,
|
|
45
|
+
inputs: ['align', 'closeOnOutsidePointerEvents', 'sideOffset', 'state', 'offsetX'],
|
|
46
|
+
outputs: ['stateChanged', 'closed'],
|
|
104
47
|
},
|
|
105
48
|
],
|
|
106
|
-
|
|
49
|
+
host: { 'data-slot': 'autocomplete' },
|
|
107
50
|
}]
|
|
108
|
-
}] });
|
|
51
|
+
}], ctorParameters: () => [] });
|
|
109
52
|
|
|
110
|
-
class
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
static
|
|
116
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmAutocompleteSearch, isStandalone: true, selector: "hlm-autocomplete-search", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, providers: [provideHlmIconConfig({ size: 'sm' })], ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
53
|
+
class HlmAutocompleteContent {
|
|
54
|
+
constructor() {
|
|
55
|
+
classes(() => 'bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 max-h-72 min-w-36 overflow-hidden rounded-md shadow-md ring-1 duration-100 group/autocomplete-content flex w-(--brn-autocomplete-width) flex-col p-0');
|
|
56
|
+
}
|
|
57
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
58
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmAutocompleteContent, isStandalone: true, selector: "[hlmAutocompleteContent],hlm-autocomplete-content", hostDirectives: [{ directive: i1.BrnAutocompleteContent }], ngImport: i0 });
|
|
117
59
|
}
|
|
118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
119
|
-
type:
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteContent, decorators: [{
|
|
61
|
+
type: Directive,
|
|
120
62
|
args: [{
|
|
121
|
-
selector: 'hlm-autocomplete-
|
|
122
|
-
|
|
123
|
-
host: {
|
|
124
|
-
'[class]': '_computedClass()',
|
|
125
|
-
},
|
|
126
|
-
providers: [provideHlmIconConfig({ size: 'sm' })],
|
|
127
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
63
|
+
selector: '[hlmAutocompleteContent],hlm-autocomplete-content',
|
|
64
|
+
hostDirectives: [BrnAutocompleteContent],
|
|
128
65
|
}]
|
|
129
|
-
}] });
|
|
66
|
+
}], ctorParameters: () => [] });
|
|
130
67
|
|
|
131
|
-
class
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
static
|
|
137
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmAutocompleteSearchInput, isStandalone: true, selector: "input[hlm-autocomplete-search-input]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnAutocompleteSearchInput, inputs: ["value", "value"] }], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
68
|
+
class HlmAutocompleteEmpty {
|
|
69
|
+
constructor() {
|
|
70
|
+
classes(() => 'text-muted-foreground hidden w-full items-center justify-center gap-2 py-2 text-center text-sm group-data-empty/autocomplete-content:flex');
|
|
71
|
+
}
|
|
72
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteEmpty, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
73
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmAutocompleteEmpty, isStandalone: true, selector: "[hlmAutocompleteEmpty],hlm-autocomplete-empty", host: { attributes: { "data-slot": "autocomplete-empty" } }, hostDirectives: [{ directive: i1.BrnAutocompleteEmpty }], ngImport: i0 });
|
|
138
74
|
}
|
|
139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
140
|
-
type:
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteEmpty, decorators: [{
|
|
76
|
+
type: Directive,
|
|
141
77
|
args: [{
|
|
142
|
-
selector: '
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
host: {
|
|
146
|
-
'[class]': '_computedClass()',
|
|
147
|
-
},
|
|
148
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
78
|
+
selector: '[hlmAutocompleteEmpty],hlm-autocomplete-empty',
|
|
79
|
+
hostDirectives: [BrnAutocompleteEmpty],
|
|
80
|
+
host: { 'data-slot': 'autocomplete-empty' },
|
|
149
81
|
}]
|
|
150
|
-
}] });
|
|
82
|
+
}], ctorParameters: () => [] });
|
|
151
83
|
|
|
152
|
-
class
|
|
153
|
-
_host = inject(ElementRef, { host: true });
|
|
154
|
-
_brnDialog = inject(BrnDialog, { optional: true });
|
|
155
|
-
/** Whether the trigger is disabled. */
|
|
156
|
-
disabledTrigger = input(false, ...(ngDevMode ? [{ debugName: "disabledTrigger", transform: booleanAttribute }] : [{
|
|
157
|
-
transform: booleanAttribute,
|
|
158
|
-
}]));
|
|
84
|
+
class HlmAutocompleteGroup {
|
|
159
85
|
constructor() {
|
|
160
|
-
|
|
161
|
-
return;
|
|
162
|
-
this._brnDialog.mutableAttachTo.set(this._host.nativeElement);
|
|
86
|
+
classes(() => 'data-hidden:hidden');
|
|
163
87
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
return;
|
|
167
|
-
this._brnDialog?.open();
|
|
168
|
-
}
|
|
169
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmAutocompleteTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
170
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmAutocompleteTrigger, isStandalone: true, selector: "[hlmAutocompleteTrigger]", inputs: { disabledTrigger: { classPropertyName: "disabledTrigger", publicName: "disabledTrigger", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "open()" } }, ngImport: i0 });
|
|
88
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
89
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmAutocompleteGroup, isStandalone: true, selector: "[hlmAutocompleteGroup]", host: { attributes: { "data-slot": "autocomplete-group" } }, hostDirectives: [{ directive: i1.BrnAutocompleteGroup }], ngImport: i0 });
|
|
171
90
|
}
|
|
172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteGroup, decorators: [{
|
|
173
92
|
type: Directive,
|
|
174
93
|
args: [{
|
|
175
|
-
selector: '[
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
},
|
|
94
|
+
selector: '[hlmAutocompleteGroup]',
|
|
95
|
+
hostDirectives: [BrnAutocompleteGroup],
|
|
96
|
+
host: { 'data-slot': 'autocomplete-group' },
|
|
179
97
|
}]
|
|
180
98
|
}], ctorParameters: () => [] });
|
|
181
99
|
|
|
182
|
-
|
|
183
|
-
return {
|
|
184
|
-
transformValueToSearch: (value) => (typeof value === 'string' ? value : String(value)),
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
const HlmAutocompleteConfigToken = new InjectionToken('HlmAutocompleteConfig');
|
|
188
|
-
function provideHlmAutocompleteConfig(config) {
|
|
189
|
-
return { provide: HlmAutocompleteConfigToken, useValue: { ...getDefaultConfig(), ...config } };
|
|
190
|
-
}
|
|
191
|
-
function injectHlmAutocompleteConfig() {
|
|
192
|
-
return inject(HlmAutocompleteConfigToken, { optional: true }) ?? getDefaultConfig();
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
const HLM_AUTOCOMPLETE_VALUE_ACCESSOR = {
|
|
196
|
-
provide: NG_VALUE_ACCESSOR,
|
|
197
|
-
useExisting: forwardRef(() => HlmAutocomplete),
|
|
198
|
-
multi: true,
|
|
199
|
-
};
|
|
200
|
-
class HlmAutocomplete {
|
|
100
|
+
class HlmAutocompleteInput {
|
|
201
101
|
static _id = 0;
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
_computedAutocompleteEmptyClass = computed(() => hlm('', this.autocompleteEmptyClass()), ...(ngDevMode ? [{ debugName: "_computedAutocompleteEmptyClass" }] : []));
|
|
216
|
-
/** The list of filtered options to display in the autocomplete. */
|
|
217
|
-
filteredOptions = input([], ...(ngDevMode ? [{ debugName: "filteredOptions" }] : []));
|
|
218
|
-
/** The selected value. */
|
|
219
|
-
value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
|
|
220
|
-
_value = linkedSignal(() => this.value(), ...(ngDevMode ? [{ debugName: "_value" }] : []));
|
|
221
|
-
/** The search query. */
|
|
222
|
-
search = input(...(ngDevMode ? [undefined, { debugName: "search" }] : []));
|
|
223
|
-
_search = linkedSignal(() => this.search() || '', ...(ngDevMode ? [{ debugName: "_search" }] : []));
|
|
224
|
-
/** Function to transform an option value to a search string. Defaults to identity function for strings. */
|
|
225
|
-
transformValueToSearch = input(this._config.transformValueToSearch, ...(ngDevMode ? [{ debugName: "transformValueToSearch" }] : []));
|
|
226
|
-
/** Optional template for rendering each option. */
|
|
227
|
-
optionTemplate = input(...(ngDevMode ? [undefined, { debugName: "optionTemplate" }] : []));
|
|
228
|
-
/** Whether the autocomplete is in a loading state. */
|
|
229
|
-
loading = input(false, ...(ngDevMode ? [{ debugName: "loading", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
230
|
-
/** Placeholder text for the input field. */
|
|
231
|
-
searchPlaceholderText = input('Select an option', ...(ngDevMode ? [{ debugName: "searchPlaceholderText" }] : []));
|
|
232
|
-
/** Text to display when loading options. */
|
|
233
|
-
loadingText = input('Loading options...', ...(ngDevMode ? [{ debugName: "loadingText" }] : []));
|
|
234
|
-
/** Text to display when no options are found. */
|
|
235
|
-
emptyText = input('No options found', ...(ngDevMode ? [{ debugName: "emptyText" }] : []));
|
|
236
|
-
/** Aria label for the toggle button. */
|
|
237
|
-
ariaLabelToggleButton = input('Toggle options', ...(ngDevMode ? [{ debugName: "ariaLabelToggleButton" }] : []));
|
|
238
|
-
/** The id of the input field. */
|
|
239
|
-
inputId = input(`hlm-autocomplete-input-${++HlmAutocomplete._id}`, ...(ngDevMode ? [{ debugName: "inputId" }] : []));
|
|
240
|
-
/** Whether the autocomplete is disabled. */
|
|
241
|
-
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
242
|
-
_disabled = linkedSignal(() => this.disabled(), ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
|
|
243
|
-
/** Emitted when the selected value changes. */
|
|
244
|
-
valueChange = output();
|
|
245
|
-
/** Emitted when the search query changes. */
|
|
246
|
-
searchChange = output();
|
|
247
|
-
_onChange;
|
|
248
|
-
_onTouched;
|
|
249
|
-
_setPopoverState(state) {
|
|
250
|
-
if (state === 'open') {
|
|
251
|
-
this._brnPopover().open();
|
|
252
|
-
}
|
|
253
|
-
else {
|
|
254
|
-
this._brnPopover().close();
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
_click() {
|
|
258
|
-
this._toggleOptions();
|
|
259
|
-
}
|
|
260
|
-
_openPopover() {
|
|
261
|
-
if (this._search() || this.filteredOptions().length > 0) {
|
|
262
|
-
// only open if there's a search term or options to show
|
|
263
|
-
this._brnPopover().open();
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
_toggleOptions() {
|
|
267
|
-
if (this._search() || this.filteredOptions().length > 0) {
|
|
268
|
-
// only toggle if there's a search term or options to show
|
|
269
|
-
const state = this._brnPopover().stateComputed();
|
|
270
|
-
this._setPopoverState(state === 'open' ? 'closed' : 'open');
|
|
271
|
-
}
|
|
272
|
-
this._inputRef().nativeElement.focus();
|
|
273
|
-
}
|
|
274
|
-
_onSearchChanged(event) {
|
|
275
|
-
const input = event.target;
|
|
276
|
-
this._search.set(input.value);
|
|
277
|
-
this.searchChange.emit(input.value);
|
|
278
|
-
this._clearOption();
|
|
279
|
-
if (this._brnPopover().stateComputed() !== 'open' && input.value.length > 0) {
|
|
280
|
-
this._setPopoverState('open');
|
|
281
|
-
}
|
|
102
|
+
inputId = input(`hlm-autocomplete-input-${HlmAutocompleteInput._id++}`, /* @ts-ignore */
|
|
103
|
+
...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
|
|
104
|
+
placeholder = input('', /* @ts-ignore */
|
|
105
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
106
|
+
showSearch = input(true, { ...(ngDevMode ? { debugName: "showSearch" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
107
|
+
showClear = input(false, { ...(ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
108
|
+
/** Forces the invalid state visually, regardless of form control state. */
|
|
109
|
+
forceInvalid = input(false, { ...(ngDevMode ? { debugName: "forceInvalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
110
|
+
/** Manual override for aria-invalid. When not set, auto-detects from the parent autocomplete error state. */
|
|
111
|
+
ariaInvalidOverride = input(undefined, { ...(ngDevMode ? { debugName: "ariaInvalidOverride" } : /* istanbul ignore next */ {}), transform: (v) => (v === '' || v === undefined ? undefined : booleanAttribute(v)),
|
|
112
|
+
alias: 'aria-invalid' });
|
|
113
|
+
constructor() {
|
|
114
|
+
classes(() => 'w-auto');
|
|
282
115
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
116
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: HlmAutocompleteInput, isStandalone: true, selector: "hlm-autocomplete-input", inputs: { inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showSearch: { classPropertyName: "showSearch", publicName: "showSearch", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, forceInvalid: { classPropertyName: "forceInvalid", publicName: "forceInvalid", isSignal: true, isRequired: false, transformFunction: null }, ariaInvalidOverride: { classPropertyName: "ariaInvalidOverride", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideIcons({ lucideSearch, lucideX })], hostDirectives: [{ directive: i1.BrnAutocompleteAnchor }, { directive: i2$1.HlmInputGroup }], ngImport: i0, template: `
|
|
118
|
+
<input
|
|
119
|
+
brnAutocompleteInput
|
|
120
|
+
#autocompleteInput="brnAutocompleteInput"
|
|
121
|
+
hlmInputGroupInput
|
|
122
|
+
[id]="inputId()"
|
|
123
|
+
[placeholder]="placeholder()"
|
|
124
|
+
[aria-invalid]="ariaInvalidOverride()"
|
|
125
|
+
[forceInvalid]="forceInvalid()"
|
|
126
|
+
/>
|
|
127
|
+
|
|
128
|
+
@if (showSearch()) {
|
|
129
|
+
<hlm-input-group-addon>
|
|
130
|
+
<ng-icon name="lucideSearch" [class.opacity-50]="autocompleteInput.disabled()" />
|
|
131
|
+
</hlm-input-group-addon>
|
|
287
132
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
133
|
+
|
|
134
|
+
@if (showClear()) {
|
|
135
|
+
<hlm-input-group-addon align="inline-end">
|
|
136
|
+
<button
|
|
137
|
+
*brnAutocompleteClear
|
|
138
|
+
hlmInputGroupButton
|
|
139
|
+
data-slot="autocomplete-clear"
|
|
140
|
+
[disabled]="autocompleteInput.disabled()"
|
|
141
|
+
size="icon-xs"
|
|
142
|
+
variant="ghost"
|
|
143
|
+
>
|
|
144
|
+
<ng-icon name="lucideX" />
|
|
145
|
+
</button>
|
|
146
|
+
</hlm-input-group-addon>
|
|
301
147
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
148
|
+
<ng-content />
|
|
149
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2$1.HlmInputGroupAddon, selector: "[hlmInputGroupAddon],hlm-input-group-addon", inputs: ["align"] }, { kind: "directive", type: i2$1.HlmInputGroupButton, selector: "button[hlmInputGroupButton]", inputs: ["size", "type"] }, { kind: "directive", type: i2$1.HlmInputGroupInput, selector: "input[hlmInputGroupInput]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: BrnAutocompleteClear, selector: "[brnAutocompleteClear]" }, { kind: "directive", type: BrnAutocompleteInput, selector: "input[brnAutocompleteInput]", inputs: ["id", "aria-invalid", "forceInvalid"], exportAs: ["brnAutocompleteInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
150
|
+
}
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteInput, decorators: [{
|
|
152
|
+
type: Component,
|
|
153
|
+
args: [{
|
|
154
|
+
selector: 'hlm-autocomplete-input',
|
|
155
|
+
imports: [HlmInputGroupImports, NgIcon, BrnAutocompleteClear, BrnAutocompleteInput],
|
|
156
|
+
providers: [provideIcons({ lucideSearch, lucideX })],
|
|
157
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
158
|
+
hostDirectives: [BrnAutocompleteAnchor, HlmInputGroup],
|
|
159
|
+
template: `
|
|
160
|
+
<input
|
|
161
|
+
brnAutocompleteInput
|
|
162
|
+
#autocompleteInput="brnAutocompleteInput"
|
|
163
|
+
hlmInputGroupInput
|
|
164
|
+
[id]="inputId()"
|
|
165
|
+
[placeholder]="placeholder()"
|
|
166
|
+
[aria-invalid]="ariaInvalidOverride()"
|
|
167
|
+
[forceInvalid]="forceInvalid()"
|
|
168
|
+
/>
|
|
169
|
+
|
|
170
|
+
@if (showSearch()) {
|
|
171
|
+
<hlm-input-group-addon>
|
|
172
|
+
<ng-icon name="lucideSearch" [class.opacity-50]="autocompleteInput.disabled()" />
|
|
173
|
+
</hlm-input-group-addon>
|
|
306
174
|
}
|
|
307
|
-
|
|
308
|
-
|
|
175
|
+
|
|
176
|
+
@if (showClear()) {
|
|
177
|
+
<hlm-input-group-addon align="inline-end">
|
|
178
|
+
<button
|
|
179
|
+
*brnAutocompleteClear
|
|
180
|
+
hlmInputGroupButton
|
|
181
|
+
data-slot="autocomplete-clear"
|
|
182
|
+
[disabled]="autocompleteInput.disabled()"
|
|
183
|
+
size="icon-xs"
|
|
184
|
+
variant="ghost"
|
|
185
|
+
>
|
|
186
|
+
<ng-icon name="lucideX" />
|
|
187
|
+
</button>
|
|
188
|
+
</hlm-input-group-addon>
|
|
309
189
|
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
190
|
+
<ng-content />
|
|
191
|
+
`,
|
|
192
|
+
}]
|
|
193
|
+
}], ctorParameters: () => [], propDecorators: { inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], showSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSearch", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], forceInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceInvalid", required: false }] }], ariaInvalidOverride: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-invalid", required: false }] }] } });
|
|
194
|
+
|
|
195
|
+
class HlmAutocompleteItem {
|
|
196
|
+
_brnAutocompleteItem = inject(BrnAutocompleteItem);
|
|
197
|
+
_active = this._brnAutocompleteItem.active;
|
|
198
|
+
constructor() {
|
|
199
|
+
classes(() => 'data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-hidden:hidden [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0');
|
|
313
200
|
}
|
|
314
|
-
|
|
315
|
-
|
|
201
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
202
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: HlmAutocompleteItem, isStandalone: true, selector: "hlm-autocomplete-item", host: { attributes: { "data-slot": "autocomplete-item" } }, providers: [provideIcons({ lucideCheck })], hostDirectives: [{ directive: i1.BrnAutocompleteItem, inputs: ["id", "id", "disabled", "disabled", "value", "value"] }], ngImport: i0, template: `
|
|
203
|
+
<ng-content />
|
|
204
|
+
@if (_active()) {
|
|
205
|
+
<ng-icon
|
|
206
|
+
name="lucideCheck"
|
|
207
|
+
class="absolute end-2 flex items-center justify-center text-[length:--spacing(4)]"
|
|
208
|
+
aria-hidden="true"
|
|
209
|
+
/>
|
|
316
210
|
}
|
|
317
|
-
|
|
318
|
-
|
|
211
|
+
`, isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
212
|
+
}
|
|
213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteItem, decorators: [{
|
|
214
|
+
type: Component,
|
|
215
|
+
args: [{
|
|
216
|
+
selector: 'hlm-autocomplete-item',
|
|
217
|
+
imports: [NgIcon],
|
|
218
|
+
providers: [provideIcons({ lucideCheck })],
|
|
219
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
220
|
+
hostDirectives: [{ directive: BrnAutocompleteItem, inputs: ['id', 'disabled', 'value'] }],
|
|
221
|
+
host: { 'data-slot': 'autocomplete-item' },
|
|
222
|
+
template: `
|
|
223
|
+
<ng-content />
|
|
224
|
+
@if (_active()) {
|
|
225
|
+
<ng-icon
|
|
226
|
+
name="lucideCheck"
|
|
227
|
+
class="absolute end-2 flex items-center justify-center text-[length:--spacing(4)]"
|
|
228
|
+
aria-hidden="true"
|
|
229
|
+
/>
|
|
319
230
|
}
|
|
320
|
-
|
|
321
|
-
|
|
231
|
+
`,
|
|
232
|
+
}]
|
|
233
|
+
}], ctorParameters: () => [] });
|
|
234
|
+
|
|
235
|
+
class HlmAutocompleteLabel {
|
|
236
|
+
constructor() {
|
|
237
|
+
classes(() => 'text-muted-foreground px-2 py-1.5 text-xs');
|
|
322
238
|
}
|
|
323
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
324
|
-
static
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
<hlm-autocomplete-search hlmAutocompleteTrigger [disabledTrigger]="!_search()">
|
|
335
|
-
<ng-icon name="lucideSearch" hlm />
|
|
336
|
-
<input
|
|
337
|
-
#input
|
|
338
|
-
type="text"
|
|
339
|
-
autocomplete="off"
|
|
340
|
-
hlm-autocomplete-search-input
|
|
341
|
-
[id]="inputId()"
|
|
342
|
-
[placeholder]="searchPlaceholderText()"
|
|
343
|
-
[disabled]="_disabled()"
|
|
344
|
-
[value]="_search()"
|
|
345
|
-
(input)="_onSearchChanged($event)"
|
|
346
|
-
(keydown.arrowDown)="_openPopover()"
|
|
347
|
-
(click)="_click()"
|
|
348
|
-
/>
|
|
239
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
240
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmAutocompleteLabel, isStandalone: true, selector: "[hlmAutocompleteLabel]", host: { attributes: { "data-slot": "autocomplete-label" } }, hostDirectives: [{ directive: i1.BrnAutocompleteLabel, inputs: ["id", "id"] }], ngImport: i0 });
|
|
241
|
+
}
|
|
242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteLabel, decorators: [{
|
|
243
|
+
type: Directive,
|
|
244
|
+
args: [{
|
|
245
|
+
selector: '[hlmAutocompleteLabel]',
|
|
246
|
+
hostDirectives: [{ directive: BrnAutocompleteLabel, inputs: ['id'] }],
|
|
247
|
+
host: { 'data-slot': 'autocomplete-label' },
|
|
248
|
+
}]
|
|
249
|
+
}], ctorParameters: () => [] });
|
|
349
250
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
251
|
+
class HlmAutocompleteList {
|
|
252
|
+
constructor() {
|
|
253
|
+
classes(() => 'no-scrollbar max-h-[calc(--spacing(72)---spacing(9))] scroll-py-1 p-1 data-empty:p-0 overflow-y-auto overscroll-contain');
|
|
254
|
+
}
|
|
255
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteList, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
256
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmAutocompleteList, isStandalone: true, selector: "[hlmAutocompleteList]", host: { attributes: { "data-slot": "autocomplete-list" } }, hostDirectives: [{ directive: i1.BrnAutocompleteList, inputs: ["id", "id"] }], ngImport: i0 });
|
|
257
|
+
}
|
|
258
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteList, decorators: [{
|
|
259
|
+
type: Directive,
|
|
260
|
+
args: [{
|
|
261
|
+
selector: '[hlmAutocompleteList]',
|
|
262
|
+
hostDirectives: [{ directive: BrnAutocompleteList, inputs: ['id'] }],
|
|
263
|
+
host: { 'data-slot': 'autocomplete-list' },
|
|
264
|
+
}]
|
|
265
|
+
}], ctorParameters: () => [] });
|
|
361
266
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
@for (option of filteredOptions(); track option) {
|
|
374
|
-
<button hlm-autocomplete-item [value]="option" (selected)="_optionSelected(option)">
|
|
375
|
-
@if (optionTemplate(); as optionTemplate) {
|
|
376
|
-
<ng-container *ngTemplateOutlet="optionTemplate; context: { $implicit: option }" />
|
|
377
|
-
} @else {
|
|
378
|
-
{{ option }}
|
|
379
|
-
}
|
|
380
|
-
</button>
|
|
381
|
-
}
|
|
382
|
-
</hlm-autocomplete-group>
|
|
383
|
-
</hlm-autocomplete-list>
|
|
267
|
+
class HlmAutocompletePortal {
|
|
268
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompletePortal, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
269
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmAutocompletePortal, isStandalone: true, selector: "[hlmAutocompletePortal]", hostDirectives: [{ directive: i2.BrnPopoverContent, inputs: ["context", "context", "class", "class"] }], ngImport: i0 });
|
|
270
|
+
}
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompletePortal, decorators: [{
|
|
272
|
+
type: Directive,
|
|
273
|
+
args: [{
|
|
274
|
+
selector: '[hlmAutocompletePortal]',
|
|
275
|
+
hostDirectives: [{ directive: BrnPopoverContent, inputs: ['context', 'class'] }],
|
|
276
|
+
}]
|
|
277
|
+
}] });
|
|
384
278
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
279
|
+
class HlmAutocompleteSearch {
|
|
280
|
+
constructor() {
|
|
281
|
+
classes(() => 'block');
|
|
282
|
+
}
|
|
283
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteSearch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
284
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmAutocompleteSearch, isStandalone: true, selector: "[hlmAutocompleteSearch],hlm-autocomplete-search", host: { attributes: { "data-slot": "autocomplete" } }, providers: [
|
|
285
|
+
provideBrnPopoverConfig({
|
|
286
|
+
align: 'start',
|
|
287
|
+
sideOffset: 6,
|
|
288
|
+
}),
|
|
289
|
+
provideBrnPopoverDefaultOptions({ role: null }),
|
|
290
|
+
], hostDirectives: [{ directive: i1.BrnAutocompleteSearch, inputs: ["autoHighlight", "autoHighlight", "disabled", "disabled", "value", "value", "search", "search", "itemToString", "itemToString"], outputs: ["valueChange", "valueChange", "searchChange", "searchChange"] }, { directive: i2.BrnPopover, inputs: ["align", "align", "closeOnOutsidePointerEvents", "closeOnOutsidePointerEvents", "sideOffset", "sideOffset", "state", "state", "offsetX", "offsetX"], outputs: ["stateChanged", "stateChanged", "closed", "closed"] }], ngImport: i0 });
|
|
396
291
|
}
|
|
397
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
398
|
-
type:
|
|
292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteSearch, decorators: [{
|
|
293
|
+
type: Directive,
|
|
399
294
|
args: [{
|
|
400
|
-
selector: 'hlm-autocomplete',
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
BrnAutocompleteEmpty,
|
|
408
|
-
HlmAutocompleteEmpty,
|
|
409
|
-
HlmAutocompleteGroup,
|
|
410
|
-
HlmAutocompleteItem,
|
|
411
|
-
HlmAutocompleteList,
|
|
412
|
-
HlmAutocompleteSearch,
|
|
413
|
-
HlmAutocompleteSearchInput,
|
|
414
|
-
HlmAutocompleteTrigger,
|
|
415
|
-
NgIcon,
|
|
416
|
-
HlmIcon,
|
|
295
|
+
selector: '[hlmAutocompleteSearch],hlm-autocomplete-search',
|
|
296
|
+
providers: [
|
|
297
|
+
provideBrnPopoverConfig({
|
|
298
|
+
align: 'start',
|
|
299
|
+
sideOffset: 6,
|
|
300
|
+
}),
|
|
301
|
+
provideBrnPopoverDefaultOptions({ role: null }),
|
|
417
302
|
],
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
type="text"
|
|
434
|
-
autocomplete="off"
|
|
435
|
-
hlm-autocomplete-search-input
|
|
436
|
-
[id]="inputId()"
|
|
437
|
-
[placeholder]="searchPlaceholderText()"
|
|
438
|
-
[disabled]="_disabled()"
|
|
439
|
-
[value]="_search()"
|
|
440
|
-
(input)="_onSearchChanged($event)"
|
|
441
|
-
(keydown.arrowDown)="_openPopover()"
|
|
442
|
-
(click)="_click()"
|
|
443
|
-
/>
|
|
444
|
-
|
|
445
|
-
<button
|
|
446
|
-
class="flex items-center justify-center outline-none disabled:cursor-not-allowed [&>_ng-icon]:opacity-50"
|
|
447
|
-
tabindex="-1"
|
|
448
|
-
type="button"
|
|
449
|
-
[attr.aria-label]="ariaLabelToggleButton()"
|
|
450
|
-
[disabled]="_disabled()"
|
|
451
|
-
(click)="_toggleOptions()"
|
|
452
|
-
>
|
|
453
|
-
<ng-icon name="lucideChevronDown" hlm />
|
|
454
|
-
</button>
|
|
455
|
-
</hlm-autocomplete-search>
|
|
303
|
+
hostDirectives: [
|
|
304
|
+
{
|
|
305
|
+
directive: BrnAutocompleteSearch,
|
|
306
|
+
inputs: ['autoHighlight', 'disabled', 'value', 'search', 'itemToString'],
|
|
307
|
+
outputs: ['valueChange', 'searchChange'],
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
directive: BrnPopover,
|
|
311
|
+
inputs: ['align', 'closeOnOutsidePointerEvents', 'sideOffset', 'state', 'offsetX'],
|
|
312
|
+
outputs: ['stateChanged', 'closed'],
|
|
313
|
+
},
|
|
314
|
+
],
|
|
315
|
+
host: { 'data-slot': 'autocomplete' },
|
|
316
|
+
}]
|
|
317
|
+
}], ctorParameters: () => [] });
|
|
456
318
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
} @else {
|
|
473
|
-
{{ option }}
|
|
474
|
-
}
|
|
475
|
-
</button>
|
|
476
|
-
}
|
|
477
|
-
</hlm-autocomplete-group>
|
|
478
|
-
</hlm-autocomplete-list>
|
|
319
|
+
class HlmAutocompleteSeparator {
|
|
320
|
+
constructor() {
|
|
321
|
+
classes(() => 'bg-border -mx-1 my-1 h-px');
|
|
322
|
+
}
|
|
323
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
324
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmAutocompleteSeparator, isStandalone: true, selector: "[hlmAutocompleteSeparator]", host: { attributes: { "data-slot": "autocomplete-separator" } }, hostDirectives: [{ directive: i1.BrnAutocompleteSeparator, inputs: ["orientation", "orientation"] }], ngImport: i0 });
|
|
325
|
+
}
|
|
326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteSeparator, decorators: [{
|
|
327
|
+
type: Directive,
|
|
328
|
+
args: [{
|
|
329
|
+
selector: '[hlmAutocompleteSeparator]',
|
|
330
|
+
hostDirectives: [{ directive: BrnAutocompleteSeparator, inputs: ['orientation'] }],
|
|
331
|
+
host: { 'data-slot': 'autocomplete-separator' },
|
|
332
|
+
}]
|
|
333
|
+
}], ctorParameters: () => [] });
|
|
479
334
|
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
host: {
|
|
493
|
-
'[class]': '_computedClass()',
|
|
494
|
-
},
|
|
335
|
+
class HlmAutocompleteStatus {
|
|
336
|
+
constructor() {
|
|
337
|
+
classes(() => 'text-muted-foreground gap-2 px-3 py-2 text-sm flex w-full items-center justify-center text-center');
|
|
338
|
+
}
|
|
339
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteStatus, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
340
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmAutocompleteStatus, isStandalone: true, selector: "[hlmAutocompleteStatus],hlm-autocomplete-status", host: { attributes: { "data-slot": "autocomplete-status" } }, hostDirectives: [{ directive: i1.BrnAutocompleteStatus }], ngImport: i0 });
|
|
341
|
+
}
|
|
342
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteStatus, decorators: [{
|
|
343
|
+
type: Directive,
|
|
344
|
+
args: [{
|
|
345
|
+
selector: '[hlmAutocompleteStatus],hlm-autocomplete-status',
|
|
346
|
+
hostDirectives: [BrnAutocompleteStatus],
|
|
347
|
+
host: { 'data-slot': 'autocomplete-status' },
|
|
495
348
|
}]
|
|
496
|
-
}] });
|
|
349
|
+
}], ctorParameters: () => [] });
|
|
497
350
|
|
|
498
351
|
/*
|
|
499
352
|
* Public API Surface of autocomplete
|
|
500
353
|
*/
|
|
501
354
|
const HlmAutocompleteImports = [
|
|
502
355
|
HlmAutocomplete,
|
|
356
|
+
HlmAutocompleteContent,
|
|
503
357
|
HlmAutocompleteEmpty,
|
|
504
358
|
HlmAutocompleteGroup,
|
|
359
|
+
HlmAutocompleteInput,
|
|
505
360
|
HlmAutocompleteItem,
|
|
361
|
+
HlmAutocompleteLabel,
|
|
506
362
|
HlmAutocompleteList,
|
|
363
|
+
HlmAutocompletePortal,
|
|
507
364
|
HlmAutocompleteSearch,
|
|
508
|
-
|
|
509
|
-
|
|
365
|
+
HlmAutocompleteSeparator,
|
|
366
|
+
HlmAutocompleteStatus,
|
|
510
367
|
];
|
|
511
368
|
class HlmAutocompleteModule {
|
|
512
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
513
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
369
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
370
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteModule, imports: [HlmAutocomplete,
|
|
371
|
+
HlmAutocompleteContent,
|
|
514
372
|
HlmAutocompleteEmpty,
|
|
515
373
|
HlmAutocompleteGroup,
|
|
374
|
+
HlmAutocompleteInput,
|
|
516
375
|
HlmAutocompleteItem,
|
|
376
|
+
HlmAutocompleteLabel,
|
|
517
377
|
HlmAutocompleteList,
|
|
378
|
+
HlmAutocompletePortal,
|
|
518
379
|
HlmAutocompleteSearch,
|
|
519
|
-
|
|
520
|
-
|
|
380
|
+
HlmAutocompleteSeparator,
|
|
381
|
+
HlmAutocompleteStatus], exports: [HlmAutocomplete,
|
|
382
|
+
HlmAutocompleteContent,
|
|
521
383
|
HlmAutocompleteEmpty,
|
|
522
384
|
HlmAutocompleteGroup,
|
|
385
|
+
HlmAutocompleteInput,
|
|
523
386
|
HlmAutocompleteItem,
|
|
387
|
+
HlmAutocompleteLabel,
|
|
524
388
|
HlmAutocompleteList,
|
|
389
|
+
HlmAutocompletePortal,
|
|
525
390
|
HlmAutocompleteSearch,
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
391
|
+
HlmAutocompleteSeparator,
|
|
392
|
+
HlmAutocompleteStatus] });
|
|
393
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteModule, imports: [HlmAutocompleteInput,
|
|
394
|
+
HlmAutocompleteItem] });
|
|
529
395
|
}
|
|
530
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmAutocompleteModule, decorators: [{
|
|
531
397
|
type: NgModule,
|
|
532
398
|
args: [{
|
|
533
399
|
imports: [...HlmAutocompleteImports],
|
|
@@ -539,5 +405,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
539
405
|
* Generated bundle index. Do not edit.
|
|
540
406
|
*/
|
|
541
407
|
|
|
542
|
-
export {
|
|
408
|
+
export { HlmAutocomplete, HlmAutocompleteContent, HlmAutocompleteEmpty, HlmAutocompleteGroup, HlmAutocompleteImports, HlmAutocompleteInput, HlmAutocompleteItem, HlmAutocompleteLabel, HlmAutocompleteList, HlmAutocompleteModule, HlmAutocompletePortal, HlmAutocompleteSearch, HlmAutocompleteSeparator, HlmAutocompleteStatus };
|
|
543
409
|
//# sourceMappingURL=autocomplete.mjs.map
|