ng-zenduit 2.2.3 → 2.2.4

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.
@@ -3119,224 +3119,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
3119
3119
  args: ['window:keydown', ['$event']]
3120
3120
  }] } });
3121
3121
 
3122
- class ZenduPaginationBarComponent {
3123
- constructor() {
3124
- this.page = 1;
3125
- this.perPage = 10;
3126
- this.count = 0;
3127
- this.pageChange = new EventEmitter();
3128
- this.totalPages = 1;
3129
- this.pages = [];
3130
- }
3131
- ngOnChanges(changes) {
3132
- if (changes['count'] || changes['perPage'] || changes['page']) {
3133
- this.recalculate();
3134
- }
3135
- }
3136
- goToPage(target) {
3137
- const clamped = Math.min(Math.max(1, target), this.totalPages);
3138
- if (clamped === this.page) {
3139
- return;
3140
- }
3141
- this.page = clamped;
3142
- this.recalculate();
3143
- this.pageChange.emit(this.page);
3144
- }
3145
- recalculate() {
3146
- this.totalPages = Math.max(1, Math.ceil((this.count || 0) / (this.perPage || 1)));
3147
- this.pages = this.buildPages(this.page, this.totalPages);
3148
- }
3149
- buildPages(current, total) {
3150
- const result = [];
3151
- const push = (p) => result.push({ kind: 'page', page: p, active: p === current });
3152
- if (total <= 7) {
3153
- for (let i = 1; i <= total; i++) {
3154
- push(i);
3155
- }
3156
- return result;
3157
- }
3158
- const window = new Set([1, total, current - 1, current, current + 1]);
3159
- if (current <= 3) {
3160
- window.add(2).add(3);
3161
- }
3162
- if (current >= total - 2) {
3163
- window.add(total - 1).add(total - 2);
3164
- }
3165
- const sorted = Array.from(window)
3166
- .filter((p) => p >= 1 && p <= total)
3167
- .sort((a, b) => a - b);
3168
- let prev = 0;
3169
- for (const p of sorted) {
3170
- if (p - prev > 1) {
3171
- result.push({ kind: 'ellipsis' });
3172
- }
3173
- push(p);
3174
- prev = p;
3175
- }
3176
- return result;
3177
- }
3178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ZenduPaginationBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3179
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: ZenduPaginationBarComponent, isStandalone: false, selector: "zen-pagination-bar", inputs: { page: "page", perPage: "perPage", count: "count" }, outputs: { pageChange: "pageChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"pagination-component\">\n <button type=\"button\"\n class=\"nav-btn\"\n [disabled]=\"page <= 1\"\n (click)=\"goToPage(page - 1)\">\n <zen-icon class=\"nav-icon\" src=\"assets/ng-zenduit/icons/arrow-left.svg\"></zen-icon>\n <span>{{ \"Previous\" | translate }}</span>\n </button>\n\n <div class=\"pages\">\n @for (item of pages; track item; let i = $index) {\n @if (item.kind === 'page') {\n <button\n type=\"button\"\n class=\"page-btn\"\n [class.is-active]=\"item.active\"\n (click)=\"goToPage(item.page)\">\n {{ item.page }}\n </button>\n }\n @if (item.kind === 'ellipsis') {\n <span class=\"page-ellipsis\">\u2026</span>\n }\n }\n </div>\n\n <button type=\"button\"\n class=\"nav-btn\"\n [disabled]=\"page >= totalPages\"\n (click)=\"goToPage(page + 1)\">\n <span>{{ \"Next\" | translate }}</span>\n <zen-icon class=\"nav-icon\" src=\"assets/ng-zenduit/icons/arrow-right.svg\"></zen-icon>\n </button>\n</div>\n", styles: [".pagination-component{display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-top:1px solid #EAECF0;padding:11px 24px 16px;font-family:Inter,sans-serif}.pagination-component .nav-btn{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;background:#fff;border:1px solid #D0D5DD;border-radius:8px;box-shadow:0 1px 2px #1018280d;font-weight:500;font-size:14px;line-height:20px;color:#344054;cursor:pointer;transition:background-color .1s}.pagination-component .nav-btn:hover:not(:disabled){background:#f9fafb}.pagination-component .nav-btn:disabled{opacity:.5;cursor:not-allowed}.pagination-component .nav-btn .nav-icon{width:20px;height:20px;background-color:#344054}.pagination-component .pages{display:flex;flex-direction:row;align-items:center;gap:2px}.pagination-component .page-btn,.pagination-component .page-ellipsis{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:8px;font-weight:500;font-size:14px;line-height:20px;color:#667085;background:transparent;border:0;padding:0;box-sizing:border-box}.pagination-component .page-btn{cursor:pointer;transition:background-color .1s,color .1s}.pagination-component .page-btn:hover:not(.is-active){background:#f9fafb}.pagination-component .page-btn.is-active{background:#f1f7fe;color:#136ab6;cursor:default}.pagination-component .page-ellipsis{cursor:default}\n"], dependencies: [{ kind: "component", type: ZenduIconComponent, selector: "zen-icon", inputs: ["src", "name", "size", "color", "theme", "customColor"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
3180
- }
3181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ZenduPaginationBarComponent, decorators: [{
3182
- type: Component,
3183
- args: [{ selector: 'zen-pagination-bar', changeDetection: ChangeDetectionStrategy.Eager, standalone: false, template: "<div class=\"pagination-component\">\n <button type=\"button\"\n class=\"nav-btn\"\n [disabled]=\"page <= 1\"\n (click)=\"goToPage(page - 1)\">\n <zen-icon class=\"nav-icon\" src=\"assets/ng-zenduit/icons/arrow-left.svg\"></zen-icon>\n <span>{{ \"Previous\" | translate }}</span>\n </button>\n\n <div class=\"pages\">\n @for (item of pages; track item; let i = $index) {\n @if (item.kind === 'page') {\n <button\n type=\"button\"\n class=\"page-btn\"\n [class.is-active]=\"item.active\"\n (click)=\"goToPage(item.page)\">\n {{ item.page }}\n </button>\n }\n @if (item.kind === 'ellipsis') {\n <span class=\"page-ellipsis\">\u2026</span>\n }\n }\n </div>\n\n <button type=\"button\"\n class=\"nav-btn\"\n [disabled]=\"page >= totalPages\"\n (click)=\"goToPage(page + 1)\">\n <span>{{ \"Next\" | translate }}</span>\n <zen-icon class=\"nav-icon\" src=\"assets/ng-zenduit/icons/arrow-right.svg\"></zen-icon>\n </button>\n</div>\n", styles: [".pagination-component{display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-top:1px solid #EAECF0;padding:11px 24px 16px;font-family:Inter,sans-serif}.pagination-component .nav-btn{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;background:#fff;border:1px solid #D0D5DD;border-radius:8px;box-shadow:0 1px 2px #1018280d;font-weight:500;font-size:14px;line-height:20px;color:#344054;cursor:pointer;transition:background-color .1s}.pagination-component .nav-btn:hover:not(:disabled){background:#f9fafb}.pagination-component .nav-btn:disabled{opacity:.5;cursor:not-allowed}.pagination-component .nav-btn .nav-icon{width:20px;height:20px;background-color:#344054}.pagination-component .pages{display:flex;flex-direction:row;align-items:center;gap:2px}.pagination-component .page-btn,.pagination-component .page-ellipsis{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:8px;font-weight:500;font-size:14px;line-height:20px;color:#667085;background:transparent;border:0;padding:0;box-sizing:border-box}.pagination-component .page-btn{cursor:pointer;transition:background-color .1s,color .1s}.pagination-component .page-btn:hover:not(.is-active){background:#f9fafb}.pagination-component .page-btn.is-active{background:#f1f7fe;color:#136ab6;cursor:default}.pagination-component .page-ellipsis{cursor:default}\n"] }]
3184
- }], propDecorators: { page: [{
3185
- type: Input
3186
- }], perPage: [{
3187
- type: Input
3188
- }], count: [{
3189
- type: Input
3190
- }], pageChange: [{
3191
- type: Output
3192
- }] } });
3193
-
3194
- class ZenduPhoneInputComponent {
3195
- constructor() {
3196
- this.maxLength = 12;
3197
- this.phoneChange = new EventEmitter();
3198
- this.validChange = new EventEmitter();
3199
- this.disabled = false;
3200
- this.phoneText = "";
3201
- this.countryList = [
3202
- {
3203
- countryCode: "US",
3204
- countryName: "America",
3205
- countryCallingCode: "+1",
3206
- flag: "https://storage.googleapis.com/zenduit-icons/Flags/USA.svg"
3207
- },
3208
- {
3209
- countryCode: "CA",
3210
- countryName: "Canada",
3211
- countryCallingCode: "+1",
3212
- flag: "https://storage.googleapis.com/zenduit-icons/Flags/Canada.svg"
3213
- },
3214
- {
3215
- countryCode: "MX",
3216
- countryName: "Mexico",
3217
- countryCallingCode: "+52",
3218
- flag: "https://storage.googleapis.com/zenduit-icons/Flags/Mexico.svg"
3219
- }
3220
- ];
3221
- this.customCountry = {
3222
- countryCode: "",
3223
- countryName: "Custom",
3224
- countryCallingCode: "",
3225
- flag: "https://storage.googleapis.com/zenduit-icons/Flags/Custom.svg"
3226
- };
3227
- this.isExpanded = false;
3228
- this.selectedCountry = this.countryList[1];
3229
- }
3230
- ngOnInit() {
3231
- this.parseNumber();
3232
- }
3233
- ngOnChanges(changes) {
3234
- if (changes["phone"] && (!this.selectedCountry || !this.selectedCountry.countryCode)) {
3235
- this.parseNumber();
3236
- }
3237
- }
3238
- parseNumber() {
3239
- try {
3240
- this.phoneText = this.phone || '';
3241
- if (this.phone) {
3242
- const countryFromList = this.countryList.find(country => this.phone.startsWith(country.countryCallingCode) || `+${this.phone}`.startsWith(country.countryCallingCode));
3243
- if (countryFromList) {
3244
- this.selectedCountry = countryFromList || this.customCountry;
3245
- const phoneNumberUtil = PhoneNumberUtil.getInstance();
3246
- const parsedPhone = phoneNumberUtil.parse(this.phone || "", 'US');
3247
- setTimeout(() => {
3248
- if (this.phoneText.startsWith('+')) {
3249
- this.phoneText = this.phoneText.replace(`+${parsedPhone.getCountryCode()}`, "");
3250
- }
3251
- else if (this.phoneText.startsWith(parsedPhone.getCountryCode())) {
3252
- this.phoneText = this.phoneText.replace(parsedPhone.getCountryCode(), "");
3253
- }
3254
- this.phoneChanged();
3255
- });
3256
- }
3257
- else {
3258
- this.selectedCountry = this.customCountry;
3259
- }
3260
- }
3261
- else {
3262
- this.selectedCountry = this.customCountry;
3263
- }
3264
- }
3265
- catch (err) {
3266
- console.warn(`Can't parse phone: ${this.phone}`, err);
3267
- this.selectedCountry = this.customCountry;
3268
- }
3269
- }
3270
- countryChanged(country) {
3271
- this.isExpanded = false;
3272
- this.selectedCountry = country;
3273
- this.phoneChanged();
3274
- }
3275
- phoneChanged(input) {
3276
- // allow + in custom country
3277
- let custom = false;
3278
- if (this.selectedCountry === this.customCountry && this.phoneText.includes('+')) {
3279
- custom = true;
3280
- }
3281
- const phoneText = (this.phoneText || '').replace(/\D/g, '');
3282
- this.phoneText = custom ? `+${phoneText}` : phoneText;
3283
- if (input && input.value !== this.phoneText) {
3284
- input.value = this.phoneText;
3285
- }
3286
- const fullNumber = `${this.selectedCountry.countryCallingCode}${this.phoneText}`;
3287
- if (this.phone !== fullNumber) {
3288
- this.phoneChange.emit(fullNumber);
3289
- }
3290
- const phoneNumberUtil = PhoneNumberUtil.getInstance();
3291
- if (this.selectedCountry === this.customCountry) {
3292
- this.validChange.emit(true);
3293
- }
3294
- else {
3295
- try {
3296
- this.validChange.emit(phoneNumberUtil.isValidNumber(phoneNumberUtil.parseAndKeepRawInput(fullNumber)));
3297
- }
3298
- catch {
3299
- this.validChange.emit(false);
3300
- }
3301
- }
3302
- }
3303
- hideDropDown() {
3304
- this.isExpanded = false;
3305
- }
3306
- toggle() {
3307
- if (this.disabled) {
3308
- return;
3309
- }
3310
- this.isExpanded = !this.isExpanded;
3311
- }
3312
- focusInput() {
3313
- if (this.inputElement) {
3314
- this.inputElement.nativeElement.focus();
3315
- }
3316
- }
3317
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ZenduPhoneInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3318
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: ZenduPhoneInputComponent, isStandalone: false, selector: "zen-phone-input", inputs: { phone: "phone", maxLength: "maxLength", disabled: "disabled", width: "width" }, outputs: { phoneChange: "phoneChange", validChange: "validChange" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"zen-input-container\" [style.width]=\"width\">\n <!-- Input wrapper -->\n <div class=\"zen-input-field-wrapper\" (click)=\"focusInput()\">\n\n <!-- Leading dropdown: Country selector -->\n <div class=\"zen-input-leading-dropdown\">\n <button type=\"button\"\n class=\"zen-dropdown-trigger\"\n [disabled]=\"disabled\"\n (click)=\"toggle(); $event.stopPropagation()\">\n <img class=\"zen-phone-country-flag\"\n [src]=\"selectedCountry.flag\"\n [alt]=\"selectedCountry.countryName\">\n <span class=\"dropdown-label\">{{ selectedCountry.countryCallingCode }}</span>\n <i class=\"material-icons dropdown-icon\"\n [ngClass]=\"{'active': isExpanded}\">expand_more</i>\n </button>\n </div>\n\n <!-- Phone input field -->\n <input #input\n class=\"zen-input-field text text-md text-weight-regular\"\n type=\"text\"\n [(ngModel)]=\"phoneText\"\n (ngModelChange)=\"phoneChanged(input)\"\n (click)=\"isExpanded = false\"\n [disabled]=\"disabled\"\n country-code=\"selectedCountry.countryCode\"\n [maxlength]=\"maxLength\">\n </div>\n\n <!-- Country dropdown menu -->\n @if (isExpanded) {\n <div class=\"zen-dropdown-menu\"\n [ngClass]=\"{'open': isExpanded}\">\n <!-- Countries List -->\n @for (country of countryList; track country) {\n <button type=\"button\"\n class=\"zen-dropdown-option\"\n [ngClass]=\"{'selected': selectedCountry.countryName === country.countryName}\"\n (click)=\"countryChanged(country)\">\n <img class=\"zen-phone-country-flag\"\n [src]=\"country.flag\"\n [alt]=\"country.countryName\">\n <span class=\"zen-phone-country-name\">{{ country.countryName }}</span>\n <span class=\"zen-phone-country-code\">{{ country.countryCallingCode }}</span>\n </button>\n }\n <!-- Custom Country -->\n <button type=\"button\"\n class=\"zen-dropdown-option\"\n [ngClass]=\"{'selected': selectedCountry.countryName === customCountry.countryName}\"\n (click)=\"countryChanged(customCountry)\">\n <img class=\"zen-phone-country-flag\"\n [src]=\"customCountry.flag\"\n [alt]=\"customCountry.countryName\">\n <span class=\"zen-phone-country-name\">{{ customCountry.countryName }}</span>\n <span class=\"zen-phone-country-code\">{{ customCountry.countryCallingCode }}</span>\n </button>\n </div>\n }\n</div>\n\n<!-- Click outside handler for dropdown -->\n@if (isExpanded) {\n <div\n class=\"zen-dropdown-backdrop\"\n (click)=\"hideDropDown()\"></div>\n}\n", styles: [".text{margin:0;padding:0;color:#101828}.text-display-2xl{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:72px;line-height:90px;letter-spacing:-.02em}.text-display-xl{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:60px;line-height:72px;letter-spacing:-.02em}.text-display-lg{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:48px;line-height:60px;letter-spacing:-.02em}.text-display-md{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:36px;line-height:44px;letter-spacing:-.02em}.text-display-sm{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:30px;line-height:38px;letter-spacing:0}.text-display-xs{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:24px;line-height:32px;letter-spacing:0}.text-xl{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:20px;line-height:30px;letter-spacing:0}.text-lg{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:18px;line-height:28px;letter-spacing:0}.text-md{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:16px;line-height:24px;letter-spacing:0}.text-sm{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:14px;line-height:20px;letter-spacing:0}.text-xs{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:12px;line-height:18px;letter-spacing:0}.text-weight-regular{font-weight:400;font-style:normal}.text-weight-medium{font-weight:500;font-style:normal}.text-weight-semibold{font-weight:600;font-style:normal}.text-weight-bold{font-weight:700;font-style:normal}@media(max-width:768px){.text-display-2xl{font-size:48px;line-height:56px}.text-display-xl{font-size:40px;line-height:48px}.text-display-lg{font-size:32px;line-height:40px}}:host{display:block;width:100%}.zen-input-container{display:flex;flex-direction:column;gap:6px;width:100%;position:relative}.zen-input-container .zen-input-field-wrapper{display:flex;align-items:center;background:#fff;border:1px solid #D0D5DD;border-radius:8px;padding:10px 14px;gap:8px;min-height:44px;box-sizing:border-box;transition:all .2s ease;cursor:text;position:relative;box-shadow:0 1px 2px #1018280d}.zen-input-container .zen-input-field-wrapper:hover{border-color:#98a2b3}.zen-input-container .zen-input-field-wrapper:focus-within{border-color:#88c1f1;box-shadow:0 1px 2px #1018280d,0 0 0 4px #e3eefb}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown{display:flex;align-items:center;gap:6px;flex-shrink:0;padding-right:8px;border-right:1px solid #D0D5DD;margin-right:8px;position:relative}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger{display:flex;align-items:center;gap:4px;background:transparent;border:none;padding:0;cursor:pointer;font-family:Inter,sans-serif;font-size:16px;color:#344054}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger:disabled{cursor:not-allowed;color:#d0d5dd}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .zen-phone-country-flag{width:20px;height:15px;object-fit:cover;border-radius:2px}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .dropdown-label{font-weight:500;font-size:14px;min-width:max-content}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .dropdown-icon{font-size:16px;color:#98a2b3;transition:transform .2s ease,color .2s ease}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .dropdown-icon.active{transform:rotate(180deg)}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger:hover:not(:disabled) .dropdown-icon{color:#475467}.zen-input-container .zen-input-field-wrapper .zen-input-field{flex:1;border:none;outline:none;background:transparent;color:#101828;padding:0;min-width:0}.zen-input-container .zen-input-field-wrapper .zen-input-field::placeholder{color:#667085}.zen-input-container .zen-input-field-wrapper .zen-input-field:disabled{cursor:not-allowed;color:#d0d5dd}.zen-input-container .zen-input-field-wrapper .zen-input-field:disabled::placeholder{color:#d0d5dd}.zen-input-container .zen-dropdown-menu{position:absolute;top:calc(100% + 4px);left:0;background:#fff;border:1px solid #EAECF0;border-radius:8px;box-shadow:0 12px 16px -4px #10182814,0 4px 6px -2px #10182808;min-width:280px;max-height:240px;overflow-y:auto;z-index:100;padding:4px;width:100%;box-sizing:border-box}.zen-input-container .zen-dropdown-menu .zen-dropdown-option{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;background:transparent;border:none;border-radius:6px;font-family:Inter,sans-serif;font-size:14px;line-height:20px;color:#344054;text-align:left;cursor:pointer;transition:background-color .2s ease}.zen-input-container .zen-dropdown-menu .zen-dropdown-option .zen-phone-country-flag{width:20px;height:15px;object-fit:cover;border-radius:2px;flex-shrink:0}.zen-input-container .zen-dropdown-menu .zen-dropdown-option .zen-phone-country-name{flex:1;min-width:0}.zen-input-container .zen-dropdown-menu .zen-dropdown-option .zen-phone-country-code{color:#667085;font-size:13px;flex-shrink:0}.zen-input-container .zen-dropdown-menu .zen-dropdown-option:hover{background:#f9fafb}.zen-input-container .zen-dropdown-menu .zen-dropdown-option.selected{background:#f1f7fe;color:#105494}.zen-input-container .zen-dropdown-menu .zen-dropdown-option.selected .zen-phone-country-code{color:#136ab6}.zen-dropdown-backdrop{position:fixed;inset:0;z-index:99;background:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
3319
- }
3320
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ZenduPhoneInputComponent, decorators: [{
3321
- type: Component,
3322
- args: [{ selector: 'zen-phone-input', changeDetection: ChangeDetectionStrategy.Eager, standalone: false, template: "<div class=\"zen-input-container\" [style.width]=\"width\">\n <!-- Input wrapper -->\n <div class=\"zen-input-field-wrapper\" (click)=\"focusInput()\">\n\n <!-- Leading dropdown: Country selector -->\n <div class=\"zen-input-leading-dropdown\">\n <button type=\"button\"\n class=\"zen-dropdown-trigger\"\n [disabled]=\"disabled\"\n (click)=\"toggle(); $event.stopPropagation()\">\n <img class=\"zen-phone-country-flag\"\n [src]=\"selectedCountry.flag\"\n [alt]=\"selectedCountry.countryName\">\n <span class=\"dropdown-label\">{{ selectedCountry.countryCallingCode }}</span>\n <i class=\"material-icons dropdown-icon\"\n [ngClass]=\"{'active': isExpanded}\">expand_more</i>\n </button>\n </div>\n\n <!-- Phone input field -->\n <input #input\n class=\"zen-input-field text text-md text-weight-regular\"\n type=\"text\"\n [(ngModel)]=\"phoneText\"\n (ngModelChange)=\"phoneChanged(input)\"\n (click)=\"isExpanded = false\"\n [disabled]=\"disabled\"\n country-code=\"selectedCountry.countryCode\"\n [maxlength]=\"maxLength\">\n </div>\n\n <!-- Country dropdown menu -->\n @if (isExpanded) {\n <div class=\"zen-dropdown-menu\"\n [ngClass]=\"{'open': isExpanded}\">\n <!-- Countries List -->\n @for (country of countryList; track country) {\n <button type=\"button\"\n class=\"zen-dropdown-option\"\n [ngClass]=\"{'selected': selectedCountry.countryName === country.countryName}\"\n (click)=\"countryChanged(country)\">\n <img class=\"zen-phone-country-flag\"\n [src]=\"country.flag\"\n [alt]=\"country.countryName\">\n <span class=\"zen-phone-country-name\">{{ country.countryName }}</span>\n <span class=\"zen-phone-country-code\">{{ country.countryCallingCode }}</span>\n </button>\n }\n <!-- Custom Country -->\n <button type=\"button\"\n class=\"zen-dropdown-option\"\n [ngClass]=\"{'selected': selectedCountry.countryName === customCountry.countryName}\"\n (click)=\"countryChanged(customCountry)\">\n <img class=\"zen-phone-country-flag\"\n [src]=\"customCountry.flag\"\n [alt]=\"customCountry.countryName\">\n <span class=\"zen-phone-country-name\">{{ customCountry.countryName }}</span>\n <span class=\"zen-phone-country-code\">{{ customCountry.countryCallingCode }}</span>\n </button>\n </div>\n }\n</div>\n\n<!-- Click outside handler for dropdown -->\n@if (isExpanded) {\n <div\n class=\"zen-dropdown-backdrop\"\n (click)=\"hideDropDown()\"></div>\n}\n", styles: [".text{margin:0;padding:0;color:#101828}.text-display-2xl{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:72px;line-height:90px;letter-spacing:-.02em}.text-display-xl{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:60px;line-height:72px;letter-spacing:-.02em}.text-display-lg{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:48px;line-height:60px;letter-spacing:-.02em}.text-display-md{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:36px;line-height:44px;letter-spacing:-.02em}.text-display-sm{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:30px;line-height:38px;letter-spacing:0}.text-display-xs{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:24px;line-height:32px;letter-spacing:0}.text-xl{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:20px;line-height:30px;letter-spacing:0}.text-lg{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:18px;line-height:28px;letter-spacing:0}.text-md{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:16px;line-height:24px;letter-spacing:0}.text-sm{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:14px;line-height:20px;letter-spacing:0}.text-xs{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:12px;line-height:18px;letter-spacing:0}.text-weight-regular{font-weight:400;font-style:normal}.text-weight-medium{font-weight:500;font-style:normal}.text-weight-semibold{font-weight:600;font-style:normal}.text-weight-bold{font-weight:700;font-style:normal}@media(max-width:768px){.text-display-2xl{font-size:48px;line-height:56px}.text-display-xl{font-size:40px;line-height:48px}.text-display-lg{font-size:32px;line-height:40px}}:host{display:block;width:100%}.zen-input-container{display:flex;flex-direction:column;gap:6px;width:100%;position:relative}.zen-input-container .zen-input-field-wrapper{display:flex;align-items:center;background:#fff;border:1px solid #D0D5DD;border-radius:8px;padding:10px 14px;gap:8px;min-height:44px;box-sizing:border-box;transition:all .2s ease;cursor:text;position:relative;box-shadow:0 1px 2px #1018280d}.zen-input-container .zen-input-field-wrapper:hover{border-color:#98a2b3}.zen-input-container .zen-input-field-wrapper:focus-within{border-color:#88c1f1;box-shadow:0 1px 2px #1018280d,0 0 0 4px #e3eefb}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown{display:flex;align-items:center;gap:6px;flex-shrink:0;padding-right:8px;border-right:1px solid #D0D5DD;margin-right:8px;position:relative}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger{display:flex;align-items:center;gap:4px;background:transparent;border:none;padding:0;cursor:pointer;font-family:Inter,sans-serif;font-size:16px;color:#344054}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger:disabled{cursor:not-allowed;color:#d0d5dd}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .zen-phone-country-flag{width:20px;height:15px;object-fit:cover;border-radius:2px}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .dropdown-label{font-weight:500;font-size:14px;min-width:max-content}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .dropdown-icon{font-size:16px;color:#98a2b3;transition:transform .2s ease,color .2s ease}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .dropdown-icon.active{transform:rotate(180deg)}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger:hover:not(:disabled) .dropdown-icon{color:#475467}.zen-input-container .zen-input-field-wrapper .zen-input-field{flex:1;border:none;outline:none;background:transparent;color:#101828;padding:0;min-width:0}.zen-input-container .zen-input-field-wrapper .zen-input-field::placeholder{color:#667085}.zen-input-container .zen-input-field-wrapper .zen-input-field:disabled{cursor:not-allowed;color:#d0d5dd}.zen-input-container .zen-input-field-wrapper .zen-input-field:disabled::placeholder{color:#d0d5dd}.zen-input-container .zen-dropdown-menu{position:absolute;top:calc(100% + 4px);left:0;background:#fff;border:1px solid #EAECF0;border-radius:8px;box-shadow:0 12px 16px -4px #10182814,0 4px 6px -2px #10182808;min-width:280px;max-height:240px;overflow-y:auto;z-index:100;padding:4px;width:100%;box-sizing:border-box}.zen-input-container .zen-dropdown-menu .zen-dropdown-option{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;background:transparent;border:none;border-radius:6px;font-family:Inter,sans-serif;font-size:14px;line-height:20px;color:#344054;text-align:left;cursor:pointer;transition:background-color .2s ease}.zen-input-container .zen-dropdown-menu .zen-dropdown-option .zen-phone-country-flag{width:20px;height:15px;object-fit:cover;border-radius:2px;flex-shrink:0}.zen-input-container .zen-dropdown-menu .zen-dropdown-option .zen-phone-country-name{flex:1;min-width:0}.zen-input-container .zen-dropdown-menu .zen-dropdown-option .zen-phone-country-code{color:#667085;font-size:13px;flex-shrink:0}.zen-input-container .zen-dropdown-menu .zen-dropdown-option:hover{background:#f9fafb}.zen-input-container .zen-dropdown-menu .zen-dropdown-option.selected{background:#f1f7fe;color:#105494}.zen-input-container .zen-dropdown-menu .zen-dropdown-option.selected .zen-phone-country-code{color:#136ab6}.zen-dropdown-backdrop{position:fixed;inset:0;z-index:99;background:transparent}\n"] }]
3323
- }], ctorParameters: () => [], propDecorators: { inputElement: [{
3324
- type: ViewChild,
3325
- args: ['input']
3326
- }], phone: [{
3327
- type: Input
3328
- }], maxLength: [{
3329
- type: Input
3330
- }], phoneChange: [{
3331
- type: Output
3332
- }], validChange: [{
3333
- type: Output
3334
- }], disabled: [{
3335
- type: Input
3336
- }], width: [{
3337
- type: Input
3338
- }] } });
3339
-
3340
3122
  class ZenduSelectOptionDirective {
3341
3123
  constructor(template) {
3342
3124
  this.template = template;
@@ -4076,6 +3858,8 @@ class ZenduSelectComponent {
4076
3858
  */
4077
3859
  getStateClasses() {
4078
3860
  const classes = ['app-select-container'];
3861
+ if (this.size)
3862
+ classes.push(`size-${this.size}`);
4079
3863
  if (this.isOpen)
4080
3864
  classes.push('open');
4081
3865
  if (this.disabled)
@@ -4268,6 +4052,241 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
4268
4052
  args: ['document:click', ['$event']]
4269
4053
  }] } });
4270
4054
 
4055
+ class ZenduPaginationBarComponent {
4056
+ constructor() {
4057
+ this.page = 1;
4058
+ this.perPage = 10;
4059
+ this.count = 0;
4060
+ this.perPageOptions = [10, 20, 30, 40, 50];
4061
+ this.pageChange = new EventEmitter();
4062
+ this.perPageChange = new EventEmitter();
4063
+ this.totalPages = 1;
4064
+ this.pages = [];
4065
+ this.rangeStart = 0;
4066
+ this.rangeEnd = 0;
4067
+ }
4068
+ ngOnChanges(changes) {
4069
+ if (changes['count'] || changes['perPage'] || changes['page']) {
4070
+ this.recalculate();
4071
+ }
4072
+ }
4073
+ goToPage(target) {
4074
+ const clamped = Math.min(Math.max(1, target), this.totalPages);
4075
+ if (clamped === this.page) {
4076
+ return;
4077
+ }
4078
+ this.page = clamped;
4079
+ this.recalculate();
4080
+ this.pageChange.emit(this.page);
4081
+ }
4082
+ onPerPageChange(value) {
4083
+ this.perPage = value;
4084
+ this.page = 1;
4085
+ this.recalculate();
4086
+ this.perPageChange.emit(this.perPage);
4087
+ this.pageChange.emit(this.page);
4088
+ }
4089
+ recalculate() {
4090
+ this.totalPages = Math.max(1, Math.ceil((this.count || 0) / (this.perPage || 1)));
4091
+ this.pages = this.buildPages(this.page, this.totalPages);
4092
+ this.rangeStart = this.count === 0 ? 0 : (this.page - 1) * this.perPage + 1;
4093
+ this.rangeEnd = Math.min(this.page * this.perPage, this.count);
4094
+ }
4095
+ buildPages(current, total) {
4096
+ const result = [];
4097
+ const push = (p) => result.push({ kind: 'page', page: p, active: p === current });
4098
+ if (total <= 7) {
4099
+ for (let i = 1; i <= total; i++) {
4100
+ push(i);
4101
+ }
4102
+ return result;
4103
+ }
4104
+ const window = new Set([1, total, current - 1, current, current + 1]);
4105
+ if (current <= 3) {
4106
+ window.add(2).add(3);
4107
+ }
4108
+ if (current >= total - 2) {
4109
+ window.add(total - 1).add(total - 2);
4110
+ }
4111
+ const sorted = Array.from(window)
4112
+ .filter((p) => p >= 1 && p <= total)
4113
+ .sort((a, b) => a - b);
4114
+ let prev = 0;
4115
+ for (const p of sorted) {
4116
+ if (p - prev > 1) {
4117
+ result.push({ kind: 'ellipsis' });
4118
+ }
4119
+ push(p);
4120
+ prev = p;
4121
+ }
4122
+ return result;
4123
+ }
4124
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ZenduPaginationBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4125
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: ZenduPaginationBarComponent, isStandalone: false, selector: "zen-pagination-bar", inputs: { page: "page", perPage: "perPage", count: "count", perPageOptions: "perPageOptions" }, outputs: { pageChange: "pageChange", perPageChange: "perPageChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"pagination-component\">\n <p class=\"results-text\">\n {{ \"Showing\" | translate }} {{ rangeStart }} - {{ rangeEnd }}\n {{ \"of\" | translate }} {{ count }} {{ \"results\" | translate }}\n </p>\n\n <div class=\"page-navigation\">\n <zen-button\n buttonType=\"button-icon-only\"\n variant=\"tertiary-gray\"\n size=\"md\"\n icon=\"chevron-left\"\n [disabled]=\"page <= 1\"\n (click)=\"goToPage(page - 1)\">\n </zen-button>\n\n <div class=\"pages\">\n @for (item of pages; track item; let i = $index) {\n @if (item.kind === 'page') {\n <button\n type=\"button\"\n class=\"page-btn\"\n [class.is-active]=\"item.active\"\n (click)=\"goToPage(item.page)\">\n {{ item.page }}\n </button>\n }\n @if (item.kind === 'ellipsis') {\n <span class=\"page-ellipsis\">\u2026</span>\n }\n }\n </div>\n\n <zen-button\n buttonType=\"button-icon-only\"\n variant=\"tertiary-gray\"\n size=\"md\"\n icon=\"chevron-right\"\n [disabled]=\"page >= totalPages\"\n (click)=\"goToPage(page + 1)\">\n </zen-button>\n </div>\n\n <div class=\"rows-per-page\">\n <span class=\"rows-label\">{{ \"Rows per page\" | translate }}</span>\n <zen-select\n size=\"sm\"\n [options]=\"perPageOptions\"\n [(selectModel)]=\"perPage\"\n (selectModelChange)=\"onPerPageChange($event)\"\n preferredOpenDirection=\"up\">\n </zen-select>\n </div>\n</div>\n", styles: [".pagination-component{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;border-top:1px solid #EAECF0;padding:11px 24px 16px;font-family:Inter,sans-serif}.pagination-component .results-text{justify-self:start;margin:0;font-size:14px;line-height:20px;color:#667085;white-space:nowrap}.pagination-component .page-navigation{justify-self:center;display:flex;flex-direction:row;align-items:center;gap:8px}.pagination-component .rows-per-page{justify-self:end;display:flex;flex-direction:row;align-items:center;gap:8px}.pagination-component .rows-per-page .rows-label{font-size:14px;font-weight:500;line-height:20px;color:#344054;white-space:nowrap}.pagination-component .pages{display:flex;flex-direction:row;align-items:center;gap:2px}.pagination-component .page-btn,.pagination-component .page-ellipsis{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:8px;font-weight:500;font-size:14px;line-height:20px;color:#667085;background:transparent;border:0;padding:0;box-sizing:border-box}.pagination-component .page-btn{cursor:pointer;transition:background-color .1s,color .1s}.pagination-component .page-btn:hover:not(.is-active){background:#f9fafb}.pagination-component .page-btn.is-active{background:#f1f7fe;color:#136ab6;cursor:default}.pagination-component .page-ellipsis{cursor:default}\n"], dependencies: [{ kind: "component", type: ZenduSelectComponent, selector: "zen-select", inputs: ["selectModel", "options", "label", "supportingText", "hintText", "placeholder", "leadingType", "leadingIcon", "leadingAvatar", "leadingDotColor", "displayProp", "idProp", "hasSearch", "isMultiselect", "multiselect", "hideSelectAll", "hideTreeSearch", "required", "disabled", "error", "errorMessage", "destructive", "size", "returnOption", "isTruncate", "enableAddNewOption", "showDefaultAddOption", "newOptionText", "enableRemoveOption", "removeOptionText", "isLazyLoading", "lazyLoader", "preferredOpenDirection"], outputs: ["selectModelChange", "addNewOption", "removeOption", "closed"] }, { kind: "component", type: ZenButtonComponent, selector: "zen-button", inputs: ["variant", "buttonType", "icon", "iconRotated", "size", "destructive", "disabled", "fullWidth", "type"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
4126
+ }
4127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ZenduPaginationBarComponent, decorators: [{
4128
+ type: Component,
4129
+ args: [{ selector: 'zen-pagination-bar', changeDetection: ChangeDetectionStrategy.Eager, standalone: false, template: "<div class=\"pagination-component\">\n <p class=\"results-text\">\n {{ \"Showing\" | translate }} {{ rangeStart }} - {{ rangeEnd }}\n {{ \"of\" | translate }} {{ count }} {{ \"results\" | translate }}\n </p>\n\n <div class=\"page-navigation\">\n <zen-button\n buttonType=\"button-icon-only\"\n variant=\"tertiary-gray\"\n size=\"md\"\n icon=\"chevron-left\"\n [disabled]=\"page <= 1\"\n (click)=\"goToPage(page - 1)\">\n </zen-button>\n\n <div class=\"pages\">\n @for (item of pages; track item; let i = $index) {\n @if (item.kind === 'page') {\n <button\n type=\"button\"\n class=\"page-btn\"\n [class.is-active]=\"item.active\"\n (click)=\"goToPage(item.page)\">\n {{ item.page }}\n </button>\n }\n @if (item.kind === 'ellipsis') {\n <span class=\"page-ellipsis\">\u2026</span>\n }\n }\n </div>\n\n <zen-button\n buttonType=\"button-icon-only\"\n variant=\"tertiary-gray\"\n size=\"md\"\n icon=\"chevron-right\"\n [disabled]=\"page >= totalPages\"\n (click)=\"goToPage(page + 1)\">\n </zen-button>\n </div>\n\n <div class=\"rows-per-page\">\n <span class=\"rows-label\">{{ \"Rows per page\" | translate }}</span>\n <zen-select\n size=\"sm\"\n [options]=\"perPageOptions\"\n [(selectModel)]=\"perPage\"\n (selectModelChange)=\"onPerPageChange($event)\"\n preferredOpenDirection=\"up\">\n </zen-select>\n </div>\n</div>\n", styles: [".pagination-component{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;border-top:1px solid #EAECF0;padding:11px 24px 16px;font-family:Inter,sans-serif}.pagination-component .results-text{justify-self:start;margin:0;font-size:14px;line-height:20px;color:#667085;white-space:nowrap}.pagination-component .page-navigation{justify-self:center;display:flex;flex-direction:row;align-items:center;gap:8px}.pagination-component .rows-per-page{justify-self:end;display:flex;flex-direction:row;align-items:center;gap:8px}.pagination-component .rows-per-page .rows-label{font-size:14px;font-weight:500;line-height:20px;color:#344054;white-space:nowrap}.pagination-component .pages{display:flex;flex-direction:row;align-items:center;gap:2px}.pagination-component .page-btn,.pagination-component .page-ellipsis{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:8px;font-weight:500;font-size:14px;line-height:20px;color:#667085;background:transparent;border:0;padding:0;box-sizing:border-box}.pagination-component .page-btn{cursor:pointer;transition:background-color .1s,color .1s}.pagination-component .page-btn:hover:not(.is-active){background:#f9fafb}.pagination-component .page-btn.is-active{background:#f1f7fe;color:#136ab6;cursor:default}.pagination-component .page-ellipsis{cursor:default}\n"] }]
4130
+ }], propDecorators: { page: [{
4131
+ type: Input
4132
+ }], perPage: [{
4133
+ type: Input
4134
+ }], count: [{
4135
+ type: Input
4136
+ }], perPageOptions: [{
4137
+ type: Input
4138
+ }], pageChange: [{
4139
+ type: Output
4140
+ }], perPageChange: [{
4141
+ type: Output
4142
+ }] } });
4143
+
4144
+ class ZenduPhoneInputComponent {
4145
+ constructor() {
4146
+ this.maxLength = 12;
4147
+ this.phoneChange = new EventEmitter();
4148
+ this.validChange = new EventEmitter();
4149
+ this.disabled = false;
4150
+ this.phoneText = "";
4151
+ this.countryList = [
4152
+ {
4153
+ countryCode: "US",
4154
+ countryName: "America",
4155
+ countryCallingCode: "+1",
4156
+ flag: "https://storage.googleapis.com/zenduit-icons/Flags/USA.svg"
4157
+ },
4158
+ {
4159
+ countryCode: "CA",
4160
+ countryName: "Canada",
4161
+ countryCallingCode: "+1",
4162
+ flag: "https://storage.googleapis.com/zenduit-icons/Flags/Canada.svg"
4163
+ },
4164
+ {
4165
+ countryCode: "MX",
4166
+ countryName: "Mexico",
4167
+ countryCallingCode: "+52",
4168
+ flag: "https://storage.googleapis.com/zenduit-icons/Flags/Mexico.svg"
4169
+ }
4170
+ ];
4171
+ this.customCountry = {
4172
+ countryCode: "",
4173
+ countryName: "Custom",
4174
+ countryCallingCode: "",
4175
+ flag: "https://storage.googleapis.com/zenduit-icons/Flags/Custom.svg"
4176
+ };
4177
+ this.isExpanded = false;
4178
+ this.selectedCountry = this.countryList[1];
4179
+ }
4180
+ ngOnInit() {
4181
+ this.parseNumber();
4182
+ }
4183
+ ngOnChanges(changes) {
4184
+ if (changes["phone"] && (!this.selectedCountry || !this.selectedCountry.countryCode)) {
4185
+ this.parseNumber();
4186
+ }
4187
+ }
4188
+ parseNumber() {
4189
+ try {
4190
+ this.phoneText = this.phone || '';
4191
+ if (this.phone) {
4192
+ const countryFromList = this.countryList.find(country => this.phone.startsWith(country.countryCallingCode) || `+${this.phone}`.startsWith(country.countryCallingCode));
4193
+ if (countryFromList) {
4194
+ this.selectedCountry = countryFromList || this.customCountry;
4195
+ const phoneNumberUtil = PhoneNumberUtil.getInstance();
4196
+ const parsedPhone = phoneNumberUtil.parse(this.phone || "", 'US');
4197
+ setTimeout(() => {
4198
+ if (this.phoneText.startsWith('+')) {
4199
+ this.phoneText = this.phoneText.replace(`+${parsedPhone.getCountryCode()}`, "");
4200
+ }
4201
+ else if (this.phoneText.startsWith(parsedPhone.getCountryCode())) {
4202
+ this.phoneText = this.phoneText.replace(parsedPhone.getCountryCode(), "");
4203
+ }
4204
+ this.phoneChanged();
4205
+ });
4206
+ }
4207
+ else {
4208
+ this.selectedCountry = this.customCountry;
4209
+ }
4210
+ }
4211
+ else {
4212
+ this.selectedCountry = this.customCountry;
4213
+ }
4214
+ }
4215
+ catch (err) {
4216
+ console.warn(`Can't parse phone: ${this.phone}`, err);
4217
+ this.selectedCountry = this.customCountry;
4218
+ }
4219
+ }
4220
+ countryChanged(country) {
4221
+ this.isExpanded = false;
4222
+ this.selectedCountry = country;
4223
+ this.phoneChanged();
4224
+ }
4225
+ phoneChanged(input) {
4226
+ // allow + in custom country
4227
+ let custom = false;
4228
+ if (this.selectedCountry === this.customCountry && this.phoneText.includes('+')) {
4229
+ custom = true;
4230
+ }
4231
+ const phoneText = (this.phoneText || '').replace(/\D/g, '');
4232
+ this.phoneText = custom ? `+${phoneText}` : phoneText;
4233
+ if (input && input.value !== this.phoneText) {
4234
+ input.value = this.phoneText;
4235
+ }
4236
+ const fullNumber = `${this.selectedCountry.countryCallingCode}${this.phoneText}`;
4237
+ if (this.phone !== fullNumber) {
4238
+ this.phoneChange.emit(fullNumber);
4239
+ }
4240
+ const phoneNumberUtil = PhoneNumberUtil.getInstance();
4241
+ if (this.selectedCountry === this.customCountry) {
4242
+ this.validChange.emit(true);
4243
+ }
4244
+ else {
4245
+ try {
4246
+ this.validChange.emit(phoneNumberUtil.isValidNumber(phoneNumberUtil.parseAndKeepRawInput(fullNumber)));
4247
+ }
4248
+ catch {
4249
+ this.validChange.emit(false);
4250
+ }
4251
+ }
4252
+ }
4253
+ hideDropDown() {
4254
+ this.isExpanded = false;
4255
+ }
4256
+ toggle() {
4257
+ if (this.disabled) {
4258
+ return;
4259
+ }
4260
+ this.isExpanded = !this.isExpanded;
4261
+ }
4262
+ focusInput() {
4263
+ if (this.inputElement) {
4264
+ this.inputElement.nativeElement.focus();
4265
+ }
4266
+ }
4267
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ZenduPhoneInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4268
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: ZenduPhoneInputComponent, isStandalone: false, selector: "zen-phone-input", inputs: { phone: "phone", maxLength: "maxLength", disabled: "disabled", width: "width" }, outputs: { phoneChange: "phoneChange", validChange: "validChange" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"zen-input-container\" [style.width]=\"width\">\n <!-- Input wrapper -->\n <div class=\"zen-input-field-wrapper\" (click)=\"focusInput()\">\n\n <!-- Leading dropdown: Country selector -->\n <div class=\"zen-input-leading-dropdown\">\n <button type=\"button\"\n class=\"zen-dropdown-trigger\"\n [disabled]=\"disabled\"\n (click)=\"toggle(); $event.stopPropagation()\">\n <img class=\"zen-phone-country-flag\"\n [src]=\"selectedCountry.flag\"\n [alt]=\"selectedCountry.countryName\">\n <span class=\"dropdown-label\">{{ selectedCountry.countryCallingCode }}</span>\n <i class=\"material-icons dropdown-icon\"\n [ngClass]=\"{'active': isExpanded}\">expand_more</i>\n </button>\n </div>\n\n <!-- Phone input field -->\n <input #input\n class=\"zen-input-field text text-md text-weight-regular\"\n type=\"text\"\n [(ngModel)]=\"phoneText\"\n (ngModelChange)=\"phoneChanged(input)\"\n (click)=\"isExpanded = false\"\n [disabled]=\"disabled\"\n country-code=\"selectedCountry.countryCode\"\n [maxlength]=\"maxLength\">\n </div>\n\n <!-- Country dropdown menu -->\n @if (isExpanded) {\n <div class=\"zen-dropdown-menu\"\n [ngClass]=\"{'open': isExpanded}\">\n <!-- Countries List -->\n @for (country of countryList; track country) {\n <button type=\"button\"\n class=\"zen-dropdown-option\"\n [ngClass]=\"{'selected': selectedCountry.countryName === country.countryName}\"\n (click)=\"countryChanged(country)\">\n <img class=\"zen-phone-country-flag\"\n [src]=\"country.flag\"\n [alt]=\"country.countryName\">\n <span class=\"zen-phone-country-name\">{{ country.countryName }}</span>\n <span class=\"zen-phone-country-code\">{{ country.countryCallingCode }}</span>\n </button>\n }\n <!-- Custom Country -->\n <button type=\"button\"\n class=\"zen-dropdown-option\"\n [ngClass]=\"{'selected': selectedCountry.countryName === customCountry.countryName}\"\n (click)=\"countryChanged(customCountry)\">\n <img class=\"zen-phone-country-flag\"\n [src]=\"customCountry.flag\"\n [alt]=\"customCountry.countryName\">\n <span class=\"zen-phone-country-name\">{{ customCountry.countryName }}</span>\n <span class=\"zen-phone-country-code\">{{ customCountry.countryCallingCode }}</span>\n </button>\n </div>\n }\n</div>\n\n<!-- Click outside handler for dropdown -->\n@if (isExpanded) {\n <div\n class=\"zen-dropdown-backdrop\"\n (click)=\"hideDropDown()\"></div>\n}\n", styles: [".text{margin:0;padding:0;color:#101828}.text-display-2xl{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:72px;line-height:90px;letter-spacing:-.02em}.text-display-xl{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:60px;line-height:72px;letter-spacing:-.02em}.text-display-lg{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:48px;line-height:60px;letter-spacing:-.02em}.text-display-md{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:36px;line-height:44px;letter-spacing:-.02em}.text-display-sm{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:30px;line-height:38px;letter-spacing:0}.text-display-xs{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:24px;line-height:32px;letter-spacing:0}.text-xl{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:20px;line-height:30px;letter-spacing:0}.text-lg{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:18px;line-height:28px;letter-spacing:0}.text-md{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:16px;line-height:24px;letter-spacing:0}.text-sm{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:14px;line-height:20px;letter-spacing:0}.text-xs{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:12px;line-height:18px;letter-spacing:0}.text-weight-regular{font-weight:400;font-style:normal}.text-weight-medium{font-weight:500;font-style:normal}.text-weight-semibold{font-weight:600;font-style:normal}.text-weight-bold{font-weight:700;font-style:normal}@media(max-width:768px){.text-display-2xl{font-size:48px;line-height:56px}.text-display-xl{font-size:40px;line-height:48px}.text-display-lg{font-size:32px;line-height:40px}}:host{display:block;width:100%}.zen-input-container{display:flex;flex-direction:column;gap:6px;width:100%;position:relative}.zen-input-container .zen-input-field-wrapper{display:flex;align-items:center;background:#fff;border:1px solid #D0D5DD;border-radius:8px;padding:10px 14px;gap:8px;min-height:44px;box-sizing:border-box;transition:all .2s ease;cursor:text;position:relative;box-shadow:0 1px 2px #1018280d}.zen-input-container .zen-input-field-wrapper:hover{border-color:#98a2b3}.zen-input-container .zen-input-field-wrapper:focus-within{border-color:#88c1f1;box-shadow:0 1px 2px #1018280d,0 0 0 4px #e3eefb}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown{display:flex;align-items:center;gap:6px;flex-shrink:0;padding-right:8px;border-right:1px solid #D0D5DD;margin-right:8px;position:relative}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger{display:flex;align-items:center;gap:4px;background:transparent;border:none;padding:0;cursor:pointer;font-family:Inter,sans-serif;font-size:16px;color:#344054}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger:disabled{cursor:not-allowed;color:#d0d5dd}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .zen-phone-country-flag{width:20px;height:15px;object-fit:cover;border-radius:2px}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .dropdown-label{font-weight:500;font-size:14px;min-width:max-content}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .dropdown-icon{font-size:16px;color:#98a2b3;transition:transform .2s ease,color .2s ease}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .dropdown-icon.active{transform:rotate(180deg)}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger:hover:not(:disabled) .dropdown-icon{color:#475467}.zen-input-container .zen-input-field-wrapper .zen-input-field{flex:1;border:none;outline:none;background:transparent;color:#101828;padding:0;min-width:0}.zen-input-container .zen-input-field-wrapper .zen-input-field::placeholder{color:#667085}.zen-input-container .zen-input-field-wrapper .zen-input-field:disabled{cursor:not-allowed;color:#d0d5dd}.zen-input-container .zen-input-field-wrapper .zen-input-field:disabled::placeholder{color:#d0d5dd}.zen-input-container .zen-dropdown-menu{position:absolute;top:calc(100% + 4px);left:0;background:#fff;border:1px solid #EAECF0;border-radius:8px;box-shadow:0 12px 16px -4px #10182814,0 4px 6px -2px #10182808;min-width:280px;max-height:240px;overflow-y:auto;z-index:100;padding:4px;width:100%;box-sizing:border-box}.zen-input-container .zen-dropdown-menu .zen-dropdown-option{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;background:transparent;border:none;border-radius:6px;font-family:Inter,sans-serif;font-size:14px;line-height:20px;color:#344054;text-align:left;cursor:pointer;transition:background-color .2s ease}.zen-input-container .zen-dropdown-menu .zen-dropdown-option .zen-phone-country-flag{width:20px;height:15px;object-fit:cover;border-radius:2px;flex-shrink:0}.zen-input-container .zen-dropdown-menu .zen-dropdown-option .zen-phone-country-name{flex:1;min-width:0}.zen-input-container .zen-dropdown-menu .zen-dropdown-option .zen-phone-country-code{color:#667085;font-size:13px;flex-shrink:0}.zen-input-container .zen-dropdown-menu .zen-dropdown-option:hover{background:#f9fafb}.zen-input-container .zen-dropdown-menu .zen-dropdown-option.selected{background:#f1f7fe;color:#105494}.zen-input-container .zen-dropdown-menu .zen-dropdown-option.selected .zen-phone-country-code{color:#136ab6}.zen-dropdown-backdrop{position:fixed;inset:0;z-index:99;background:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
4269
+ }
4270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ZenduPhoneInputComponent, decorators: [{
4271
+ type: Component,
4272
+ args: [{ selector: 'zen-phone-input', changeDetection: ChangeDetectionStrategy.Eager, standalone: false, template: "<div class=\"zen-input-container\" [style.width]=\"width\">\n <!-- Input wrapper -->\n <div class=\"zen-input-field-wrapper\" (click)=\"focusInput()\">\n\n <!-- Leading dropdown: Country selector -->\n <div class=\"zen-input-leading-dropdown\">\n <button type=\"button\"\n class=\"zen-dropdown-trigger\"\n [disabled]=\"disabled\"\n (click)=\"toggle(); $event.stopPropagation()\">\n <img class=\"zen-phone-country-flag\"\n [src]=\"selectedCountry.flag\"\n [alt]=\"selectedCountry.countryName\">\n <span class=\"dropdown-label\">{{ selectedCountry.countryCallingCode }}</span>\n <i class=\"material-icons dropdown-icon\"\n [ngClass]=\"{'active': isExpanded}\">expand_more</i>\n </button>\n </div>\n\n <!-- Phone input field -->\n <input #input\n class=\"zen-input-field text text-md text-weight-regular\"\n type=\"text\"\n [(ngModel)]=\"phoneText\"\n (ngModelChange)=\"phoneChanged(input)\"\n (click)=\"isExpanded = false\"\n [disabled]=\"disabled\"\n country-code=\"selectedCountry.countryCode\"\n [maxlength]=\"maxLength\">\n </div>\n\n <!-- Country dropdown menu -->\n @if (isExpanded) {\n <div class=\"zen-dropdown-menu\"\n [ngClass]=\"{'open': isExpanded}\">\n <!-- Countries List -->\n @for (country of countryList; track country) {\n <button type=\"button\"\n class=\"zen-dropdown-option\"\n [ngClass]=\"{'selected': selectedCountry.countryName === country.countryName}\"\n (click)=\"countryChanged(country)\">\n <img class=\"zen-phone-country-flag\"\n [src]=\"country.flag\"\n [alt]=\"country.countryName\">\n <span class=\"zen-phone-country-name\">{{ country.countryName }}</span>\n <span class=\"zen-phone-country-code\">{{ country.countryCallingCode }}</span>\n </button>\n }\n <!-- Custom Country -->\n <button type=\"button\"\n class=\"zen-dropdown-option\"\n [ngClass]=\"{'selected': selectedCountry.countryName === customCountry.countryName}\"\n (click)=\"countryChanged(customCountry)\">\n <img class=\"zen-phone-country-flag\"\n [src]=\"customCountry.flag\"\n [alt]=\"customCountry.countryName\">\n <span class=\"zen-phone-country-name\">{{ customCountry.countryName }}</span>\n <span class=\"zen-phone-country-code\">{{ customCountry.countryCallingCode }}</span>\n </button>\n </div>\n }\n</div>\n\n<!-- Click outside handler for dropdown -->\n@if (isExpanded) {\n <div\n class=\"zen-dropdown-backdrop\"\n (click)=\"hideDropDown()\"></div>\n}\n", styles: [".text{margin:0;padding:0;color:#101828}.text-display-2xl{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:72px;line-height:90px;letter-spacing:-.02em}.text-display-xl{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:60px;line-height:72px;letter-spacing:-.02em}.text-display-lg{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:48px;line-height:60px;letter-spacing:-.02em}.text-display-md{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:36px;line-height:44px;letter-spacing:-.02em}.text-display-sm{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:30px;line-height:38px;letter-spacing:0}.text-display-xs{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:24px;line-height:32px;letter-spacing:0}.text-xl{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:20px;line-height:30px;letter-spacing:0}.text-lg{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:18px;line-height:28px;letter-spacing:0}.text-md{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:16px;line-height:24px;letter-spacing:0}.text-sm{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:14px;line-height:20px;letter-spacing:0}.text-xs{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:12px;line-height:18px;letter-spacing:0}.text-weight-regular{font-weight:400;font-style:normal}.text-weight-medium{font-weight:500;font-style:normal}.text-weight-semibold{font-weight:600;font-style:normal}.text-weight-bold{font-weight:700;font-style:normal}@media(max-width:768px){.text-display-2xl{font-size:48px;line-height:56px}.text-display-xl{font-size:40px;line-height:48px}.text-display-lg{font-size:32px;line-height:40px}}:host{display:block;width:100%}.zen-input-container{display:flex;flex-direction:column;gap:6px;width:100%;position:relative}.zen-input-container .zen-input-field-wrapper{display:flex;align-items:center;background:#fff;border:1px solid #D0D5DD;border-radius:8px;padding:10px 14px;gap:8px;min-height:44px;box-sizing:border-box;transition:all .2s ease;cursor:text;position:relative;box-shadow:0 1px 2px #1018280d}.zen-input-container .zen-input-field-wrapper:hover{border-color:#98a2b3}.zen-input-container .zen-input-field-wrapper:focus-within{border-color:#88c1f1;box-shadow:0 1px 2px #1018280d,0 0 0 4px #e3eefb}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown{display:flex;align-items:center;gap:6px;flex-shrink:0;padding-right:8px;border-right:1px solid #D0D5DD;margin-right:8px;position:relative}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger{display:flex;align-items:center;gap:4px;background:transparent;border:none;padding:0;cursor:pointer;font-family:Inter,sans-serif;font-size:16px;color:#344054}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger:disabled{cursor:not-allowed;color:#d0d5dd}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .zen-phone-country-flag{width:20px;height:15px;object-fit:cover;border-radius:2px}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .dropdown-label{font-weight:500;font-size:14px;min-width:max-content}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .dropdown-icon{font-size:16px;color:#98a2b3;transition:transform .2s ease,color .2s ease}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger .dropdown-icon.active{transform:rotate(180deg)}.zen-input-container .zen-input-field-wrapper .zen-input-leading-dropdown .zen-dropdown-trigger:hover:not(:disabled) .dropdown-icon{color:#475467}.zen-input-container .zen-input-field-wrapper .zen-input-field{flex:1;border:none;outline:none;background:transparent;color:#101828;padding:0;min-width:0}.zen-input-container .zen-input-field-wrapper .zen-input-field::placeholder{color:#667085}.zen-input-container .zen-input-field-wrapper .zen-input-field:disabled{cursor:not-allowed;color:#d0d5dd}.zen-input-container .zen-input-field-wrapper .zen-input-field:disabled::placeholder{color:#d0d5dd}.zen-input-container .zen-dropdown-menu{position:absolute;top:calc(100% + 4px);left:0;background:#fff;border:1px solid #EAECF0;border-radius:8px;box-shadow:0 12px 16px -4px #10182814,0 4px 6px -2px #10182808;min-width:280px;max-height:240px;overflow-y:auto;z-index:100;padding:4px;width:100%;box-sizing:border-box}.zen-input-container .zen-dropdown-menu .zen-dropdown-option{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;background:transparent;border:none;border-radius:6px;font-family:Inter,sans-serif;font-size:14px;line-height:20px;color:#344054;text-align:left;cursor:pointer;transition:background-color .2s ease}.zen-input-container .zen-dropdown-menu .zen-dropdown-option .zen-phone-country-flag{width:20px;height:15px;object-fit:cover;border-radius:2px;flex-shrink:0}.zen-input-container .zen-dropdown-menu .zen-dropdown-option .zen-phone-country-name{flex:1;min-width:0}.zen-input-container .zen-dropdown-menu .zen-dropdown-option .zen-phone-country-code{color:#667085;font-size:13px;flex-shrink:0}.zen-input-container .zen-dropdown-menu .zen-dropdown-option:hover{background:#f9fafb}.zen-input-container .zen-dropdown-menu .zen-dropdown-option.selected{background:#f1f7fe;color:#105494}.zen-input-container .zen-dropdown-menu .zen-dropdown-option.selected .zen-phone-country-code{color:#136ab6}.zen-dropdown-backdrop{position:fixed;inset:0;z-index:99;background:transparent}\n"] }]
4273
+ }], ctorParameters: () => [], propDecorators: { inputElement: [{
4274
+ type: ViewChild,
4275
+ args: ['input']
4276
+ }], phone: [{
4277
+ type: Input
4278
+ }], maxLength: [{
4279
+ type: Input
4280
+ }], phoneChange: [{
4281
+ type: Output
4282
+ }], validChange: [{
4283
+ type: Output
4284
+ }], disabled: [{
4285
+ type: Input
4286
+ }], width: [{
4287
+ type: Input
4288
+ }] } });
4289
+
4271
4290
  class ZenduSortHeaderComponent {
4272
4291
  constructor() {
4273
4292
  this.sortChange = new EventEmitter();