@ids-group-ltd/ids-design-system 0.14.2 → 0.14.3
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 +93 -0
- package/components.md +15 -15
- package/docs/agent/forms/ds-color-picker.md +1 -1
- package/docs/agent/forms/ds-date-picker.md +1 -1
- package/docs/agent/forms/ds-select.md +1 -1
- package/docs/agent/forms/ds-textarea.md +1 -1
- package/docs/agent/forms/ds-time-picker.md +1 -1
- package/docs/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +1 -1
- package/docs/agent/foundations/tokens.md +1 -1
- package/docs/agent/navigation/ds-tabs.md +1 -1
- package/docs/agent/overlays/ds-bottom-sheet.md +1 -1
- package/docs/agent/overlays/ds-drawer.md +1 -1
- package/docs/agent/overlays/ds-modal.md +1 -1
- package/docs/agent/overlays/ds-popover.md +1 -1
- package/docs/agent/overlays/ds-tooltip.md +3 -3
- 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-bottom-sheet.mjs +16 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +25 -10
- 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 +28 -11
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +13 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +3 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
- 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-textarea.mjs +31 -9
- 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 +16 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +74 -18
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/migrations/0.14.3.json +71 -0
- package/package.json +1 -1
- package/schematics/check-overrides/surface.json +6 -1
- package/themes/_semantic.scss +1 -0
- package/themes/dark/_theme.scss +1 -0
- package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +4 -1
- package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +4 -2
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +4 -2
- package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +4 -1
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +11 -3
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +3 -2
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +10 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-select.mjs","sources":["../../../src/lib/components/select/select.types.ts","../../../src/lib/components/select/select.component.ts","../../../src/lib/components/select/select.component.html","../../../src/lib/components/select/ids-group-ltd-ids-design-system-components-select.ts"],"sourcesContent":["import type {\n DsOption,\n DsOptionGroup,\n DsOptionItem,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { isDsOptionGroup } from '@ids-group-ltd/ids-design-system/core';\nimport type { DsControlWidth } from '@ids-group-ltd/ids-design-system/core';\n\nexport interface SelectOption extends DsOption<string> {}\n\nexport type SelectWidth = DsControlWidth;\n\nexport interface SelectOptionGroup extends DsOptionGroup<string> {}\n\nexport type SelectItem = DsOptionItem<string>;\n\nexport function isSelectOptionGroup(\n item: SelectItem,\n): item is SelectOptionGroup {\n return isDsOptionGroup(item);\n}\n","import {\n Component,\n ElementRef,\n type OnDestroy,\n TemplateRef,\n contentChild,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n output,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n clearOnDetach,\n closeOnOutsidePointer,\n closeOnScroll,\n disposeWithLeave,\n dropdownOverlay,\n type DsOverlayCloseCause,\n forwardOverlayTokens,\n panelClassesOf,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { SpinnerComponent } from '@ids-group-ltd/ids-design-system/components/spinner';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport {\n describedByIds,\n groupInvalid,\n groupMessageId,\n inFieldGroup,\n} from '@ids-group-ltd/ids-design-system/components/field-group';\nimport { DsStaticPreview } from '@ids-group-ltd/ids-design-system/components';\nimport {\n isSelectOptionGroup,\n type SelectItem,\n type SelectOption,\n type SelectOptionGroup,\n type SelectWidth,\n} from './select.types';\nimport { DS_INTL, type DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\nimport {\n resolveFieldMessage,\n trimmedText,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport { DsOptionTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsPickerTriggerDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsEmptyTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsPanelHeaderTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsPanelFooterTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsGroupLabelTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport {\n firstEnabledIndex as firstEnabledOf,\n lastEnabledIndex as lastEnabledOf,\n nextEnabledIndex,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { scrollActiveOptionIntoView } from '@ids-group-ltd/ids-design-system/components';\nimport { announceOptionCount } from '@ids-group-ltd/ids-design-system/components';\nimport { createTypeAhead } from '@ids-group-ltd/ids-design-system/components';\n\n@Component({\n selector: 'ds-select',\n standalone: true,\n imports: [\n SpinnerComponent,\n IconComponent,\n NgTemplateOutlet,\n FieldMessageComponent,\n TooltipDirective,\n ],\n host: {\n '[attr.data-field-state]': 'controlState()',\n '[class.in-group]': 'inGroup',\n '[class.content-width]': \"width() === 'content'\",\n },\n templateUrl: './select.component.html',\n styleUrl: './select.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectComponent),\n multi: true,\n },\n ],\n})\nexport class SelectComponent\n extends DsControlValueAccessor<string>\n implements OnDestroy\n{\n private readonly overlay = inject(Overlay);\n protected readonly intl = inject(DS_INTL);\n /** Segment of a ds-field-group: the group owns the border, radius and focus\n * ring, so .in-group strips this control back to its bare contents. */\n protected readonly inGroup = inFieldGroup();\n\n private readonly vcr = inject(ViewContainerRef);\n private readonly host = inject(ElementRef<HTMLElement>);\n protected readonly preview = inject(DsStaticPreview);\n\n /** Selected option's value, two-way bound. */\n readonly value = model<string>('');\n /** Flat options or option groups rendered in the dropdown panel. */\n readonly options = input<readonly SelectItem[]>([]);\n /** Public panel tokens forwarded onto the portaled overlay pane on open, so a\n * consumer's `ds-select { --ds-dropdown-panel-*: … }` reaches it.\n * Not the whole set: `prepareOverlayEnter` also forwards `DROPDOWN_PANEL_TOKENS`\n * (overlay-motion.ts) onto every pane, the `--ds-option-*` family among them. */\n private readonly panelTokens = [\n '--ds-dropdown-panel-bg-color',\n '--ds-dropdown-panel-min-width',\n '--ds-dropdown-panel-max-width',\n '--ds-option-selected-bg-color',\n '--ds-option-selected-label-color',\n '--ds-option-selected-bg-color-hover',\n '--ds-option-check-color',\n ];\n\n /** Trigger width — `fill` stretches to the container and pins the panel to the\n * trigger's width; `content` hugs the trigger's own content and takes that width\n * as the panel's FLOOR, so the panel can still grow to its options. */\n readonly width = input<SelectWidth>('fill');\n /** Shown in the trigger when nothing is selected. */\n readonly placeholder = input<string>('');\n /** Trigger height — sm/md/lg.\n * Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Label shown above the trigger. */\n readonly label = input<string>('');\n /** Disables the trigger and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Options are still being fetched. The panel shows a spinner instead of the\n * empty row — which would otherwise claim there are no matches — and the list\n * reports `aria-busy`. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** The panel opened. The moment to fetch options for a picker whose list is\n * loaded on demand. */\n readonly opened = output<void>();\n /** The panel closed, for any reason — a pick, Escape, an outside click, a scroll. */\n readonly closed = output<void>();\n /** Scrolls the keyboard cursor's row into view. On by default: a list longer\n * than the panel otherwise walks the cursor out of sight. Set `false` only if\n * you are driving the scroll position yourself. */\n readonly scrollActiveIntoView = input(true, { transform: booleanAttribute });\n /** Extra classes for the portaled panel, beside `ds-dropdown-panel`,\n * `ds-overlay-pane` and this component's own `ds-select-panel`. The panel is\n * portaled out of the host, so a class on the pane is the only way a consumer\n * stylesheet reaches ONE instance of it. */\n readonly panelClass = input<string | readonly string[]>([]);\n /** Prevents opening the dropdown while still allowing focus. */\n readonly readOnly = input(false, { transform: booleanAttribute });\n /**\n * The contract spelling of `readOnly`: signal forms binds by NAME, so a\n * `readonly()` rule reaches nothing without it.\n */\n readonly readonlyBinding = input(false, {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n alias: 'readonly',\n transform: booleanAttribute,\n });\n protected readonly isReadOnly = computed(\n () => this.readOnly() || this.readonlyBinding(),\n );\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 /** Marks the field required — shows an asterisk and sets `aria-required`. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Shows an \"(optional)\" marker next to the label (ignored when `required`). */\n readonly optional = input(false, { transform: booleanAttribute });\n /** Native `name` attribute forwarded to the trigger. */\n readonly name = input<string | null>(null);\n /** Accessible name when no visible `label` is provided. */\n readonly ariaLabel = input<string | null>(null);\n /** Shows an inline clear (×) button when a value is selected. */\n readonly clearable = input(false, { transform: booleanAttribute });\n\n protected readonly optionTemplate = contentChild(DsOptionTemplateDirective, {\n read: TemplateRef,\n });\n protected readonly pickerTrigger = contentChild(DsPickerTriggerDirective, {\n read: TemplateRef,\n });\n protected readonly panelHeaderTemplate = contentChild(\n DsPanelHeaderTemplateDirective,\n { read: TemplateRef },\n );\n protected readonly panelFooterTemplate = contentChild(\n DsPanelFooterTemplateDirective,\n { read: TemplateRef },\n );\n protected readonly groupLabelTemplate = contentChild(\n DsGroupLabelTemplateDirective,\n { read: TemplateRef },\n );\n protected readonly emptyTemplate = contentChild(DsEmptyTemplateDirective, {\n read: TemplateRef,\n });\n\n protected readonly uid = nextControlId('ds-select');\n protected readonly labelId = `${this.uid}-label`;\n protected readonly listboxId = `${this.uid}-listbox`;\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.isDisabled(),\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 groupMessage = groupMessageId();\n protected readonly describedByIds = describedByIds;\n protected readonly invalidResolved = groupInvalid(this.fieldMessage.invalid);\n protected optionId(flatIndex: number): string {\n return `${this.uid}-opt-${flatIndex}`;\n }\n /** Active option for `aria-activedescendant` (combobox keeps DOM focus). */\n protected readonly activeDescendant = computed(() => {\n const index = this.activeIndex();\n\n return this.open() && index >= 0 ? this.optionId(index) : null;\n });\n protected readonly resolvedAriaLabel = computed(() =>\n this.label() ? null : this.ariaLabel() || this.placeholder() || null,\n );\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n protected readonly trigger =\n viewChild.required<ElementRef<HTMLElement>>('trigger');\n protected readonly panelTpl =\n viewChild.required<TemplateRef<unknown>>('panel');\n protected readonly panelContentTpl =\n viewChild.required<TemplateRef<unknown>>('panelContent');\n protected readonly open = signal<boolean>(false);\n protected readonly activeIndex = signal<number>(-1);\n\n private overlayRef: OverlayRef | null = null;\n\n // An entry's index here IS `activeIndex` — group headers are not entries, so\n // keyboard nav never lands on one.\n protected readonly flatOptions = computed<\n { option: SelectOption; groupDisabled: boolean }[]\n >(() => {\n const out: { option: SelectOption; groupDisabled: boolean }[] = [];\n for (const item of this.options()) {\n if (isSelectOptionGroup(item)) {\n const groupDisabled = !!item.disabled;\n for (const opt of item.options) {\n out.push({ option: opt, groupDisabled });\n }\n } else {\n out.push({ option: item, groupDisabled: false });\n }\n }\n\n return out;\n });\n\n protected readonly selectedOption = computed<SelectOption | null>(() => {\n const current = this.value();\n const found = this.flatOptions().find(\n ({ option }) => option.value === current,\n );\n\n return found?.option ?? null;\n });\n\n protected readonly displayLabel = computed<string>(() => {\n return this.selectedOption()?.label ?? this.placeholder();\n });\n\n protected readonly hasValue = computed<boolean>(\n () => !!this.selectedOption(),\n );\n\n protected readonly triggerClasses = computed<string>(() => {\n const parts = ['dropdown'];\n if (this.sizeResolved() === 'sm') {\n parts.push('sm');\n }\n if (this.sizeResolved() === 'lg') {\n parts.push('lg');\n }\n if (this.isDisabled()) {\n parts.push('disabled');\n }\n if (this.isReadOnly()) {\n parts.push('readonly');\n }\n if (this.invalidResolved()) {\n parts.push('error');\n }\n if (this.open() || this.preview.staticPreview()) {\n parts.push('open');\n }\n\n return parts.join(' ');\n });\n\n constructor() {\n super();\n scrollActiveOptionIntoView(\n this.activeDescendant,\n this.scrollActiveIntoView,\n this.cursorFromKeyboard,\n );\n announceOptionCount(\n computed(() => this.flatOptions().length),\n this.open,\n );\n\n effect(() => {\n if (!this.open()) {\n return;\n }\n const index = this.flatOptions().findIndex(\n ({ option }) => option.value === this.value(),\n );\n this.activeIndex.set(index >= 0 ? index : this.firstEnabledIndex());\n });\n }\n\n protected isOptionGroup(item: SelectItem): item is SelectOptionGroup {\n return isSelectOptionGroup(item);\n }\n\n protected flatIndexOf(opt: SelectOption): number {\n return this.flatOptions().findIndex(({ option }) => option === opt);\n }\n\n protected toggle(): void {\n if (\n this.isDisabled() ||\n this.isReadOnly() ||\n this.preview.staticPreview()\n ) {\n return;\n }\n if (this.open()) {\n this.close();\n } else {\n this.openPanel();\n }\n }\n\n protected openPanel(): void {\n if (this.overlayRef) {\n return;\n }\n const triggerElement = this.trigger().nativeElement;\n const triggerWidth = triggerElement.getBoundingClientRect().width;\n const { positionStrategy, config } = dropdownOverlay(\n this.overlay,\n triggerElement,\n ['ds-select-panel', ...panelClassesOf(this.panelClass())],\n );\n if (this.width() === 'content') {\n config.minWidth = triggerWidth;\n } else {\n config.width = triggerWidth;\n }\n this.overlayRef = this.overlay.create(config);\n prepareOverlayEnter(\n this.overlayRef,\n this.host.nativeElement,\n positionStrategy,\n );\n forwardOverlayTokens(\n this.overlayRef,\n this.host.nativeElement,\n this.panelTokens,\n );\n closeOnOutsidePointer(\n this.overlayRef,\n (target) => this.trigger().nativeElement.contains(target),\n () => this.close('dismiss'),\n );\n const removeScrollClose = closeOnScroll(this.overlayRef, () =>\n this.close('dismiss'),\n );\n clearOnDetach(this.overlayRef, {\n current: () => this.overlayRef,\n always: removeScrollClose,\n clear: () => {\n this.overlayRef = null;\n this.setOpen(false);\n },\n });\n const portal = new TemplatePortal(this.panelTpl(), this.vcr);\n this.overlayRef.attach(portal);\n this.setOpen(true);\n }\n\n protected close(cause: DsOverlayCloseCause = 'select'): void {\n disposeWithLeave(this.overlayRef, cause);\n this.overlayRef = null;\n this.setOpen(false);\n this.activeIndex.set(-1);\n this.markTouched();\n }\n\n ngOnDestroy(): void {\n this.overlayRef?.dispose();\n this.overlayRef = null;\n }\n\n protected pick(option: SelectOption, groupDisabled = false): void {\n if (option.disabled || groupDisabled) {\n return;\n }\n this.value.set(option.value);\n this.close();\n this.trigger().nativeElement.focus();\n }\n\n protected clearValue(event: MouseEvent): void {\n event.stopPropagation();\n this.clear();\n this.markTouched();\n }\n\n /**\n * Empties the selection from outside — a \"reset filters\" button, a form the app\n * clears itself.\n *\n * Deliberately does NOT move focus: the caller may be navigating away, and\n * stealing focus back into a field they just left is worse than leaving it.\n */\n clear(): void {\n this.value.set('');\n if (this.open()) {\n this.close('dismiss');\n }\n }\n\n protected isSelected(option: SelectOption): boolean {\n return option.value === this.value();\n }\n\n protected isOptionDisabled(\n option: SelectOption,\n groupDisabled = false,\n ): boolean {\n return !!option.disabled || groupDisabled;\n }\n\n protected onTriggerKeydown(event: KeyboardEvent): void {\n this.cursorFromKeyboard.set(true);\n if (\n this.isDisabled() ||\n this.isReadOnly() ||\n this.preview.staticPreview()\n ) {\n return;\n }\n // Only handle keys aimed at the trigger itself — a keydown bubbling up from\n // the nested clear <button> must reach its own activation (Enter/Space to\n // clear), not be hijacked here into reopening the panel.\n if (event.target !== event.currentTarget) {\n return;\n }\n const key = event.key;\n if (!this.open()) {\n if (\n key === 'ArrowDown' ||\n key === 'ArrowUp' ||\n key === 'Enter' ||\n key === ' '\n ) {\n event.preventDefault();\n this.openPanel();\n\n return;\n }\n // A native <select> commits as you type without opening, so the value changes under\n // the closed trigger.\n if (this.handleTypeAhead(key)) {\n event.preventDefault();\n this.pickActive();\n }\n\n return;\n }\n if (key === 'Tab') {\n // Close the panel but let Tab move focus naturally (no preventDefault),\n // else the open overlay panel lingers behind the moved focus.\n this.close();\n\n return;\n }\n if (key === 'Escape') {\n event.preventDefault();\n this.close('dismiss');\n\n return;\n }\n if (key === 'ArrowDown') {\n event.preventDefault();\n this.moveActive(1);\n\n return;\n }\n if (key === 'ArrowUp') {\n event.preventDefault();\n this.moveActive(-1);\n\n return;\n }\n if (key === 'Enter' || key === ' ') {\n event.preventDefault();\n const index = this.activeIndex();\n const entry = this.flatOptions()[index];\n if (entry) {\n this.pick(entry.option, entry.groupDisabled);\n }\n\n return;\n }\n if (key === 'PageDown') {\n event.preventDefault();\n this.moveActive(SelectComponent.pageStep);\n\n return;\n }\n if (key === 'PageUp') {\n event.preventDefault();\n this.moveActive(-SelectComponent.pageStep);\n\n return;\n }\n if (key === 'Home') {\n event.preventDefault();\n this.activeIndex.set(this.firstEnabledIndex());\n\n return;\n }\n if (key === 'End') {\n event.preventDefault();\n this.activeIndex.set(this.lastEnabledIndex());\n\n return;\n }\n if (this.handleTypeAhead(key)) {\n event.preventDefault();\n }\n }\n\n private pickActive(): void {\n const entry = this.flatOptions()[this.activeIndex()];\n if (entry) {\n this.pick(entry.option, entry.groupDisabled);\n }\n }\n\n protected isActive(index: number): boolean {\n return this.activeIndex() === index;\n }\n\n private readonly typeAhead = createTypeAhead();\n\n private handleTypeAhead(key: string): boolean {\n const index = this.typeAhead.match(\n key,\n this.flatOptions().map((entry) => entry.option.label),\n this.activeIndex(),\n );\n if (index < 0) {\n return false;\n }\n this.activeIndex.set(index);\n\n return true;\n }\n\n protected readonly cursorFromKeyboard = signal(false);\n\n private cursorList() {\n const opts = this.flatOptions();\n\n return {\n length: opts.length,\n isEnabled: (index: number) =>\n !opts[index].option.disabled && !opts[index].groupDisabled,\n };\n }\n\n /** How far PageUp and PageDown move. Ten rows is the native `<select>` step and\n * the APG listbox example's — a fixed number rather than a measured screenful,\n * so the jump is the same wherever the panel happens to be clipped. */\n private static readonly pageStep = 10;\n\n private moveActive(delta: number): void {\n const next = nextEnabledIndex(this.cursorList(), this.activeIndex(), delta);\n if (next >= 0) {\n this.activeIndex.set(next);\n }\n }\n\n private setOpen(next: boolean): void {\n if (this.open() === next) {\n return;\n }\n this.open.set(next);\n (next ? this.opened : this.closed).emit();\n }\n\n private lastEnabledIndex(): number {\n return lastEnabledOf(this.cursorList());\n }\n\n private firstEnabledIndex(): number {\n return firstEnabledOf(this.cursorList());\n }\n}\n","@if (label()) {\n <span\n class=\"label\"\n [id]=\"labelId\">\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\">\n {{ intl().field.optional }}\n </span>\n }\n </span>\n}\n\n<div\n #trigger\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [class]=\"triggerClasses()\"\n [attr.name]=\"name()\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"open() || preview.staticPreview()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"describedByIds(hintId(), groupMessage())\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\">\n @if (selectedOption()?.icon) {\n <ds-icon\n class=\"trigger-icon\"\n [name]=\"selectedOption()!.icon!\"\n [size]=\"16\" />\n }\n\n @if (pickerTrigger(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: selectedOption(),\n selected: selectedOption(),\n count: hasValue() ? 1 : 0,\n open: open(),\n disabled: isDisabled(),\n }\" />\n } @else {\n <span\n class=\"trigger-text\"\n dsTooltip\n dsTooltipWhenClipped\n [class.is-placeholder]=\"!hasValue()\">\n {{ displayLabel() }}\n </span>\n }\n\n @if (\n clearable() &&\n hasValue() &&\n !isDisabled() &&\n !isReadOnly()\n ) {\n <button\n type=\"button\"\n class=\"clear-btn\"\n [attr.aria-label]=\"intl().picker.clearSelection\"\n (click)=\"clearValue($event)\">\n <ds-icon\n name=\"x\"\n [size]=\"14\" />\n </button>\n }\n\n <span class=\"chevron\">\n <ds-icon\n name=\"chevronDown\"\n [size]=\"14\" />\n </span>\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@if (preview.staticPreview()) {\n <div class=\"ds-dropdown-panel\">\n <ng-container [ngTemplateOutlet]=\"panelContentTpl()\" />\n </div>\n}\n\n<ng-template #panel>\n <ng-container [ngTemplateOutlet]=\"panelContentTpl()\" />\n</ng-template>\n\n<ng-template #panelContent>\n <div class=\"dropdown-panel\">\n @if (panelHeaderTemplate(); as tpl) {\n <div class=\"panel-header\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n count: options().length,\n total: options().length,\n query: '',\n }\" />\n </div>\n }\n\n <ul\n class=\"dropdown-list\"\n role=\"listbox\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [id]=\"listboxId\"\n [attr.aria-labelledby]=\"label() ? labelId : null\">\n @for (item of options(); track $index; let groupIdx = $index) {\n @if (isOptionGroup(item)) {\n <li\n class=\"optgroup\"\n role=\"group\"\n [attr.aria-label]=\"item.label\">\n <span\n class=\"optgroup-label\"\n [class.is-first]=\"groupIdx === 0\">\n @if (groupLabelTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: item,\n group: item,\n count: item.options.length,\n }\" />\n } @else {\n {{ item.label }}\n }\n </span>\n\n <ul\n class=\"optgroup-list\"\n role=\"presentation\">\n @for (opt of item.options; track opt.value) {\n <li role=\"presentation\">\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"option\"\n [id]=\"optionId(flatIndexOf(opt))\"\n [attr.aria-selected]=\"isSelected(opt)\"\n [attr.aria-disabled]=\"\n isOptionDisabled(opt, item.disabled) ? 'true' : null\n \"\n [attr.aria-describedby]=\"\n opt.disabled && opt.disabledReason\n ? optionId(flatIndexOf(opt)) + '-reason'\n : null\n \"\n [class.is-selected]=\"isSelected(opt)\"\n [class.is-active]=\"isActive(flatIndexOf(opt))\"\n [class.is-disabled]=\"isOptionDisabled(opt, item.disabled)\"\n [disabled]=\"isOptionDisabled(opt, item.disabled)\"\n (click)=\"pick(opt, item.disabled)\"\n (mouseenter)=\"\n cursorFromKeyboard.set(false);\n activeIndex.set(flatIndexOf(opt))\n \">\n @if (opt.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"opt.icon\"\n [size]=\"16\" />\n }\n\n @if (opt.disabled && opt.disabledReason) {\n <span\n class=\"option-reason\"\n [id]=\"optionId(flatIndexOf(opt)) + '-reason'\">\n {{ opt.disabledReason }}\n </span>\n }\n\n <span\n class=\"option-label\"\n dsTooltip\n dsTooltipWhenClipped>\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: opt,\n option: opt,\n }\" />\n } @else {\n {{ opt.label }}\n }\n </span>\n\n <span\n class=\"option-check\"\n [class.is-shown]=\"isSelected(opt)\">\n </span>\n </button>\n </li>\n }\n </ul>\n </li>\n } @else {\n <li role=\"presentation\">\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"option\"\n [id]=\"optionId(flatIndexOf(item))\"\n [attr.aria-selected]=\"isSelected(item)\"\n [attr.aria-disabled]=\"item.disabled ? 'true' : null\"\n [class.is-selected]=\"isSelected(item)\"\n [class.is-active]=\"isActive(flatIndexOf(item))\"\n [class.is-disabled]=\"item.disabled\"\n [disabled]=\"item.disabled\"\n (click)=\"pick(item)\"\n (mouseenter)=\"\n cursorFromKeyboard.set(false);\n activeIndex.set(flatIndexOf(item))\n \">\n @if (item.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"item.icon\"\n [size]=\"16\" />\n }\n\n <span\n class=\"option-label\"\n dsTooltip\n dsTooltipWhenClipped>\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: item,\n option: item,\n }\" />\n } @else {\n {{ item.label }}\n }\n </span>\n\n <span\n class=\"option-check\"\n [class.is-shown]=\"isSelected(item)\">\n </span>\n </button>\n </li>\n }\n }\n\n @if (loading()) {\n <li\n class=\"empty t-s\"\n role=\"presentation\">\n <ds-spinner size=\"sm\" />\n </li>\n } @else if (options().length === 0) {\n <li\n class=\"empty t-s\"\n role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ intl().picker.noOptions }}\n }\n </li>\n }\n </ul>\n\n @if (panelFooterTemplate(); as tpl) {\n <div class=\"panel-footer\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n count: options().length,\n total: options().length,\n query: '',\n }\" />\n </div>\n }\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["lastEnabledOf","firstEnabledOf"],"mappings":";;;;;;;;;;;;;;;AAgBM,SAAU,mBAAmB,CACjC,IAAgB,EAAA;AAEhB,IAAA,OAAO,eAAe,CAAC,IAAI,CAAC;AAC9B;;ACkFM,MAAO,eACX,SAAQ,sBAA8B,CAAA;AAGrB,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACvB,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;AACzC;AACwE;IACrD,OAAO,GAAG,YAAY,EAAE;AAE1B,IAAA,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9B,IAAA,IAAI,GAAG,MAAM,EAAC,UAAuB,EAAC;AACpC,IAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;;AAG3C,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,OAAO,GAAG,KAAK,CAAwB,EAAE,8EAAC;AACnD;;;AAGkF;AACjE,IAAA,WAAW,GAAG;QAC7B,8BAA8B;QAC9B,+BAA+B;QAC/B,+BAA+B;QAC/B,+BAA+B;QAC/B,kCAAkC;QAClC,qCAAqC;QACrC,yBAAyB;KAC1B;AAED;;AAEwE;AAC/D,IAAA,KAAK,GAAG,KAAK,CAAc,MAAM,4EAAC;;AAElC,IAAA,WAAW,GAAG,KAAK,CAAS,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,GAAE;AACxE,4BAAA,IAAI,EAAE,WAAW;AAClB,yBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CA0C6C,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAEZ,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAEP,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE1Q3D;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-select.mjs","sources":["../../../src/lib/components/select/select.types.ts","../../../src/lib/components/select/select.component.ts","../../../src/lib/components/select/select.component.html","../../../src/lib/components/select/ids-group-ltd-ids-design-system-components-select.ts"],"sourcesContent":["import type {\n DsOption,\n DsOptionGroup,\n DsOptionItem,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { isDsOptionGroup } from '@ids-group-ltd/ids-design-system/core';\nimport type { DsControlWidth } from '@ids-group-ltd/ids-design-system/core';\n\nexport interface SelectOption extends DsOption<string> {}\n\nexport type SelectWidth = DsControlWidth;\n\nexport interface SelectOptionGroup extends DsOptionGroup<string> {}\n\nexport type SelectItem = DsOptionItem<string>;\n\nexport function isSelectOptionGroup(\n item: SelectItem,\n): item is SelectOptionGroup {\n return isDsOptionGroup(item);\n}\n","import {\n Component,\n ElementRef,\n type OnDestroy,\n TemplateRef,\n contentChild,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n output,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n clearOnDetach,\n closeOnOutsidePointer,\n closeOnScroll,\n disposeWithLeave,\n dropdownOverlay,\n type DsOverlayCloseCause,\n forwardOverlayTokens,\n panelClassesOf,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { SpinnerComponent } from '@ids-group-ltd/ids-design-system/components/spinner';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport {\n describedByIds,\n groupInvalid,\n groupMessageId,\n inFieldGroup,\n} from '@ids-group-ltd/ids-design-system/components/field-group';\nimport { DsStaticPreview } from '@ids-group-ltd/ids-design-system/components';\nimport {\n isSelectOptionGroup,\n type SelectItem,\n type SelectOption,\n type SelectOptionGroup,\n type SelectWidth,\n} from './select.types';\nimport { DS_INTL, type DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\nimport {\n resolveFieldMessage,\n trimmedText,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport { DsOptionTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsPickerTriggerDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsEmptyTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsPanelHeaderTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsPanelFooterTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsGroupLabelTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport {\n firstEnabledIndex as firstEnabledOf,\n lastEnabledIndex as lastEnabledOf,\n nextEnabledIndex,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { scrollActiveOptionIntoView } from '@ids-group-ltd/ids-design-system/components';\nimport { createTypeAhead } from '@ids-group-ltd/ids-design-system/components';\n\n@Component({\n selector: 'ds-select',\n standalone: true,\n imports: [\n SpinnerComponent,\n IconComponent,\n NgTemplateOutlet,\n FieldMessageComponent,\n TooltipDirective,\n ],\n host: {\n '[attr.data-field-state]': 'controlState()',\n '[class.in-group]': 'inGroup',\n '[class.content-width]': \"width() === 'content'\",\n },\n templateUrl: './select.component.html',\n styleUrl: './select.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectComponent),\n multi: true,\n },\n ],\n})\nexport class SelectComponent\n extends DsControlValueAccessor<string>\n implements OnDestroy\n{\n private readonly overlay = inject(Overlay);\n protected readonly intl = inject(DS_INTL);\n /** Segment of a ds-field-group: the group owns the border, radius and focus\n * ring, so .in-group strips this control back to its bare contents. */\n protected readonly inGroup = inFieldGroup();\n\n private readonly vcr = inject(ViewContainerRef);\n private readonly host = inject(ElementRef<HTMLElement>);\n protected readonly preview = inject(DsStaticPreview);\n\n /** Selected option's value, two-way bound. */\n readonly value = model<string>('');\n /** Flat options or option groups rendered in the dropdown panel. */\n readonly options = input<readonly SelectItem[]>([]);\n /** Public panel tokens forwarded onto the portaled overlay pane on open, so a\n * consumer's `ds-select { --ds-dropdown-panel-*: … }` reaches it.\n * Not the whole set: `prepareOverlayEnter` also forwards `DROPDOWN_PANEL_TOKENS`\n * (overlay-motion.ts) onto every pane, the `--ds-option-*` family among them. */\n private readonly panelTokens = [\n '--ds-dropdown-panel-bg-color',\n '--ds-dropdown-panel-min-width',\n '--ds-dropdown-panel-max-width',\n '--ds-option-selected-bg-color',\n '--ds-option-selected-label-color',\n '--ds-option-selected-bg-color-hover',\n '--ds-option-check-color',\n ];\n\n /** Trigger width — `fill` stretches to the container and pins the panel to the\n * trigger's width; `content` hugs the trigger's own content and takes that width\n * as the panel's FLOOR, so the panel can still grow to its options. */\n readonly width = input<SelectWidth>('fill');\n /** Shown in the trigger when nothing is selected. */\n readonly placeholder = input<string>('');\n /** Trigger height — sm/md/lg.\n * Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Label shown above the trigger. */\n readonly label = input<string>('');\n /** Disables the trigger and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Options are still being fetched. The panel shows a spinner instead of the\n * empty row — which would otherwise claim there are no matches — and the list\n * reports `aria-busy`. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** The panel opened. The moment to fetch options for a picker whose list is\n * loaded on demand. */\n readonly opened = output<void>();\n /** The panel closed, for any reason — a pick, Escape, an outside click, a scroll. */\n readonly closed = output<void>();\n /** Scrolls the keyboard cursor's row into view. On by default: a list longer\n * than the panel otherwise walks the cursor out of sight. Set `false` only if\n * you are driving the scroll position yourself. */\n readonly scrollActiveIntoView = input(true, { transform: booleanAttribute });\n /** Extra classes for the portaled panel, beside `ds-dropdown-panel`,\n * `ds-overlay-pane` and this component's own `ds-select-panel`. The panel is\n * portaled out of the host, so a class on the pane is the only way a consumer\n * stylesheet reaches ONE instance of it. */\n readonly panelClass = input<string | readonly string[]>([]);\n /** Prevents opening the dropdown while still allowing focus. */\n readonly readOnly = input(false, { transform: booleanAttribute });\n /**\n * The contract spelling of `readOnly`: signal forms binds by NAME, so a\n * `readonly()` rule reaches nothing without it.\n */\n readonly readonlyBinding = input(false, {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n alias: 'readonly',\n transform: booleanAttribute,\n });\n protected readonly isReadOnly = computed(\n () => this.readOnly() || this.readonlyBinding(),\n );\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 /** Marks the field required — shows an asterisk and sets `aria-required`. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Shows an \"(optional)\" marker next to the label (ignored when `required`). */\n readonly optional = input(false, { transform: booleanAttribute });\n /** Native `name` attribute forwarded to the trigger. */\n readonly name = input<string | null>(null);\n /** Accessible name when no visible `label` is provided. */\n readonly ariaLabel = input<string | null>(null);\n /** Shows an inline clear (×) button when a value is selected. */\n readonly clearable = input(false, { transform: booleanAttribute });\n\n protected readonly optionTemplate = contentChild(DsOptionTemplateDirective, {\n read: TemplateRef,\n });\n protected readonly pickerTrigger = contentChild(DsPickerTriggerDirective, {\n read: TemplateRef,\n });\n protected readonly panelHeaderTemplate = contentChild(\n DsPanelHeaderTemplateDirective,\n { read: TemplateRef },\n );\n protected readonly panelFooterTemplate = contentChild(\n DsPanelFooterTemplateDirective,\n { read: TemplateRef },\n );\n protected readonly groupLabelTemplate = contentChild(\n DsGroupLabelTemplateDirective,\n { read: TemplateRef },\n );\n protected readonly emptyTemplate = contentChild(DsEmptyTemplateDirective, {\n read: TemplateRef,\n });\n\n protected readonly uid = nextControlId('ds-select');\n protected readonly labelId = `${this.uid}-label`;\n protected readonly listboxId = `${this.uid}-listbox`;\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.isDisabled(),\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 groupMessage = groupMessageId();\n protected readonly describedByIds = describedByIds;\n protected readonly invalidResolved = groupInvalid(this.fieldMessage.invalid);\n protected optionId(flatIndex: number): string {\n return `${this.uid}-opt-${flatIndex}`;\n }\n /** Active option for `aria-activedescendant` (combobox keeps DOM focus). */\n protected readonly activeDescendant = computed(() => {\n const index = this.activeIndex();\n\n return this.open() && index >= 0 ? this.optionId(index) : null;\n });\n protected readonly resolvedAriaLabel = computed(() =>\n this.label() ? null : this.ariaLabel() || this.placeholder() || null,\n );\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n protected readonly trigger =\n viewChild.required<ElementRef<HTMLElement>>('trigger');\n protected readonly panelTpl =\n viewChild.required<TemplateRef<unknown>>('panel');\n protected readonly panelContentTpl =\n viewChild.required<TemplateRef<unknown>>('panelContent');\n protected readonly open = signal<boolean>(false);\n protected readonly activeIndex = signal<number>(-1);\n\n private overlayRef: OverlayRef | null = null;\n\n // An entry's index here IS `activeIndex` — group headers are not entries, so\n // keyboard nav never lands on one.\n protected readonly flatOptions = computed<\n { option: SelectOption; groupDisabled: boolean }[]\n >(() => {\n const out: { option: SelectOption; groupDisabled: boolean }[] = [];\n for (const item of this.options()) {\n if (isSelectOptionGroup(item)) {\n const groupDisabled = !!item.disabled;\n for (const opt of item.options) {\n out.push({ option: opt, groupDisabled });\n }\n } else {\n out.push({ option: item, groupDisabled: false });\n }\n }\n\n return out;\n });\n\n protected readonly selectedOption = computed<SelectOption | null>(() => {\n const current = this.value();\n const found = this.flatOptions().find(\n ({ option }) => option.value === current,\n );\n\n return found?.option ?? null;\n });\n\n protected readonly displayLabel = computed<string>(() => {\n return this.selectedOption()?.label ?? this.placeholder();\n });\n\n protected readonly hasValue = computed<boolean>(\n () => !!this.selectedOption(),\n );\n\n protected readonly triggerClasses = computed<string>(() => {\n const parts = ['dropdown'];\n if (this.sizeResolved() === 'sm') {\n parts.push('sm');\n }\n if (this.sizeResolved() === 'lg') {\n parts.push('lg');\n }\n if (this.isDisabled()) {\n parts.push('disabled');\n }\n if (this.isReadOnly()) {\n parts.push('readonly');\n }\n if (this.invalidResolved()) {\n parts.push('error');\n }\n if (this.open() || this.preview.staticPreview()) {\n parts.push('open');\n }\n\n return parts.join(' ');\n });\n\n constructor() {\n super();\n scrollActiveOptionIntoView(\n this.activeDescendant,\n this.scrollActiveIntoView,\n this.cursorFromKeyboard,\n );\n\n effect(() => {\n if (!this.open()) {\n return;\n }\n const index = this.flatOptions().findIndex(\n ({ option }) => option.value === this.value(),\n );\n this.activeIndex.set(index >= 0 ? index : this.firstEnabledIndex());\n });\n }\n\n protected isOptionGroup(item: SelectItem): item is SelectOptionGroup {\n return isSelectOptionGroup(item);\n }\n\n protected flatIndexOf(opt: SelectOption): number {\n return this.flatOptions().findIndex(({ option }) => option === opt);\n }\n\n protected toggle(): void {\n if (\n this.isDisabled() ||\n this.isReadOnly() ||\n this.preview.staticPreview()\n ) {\n return;\n }\n if (this.open()) {\n this.close();\n } else {\n this.openPanel();\n }\n }\n\n protected openPanel(): void {\n if (this.overlayRef) {\n return;\n }\n const triggerElement = this.trigger().nativeElement;\n const triggerWidth = triggerElement.getBoundingClientRect().width;\n const { positionStrategy, config } = dropdownOverlay(\n this.overlay,\n triggerElement,\n ['ds-select-panel', ...panelClassesOf(this.panelClass())],\n );\n if (this.width() === 'content') {\n config.minWidth = triggerWidth;\n } else {\n config.width = triggerWidth;\n }\n this.overlayRef = this.overlay.create(config);\n prepareOverlayEnter(\n this.overlayRef,\n this.host.nativeElement,\n positionStrategy,\n );\n forwardOverlayTokens(\n this.overlayRef,\n this.host.nativeElement,\n this.panelTokens,\n );\n closeOnOutsidePointer(\n this.overlayRef,\n (target) => this.trigger().nativeElement.contains(target),\n () => this.close('dismiss'),\n );\n const removeScrollClose = closeOnScroll(this.overlayRef, () =>\n this.close('dismiss'),\n );\n clearOnDetach(this.overlayRef, {\n current: () => this.overlayRef,\n always: removeScrollClose,\n clear: () => {\n this.overlayRef = null;\n this.setOpen(false);\n },\n });\n const portal = new TemplatePortal(this.panelTpl(), this.vcr);\n this.overlayRef.attach(portal);\n this.setOpen(true);\n }\n\n protected close(cause: DsOverlayCloseCause = 'select'): void {\n disposeWithLeave(this.overlayRef, cause);\n this.overlayRef = null;\n this.setOpen(false);\n this.activeIndex.set(-1);\n this.markTouched();\n }\n\n ngOnDestroy(): void {\n this.overlayRef?.dispose();\n this.overlayRef = null;\n }\n\n protected pick(option: SelectOption, groupDisabled = false): void {\n if (option.disabled || groupDisabled) {\n return;\n }\n this.value.set(option.value);\n this.close();\n this.trigger().nativeElement.focus();\n }\n\n protected clearValue(event: MouseEvent): void {\n event.stopPropagation();\n this.clear();\n this.markTouched();\n }\n\n /**\n * Empties the selection from outside — a \"reset filters\" button, a form the app\n * clears itself.\n *\n * Deliberately does NOT move focus: the caller may be navigating away, and\n * stealing focus back into a field they just left is worse than leaving it.\n */\n clear(): void {\n this.value.set('');\n if (this.open()) {\n this.close('dismiss');\n }\n }\n\n protected isSelected(option: SelectOption): boolean {\n return option.value === this.value();\n }\n\n protected isOptionDisabled(\n option: SelectOption,\n groupDisabled = false,\n ): boolean {\n return !!option.disabled || groupDisabled;\n }\n\n protected onTriggerKeydown(event: KeyboardEvent): void {\n this.cursorFromKeyboard.set(true);\n if (\n this.isDisabled() ||\n this.isReadOnly() ||\n this.preview.staticPreview()\n ) {\n return;\n }\n // Only handle keys aimed at the trigger itself — a keydown bubbling up from\n // the nested clear <button> must reach its own activation (Enter/Space to\n // clear), not be hijacked here into reopening the panel.\n if (event.target !== event.currentTarget) {\n return;\n }\n const key = event.key;\n if (!this.open()) {\n if (\n key === 'ArrowDown' ||\n key === 'ArrowUp' ||\n key === 'Enter' ||\n key === ' '\n ) {\n event.preventDefault();\n this.openPanel();\n\n return;\n }\n // A native <select> commits as you type without opening, so the value changes under\n // the closed trigger.\n if (this.handleTypeAhead(key)) {\n event.preventDefault();\n this.pickActive();\n }\n\n return;\n }\n if (key === 'Tab') {\n // Close the panel but let Tab move focus naturally (no preventDefault),\n // else the open overlay panel lingers behind the moved focus.\n this.close();\n\n return;\n }\n if (key === 'Escape') {\n event.preventDefault();\n this.close('dismiss');\n\n return;\n }\n if (key === 'ArrowDown') {\n event.preventDefault();\n this.moveActive(1);\n\n return;\n }\n if (key === 'ArrowUp') {\n event.preventDefault();\n this.moveActive(-1);\n\n return;\n }\n if (key === 'Enter' || key === ' ') {\n event.preventDefault();\n const index = this.activeIndex();\n const entry = this.flatOptions()[index];\n if (entry) {\n this.pick(entry.option, entry.groupDisabled);\n }\n\n return;\n }\n if (key === 'PageDown') {\n event.preventDefault();\n this.moveActive(SelectComponent.pageStep);\n\n return;\n }\n if (key === 'PageUp') {\n event.preventDefault();\n this.moveActive(-SelectComponent.pageStep);\n\n return;\n }\n if (key === 'Home') {\n event.preventDefault();\n this.activeIndex.set(this.firstEnabledIndex());\n\n return;\n }\n if (key === 'End') {\n event.preventDefault();\n this.activeIndex.set(this.lastEnabledIndex());\n\n return;\n }\n if (this.handleTypeAhead(key)) {\n event.preventDefault();\n }\n }\n\n private pickActive(): void {\n const entry = this.flatOptions()[this.activeIndex()];\n if (entry) {\n this.pick(entry.option, entry.groupDisabled);\n }\n }\n\n protected isActive(index: number): boolean {\n return this.activeIndex() === index;\n }\n\n private readonly typeAhead = createTypeAhead();\n\n private handleTypeAhead(key: string): boolean {\n const index = this.typeAhead.match(\n key,\n this.flatOptions().map((entry) => entry.option.label),\n this.activeIndex(),\n );\n if (index < 0) {\n return false;\n }\n this.activeIndex.set(index);\n\n return true;\n }\n\n protected readonly cursorFromKeyboard = signal(false);\n\n private cursorList() {\n const opts = this.flatOptions();\n\n return {\n length: opts.length,\n isEnabled: (index: number) =>\n !opts[index].option.disabled && !opts[index].groupDisabled,\n };\n }\n\n /** How far PageUp and PageDown move. Ten rows is the native `<select>` step and\n * the APG listbox example's — a fixed number rather than a measured screenful,\n * so the jump is the same wherever the panel happens to be clipped. */\n private static readonly pageStep = 10;\n\n private moveActive(delta: number): void {\n const next = nextEnabledIndex(this.cursorList(), this.activeIndex(), delta);\n if (next >= 0) {\n this.activeIndex.set(next);\n }\n }\n\n private setOpen(next: boolean): void {\n if (this.open() === next) {\n return;\n }\n this.open.set(next);\n (next ? this.opened : this.closed).emit();\n }\n\n private lastEnabledIndex(): number {\n return lastEnabledOf(this.cursorList());\n }\n\n private firstEnabledIndex(): number {\n return firstEnabledOf(this.cursorList());\n }\n}\n","@if (label()) {\n <span\n class=\"label\"\n [id]=\"labelId\">\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\">\n {{ intl().field.optional }}\n </span>\n }\n </span>\n}\n\n<div\n #trigger\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n dsTooltip\n dsTooltipWhenClipped\n dsTooltipTextSelector=\".trigger-text\"\n [class]=\"triggerClasses()\"\n [attr.name]=\"name()\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"open() || preview.staticPreview()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"describedByIds(hintId(), groupMessage())\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\">\n @if (selectedOption()?.icon) {\n <ds-icon\n class=\"trigger-icon\"\n [name]=\"selectedOption()!.icon!\"\n [size]=\"16\" />\n }\n\n @if (pickerTrigger(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: selectedOption(),\n selected: selectedOption(),\n count: hasValue() ? 1 : 0,\n open: open(),\n disabled: isDisabled(),\n }\" />\n } @else {\n <span\n class=\"trigger-text\"\n [class.is-placeholder]=\"!hasValue()\">\n {{ displayLabel() }}\n </span>\n }\n\n @if (\n clearable() &&\n hasValue() &&\n !isDisabled() &&\n !isReadOnly()\n ) {\n <button\n type=\"button\"\n class=\"clear-btn\"\n [attr.aria-label]=\"intl().picker.clearSelection\"\n (click)=\"clearValue($event)\">\n <ds-icon\n name=\"x\"\n [size]=\"14\" />\n </button>\n }\n\n <span class=\"chevron\">\n <ds-icon\n name=\"chevronDown\"\n [size]=\"14\" />\n </span>\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@if (preview.staticPreview()) {\n <div class=\"ds-dropdown-panel\">\n <ng-container [ngTemplateOutlet]=\"panelContentTpl()\" />\n </div>\n}\n\n<ng-template #panel>\n <ng-container [ngTemplateOutlet]=\"panelContentTpl()\" />\n</ng-template>\n\n<ng-template #panelContent>\n <div class=\"dropdown-panel\">\n @if (panelHeaderTemplate(); as tpl) {\n <div class=\"panel-header\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n count: options().length,\n total: options().length,\n query: '',\n }\" />\n </div>\n }\n\n <ul\n class=\"dropdown-list\"\n role=\"listbox\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [id]=\"listboxId\"\n [attr.aria-labelledby]=\"label() ? labelId : null\">\n @for (item of options(); track $index; let groupIdx = $index) {\n @if (isOptionGroup(item)) {\n <li\n class=\"optgroup\"\n role=\"group\"\n [attr.aria-label]=\"item.label\">\n <span\n class=\"optgroup-label\"\n [class.is-first]=\"groupIdx === 0\">\n @if (groupLabelTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: item,\n group: item,\n count: item.options.length,\n }\" />\n } @else {\n {{ item.label }}\n }\n </span>\n\n <ul\n class=\"optgroup-list\"\n role=\"presentation\">\n @for (opt of item.options; track opt.value) {\n <li role=\"presentation\">\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"option\"\n dsTooltip\n dsTooltipWhenClipped\n dsTooltipTextSelector=\".option-label\"\n [id]=\"optionId(flatIndexOf(opt))\"\n [attr.aria-selected]=\"isSelected(opt)\"\n [attr.aria-disabled]=\"\n isOptionDisabled(opt, item.disabled) ? 'true' : null\n \"\n [attr.aria-describedby]=\"\n opt.disabled && opt.disabledReason\n ? optionId(flatIndexOf(opt)) + '-reason'\n : null\n \"\n [class.is-selected]=\"isSelected(opt)\"\n [class.is-active]=\"isActive(flatIndexOf(opt))\"\n [class.is-disabled]=\"isOptionDisabled(opt, item.disabled)\"\n [disabled]=\"isOptionDisabled(opt, item.disabled)\"\n (click)=\"pick(opt, item.disabled)\"\n (mouseenter)=\"\n cursorFromKeyboard.set(false);\n activeIndex.set(flatIndexOf(opt))\n \">\n @if (opt.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"opt.icon\"\n [size]=\"16\" />\n }\n\n @if (opt.disabled && opt.disabledReason) {\n <span\n class=\"option-reason\"\n [id]=\"optionId(flatIndexOf(opt)) + '-reason'\">\n {{ opt.disabledReason }}\n </span>\n }\n\n <span\n class=\"option-label\">\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: opt,\n option: opt,\n }\" />\n } @else {\n {{ opt.label }}\n }\n </span>\n\n <span\n class=\"option-check\"\n [class.is-shown]=\"isSelected(opt)\">\n </span>\n </button>\n </li>\n }\n </ul>\n </li>\n } @else {\n <li role=\"presentation\">\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"option\"\n dsTooltip\n dsTooltipWhenClipped\n dsTooltipTextSelector=\".option-label\"\n [id]=\"optionId(flatIndexOf(item))\"\n [attr.aria-selected]=\"isSelected(item)\"\n [attr.aria-disabled]=\"item.disabled ? 'true' : null\"\n [class.is-selected]=\"isSelected(item)\"\n [class.is-active]=\"isActive(flatIndexOf(item))\"\n [class.is-disabled]=\"item.disabled\"\n [disabled]=\"item.disabled\"\n (click)=\"pick(item)\"\n (mouseenter)=\"\n cursorFromKeyboard.set(false);\n activeIndex.set(flatIndexOf(item))\n \">\n @if (item.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"item.icon\"\n [size]=\"16\" />\n }\n\n <span\n class=\"option-label\">\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: item,\n option: item,\n }\" />\n } @else {\n {{ item.label }}\n }\n </span>\n\n <span\n class=\"option-check\"\n [class.is-shown]=\"isSelected(item)\">\n </span>\n </button>\n </li>\n }\n }\n\n @if (loading()) {\n <li\n class=\"empty t-s\"\n role=\"presentation\">\n <ds-spinner size=\"sm\" />\n </li>\n } @else if (options().length === 0) {\n <li\n class=\"empty t-s\"\n role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ intl().picker.noOptions }}\n }\n </li>\n }\n </ul>\n\n @if (panelFooterTemplate(); as tpl) {\n <div class=\"panel-footer\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n count: options().length,\n total: options().length,\n query: '',\n }\" />\n </div>\n }\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["lastEnabledOf","firstEnabledOf"],"mappings":";;;;;;;;;;;;;;;AAgBM,SAAU,mBAAmB,CACjC,IAAgB,EAAA;AAEhB,IAAA,OAAO,eAAe,CAAC,IAAI,CAAC;AAC9B;;ACiFM,MAAO,eACX,SAAQ,sBAA8B,CAAA;AAGrB,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACvB,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;AACzC;AACwE;IACrD,OAAO,GAAG,YAAY,EAAE;AAE1B,IAAA,GA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AAA,CAAA,EAAA,CAAA,EAAA,kBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAGrB,6BAA6B,CAAA,EAAA,EAAA,GAC7B,EAAE,IAAI,EAAE,WAAW,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAEyB,wBAAwB,CAAA,EAAA,EAAA,GAAE;AACxE,4BAAA,IAAI,EAAE,WAAW;AAClB,yBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CA0C6C,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAEZ,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAEP,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzQ3D;;AAEG;;;;"}
|
|
@@ -184,7 +184,7 @@ class SidenavItemComponent {
|
|
|
184
184
|
return parts.join(' ');
|
|
185
185
|
}, ...(ngDevMode ? [{ debugName: "linkClasses" }] : /* istanbul ignore next */ []));
|
|
186
186
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SidenavItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
187
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SidenavItemComponent, isStandalone: true, selector: "ds-sidenav-item", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, ariaCurrent: { classPropertyName: "ariaCurrent", publicName: "ariaCurrent", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, hasAlert: { classPropertyName: "hasAlert", publicName: "hasAlert", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, rail: { classPropertyName: "rail", publicName: "rail", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activate: "activate" }, ngImport: i0, template: "<!-- Selector-scoped slots ([icon], [trailing]) coexist with no default\n <ng-content> here \u2014 projection goes via attributes only, so consumers\n can compose icon + label + arbitrary trailing content (status pill,\n status icon, etc.). The two <a> variants (routerLink vs href) share one\n #content template so the inner markup isn't duplicated. -->\n@if (routerLink()) {\n <a\n routerLinkActive=\"active\"\n dsTooltipPlacement=\"right\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else if (href()) {\n <a\n dsTooltipPlacement=\"right\"\n [href]=\"href()\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else {\n <!-- No destination, so not a link: an `href=\"#\"` navigates \u2014 it rewrites the URL\n and discards the scroll position on every click. An item that only emits\n `activate` is a button. -->\n <button\n type=\"button\"\n dsTooltipPlacement=\"right\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [disabled]=\"disabled()\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n}\n\n<ng-template #content>\n @if (icon()) {\n <ds-icon\n class=\"icon\"\n [name]=\"icon()!\"\n [size]=\"20\">\n </ds-icon>\n } @else {\n <span class=\"icon\">\n <ng-content select=\"[icon]\"></ng-content>\n </span>\n }\n\n @if (label()) {\n <span class=\"item-label\">\n {{ label() }}\n </span>\n }\n\n <span class=\"trailing\">\n <ng-content select=\"[trailing]\"></ng-content>\n </span>\n\n @if (badge() !== null) {\n <span class=\"count\">\n {{ badge() }}\n </span>\n }\n\n @if (hasAlert()) {\n <span class=\"alert\"></span>\n }\n</ng-template>\n", styles: ["@charset \"UTF-8\";: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{--_sidenav-item-label-color: var(--ds-sidenav-item-label-color, var(--text-secondary));--_sidenav-item-label-color-hover: var(--ds-sidenav-item-label-color-hover, var(--text-primary));--_sidenav-item-label-font-weight: var(--ds-sidenav-item-label-font-weight, var(--font-weight-semibold));--_sidenav-item-bg-color-hover: var(--ds-sidenav-item-bg-color-hover, var(--surface-secondary));--_sidenav-item-bg-color-active: var(--ds-sidenav-item-bg-color-active, var(--accent-subtitle));--_sidenav-item-label-color-active: var(--ds-sidenav-item-label-color-active, var(--accent-strong));--_sidenav-item-bg-color-active-hover: var(--ds-sidenav-item-bg-color-active-hover, var(--accent-muted));--_sidenav-item-rail: var(--ds-sidenav-item-rail, var(--accent-strong));--_sidenav-item-radius: var(--ds-sidenav-item-radius, var(--ds-radius-control));--_sidenav-alert-color: var(--ds-sidenav-alert-color, var(--error));display:block}.item{width:100%;border:0;background:transparent;text-align:left;display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-3);border-radius:var(--_sidenav-item-radius);color:var(--_sidenav-item-label-color);text-decoration:none;font:var(--_sidenav-item-label-font-weight) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;transition:background var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard);position:relative}.item:hover{background-color:var(--_sidenav-item-bg-color-hover);color:var(--_sidenav-item-label-color-hover)}.item: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)}.item:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.item.active{background-color:var(--_sidenav-item-bg-color-active);color:var(--_sidenav-item-label-color-active)}.item.active:not(:focus-visible){box-shadow:inset var(--sidenav-item-rail-width) 0 0 var(--_sidenav-item-rail)}.item.active.no-rail:not(:focus-visible){box-shadow:none}.item.active:hover{background-color:var(--_sidenav-item-bg-color-active-hover)}.item .icon{width:var(--icon-lg);height:var(--icon-lg);color:currentcolor;flex-shrink:0}.item .item-label{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1}.item .count{min-width:var(--badge-count-size);height:var(--badge-count-size);padding:0 var(--space-1-5);display:inline-grid;place-items:center;border-radius:var(--radius-pill);background:var(--surface-secondary);color:var(--text-secondary);font:var(--font-weight-bold) var(--font-size-2xs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--letter-spacing-wide);margin-left:auto}.item .alert{width:var(--badge-dot-size);height:var(--badge-dot-size);background:var(--_sidenav-alert-color);border-radius:var(--radius-pill);margin-left:auto}.item .trailing{display:inline-flex;align-items:center;margin-left:auto;color:var(--text-tertiary);flex-shrink:0}.item.active .trailing{color:currentcolor}.item.disabled{color:var(--text-disabled);cursor:not-allowed}.item.disabled:hover{background:unset;color:var(--text-disabled)}:host-context(.sidenav.collapsed) .item{justify-content:center;padding:0;width:100%;height:var(--sidenav-collapsed-item);gap:0;font-size:0}:host-context(.sidenav.collapsed) .item .icon{font-size:0}:host-context(.sidenav.collapsed) .item .item-label,:host-context(.sidenav.collapsed) .item .count,:host-context(.sidenav.collapsed) .item .trailing{display:none}:host-context(.sidenav.collapsed) .item .alert{position:absolute;top:calc(50% - var(--sidenav-collapsed-glyph) / 2);left:calc(50% + var(--sidenav-collapsed-glyph) / 2);transform:translate(-50%,-50%);margin:0}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TooltipDirective, selector: "[dsTooltip]", inputs: ["dsTooltip", "dsTooltipPlacement", "dsTooltipDelay", "dsTooltipWhenClipped"] }] });
|
|
187
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SidenavItemComponent, isStandalone: true, selector: "ds-sidenav-item", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, ariaCurrent: { classPropertyName: "ariaCurrent", publicName: "ariaCurrent", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, hasAlert: { classPropertyName: "hasAlert", publicName: "hasAlert", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, rail: { classPropertyName: "rail", publicName: "rail", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activate: "activate" }, ngImport: i0, template: "<!-- Selector-scoped slots ([icon], [trailing]) coexist with no default\n <ng-content> here \u2014 projection goes via attributes only, so consumers\n can compose icon + label + arbitrary trailing content (status pill,\n status icon, etc.). The two <a> variants (routerLink vs href) share one\n #content template so the inner markup isn't duplicated. -->\n@if (routerLink()) {\n <a\n routerLinkActive=\"active\"\n dsTooltipPlacement=\"right\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else if (href()) {\n <a\n dsTooltipPlacement=\"right\"\n [href]=\"href()\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else {\n <!-- No destination, so not a link: an `href=\"#\"` navigates \u2014 it rewrites the URL\n and discards the scroll position on every click. An item that only emits\n `activate` is a button. -->\n <button\n type=\"button\"\n dsTooltipPlacement=\"right\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [disabled]=\"disabled()\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n}\n\n<ng-template #content>\n @if (icon()) {\n <ds-icon\n class=\"icon\"\n [name]=\"icon()!\"\n [size]=\"20\">\n </ds-icon>\n } @else {\n <span class=\"icon\">\n <ng-content select=\"[icon]\"></ng-content>\n </span>\n }\n\n @if (label()) {\n <span class=\"item-label\">\n {{ label() }}\n </span>\n }\n\n <span class=\"trailing\">\n <ng-content select=\"[trailing]\"></ng-content>\n </span>\n\n @if (badge() !== null) {\n <span class=\"count\">\n {{ badge() }}\n </span>\n }\n\n @if (hasAlert()) {\n <span class=\"alert\"></span>\n }\n</ng-template>\n", styles: ["@charset \"UTF-8\";: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{--_sidenav-item-label-color: var(--ds-sidenav-item-label-color, var(--text-secondary));--_sidenav-item-label-color-hover: var(--ds-sidenav-item-label-color-hover, var(--text-primary));--_sidenav-item-label-font-weight: var(--ds-sidenav-item-label-font-weight, var(--font-weight-semibold));--_sidenav-item-bg-color-hover: var(--ds-sidenav-item-bg-color-hover, var(--surface-secondary));--_sidenav-item-bg-color-active: var(--ds-sidenav-item-bg-color-active, var(--accent-subtitle));--_sidenav-item-label-color-active: var(--ds-sidenav-item-label-color-active, var(--accent-strong));--_sidenav-item-bg-color-active-hover: var(--ds-sidenav-item-bg-color-active-hover, var(--accent-muted));--_sidenav-item-rail: var(--ds-sidenav-item-rail, var(--accent-strong));--_sidenav-item-radius: var(--ds-sidenav-item-radius, var(--ds-radius-control));--_sidenav-alert-color: var(--ds-sidenav-alert-color, var(--error));display:block}.item{width:100%;border:0;background:transparent;text-align:left;display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-3);border-radius:var(--_sidenav-item-radius);color:var(--_sidenav-item-label-color);text-decoration:none;font:var(--_sidenav-item-label-font-weight) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;transition:background var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard);position:relative}.item:hover{background-color:var(--_sidenav-item-bg-color-hover);color:var(--_sidenav-item-label-color-hover)}.item: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)}.item:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.item.active{background-color:var(--_sidenav-item-bg-color-active);color:var(--_sidenav-item-label-color-active)}.item.active:not(:focus-visible){box-shadow:inset var(--sidenav-item-rail-width) 0 0 var(--_sidenav-item-rail)}.item.active.no-rail:not(:focus-visible){box-shadow:none}.item.active:hover{background-color:var(--_sidenav-item-bg-color-active-hover)}.item .icon{width:var(--icon-lg);height:var(--icon-lg);color:currentcolor;flex-shrink:0}.item .item-label{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1}.item .count{min-width:var(--badge-count-size);height:var(--badge-count-size);padding:0 var(--space-1-5);display:inline-grid;place-items:center;border-radius:var(--radius-pill);background:var(--surface-secondary);color:var(--text-secondary);font:var(--font-weight-bold) var(--font-size-2xs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--letter-spacing-wide);margin-left:auto}.item .alert{width:var(--badge-dot-size);height:var(--badge-dot-size);background:var(--_sidenav-alert-color);border-radius:var(--radius-pill);margin-left:auto}.item .trailing{display:inline-flex;align-items:center;margin-left:auto;color:var(--text-tertiary);flex-shrink:0}.item.active .trailing{color:currentcolor}.item.disabled{color:var(--text-disabled);cursor:not-allowed}.item.disabled:hover{background:unset;color:var(--text-disabled)}:host-context(.sidenav.collapsed) .item{justify-content:center;padding:0;width:100%;height:var(--sidenav-collapsed-item);gap:0;font-size:0}:host-context(.sidenav.collapsed) .item .icon{font-size:0}:host-context(.sidenav.collapsed) .item .item-label,:host-context(.sidenav.collapsed) .item .count,:host-context(.sidenav.collapsed) .item .trailing{display:none}:host-context(.sidenav.collapsed) .item .alert{position:absolute;top:calc(50% - var(--sidenav-collapsed-glyph) / 2);left:calc(50% + var(--sidenav-collapsed-glyph) / 2);transform:translate(-50%,-50%);margin:0}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TooltipDirective, selector: "[dsTooltip]", inputs: ["dsTooltip", "dsTooltipPlacement", "dsTooltipDelay", "dsTooltipWhenClipped", "dsTooltipTextSelector"] }] });
|
|
188
188
|
}
|
|
189
189
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SidenavItemComponent, decorators: [{
|
|
190
190
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-sidenav.mjs","sources":["../../../src/lib/components/sidenav/brand-name.directive.ts","../../../src/lib/components/sidenav/sidenav.token.ts","../../../src/lib/components/sidenav/sidenav.component.ts","../../../src/lib/components/sidenav/sidenav.component.html","../../../src/lib/components/sidenav/sidenav-group.component.ts","../../../src/lib/components/sidenav/sidenav-group.component.html","../../../src/lib/components/sidenav/sidenav-item.component.ts","../../../src/lib/components/sidenav/sidenav-item.component.html","../../../src/lib/components/sidenav/ids-group-ltd-ids-design-system-components-sidenav.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * Marks projected wordmark markup for `ds-sidenav`: when present, the sidenav\n * renders the projected content inside `.brand-name` instead of the plain\n * `brand` text (two-tone wordmarks, inline logos etc. stay consumer-side).\n *\n * Interplay: projecting `[dsBrandName]` is enough to render the brand row and\n * its wordmark even without a string `brand`, but it only supplies the\n * wordmark — the letter-mark tile still comes from `logoLetter` (or the first\n * letter of `brand`), so an empty `brand` + projection renders the wordmark\n * with no tile.\n */\n@Directive({\n selector: '[dsBrandName]',\n standalone: true,\n})\nexport class BrandNameDirective {}\n","import { InjectionToken } from '@angular/core';\n\n/** Contract that ds-sidenav-item reads from its parent ds-sidenav. */\nexport interface SidenavContract {\n readonly collapsed: () => boolean;\n /** Whether the active item draws its edge marker. Set once on the sidenav; an\n * item can still override it for itself. */\n readonly rail: () => boolean;\n}\n\nexport const SIDENAV = new InjectionToken<SidenavContract>('SIDENAV');\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n input,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { BrandNameDirective } from './brand-name.directive';\nimport { resolveBrandValue } from '@ids-group-ltd/ids-design-system/components';\nimport { SIDENAV, type SidenavContract } from './sidenav.token';\n\n@Component({\n selector: 'ds-sidenav',\n standalone: true,\n imports: [NgTemplateOutlet, RouterLink],\n templateUrl: './sidenav.component.html',\n styleUrl: './sidenav.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.sidenav]': 'true',\n '[class.collapsed]': 'collapsed()',\n },\n providers: [{ provide: SIDENAV, useExisting: SidenavComponent }],\n})\nexport class SidenavComponent implements SidenavContract {\n /** Collapses the rail to icon-only width; read by nested `ds-sidenav-item`/`ds-sidenav-group`. */\n readonly collapsed = input(false, { transform: booleanAttribute });\n /** Whether the ACTIVE item draws its edge marker, for the whole sidenav. Off\n * leaves the active state on the fill and the label alone — check that is still\n * distinguishable before turning it off. An individual `ds-sidenav-item` can\n * override this with its own `rail`. */\n readonly rail = input(true, { transform: booleanAttribute });\n /** Brand text at the top of the rail (auto letter-mark + name). For a custom\n * logo image/SVG, project it into the `[brand]` slot instead. Unset falls back\n * to `DS_CONFIG.brand.name`. Each field resolves on its own, so `brand=\"\"` drops\n * the wordmark while a `logoLetter` in the config still paints its tile. */\n readonly brand = input<string | null>(null);\n /** Letter-mark glyph when it differs from the brand's first letter (e.g. an\n * \"A\" tile beside the \"AppAdmin\" wordmark). Empty = first letter of `brand`;\n * unset falls back to `DS_CONFIG.brand.logoLetter`. */\n readonly logoLetter = input<string | null>(null);\n /** Route the brand row links to — typically the app's home. Unset leaves the row a\n * plain, non-interactive block. Router targets only, and `RouterLink` is\n * instantiated only once this is set, so an app with no router still renders. */\n readonly brandRoute = input<string | readonly unknown[] | null>(null);\n /** Accessible name for the brand link; unset names it \"<brand>, home\". Ignored\n * while `brandRoute` is unset. */\n readonly brandLinkLabel = input<string | null>(null);\n\n /** The template must read THIS, never the input beside it — that one is null\n * until bound, and the config default lives here. */\n readonly brandName = resolveBrandValue(this.brand, 'name');\n readonly letterGlyph = resolveBrandValue(this.logoLetter, 'logoLetter');\n\n /** Projected `[dsBrandName]` wordmark markup, when the consumer provides one. */\n protected readonly brandNameRef = contentChild(BrandNameDirective);\n protected readonly hasBrandName = computed(() => !!this.brandNameRef());\n\n /** Spread, not `charAt(0)`: the latter indexes UTF-16 code UNITS, so a brand\n * starting with an astral character (an emoji, a rarer CJK glyph) yields half\n * a surrogate pair and paints as tofu. */\n protected readonly markGlyph = computed(\n () => this.letterGlyph() || [...this.brandName()][0] || '',\n );\n\n protected readonly brandAriaLabel = computed(() => {\n const own = this.brandLinkLabel();\n if (own) {\n return own;\n }\n const name = this.brandName();\n\n return name ? `${name}, home` : 'Home';\n });\n}\n","@if (brandRoute()) {\n <a\n class=\"brand brand-link\"\n [routerLink]=\"brandRoute()\"\n [attr.aria-label]=\"brandAriaLabel()\">\n <ng-container [ngTemplateOutlet]=\"brandContent\" />\n </a>\n} @else {\n <div class=\"brand\">\n <ng-container [ngTemplateOutlet]=\"brandContent\" />\n </div>\n}\n\n<ng-template #brandContent>\n <ng-content select=\"[brand]\"></ng-content>\n\n @if (letterGlyph() || brandName()) {\n <span\n class=\"mark\"\n aria-hidden=\"true\">\n {{ markGlyph() }}\n </span>\n }\n\n @if (brandName() || hasBrandName()) {\n <span class=\"brand-name\">\n @if (hasBrandName()) {\n <ng-content select=\"[dsBrandName]\"></ng-content>\n } @else {\n {{ brandName() }}\n }\n </span>\n }\n</ng-template>\n\n<ng-content></ng-content>\n","import { dsAriaCurrent } from '@ids-group-ltd/ids-design-system/components';\nimport type {\n DsAriaCurrent,\n DsLinkModifiers,\n DsRouterLink,\n} from '@ids-group-ltd/ids-design-system/components';\nimport {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-sidenav-group',\n standalone: true,\n imports: [IconComponent, NgTemplateOutlet, RouterLink, RouterLinkActive],\n templateUrl: './sidenav-group.component.html',\n styleUrl: './sidenav-group.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class SidenavGroupComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Group heading text. */\n readonly label = input<string>('');\n /** Optional group icon; omit to project custom content via the `[icon]` slot instead. */\n readonly icon = input<IconName | null>(null);\n /** When true, the label/icon row becomes a clickable header that expands/collapses the group. */\n readonly expandable = input(false, { transform: booleanAttribute });\n /** Makes the group a destination of its own as well as a container: the header navigates here\n * and the caret becomes a separate control, because one control cannot both go somewhere and\n * stay to open something. Unset (the default) the whole header only expands — a heading that\n * navigates closes the page being read the moment someone reaches for the group beneath it. */\n readonly routerLink = input<DsRouterLink>(null);\n /** Overrides what the group header announces when it is itself a destination. Unset, the page\n * the reader is on announces `page` and the section containing it announces `true`. */\n readonly ariaCurrent = input<DsAriaCurrent | null | undefined>(undefined);\n /** Two-way bindable open state; defaults open so a non-expandable group always shows its items. */\n readonly expanded = model<boolean>(true);\n\n /** A header that navigates hands the caret its own button; one that does not is the button. */\n private readonly noModifiers = computed<DsLinkModifiers>(() => ({}));\n protected readonly ariaCurrentResolved = dsAriaCurrent(\n this.routerLink,\n this.noModifiers,\n this.ariaCurrent,\n );\n\n protected readonly headerNavigates = computed(\n () => this.expandable() && this.routerLink() !== null,\n );\n\n protected toggle(): void {\n if (!this.expandable()) {\n return;\n }\n this.expanded.update((value) => !value);\n }\n}\n","<!-- Single <ng-content> outside any @if blocks. Angular accepts only one\n default slot per component; duplicate <ng-content> elements caused\n children to silently drop when control flow chose a non-matching branch.\n The same holds for the named [ds-group-icon] slot, which is why the icon\n and title live in ONE template both header branches stamp out. -->\n<ng-template #headerContent>\n @if (icon()) {\n <ds-icon\n class=\"group-icon\"\n [name]=\"icon()!\"\n [size]=\"18\">\n </ds-icon>\n } @else {\n <!-- `[ds-group-icon]` is selector-distinct from `[icon]` slots used on\n sidenav-item children, so projected icons don't get swallowed when\n a consumer puts items inside the group. -->\n <span class=\"group-icon\">\n <ng-content select=\"[ds-group-icon]\"></ng-content>\n </span>\n }\n\n @if (label()) {\n <span class=\"group-title\">\n {{ label() }}\n </span>\n }\n</ng-template>\n\n@if (headerNavigates()) {\n <div class=\"group-header-row\">\n <a\n class=\"group-header\"\n routerLinkActive=\"active\"\n [routerLink]=\"routerLink()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\">\n <ng-container [ngTemplateOutlet]=\"headerContent\" />\n </a>\n\n <button\n type=\"button\"\n class=\"group-caret-button\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-label]=\"\n expanded()\n ? intl().sidenav.collapseGroup(label())\n : intl().sidenav.expandGroup(label())\n \"\n (click)=\"toggle()\">\n <ds-icon\n class=\"group-caret\"\n name=\"chevronDown\"\n [class.open]=\"expanded()\"\n [size]=\"14\">\n </ds-icon>\n </button>\n </div>\n} @else if (expandable()) {\n <button\n type=\"button\"\n class=\"group-header\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"toggle()\">\n <ng-container [ngTemplateOutlet]=\"headerContent\" />\n\n <ds-icon\n class=\"group-caret\"\n name=\"chevronDown\"\n [class.open]=\"expanded()\"\n [size]=\"14\">\n </ds-icon>\n </button>\n} @else if (label()) {\n <span class=\"group-label\">\n {{ label() }}\n </span>\n}\n\n<div\n class=\"group-body\"\n [class.hidden]=\"expandable() && !expanded()\"\n [attr.inert]=\"expandable() && !expanded() ? '' : null\">\n <ng-content></ng-content>\n</div>\n","import { dsAriaCurrent } from '@ids-group-ltd/ids-design-system/components';\nimport type {\n DsAriaCurrent,\n DsLinkModifiers,\n DsRouterLink,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { SIDENAV } from './sidenav.token';\n\n@Component({\n selector: 'ds-sidenav-item',\n standalone: true,\n imports: [\n IconComponent,\n RouterLink,\n RouterLinkActive,\n NgTemplateOutlet,\n TooltipDirective,\n ],\n templateUrl: './sidenav-item.component.html',\n styleUrl: './sidenav-item.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class SidenavItemComponent {\n /** Icon shown before the label; omit to project a custom icon via the `[icon]` slot instead. */\n readonly icon = input<IconName | null>(null);\n /** Visible link text; also used as the tooltip/aria-label when the rail is collapsed. */\n readonly label = input.required<string>();\n /** Plain `href` target, used when `routerLink` is not set. */\n readonly href = input<string>('');\n /** Angular `RouterLink` target — string or array form for dynamic segments. */\n readonly routerLink = input<DsRouterLink>(null);\n /** Applies the active style; also drives `aria-current` when not using `routerLink`. */\n readonly active = input(false, { transform: booleanAttribute });\n /** Overrides what an active item announces. Unset, an exact match announces `page` and a prefix\n * match announces `true` — in a sidenav the prefix case is \"you are in this section\", which is\n * exactly what `true` means. */\n readonly ariaCurrent = input<DsAriaCurrent | null | undefined>(undefined);\n /** Numeric count shown at the end of the item. */\n readonly badge = input<number | null>(null);\n /** Shows an alert dot alongside the badge. */\n readonly hasAlert = input(false, { transform: booleanAttribute });\n /** Disables the item — non-navigable and styled as inactive. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Emitted on click, carrying the `MouseEvent`. On an `href` item,\n * `preventDefault()` intercepts navigation (e.g. a docs sidebar driving\n * scroll-spy); a `routerLink` item navigates regardless — Angular's\n * RouterLink ignores `defaultPrevented` — so treat it as a click hook there. */\n readonly activate = output<MouseEvent>();\n\n /** Whether THIS item draws its edge marker when active. Unset follows the parent\n * `ds-sidenav`, then on — the same \"null means not deciding\" reading as the rest\n * of the library, so a sidenav-wide `[rail]=\"false\"` is not fought per item. */\n readonly rail = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n private readonly sidenav = inject(SIDENAV, { optional: true });\n\n private readonly noModifiers = computed<DsLinkModifiers>(() => ({}));\n protected readonly ariaCurrentResolved = dsAriaCurrent(\n this.routerLink,\n this.noModifiers,\n this.ariaCurrent,\n );\n\n protected readonly railResolved = computed(\n () => this.rail() ?? this.sidenav?.rail() ?? true,\n );\n\n protected onActivate(event: MouseEvent): void {\n if (this.disabled()) {\n return;\n }\n this.activate.emit(event);\n }\n\n /** Tooltip text shown when collapsed; empty string suppresses the tooltip when expanded. */\n protected readonly collapsedTooltip = computed(() =>\n this.sidenav?.collapsed() ? this.label() : '',\n );\n\n // Only name the link via aria-label when collapsed (icon-only, the .item-label\n // is display:none). Expanded, the visible label names it and any aria-label\n // would override it — suppressing the badge count / alert dot from the name.\n protected readonly collapsedAriaLabel = computed(() =>\n this.sidenav?.collapsed() ? this.label() : null,\n );\n\n protected readonly linkClasses = computed(() => {\n const parts = ['item'];\n if (this.active()) {\n parts.push('active');\n }\n // The routerLink variant gets `active` from routerLinkActive, not from here,\n // so the rail opt-out has to be a class of its own rather than folded in.\n if (!this.railResolved()) {\n parts.push('no-rail');\n }\n if (this.disabled()) {\n parts.push('disabled');\n }\n\n return parts.join(' ');\n });\n}\n","<!-- Selector-scoped slots ([icon], [trailing]) coexist with no default\n <ng-content> here — projection goes via attributes only, so consumers\n can compose icon + label + arbitrary trailing content (status pill,\n status icon, etc.). The two <a> variants (routerLink vs href) share one\n #content template so the inner markup isn't duplicated. -->\n@if (routerLink()) {\n <a\n routerLinkActive=\"active\"\n dsTooltipPlacement=\"right\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else if (href()) {\n <a\n dsTooltipPlacement=\"right\"\n [href]=\"href()\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else {\n <!-- No destination, so not a link: an `href=\"#\"` navigates — it rewrites the URL\n and discards the scroll position on every click. An item that only emits\n `activate` is a button. -->\n <button\n type=\"button\"\n dsTooltipPlacement=\"right\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [disabled]=\"disabled()\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n}\n\n<ng-template #content>\n @if (icon()) {\n <ds-icon\n class=\"icon\"\n [name]=\"icon()!\"\n [size]=\"20\">\n </ds-icon>\n } @else {\n <span class=\"icon\">\n <ng-content select=\"[icon]\"></ng-content>\n </span>\n }\n\n @if (label()) {\n <span class=\"item-label\">\n {{ label() }}\n </span>\n }\n\n <span class=\"trailing\">\n <ng-content select=\"[trailing]\"></ng-content>\n </span>\n\n @if (badge() !== null) {\n <span class=\"count\">\n {{ badge() }}\n </span>\n }\n\n @if (hasAlert()) {\n <span class=\"alert\"></span>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEA;;;;;;;;;;AAUG;MAKU,kBAAkB,CAAA;wGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,o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AAA,gBAAA,EAAA,sBAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAMP,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAdhC,SAAS;+BACE,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP;wBACP,aAAa;wBACb,UAAU;wBACV,gBAAgB;wBAChB,gBAAgB;wBAChB,gBAAgB;qBACjB,EAAA,aAAA,EAGc,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,ihFAAA,EAAA,MAAA,EAAA,CAAA,6tJAAA,CAAA,EAAA;;;AElC3C;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-sidenav.mjs","sources":["../../../src/lib/components/sidenav/brand-name.directive.ts","../../../src/lib/components/sidenav/sidenav.token.ts","../../../src/lib/components/sidenav/sidenav.component.ts","../../../src/lib/components/sidenav/sidenav.component.html","../../../src/lib/components/sidenav/sidenav-group.component.ts","../../../src/lib/components/sidenav/sidenav-group.component.html","../../../src/lib/components/sidenav/sidenav-item.component.ts","../../../src/lib/components/sidenav/sidenav-item.component.html","../../../src/lib/components/sidenav/ids-group-ltd-ids-design-system-components-sidenav.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * Marks projected wordmark markup for `ds-sidenav`: when present, the sidenav\n * renders the projected content inside `.brand-name` instead of the plain\n * `brand` text (two-tone wordmarks, inline logos etc. stay consumer-side).\n *\n * Interplay: projecting `[dsBrandName]` is enough to render the brand row and\n * its wordmark even without a string `brand`, but it only supplies the\n * wordmark — the letter-mark tile still comes from `logoLetter` (or the first\n * letter of `brand`), so an empty `brand` + projection renders the wordmark\n * with no tile.\n */\n@Directive({\n selector: '[dsBrandName]',\n standalone: true,\n})\nexport class BrandNameDirective {}\n","import { InjectionToken } from '@angular/core';\n\n/** Contract that ds-sidenav-item reads from its parent ds-sidenav. */\nexport interface SidenavContract {\n readonly collapsed: () => boolean;\n /** Whether the active item draws its edge marker. Set once on the sidenav; an\n * item can still override it for itself. */\n readonly rail: () => boolean;\n}\n\nexport const SIDENAV = new InjectionToken<SidenavContract>('SIDENAV');\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n input,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { BrandNameDirective } from './brand-name.directive';\nimport { resolveBrandValue } from '@ids-group-ltd/ids-design-system/components';\nimport { SIDENAV, type SidenavContract } from './sidenav.token';\n\n@Component({\n selector: 'ds-sidenav',\n standalone: true,\n imports: [NgTemplateOutlet, RouterLink],\n templateUrl: './sidenav.component.html',\n styleUrl: './sidenav.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.sidenav]': 'true',\n '[class.collapsed]': 'collapsed()',\n },\n providers: [{ provide: SIDENAV, useExisting: SidenavComponent }],\n})\nexport class SidenavComponent implements SidenavContract {\n /** Collapses the rail to icon-only width; read by nested `ds-sidenav-item`/`ds-sidenav-group`. */\n readonly collapsed = input(false, { transform: booleanAttribute });\n /** Whether the ACTIVE item draws its edge marker, for the whole sidenav. Off\n * leaves the active state on the fill and the label alone — check that is still\n * distinguishable before turning it off. An individual `ds-sidenav-item` can\n * override this with its own `rail`. */\n readonly rail = input(true, { transform: booleanAttribute });\n /** Brand text at the top of the rail (auto letter-mark + name). For a custom\n * logo image/SVG, project it into the `[brand]` slot instead. Unset falls back\n * to `DS_CONFIG.brand.name`. Each field resolves on its own, so `brand=\"\"` drops\n * the wordmark while a `logoLetter` in the config still paints its tile. */\n readonly brand = input<string | null>(null);\n /** Letter-mark glyph when it differs from the brand's first letter (e.g. an\n * \"A\" tile beside the \"AppAdmin\" wordmark). Empty = first letter of `brand`;\n * unset falls back to `DS_CONFIG.brand.logoLetter`. */\n readonly logoLetter = input<string | null>(null);\n /** Route the brand row links to — typically the app's home. Unset leaves the row a\n * plain, non-interactive block. Router targets only, and `RouterLink` is\n * instantiated only once this is set, so an app with no router still renders. */\n readonly brandRoute = input<string | readonly unknown[] | null>(null);\n /** Accessible name for the brand link; unset names it \"<brand>, home\". Ignored\n * while `brandRoute` is unset. */\n readonly brandLinkLabel = input<string | null>(null);\n\n /** The template must read THIS, never the input beside it — that one is null\n * until bound, and the config default lives here. */\n readonly brandName = resolveBrandValue(this.brand, 'name');\n readonly letterGlyph = resolveBrandValue(this.logoLetter, 'logoLetter');\n\n /** Projected `[dsBrandName]` wordmark markup, when the consumer provides one. */\n protected readonly brandNameRef = contentChild(BrandNameDirective);\n protected readonly hasBrandName = computed(() => !!this.brandNameRef());\n\n /** Spread, not `charAt(0)`: the latter indexes UTF-16 code UNITS, so a brand\n * starting with an astral character (an emoji, a rarer CJK glyph) yields half\n * a surrogate pair and paints as tofu. */\n protected readonly markGlyph = computed(\n () => this.letterGlyph() || [...this.brandName()][0] || '',\n );\n\n protected readonly brandAriaLabel = computed(() => {\n const own = this.brandLinkLabel();\n if (own) {\n return own;\n }\n const name = this.brandName();\n\n return name ? `${name}, home` : 'Home';\n });\n}\n","@if (brandRoute()) {\n <a\n class=\"brand brand-link\"\n [routerLink]=\"brandRoute()\"\n [attr.aria-label]=\"brandAriaLabel()\">\n <ng-container [ngTemplateOutlet]=\"brandContent\" />\n </a>\n} @else {\n <div class=\"brand\">\n <ng-container [ngTemplateOutlet]=\"brandContent\" />\n </div>\n}\n\n<ng-template #brandContent>\n <ng-content select=\"[brand]\"></ng-content>\n\n @if (letterGlyph() || brandName()) {\n <span\n class=\"mark\"\n aria-hidden=\"true\">\n {{ markGlyph() }}\n </span>\n }\n\n @if (brandName() || hasBrandName()) {\n <span class=\"brand-name\">\n @if (hasBrandName()) {\n <ng-content select=\"[dsBrandName]\"></ng-content>\n } @else {\n {{ brandName() }}\n }\n </span>\n }\n</ng-template>\n\n<ng-content></ng-content>\n","import { dsAriaCurrent } from '@ids-group-ltd/ids-design-system/components';\nimport type {\n DsAriaCurrent,\n DsLinkModifiers,\n DsRouterLink,\n} from '@ids-group-ltd/ids-design-system/components';\nimport {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-sidenav-group',\n standalone: true,\n imports: [IconComponent, NgTemplateOutlet, RouterLink, RouterLinkActive],\n templateUrl: './sidenav-group.component.html',\n styleUrl: './sidenav-group.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class SidenavGroupComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Group heading text. */\n readonly label = input<string>('');\n /** Optional group icon; omit to project custom content via the `[icon]` slot instead. */\n readonly icon = input<IconName | null>(null);\n /** When true, the label/icon row becomes a clickable header that expands/collapses the group. */\n readonly expandable = input(false, { transform: booleanAttribute });\n /** Makes the group a destination of its own as well as a container: the header navigates here\n * and the caret becomes a separate control, because one control cannot both go somewhere and\n * stay to open something. Unset (the default) the whole header only expands — a heading that\n * navigates closes the page being read the moment someone reaches for the group beneath it. */\n readonly routerLink = input<DsRouterLink>(null);\n /** Overrides what the group header announces when it is itself a destination. Unset, the page\n * the reader is on announces `page` and the section containing it announces `true`. */\n readonly ariaCurrent = input<DsAriaCurrent | null | undefined>(undefined);\n /** Two-way bindable open state; defaults open so a non-expandable group always shows its items. */\n readonly expanded = model<boolean>(true);\n\n /** A header that navigates hands the caret its own button; one that does not is the button. */\n private readonly noModifiers = computed<DsLinkModifiers>(() => ({}));\n protected readonly ariaCurrentResolved = dsAriaCurrent(\n this.routerLink,\n this.noModifiers,\n this.ariaCurrent,\n );\n\n protected readonly headerNavigates = computed(\n () => this.expandable() && this.routerLink() !== null,\n );\n\n protected toggle(): void {\n if (!this.expandable()) {\n return;\n }\n this.expanded.update((value) => !value);\n }\n}\n","<!-- Single <ng-content> outside any @if blocks. Angular accepts only one\n default slot per component; duplicate <ng-content> elements caused\n children to silently drop when control flow chose a non-matching branch.\n The same holds for the named [ds-group-icon] slot, which is why the icon\n and title live in ONE template both header branches stamp out. -->\n<ng-template #headerContent>\n @if (icon()) {\n <ds-icon\n class=\"group-icon\"\n [name]=\"icon()!\"\n [size]=\"18\">\n </ds-icon>\n } @else {\n <!-- `[ds-group-icon]` is selector-distinct from `[icon]` slots used on\n sidenav-item children, so projected icons don't get swallowed when\n a consumer puts items inside the group. -->\n <span class=\"group-icon\">\n <ng-content select=\"[ds-group-icon]\"></ng-content>\n </span>\n }\n\n @if (label()) {\n <span class=\"group-title\">\n {{ label() }}\n </span>\n }\n</ng-template>\n\n@if (headerNavigates()) {\n <div class=\"group-header-row\">\n <a\n class=\"group-header\"\n routerLinkActive=\"active\"\n [routerLink]=\"routerLink()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\">\n <ng-container [ngTemplateOutlet]=\"headerContent\" />\n </a>\n\n <button\n type=\"button\"\n class=\"group-caret-button\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-label]=\"\n expanded()\n ? intl().sidenav.collapseGroup(label())\n : intl().sidenav.expandGroup(label())\n \"\n (click)=\"toggle()\">\n <ds-icon\n class=\"group-caret\"\n name=\"chevronDown\"\n [class.open]=\"expanded()\"\n [size]=\"14\">\n </ds-icon>\n </button>\n </div>\n} @else if (expandable()) {\n <button\n type=\"button\"\n class=\"group-header\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"toggle()\">\n <ng-container [ngTemplateOutlet]=\"headerContent\" />\n\n <ds-icon\n class=\"group-caret\"\n name=\"chevronDown\"\n [class.open]=\"expanded()\"\n [size]=\"14\">\n </ds-icon>\n </button>\n} @else if (label()) {\n <span class=\"group-label\">\n {{ label() }}\n </span>\n}\n\n<div\n class=\"group-body\"\n [class.hidden]=\"expandable() && !expanded()\"\n [attr.inert]=\"expandable() && !expanded() ? '' : null\">\n <ng-content></ng-content>\n</div>\n","import { dsAriaCurrent } from '@ids-group-ltd/ids-design-system/components';\nimport type {\n DsAriaCurrent,\n DsLinkModifiers,\n DsRouterLink,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { SIDENAV } from './sidenav.token';\n\n@Component({\n selector: 'ds-sidenav-item',\n standalone: true,\n imports: [\n IconComponent,\n RouterLink,\n RouterLinkActive,\n NgTemplateOutlet,\n TooltipDirective,\n ],\n templateUrl: './sidenav-item.component.html',\n styleUrl: './sidenav-item.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class SidenavItemComponent {\n /** Icon shown before the label; omit to project a custom icon via the `[icon]` slot instead. */\n readonly icon = input<IconName | null>(null);\n /** Visible link text; also used as the tooltip/aria-label when the rail is collapsed. */\n readonly label = input.required<string>();\n /** Plain `href` target, used when `routerLink` is not set. */\n readonly href = input<string>('');\n /** Angular `RouterLink` target — string or array form for dynamic segments. */\n readonly routerLink = input<DsRouterLink>(null);\n /** Applies the active style; also drives `aria-current` when not using `routerLink`. */\n readonly active = input(false, { transform: booleanAttribute });\n /** Overrides what an active item announces. Unset, an exact match announces `page` and a prefix\n * match announces `true` — in a sidenav the prefix case is \"you are in this section\", which is\n * exactly what `true` means. */\n readonly ariaCurrent = input<DsAriaCurrent | null | undefined>(undefined);\n /** Numeric count shown at the end of the item. */\n readonly badge = input<number | null>(null);\n /** Shows an alert dot alongside the badge. */\n readonly hasAlert = input(false, { transform: booleanAttribute });\n /** Disables the item — non-navigable and styled as inactive. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Emitted on click, carrying the `MouseEvent`. On an `href` item,\n * `preventDefault()` intercepts navigation (e.g. a docs sidebar driving\n * scroll-spy); a `routerLink` item navigates regardless — Angular's\n * RouterLink ignores `defaultPrevented` — so treat it as a click hook there. */\n readonly activate = output<MouseEvent>();\n\n /** Whether THIS item draws its edge marker when active. Unset follows the parent\n * `ds-sidenav`, then on — the same \"null means not deciding\" reading as the rest\n * of the library, so a sidenav-wide `[rail]=\"false\"` is not fought per item. */\n readonly rail = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n private readonly sidenav = inject(SIDENAV, { optional: true });\n\n private readonly noModifiers = computed<DsLinkModifiers>(() => ({}));\n protected readonly ariaCurrentResolved = dsAriaCurrent(\n this.routerLink,\n this.noModifiers,\n this.ariaCurrent,\n );\n\n protected readonly railResolved = computed(\n () => this.rail() ?? this.sidenav?.rail() ?? true,\n );\n\n protected onActivate(event: MouseEvent): void {\n if (this.disabled()) {\n return;\n }\n this.activate.emit(event);\n }\n\n /** Tooltip text shown when collapsed; empty string suppresses the tooltip when expanded. */\n protected readonly collapsedTooltip = computed(() =>\n this.sidenav?.collapsed() ? this.label() : '',\n );\n\n // Only name the link via aria-label when collapsed (icon-only, the .item-label\n // is display:none). Expanded, the visible label names it and any aria-label\n // would override it — suppressing the badge count / alert dot from the name.\n protected readonly collapsedAriaLabel = computed(() =>\n this.sidenav?.collapsed() ? this.label() : null,\n );\n\n protected readonly linkClasses = computed(() => {\n const parts = ['item'];\n if (this.active()) {\n parts.push('active');\n }\n // The routerLink variant gets `active` from routerLinkActive, not from here,\n // so the rail opt-out has to be a class of its own rather than folded in.\n if (!this.railResolved()) {\n parts.push('no-rail');\n }\n if (this.disabled()) {\n parts.push('disabled');\n }\n\n return parts.join(' ');\n });\n}\n","<!-- Selector-scoped slots ([icon], [trailing]) coexist with no default\n <ng-content> here — projection goes via attributes only, so consumers\n can compose icon + label + arbitrary trailing content (status pill,\n status icon, etc.). The two <a> variants (routerLink vs href) share one\n #content template so the inner markup isn't duplicated. -->\n@if (routerLink()) {\n <a\n routerLinkActive=\"active\"\n dsTooltipPlacement=\"right\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else if (href()) {\n <a\n dsTooltipPlacement=\"right\"\n [href]=\"href()\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else {\n <!-- No destination, so not a link: an `href=\"#\"` navigates — it rewrites the URL\n and discards the scroll position on every click. An item that only emits\n `activate` is a button. -->\n <button\n type=\"button\"\n dsTooltipPlacement=\"right\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [disabled]=\"disabled()\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n}\n\n<ng-template #content>\n @if (icon()) {\n <ds-icon\n class=\"icon\"\n [name]=\"icon()!\"\n [size]=\"20\">\n </ds-icon>\n } @else {\n <span class=\"icon\">\n <ng-content select=\"[icon]\"></ng-content>\n </span>\n }\n\n @if (label()) {\n <span class=\"item-label\">\n {{ label() }}\n </span>\n }\n\n <span class=\"trailing\">\n <ng-content select=\"[trailing]\"></ng-content>\n </span>\n\n @if (badge() !== null) {\n <span class=\"count\">\n {{ badge() }}\n </span>\n }\n\n @if (hasAlert()) {\n <span class=\"alert\"></span>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEA;;;;;;;;;;AAUG;MAKU,kBAAkB,CAAA;wGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;MCNY,OAAO,GAAG,IAAI,cAAc,CAAkB,SAAS;;MCiBvD,gBAAgB,CAAA;;IAElB,SAAS,GAAG,KAAK,CAAC,KAAK,iFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAClE;;;AAGyC;IAChC,IAAI,GAAG,KAAK,CAAC,IAAI,4EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAC5D;;;AAG6E;AACpE,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;AAC3C;;AAEwD;AAC/C,IAAA,UAAU,GAAG,KAAK,CAAgB,IAAI,iFAAC;AAChD;;AAEkF;AACzE,IAAA,UAAU,GAAG,KAAK,CAAqC,IAAI,iFAAC;AACrE;AACmC;AAC1B,IAAA,cAAc,GAAG,KAAK,CAAgB,IAAI,qFAAC;AAEpD;AACsD;IAC7C,SAAS,GAAG,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC;IACjD,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAA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AA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACV,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,uBAAA,EAAA,kBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAChB,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAChB,gBAAgB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,oBAAA,EAAA,gBAAA,EAAA,sBAAA,EAAA,uBAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAMP,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAdhC,SAAS;+BACE,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP;wBACP,aAAa;wBACb,UAAU;wBACV,gBAAgB;wBAChB,gBAAgB;wBAChB,gBAAgB;qBACjB,EAAA,aAAA,EAGc,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,ihFAAA,EAAA,MAAA,EAAA,CAAA,6tJAAA,CAAA,EAAA;;;AElC3C;;AAEG;;;;"}
|
|
@@ -81,7 +81,7 @@ class StatComponent {
|
|
|
81
81
|
return `${magnitude}${suffix}`;
|
|
82
82
|
}, ...(ngDevMode ? [{ debugName: "deltaText" }] : /* istanbul ignore next */ []));
|
|
83
83
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: StatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
84
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: StatComponent, isStandalone: true, selector: "ds-stat", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, delta: { classPropertyName: "delta", publicName: "delta", isSignal: true, isRequired: false, transformFunction: null }, deltaLabel: { classPropertyName: "deltaLabel", publicName: "deltaLabel", isSignal: true, isRequired: false, transformFunction: null }, deltaTone: { classPropertyName: "deltaTone", publicName: "deltaTone", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.error": "variant() === 'error'", "class.size-sm": "size() === 'sm'", "class.size-lg": "size() === 'lg'" } }, ngImport: i0, template: "<div class=\"stat\">\n <div\n class=\"label\"\n dsTooltip\n dsTooltipWhenClipped>\n {{ label() }}\n </div>\n\n <div\n class=\"value\"\n dsTooltip\n dsTooltipWhenClipped>\n <ng-content select=\"[dsStatValue]\">{{ value() }}{{ unit() }}</ng-content>\n </div>\n\n @if (delta() !== null) {\n <div [class]=\"deltaClasses()\">\n @if (deltaIcon(); as icon) {\n <ds-icon\n [name]=\"icon\"\n [size]=\"12\">\n </ds-icon>\n }\n\n <ng-content select=\"[delta]\">{{ deltaText() }}</ng-content>\n </div>\n } @else if (caption()) {\n <div class=\"caption\">\n {{ caption() }}\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_stat-bg-color: var(--ds-stat-bg-color, var(--surface-default));--_stat-border: var(--ds-stat-border, var(--border-divider));--_stat-radius: var(--ds-stat-radius, var(--ds-radius-panel));--_stat-padding: var(--ds-stat-padding, var(--ds-surface-padding));--_stat-label-color: var(--ds-stat-label-color, var(--text-tertiary));--_stat-value-color: var(--ds-stat-value-color, var(--text-primary));--_stat-value-font-size: var(--ds-stat-value-font-size, var(--font-size-h2));--_stat-value-white-space: var(--ds-stat-value-white-space, nowrap);--_stat-value-lines: var(--ds-stat-value-lines, none);--_stat-value-wrap: var(--ds-stat-value-wrap, normal);--_stat-up-color: var(--ds-stat-up-color, var(--success-text));--_stat-down-color: var(--ds-stat-down-color, var(--error-text));display:block}:host(.error){--_stat-value-color: var(--ds-stat-value-color, var(--error-text))}:host(.size-sm){--_stat-value-font-size: var(--ds-stat-value-font-size, var(--font-size-h4))}:host(.size-lg){--_stat-value-font-size: var(--ds-stat-value-font-size, var(--font-size-h1))}:host(.size-sm) .stat .label{font-size:var(--font-size-2xs);letter-spacing:var(--letter-spacing-wide)}:host(.size-lg) .stat .label{font-size:var(--font-size-s)}.stat{background-color:var(--_stat-bg-color);border:var(--border-width-default) solid var(--_stat-border);border-radius:var(--_stat-radius);padding:var(--_stat-padding);height:100%}.stat .label{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap;font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--letter-spacing-wider);text-transform:uppercase;color:var(--_stat-label-color);margin:0 0 var(--space-2)}.stat .value{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap;font:var(--font-weight-extrabold) var(--_stat-value-font-size)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-snug);color:var(--_stat-value-color);margin:0;white-space:var(--_stat-value-white-space);overflow-wrap:var(--_stat-value-wrap);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--_stat-value-lines)}.stat .delta{display:inline-flex;align-items:center;gap:var(--space-1);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);margin-top:var(--space-2)}.stat .delta.up{color:var(--_stat-up-color)}.stat .delta.down{color:var(--_stat-down-color)}.stat .delta.neutral{color:var(--text-tertiary)}.stat .delta.secondary{color:var(--secondary-strong)}.stat .caption{font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary);margin-top:var(--space-2)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: TooltipDirective, selector: "[dsTooltip]", inputs: ["dsTooltip", "dsTooltipPlacement", "dsTooltipDelay", "dsTooltipWhenClipped"] }] });
|
|
84
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: StatComponent, isStandalone: true, selector: "ds-stat", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, delta: { classPropertyName: "delta", publicName: "delta", isSignal: true, isRequired: false, transformFunction: null }, deltaLabel: { classPropertyName: "deltaLabel", publicName: "deltaLabel", isSignal: true, isRequired: false, transformFunction: null }, deltaTone: { classPropertyName: "deltaTone", publicName: "deltaTone", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.error": "variant() === 'error'", "class.size-sm": "size() === 'sm'", "class.size-lg": "size() === 'lg'" } }, ngImport: i0, template: "<div class=\"stat\">\n <div\n class=\"label\"\n dsTooltip\n dsTooltipWhenClipped>\n {{ label() }}\n </div>\n\n <div\n class=\"value\"\n dsTooltip\n dsTooltipWhenClipped>\n <ng-content select=\"[dsStatValue]\">{{ value() }}{{ unit() }}</ng-content>\n </div>\n\n @if (delta() !== null) {\n <div [class]=\"deltaClasses()\">\n @if (deltaIcon(); as icon) {\n <ds-icon\n [name]=\"icon\"\n [size]=\"12\">\n </ds-icon>\n }\n\n <ng-content select=\"[delta]\">{{ deltaText() }}</ng-content>\n </div>\n } @else if (caption()) {\n <div class=\"caption\">\n {{ caption() }}\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_stat-bg-color: var(--ds-stat-bg-color, var(--surface-default));--_stat-border: var(--ds-stat-border, var(--border-divider));--_stat-radius: var(--ds-stat-radius, var(--ds-radius-panel));--_stat-padding: var(--ds-stat-padding, var(--ds-surface-padding));--_stat-label-color: var(--ds-stat-label-color, var(--text-tertiary));--_stat-value-color: var(--ds-stat-value-color, var(--text-primary));--_stat-value-font-size: var(--ds-stat-value-font-size, var(--font-size-h2));--_stat-value-white-space: var(--ds-stat-value-white-space, nowrap);--_stat-value-lines: var(--ds-stat-value-lines, none);--_stat-value-wrap: var(--ds-stat-value-wrap, normal);--_stat-up-color: var(--ds-stat-up-color, var(--success-text));--_stat-down-color: var(--ds-stat-down-color, var(--error-text));display:block}:host(.error){--_stat-value-color: var(--ds-stat-value-color, var(--error-text))}:host(.size-sm){--_stat-value-font-size: var(--ds-stat-value-font-size, var(--font-size-h4))}:host(.size-lg){--_stat-value-font-size: var(--ds-stat-value-font-size, var(--font-size-h1))}:host(.size-sm) .stat .label{font-size:var(--font-size-2xs);letter-spacing:var(--letter-spacing-wide)}:host(.size-lg) .stat .label{font-size:var(--font-size-s)}.stat{background-color:var(--_stat-bg-color);border:var(--border-width-default) solid var(--_stat-border);border-radius:var(--_stat-radius);padding:var(--_stat-padding);height:100%}.stat .label{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap;font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--letter-spacing-wider);text-transform:uppercase;color:var(--_stat-label-color);margin:0 0 var(--space-2)}.stat .value{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap;font:var(--font-weight-extrabold) var(--_stat-value-font-size)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-snug);color:var(--_stat-value-color);margin:0;white-space:var(--_stat-value-white-space);overflow-wrap:var(--_stat-value-wrap);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--_stat-value-lines)}.stat .delta{display:inline-flex;align-items:center;gap:var(--space-1);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);margin-top:var(--space-2)}.stat .delta.up{color:var(--_stat-up-color)}.stat .delta.down{color:var(--_stat-down-color)}.stat .delta.neutral{color:var(--text-tertiary)}.stat .delta.secondary{color:var(--secondary-strong)}.stat .caption{font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary);margin-top:var(--space-2)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: TooltipDirective, selector: "[dsTooltip]", inputs: ["dsTooltip", "dsTooltipPlacement", "dsTooltipDelay", "dsTooltipWhenClipped", "dsTooltipTextSelector"] }] });
|
|
85
85
|
}
|
|
86
86
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: StatComponent, decorators: [{
|
|
87
87
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-stat.mjs","sources":["../../../src/lib/components/stat/stat.component.ts","../../../src/lib/components/stat/stat.component.html","../../../src/lib/components/stat/ids-group-ltd-ids-design-system-components-stat.ts"],"sourcesContent":["import { Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\n\n@Component({\n selector: 'ds-stat',\n standalone: true,\n imports: [IconComponent, TooltipDirective],\n templateUrl: './stat.component.html',\n styleUrl: './stat.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.error]': \"variant() === 'error'\",\n '[class.size-sm]': \"size() === 'sm'\",\n '[class.size-lg]': \"size() === 'lg'\",\n },\n})\nexport class StatComponent {\n constructor() {\n // `unit` concatenates onto the INPUT value, so a projected value silently\n // drops it — and \"kg\" quietly missing from a tile is the kind of thing that\n // reads as fine until someone checks the number against the source.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() =>\n this.unit() && !this.value()\n ? `[ds-stat] unit=\"${this.unit()}\" is set but there is no \\`value\\` input — a projected [dsStatValue] owns the whole line, so the unit is not rendered. Put it inside the projected content, or drop the input.`\n : null,\n );\n }\n }\n\n /** Metric name shown above the value. */\n readonly label = input.required<string>();\n /** Headline metric; `unit` is appended directly after it.\n *\n * Optional because the value can be PROJECTED instead — `[dsStatValue]`\n * takes a badge, a status dot, anything a tile needs where a number would go.\n * The input is the fallback, the same shape `[delta]` already has.\n *\n * Namespaced, unlike `[delta]`: twenty components in this library have a\n * `value` input, so a bare `value` attribute used to slot one of them in\n * would also set that input to the empty string.\n *\n * Takes `null` so `[value]=\"count | number\"` typechecks: Angular's own\n * `number`/`date`/`percent` pipes are typed `string | null`, and without the null the\n * idiomatic form fails `strictTemplates` and pushes consumers to `toLocaleString()` in\n * the template — which hardcodes a locale instead of reading LOCALE_ID. Renders as\n * nothing, like the empty default. */\n readonly value = input<string | number | null>('');\n /** Change amount; sign drives the up/down arrow and color. */\n readonly delta = input<number | null>(null);\n /** Suffix appended after the delta's magnitude, e.g. \"vs last month\". */\n readonly deltaLabel = input<string>('');\n /** Overrides the automatic up/down coloring of the delta. */\n readonly deltaTone = input<'neutral' | 'secondary' | null>(null);\n /** Secondary text shown below the value when there's no `delta`. */\n readonly caption = input<string>('');\n /** Suffix appended directly after `value`, e.g. \"%\". */\n readonly unit = input<string>('');\n /** `error` applies the error color treatment. */\n readonly variant = input<'default' | 'error'>('default');\n /** Controls the stat's overall type scale. */\n readonly size = input<'sm' | 'md' | 'lg'>('md');\n\n protected readonly deltaClasses = computed(() => {\n const delta = this.delta();\n if (delta === null) {\n return '';\n }\n const tone = this.deltaTone();\n if (tone) {\n return `delta ${tone}`;\n }\n if (delta > 0) {\n return 'delta up';\n }\n if (delta < 0) {\n return 'delta down';\n }\n\n return 'delta';\n });\n\n protected readonly deltaIcon = computed<'arrowUp' | 'arrowDown' | null>(\n () => {\n const delta = this.delta();\n if (delta === null || delta === 0) {\n return null;\n }\n\n return delta > 0 ? 'arrowUp' : 'arrowDown';\n },\n );\n\n protected readonly deltaText = computed(() => {\n const delta = this.delta();\n if (delta === null) {\n return '';\n }\n const magnitude = Math.abs(delta);\n const suffix = this.deltaLabel() ? ` ${this.deltaLabel()}` : '';\n\n return `${magnitude}${suffix}`;\n });\n}\n","<div class=\"stat\">\n <div\n class=\"label\"\n dsTooltip\n dsTooltipWhenClipped>\n {{ label() }}\n </div>\n\n <div\n class=\"value\"\n dsTooltip\n dsTooltipWhenClipped>\n <ng-content select=\"[dsStatValue]\">{{ value() }}{{ unit() }}</ng-content>\n </div>\n\n @if (delta() !== null) {\n <div [class]=\"deltaClasses()\">\n @if (deltaIcon(); as icon) {\n <ds-icon\n [name]=\"icon\"\n [size]=\"12\">\n </ds-icon>\n }\n\n <ng-content select=\"[delta]\">{{ deltaText() }}</ng-content>\n </div>\n } @else if (caption()) {\n <div class=\"caption\">\n {{ caption() }}\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAkBa,aAAa,CAAA;AACxB,IAAA,WAAA,GAAA;;;;AAIE,QAAA,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,EAAE;AACjD,YAAA,OAAO,CAAC,MACN,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK;AACxB,kBAAE,CAAA,gBAAA,EAAmB,IAAI,CAAC,IAAI,EAAE,CAAA,8KAAA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EAAA,oBAAA,EAAA,gBAAA,EAAA,sBAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAU9B,aAAa,EAAA,UAAA,EAAA,CAAA;kBAbzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,SAAS,EAAA,UAAA,EACP,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,EAAE,gBAAgB,CAAC,EAAA,aAAA,EAG3B,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,eAAe,EAAE,uBAAuB;AACxC,wBAAA,iBAAiB,EAAE,iBAAiB;AACpC,wBAAA,iBAAiB,EAAE,iBAAiB;AACrC,qBAAA,EAAA,QAAA,EAAA,wqBAAA,EAAA,MAAA,EAAA,CAAA,gsFAAA,CAAA,EAAA;;;AEhBH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-stat.mjs","sources":["../../../src/lib/components/stat/stat.component.ts","../../../src/lib/components/stat/stat.component.html","../../../src/lib/components/stat/ids-group-ltd-ids-design-system-components-stat.ts"],"sourcesContent":["import { Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\n\n@Component({\n selector: 'ds-stat',\n standalone: true,\n imports: [IconComponent, TooltipDirective],\n templateUrl: './stat.component.html',\n styleUrl: './stat.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.error]': \"variant() === 'error'\",\n '[class.size-sm]': \"size() === 'sm'\",\n '[class.size-lg]': \"size() === 'lg'\",\n },\n})\nexport class StatComponent {\n constructor() {\n // `unit` concatenates onto the INPUT value, so a projected value silently\n // drops it — and \"kg\" quietly missing from a tile is the kind of thing that\n // reads as fine until someone checks the number against the source.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() =>\n this.unit() && !this.value()\n ? `[ds-stat] unit=\"${this.unit()}\" is set but there is no \\`value\\` input — a projected [dsStatValue] owns the whole line, so the unit is not rendered. Put it inside the projected content, or drop the input.`\n : null,\n );\n }\n }\n\n /** Metric name shown above the value. */\n readonly label = input.required<string>();\n /** Headline metric; `unit` is appended directly after it.\n *\n * Optional because the value can be PROJECTED instead — `[dsStatValue]`\n * takes a badge, a status dot, anything a tile needs where a number would go.\n * The input is the fallback, the same shape `[delta]` already has.\n *\n * Namespaced, unlike `[delta]`: twenty components in this library have a\n * `value` input, so a bare `value` attribute used to slot one of them in\n * would also set that input to the empty string.\n *\n * Takes `null` so `[value]=\"count | number\"` typechecks: Angular's own\n * `number`/`date`/`percent` pipes are typed `string | null`, and without the null the\n * idiomatic form fails `strictTemplates` and pushes consumers to `toLocaleString()` in\n * the template — which hardcodes a locale instead of reading LOCALE_ID. Renders as\n * nothing, like the empty default. */\n readonly value = input<string | number | null>('');\n /** Change amount; sign drives the up/down arrow and color. */\n readonly delta = input<number | null>(null);\n /** Suffix appended after the delta's magnitude, e.g. \"vs last month\". */\n readonly deltaLabel = input<string>('');\n /** Overrides the automatic up/down coloring of the delta. */\n readonly deltaTone = input<'neutral' | 'secondary' | null>(null);\n /** Secondary text shown below the value when there's no `delta`. */\n readonly caption = input<string>('');\n /** Suffix appended directly after `value`, e.g. \"%\". */\n readonly unit = input<string>('');\n /** `error` applies the error color treatment. */\n readonly variant = input<'default' | 'error'>('default');\n /** Controls the stat's overall type scale. */\n readonly size = input<'sm' | 'md' | 'lg'>('md');\n\n protected readonly deltaClasses = computed(() => {\n const delta = this.delta();\n if (delta === null) {\n return '';\n }\n const tone = this.deltaTone();\n if (tone) {\n return `delta ${tone}`;\n }\n if (delta > 0) {\n return 'delta up';\n }\n if (delta < 0) {\n return 'delta down';\n }\n\n return 'delta';\n });\n\n protected readonly deltaIcon = computed<'arrowUp' | 'arrowDown' | null>(\n () => {\n const delta = this.delta();\n if (delta === null || delta === 0) {\n return null;\n }\n\n return delta > 0 ? 'arrowUp' : 'arrowDown';\n },\n );\n\n protected readonly deltaText = computed(() => {\n const delta = this.delta();\n if (delta === null) {\n return '';\n }\n const magnitude = Math.abs(delta);\n const suffix = this.deltaLabel() ? ` ${this.deltaLabel()}` : '';\n\n return `${magnitude}${suffix}`;\n });\n}\n","<div class=\"stat\">\n <div\n class=\"label\"\n dsTooltip\n dsTooltipWhenClipped>\n {{ label() }}\n </div>\n\n <div\n class=\"value\"\n dsTooltip\n dsTooltipWhenClipped>\n <ng-content select=\"[dsStatValue]\">{{ value() }}{{ unit() }}</ng-content>\n </div>\n\n @if (delta() !== null) {\n <div [class]=\"deltaClasses()\">\n @if (deltaIcon(); as icon) {\n <ds-icon\n [name]=\"icon\"\n [size]=\"12\">\n </ds-icon>\n }\n\n <ng-content select=\"[delta]\">{{ deltaText() }}</ng-content>\n </div>\n } @else if (caption()) {\n <div class=\"caption\">\n {{ caption() }}\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAkBa,aAAa,CAAA;AACxB,IAAA,WAAA,GAAA;;;;AAIE,QAAA,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,EAAE;AACjD,YAAA,OAAO,CAAC,MACN,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK;AACxB,kBAAE,CAAA,gBAAA,EAAmB,IAAI,CAAC,IAAI,EAAE,CAAA,8KAAA;kBAC9B,IAAI,CACT;QACH;IACF;;AAGS,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;AACzC;;;;;;;;;;;;;;AAcuC;AAC9B,IAAA,KAAK,GAAG,KAAK,CAAyB,EAAE,4EAAC;;AAEzC,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;;AAElC,IAAA,UAAU,GAAG,KAAK,CAAS,EAAE,iFAAC;;AAE9B,IAAA,SAAS,GAAG,KAAK,CAAiC,IAAI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