@ids-group-ltd/ids-design-system 0.12.0 → 0.12.1
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/CHANGELOG.md +322 -52
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +12 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +6 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +21 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +6 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +15 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +440 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +186 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs +227 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +223 -432
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +9 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +12 -4
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +2 -38
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +3 -0
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.10.0.json +1 -1
- package/migrations/0.10.1.json +1 -1
- package/migrations/0.10.2.json +1 -30
- package/migrations/0.11.1.json +0 -23
- package/migrations/0.11.3.json +1 -1
- package/migrations/0.11.4.json +27 -7
- package/migrations/0.12.1.json +215 -0
- package/migrations/0.5.0.json +0 -54
- package/migrations/0.5.1.json +3 -1
- package/migrations/0.7.0.json +0 -11
- package/migrations/0.9.0.json +22 -3
- package/migrations/0.9.1.json +1 -1
- package/package.json +25 -1
- package/styles/_check-box.scss +84 -0
- package/styles/_check-mark.scss +59 -0
- package/styles/_dropdown-overlay.scss +12 -2
- package/styles/_field-group-segment.scss +4 -1
- package/styles/_focus.scss +103 -50
- package/styles/_link.scss +4 -2
- package/styles/_tokens.scss +20 -0
- package/styles/_typography.scss +6 -0
- package/themes/_semantic.scss +7 -8
- package/types/ids-group-ltd-ids-design-system-components-menu.d.ts +3 -0
- package/types/ids-group-ltd-ids-design-system-components-radio-group.d.ts +8 -4
- package/types/ids-group-ltd-ids-design-system-components-split-button.d.ts +3 -2
- package/types/ids-group-ltd-ids-design-system-components-table-columns.d.ts +43 -0
- package/types/ids-group-ltd-ids-design-system-components-table-export.d.ts +48 -0
- package/types/ids-group-ltd-ids-design-system-components-table-resize.d.ts +79 -0
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +179 -155
- package/types/ids-group-ltd-ids-design-system-core.d.ts +12 -4
- package/types/ids-group-ltd-ids-design-system.d.ts +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-otp-input.mjs","sources":["../../../src/lib/components/otp-input/otp-input.component.ts","../../../src/lib/components/otp-input/otp-input.component.html","../../../src/lib/components/otp-input/ids-group-ltd-ids-design-system-components-otp-input.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n model,\n output,\n viewChildren,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport {\n resolveFieldMessage,\n trimmedText,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\n\nexport type OtpMode = 'numeric' | 'alphanumeric';\n\n@Component({\n selector: 'ds-otp-input',\n standalone: true,\n imports: [FieldMessageComponent],\n templateUrl: './otp-input.component.html',\n styleUrl: './otp-input.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => OtpInputComponent),\n multi: true,\n },\n ],\n host: {\n '[attr.data-field-state]': 'controlState()',\n role: 'group',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-describedby]': 'hintId()',\n },\n})\nexport class OtpInputComponent extends DsControlValueAccessor<string> {\n /** Entered code, two-way bound. */\n readonly value = model<string>('');\n /** Number of character cells. */\n readonly length = input<number>(6);\n /** Restricts input and the mobile keyboard to digits-only, or allows letters too. */\n readonly mode = input<OtpMode>('numeric');\n /** Renders each cell as a password dot instead of the typed character. */\n readonly mask = input(false, { transform: booleanAttribute });\n /** Disables all cells and blocks interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Confirmation text, shown when there is no error or warning — and it paints\n * the field's success border. A string like `warning`: the text IS the state. */\n readonly success = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Accessible group label for the cell row. */\n readonly ariaLabel = input<string>('Verification code');\n /** Fires once, with the full code, on the partial → complete transition. */\n readonly completed = output<string>();\n\n private readonly boxes = viewChildren<ElementRef<HTMLInputElement>>('box');\n private wasComplete = false;\n\n protected readonly uid = nextControlId('ds-otp-input');\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n success: this.success,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly controlState = this.fieldMessage.controlState;\n protected readonly invalidResolved = this.fieldMessage.invalid;\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n // Fixed-length, position-preserving view of the current value.\n protected readonly cells = computed<string[]>(() => {\n const value = this.value().slice(0, this.length());\n\n return Array.from({ length: this.length() }, (_, i) => value[i] ?? '');\n });\n\n protected onInput(event: Event, index: number): void {\n const element = event.target as HTMLInputElement;\n const cleaned = this.sanitize(element.value);\n if (!cleaned) {\n this.writeCell(index, '');\n element.value = '';\n\n return;\n }\n // Every branch writes element.value itself: Angular diffs `[value]` against the\n // value IT last wrote, so a split that leaves this cell's signal unchanged skips\n // the DOM write and the browser's own text stays on screen.\n if (cleaned.length === 1) {\n this.writeCell(index, cleaned);\n element.value = cleaned;\n this.focusBox(index + 1);\n } else {\n this.distribute(cleaned, index);\n element.value = cleaned[0];\n }\n }\n\n protected onKeydown(event: KeyboardEvent, index: number): void {\n switch (event.key) {\n case 'Backspace':\n if (!this.cells()[index]) {\n event.preventDefault();\n this.writeCell(index - 1, '');\n this.focusBox(index - 1);\n }\n break;\n case 'ArrowLeft':\n event.preventDefault();\n this.focusBox(index - 1);\n break;\n case 'ArrowRight':\n event.preventDefault();\n this.focusBox(index + 1);\n break;\n default:\n break;\n }\n }\n\n protected onPaste(event: ClipboardEvent, index: number): void {\n const text = event.clipboardData?.getData('text') ?? '';\n const cleaned = this.sanitize(text);\n if (!cleaned) {\n return;\n }\n event.preventDefault();\n this.distribute(cleaned, index);\n }\n\n protected onFocus(event: FocusEvent, index: number): void {\n (event.target as HTMLInputElement).select();\n // Keep entry left-packed: redirect focus to the first empty cell so the user\n // can't type into a gap (the flat value string can't represent middle gaps).\n const firstEmpty = this.firstEmptyIndex();\n if (firstEmpty >= 0 && index > firstEmpty) {\n this.focusBox(firstEmpty);\n }\n }\n\n protected cellLabel(index: number): string {\n const noun = this.mode() === 'numeric' ? 'Digit' : 'Character';\n\n return `${noun} ${index + 1}`;\n }\n\n protected onBlur(): void {\n this.markTouched();\n }\n\n private writeCell(index: number, char: string): void {\n if (index < 0 || index >= this.length()) {\n return;\n }\n const next = this.cells().slice();\n next[index] = char;\n this.commit(next);\n }\n\n private distribute(text: string, startIndex: number): void {\n const next = this.cells().slice();\n let cursor = startIndex;\n for (const char of text) {\n if (cursor >= this.length()) {\n break;\n }\n next[cursor] = char;\n cursor++;\n }\n this.commit(next);\n this.focusBox(Math.min(cursor, this.length() - 1));\n }\n\n private commit(cells: string[]): void {\n const value = cells.join('').slice(0, this.length());\n this.value.set(value);\n // Fire `completed` only on the partial → full transition, not on every\n // edit of an already-complete code (which would re-trigger consumers).\n const complete = value.length === this.length();\n if (complete && !this.wasComplete) {\n this.completed.emit(value);\n }\n this.wasComplete = complete;\n }\n\n private firstEmptyIndex(): number {\n return this.cells().findIndex((cell) => cell === '');\n }\n\n private focusBox(index: number): void {\n const box = this.boxes()[index]?.nativeElement;\n if (box) {\n box.focus();\n box.select();\n }\n }\n\n private sanitize(raw: string): string {\n const pattern = this.mode() === 'numeric' ? /[^0-9]/g : /[^0-9a-zA-Z]/g;\n\n return raw.replace(pattern, '');\n }\n}\n","<div class=\"cells\">\n @for (cell of cells(); track $index; let i = $index) {\n <input\n #box\n class=\"cell\"\n [type]=\"mask() ? 'password' : 'text'\"\n [attr.inputmode]=\"mode() === 'numeric' ? 'numeric' : 'text'\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [attr.aria-label]=\"cellLabel(i)\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [value]=\"cell\"\n [disabled]=\"isDisabled()\"\n (input)=\"onInput($event, i)\"\n (keydown)=\"onKeydown($event, i)\"\n (paste)=\"onPaste($event, i)\"\n (focus)=\"onFocus($event, i)\"\n (blur)=\"onBlur()\"\n />\n }\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n/>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA4CM,MAAO,iBAAkB,SAAQ,sBAA8B,CAAA;;AAE1D,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,MAAM,GAAG,KAAK,CAAS,CAAC,6EAAC;;AAEzB,IAAA,IAAI,GAAG,KAAK,CAAU,SAAS,2EAAC;;IAEhC,IAAI,GAAG,KAAK,CAAC,KAAK,4EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAEpD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACjE;AACkF;IACzE,OAAO,GAAG,KAAK,CAAoC,EAAE,+EAC5D,SAAS,EAAE,WAAW,EAAA,CACtB;;AAEO,IAAA,SAAS,GAAG,KAAK,CAAS,mBAAmB,gFAAC;;IAE9C,SAAS,GAAG,MAAM,EAAU;AAEpB,IAAA,KAAK,GAAG,YAAY,CAA+B,KAAK,4EAAC;IAClE,WAAW,GAAG,KAAK;AAER,IAAA,GAAG,GAAG,aAAa,CAAC,cAAc,CAAC;IACnC,MAAM,GAAG,QAAQ,CAAC,MACnC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,GAAG,CAAA,EAAG,IAAI,CAAC,GAAG,CAAA,KAAA,CAAO,GAAG,IAAI,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,QAAA,EAA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AChD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EAAA,IAAA,EACK;AACJ,wBAAA,yBAAyB,EAAE,gBAAgB;AAC3C,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,mBAAmB,EAAE,aAAa;AAClC,wBAAA,yBAAyB,EAAE,UAAU;AACtC,qBAAA,EAAA,QAAA,EAAA,g2BAAA,EAAA,MAAA,EAAA,CAAA,0oDAAA,CAAA,EAAA;+yBAuBmE,KAAK,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEjE3E;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-otp-input.mjs","sources":["../../../src/lib/components/otp-input/otp-input.component.ts","../../../src/lib/components/otp-input/otp-input.component.html","../../../src/lib/components/otp-input/ids-group-ltd-ids-design-system-components-otp-input.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n model,\n output,\n viewChildren,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport {\n resolveFieldMessage,\n trimmedText,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\n\nexport type OtpMode = 'numeric' | 'alphanumeric';\n\n@Component({\n selector: 'ds-otp-input',\n standalone: true,\n imports: [FieldMessageComponent],\n templateUrl: './otp-input.component.html',\n styleUrl: './otp-input.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => OtpInputComponent),\n multi: true,\n },\n ],\n host: {\n '[attr.data-field-state]': 'controlState()',\n role: 'group',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-describedby]': 'hintId()',\n },\n})\nexport class OtpInputComponent extends DsControlValueAccessor<string> {\n /** Entered code, two-way bound. */\n readonly value = model<string>('');\n /** Number of character cells. */\n readonly length = input<number>(6);\n /** Restricts input and the mobile keyboard to digits-only, or allows letters too. */\n readonly mode = input<OtpMode>('numeric');\n /** Renders each cell as a password dot instead of the typed character. */\n readonly mask = input(false, { transform: booleanAttribute });\n /** Disables all cells and blocks interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Confirmation text, shown when there is no error or warning — and it paints\n * the field's success border. A string like `warning`: the text IS the state. */\n readonly success = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Accessible group label for the cell row. */\n readonly ariaLabel = input<string>('Verification code');\n /** Fires once, with the full code, on the partial → complete transition. */\n readonly completed = output<string>();\n\n private readonly boxes = viewChildren<ElementRef<HTMLInputElement>>('box');\n private wasComplete = false;\n\n protected readonly uid = nextControlId('ds-otp-input');\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n success: this.success,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly controlState = this.fieldMessage.controlState;\n protected readonly invalidResolved = this.fieldMessage.invalid;\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n // Fixed-length, position-preserving view of the current value.\n protected readonly cells = computed<string[]>(() => {\n const value = this.value().slice(0, this.length());\n\n return Array.from({ length: this.length() }, (_, i) => value[i] ?? '');\n });\n\n protected onInput(event: Event, index: number): void {\n const element = event.target as HTMLInputElement;\n const cleaned = this.sanitize(element.value);\n if (!cleaned) {\n this.writeCell(index, '');\n element.value = '';\n\n return;\n }\n // Every branch writes element.value itself: Angular diffs `[value]` against the\n // value IT last wrote, so a split that leaves this cell's signal unchanged skips\n // the DOM write and the browser's own text stays on screen.\n if (cleaned.length === 1) {\n this.writeCell(index, cleaned);\n element.value = cleaned;\n this.focusBox(index + 1);\n } else {\n this.distribute(cleaned, index);\n element.value = cleaned[0];\n }\n }\n\n protected onKeydown(event: KeyboardEvent, index: number): void {\n switch (event.key) {\n case 'Backspace':\n if (!this.cells()[index]) {\n event.preventDefault();\n this.writeCell(index - 1, '');\n this.focusBox(index - 1);\n }\n break;\n case 'ArrowLeft':\n event.preventDefault();\n this.focusBox(index - 1);\n break;\n case 'ArrowRight':\n event.preventDefault();\n this.focusBox(index + 1);\n break;\n default:\n break;\n }\n }\n\n protected onPaste(event: ClipboardEvent, index: number): void {\n const text = event.clipboardData?.getData('text') ?? '';\n const cleaned = this.sanitize(text);\n if (!cleaned) {\n return;\n }\n event.preventDefault();\n this.distribute(cleaned, index);\n }\n\n protected onFocus(event: FocusEvent, index: number): void {\n (event.target as HTMLInputElement).select();\n // Keep entry left-packed: redirect focus to the first empty cell so the user\n // can't type into a gap (the flat value string can't represent middle gaps).\n const firstEmpty = this.firstEmptyIndex();\n if (firstEmpty >= 0 && index > firstEmpty) {\n this.focusBox(firstEmpty);\n }\n }\n\n protected cellLabel(index: number): string {\n const noun = this.mode() === 'numeric' ? 'Digit' : 'Character';\n\n return `${noun} ${index + 1}`;\n }\n\n protected onBlur(): void {\n this.markTouched();\n }\n\n private writeCell(index: number, char: string): void {\n if (index < 0 || index >= this.length()) {\n return;\n }\n const next = this.cells().slice();\n next[index] = char;\n this.commit(next);\n }\n\n private distribute(text: string, startIndex: number): void {\n const next = this.cells().slice();\n let cursor = startIndex;\n for (const char of text) {\n if (cursor >= this.length()) {\n break;\n }\n next[cursor] = char;\n cursor++;\n }\n this.commit(next);\n this.focusBox(Math.min(cursor, this.length() - 1));\n }\n\n private commit(cells: string[]): void {\n const value = cells.join('').slice(0, this.length());\n this.value.set(value);\n // Fire `completed` only on the partial → full transition, not on every\n // edit of an already-complete code (which would re-trigger consumers).\n const complete = value.length === this.length();\n if (complete && !this.wasComplete) {\n this.completed.emit(value);\n }\n this.wasComplete = complete;\n }\n\n private firstEmptyIndex(): number {\n return this.cells().findIndex((cell) => cell === '');\n }\n\n private focusBox(index: number): void {\n const box = this.boxes()[index]?.nativeElement;\n if (box) {\n box.focus();\n box.select();\n }\n }\n\n private sanitize(raw: string): string {\n const pattern = this.mode() === 'numeric' ? /[^0-9]/g : /[^0-9a-zA-Z]/g;\n\n return raw.replace(pattern, '');\n }\n}\n","<div class=\"cells\">\n @for (cell of cells(); track $index; let i = $index) {\n <input\n #box\n class=\"cell\"\n [type]=\"mask() ? 'password' : 'text'\"\n [attr.inputmode]=\"mode() === 'numeric' ? 'numeric' : 'text'\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [attr.aria-label]=\"cellLabel(i)\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [value]=\"cell\"\n [disabled]=\"isDisabled()\"\n (input)=\"onInput($event, i)\"\n (keydown)=\"onKeydown($event, i)\"\n (paste)=\"onPaste($event, i)\"\n (focus)=\"onFocus($event, i)\"\n (blur)=\"onBlur()\" />\n }\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA4CM,MAAO,iBAAkB,SAAQ,sBAA8B,CAAA;;AAE1D,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,MAAM,GAAG,KAAK,CAAS,CAAC,6EAAC;;AAEzB,IAAA,IAAI,GAAG,KAAK,CAAU,SAAS,2EAAC;;IAEhC,IAAI,GAAG,KAAK,CAAC,KAAK,4EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAEpD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACj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A,QAAA,EAAA,EAAA,EAAA,QAAA,ECpCH,01BA0BA,qnFDAY,qBAAqB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,WAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAkBpB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBArB7B,SAAS;+BACE,cAAc,EAAA,UAAA,EACZ,IAAI,EAAA,OAAA,EACP,CAAC,qBAAqB,CAAC,EAAA,aAAA,EAGjB,iBAAiB,CAAC,QAAQ,EAAA,SAAA,EAC9B;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,uBAAuB,CAAC;AAChD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EAAA,IAAA,EACK;AACJ,wBAAA,yBAAyB,EAAE,gBAAgB;AAC3C,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,mBAAmB,EAAE,aAAa;AAClC,wBAAA,yBAAyB,EAAE,UAAU;AACtC,qBAAA,EAAA,QAAA,EAAA,01BAAA,EAAA,MAAA,EAAA,CAAA,6jFAAA,CAAA,EAAA;+yBAuBmE,KAAK,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEjE3E;;AAEG;;;;"}
|
|
@@ -70,11 +70,11 @@ class PaginationComponent {
|
|
|
70
70
|
this.currentPage.set(1);
|
|
71
71
|
}
|
|
72
72
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
73
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: PaginationComponent, isStandalone: true, selector: "ds-pagination", inputs: { total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: true, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, showPageSize: { classPropertyName: "showPageSize", publicName: "showPageSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageSize: "pageSizeChange", currentPage: "currentPageChange" }, ngImport: i0, template: "<nav\n class=\"pagination\"\n aria-label=\"Pagination\"
|
|
73
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: PaginationComponent, isStandalone: true, selector: "ds-pagination", inputs: { total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: true, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, showPageSize: { classPropertyName: "showPageSize", publicName: "showPageSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageSize: "pageSizeChange", currentPage: "currentPageChange" }, ngImport: i0, template: "<nav\n class=\"pagination\"\n aria-label=\"Pagination\">\n @if (showLabel()) {\n <span class=\"label\">\n {{ rangeLabel() }}\n </span>\n }\n\n <button\n class=\"pagination-button\"\n type=\"button\"\n aria-label=\"Previous page\"\n [disabled]=\"currentPage() === 1\"\n (click)=\"goTo(currentPage() - 1)\">\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\">\n </ds-icon>\n </button>\n\n @for (item of pageItems(); track $index) {\n @if (item === 'ellipsis') {\n <span\n class=\"ellipsis\"\n aria-hidden=\"true\">\n \u2026\n </span>\n } @else {\n <button\n class=\"pagination-button\"\n type=\"button\"\n [class.active]=\"item === currentPage()\"\n [attr.aria-label]=\"'Page ' + item\"\n [attr.aria-current]=\"item === currentPage() ? 'page' : null\"\n (click)=\"goTo(item)\">\n {{ item }}\n </button>\n }\n }\n\n <button\n class=\"pagination-button\"\n type=\"button\"\n aria-label=\"Next page\"\n [disabled]=\"currentPage() === totalPages()\"\n (click)=\"goTo(currentPage() + 1)\">\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\">\n </ds-icon>\n </button>\n\n @if (showPageSize()) {\n <!-- reserveMessage pinned off: a page-size dropdown shows neither hint nor\n error, so there is nothing to reserve, and inheriting the app-level\n default would push the control off the page buttons' baseline. -->\n <ds-select\n class=\"size\"\n ariaLabel=\"Rows per page\"\n size=\"sm\"\n [reserveMessage]=\"false\"\n [options]=\"sizeOptions()\"\n [value]=\"pageSizeStr()\"\n (valueChange)=\"onSizeChange($event)\">\n </ds-select>\n }\n</nav>\n", styles: [":where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_pagination-btn-bg-color: var(--ds-pagination-btn-bg-color, var(--surface-default));--_pagination-btn-bg-color-hover: var(--ds-pagination-btn-bg-color-hover, var(--surface-secondary));--_pagination-btn-label-color: var(--ds-pagination-btn-label-color, var(--text-secondary));--_pagination-btn-label-color-hover: var(--ds-pagination-btn-label-color-hover, var(--text-primary));--_pagination-btn-border: var(--ds-pagination-btn-border, var(--border-default));--_pagination-active-bg-color: var(--ds-pagination-active-bg-color, var(--accent));--_pagination-active-bg-color-hover: var(--ds-pagination-active-bg-color-hover, var(--accent-hover));--_pagination-active-label-color: var(--ds-pagination-active-label-color, var(--accent-on));--_pagination-radius: var(--ds-pagination-radius, var(--ds-radius-control));--_pagination-label-font-size: var(--ds-pagination-label-font-size, var(--font-size-s));--_pagination-label-weight: var(--ds-pagination-label-weight, var(--font-weight-regular));--_pagination-label-color: var(--ds-pagination-label-color, var(--text-secondary));display:inline-flex}.pagination{display:inline-flex;gap:var(--space-1);align-items:center;flex-wrap:wrap}.pagination .label{font:var(--_pagination-label-weight) var(--_pagination-label-font-size)/var(--line-height-flat) var(--font-sans);color:var(--_pagination-label-color);margin-right:var(--space-2)}.pagination .pagination-button{min-width:var(--hit-min);height:var(--hit-min);padding:0 var(--space-2);border:var(--border-width-default) solid var(--_pagination-btn-border);background-color:var(--_pagination-btn-bg-color);font:var(--font-weight-semibold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_pagination-btn-label-color);border-radius:var(--_pagination-radius);cursor:pointer;display:inline-grid;place-items:center;transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.pagination .pagination-button:hover:not([disabled],.active){background-color:var(--_pagination-btn-bg-color-hover);color:var(--_pagination-btn-label-color-hover)}.pagination .pagination-button.active{background-color:var(--_pagination-active-bg-color);color:var(--_pagination-active-label-color);border-color:var(--_pagination-active-bg-color)}.pagination .pagination-button.active:hover:not([disabled]){background-color:var(--_pagination-active-bg-color-hover);border-color:var(--_pagination-active-bg-color-hover)}.pagination .pagination-button[disabled]{color:var(--text-disabled);cursor:not-allowed}.pagination .pagination-button:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.pagination .pagination-button:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.pagination .ellipsis{padding:0 var(--space-2);color:var(--text-tertiary)}.pagination .size{margin-left:var(--space-2);width:auto;flex:0 0 auto}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: SelectComponent, selector: "ds-select", inputs: ["value", "options", "width", "placeholder", "size", "label", "disabled", "loading", "scrollActiveIntoView", "readOnly", "readonly", "success", "required", "optional", "name", "ariaLabel", "clearable"], outputs: ["valueChange", "opened", "closed"] }] });
|
|
74
74
|
}
|
|
75
75
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
76
76
|
type: Component,
|
|
77
|
-
args: [{ selector: 'ds-pagination', standalone: true, imports: [FormsModule, IconComponent, SelectComponent], encapsulation: ViewEncapsulation.Emulated, template: "<nav\n class=\"pagination\"\n aria-label=\"Pagination\"
|
|
77
|
+
args: [{ selector: 'ds-pagination', standalone: true, imports: [FormsModule, IconComponent, SelectComponent], encapsulation: ViewEncapsulation.Emulated, template: "<nav\n class=\"pagination\"\n aria-label=\"Pagination\">\n @if (showLabel()) {\n <span class=\"label\">\n {{ rangeLabel() }}\n </span>\n }\n\n <button\n class=\"pagination-button\"\n type=\"button\"\n aria-label=\"Previous page\"\n [disabled]=\"currentPage() === 1\"\n (click)=\"goTo(currentPage() - 1)\">\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\">\n </ds-icon>\n </button>\n\n @for (item of pageItems(); track $index) {\n @if (item === 'ellipsis') {\n <span\n class=\"ellipsis\"\n aria-hidden=\"true\">\n \u2026\n </span>\n } @else {\n <button\n class=\"pagination-button\"\n type=\"button\"\n [class.active]=\"item === currentPage()\"\n [attr.aria-label]=\"'Page ' + item\"\n [attr.aria-current]=\"item === currentPage() ? 'page' : null\"\n (click)=\"goTo(item)\">\n {{ item }}\n </button>\n }\n }\n\n <button\n class=\"pagination-button\"\n type=\"button\"\n aria-label=\"Next page\"\n [disabled]=\"currentPage() === totalPages()\"\n (click)=\"goTo(currentPage() + 1)\">\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\">\n </ds-icon>\n </button>\n\n @if (showPageSize()) {\n <!-- reserveMessage pinned off: a page-size dropdown shows neither hint nor\n error, so there is nothing to reserve, and inheriting the app-level\n default would push the control off the page buttons' baseline. -->\n <ds-select\n class=\"size\"\n ariaLabel=\"Rows per page\"\n size=\"sm\"\n [reserveMessage]=\"false\"\n [options]=\"sizeOptions()\"\n [value]=\"pageSizeStr()\"\n (valueChange)=\"onSizeChange($event)\">\n </ds-select>\n }\n</nav>\n", styles: [":where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_pagination-btn-bg-color: var(--ds-pagination-btn-bg-color, var(--surface-default));--_pagination-btn-bg-color-hover: var(--ds-pagination-btn-bg-color-hover, var(--surface-secondary));--_pagination-btn-label-color: var(--ds-pagination-btn-label-color, var(--text-secondary));--_pagination-btn-label-color-hover: var(--ds-pagination-btn-label-color-hover, var(--text-primary));--_pagination-btn-border: var(--ds-pagination-btn-border, var(--border-default));--_pagination-active-bg-color: var(--ds-pagination-active-bg-color, var(--accent));--_pagination-active-bg-color-hover: var(--ds-pagination-active-bg-color-hover, var(--accent-hover));--_pagination-active-label-color: var(--ds-pagination-active-label-color, var(--accent-on));--_pagination-radius: var(--ds-pagination-radius, var(--ds-radius-control));--_pagination-label-font-size: var(--ds-pagination-label-font-size, var(--font-size-s));--_pagination-label-weight: var(--ds-pagination-label-weight, var(--font-weight-regular));--_pagination-label-color: var(--ds-pagination-label-color, var(--text-secondary));display:inline-flex}.pagination{display:inline-flex;gap:var(--space-1);align-items:center;flex-wrap:wrap}.pagination .label{font:var(--_pagination-label-weight) var(--_pagination-label-font-size)/var(--line-height-flat) var(--font-sans);color:var(--_pagination-label-color);margin-right:var(--space-2)}.pagination .pagination-button{min-width:var(--hit-min);height:var(--hit-min);padding:0 var(--space-2);border:var(--border-width-default) solid var(--_pagination-btn-border);background-color:var(--_pagination-btn-bg-color);font:var(--font-weight-semibold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_pagination-btn-label-color);border-radius:var(--_pagination-radius);cursor:pointer;display:inline-grid;place-items:center;transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.pagination .pagination-button:hover:not([disabled],.active){background-color:var(--_pagination-btn-bg-color-hover);color:var(--_pagination-btn-label-color-hover)}.pagination .pagination-button.active{background-color:var(--_pagination-active-bg-color);color:var(--_pagination-active-label-color);border-color:var(--_pagination-active-bg-color)}.pagination .pagination-button.active:hover:not([disabled]){background-color:var(--_pagination-active-bg-color-hover);border-color:var(--_pagination-active-bg-color-hover)}.pagination .pagination-button[disabled]{color:var(--text-disabled);cursor:not-allowed}.pagination .pagination-button:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.pagination .pagination-button:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.pagination .ellipsis{padding:0 var(--space-2);color:var(--text-tertiary)}.pagination .size{margin-left:var(--space-2);width:auto;flex:0 0 auto}\n"] }]
|
|
78
78
|
}], propDecorators: { total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: true }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }, { type: i0.Output, args: ["currentPageChange"] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", required: false }] }], showPageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPageSize", required: false }] }] } });
|
|
79
79
|
|
|
80
80
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-pagination.mjs","sources":["../../../src/lib/components/pagination/pagination.component.ts","../../../src/lib/components/pagination/pagination.component.html","../../../src/lib/components/pagination/ids-group-ltd-ids-design-system-components-pagination.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n model,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { SelectComponent } from '@ids-group-ltd/ids-design-system/components/select';\n\n@Component({\n selector: 'ds-pagination',\n standalone: true,\n imports: [FormsModule, IconComponent, SelectComponent],\n templateUrl: './pagination.component.html',\n styleUrl: './pagination.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class PaginationComponent {\n /** Total item count, used to compute the page count. */\n readonly total = input.required<number>();\n /** Items per page, two-way bound. */\n readonly pageSize = model<number>(10);\n /** 1-based active page, two-way bound; a page change (incl. the reset to 1\n * after a size change) emits via the implicit `currentPageChange`. */\n readonly currentPage = model<number>(1);\n /** Preset choices offered in the page-size dropdown. */\n readonly pageSizeOptions = input<number[]>([10, 25, 50, 100]);\n /** Shows the \"Showing X–Y of Z\" range label. */\n readonly showLabel = input(true, { transform: booleanAttribute });\n /** Shows the rows-per-page dropdown. Turn it off for a screen with a fixed\n * page size — otherwise the control offers a choice the host won't honour. */\n readonly showPageSize = input(true, { transform: booleanAttribute });\n\n protected readonly totalPages = computed(() =>\n Math.max(1, Math.ceil(this.total() / this.pageSize())),\n );\n\n protected readonly pageItems = computed<(number | 'ellipsis')[]>(() => {\n const total = this.totalPages();\n const current = this.currentPage();\n if (total <= 7) {\n return Array.from({ length: total }, (_, i) => i + 1);\n }\n const items: (number | 'ellipsis')[] = [1];\n if (current > 3) {\n items.push('ellipsis');\n }\n const start = Math.max(2, current - 1);\n const end = Math.min(total - 1, current + 1);\n for (let i = start; i <= end; i++) {\n items.push(i);\n }\n if (current < total - 2) {\n items.push('ellipsis');\n }\n items.push(total);\n\n return items;\n });\n\n protected readonly rangeLabel = computed(() => {\n const start = (this.currentPage() - 1) * this.pageSize() + 1;\n const end = Math.min(this.currentPage() * this.pageSize(), this.total());\n\n return `Showing ${start}–${end} of ${this.total()}`;\n });\n\n protected readonly sizeOptions = computed(() => {\n const presets = this.pageSizeOptions();\n const current = this.pageSize();\n const merged = presets.includes(current)\n ? presets\n : [current, ...presets].sort((a, b) => a - b);\n\n return merged.map((size) => ({\n label: `${size} per page`,\n value: String(size),\n }));\n });\n\n protected readonly pageSizeStr = computed(() => String(this.pageSize()));\n\n protected goTo(page: number): void {\n if (page < 1 || page > this.totalPages() || page === this.currentPage()) {\n return;\n }\n this.currentPage.set(page);\n }\n\n protected onSizeChange(value: string): void {\n const next = Number(value);\n this.pageSize.set(next);\n this.currentPage.set(1);\n }\n}\n","<nav\n class=\"pagination\"\n aria-label=\"Pagination\"
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-pagination.mjs","sources":["../../../src/lib/components/pagination/pagination.component.ts","../../../src/lib/components/pagination/pagination.component.html","../../../src/lib/components/pagination/ids-group-ltd-ids-design-system-components-pagination.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n model,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { SelectComponent } from '@ids-group-ltd/ids-design-system/components/select';\n\n@Component({\n selector: 'ds-pagination',\n standalone: true,\n imports: [FormsModule, IconComponent, SelectComponent],\n templateUrl: './pagination.component.html',\n styleUrl: './pagination.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class PaginationComponent {\n /** Total item count, used to compute the page count. */\n readonly total = input.required<number>();\n /** Items per page, two-way bound. */\n readonly pageSize = model<number>(10);\n /** 1-based active page, two-way bound; a page change (incl. the reset to 1\n * after a size change) emits via the implicit `currentPageChange`. */\n readonly currentPage = model<number>(1);\n /** Preset choices offered in the page-size dropdown. */\n readonly pageSizeOptions = input<number[]>([10, 25, 50, 100]);\n /** Shows the \"Showing X–Y of Z\" range label. */\n readonly showLabel = input(true, { transform: booleanAttribute });\n /** Shows the rows-per-page dropdown. Turn it off for a screen with a fixed\n * page size — otherwise the control offers a choice the host won't honour. */\n readonly showPageSize = input(true, { transform: booleanAttribute });\n\n protected readonly totalPages = computed(() =>\n Math.max(1, Math.ceil(this.total() / this.pageSize())),\n );\n\n protected readonly pageItems = computed<(number | 'ellipsis')[]>(() => {\n const total = this.totalPages();\n const current = this.currentPage();\n if (total <= 7) {\n return Array.from({ length: total }, (_, i) => i + 1);\n }\n const items: (number | 'ellipsis')[] = [1];\n if (current > 3) {\n items.push('ellipsis');\n }\n const start = Math.max(2, current - 1);\n const end = Math.min(total - 1, current + 1);\n for (let i = start; i <= end; i++) {\n items.push(i);\n }\n if (current < total - 2) {\n items.push('ellipsis');\n }\n items.push(total);\n\n return items;\n });\n\n protected readonly rangeLabel = computed(() => {\n const start = (this.currentPage() - 1) * this.pageSize() + 1;\n const end = Math.min(this.currentPage() * this.pageSize(), this.total());\n\n return `Showing ${start}–${end} of ${this.total()}`;\n });\n\n protected readonly sizeOptions = computed(() => {\n const presets = this.pageSizeOptions();\n const current = this.pageSize();\n const merged = presets.includes(current)\n ? presets\n : [current, ...presets].sort((a, b) => a - b);\n\n return merged.map((size) => ({\n label: `${size} per page`,\n value: String(size),\n }));\n });\n\n protected readonly pageSizeStr = computed(() => String(this.pageSize()));\n\n protected goTo(page: number): void {\n if (page < 1 || page > this.totalPages() || page === this.currentPage()) {\n return;\n }\n this.currentPage.set(page);\n }\n\n protected onSizeChange(value: string): void {\n const next = Number(value);\n this.pageSize.set(next);\n this.currentPage.set(1);\n }\n}\n","<nav\n class=\"pagination\"\n aria-label=\"Pagination\">\n @if (showLabel()) {\n <span class=\"label\">\n {{ rangeLabel() }}\n </span>\n }\n\n <button\n class=\"pagination-button\"\n type=\"button\"\n aria-label=\"Previous page\"\n [disabled]=\"currentPage() === 1\"\n (click)=\"goTo(currentPage() - 1)\">\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\">\n </ds-icon>\n </button>\n\n @for (item of pageItems(); track $index) {\n @if (item === 'ellipsis') {\n <span\n class=\"ellipsis\"\n aria-hidden=\"true\">\n …\n </span>\n } @else {\n <button\n class=\"pagination-button\"\n type=\"button\"\n [class.active]=\"item === currentPage()\"\n [attr.aria-label]=\"'Page ' + item\"\n [attr.aria-current]=\"item === currentPage() ? 'page' : null\"\n (click)=\"goTo(item)\">\n {{ item }}\n </button>\n }\n }\n\n <button\n class=\"pagination-button\"\n type=\"button\"\n aria-label=\"Next page\"\n [disabled]=\"currentPage() === totalPages()\"\n (click)=\"goTo(currentPage() + 1)\">\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\">\n </ds-icon>\n </button>\n\n @if (showPageSize()) {\n <!-- reserveMessage pinned off: a page-size dropdown shows neither hint nor\n error, so there is nothing to reserve, and inheriting the app-level\n default would push the control off the page buttons' baseline. -->\n <ds-select\n class=\"size\"\n ariaLabel=\"Rows per page\"\n size=\"sm\"\n [reserveMessage]=\"false\"\n [options]=\"sizeOptions()\"\n [value]=\"pageSizeStr()\"\n (valueChange)=\"onSizeChange($event)\">\n </ds-select>\n }\n</nav>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAoBa,mBAAmB,CAAA;;AAErB,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;;AAEhC,IAAA,QAAQ,GAAG,KAAK,CAAS,EAAE,+EAAC;AACrC;AACuE;AAC9D,IAAA,WAAW,GAAG,KAAK,CAAS,CAAC,kFAAC;;AAE9B,IAAA,eAAe,GAAG,KAAK,CAAW,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,sFAAC;;IAEpD,SAAS,GAAG,KAAK,CAAC,IAAI,iFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACjE;AAC+E;IACtE,YAAY,GAAG,KAAK,CAAC,IAAI,oFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEjD,IAAA,UAAU,GAAG,QAAQ,CAAC,MACvC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CACvD;AAEkB,IAAA,SAAS,GAAG,QAAQ,CAA0B,MAAK;AACpE,QAAA,MAAM,KAA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value(), this.rules()), ...(ngDevMode ? [{ debugName: "allMet" }] : /* istanbul ignore next */ []));
|
|
82
82
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PasswordRulesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
83
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: PasswordRulesComponent, isStandalone: true, selector: "ds-password-rules", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, rules: { classPropertyName: "rules", publicName: "rules", isSignal: true, isRequired: false, transformFunction: null }, showUnmet: { classPropertyName: "showUnmet", publicName: "showUnmet", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, listId: { classPropertyName: "listId", publicName: "listId", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!-- role=\"list\" on the <ul> itself: `list-style: none` plus a flex/grid display\n strips list semantics in WebKit, so the native role cannot be relied on.\n aria-live=\"polite\" so a rule turning met is announced as the reader types,\n without interrupting them mid-word. -->\n<ul\n role=\"list\"\n aria-live=\"polite\"\n [id]=\"listId()\"\n [class]=\"'rules cols-' + columns()\"
|
|
83
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: PasswordRulesComponent, isStandalone: true, selector: "ds-password-rules", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, rules: { classPropertyName: "rules", publicName: "rules", isSignal: true, isRequired: false, transformFunction: null }, showUnmet: { classPropertyName: "showUnmet", publicName: "showUnmet", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, listId: { classPropertyName: "listId", publicName: "listId", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!-- role=\"list\" on the <ul> itself: `list-style: none` plus a flex/grid display\n strips list semantics in WebKit, so the native role cannot be relied on.\n aria-live=\"polite\" so a rule turning met is announced as the reader types,\n without interrupting them mid-word. -->\n<ul\n role=\"list\"\n aria-live=\"polite\"\n [id]=\"listId()\"\n [class]=\"'rules cols-' + columns()\">\n @for (row of rows(); track row.label) {\n <li class=\"rule {{ row.state }}\">\n <ds-icon\n [name]=\"row.icon\"\n [size]=\"14\" />\n\n <span class=\"label\">\n {{ row.label }}\n </span>\n\n <span class=\"visually-hidden\">\n \u2014 {{ row.announced }}\n </span>\n </li>\n }\n</ul>\n", styles: [":host{--_password-rules-gap: var(--ds-password-rules-gap, var(--space-1));--_password-rules-font-size: var(--ds-password-rules-font-size, var(--font-size-xs));--_password-rules-pending-color: var(--ds-password-rules-pending-color, var(--text-tertiary));--_password-rules-met-color: var(--ds-password-rules-met-color, var(--success-text));--_password-rules-failed-color: var(--ds-password-rules-failed-color, var(--error-text));display:block;position:relative}.rules{display:grid;gap:var(--_password-rules-gap);margin:0;padding:0;list-style:none}.cols-2{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--space-4)}.rule{display:flex;align-items:center;gap:var(--space-2);font:var(--font-weight-regular) var(--_password-rules-font-size)/var(--line-height-base) var(--font-sans);color:var(--_password-rules-pending-color);transition:color var(--duration-base) var(--ease-standard)}.met{color:var(--_password-rules-met-color)}.failed{color:var(--_password-rules-failed-color)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
84
84
|
}
|
|
85
85
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PasswordRulesComponent, decorators: [{
|
|
86
86
|
type: Component,
|
|
87
|
-
args: [{ selector: 'ds-password-rules', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- role=\"list\" on the <ul> itself: `list-style: none` plus a flex/grid display\n strips list semantics in WebKit, so the native role cannot be relied on.\n aria-live=\"polite\" so a rule turning met is announced as the reader types,\n without interrupting them mid-word. -->\n<ul\n role=\"list\"\n aria-live=\"polite\"\n [id]=\"listId()\"\n [class]=\"'rules cols-' + columns()\"
|
|
87
|
+
args: [{ selector: 'ds-password-rules', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- role=\"list\" on the <ul> itself: `list-style: none` plus a flex/grid display\n strips list semantics in WebKit, so the native role cannot be relied on.\n aria-live=\"polite\" so a rule turning met is announced as the reader types,\n without interrupting them mid-word. -->\n<ul\n role=\"list\"\n aria-live=\"polite\"\n [id]=\"listId()\"\n [class]=\"'rules cols-' + columns()\">\n @for (row of rows(); track row.label) {\n <li class=\"rule {{ row.state }}\">\n <ds-icon\n [name]=\"row.icon\"\n [size]=\"14\" />\n\n <span class=\"label\">\n {{ row.label }}\n </span>\n\n <span class=\"visually-hidden\">\n \u2014 {{ row.announced }}\n </span>\n </li>\n }\n</ul>\n", styles: [":host{--_password-rules-gap: var(--ds-password-rules-gap, var(--space-1));--_password-rules-font-size: var(--ds-password-rules-font-size, var(--font-size-xs));--_password-rules-pending-color: var(--ds-password-rules-pending-color, var(--text-tertiary));--_password-rules-met-color: var(--ds-password-rules-met-color, var(--success-text));--_password-rules-failed-color: var(--ds-password-rules-failed-color, var(--error-text));display:block;position:relative}.rules{display:grid;gap:var(--_password-rules-gap);margin:0;padding:0;list-style:none}.cols-2{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--space-4)}.rule{display:flex;align-items:center;gap:var(--space-2);font:var(--font-weight-regular) var(--_password-rules-font-size)/var(--line-height-base) var(--font-sans);color:var(--_password-rules-pending-color);transition:color var(--duration-base) var(--ease-standard)}.met{color:var(--_password-rules-met-color)}.failed{color:var(--_password-rules-failed-color)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n"] }]
|
|
88
88
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], rules: [{ type: i0.Input, args: [{ isSignal: true, alias: "rules", required: false }] }], showUnmet: [{ type: i0.Input, args: [{ isSignal: true, alias: "showUnmet", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], listId: [{ type: i0.Input, args: [{ isSignal: true, alias: "listId", required: false }] }] } });
|
|
89
89
|
|
|
90
90
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-password-rules.mjs","sources":["../../../src/lib/components/password-rules/password-rules.component.ts","../../../src/lib/components/password-rules/password-rules.component.html","../../../src/lib/components/password-rules/ids-group-ltd-ids-design-system-components-password-rules.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport type {\n DsPasswordRule,\n DsPasswordRuleState,\n} from './password-rules.types';\n\ninterface RuleRow {\n readonly label: string;\n readonly state: DsPasswordRuleState;\n readonly icon: IconName;\n readonly announced: string;\n}\n\n// Screen-reader wording per state. The glyph is a decorative SVG with no\n// accessible name, so without these a screen reader hears the rule text and\n// nothing about whether it passed — the state would be conveyed by colour and\n// shape only.\nconst ANNOUNCED: Record<DsPasswordRuleState, string> = {\n pending: 'not yet met',\n met: 'met',\n failed: 'not met',\n};\n\n/**\n * Passes when every rule does. Exported separately so a form can gate its submit\n * from a validator without reaching for the component instance.\n */\nexport function passwordRulesMet(\n value: string,\n rules: readonly DsPasswordRule[],\n): boolean {\n return rules.length > 0 && rules.every((rule) => rule.test(value));\n}\n\n/**\n * Live checklist under a \"new password\" field.\n *\n * The consumer keeps the POLICY — each rule carries its own `test`, which has to\n * mirror the server, or the checklist is a lie — and this owns the rendering: the\n * tri-state glyph, the met and failed colours, the type scale. One consumer had\n * written it twice and the copies had already drifted (different labels for the\n * same rule, a different order, different state classes), which is why it is here.\n *\n * ```html\n * <ds-input\n * type=\"password\"\n * [attr.aria-describedby]=\"rules.listId\"\n * [(value)]=\"password\"\n * />\n * <ds-password-rules\n * #rules\n * [value]=\"password()\"\n * [rules]=\"passwordRules\"\n * [showUnmet]=\"submitted()\"\n * />\n * ```\n */\n@Component({\n selector: 'ds-password-rules',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './password-rules.component.html',\n styleUrl: './password-rules.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PasswordRulesComponent {\n /** The password being typed. */\n readonly value = input<string>('');\n /** The rule set, in the order it should read. */\n readonly rules = input<readonly DsPasswordRule[]>([]);\n /**\n * Whether an unmet rule may read as FAILED. Bind it to \"the user has tried to\n * submit\": before that an unmet rule is merely pending, because marking a\n * half-typed password with errors scolds someone who is still typing.\n */\n readonly showUnmet = input(false, { transform: booleanAttribute });\n /** Lay the rows out in two columns — for a checklist beside a wide form. */\n readonly columns = input<1 | 2>(1);\n\n /**\n * Id put on the rule list, for the field's `aria-describedby`. Defaults to a\n * generated one; set it explicitly and both sides can name the same string,\n * which avoids threading a template ref between two siblings.\n */\n readonly listId = input<string>(nextControlId('ds-password-rules'));\n\n protected readonly rows = computed<readonly RuleRow[]>(() => {\n const value = this.value();\n const showUnmet = this.showUnmet();\n\n return this.rules().map((rule) => {\n const met = rule.test(value);\n const state: DsPasswordRuleState = met\n ? 'met'\n : showUnmet\n ? 'failed'\n : 'pending';\n const icon: IconName =\n state === 'met' ? 'check' : state === 'failed' ? 'x' : 'circle';\n\n return { label: rule.label, state, icon, announced: ANNOUNCED[state] };\n });\n });\n\n /** How many rules pass — for a host that wants to gate its own submit. */\n readonly metCount = computed(\n () => this.rows().filter((row) => row.state === 'met').length,\n );\n\n /** True when every rule passes. */\n readonly allMet = computed(() =>\n passwordRulesMet(this.value(), this.rules()),\n );\n}\n","<!-- role=\"list\" on the <ul> itself: `list-style: none` plus a flex/grid display\n strips list semantics in WebKit, so the native role cannot be relied on.\n aria-live=\"polite\" so a rule turning met is announced as the reader types,\n without interrupting them mid-word. -->\n<ul\n role=\"list\"\n aria-live=\"polite\"\n [id]=\"listId()\"\n [class]=\"'rules cols-' + columns()\"
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-password-rules.mjs","sources":["../../../src/lib/components/password-rules/password-rules.component.ts","../../../src/lib/components/password-rules/password-rules.component.html","../../../src/lib/components/password-rules/ids-group-ltd-ids-design-system-components-password-rules.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport type {\n DsPasswordRule,\n DsPasswordRuleState,\n} from './password-rules.types';\n\ninterface RuleRow {\n readonly label: string;\n readonly state: DsPasswordRuleState;\n readonly icon: IconName;\n readonly announced: string;\n}\n\n// Screen-reader wording per state. The glyph is a decorative SVG with no\n// accessible name, so without these a screen reader hears the rule text and\n// nothing about whether it passed — the state would be conveyed by colour and\n// shape only.\nconst ANNOUNCED: Record<DsPasswordRuleState, string> = {\n pending: 'not yet met',\n met: 'met',\n failed: 'not met',\n};\n\n/**\n * Passes when every rule does. Exported separately so a form can gate its submit\n * from a validator without reaching for the component instance.\n */\nexport function passwordRulesMet(\n value: string,\n rules: readonly DsPasswordRule[],\n): boolean {\n return rules.length > 0 && rules.every((rule) => rule.test(value));\n}\n\n/**\n * Live checklist under a \"new password\" field.\n *\n * The consumer keeps the POLICY — each rule carries its own `test`, which has to\n * mirror the server, or the checklist is a lie — and this owns the rendering: the\n * tri-state glyph, the met and failed colours, the type scale. One consumer had\n * written it twice and the copies had already drifted (different labels for the\n * same rule, a different order, different state classes), which is why it is here.\n *\n * ```html\n * <ds-input\n * type=\"password\"\n * [attr.aria-describedby]=\"rules.listId\"\n * [(value)]=\"password\"\n * />\n * <ds-password-rules\n * #rules\n * [value]=\"password()\"\n * [rules]=\"passwordRules\"\n * [showUnmet]=\"submitted()\"\n * />\n * ```\n */\n@Component({\n selector: 'ds-password-rules',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './password-rules.component.html',\n styleUrl: './password-rules.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PasswordRulesComponent {\n /** The password being typed. */\n readonly value = input<string>('');\n /** The rule set, in the order it should read. */\n readonly rules = input<readonly DsPasswordRule[]>([]);\n /**\n * Whether an unmet rule may read as FAILED. Bind it to \"the user has tried to\n * submit\": before that an unmet rule is merely pending, because marking a\n * half-typed password with errors scolds someone who is still typing.\n */\n readonly showUnmet = input(false, { transform: booleanAttribute });\n /** Lay the rows out in two columns — for a checklist beside a wide form. */\n readonly columns = input<1 | 2>(1);\n\n /**\n * Id put on the rule list, for the field's `aria-describedby`. Defaults to a\n * generated one; set it explicitly and both sides can name the same string,\n * which avoids threading a template ref between two siblings.\n */\n readonly listId = input<string>(nextControlId('ds-password-rules'));\n\n protected readonly rows = computed<readonly RuleRow[]>(() => {\n const value = this.value();\n const showUnmet = this.showUnmet();\n\n return this.rules().map((rule) => {\n const met = rule.test(value);\n const state: DsPasswordRuleState = met\n ? 'met'\n : showUnmet\n ? 'failed'\n : 'pending';\n const icon: IconName =\n state === 'met' ? 'check' : state === 'failed' ? 'x' : 'circle';\n\n return { label: rule.label, state, icon, announced: ANNOUNCED[state] };\n });\n });\n\n /** How many rules pass — for a host that wants to gate its own submit. */\n readonly metCount = computed(\n () => this.rows().filter((row) => row.state === 'met').length,\n );\n\n /** True when every rule passes. */\n readonly allMet = computed(() =>\n passwordRulesMet(this.value(), this.rules()),\n );\n}\n","<!-- role=\"list\" on the <ul> itself: `list-style: none` plus a flex/grid display\n strips list semantics in WebKit, so the native role cannot be relied on.\n aria-live=\"polite\" so a rule turning met is announced as the reader types,\n without interrupting them mid-word. -->\n<ul\n role=\"list\"\n aria-live=\"polite\"\n [id]=\"listId()\"\n [class]=\"'rules cols-' + columns()\">\n @for (row of rows(); track row.label) {\n <li class=\"rule {{ row.state }}\">\n <ds-icon\n [name]=\"row.icon\"\n [size]=\"14\" />\n\n <span class=\"label\">\n {{ row.label }}\n </span>\n\n <span class=\"visually-hidden\">\n — {{ row.announced }}\n </span>\n </li>\n }\n</ul>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAuBA;AACA;AACA;AACA;AACA,MAAM,SAAS,GAAwC;AACrD,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,MAAM,EAAE,SAAS;CAClB;AAED;;;AAGG;AACG,SAAU,gBAAgB,CAC9B,KAAa,EACb,KAAgC,EAAA;IAEhC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACpE;AAEA;;;;;;;;;;;;;;;;;;;;;;AAsBG;MAUU,sBAAsB,CAAA;;AAExB,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,KAAK,GAAG,KAAK,CAA4B,EAAE,4EAAC;AACrD;;;;AAIG;IACM,SAAS,GAAG,KAAK,CAAC,KAAK,iFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAEzD,IAAA,OAAO,GAAG,KAAK,CAAQ,CAAC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,mBAAmB,EAAA,UAAA,EACjB,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,EAAA,aAAA,EAGT,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,0uBAAA,EAAA,MAAA,EAAA,CAAA,2mCAAA,CAAA,EAAA;;;AE1EjD;;AAEG;;;;"}
|
|
@@ -132,7 +132,7 @@ class PopoverComponent {
|
|
|
132
132
|
provide: DsOverlayCloseRef,
|
|
133
133
|
useExisting: forwardRef(() => PopoverComponent),
|
|
134
134
|
},
|
|
135
|
-
], viewQueries: [{ propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "panelTrap", first: true, predicate: CdkTrapFocus, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "<!-- Projected content is captured ONCE here and stamped into whichever render\n site is active \u2014 duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\"
|
|
135
|
+
], viewQueries: [{ propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "panelTrap", first: true, predicate: CdkTrapFocus, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "<!-- Projected content is captured ONCE here and stamped into whichever render\n site is active \u2014 duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay));--_popover-border-color: var(--ds-popover-border-color, var(--border-default));--_popover-radius: var(--ds-popover-radius, var(--ds-radius-panel));--_popover-shadow: var(--ds-popover-shadow, var(--ds-elevation-overlay));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));--_popover-min-width: var(--ds-popover-min-width, auto);position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width);min-width:var(--_popover-min-width)}.popover:has(ds-menu){padding:0;--ds-menu-clip-radius: calc( var(--_popover-radius) - var(--border-width-default) )}.arrow{--_arrow-size: var(--ds-popover-arrow-size, 7px);position:absolute;width:calc(var(--_arrow-size) * 2);height:calc(var(--_arrow-size) * 2);overflow:hidden;pointer-events:none}.arrow:before{content:\"\";position:absolute;width:var(--_arrow-size);height:var(--_arrow-size);background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);transform:rotate(45deg);transform-origin:center}[data-placement=bottom] .arrow,[data-placement=bottom]>.arrow{top:calc(var(--_arrow-size) * -1);left:var(--space-4)}[data-placement=bottom] .arrow:before,[data-placement=bottom]>.arrow:before{bottom:0;left:50%;translate:-50% 0;border-right:none;border-bottom:none}[data-placement=top] .arrow,[data-placement=top]>.arrow{bottom:calc(var(--_arrow-size) * -1);left:var(--space-4)}[data-placement=top] .arrow:before,[data-placement=top]>.arrow:before{top:0;left:50%;translate:-50% 0;border-left:none;border-top:none}[data-placement=right] .arrow,[data-placement=right]>.arrow{left:calc(var(--_arrow-size) * -1);top:var(--space-4)}[data-placement=right] .arrow:before,[data-placement=right]>.arrow:before{right:0;top:50%;translate:0 -50%;border-right:none;border-top:none}[data-placement=left] .arrow,[data-placement=left]>.arrow{right:calc(var(--_arrow-size) * -1);top:var(--space-4)}[data-placement=left] .arrow:before,[data-placement=left]>.arrow:before{left:0;top:50%;translate:0 -50%;border-left:none;border-bottom:none}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
136
136
|
}
|
|
137
137
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PopoverComponent, decorators: [{
|
|
138
138
|
type: Component,
|
|
@@ -141,7 +141,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
141
141
|
provide: DsOverlayCloseRef,
|
|
142
142
|
useExisting: forwardRef(() => PopoverComponent),
|
|
143
143
|
},
|
|
144
|
-
], template: "<!-- Projected content is captured ONCE here and stamped into whichever render\n site is active \u2014 duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\"
|
|
144
|
+
], template: "<!-- Projected content is captured ONCE here and stamped into whichever render\n site is active \u2014 duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay));--_popover-border-color: var(--ds-popover-border-color, var(--border-default));--_popover-radius: var(--ds-popover-radius, var(--ds-radius-panel));--_popover-shadow: var(--ds-popover-shadow, var(--ds-elevation-overlay));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));--_popover-min-width: var(--ds-popover-min-width, auto);position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width);min-width:var(--_popover-min-width)}.popover:has(ds-menu){padding:0;--ds-menu-clip-radius: calc( var(--_popover-radius) - var(--border-width-default) )}.arrow{--_arrow-size: var(--ds-popover-arrow-size, 7px);position:absolute;width:calc(var(--_arrow-size) * 2);height:calc(var(--_arrow-size) * 2);overflow:hidden;pointer-events:none}.arrow:before{content:\"\";position:absolute;width:var(--_arrow-size);height:var(--_arrow-size);background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);transform:rotate(45deg);transform-origin:center}[data-placement=bottom] .arrow,[data-placement=bottom]>.arrow{top:calc(var(--_arrow-size) * -1);left:var(--space-4)}[data-placement=bottom] .arrow:before,[data-placement=bottom]>.arrow:before{bottom:0;left:50%;translate:-50% 0;border-right:none;border-bottom:none}[data-placement=top] .arrow,[data-placement=top]>.arrow{bottom:calc(var(--_arrow-size) * -1);left:var(--space-4)}[data-placement=top] .arrow:before,[data-placement=top]>.arrow:before{top:0;left:50%;translate:-50% 0;border-left:none;border-top:none}[data-placement=right] .arrow,[data-placement=right]>.arrow{left:calc(var(--_arrow-size) * -1);top:var(--space-4)}[data-placement=right] .arrow:before,[data-placement=right]>.arrow:before{right:0;top:50%;translate:0 -50%;border-right:none;border-top:none}[data-placement=left] .arrow,[data-placement=left]>.arrow{right:calc(var(--_arrow-size) * -1);top:var(--space-4)}[data-placement=left] .arrow:before,[data-placement=left]>.arrow:before{left:0;top:50%;translate:0 -50%;border-left:none;border-bottom:none}\n"] }]
|
|
145
145
|
}], propDecorators: { panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], panelTrap: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkTrapFocus), { isSignal: true }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], arrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "arrow", required: false }] }], panelRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelRole", required: false }] }], panelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelLabel", required: false }] }] } });
|
|
146
146
|
function buildPositions(placement, align, offsetPx) {
|
|
147
147
|
const crossStart = align === 'start' ? 'start' : 'end';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-popover.mjs","sources":["../../../src/lib/components/popover/popover.component.ts","../../../src/lib/components/popover/popover.component.html","../../../src/lib/components/popover/ids-group-ltd-ids-design-system-components-popover.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n forwardRef,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n ConnectedPosition,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n} from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n closeOnOutsidePointer,\n closeOnScroll,\n disposeWithLeave,\n type DsOverlayCloseCause,\n focusIsInside,\n forwardOverlayTokens,\n overlayPlacementOf,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { DsOverlayCloseRef } from '@ids-group-ltd/ids-design-system/overlay';\nimport { DsStaticPreview } from '@ids-group-ltd/ids-design-system/components';\n\nexport type PopoverAlign = 'start' | 'end';\nexport type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';\n\n@Component({\n selector: 'ds-popover',\n standalone: true,\n imports: [CdkTrapFocus, NgTemplateOutlet],\n templateUrl: './popover.component.html',\n styleUrl: './popover.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }],\n // Expose this popover as a DsOverlayCloseRef so projected content (e.g.\n // ds-menu-item) can close it via DI — the popover never references a child.\n providers: [\n {\n provide: DsOverlayCloseRef,\n useExisting: forwardRef(() => PopoverComponent),\n },\n ],\n})\nexport class PopoverComponent implements OnDestroy, DsOverlayCloseRef {\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly host = inject(ElementRef<HTMLElement>);\n protected readonly preview = inject(DsStaticPreview);\n protected readonly panelTpl = viewChild<TemplateRef<unknown>>('panel');\n private readonly panelTrap = viewChild(CdkTrapFocus);\n private ref: OverlayRef | null = null;\n private triggerElement: HTMLElement | null = null;\n private focusTimer: ReturnType<typeof setTimeout> | null = null;\n /** Public panel tokens forwarded onto the portaled overlay pane on open so\n * a consumer's `ds-popover { --ds-popover-panel-*: … }` reaches it. */\n private readonly panelTokens = [\n '--ds-popover-bg-color',\n '--ds-popover-border-color',\n '--ds-popover-radius',\n '--ds-popover-shadow',\n '--ds-popover-padding',\n '--ds-popover-max-width',\n '--ds-popover-min-width',\n '--ds-popover-arrow-size',\n // Forwarded too: a projected ds-menu is portaled into the pane, so a\n // consumer scoping the menu's width in their own DOM can't reach it.\n '--ds-menu-min-width',\n '--ds-menu-max-width',\n ];\n\n /** Cross-axis alignment of the panel against the trigger. */\n readonly align = input<PopoverAlign>('start');\n /** Which side of the trigger the panel prefers to appear on. */\n readonly placement = input<PopoverPlacement>('bottom');\n /** Render a small caret pointing at the trigger. */\n readonly arrow = input(false, { transform: booleanAttribute });\n\n /** ARIA role for the panel (e.g. 'dialog' for interactive popovers). When set,\n * the panel traps focus and captures it on open; a keyboard (Escape) or\n * in-panel close returns focus to the trigger, while an outside click or\n * scroll leaves focus where it lands (non-modal). Leave null for plain,\n * non-interactive text popovers. */\n readonly panelRole = input<string | null>(null);\n /** Accessible name for the panel; pair with `panelRole`. */\n readonly panelLabel = input<string | null>(null);\n\n /** Open/closed state — for callers binding `aria-expanded` on the trigger. */\n readonly opened = signal(false);\n /** Resolved placement after the overlay positions — drives the arrow direction. */\n readonly resolvedPlacement = signal<PopoverPlacement>('bottom');\n\n toggle(trigger: HTMLElement): void {\n if (this.preview.staticPreview()) {\n return;\n }\n if (this.ref) {\n this.close();\n\n return;\n }\n\n this.triggerElement = trigger;\n const placement = this.placement();\n const arrowOffset = this.arrow() ? 8 : 4;\n\n const positionStrategy: FlexibleConnectedPositionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(trigger)\n .withPositions(buildPositions(placement, this.align(), arrowOffset))\n .withViewportMargin(8);\n\n positionStrategy.positionChanges.subscribe((change) => {\n this.resolvedPlacement.set(\n overlayPlacementOf(\n change.connectionPair.overlayY,\n change.connectionPair.overlayX,\n ),\n );\n });\n\n const cfg: OverlayConfig = {\n positionStrategy,\n hasBackdrop: false,\n panelClass: 'ds-overlay-pane',\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n };\n this.ref = this.overlay.create(cfg);\n prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);\n forwardOverlayTokens(this.ref, this.host.nativeElement, this.panelTokens);\n closeOnOutsidePointer(\n this.ref,\n (target) => trigger.contains(target),\n () => this.close('dismiss'),\n );\n // No backdrop catches a page scroll and CDK's scroll strategies miss a plain\n // overflow container, so close on any outside scroll ourselves.\n const removeScrollClose = closeOnScroll(this.ref, () =>\n this.close('dismiss'),\n );\n this.ref.detachments().subscribe(() => {\n removeScrollClose();\n this.ref = null;\n this.opened.set(false);\n });\n this.ref.keydownEvents().subscribe((event) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close('dismiss');\n }\n });\n this.ref.attach(new TemplatePortal(this.panelTpl()!, this.vcr));\n this.resolvedPlacement.set(placement);\n this.opened.set(true);\n if (this.panelRole()) {\n // Same initial focus as cdkTrapFocusAutoCapture, minus its destroy-time\n // restore — that restore steals focus on an outside/scroll close.\n this.focusTimer = setTimeout(() => {\n this.focusTimer = null;\n void this.panelTrap()?.focusTrap?.focusInitialElementWhenReady();\n });\n }\n }\n\n close(cause: DsOverlayCloseCause = 'select'): void {\n if (!this.ref) {\n return;\n }\n clearTimeout(this.focusTimer ?? undefined);\n this.focusTimer = null;\n const focusWasInPanel = focusIsInside(this.ref);\n disposeWithLeave(this.ref, cause);\n this.ref = null;\n this.opened.set(false);\n if (focusWasInPanel) {\n this.triggerElement?.focus({ preventScroll: true });\n }\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.focusTimer ?? undefined);\n this.ref?.dispose();\n this.ref = null;\n }\n}\n\nfunction buildPositions(\n placement: PopoverPlacement,\n align: PopoverAlign,\n offsetPx: number,\n): ConnectedPosition[] {\n const crossStart = align === 'start' ? 'start' : 'end';\n const crossEnd: 'start' | 'end' = align === 'start' ? 'end' : 'start';\n\n switch (placement) {\n case 'top':\n return [\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'top',\n overlayX: crossEnd,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n ];\n case 'left':\n return [\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offsetPx,\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offsetPx,\n },\n ];\n case 'right':\n return [\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offsetPx,\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offsetPx,\n },\n ];\n default: // bottom\n return [\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'bottom',\n overlayX: crossEnd,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n ];\n }\n}\n","<!-- Projected content is captured ONCE here and stamped into whichever render\n site is active — duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\"\n >\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\"\n >\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAyDa,gBAAgB,CAAA;AACV,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9B,IAAA,IAAI,GAAG,MAAM,EAAC,UAAuB,EAAC;AACpC,IAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;AACjC,IAAA,QAAQ,GAAG,SAAS,CAAuB,OAAO,+EAAC;AACrD,IAAA,SAAS,GAAG,SAAS,CAAC,YAAY,gFAAC;IAC5C,GAAG,GAAsB,IAAI;IAC7B,cAAc,GAAuB,IAAI;IACzC,UAAU,GAAyC,IAAI;AAC/D;AACwE;AACvD,IAAA,WAAW,GAAG;QAC7B,uBAAuB;QACvB,2BAA2B;QAC3B,qBAAqB;QACrB,qBAAqB;QACrB,sBAAsB;QACtB,wBAAwB;QACxB,wBAAwB;QACxB,yBAAyB;;;QAGzB,qBAAqB;QACrB,qBAAqB;KACtB;;AAGQ,IAAA,KAAK,GAAG,KAAK,CAAe,OAAO,4EAAC;;AAEpC,IAAA,SAAS,GAAG,KAAK,CAAmB,QAAQ,gFAAC;;IAE7C,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE9D;;;;AAIqC;AAC5B,IAAA,S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AAE,UAAU;AACnB,oBAAA,OAAO,EAAE,QAAQ;AACjB,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,QAAQ,EAAE,KAAK;AACf,oBAAA,OAAO,EAAE,QAAQ;AAClB,iBAAA;AACD,gBAAA;AACE,oBAAA,OAAO,EAAE,UAAU;AACnB,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,QAAQ,EAAE,QAAQ;oBAClB,OAAO,EAAE,CAAC,QAAQ;AACnB,iBAAA;AACD,gBAAA;AACE,oBAAA,OAAO,EAAE,QAAQ;AACjB,oBAAA,OAAO,EAAE,QAAQ;AACjB,oBAAA,QAAQ,EAAE,QAAQ;AAClB,oBAAA,QAAQ,EAAE,KAAK;AACf,oBAAA,OAAO,EAAE,QAAQ;AAClB,iBAAA;aACF;;AAEP;;AEnSA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-popover.mjs","sources":["../../../src/lib/components/popover/popover.component.ts","../../../src/lib/components/popover/popover.component.html","../../../src/lib/components/popover/ids-group-ltd-ids-design-system-components-popover.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n forwardRef,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n ConnectedPosition,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n} from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n closeOnOutsidePointer,\n closeOnScroll,\n disposeWithLeave,\n type DsOverlayCloseCause,\n focusIsInside,\n forwardOverlayTokens,\n overlayPlacementOf,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { DsOverlayCloseRef } from '@ids-group-ltd/ids-design-system/overlay';\nimport { DsStaticPreview } from '@ids-group-ltd/ids-design-system/components';\n\nexport type PopoverAlign = 'start' | 'end';\nexport type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';\n\n@Component({\n selector: 'ds-popover',\n standalone: true,\n imports: [CdkTrapFocus, NgTemplateOutlet],\n templateUrl: './popover.component.html',\n styleUrl: './popover.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }],\n // Expose this popover as a DsOverlayCloseRef so projected content (e.g.\n // ds-menu-item) can close it via DI — the popover never references a child.\n providers: [\n {\n provide: DsOverlayCloseRef,\n useExisting: forwardRef(() => PopoverComponent),\n },\n ],\n})\nexport class PopoverComponent implements OnDestroy, DsOverlayCloseRef {\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly host = inject(ElementRef<HTMLElement>);\n protected readonly preview = inject(DsStaticPreview);\n protected readonly panelTpl = viewChild<TemplateRef<unknown>>('panel');\n private readonly panelTrap = viewChild(CdkTrapFocus);\n private ref: OverlayRef | null = null;\n private triggerElement: HTMLElement | null = null;\n private focusTimer: ReturnType<typeof setTimeout> | null = null;\n /** Public panel tokens forwarded onto the portaled overlay pane on open so\n * a consumer's `ds-popover { --ds-popover-panel-*: … }` reaches it. */\n private readonly panelTokens = [\n '--ds-popover-bg-color',\n '--ds-popover-border-color',\n '--ds-popover-radius',\n '--ds-popover-shadow',\n '--ds-popover-padding',\n '--ds-popover-max-width',\n '--ds-popover-min-width',\n '--ds-popover-arrow-size',\n // Forwarded too: a projected ds-menu is portaled into the pane, so a\n // consumer scoping the menu's width in their own DOM can't reach it.\n '--ds-menu-min-width',\n '--ds-menu-max-width',\n ];\n\n /** Cross-axis alignment of the panel against the trigger. */\n readonly align = input<PopoverAlign>('start');\n /** Which side of the trigger the panel prefers to appear on. */\n readonly placement = input<PopoverPlacement>('bottom');\n /** Render a small caret pointing at the trigger. */\n readonly arrow = input(false, { transform: booleanAttribute });\n\n /** ARIA role for the panel (e.g. 'dialog' for interactive popovers). When set,\n * the panel traps focus and captures it on open; a keyboard (Escape) or\n * in-panel close returns focus to the trigger, while an outside click or\n * scroll leaves focus where it lands (non-modal). Leave null for plain,\n * non-interactive text popovers. */\n readonly panelRole = input<string | null>(null);\n /** Accessible name for the panel; pair with `panelRole`. */\n readonly panelLabel = input<string | null>(null);\n\n /** Open/closed state — for callers binding `aria-expanded` on the trigger. */\n readonly opened = signal(false);\n /** Resolved placement after the overlay positions — drives the arrow direction. */\n readonly resolvedPlacement = signal<PopoverPlacement>('bottom');\n\n toggle(trigger: HTMLElement): void {\n if (this.preview.staticPreview()) {\n return;\n }\n if (this.ref) {\n this.close();\n\n return;\n }\n\n this.triggerElement = trigger;\n const placement = this.placement();\n const arrowOffset = this.arrow() ? 8 : 4;\n\n const positionStrategy: FlexibleConnectedPositionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(trigger)\n .withPositions(buildPositions(placement, this.align(), arrowOffset))\n .withViewportMargin(8);\n\n positionStrategy.positionChanges.subscribe((change) => {\n this.resolvedPlacement.set(\n overlayPlacementOf(\n change.connectionPair.overlayY,\n change.connectionPair.overlayX,\n ),\n );\n });\n\n const cfg: OverlayConfig = {\n positionStrategy,\n hasBackdrop: false,\n panelClass: 'ds-overlay-pane',\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n };\n this.ref = this.overlay.create(cfg);\n prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);\n forwardOverlayTokens(this.ref, this.host.nativeElement, this.panelTokens);\n closeOnOutsidePointer(\n this.ref,\n (target) => trigger.contains(target),\n () => this.close('dismiss'),\n );\n // No backdrop catches a page scroll and CDK's scroll strategies miss a plain\n // overflow container, so close on any outside scroll ourselves.\n const removeScrollClose = closeOnScroll(this.ref, () =>\n this.close('dismiss'),\n );\n this.ref.detachments().subscribe(() => {\n removeScrollClose();\n this.ref = null;\n this.opened.set(false);\n });\n this.ref.keydownEvents().subscribe((event) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close('dismiss');\n }\n });\n this.ref.attach(new TemplatePortal(this.panelTpl()!, this.vcr));\n this.resolvedPlacement.set(placement);\n this.opened.set(true);\n if (this.panelRole()) {\n // Same initial focus as cdkTrapFocusAutoCapture, minus its destroy-time\n // restore — that restore steals focus on an outside/scroll close.\n this.focusTimer = setTimeout(() => {\n this.focusTimer = null;\n void this.panelTrap()?.focusTrap?.focusInitialElementWhenReady();\n });\n }\n }\n\n close(cause: DsOverlayCloseCause = 'select'): void {\n if (!this.ref) {\n return;\n }\n clearTimeout(this.focusTimer ?? undefined);\n this.focusTimer = null;\n const focusWasInPanel = focusIsInside(this.ref);\n disposeWithLeave(this.ref, cause);\n this.ref = null;\n this.opened.set(false);\n if (focusWasInPanel) {\n this.triggerElement?.focus({ preventScroll: true });\n }\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.focusTimer ?? undefined);\n this.ref?.dispose();\n this.ref = null;\n }\n}\n\nfunction buildPositions(\n placement: PopoverPlacement,\n align: PopoverAlign,\n offsetPx: number,\n): ConnectedPosition[] {\n const crossStart = align === 'start' ? 'start' : 'end';\n const crossEnd: 'start' | 'end' = align === 'start' ? 'end' : 'start';\n\n switch (placement) {\n case 'top':\n return [\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'top',\n overlayX: crossEnd,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n ];\n case 'left':\n return [\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offsetPx,\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offsetPx,\n },\n ];\n case 'right':\n return [\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offsetPx,\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offsetPx,\n },\n ];\n default: // bottom\n return [\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'bottom',\n overlayX: crossEnd,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n ];\n }\n}\n","<!-- Projected content is captured ONCE here and stamped into whichever render\n site is active — duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAyDa,gBAAgB,CAAA;AACV,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9B,IAAA,IAAI,GAAG,MAAM,EAAC,UAAuB,EAAC;AACpC,IAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC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