@ngstarter-ui/components 21.0.49 → 21.0.50
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/ai/component-registry.json +53 -12
- package/fesm2022/ngstarter-ui-components-country-select.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-currency-select.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-form-builder.mjs +196 -11
- package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-designer.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-option.mjs +2 -2
- package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-paginator.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-select.mjs +474 -27
- package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_tokens.scss +1 -1
- package/types/ngstarter-ui-components-form-builder.d.ts +42 -2
- package/types/ngstarter-ui-components-select.d.ts +112 -3
|
@@ -4429,6 +4429,7 @@
|
|
|
4429
4429
|
"FORM_BUILDER_LAYOUT_BASE_SETTINGS_SCHEMA",
|
|
4430
4430
|
"FORM_BUILDER_LAYOUT_CONTAINER_BASE_SETTINGS_SCHEMA",
|
|
4431
4431
|
"FORM_BUILDER_SECTION_BASE_SETTINGS_SCHEMA",
|
|
4432
|
+
"FORM_BUILDER_SELECT_DATA_SOURCES",
|
|
4432
4433
|
"FORM_BUILDER_SETTINGS",
|
|
4433
4434
|
"FORM_BUILDER_STATIC_BASE_SETTINGS_SCHEMA",
|
|
4434
4435
|
"FORM_BUILDER_UPLOAD_CALLBACK",
|
|
@@ -4450,6 +4451,9 @@
|
|
|
4450
4451
|
"FormBuilderSchema",
|
|
4451
4452
|
"FormBuilderSection",
|
|
4452
4453
|
"FormBuilderSectionSettingsContext",
|
|
4454
|
+
"FormBuilderSelectDataSourceDefinition",
|
|
4455
|
+
"FormBuilderSelectDataSourceOptions",
|
|
4456
|
+
"FormBuilderSelectOptionsSource",
|
|
4453
4457
|
"formBuilderSettings",
|
|
4454
4458
|
"FormBuilderSettingsConfig",
|
|
4455
4459
|
"FormBuilderSettingsContext",
|
|
@@ -4464,6 +4468,8 @@
|
|
|
4464
4468
|
"provideFormBuilder",
|
|
4465
4469
|
"provideFormBuilderField",
|
|
4466
4470
|
"provideFormBuilderFields",
|
|
4471
|
+
"provideFormBuilderSelectDataSource",
|
|
4472
|
+
"provideFormBuilderSelectDataSources",
|
|
4467
4473
|
"validatorsFromRules"
|
|
4468
4474
|
],
|
|
4469
4475
|
"inputs": [
|
|
@@ -6029,6 +6035,7 @@
|
|
|
6029
6035
|
"Menu With Icons",
|
|
6030
6036
|
"Menu Divider",
|
|
6031
6037
|
"Menu Heading",
|
|
6038
|
+
"Data Driven Menu",
|
|
6032
6039
|
"Menu Header & Footer",
|
|
6033
6040
|
"Nested Menu",
|
|
6034
6041
|
"Menu Positioning",
|
|
@@ -6051,10 +6058,10 @@
|
|
|
6051
6058
|
"source": "<div class=\"w-[300px] h-[300px] p-10 rounded-2xl text-center border border-muted flex items-center justify-center\"\n [ngsContextMenuTriggerFor]=\"contextMenu\">\n Right click here to trigger a context menu\n</div>\n<ngs-menu #contextMenu>\n <button ngs-menu-item>\n <ngs-icon name=\"fluent:cut-24-regular\"/>\n Cut\n </button>\n <button ngs-menu-item>\n <ngs-icon name=\"fluent:copy-24-regular\"/>\n Copy\n </button>\n <button ngs-menu-item>\n <ngs-icon name=\"fluent:clipboard-text-24-regular\"/>\n Paste\n </button>\n <button ngs-menu-item>\n <ngs-icon name=\"fluent:print-24-regular\"/>\n Print\n </button>\n</ngs-menu>"
|
|
6052
6059
|
},
|
|
6053
6060
|
{
|
|
6054
|
-
"name": "
|
|
6055
|
-
"title": "
|
|
6056
|
-
"file": "projects/docs/src/app/components/menu/_examples/
|
|
6057
|
-
"source": "<
|
|
6061
|
+
"name": "data-driven-menu-example",
|
|
6062
|
+
"title": "Data driven menu",
|
|
6063
|
+
"file": "projects/docs/src/app/components/menu/_examples/data-driven-menu-example/data-driven-menu-example.html",
|
|
6064
|
+
"source": "<div class=\"flex flex-col items-start gap-3\">\n <button ngsButton [ngsMenuTriggerFor]=\"projectMenu\">\n Project actions\n </button>\n <span class=\"text-sm text-neutral-600\">{{ selectedAction() }}</span>\n</div>\n<ngs-menu #projectMenu=\"ngsMenu\">\n @for (action of actions; track action.id) {\n <button ngs-menu-item [disabled]=\"action.disabled ?? false\" (click)=\"selectAction(action)\">\n <ngs-icon [name]=\"action.icon\"/>\n <span>{{ action.label }}</span>\n </button>\n }\n</ngs-menu>"
|
|
6058
6065
|
}
|
|
6059
6066
|
],
|
|
6060
6067
|
"previewAsset": "projects/components/menu/preview.svg",
|
|
@@ -8007,10 +8014,12 @@
|
|
|
8007
8014
|
"Multiple Selection",
|
|
8008
8015
|
"Customizing the trigger label",
|
|
8009
8016
|
"Select with search feature",
|
|
8017
|
+
"Async Data Source",
|
|
8010
8018
|
"Get set value",
|
|
8011
8019
|
"Resetting value",
|
|
8012
8020
|
"Custom trigger",
|
|
8013
|
-
"Select search"
|
|
8021
|
+
"Select search",
|
|
8022
|
+
"Async data source select"
|
|
8014
8023
|
],
|
|
8015
8024
|
"minimalExample": "<p>Basic ngs-select</p>\n<ngs-form-field class=\"w-1/2\">\n <ngs-label>Favorite food</ngs-label>\n <ngs-select>\n @for (food of foods; track food) {\n <ngs-option [value]=\"food.value\">{{food.viewValue}}</ngs-option>\n }\n </ngs-select>\n</ngs-form-field>",
|
|
8016
8025
|
"exampleFiles": [
|
|
@@ -8020,22 +8029,24 @@
|
|
|
8020
8029
|
"file": "projects/docs/src/app/forms/select/_examples/basic-select-example/basic-select-example.html",
|
|
8021
8030
|
"source": "<p>Basic ngs-select</p>\n<ngs-form-field class=\"w-1/2\">\n <ngs-label>Favorite food</ngs-label>\n <ngs-select>\n @for (food of foods; track food) {\n <ngs-option [value]=\"food.value\">{{food.viewValue}}</ngs-option>\n }\n </ngs-select>\n</ngs-form-field>"
|
|
8022
8031
|
},
|
|
8032
|
+
{
|
|
8033
|
+
"name": "async-data-source-select-example",
|
|
8034
|
+
"title": "Async data source select",
|
|
8035
|
+
"file": "projects/docs/src/app/forms/select/_examples/async-data-source-select-example/async-data-source-select-example.html",
|
|
8036
|
+
"source": "<ngs-form-field class=\"w-full max-w-md\">\n <ngs-label>Owner</ngs-label>\n <ngs-select\n [formControl]=\"owner\"\n [dataSource]=\"usersDataSource\"\n placeholder=\"Assign owner\"\n searchable\n clearable\n [pageSize]=\"20\"\n [searchDebounce]=\"150\">\n <ng-template ngsOptionContentDef let-user let-label=\"label\">\n <span class=\"flex min-w-0 flex-col\">\n <span class=\"truncate\">{{ user.name }}</span>\n <span class=\"truncate text-xs text-neutral-500\">{{ user.team }} - {{ label }}</span>\n </span>\n </ng-template>\n <ng-template ngsSelectValueDef let-user>\n {{ user.name }} - {{ user.team }}\n </ng-template>\n </ngs-select>\n</ngs-form-field>"
|
|
8037
|
+
},
|
|
8023
8038
|
{
|
|
8024
8039
|
"name": "clearable-select-example",
|
|
8025
8040
|
"title": "Clearable select",
|
|
8026
8041
|
"file": "projects/docs/src/app/forms/select/_examples/clearable-select-example/clearable-select-example.html",
|
|
8027
8042
|
"source": "<ngs-form-field class=\"w-1/2\">\n <ngs-label>Status</ngs-label>\n <ngs-select [formControl]=\"status()\" clearable>\n @for (statusOption of statuses(); track statusOption.value) {\n <ngs-option [value]=\"statusOption.value\">{{ statusOption.label }}</ngs-option>\n }\n </ngs-select>\n</ngs-form-field>"
|
|
8028
|
-
},
|
|
8029
|
-
{
|
|
8030
|
-
"name": "custom-trigger-example",
|
|
8031
|
-
"title": "Custom trigger",
|
|
8032
|
-
"file": "projects/docs/src/app/forms/select/_examples/custom-trigger-example/custom-trigger-example.html",
|
|
8033
|
-
"source": "<ngs-form-field class=\"w-1/2\">\n <ngs-label>Toppings</ngs-label>\n <ngs-select [formControl]=\"toppings\" multiple>\n <ngs-select-trigger>\n {{ toppings.value?.[0] || '' }}\n @if ((toppings.value?.length || 0) > 1) {\n <span class=\"opacity-75 text-sm\">\n (+{{ (toppings.value?.length || 0) - 1 }} {{ toppings.value?.length === 2 ? 'other' : 'others' }})\n </span>\n }\n </ngs-select-trigger>\n @for (topping of toppingList; track topping) {\n <ngs-option [value]=\"topping\">{{topping}}</ngs-option>\n }\n </ngs-select>\n</ngs-form-field>"
|
|
8034
8043
|
}
|
|
8035
8044
|
],
|
|
8036
8045
|
"previewAsset": "projects/components/select/preview.svg",
|
|
8037
8046
|
"selectors": [
|
|
8038
8047
|
"ng-template[ngsFilterTriggerValue]",
|
|
8048
|
+
"ng-template[ngsOptionContentDef]",
|
|
8049
|
+
"ng-template[ngsSelectValueDef]",
|
|
8039
8050
|
"ngs-filter-trigger",
|
|
8040
8051
|
"ngs-select",
|
|
8041
8052
|
"ngs-select-body",
|
|
@@ -8051,21 +8062,35 @@
|
|
|
8051
8062
|
"SELECT",
|
|
8052
8063
|
"SelectBody",
|
|
8053
8064
|
"SelectChange",
|
|
8065
|
+
"SelectDataSource",
|
|
8066
|
+
"SelectDataSourceOption",
|
|
8067
|
+
"SelectDataSourceRequest",
|
|
8068
|
+
"SelectDataSourceResult",
|
|
8054
8069
|
"SelectFooter",
|
|
8055
8070
|
"SelectHeader",
|
|
8056
|
-
"
|
|
8071
|
+
"SelectOptionContentContext",
|
|
8072
|
+
"SelectOptionContentDef",
|
|
8073
|
+
"SelectTrigger",
|
|
8074
|
+
"SelectValueContext",
|
|
8075
|
+
"SelectValueDef"
|
|
8057
8076
|
],
|
|
8058
8077
|
"inputs": [
|
|
8059
8078
|
"aria-describedby",
|
|
8060
8079
|
"aria-label",
|
|
8061
8080
|
"clearable",
|
|
8081
|
+
"dataSource",
|
|
8062
8082
|
"disabled",
|
|
8063
8083
|
"hideCheckIcon",
|
|
8064
8084
|
"id",
|
|
8085
|
+
"loadOnOpen",
|
|
8065
8086
|
"maxCount",
|
|
8087
|
+
"minSearchLength",
|
|
8066
8088
|
"multiple",
|
|
8089
|
+
"pageSize",
|
|
8067
8090
|
"placeholder",
|
|
8068
8091
|
"required",
|
|
8092
|
+
"searchable",
|
|
8093
|
+
"searchDebounce",
|
|
8069
8094
|
"showZero",
|
|
8070
8095
|
"tabIndex",
|
|
8071
8096
|
"value"
|
|
@@ -8081,7 +8106,10 @@
|
|
|
8081
8106
|
"--ngs-color-on-surface",
|
|
8082
8107
|
"--ngs-color-on-surface-variant",
|
|
8083
8108
|
"--ngs-color-outline",
|
|
8109
|
+
"--ngs-color-outline-variant",
|
|
8084
8110
|
"--ngs-color-primary",
|
|
8111
|
+
"--ngs-color-surface-container-high",
|
|
8112
|
+
"--ngs-color-surface-container-lowest",
|
|
8085
8113
|
"--ngs-dropdown-bg",
|
|
8086
8114
|
"--ngs-dropdown-border",
|
|
8087
8115
|
"--ngs-dropdown-item-gap",
|
|
@@ -8106,6 +8134,7 @@
|
|
|
8106
8134
|
"--ngs-filter-trigger-gap",
|
|
8107
8135
|
"--ngs-filter-trigger-value-color",
|
|
8108
8136
|
"--ngs-filter-trigger-value-font-weight",
|
|
8137
|
+
"--ngs-font-size-sm",
|
|
8109
8138
|
"--ngs-select-arrow-color",
|
|
8110
8139
|
"--ngs-select-arrow-container-width",
|
|
8111
8140
|
"--ngs-select-arrow-size",
|
|
@@ -8123,6 +8152,18 @@
|
|
|
8123
8152
|
"--ngs-select-panel-max-height",
|
|
8124
8153
|
"--ngs-select-panel-shadow",
|
|
8125
8154
|
"--ngs-select-placeholder-color",
|
|
8155
|
+
"--ngs-select-search-bg",
|
|
8156
|
+
"--ngs-select-search-border",
|
|
8157
|
+
"--ngs-select-search-color",
|
|
8158
|
+
"--ngs-select-search-focus-border-color",
|
|
8159
|
+
"--ngs-select-search-font-size",
|
|
8160
|
+
"--ngs-select-search-height",
|
|
8161
|
+
"--ngs-select-search-padding-inline",
|
|
8162
|
+
"--ngs-select-state-action-color",
|
|
8163
|
+
"--ngs-select-state-color",
|
|
8164
|
+
"--ngs-select-state-font-size",
|
|
8165
|
+
"--ngs-select-state-min-height",
|
|
8166
|
+
"--ngs-select-state-padding",
|
|
8126
8167
|
"--ngs-select-trigger-gap"
|
|
8127
8168
|
],
|
|
8128
8169
|
"example": "<ngs-select [value]=\"value\">...</ngs-select>"
|
|
@@ -557,7 +557,7 @@ class CountrySelect {
|
|
|
557
557
|
provide: FormFieldControl,
|
|
558
558
|
useExisting: forwardRef(() => CountrySelect),
|
|
559
559
|
},
|
|
560
|
-
], viewQueries: [{ propertyName: "ngsSelect", first: true, predicate: ["ngsSelect"], descendants: true, isSignal: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], exportAs: ["ngsCountrySelect"], ngImport: i0, template: "<ngs-select\n #ngsSelect\n [value]=\"value\"\n (selectionChange)=\"onSelectionChange($event)\"\n (opened)=\"onSelectOpened()\"\n (closed)=\"onSelectClosed()\"\n [id]=\"id + '-select'\"\n [placeholder]=\"placeholder\"\n [required]=\"isRequiredSignal()\"\n [disabled]=\"isDisabledSignal()\"\n [multiple]=\"multiple()\"\n [hideCheckIcon]=\"hideCheckIcon()\"\n [clearable]=\"clearable()\"\n [aria-label]=\"ariaLabel()\"\n [tabIndex]=\"tabIndex()\"\n [aria-describedby]=\"ariaDescribedby()\">\n <ngs-select-trigger class=\"select-trigger\">\n @let selectedCountries = selectedCountryDisplays();\n @if (selectedCountries.length === 1) {\n @let selectedCountry = selectedCountries[0];\n <span class=\"ngs-select-trigger-content\">\n <span class=\"flag-icon\" aria-hidden=\"true\">{{ selectedCountry.flag }}</span>\n <span class=\"ngs-select-trigger-text\">\n {{ selectedCountry.name }}\n @if (showCountryCode()) {\n <span class=\"code\">({{ selectedCountry.code }})</span>\n }\n </span>\n </span>\n } @else if (selectedCountries.length > 1) {\n <span class=\"ngs-select-trigger-content\">\n <span class=\"ngs-select-trigger-text\">\n {{ selectedCountriesText() }}\n </span>\n </span>\n }\n\n </ngs-select-trigger>\n\n <ngs-select-header>\n <div class=\"sticky top-0 z-1 bg-surface-container-lowest\">\n <input #searchInput\n type=\"text\"\n placeholder=\"Search...\"\n autocomplete=\"off\"\n [ngModel]=\"searchTerm()\"\n (ngModelChange)=\"onCountrySearch($event)\"\n class=\"w-full text-sm focus:outline-none border-b border-surface-container-high focus:border-b-primary h-14 px-3\">\n @if (searchTerm().trim()) {\n <div class=\"absolute end-1 top-1/2 -translate-y-1/2\">\n <button\n ngsIconButton\n (click)=\"clearSearch($event)\"\n class=\"clear-button\"\n type=\"button\"\n aria-label=\"Clear search\">\n <ngs-icon name=\"fluent:dismiss-24-regular\"/>\n </button>\n </div>\n }\n </div>\n </ngs-select-header>\n\n @for (country of visibleCountries(); track country.code) {\n <ngs-option [value]=\"country.code\">\n <div class=\"flex items-center gap-2\">\n <span class=\"select-option-icon text-2xl\" aria-hidden=\"true\">{{ country.flag }}</span>\n <span class=\"select-option-text\">\n {{ country.name }}\n @if (showCountryCode()) {\n <span class=\"code\">({{ country.code }})</span>\n }\n </span>\n </div>\n </ngs-option>\n } @empty {\n @if (searchTerm()) {\n <div class=\"text-sm px-4 py-3\">\n <span i18n>Country not found</span>.\n </div>\n }\n }\n\n @if (visibleCountryCount() < filteredCountries().length) {\n <div class=\"select-loading\">\n Loading more countries...\n </div>\n }\n</ngs-select>\n", styles: [":host{display:block}:host .flag-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;font-size:22px;line-height:1}:host .select-option-content{display:flex;align-items:center;gap:var(--ngs-dropdown-item-gap);min-width:0;width:100%;height:100%;overflow:hidden;white-space:nowrap}:host .select-option-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .code{text-transform:uppercase;color:var(--ngs-color-neutral-500)}:host .select-loading{padding:calc(var(--spacing, .25rem) * 2) calc(var(--spacing, .25rem) * 4);color:var(--ngs-color-on-surface-variant);font-size:var(--ngs-font-size-sm)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Option, selector: "ngs-option", inputs: ["value", "data", "disabled", "selected"], outputs: ["onSelectionChange"], exportAs: ["ngsOption"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "component", type: Select, selector: "ngs-select", inputs: ["id", "placeholder", "disabled", "required", "multiple", "hideCheckIcon", "clearable", "aria-label", "tabIndex", "aria-describedby", "value"], outputs: ["selectionChange", "opened", "closed", "valueChange"], exportAs: ["ngsSelect"] }, { kind: "directive", type: SelectTrigger, selector: "ngs-select-trigger" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: SelectHeader, selector: "ngs-select-header" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
560
|
+
], viewQueries: [{ propertyName: "ngsSelect", first: true, predicate: ["ngsSelect"], descendants: true, isSignal: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], exportAs: ["ngsCountrySelect"], ngImport: i0, template: "<ngs-select\n #ngsSelect\n [value]=\"value\"\n (selectionChange)=\"onSelectionChange($event)\"\n (opened)=\"onSelectOpened()\"\n (closed)=\"onSelectClosed()\"\n [id]=\"id + '-select'\"\n [placeholder]=\"placeholder\"\n [required]=\"isRequiredSignal()\"\n [disabled]=\"isDisabledSignal()\"\n [multiple]=\"multiple()\"\n [hideCheckIcon]=\"hideCheckIcon()\"\n [clearable]=\"clearable()\"\n [aria-label]=\"ariaLabel()\"\n [tabIndex]=\"tabIndex()\"\n [aria-describedby]=\"ariaDescribedby()\">\n <ngs-select-trigger class=\"select-trigger\">\n @let selectedCountries = selectedCountryDisplays();\n @if (selectedCountries.length === 1) {\n @let selectedCountry = selectedCountries[0];\n <span class=\"ngs-select-trigger-content\">\n <span class=\"flag-icon\" aria-hidden=\"true\">{{ selectedCountry.flag }}</span>\n <span class=\"ngs-select-trigger-text\">\n {{ selectedCountry.name }}\n @if (showCountryCode()) {\n <span class=\"code\">({{ selectedCountry.code }})</span>\n }\n </span>\n </span>\n } @else if (selectedCountries.length > 1) {\n <span class=\"ngs-select-trigger-content\">\n <span class=\"ngs-select-trigger-text\">\n {{ selectedCountriesText() }}\n </span>\n </span>\n }\n\n </ngs-select-trigger>\n\n <ngs-select-header>\n <div class=\"sticky top-0 z-1 bg-surface-container-lowest\">\n <input #searchInput\n type=\"text\"\n placeholder=\"Search...\"\n autocomplete=\"off\"\n [ngModel]=\"searchTerm()\"\n (ngModelChange)=\"onCountrySearch($event)\"\n class=\"w-full text-sm focus:outline-none border-b border-surface-container-high focus:border-b-primary h-14 px-3\">\n @if (searchTerm().trim()) {\n <div class=\"absolute end-1 top-1/2 -translate-y-1/2\">\n <button\n ngsIconButton\n (click)=\"clearSearch($event)\"\n class=\"clear-button\"\n type=\"button\"\n aria-label=\"Clear search\">\n <ngs-icon name=\"fluent:dismiss-24-regular\"/>\n </button>\n </div>\n }\n </div>\n </ngs-select-header>\n\n @for (country of visibleCountries(); track country.code) {\n <ngs-option [value]=\"country.code\">\n <div class=\"flex items-center gap-2\">\n <span class=\"select-option-icon text-2xl\" aria-hidden=\"true\">{{ country.flag }}</span>\n <span class=\"select-option-text\">\n {{ country.name }}\n @if (showCountryCode()) {\n <span class=\"code\">({{ country.code }})</span>\n }\n </span>\n </div>\n </ngs-option>\n } @empty {\n @if (searchTerm()) {\n <div class=\"text-sm px-4 py-3\">\n <span i18n>Country not found</span>.\n </div>\n }\n }\n\n @if (visibleCountryCount() < filteredCountries().length) {\n <div class=\"select-loading\">\n Loading more countries...\n </div>\n }\n</ngs-select>\n", styles: [":host{display:block}:host .flag-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;font-size:22px;line-height:1}:host .select-option-content{display:flex;align-items:center;gap:var(--ngs-dropdown-item-gap);min-width:0;width:100%;height:100%;overflow:hidden;white-space:nowrap}:host .select-option-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .code{text-transform:uppercase;color:var(--ngs-color-neutral-500)}:host .select-loading{padding:calc(var(--spacing, .25rem) * 2) calc(var(--spacing, .25rem) * 4);color:var(--ngs-color-on-surface-variant);font-size:var(--ngs-font-size-sm)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Option, selector: "ngs-option", inputs: ["value", "data", "disabled", "selected"], outputs: ["onSelectionChange"], exportAs: ["ngsOption"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "component", type: Select, selector: "ngs-select", inputs: ["id", "placeholder", "disabled", "required", "multiple", "hideCheckIcon", "clearable", "dataSource", "pageSize", "searchable", "searchDebounce", "minSearchLength", "loadOnOpen", "aria-label", "tabIndex", "aria-describedby", "value"], outputs: ["selectionChange", "opened", "closed", "valueChange"], exportAs: ["ngsSelect"] }, { kind: "directive", type: SelectTrigger, selector: "ngs-select-trigger" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: SelectHeader, selector: "ngs-select-header" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
561
561
|
}
|
|
562
562
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CountrySelect, decorators: [{
|
|
563
563
|
type: Component,
|