@ids-group-ltd/ids-design-system 1.1.0 → 1.1.2
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 +289 -0
- package/agent/INDEX.md +1 -1
- package/agent/feedback/ds-alert.md +3 -2
- package/agent/feedback/ds-chat-message.md +3 -3
- package/agent/feedback/ds-chat-step.md +1 -1
- package/agent/feedback/ds-chat-steps.md +1 -1
- package/agent/feedback/ds-chat-thread.md +2 -2
- package/agent/feedback/ds-empty-state.md +2 -1
- package/agent/feedback/ds-tree.md +4 -2
- package/agent/forms/ds-chat-input.md +3 -3
- package/agent/foundations/tokens.md +2 -2
- package/agent/navigation/ds-splitter.md +1 -1
- package/components.md +22 -18
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +5 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-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-banner.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs +184 -72
- package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +14 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +23 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-splitter.mjs +116 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-splitter.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.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-textarea.mjs +4 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +4 -19
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +84 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +31 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +33 -0
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +4 -2
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.11.2.json +1 -0
- package/migrations/1.0.1.json +4 -0
- package/migrations/1.0.2.json +9 -1
- package/migrations/1.1.0.json +25 -0
- package/migrations/1.1.1.json +190 -0
- package/migrations/1.1.2.json +135 -0
- package/migrations/README.md +9 -7
- package/package.json +4 -1
- package/schematics/check-overrides/surface.json +29 -3
- package/stylelint/index.mjs +17 -3
- package/stylelint/known-tokens.mjs +139 -0
- package/stylelint/report.mjs +185 -0
- package/stylelint/tokens.mjs +160 -0
- package/stylelint/use-tokens.mjs +397 -0
- package/styles/_check-box.scss +2 -2
- package/styles/_dropdown-overlay.scss +5 -2
- package/styles/_field-box.scss +2 -2
- package/styles/_tokens.scss +8 -0
- package/themes/README.md +1 -1
- package/themes/_semantic.scss +13 -0
- package/themes/dark/_theme.scss +15 -3
- package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-chat.d.ts +58 -5
- package/types/ids-group-ltd-ids-design-system-components-empty-state.d.ts +7 -2
- package/types/ids-group-ltd-ids-design-system-components-splitter.d.ts +15 -1
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +57 -3
- package/types/ids-group-ltd-ids-design-system-components.d.ts +8 -4
- package/types/ids-group-ltd-ids-design-system-core.d.ts +40 -0
- package/types/ids-group-ltd-ids-design-system.d.ts +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-splitter.mjs","sources":["../../../src/lib/components/splitter/splitter-dragging-styles.component.ts","../../../src/lib/components/splitter/splitter.component.ts","../../../src/lib/components/splitter/splitter.component.html","../../../src/lib/components/splitter/ids-group-ltd-ids-design-system-components-splitter.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n} from '@angular/core';\n\n/** @internal Never rendered: creating it once registers the page-wide drag rules globally. */\n@Component({\n standalone: true,\n template: '',\n styleUrl: './splitter-dragging.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SplitterDraggingStylesComponent {}\n","import { DOCUMENT } from '@angular/common';\nimport {\n Component,\n ElementRef,\n OnDestroy,\n NgZone,\n OnInit,\n ViewEncapsulation,\n computed,\n inject,\n input,\n model,\n numberAttribute,\n signal,\n viewChild,\n} from '@angular/core';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport {\n DS_INTL,\n DS_INTL_DEFAULTS,\n retainStyles,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { SplitterDraggingStylesComponent } from './splitter-dragging-styles.component';\nimport type {\n SplitterOrientation,\n SplitterOverdrag,\n SplitterPane,\n} from './splitter.types';\n\nconst STEP = 16;\nconst LARGE_STEP = 64;\n// The farthest the rubber band pulls past a limit, approached and never reached: 100px, and never more\n// than a third of the pane it squashes, whose content would otherwise read as distorted.\nconst OVERDRAG_CAP = 100;\nconst OVERDRAG_SQUASH = 1 / 3;\n\n/**\n * Two panes with a handle between them that resizes one of them. Slots: `[start]` and `[end]`.\n * Drag the handle, or focus it and use the arrow keys (Shift or PageUp / PageDown for a large step,\n * Home / End for the limits); a double click returns to `defaultSize`. Give the splitter a size: it\n * fills the box its parent gives it and never grows to its content.\n */\n@Component({\n selector: 'ds-splitter',\n standalone: true,\n templateUrl: './splitter.component.html',\n styleUrl: './splitter.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-pane]': 'pane()',\n '[style.--_splitter-size]': 'current() + \"px\"',\n '[class.springing]': 'springing()',\n },\n})\nexport class SplitterComponent implements OnInit, OnDestroy {\n private readonly intl = inject(DS_INTL);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly document = inject(DOCUMENT);\n private readonly zone = inject(NgZone);\n private readonly handle =\n viewChild.required<ElementRef<HTMLElement>>('handle');\n\n /** `'horizontal'`: panes side by side. `'vertical'`: panes stacked. */\n readonly orientation = input<SplitterOrientation>('horizontal');\n /** The pane `size` measures; the other pane takes the rest. */\n readonly pane = input<SplitterPane>('start');\n /** Size of `pane` in px, two-way bound; `null` shows `defaultSize`. A drag writes it once, on release. */\n readonly size = model<number | null>(null);\n /** Size in px when `size` is `null`, and what a double click on the handle returns to. */\n readonly defaultSize = input(320, { transform: numberAttribute });\n /** Smallest size in px, inclusive. */\n readonly min = input(160, { transform: numberAttribute });\n /** Largest size in px, inclusive. The pane never takes more than the splitter less the handle. */\n readonly max = input(640, { transform: numberAttribute });\n /** Saves the size in `localStorage` under `ds-splitter:<key>` and restores it on init, over `size`. */\n readonly persistKey = input<string>('');\n /** Accessible name of the handle; unset falls back to `DS_INTL.splitter.label`. Name what it resizes. */\n readonly ariaLabel = input<string | null>(null);\n /** Dragged past `min` or `max`: `'elastic'` follows the pointer with growing resistance and springs\n * back on release, `'none'` stops at the limit. Off under `prefers-reduced-motion: reduce`. */\n readonly overdrag = input<SplitterOverdrag>('elastic');\n\n protected readonly startId = nextControlId('ds-splitter-pane');\n protected readonly endId = nextControlId('ds-splitter-pane');\n protected readonly dragging = signal(false);\n protected readonly springing = signal(false);\n protected readonly current = computed(() =>\n this.clamp(this.size() ?? this.defaultSize(), this.max()),\n );\n protected readonly cursor = computed(() => this.cursorFor(this.current()));\n protected readonly label = computed(\n () =>\n this.ariaLabel() ||\n this.intl().splitter?.label ||\n DS_INTL_DEFAULTS.splitter.label,\n );\n // ARIA names the orientation of the separator line, which is across the panes' axis.\n protected readonly lineOrientation = computed(() =>\n this.orientation() === 'horizontal' ? 'vertical' : 'horizontal',\n );\n\n private drag: {\n pointerId: number;\n grab: number;\n size: number;\n // Measured once at the grab: the rubber band transforms the panes, so their boxes are not read mid-drag.\n box: DOMRect;\n elastic: boolean;\n pull: number;\n } | null = null;\n private pendingMove: PointerEvent | null = null;\n private frame = 0;\n private springTimer = 0;\n\n constructor() {\n retainStyles(SplitterDraggingStylesComponent);\n }\n\n ngOnInit(): void {\n const key = this.storageKey();\n if (!key) {\n return;\n }\n try {\n const stored = Number(localStorage.getItem(key) ?? NaN);\n if (Number.isFinite(stored)) {\n this.size.set(stored);\n }\n } catch {\n // Storage blocked or absent (SSR): keep the bound size.\n }\n }\n\n ngOnDestroy(): void {\n this.endDrag();\n }\n\n protected onPointerDown(event: PointerEvent): void {\n if (event.button !== 0) {\n return;\n }\n event.preventDefault();\n const handle = this.handle().nativeElement;\n handle.setPointerCapture(event.pointerId);\n // A grab during the spring-back stops it where the layout puts the handle, before anything is measured.\n this.stopSpring();\n // The grab point's distance from the measured pane's edge stays fixed, so the handle never jumps.\n this.drag = {\n pointerId: event.pointerId,\n grab: this.fromPaneEdge(event, handle.getBoundingClientRect()),\n size: this.current(),\n box: this.panesBox(),\n elastic:\n this.overdrag() === 'elastic' &&\n !this.document.defaultView?.matchMedia(\n '(prefers-reduced-motion: reduce)',\n ).matches,\n pull: 0,\n };\n this.dragging.set(true);\n // Outside Angular: a move writes the DOM itself, so it must not start change detection per frame.\n this.zone.runOutsideAngular(() =>\n handle.addEventListener('pointermove', this.onPointerMove),\n );\n const root = this.document.documentElement;\n root.setAttribute('data-ds-splitter-dragging', '');\n root.style.setProperty('--_ds-splitter-cursor', this.cursor());\n }\n\n private readonly onPointerMove = (event: PointerEvent): void => {\n if (event.pointerId !== this.drag?.pointerId) {\n return;\n }\n this.pendingMove = event;\n if (!this.frame) {\n this.frame = requestAnimationFrame(() => this.applyMove());\n }\n };\n\n private applyMove(): void {\n this.frame = 0;\n const event = this.pendingMove;\n this.pendingMove = null;\n if (!event || !this.drag) {\n return;\n }\n const { box } = this.drag;\n const raw = this.fromPaneEdge(event, box) - this.drag.grab;\n const room = this.room(box);\n const size = this.clamp(Math.round(raw), room);\n if (this.drag.elastic) {\n // Against the unrounded limit: within min and max the excess is exactly 0, not the rounding.\n this.stretch(raw - this.clamp(raw, room));\n }\n if (size === this.drag.size) {\n return;\n }\n this.drag.size = size;\n // Written straight to the DOM: no change detection per frame. `size` is set once, on release.\n const cursor = this.cursorFor(size);\n const handle = this.handle().nativeElement;\n this.host.nativeElement.style.setProperty('--_splitter-size', `${size}px`);\n handle.setAttribute('aria-valuenow', String(size));\n handle.style.cursor = cursor;\n this.document.documentElement.style.setProperty(\n '--_ds-splitter-cursor',\n cursor,\n );\n }\n\n // Past a limit by `excess` px of size, the pull approaches the cap and never reaches it. The handle\n // moves by the pull, the measured pane stretches by it and the other squashes by it (the other way\n // round past `min`), each from its outer edge, so no gap opens. Transforms only: the layout keeps\n // the clamped size.\n private stretch(excess: number): void {\n const drag = this.drag!;\n const [handle, measured, other] = this.movingParts();\n const horizontal = this.orientation() === 'horizontal';\n const extent = (element: HTMLElement) =>\n horizontal ? element.offsetWidth : element.offsetHeight;\n const squashed = excess > 0 ? other : measured;\n const cap = Math.min(OVERDRAG_CAP, extent(squashed) * OVERDRAG_SQUASH);\n const pull =\n cap > 0\n ? Math.sign(excess) * cap * (1 - 1 / (Math.abs(excess) / cap + 1))\n : 0;\n if (pull === drag.pull) {\n return;\n }\n drag.pull = pull;\n if (pull === 0) {\n this.clearTransforms();\n\n return;\n }\n const scale = horizontal ? 'scaleX' : 'scaleY';\n const shift = this.pane() === 'start' ? pull : -pull;\n handle.style.transform = `translate${horizontal ? 'X' : 'Y'}(${shift}px)`;\n // The line thickens on the same resistance curve; a custom property, because the line is a pseudo-element.\n handle.style.setProperty(\n '--_splitter-pull-ratio',\n String(Math.abs(pull) / cap),\n );\n measured.style.transform = `${scale}(${(extent(measured) + pull) / extent(measured)})`;\n other.style.transform = `${scale}(${Math.max(0, extent(other) - pull) / extent(other)})`;\n }\n\n // The handle, the pane `size` measures, then the other pane.\n private movingParts(): [HTMLElement, HTMLElement, HTMLElement] {\n const handle = this.handle().nativeElement;\n const start = handle.previousElementSibling as HTMLElement;\n const end = handle.nextElementSibling as HTMLElement;\n\n return this.pane() === 'start'\n ? [handle, start, end]\n : [handle, end, start];\n }\n\n private clearTransforms(): void {\n for (const element of this.movingParts()) {\n element.style.transform = '';\n }\n this.handle().nativeElement.style.removeProperty('--_splitter-pull-ratio');\n }\n\n private stopSpring(): void {\n clearTimeout(this.springTimer);\n this.springing.set(false);\n this.clearTransforms();\n }\n\n // The class adds the transition; clearing the transforms in the next frame plays it back to rest.\n private springBack(): void {\n this.springing.set(true);\n this.zone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n this.clearTransforms();\n this.springTimer = window.setTimeout(\n () => this.zone.run(() => this.springing.set(false)),\n 600,\n );\n });\n });\n }\n\n protected onPointerUp(event: PointerEvent): void {\n if (event.pointerId !== this.drag?.pointerId) {\n return;\n }\n if (this.frame) {\n cancelAnimationFrame(this.frame);\n this.applyMove();\n }\n const { size, pull } = this.drag;\n this.endDrag();\n if (pull !== 0) {\n this.springBack();\n }\n if (size !== this.current()) {\n this.commit(size);\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const horizontal = this.orientation() === 'horizontal';\n // An arrow moves the handle; the end pane grows as the handle moves towards the start.\n const towardsEnd = this.pane() === 'start' ? 1 : -1;\n const step = event.shiftKey ? LARGE_STEP : STEP;\n const now = this.current();\n const next: Record<string, number> = {\n [horizontal ? 'ArrowRight' : 'ArrowDown']: now + step * towardsEnd,\n [horizontal ? 'ArrowLeft' : 'ArrowUp']: now - step * towardsEnd,\n PageUp: now + LARGE_STEP,\n PageDown: now - LARGE_STEP,\n Home: this.min(),\n End: this.max(),\n };\n if (!(event.key in next)) {\n return;\n }\n event.preventDefault();\n this.commit(this.clampToBox(next[event.key]));\n }\n\n protected reset(): void {\n this.size.set(null);\n const key = this.storageKey();\n if (key) {\n try {\n localStorage.removeItem(key);\n } catch {\n // Storage blocked: the reset still applies for this session.\n }\n }\n }\n\n private commit(size: number): void {\n this.size.set(size);\n const key = this.storageKey();\n if (key) {\n try {\n localStorage.setItem(key, String(size));\n } catch {\n // Full or blocked: a lost pane size is not worth an error.\n }\n }\n }\n\n private endDrag(): void {\n if (!this.drag) {\n return;\n }\n const handle = this.handle().nativeElement;\n handle.removeEventListener('pointermove', this.onPointerMove);\n cancelAnimationFrame(this.frame);\n this.frame = 0;\n this.pendingMove = null;\n try {\n handle.releasePointerCapture(this.drag.pointerId);\n } catch {\n // The pointer can already be gone.\n }\n this.drag = null;\n this.dragging.set(false);\n const root = this.document.documentElement;\n root.removeAttribute('data-ds-splitter-dragging');\n root.style.removeProperty('--_ds-splitter-cursor');\n }\n\n private storageKey(): string | null {\n const key = this.persistKey().trim();\n\n return key ? `ds-splitter:${key}` : null;\n }\n\n // ponytail: left-to-right only; under `dir=\"rtl\"` a horizontal start pane is measured from the left.\n private fromPaneEdge(event: PointerEvent, box: DOMRect): number {\n const horizontal = this.orientation() === 'horizontal';\n if (this.pane() === 'start') {\n return horizontal ? event.clientX - box.left : event.clientY - box.top;\n }\n\n return horizontal ? box.right - event.clientX : box.bottom - event.clientY;\n }\n\n private clamp(size: number, upper: number): number {\n return Math.max(this.min(), Math.min(upper, size));\n }\n\n private clampToBox(size: number): number {\n return this.clamp(size, this.room(this.panesBox()));\n }\n\n private room(box: DOMRect): number {\n const handle = this.handle().nativeElement;\n const room =\n this.orientation() === 'horizontal'\n ? box.width - handle.offsetWidth\n : box.height - handle.offsetHeight;\n\n return Math.min(this.max(), room);\n }\n\n // From the start pane's leading edge to the end pane's trailing edge: the host's border and\n // padding lie outside it.\n private panesBox(): DOMRect {\n const handle = this.handle().nativeElement;\n const start = (\n handle.previousElementSibling as HTMLElement\n ).getBoundingClientRect();\n const end = (\n handle.nextElementSibling as HTMLElement\n ).getBoundingClientRect();\n\n return new DOMRect(\n start.left,\n start.top,\n end.right - start.left,\n end.bottom - start.top,\n );\n }\n\n // At a limit the cursor shows the one direction the handle can still move. `ew-resize`, not\n // `col-resize`: Windows draws `ew`, `e` and `w-resize` alike, so the cursor keeps its shape there.\n private cursorFor(size: number): string {\n const horizontal = this.orientation() === 'horizontal';\n const atMin = size <= this.min();\n if (!atMin && size < this.max()) {\n return horizontal ? 'ew-resize' : 'ns-resize';\n }\n const towardsEnd = this.pane() === 'start' ? atMin : !atMin;\n if (horizontal) {\n return towardsEnd ? 'e-resize' : 'w-resize';\n }\n\n return towardsEnd ? 's-resize' : 'n-resize';\n }\n}\n","<div\n class=\"pane pane-start\"\n [id]=\"startId\">\n <ng-content select=\"[start]\" />\n</div>\n\n<div\n #handle\n class=\"handle\"\n role=\"separator\"\n tabindex=\"0\"\n [class.dragging]=\"dragging()\"\n [style.cursor]=\"cursor()\"\n [attr.aria-orientation]=\"lineOrientation()\"\n [attr.aria-label]=\"label()\"\n [attr.aria-controls]=\"pane() === 'start' ? startId : endId\"\n [attr.aria-valuenow]=\"current()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n (dblclick)=\"reset()\"\n (keydown)=\"onKeydown($event)\">\n</div>\n\n<div\n class=\"pane pane-end\"\n [id]=\"endId\">\n <ng-content select=\"[end]\" />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAMA;MAQa,+BAA+B,CAAA;wGA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EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE7DxD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-splitter.mjs","sources":["../../../src/lib/components/splitter/splitter-dragging-styles.component.ts","../../../src/lib/components/splitter/splitter.component.ts","../../../src/lib/components/splitter/splitter.component.html","../../../src/lib/components/splitter/ids-group-ltd-ids-design-system-components-splitter.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n} from '@angular/core';\n\n/** @internal Never rendered: creating it once registers the page-wide drag rules globally. */\n@Component({\n standalone: true,\n template: '',\n styleUrl: './splitter-dragging.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SplitterDraggingStylesComponent {}\n","import { DOCUMENT } from '@angular/common';\nimport {\n Component,\n booleanAttribute,\n ElementRef,\n OnDestroy,\n NgZone,\n OnInit,\n ViewEncapsulation,\n computed,\n inject,\n input,\n model,\n numberAttribute,\n signal,\n viewChild,\n} from '@angular/core';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport {\n DS_INTL,\n DS_INTL_DEFAULTS,\n retainStyles,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { SplitterDraggingStylesComponent } from './splitter-dragging-styles.component';\nimport type {\n SplitterOrientation,\n SplitterOverdrag,\n SplitterPane,\n} from './splitter.types';\n\nconst STEP = 16;\nconst LARGE_STEP = 64;\n// The farthest the rubber band pulls past a limit, approached and never reached: 100px, and never more\n// than a third of the pane it squashes, whose content would otherwise read as distorted.\nconst OVERDRAG_CAP = 100;\nconst OVERDRAG_SQUASH = 1 / 3;\n// Fog strength is speed x distance, each 0.1..1: full from 1.2 px/ms and from 180px off the grab point.\nconst FOG_FULL_SPEED = 1.2;\nconst FOG_FULL_DISTANCE = 180;\nconst FOG_IDLE = 180;\n\n/**\n * Two panes with a handle between them that resizes one of them. Slots: `[start]` and `[end]`.\n * Drag the handle, or focus it and use the arrow keys (Shift or PageUp / PageDown for a large step,\n * Home / End for the limits); a double click returns to `defaultSize`. Give the splitter a size: it\n * fills the box its parent gives it and never grows to its content.\n */\n@Component({\n selector: 'ds-splitter',\n standalone: true,\n templateUrl: './splitter.component.html',\n styleUrl: './splitter.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-pane]': 'pane()',\n '[style.--_splitter-size]': 'current() + \"px\"',\n '[class.springing]': 'springing()',\n },\n})\nexport class SplitterComponent implements OnInit, OnDestroy {\n private readonly intl = inject(DS_INTL);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly document = inject(DOCUMENT);\n private readonly zone = inject(NgZone);\n private readonly handle =\n viewChild.required<ElementRef<HTMLElement>>('handle');\n private readonly fogStart = viewChild<ElementRef<HTMLElement>>('fogStart');\n private readonly fogEnd = viewChild<ElementRef<HTMLElement>>('fogEnd');\n\n /** `'horizontal'`: panes side by side. `'vertical'`: panes stacked. */\n readonly orientation = input<SplitterOrientation>('horizontal');\n /** The pane `size` measures; the other pane takes the rest. */\n readonly pane = input<SplitterPane>('start');\n /** Size of `pane` in px, two-way bound; `null` shows `defaultSize`. A drag writes it once, on release. */\n readonly size = model<number | null>(null);\n /** Size in px when `size` is `null`, and what a double click on the handle returns to. */\n readonly defaultSize = input(320, { transform: numberAttribute });\n /** Smallest size in px, inclusive. */\n readonly min = input(160, { transform: numberAttribute });\n /** Largest size in px, inclusive. The pane never takes more than the splitter less the handle. */\n readonly max = input(640, { transform: numberAttribute });\n /** Saves the size in `localStorage` under `ds-splitter:<key>` and restores it on init, over `size`. */\n readonly persistKey = input<string>('');\n /** Accessible name of the handle; unset falls back to `DS_INTL.splitter.label`. Name what it resizes. */\n readonly ariaLabel = input<string | null>(null);\n /** Dragged past `min` or `max`: `'elastic'` follows the pointer with growing resistance and springs\n * back on release, `'none'` stops at the limit. Off under `prefers-reduced-motion: reduce`. */\n readonly overdrag = input<SplitterOverdrag>('elastic');\n /** While dragging, shades the pane the handle moves towards, stronger the faster and farther the drag;\n * the shade rides the rubber band past a limit and fades when the hand stops or lets go. Colour:\n * `--ds-splitter-fog-color`. Off under `prefers-reduced-motion: reduce`. */\n readonly dragFog = input(false, { transform: booleanAttribute });\n\n protected readonly startId = nextControlId('ds-splitter-pane');\n protected readonly endId = nextControlId('ds-splitter-pane');\n protected readonly dragging = signal(false);\n protected readonly springing = signal(false);\n protected readonly current = computed(() =>\n this.clamp(this.size() ?? this.defaultSize(), this.max()),\n );\n protected readonly cursor = computed(() => this.cursorFor(this.current()));\n protected readonly label = computed(\n () =>\n this.ariaLabel() ||\n this.intl().splitter?.label ||\n DS_INTL_DEFAULTS.splitter.label,\n );\n // ARIA names the orientation of the separator line, which is across the panes' axis.\n protected readonly lineOrientation = computed(() =>\n this.orientation() === 'horizontal' ? 'vertical' : 'horizontal',\n );\n\n private drag: {\n pointerId: number;\n grab: number;\n size: number;\n // Measured once at the grab: the rubber band transforms the panes, so their boxes are not read mid-drag.\n box: DOMRect;\n elastic: boolean;\n pull: number;\n fog: boolean;\n // Pointer along the axis: at the grab, at the last frame, and when.\n start: number;\n last: number;\n lastTime: number;\n speed: number;\n velocity: number;\n // +1 towards the end pane, -1 towards the start pane, 0 before the first 2px of travel.\n side: number;\n reversalSince: number | null;\n } | null = null;\n private pendingMove: PointerEvent | null = null;\n private frame = 0;\n private springTimer = 0;\n private fogTimer = 0;\n\n constructor() {\n retainStyles(SplitterDraggingStylesComponent);\n }\n\n ngOnInit(): void {\n const key = this.storageKey();\n if (!key) {\n return;\n }\n try {\n const stored = Number(localStorage.getItem(key) ?? NaN);\n if (Number.isFinite(stored)) {\n this.size.set(stored);\n }\n } catch {\n // Storage blocked or absent (SSR): keep the bound size.\n }\n }\n\n ngOnDestroy(): void {\n this.endDrag();\n }\n\n protected onPointerDown(event: PointerEvent): void {\n if (event.button !== 0) {\n return;\n }\n event.preventDefault();\n const handle = this.handle().nativeElement;\n handle.setPointerCapture(event.pointerId);\n // A grab during the spring-back stops it where the layout puts the handle, before anything is measured.\n this.stopSpring();\n // The grab point's distance from the measured pane's edge stays fixed, so the handle never jumps.\n const reduced = !!this.document.defaultView?.matchMedia(\n '(prefers-reduced-motion: reduce)',\n ).matches;\n const at = this.alongAxis(event);\n this.drag = {\n pointerId: event.pointerId,\n grab: this.fromPaneEdge(event, handle.getBoundingClientRect()),\n size: this.current(),\n box: this.panesBox(),\n elastic: this.overdrag() === 'elastic' && !reduced,\n pull: 0,\n fog: this.dragFog() && !reduced,\n start: at,\n last: at,\n lastTime: event.timeStamp,\n speed: 0,\n velocity: 0,\n side: 0,\n reversalSince: null,\n };\n this.dragging.set(true);\n // Outside Angular: a move writes the DOM itself, so it must not start change detection per frame.\n this.zone.runOutsideAngular(() => {\n handle.addEventListener('pointermove', this.onPointerMove);\n this.document.defaultView?.addEventListener('blur', this.onWindowBlur);\n });\n const root = this.document.documentElement;\n root.setAttribute('data-ds-splitter-dragging', '');\n root.style.setProperty('--_ds-splitter-cursor', this.cursor());\n }\n\n private readonly onPointerMove = (event: PointerEvent): void => {\n if (event.pointerId !== this.drag?.pointerId) {\n return;\n }\n this.pendingMove = event;\n if (!this.frame) {\n this.frame = requestAnimationFrame(() => this.applyMove());\n }\n };\n\n private applyMove(): void {\n this.frame = 0;\n const event = this.pendingMove;\n this.pendingMove = null;\n if (!event || !this.drag) {\n return;\n }\n const { box } = this.drag;\n const raw = this.fromPaneEdge(event, box) - this.drag.grab;\n const room = this.room(box);\n const size = this.clamp(Math.round(raw), room);\n if (this.drag.elastic) {\n // Against the unrounded limit: within min and max the excess is exactly 0, not the rounding.\n this.stretch(raw - this.clamp(raw, room));\n }\n if (this.drag.fog) {\n this.shade(event);\n }\n if (size === this.drag.size) {\n return;\n }\n this.drag.size = size;\n // Written straight to the DOM: no change detection per frame. `size` is set once, on release.\n const cursor = this.cursorFor(size);\n const handle = this.handle().nativeElement;\n this.host.nativeElement.style.setProperty('--_splitter-size', `${size}px`);\n handle.setAttribute('aria-valuenow', String(size));\n handle.style.cursor = cursor;\n this.document.documentElement.style.setProperty(\n '--_ds-splitter-cursor',\n cursor,\n );\n }\n\n // Past a limit by `excess` px of size, the pull approaches the cap and never reaches it. The handle\n // moves by the pull, the measured pane stretches by it and the other squashes by it (the other way\n // round past `min`), each from its outer edge, so no gap opens. Transforms only: the layout keeps\n // the clamped size.\n private stretch(excess: number): void {\n const drag = this.drag!;\n const [handle, measured, other] = this.movingParts();\n const horizontal = this.orientation() === 'horizontal';\n const extent = (element: HTMLElement) =>\n horizontal ? element.offsetWidth : element.offsetHeight;\n const squashed = excess > 0 ? other : measured;\n const cap = Math.min(OVERDRAG_CAP, extent(squashed) * OVERDRAG_SQUASH);\n const pull =\n cap > 0\n ? Math.sign(excess) * cap * (1 - 1 / (Math.abs(excess) / cap + 1))\n : 0;\n if (pull === drag.pull) {\n return;\n }\n drag.pull = pull;\n if (pull === 0) {\n this.clearTransforms();\n\n return;\n }\n const scale = horizontal ? 'scaleX' : 'scaleY';\n const shift = this.pane() === 'start' ? pull : -pull;\n handle.style.transform = `translate${horizontal ? 'X' : 'Y'}(${shift}px)`;\n // The line thickens on the same resistance curve; a custom property, because the line is a pseudo-element.\n handle.style.setProperty(\n '--_splitter-pull-ratio',\n String(Math.abs(pull) / cap),\n );\n measured.style.transform = `${scale}(${(extent(measured) + pull) / extent(measured)})`;\n other.style.transform = `${scale}(${Math.max(0, extent(other) - pull) / extent(other)})`;\n this.syncFogTransforms();\n }\n\n // The side is the pointer's direction, never where it stands: past a limit the pointer stays beyond\n // the line while the hand already pulls back, and the fog has to turn with the hand.\n private shade(event: PointerEvent): void {\n const drag = this.drag!;\n const at = this.alongAxis(event);\n const step = at - drag.last;\n const elapsed = Math.max(1, event.timeStamp - drag.lastTime);\n drag.speed = drag.speed * 0.6 + (Math.abs(step) / elapsed) * 0.4;\n drag.velocity +=\n (1 - Math.exp(-elapsed / 100)) * (step / elapsed - drag.velocity);\n drag.side = this.sideOf(drag, at, event.timeStamp);\n drag.last = at;\n drag.lastTime = event.timeStamp;\n const start = this.fogStart()?.nativeElement;\n const end = this.fogEnd()?.nativeElement;\n if (step === 0 || drag.side === 0 || !start || !end) {\n return;\n }\n const factor = (value: number) => Math.max(0.1, Math.min(1, value));\n const strength =\n factor(drag.speed / FOG_FULL_SPEED) *\n factor(Math.abs(at - drag.start) / FOG_FULL_DISTANCE);\n const [toward, away] = drag.side > 0 ? [end, start] : [start, end];\n toward.style.opacity = String(strength);\n away.style.removeProperty('opacity');\n clearTimeout(this.fogTimer);\n this.fogTimer = window.setTimeout(() => this.clearFog(), FOG_IDLE);\n }\n\n // Under 0.05 px/ms the side holds, and a reversal must last 100ms before it flips, so a slow or\n // shaky hand never flickers the fog between the panes.\n private sideOf(\n drag: NonNullable<SplitterComponent['drag']>,\n at: number,\n now: number,\n ): number {\n if (drag.side === 0) {\n return Math.abs(at - drag.start) >= 2 ? Math.sign(at - drag.start) : 0;\n }\n const wanted =\n Math.abs(drag.velocity) < 0.05 ? 0 : Math.sign(drag.velocity);\n if (wanted === 0 || wanted === drag.side) {\n drag.reversalSince = null;\n\n return drag.side;\n }\n drag.reversalSince ??= now;\n if (now - drag.reversalSince < 100) {\n return drag.side;\n }\n drag.reversalSince = null;\n\n return wanted;\n }\n\n private clearFog(): void {\n clearTimeout(this.fogTimer);\n for (const fog of [this.fogStart(), this.fogEnd()]) {\n fog?.nativeElement.style.removeProperty('opacity');\n }\n }\n\n // Each fog layer takes its pane's rubber-band transform, so the shade stays on the pane's edge.\n private syncFogTransforms(): void {\n const handle = this.handle().nativeElement;\n const pairs: [HTMLElement | undefined, Element | null][] = [\n [this.fogStart()?.nativeElement, handle.previousElementSibling],\n [this.fogEnd()?.nativeElement, handle.nextElementSibling],\n ];\n for (const [fog, pane] of pairs) {\n if (fog) {\n fog.style.transform = (pane as HTMLElement).style.transform;\n }\n }\n }\n\n // The handle, the pane `size` measures, then the other pane.\n private movingParts(): [HTMLElement, HTMLElement, HTMLElement] {\n const handle = this.handle().nativeElement;\n const start = handle.previousElementSibling as HTMLElement;\n const end = handle.nextElementSibling as HTMLElement;\n\n return this.pane() === 'start'\n ? [handle, start, end]\n : [handle, end, start];\n }\n\n private clearTransforms(): void {\n for (const element of this.movingParts()) {\n element.style.transform = '';\n }\n this.handle().nativeElement.style.removeProperty('--_splitter-pull-ratio');\n this.syncFogTransforms();\n }\n\n private stopSpring(): void {\n clearTimeout(this.springTimer);\n this.springing.set(false);\n this.clearTransforms();\n }\n\n // The class adds the transition; clearing the transforms in the next frame plays it back to rest.\n private springBack(): void {\n this.springing.set(true);\n this.zone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n this.clearTransforms();\n this.springTimer = window.setTimeout(\n () => this.zone.run(() => this.springing.set(false)),\n 600,\n );\n });\n });\n }\n\n protected onPointerUp(event: PointerEvent): void {\n if (event.pointerId !== this.drag?.pointerId) {\n return;\n }\n this.finishDrag();\n }\n\n // A release over a document of its own (an iframe, an Electron webview) or outside the window can\n // reach no listener here: losing capture or focus is then the only sign the drag is over.\n private readonly finishDrag = (): void => {\n if (!this.drag) {\n return;\n }\n if (this.frame) {\n cancelAnimationFrame(this.frame);\n this.applyMove();\n }\n const { size, pull } = this.drag;\n this.endDrag();\n if (pull !== 0) {\n this.springBack();\n }\n if (size !== this.current()) {\n this.commit(size);\n }\n };\n\n private readonly onWindowBlur = (): void => this.zone.run(this.finishDrag);\n\n protected onKeydown(event: KeyboardEvent): void {\n const horizontal = this.orientation() === 'horizontal';\n // An arrow moves the handle; the end pane grows as the handle moves towards the start.\n const towardsEnd = this.pane() === 'start' ? 1 : -1;\n const step = event.shiftKey ? LARGE_STEP : STEP;\n const now = this.current();\n const next: Record<string, number> = {\n [horizontal ? 'ArrowRight' : 'ArrowDown']: now + step * towardsEnd,\n [horizontal ? 'ArrowLeft' : 'ArrowUp']: now - step * towardsEnd,\n PageUp: now + LARGE_STEP,\n PageDown: now - LARGE_STEP,\n Home: this.min(),\n End: this.max(),\n };\n if (!(event.key in next)) {\n return;\n }\n event.preventDefault();\n this.commit(this.clampToBox(next[event.key]));\n }\n\n protected reset(): void {\n this.size.set(null);\n const key = this.storageKey();\n if (key) {\n try {\n localStorage.removeItem(key);\n } catch {\n // Storage blocked: the reset still applies for this session.\n }\n }\n }\n\n private commit(size: number): void {\n this.size.set(size);\n const key = this.storageKey();\n if (key) {\n try {\n localStorage.setItem(key, String(size));\n } catch {\n // Full or blocked: a lost pane size is not worth an error.\n }\n }\n }\n\n private endDrag(): void {\n if (!this.drag) {\n return;\n }\n const handle = this.handle().nativeElement;\n handle.removeEventListener('pointermove', this.onPointerMove);\n this.document.defaultView?.removeEventListener('blur', this.onWindowBlur);\n cancelAnimationFrame(this.frame);\n this.frame = 0;\n this.pendingMove = null;\n try {\n handle.releasePointerCapture(this.drag.pointerId);\n } catch {\n // The pointer can already be gone.\n }\n this.drag = null;\n this.clearFog();\n this.dragging.set(false);\n const root = this.document.documentElement;\n root.removeAttribute('data-ds-splitter-dragging');\n root.style.removeProperty('--_ds-splitter-cursor');\n }\n\n private storageKey(): string | null {\n const key = this.persistKey().trim();\n\n return key ? `ds-splitter:${key}` : null;\n }\n\n private alongAxis(event: PointerEvent): number {\n return this.orientation() === 'horizontal' ? event.clientX : event.clientY;\n }\n\n // ponytail: left-to-right only; under `dir=\"rtl\"` a horizontal start pane is measured from the left.\n private fromPaneEdge(event: PointerEvent, box: DOMRect): number {\n const horizontal = this.orientation() === 'horizontal';\n if (this.pane() === 'start') {\n return horizontal ? event.clientX - box.left : event.clientY - box.top;\n }\n\n return horizontal ? box.right - event.clientX : box.bottom - event.clientY;\n }\n\n private clamp(size: number, upper: number): number {\n return Math.max(this.min(), Math.min(upper, size));\n }\n\n private clampToBox(size: number): number {\n return this.clamp(size, this.room(this.panesBox()));\n }\n\n private room(box: DOMRect): number {\n const handle = this.handle().nativeElement;\n const room =\n this.orientation() === 'horizontal'\n ? box.width - handle.offsetWidth\n : box.height - handle.offsetHeight;\n\n return Math.min(this.max(), room);\n }\n\n // From the start pane's leading edge to the end pane's trailing edge: the host's border and\n // padding lie outside it.\n private panesBox(): DOMRect {\n const handle = this.handle().nativeElement;\n const start = (\n handle.previousElementSibling as HTMLElement\n ).getBoundingClientRect();\n const end = (\n handle.nextElementSibling as HTMLElement\n ).getBoundingClientRect();\n\n return new DOMRect(\n start.left,\n start.top,\n end.right - start.left,\n end.bottom - start.top,\n );\n }\n\n // At a limit the cursor shows the one direction the handle can still move. `ew-resize`, not\n // `col-resize`: Windows draws `ew`, `e` and `w-resize` alike, so the cursor keeps its shape there.\n private cursorFor(size: number): string {\n const horizontal = this.orientation() === 'horizontal';\n const atMin = size <= this.min();\n if (!atMin && size < this.max()) {\n return horizontal ? 'ew-resize' : 'ns-resize';\n }\n const towardsEnd = this.pane() === 'start' ? atMin : !atMin;\n if (horizontal) {\n return towardsEnd ? 'e-resize' : 'w-resize';\n }\n\n return towardsEnd ? 's-resize' : 'n-resize';\n }\n}\n","<div\n class=\"pane pane-start\"\n [id]=\"startId\">\n <ng-content select=\"[start]\" />\n</div>\n\n<div\n #handle\n class=\"handle\"\n role=\"separator\"\n tabindex=\"0\"\n [class.dragging]=\"dragging()\"\n [style.cursor]=\"cursor()\"\n [attr.aria-orientation]=\"lineOrientation()\"\n [attr.aria-label]=\"label()\"\n [attr.aria-controls]=\"pane() === 'start' ? startId : endId\"\n [attr.aria-valuenow]=\"current()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n (lostpointercapture)=\"onPointerUp($event)\"\n (dblclick)=\"reset()\"\n (keydown)=\"onKeydown($event)\">\n</div>\n\n<div\n class=\"pane pane-end\"\n [id]=\"endId\">\n <ng-content select=\"[end]\" />\n</div>\n\n@if (dragFog()) {\n <div\n #fogStart\n class=\"fog fog-start\"\n aria-hidden=\"true\">\n </div>\n\n <div\n #fogEnd\n class=\"fog fog-end\"\n aria-hidden=\"true\">\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAMA;MAQa,+BAA+B,CAAA;wGAA/B,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA/B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,+BAA+B,wEALhC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,+QAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;4FAKD,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAP3C,SAAS;iCACI,IAAI,EAAA,QAAA,EACN,EAAE,EAAA,aAAA,EAEG,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,+QAAA,CAAA,EAAA;;;ACkBjD,MAAM,IAAI,GAAG,EAAE;AACf,MAAM,UAAU,GAAG,EAAE;AACrB;AACA;AACA,MAAM,YAAY,GAAG,GAAG;AACxB,MAAM,eAAe,GAAG,CAAC,GAAG,CAAC;AAC7B;AACA,MAAM,cAAc,GAAG,GAAG;AAC1B,MAAM,iBAAiB,GAAG,GAAG;AAC7B,MAAM,QAAQ,GAAG,GAAG;AAEpB;;;;;AAKG;MAcU,iBA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AA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,GAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,KAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEpEvE;;AAEG;;;;"}
|
|
@@ -56,7 +56,7 @@ class StepperComponent {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: StepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
59
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: StepperComponent, isStandalone: true, selector: "ds-stepper", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, current: { classPropertyName: "current", publicName: "current", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, errorSteps: { classPropertyName: "errorSteps", publicName: "errorSteps", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stepClicked: "stepClicked" }, host: { attributes: { "role": "list" }, properties: { "attr.aria-label": "intl().stepper.label", "class.labels-inline": "labelPosition() === 'inline'", "class.is-vertical": "orientation() === 'vertical'" } }, ngImport: i0, template: "@for (label of steps(); track $index; let i = $index, last = $last) {\n <span\n role=\"listitem\"\n class=\"step\"\n [class.is-current]=\"i === current()\"\n [attr.aria-current]=\"i === current() ? 'step' : null\">\n @if (clickable()) {\n <button\n type=\"button\"\n [class]=\"nodeClass(i)\"\n [attr.aria-label]=\"intl().stepper.step(i + 1, label, stepState(i))\"\n (click)=\"onStepClick(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n <span class=\"number\"
|
|
59
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: StepperComponent, isStandalone: true, selector: "ds-stepper", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, current: { classPropertyName: "current", publicName: "current", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, errorSteps: { classPropertyName: "errorSteps", publicName: "errorSteps", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stepClicked: "stepClicked" }, host: { attributes: { "role": "list" }, properties: { "attr.aria-label": "intl().stepper.label", "class.labels-inline": "labelPosition() === 'inline'", "class.is-vertical": "orientation() === 'vertical'" } }, ngImport: i0, template: "@for (label of steps(); track $index; let i = $index, last = $last) {\n <span\n role=\"listitem\"\n class=\"step\"\n [class.is-current]=\"i === current()\"\n [attr.aria-current]=\"i === current() ? 'step' : null\">\n @if (clickable()) {\n <button\n type=\"button\"\n [class]=\"nodeClass(i)\"\n [attr.aria-label]=\"intl().stepper.step(i + 1, label, stepState(i))\"\n (click)=\"onStepClick(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n <span class=\"number\">\n {{ i + 1 }}\n </span>\n }\n </button>\n } @else {\n <span\n aria-hidden=\"true\"\n [class]=\"nodeClass(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n <span class=\"number\">\n {{ i + 1 }}\n </span>\n }\n </span>\n }\n\n <span\n aria-hidden=\"true\"\n class=\"step-label\">\n {{ label }}\n </span>\n\n @if (!last) {\n <span\n aria-hidden=\"true\"\n [class]=\"connectorClass(i)\">\n </span>\n }\n\n @if (!clickable()) {\n <span class=\"visually-hidden\">\n {{ intl().stepper.step(i + 1, label, stepState(i)) }}\n </span>\n }\n </span>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),: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);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:flex;align-items:flex-start;--_stepper-label-color: var(--ds-stepper-label-color, var(--text-tertiary));--_stepper-label-color-current: var(--ds-stepper-label-color-current, var(--text-primary));--_stepper-label-font-size: var(--ds-stepper-label-font-size, var(--font-size-xs));--_stepper-node-bg-color: var(--ds-stepper-node-bg-color, var(--surface-default));--_stepper-node-active-bg-color: var(--ds-stepper-node-active-bg-color, var(--accent));--_stepper-node-active-text-color: var(--ds-stepper-node-active-text-color, var(--accent-on));--_stepper-node-done-text-color: var(--ds-stepper-node-done-text-color, var(--accent));--_stepper-connector-color: var(--ds-stepper-connector-color, var(--border-divider));--_stepper-connector-done-color: var(--ds-stepper-connector-done-color, var(--accent))}:host .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host .step{position:relative;flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center}:host .node{position:relative;z-index:1;width:var(--stepper-node-size);height:var(--stepper-node-size);border-radius:var(--radius-pill);display:grid;place-items:center;border:var(--border-width-default) solid var(--text-tertiary);background:var(--_stepper-node-bg-color);color:var(--text-tertiary);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);transition:background-color var(--duration-base) var(--ease-standard),border-color var(--duration-base) var(--ease-standard),color var(--duration-base) var(--ease-standard)}:host .node .number{display:inline-block;translate:0 .033em}:host .node.done{background:var(--accent-subtitle);border-color:var(--accent);color:var(--_stepper-node-done-text-color)}:host .node.active{background:var(--_stepper-node-active-bg-color);border-color:var(--accent);color:var(--_stepper-node-active-text-color)}:host .node.error{background:var(--error-subtitle);border-color:var(--error);color:var(--error)}:host button.node{padding:0;appearance:none;cursor:pointer}:host button.node: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)}:host .connector{position:absolute;z-index:0;top:calc((var(--stepper-node-size) - var(--stepper-bar-h)) / 2);left:50%;width:100%;height:var(--stepper-bar-h);background:var(--_stepper-connector-color);transition:background-color var(--duration-base) var(--ease-standard)}:host .connector.done{background:var(--_stepper-connector-done-color)}:host .step-label{max-width:14ch;margin-top:var(--space-2);font-size:var(--_stepper-label-font-size);font-weight:var(--font-weight-medium);line-height:var(--line-height-snug);color:var(--_stepper-label-color);overflow-wrap:anywhere;transition:color var(--duration-base) var(--ease-standard)}:host .step.is-current .step-label{font-weight:var(--font-weight-bold);color:var(--_stepper-label-color-current)}:host(.labels-inline){display:inline-flex;align-items:center;gap:var(--space-2)}:host(.labels-inline) .step{flex:0 0 auto;flex-direction:row;gap:var(--space-2)}:host(.labels-inline) .step-label{max-width:none;margin-top:0;white-space:nowrap}:host(.labels-inline) .connector{position:static;flex:0 0 auto;width:var(--stepper-bar-w)}:host(.is-vertical){flex-direction:column;align-items:stretch}:host(.is-vertical) .step{flex:0 0 auto;flex-direction:row;align-items:flex-start;text-align:left;gap:var(--space-3);padding-bottom:var(--space-4)}:host(.is-vertical) .step:last-child{padding-bottom:0}:host(.is-vertical) .step-label{max-width:none;margin-top:0;align-self:center}:host(.is-vertical) .connector{position:absolute;top:var(--stepper-node-size);left:calc((var(--stepper-node-size) - var(--stepper-bar-h)) / 2);width:var(--stepper-bar-h);height:calc(100% - var(--stepper-node-size))}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
60
60
|
}
|
|
61
61
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: StepperComponent, decorators: [{
|
|
62
62
|
type: Component,
|
|
@@ -65,7 +65,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
65
65
|
'[attr.aria-label]': 'intl().stepper.label',
|
|
66
66
|
'[class.labels-inline]': "labelPosition() === 'inline'",
|
|
67
67
|
'[class.is-vertical]': "orientation() === 'vertical'",
|
|
68
|
-
}, template: "@for (label of steps(); track $index; let i = $index, last = $last) {\n <span\n role=\"listitem\"\n class=\"step\"\n [class.is-current]=\"i === current()\"\n [attr.aria-current]=\"i === current() ? 'step' : null\">\n @if (clickable()) {\n <button\n type=\"button\"\n [class]=\"nodeClass(i)\"\n [attr.aria-label]=\"intl().stepper.step(i + 1, label, stepState(i))\"\n (click)=\"onStepClick(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n <span class=\"number\"
|
|
68
|
+
}, template: "@for (label of steps(); track $index; let i = $index, last = $last) {\n <span\n role=\"listitem\"\n class=\"step\"\n [class.is-current]=\"i === current()\"\n [attr.aria-current]=\"i === current() ? 'step' : null\">\n @if (clickable()) {\n <button\n type=\"button\"\n [class]=\"nodeClass(i)\"\n [attr.aria-label]=\"intl().stepper.step(i + 1, label, stepState(i))\"\n (click)=\"onStepClick(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n <span class=\"number\">\n {{ i + 1 }}\n </span>\n }\n </button>\n } @else {\n <span\n aria-hidden=\"true\"\n [class]=\"nodeClass(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n <span class=\"number\">\n {{ i + 1 }}\n </span>\n }\n </span>\n }\n\n <span\n aria-hidden=\"true\"\n class=\"step-label\">\n {{ label }}\n </span>\n\n @if (!last) {\n <span\n aria-hidden=\"true\"\n [class]=\"connectorClass(i)\">\n </span>\n }\n\n @if (!clickable()) {\n <span class=\"visually-hidden\">\n {{ intl().stepper.step(i + 1, label, stepState(i)) }}\n </span>\n }\n </span>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),: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);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:flex;align-items:flex-start;--_stepper-label-color: var(--ds-stepper-label-color, var(--text-tertiary));--_stepper-label-color-current: var(--ds-stepper-label-color-current, var(--text-primary));--_stepper-label-font-size: var(--ds-stepper-label-font-size, var(--font-size-xs));--_stepper-node-bg-color: var(--ds-stepper-node-bg-color, var(--surface-default));--_stepper-node-active-bg-color: var(--ds-stepper-node-active-bg-color, var(--accent));--_stepper-node-active-text-color: var(--ds-stepper-node-active-text-color, var(--accent-on));--_stepper-node-done-text-color: var(--ds-stepper-node-done-text-color, var(--accent));--_stepper-connector-color: var(--ds-stepper-connector-color, var(--border-divider));--_stepper-connector-done-color: var(--ds-stepper-connector-done-color, var(--accent))}:host .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host .step{position:relative;flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center}:host .node{position:relative;z-index:1;width:var(--stepper-node-size);height:var(--stepper-node-size);border-radius:var(--radius-pill);display:grid;place-items:center;border:var(--border-width-default) solid var(--text-tertiary);background:var(--_stepper-node-bg-color);color:var(--text-tertiary);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);transition:background-color var(--duration-base) var(--ease-standard),border-color var(--duration-base) var(--ease-standard),color var(--duration-base) var(--ease-standard)}:host .node .number{display:inline-block;translate:0 .033em}:host .node.done{background:var(--accent-subtitle);border-color:var(--accent);color:var(--_stepper-node-done-text-color)}:host .node.active{background:var(--_stepper-node-active-bg-color);border-color:var(--accent);color:var(--_stepper-node-active-text-color)}:host .node.error{background:var(--error-subtitle);border-color:var(--error);color:var(--error)}:host button.node{padding:0;appearance:none;cursor:pointer}:host button.node: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)}:host .connector{position:absolute;z-index:0;top:calc((var(--stepper-node-size) - var(--stepper-bar-h)) / 2);left:50%;width:100%;height:var(--stepper-bar-h);background:var(--_stepper-connector-color);transition:background-color var(--duration-base) var(--ease-standard)}:host .connector.done{background:var(--_stepper-connector-done-color)}:host .step-label{max-width:14ch;margin-top:var(--space-2);font-size:var(--_stepper-label-font-size);font-weight:var(--font-weight-medium);line-height:var(--line-height-snug);color:var(--_stepper-label-color);overflow-wrap:anywhere;transition:color var(--duration-base) var(--ease-standard)}:host .step.is-current .step-label{font-weight:var(--font-weight-bold);color:var(--_stepper-label-color-current)}:host(.labels-inline){display:inline-flex;align-items:center;gap:var(--space-2)}:host(.labels-inline) .step{flex:0 0 auto;flex-direction:row;gap:var(--space-2)}:host(.labels-inline) .step-label{max-width:none;margin-top:0;white-space:nowrap}:host(.labels-inline) .connector{position:static;flex:0 0 auto;width:var(--stepper-bar-w)}:host(.is-vertical){flex-direction:column;align-items:stretch}:host(.is-vertical) .step{flex:0 0 auto;flex-direction:row;align-items:flex-start;text-align:left;gap:var(--space-3);padding-bottom:var(--space-4)}:host(.is-vertical) .step:last-child{padding-bottom:0}:host(.is-vertical) .step-label{max-width:none;margin-top:0;align-self:center}:host(.is-vertical) .connector{position:absolute;top:var(--stepper-node-size);left:calc((var(--stepper-node-size) - var(--stepper-bar-h)) / 2);width:var(--stepper-bar-h);height:calc(100% - var(--stepper-node-size))}\n"] }]
|
|
69
69
|
}], propDecorators: { steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: false }] }], current: [{ type: i0.Input, args: [{ isSignal: true, alias: "current", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], errorSteps: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorSteps", required: false }] }], stepClicked: [{ type: i0.Output, args: ["stepClicked"] }] } });
|
|
70
70
|
|
|
71
71
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-stepper.mjs","sources":["../../../src/lib/components/stepper/stepper.component.ts","../../../src/lib/components/stepper/stepper.component.html","../../../src/lib/components/stepper/ids-group-ltd-ids-design-system-components-stepper.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\n\n/** Where the step caption sits: beneath its node (`bottom`) or beside it (`inline`, compact row). */\nexport type StepperLabelPosition = 'bottom' | 'inline';\n\nexport type StepperOrientation = 'horizontal' | 'vertical';\n\n@Component({\n selector: 'ds-stepper',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './stepper.component.html',\n styleUrl: './stepper.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n role: 'list',\n '[attr.aria-label]': 'intl().stepper.label',\n '[class.labels-inline]': \"labelPosition() === 'inline'\",\n '[class.is-vertical]': \"orientation() === 'vertical'\",\n },\n})\nexport class StepperComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Step labels in order; one node per entry. */\n readonly steps = input<readonly string[]>([]);\n /** Zero-based index of the active step; earlier steps render as completed. */\n readonly current = input<number>(0);\n /** Where the step caption sits relative to its node. */\n readonly labelPosition = input<StepperLabelPosition>('bottom');\n /** Layout axis of the stepper. */\n readonly orientation = input<StepperOrientation>('horizontal');\n /** Renders each step node as a button that emits its index. */\n readonly clickable = input(false, { transform: booleanAttribute });\n /** Zero-based indices of steps in an error state. Error wins over completed/current/upcoming. */\n readonly errorSteps = input<readonly number[]>([]);\n\n /** Fires with a step's index when activated; only when `clickable`. */\n readonly stepClicked = output<number>();\n\n protected stepState(\n index: number,\n ): 'error' | 'completed' | 'current' | 'upcoming' {\n if (this.errorSteps().includes(index)) {\n return 'error';\n }\n const currentStep = this.current();\n if (index < currentStep) {\n return 'completed';\n }\n if (index === currentStep) {\n return 'current';\n }\n\n return 'upcoming';\n }\n\n protected nodeClass(index: number): string {\n const state = this.stepState(index);\n if (state === 'error') {\n return 'node error';\n }\n if (state === 'completed') {\n return 'node done';\n }\n if (state === 'current') {\n return 'node active';\n }\n\n return 'node';\n }\n\n protected connectorClass(index: number): string {\n return index < this.current() && !this.errorSteps().includes(index)\n ? 'connector done'\n : 'connector';\n }\n\n protected onStepClick(index: number): void {\n if (this.clickable()) {\n this.stepClicked.emit(index);\n }\n }\n}\n","@for (label of steps(); track $index; let i = $index, last = $last) {\n <span\n role=\"listitem\"\n class=\"step\"\n [class.is-current]=\"i === current()\"\n [attr.aria-current]=\"i === current() ? 'step' : null\">\n @if (clickable()) {\n <button\n type=\"button\"\n [class]=\"nodeClass(i)\"\n [attr.aria-label]=\"intl().stepper.step(i + 1, label, stepState(i))\"\n (click)=\"onStepClick(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n <span class=\"number\"
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-stepper.mjs","sources":["../../../src/lib/components/stepper/stepper.component.ts","../../../src/lib/components/stepper/stepper.component.html","../../../src/lib/components/stepper/ids-group-ltd-ids-design-system-components-stepper.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\n\n/** Where the step caption sits: beneath its node (`bottom`) or beside it (`inline`, compact row). */\nexport type StepperLabelPosition = 'bottom' | 'inline';\n\nexport type StepperOrientation = 'horizontal' | 'vertical';\n\n@Component({\n selector: 'ds-stepper',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './stepper.component.html',\n styleUrl: './stepper.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n role: 'list',\n '[attr.aria-label]': 'intl().stepper.label',\n '[class.labels-inline]': \"labelPosition() === 'inline'\",\n '[class.is-vertical]': \"orientation() === 'vertical'\",\n },\n})\nexport class StepperComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Step labels in order; one node per entry. */\n readonly steps = input<readonly string[]>([]);\n /** Zero-based index of the active step; earlier steps render as completed. */\n readonly current = input<number>(0);\n /** Where the step caption sits relative to its node. */\n readonly labelPosition = input<StepperLabelPosition>('bottom');\n /** Layout axis of the stepper. */\n readonly orientation = input<StepperOrientation>('horizontal');\n /** Renders each step node as a button that emits its index. */\n readonly clickable = input(false, { transform: booleanAttribute });\n /** Zero-based indices of steps in an error state. Error wins over completed/current/upcoming. */\n readonly errorSteps = input<readonly number[]>([]);\n\n /** Fires with a step's index when activated; only when `clickable`. */\n readonly stepClicked = output<number>();\n\n protected stepState(\n index: number,\n ): 'error' | 'completed' | 'current' | 'upcoming' {\n if (this.errorSteps().includes(index)) {\n return 'error';\n }\n const currentStep = this.current();\n if (index < currentStep) {\n return 'completed';\n }\n if (index === currentStep) {\n return 'current';\n }\n\n return 'upcoming';\n }\n\n protected nodeClass(index: number): string {\n const state = this.stepState(index);\n if (state === 'error') {\n return 'node error';\n }\n if (state === 'completed') {\n return 'node done';\n }\n if (state === 'current') {\n return 'node active';\n }\n\n return 'node';\n }\n\n protected connectorClass(index: number): string {\n return index < this.current() && !this.errorSteps().includes(index)\n ? 'connector done'\n : 'connector';\n }\n\n protected onStepClick(index: number): void {\n if (this.clickable()) {\n this.stepClicked.emit(index);\n }\n }\n}\n","@for (label of steps(); track $index; let i = $index, last = $last) {\n <span\n role=\"listitem\"\n class=\"step\"\n [class.is-current]=\"i === current()\"\n [attr.aria-current]=\"i === current() ? 'step' : null\">\n @if (clickable()) {\n <button\n type=\"button\"\n [class]=\"nodeClass(i)\"\n [attr.aria-label]=\"intl().stepper.step(i + 1, label, stepState(i))\"\n (click)=\"onStepClick(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n <span class=\"number\">\n {{ i + 1 }}\n </span>\n }\n </button>\n } @else {\n <span\n aria-hidden=\"true\"\n [class]=\"nodeClass(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n <span class=\"number\">\n {{ i + 1 }}\n </span>\n }\n </span>\n }\n\n <span\n aria-hidden=\"true\"\n class=\"step-label\">\n {{ label }}\n </span>\n\n @if (!last) {\n <span\n aria-hidden=\"true\"\n [class]=\"connectorClass(i)\">\n </span>\n }\n\n @if (!clickable()) {\n <span class=\"visually-hidden\">\n {{ intl().stepper.step(i + 1, label, stepState(i)) }}\n </span>\n }\n </span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MA8Ba,gBA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A,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,sBAAA,EAAA,qBAAA,EAAA,8BAAA,EAAA,mBAAA,EAAA,8BAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC9B7B,6pDAkEA,EAAA,MAAA,EAAA,CAAA,69IAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,ED/CY,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAWZ,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAd5B,SAAS;+BACE,YAAY,EAAA,UAAA,EACV,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,EAAA,aAAA,EAGT,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,mBAAmB,EAAE,sBAAsB;AAC3C,wBAAA,uBAAuB,EAAE,8BAA8B;AACvD,wBAAA,qBAAqB,EAAE,8BAA8B;AACtD,qBAAA,EAAA,QAAA,EAAA,6pDAAA,EAAA,MAAA,EAAA,CAAA,69IAAA,CAAA,EAAA;;;AE5BH;;AAEG;;;;"}
|
|
@@ -77,7 +77,7 @@ class SwitchComponent extends DsBooleanControlValueAccessor {
|
|
|
77
77
|
useExisting: forwardRef(() => SwitchComponent),
|
|
78
78
|
multi: true,
|
|
79
79
|
},
|
|
80
|
-
], usesInheritance: true, ngImport: i0, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n [class]=\"switchClasses()\"\n [checked]=\"checked()\"\n [attr.aria-checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n [changed]=\"changedShown()\" />\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),: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);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_switch-track-w: var(--switch-track-w);--_switch-track-h: var(--switch-track-h);--_switch-thumb-size: var(--switch-thumb-size);--_switch-thumb-pad: var(--switch-thumb-pad);--_switch-label-fs: var(--font-size-s);--_switch-track-on-bg-color: var(--ds-switch-track-on-bg-color, var(--accent));--_switch-track-off-bg-color: var(--ds-switch-track-off-bg-color, var(--border-
|
|
80
|
+
], usesInheritance: true, ngImport: i0, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n [class]=\"switchClasses()\"\n [checked]=\"checked()\"\n [attr.aria-checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n [changed]=\"changedShown()\" />\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),: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);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_switch-track-w: var(--switch-track-w);--_switch-track-h: var(--switch-track-h);--_switch-thumb-size: var(--switch-thumb-size);--_switch-thumb-pad: var(--switch-thumb-pad);--_switch-label-fs: var(--font-size-s);--_switch-track-on-bg-color: var(--ds-switch-track-on-bg-color, var(--accent));--_switch-track-off-bg-color: var(--ds-switch-track-off-bg-color, var(--border-field));--_switch-thumb-bg-color: var(--ds-switch-thumb-bg-color, var(--surface-default));display:inline-flex}.switch-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.switch-field.size-sm{--_switch-track-w: 26px;--_switch-track-h: 14px;--_switch-thumb-size: 10px;--_switch-thumb-pad: var(--switch-thumb-pad);--_switch-label-fs: var(--font-size-xs)}.switch-field.size-lg{--_switch-track-w: 48px;--_switch-track-h: 26px;--_switch-thumb-size: 22px;--_switch-thumb-pad: var(--switch-thumb-pad);--_switch-label-fs: var(--font-size-m)}.control-line:has(: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)}@media not (forced-colors:active){.control-line .switch:where(:focus-visible){outline:none}}.control-line{border-radius:var(--focus-ring-radius)}.control-line:has(.control-text:empty){--focus-ring-offset: var(--space-1-5)}.control-line{display:inline-flex;align-items:center}.control-line .control-text{padding-inline-start:var(--space-2);padding-block:var(--space-1);margin-block:calc(var(--space-1) * -1);font:var(--font-weight-regular) var(--ds-switch-label-font-size, var(--_switch-label-fs))/var(--line-height-base) var(--font-sans);color:var(--ds-switch-label-color, var(--text-primary));cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text:empty{display:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.control-line ds-field-status{margin-inline-start:var(--space-2)}.switch{appearance:none;width:var(--_switch-track-w);height:var(--_switch-track-h);background:var(--_switch-track-off-bg-color);border-radius:var(--radius-pill);position:relative;cursor:pointer;flex-shrink:0;margin:0;transition:background-color var(--duration-base) var(--ease-standard)}.switch:after{content:\"\";position:absolute;top:var(--_switch-thumb-pad);left:var(--_switch-thumb-pad);width:var(--_switch-thumb-size);height:var(--_switch-thumb-size);background:var(--_switch-thumb-bg-color);border-radius:var(--radius-pill);box-shadow:var(--shadow-1);transition:transform var(--duration-base) var(--ease-standard),box-shadow var(--duration-base) var(--ease-standard)}.switch:checked{background:var(--_switch-track-on-bg-color)}.switch:checked:after{transform:translate(calc(var(--_switch-track-w) - var(--_switch-thumb-size) - 2 * var(--_switch-thumb-pad)))}.switch:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.switch:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.switch.success:checked{background:var(--success)}.switch.error:checked{background:var(--error)}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve", "changed"] }, { kind: "component", type: FieldStatusComponent, selector: "ds-field-status", inputs: ["pending", "changed"] }] });
|
|
81
81
|
}
|
|
82
82
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
83
83
|
type: Component,
|
|
@@ -87,7 +87,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
87
87
|
useExisting: forwardRef(() => SwitchComponent),
|
|
88
88
|
multi: true,
|
|
89
89
|
},
|
|
90
|
-
], template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n [class]=\"switchClasses()\"\n [checked]=\"checked()\"\n [attr.aria-checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n [changed]=\"changedShown()\" />\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),: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);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_switch-track-w: var(--switch-track-w);--_switch-track-h: var(--switch-track-h);--_switch-thumb-size: var(--switch-thumb-size);--_switch-thumb-pad: var(--switch-thumb-pad);--_switch-label-fs: var(--font-size-s);--_switch-track-on-bg-color: var(--ds-switch-track-on-bg-color, var(--accent));--_switch-track-off-bg-color: var(--ds-switch-track-off-bg-color, var(--border-
|
|
90
|
+
], template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n [class]=\"switchClasses()\"\n [checked]=\"checked()\"\n [attr.aria-checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n [changed]=\"changedShown()\" />\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),: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);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_switch-track-w: var(--switch-track-w);--_switch-track-h: var(--switch-track-h);--_switch-thumb-size: var(--switch-thumb-size);--_switch-thumb-pad: var(--switch-thumb-pad);--_switch-label-fs: var(--font-size-s);--_switch-track-on-bg-color: var(--ds-switch-track-on-bg-color, var(--accent));--_switch-track-off-bg-color: var(--ds-switch-track-off-bg-color, var(--border-field));--_switch-thumb-bg-color: var(--ds-switch-thumb-bg-color, var(--surface-default));display:inline-flex}.switch-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.switch-field.size-sm{--_switch-track-w: 26px;--_switch-track-h: 14px;--_switch-thumb-size: 10px;--_switch-thumb-pad: var(--switch-thumb-pad);--_switch-label-fs: var(--font-size-xs)}.switch-field.size-lg{--_switch-track-w: 48px;--_switch-track-h: 26px;--_switch-thumb-size: 22px;--_switch-thumb-pad: var(--switch-thumb-pad);--_switch-label-fs: var(--font-size-m)}.control-line:has(: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)}@media not (forced-colors:active){.control-line .switch:where(:focus-visible){outline:none}}.control-line{border-radius:var(--focus-ring-radius)}.control-line:has(.control-text:empty){--focus-ring-offset: var(--space-1-5)}.control-line{display:inline-flex;align-items:center}.control-line .control-text{padding-inline-start:var(--space-2);padding-block:var(--space-1);margin-block:calc(var(--space-1) * -1);font:var(--font-weight-regular) var(--ds-switch-label-font-size, var(--_switch-label-fs))/var(--line-height-base) var(--font-sans);color:var(--ds-switch-label-color, var(--text-primary));cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text:empty{display:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.control-line ds-field-status{margin-inline-start:var(--space-2)}.switch{appearance:none;width:var(--_switch-track-w);height:var(--_switch-track-h);background:var(--_switch-track-off-bg-color);border-radius:var(--radius-pill);position:relative;cursor:pointer;flex-shrink:0;margin:0;transition:background-color var(--duration-base) var(--ease-standard)}.switch:after{content:\"\";position:absolute;top:var(--_switch-thumb-pad);left:var(--_switch-thumb-pad);width:var(--_switch-thumb-size);height:var(--_switch-thumb-size);background:var(--_switch-thumb-bg-color);border-radius:var(--radius-pill);box-shadow:var(--shadow-1);transition:transform var(--duration-base) var(--ease-standard),box-shadow var(--duration-base) var(--ease-standard)}.switch:checked{background:var(--_switch-track-on-bg-color)}.switch:checked:after{transform:translate(calc(var(--_switch-track-w) - var(--_switch-thumb-size) - 2 * var(--_switch-thumb-pad)))}.switch:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.switch:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.switch.success:checked{background:var(--success)}.switch.error:checked{background:var(--error)}\n"] }]
|
|
91
91
|
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], controlled: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlled", required: false }] }], checkedRequested: [{ type: i0.Output, args: ["checkedRequested"] }] } });
|
|
92
92
|
|
|
93
93
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-switch.mjs","sources":["../../../src/lib/components/switch/switch.component.ts","../../../src/lib/components/switch/switch.component.html","../../../src/lib/components/switch/ids-group-ltd-ids-design-system-components-switch.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n model,\n output,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DsBooleanControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport {\n FieldMessageComponent,\n FieldStatusComponent,\n} from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { resolveFieldMessage } from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-switch',\n standalone: true,\n imports: [FieldMessageComponent, FieldStatusComponent],\n templateUrl: './switch.component.html',\n styleUrl: './switch.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SwitchComponent),\n multi: true,\n },\n ],\n})\nexport class SwitchComponent extends DsBooleanControlValueAccessor {\n /** On/off state, two-way bound. */\n readonly checked = model<boolean>(false);\n /** Disables the switch and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Native `name` attribute. */\n readonly name = input<string | null>(null);\n /** Track colour when checked. */\n readonly variant = input<'default' | 'success' | 'error'>('default');\n /** Overrides the generated id of the native `<input>` and its `<label for>`. */\n readonly inputId = input<string | null>(null);\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 /** Shows an asterisk and sets `aria-required`. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Label beside the track, wired via for/id. Omit to bring your own <label>. */\n readonly label = input<string>('');\n /** Accessible name for a control with no visible label; overrides `label` when both are set. */\n readonly ariaLabel = input<string | null>(null);\n /**\n * The switch never flips itself: a click or Space cancels the native toggle and\n * `checkedRequested` carries the value the user asked for. It moves only when\n * `checked` changes from outside, so a cancelled confirmation changes nothing.\n */\n readonly controlled = input(false, { transform: booleanAttribute });\n /** The value the user asked for, emitted in place of a flip when `controlled`. Silent otherwise. */\n readonly checkedRequested = output<boolean>();\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n protected readonly uid = nextControlId('ds-switch');\n protected readonly controlId = computed(() => this.inputId() ?? this.uid);\n protected readonly hintId = computed(() =>\n this.message().text || this.changedShown() ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n pending: this.pending,\n dirty: this.dirty,\n showDirty: this.showDirtyResolved,\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 touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly pendingShown = this.fieldMessage.pending;\n protected readonly changedShown = this.fieldMessage.changed;\n protected readonly resolvedAriaLabel = computed(() =>\n this.label() ? null : this.ariaLabel() || null,\n );\n protected readonly invalidResolved = this.fieldMessage.invalid;\n\n protected readonly switchClasses = computed(() => {\n const variant = this.variant();\n\n return variant === 'default' ? 'switch' : `switch ${variant}`;\n });\n\n protected readonly fieldClass = computed(\n () => `switch-field size-${this.sizeResolved()}`,\n );\n\n protected onCheckedChange(event: Event): void {\n this.checked.set((event.target as HTMLInputElement).checked);\n }\n\n protected onClick(event: MouseEvent): void {\n if (!this.controlled()) {\n return;\n }\n event.preventDefault();\n this.checkedRequested.emit(!this.checked());\n }\n}\n","<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n [class]=\"switchClasses()\"\n [checked]=\"checked()\"\n [attr.aria-checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n [changed]=\"changedShown()\" />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAoCM,MAAO,eAAgB,SAAQ,6BAA6B,CAAA;;AAEvD,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,8EAAC;;IAE/B,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAExD,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,2EAAC;;AAEjC,IAAA,OAAO,GAAG,KAAK,CAAkC,SAAS,8EAAC;;AAE3D,IAAA,OAAO,GAAG,KAAK,CAAgB,IAAI,8EAAC;;AAEpC,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,2EAAC;IACjC,YAAY,GAAG,iBAAiB,CACvC,IAAI,CAAC,IAAI,EACT,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO,EAAE,IAAI,EAChC,IAAc,CACf;;IAEQ,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAExD,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;AAC/C;;;;AAIG;IACM,UAAU,GAAG,KAAK,CAAC,KAAK,kFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAE1D,gBA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A,EAAA,MAAA,EAAA,CAAA,w3HAAA,CAAA,EAAA;;;AElCH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-switch.mjs","sources":["../../../src/lib/components/switch/switch.component.ts","../../../src/lib/components/switch/switch.component.html","../../../src/lib/components/switch/ids-group-ltd-ids-design-system-components-switch.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n model,\n output,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DsBooleanControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport {\n FieldMessageComponent,\n FieldStatusComponent,\n} from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { resolveFieldMessage } from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-switch',\n standalone: true,\n imports: [FieldMessageComponent, FieldStatusComponent],\n templateUrl: './switch.component.html',\n styleUrl: './switch.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SwitchComponent),\n multi: true,\n },\n ],\n})\nexport class SwitchComponent extends DsBooleanControlValueAccessor {\n /** On/off state, two-way bound. */\n readonly checked = model<boolean>(false);\n /** Disables the switch and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Native `name` attribute. */\n readonly name = input<string | null>(null);\n /** Track colour when checked. */\n readonly variant = input<'default' | 'success' | 'error'>('default');\n /** Overrides the generated id of the native `<input>` and its `<label for>`. */\n readonly inputId = input<string | null>(null);\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 /** Shows an asterisk and sets `aria-required`. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Label beside the track, wired via for/id. Omit to bring your own <label>. */\n readonly label = input<string>('');\n /** Accessible name for a control with no visible label; overrides `label` when both are set. */\n readonly ariaLabel = input<string | null>(null);\n /**\n * The switch never flips itself: a click or Space cancels the native toggle and\n * `checkedRequested` carries the value the user asked for. It moves only when\n * `checked` changes from outside, so a cancelled confirmation changes nothing.\n */\n readonly controlled = input(false, { transform: booleanAttribute });\n /** The value the user asked for, emitted in place of a flip when `controlled`. Silent otherwise. */\n readonly checkedRequested = output<boolean>();\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n protected readonly uid = nextControlId('ds-switch');\n protected readonly controlId = computed(() => this.inputId() ?? this.uid);\n protected readonly hintId = computed(() =>\n this.message().text || this.changedShown() ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n pending: this.pending,\n dirty: this.dirty,\n showDirty: this.showDirtyResolved,\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 touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly pendingShown = this.fieldMessage.pending;\n protected readonly changedShown = this.fieldMessage.changed;\n protected readonly resolvedAriaLabel = computed(() =>\n this.label() ? null : this.ariaLabel() || null,\n );\n protected readonly invalidResolved = this.fieldMessage.invalid;\n\n protected readonly switchClasses = computed(() => {\n const variant = this.variant();\n\n return variant === 'default' ? 'switch' : `switch ${variant}`;\n });\n\n protected readonly fieldClass = computed(\n () => `switch-field size-${this.sizeResolved()}`,\n );\n\n protected onCheckedChange(event: Event): void {\n this.checked.set((event.target as HTMLInputElement).checked);\n }\n\n protected onClick(event: MouseEvent): void {\n if (!this.controlled()) {\n return;\n }\n event.preventDefault();\n this.checkedRequested.emit(!this.checked());\n }\n}\n","<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n [class]=\"switchClasses()\"\n [checked]=\"checked()\"\n [attr.aria-checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n [changed]=\"changedShown()\" />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAoCM,MAAO,eAAgB,SAAQ,6BAA6B,CAAA;;AAEvD,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,8EAAC;;IAE/B,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAExD,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,2EAAC;;AAEjC,IAAA,OAAO,GAAG,KAAK,CAAkC,SAAS,8EAAC;;AAE3D,IAAA,OAAO,GAAG,KAAK,CAAgB,IAAI,8EAAC;;AAEpC,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,2EAAC;IACjC,YAAY,GAAG,iBAAiB,CACvC,I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SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP,CAAC,qBAAqB,EAAE,oBAAoB,CAAC,EAAA,aAAA,EAGvC,iBAAiB,CAAC,QAAQ,EAAA,SAAA,EAC9B;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,qBAAqB,CAAC;AAC9C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,g4CAAA,EAAA,MAAA,EAAA,CAAA,u3HAAA,CAAA,EAAA;;;AElCH;;AAEG;;;;"}
|
|
@@ -133,7 +133,7 @@ class TableColumnsPanelComponent {
|
|
|
133
133
|
</button>
|
|
134
134
|
</div>
|
|
135
135
|
</ng-template>
|
|
136
|
-
`, isInline: true, styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),: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);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}.col-picker{display:grid;gap:var(--space-2);min-width:160px}.col-picker-row{display:flex;align-items:center;gap:var(--space-2)}.col-picker-row.cdk-drag-preview{background-color:var(--surface-default);border-radius:var(--ds-radius-inner);box-shadow:var(--shadow-popover);padding:var(--space-1) var(--space-2)}.col-picker-row.cdk-drag-placeholder{opacity:.4}.col-picker.cdk-drop-list-dragging .col-picker-row:not(.cdk-drag-placeholder){transition:transform var(--duration-fast) var(--ease-standard)}.col-drag{display:inline-flex;color:var(--icon-default);cursor:grab}.col-drag:active{cursor:grabbing}.col-picker-option{display:flex;align-items:center;gap:var(--space-2);flex:1;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-picker-option:has(input:disabled){color:var(--text-tertiary);cursor:default}.check{appearance:none;width:var(--_checkbox-glyph, var(--check-size));height:var(--_checkbox-glyph, var(--check-size));border:var(--check-bw) solid var(--_checkbox-border-color, var(--ds-checkbox-border-color, var(--border-
|
|
136
|
+
`, isInline: true, styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),: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);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}.col-picker{display:grid;gap:var(--space-2);min-width:160px}.col-picker-row{display:flex;align-items:center;gap:var(--space-2)}.col-picker-row.cdk-drag-preview{background-color:var(--surface-default);border-radius:var(--ds-radius-inner);box-shadow:var(--shadow-popover);padding:var(--space-1) var(--space-2)}.col-picker-row.cdk-drag-placeholder{opacity:.4}.col-picker.cdk-drop-list-dragging .col-picker-row:not(.cdk-drag-placeholder){transition:transform var(--duration-fast) var(--ease-standard)}.col-drag{display:inline-flex;color:var(--icon-default);cursor:grab}.col-drag:active{cursor:grabbing}.col-picker-option{display:flex;align-items:center;gap:var(--space-2);flex:1;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-picker-option:has(input:disabled){color:var(--text-tertiary);cursor:default}.check{appearance:none;width:var(--_checkbox-glyph, var(--check-size));height:var(--_checkbox-glyph, var(--check-size));border:var(--check-bw) solid var(--_checkbox-border-color, var(--ds-checkbox-border-color, var(--border-field)));background:var(--_checkbox-bg-color, var(--ds-checkbox-bg-color, var(--surface-default)));cursor:pointer;display:inline-grid;place-items:center;vertical-align:middle;flex-shrink:0;margin:0;border-radius:var(--_checkbox-radius, var(--ds-checkbox-radius, var(--ds-radius-inner)));transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.check:hover:not(:disabled){border-color:var(--_checkbox-hover-border-color, var(--ds-checkbox-hover-border-color, var(--accent)))}.check:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.check:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.check{color:var(--icon-on-primary)}.check:after{content:\"\";--_check-mark-enter-duration: var(--ds-check-mark-enter-duration, var(--ds-motion-check-enter-duration));--_check-mark-enter-easing: var(--ds-check-mark-enter-easing, var(--ds-motion-check-enter-easing));--_check-mark-exit-duration: var(--ds-check-mark-exit-duration, var(--ds-motion-check-exit-duration));--_check-mark-exit-easing: var(--ds-check-mark-exit-easing, var(--ds-motion-check-exit-easing));width:var(--check-tick-size);height:var(--check-tick-size);transform:scale(.6);opacity:0;transform-origin:center;transition:transform var(--_check-mark-exit-duration) var(--_check-mark-exit-easing),opacity var(--_check-mark-exit-duration) var(--_check-mark-exit-easing);background-color:currentcolor}@media(forced-colors:active){.check:after{background-color:CanvasText}}.check:after{-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat}.check:checked{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.check:checked:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing)}.check:indeterminate{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.check:indeterminate:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing);width:var(--check-indet-w);height:var(--check-indet-h);border-radius:var(--ds-radius-inner);-webkit-mask:none;mask:none}.check: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)}.col-move{display:inline-flex;gap:var(--space-2-5)}.col-move-btn{display:inline-flex;padding:0;border:0;background:none;color:var(--icon-default);cursor:pointer;position:relative}.col-move-btn:before{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--hit-xs));height:max(100%,var(--hit-xs));translate:-50% -50%;border-radius:inherit}.col-move-btn:focus-visible{outline-style:none}.col-move-btn:focus-visible:before{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(var(--focus-ring-offset) - 2 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.col-move-btn:hover:not(:disabled){color:var(--icon-strong)}.col-move-btn:disabled{color:var(--text-disabled);cursor:default}.col-reset{margin-top:var(--space-1);padding:0;border:0;background:none;color:var(--accent);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;text-align:left}.col-reset:hover{text-decoration:underline}\n"], dependencies: [{ kind: "component", type: BottomSheetComponent, selector: "ds-bottom-sheet", inputs: ["open", "title", "snapPoints"], outputs: ["openChange", "closed"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PopoverComponent, selector: "ds-popover", inputs: ["align", "placement", "arrow", "panelRole", "panelLabel"] }] });
|
|
137
137
|
}
|
|
138
138
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TableColumnsPanelComponent, decorators: [{
|
|
139
139
|
type: Component,
|
|
@@ -227,7 +227,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
227
227
|
</button>
|
|
228
228
|
</div>
|
|
229
229
|
</ng-template>
|
|
230
|
-
`, styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),: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);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}.col-picker{display:grid;gap:var(--space-2);min-width:160px}.col-picker-row{display:flex;align-items:center;gap:var(--space-2)}.col-picker-row.cdk-drag-preview{background-color:var(--surface-default);border-radius:var(--ds-radius-inner);box-shadow:var(--shadow-popover);padding:var(--space-1) var(--space-2)}.col-picker-row.cdk-drag-placeholder{opacity:.4}.col-picker.cdk-drop-list-dragging .col-picker-row:not(.cdk-drag-placeholder){transition:transform var(--duration-fast) var(--ease-standard)}.col-drag{display:inline-flex;color:var(--icon-default);cursor:grab}.col-drag:active{cursor:grabbing}.col-picker-option{display:flex;align-items:center;gap:var(--space-2);flex:1;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-picker-option:has(input:disabled){color:var(--text-tertiary);cursor:default}.check{appearance:none;width:var(--_checkbox-glyph, var(--check-size));height:var(--_checkbox-glyph, var(--check-size));border:var(--check-bw) solid var(--_checkbox-border-color, var(--ds-checkbox-border-color, var(--border-
|
|
230
|
+
`, styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),: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);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}.col-picker{display:grid;gap:var(--space-2);min-width:160px}.col-picker-row{display:flex;align-items:center;gap:var(--space-2)}.col-picker-row.cdk-drag-preview{background-color:var(--surface-default);border-radius:var(--ds-radius-inner);box-shadow:var(--shadow-popover);padding:var(--space-1) var(--space-2)}.col-picker-row.cdk-drag-placeholder{opacity:.4}.col-picker.cdk-drop-list-dragging .col-picker-row:not(.cdk-drag-placeholder){transition:transform var(--duration-fast) var(--ease-standard)}.col-drag{display:inline-flex;color:var(--icon-default);cursor:grab}.col-drag:active{cursor:grabbing}.col-picker-option{display:flex;align-items:center;gap:var(--space-2);flex:1;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-picker-option:has(input:disabled){color:var(--text-tertiary);cursor:default}.check{appearance:none;width:var(--_checkbox-glyph, var(--check-size));height:var(--_checkbox-glyph, var(--check-size));border:var(--check-bw) solid var(--_checkbox-border-color, var(--ds-checkbox-border-color, var(--border-field)));background:var(--_checkbox-bg-color, var(--ds-checkbox-bg-color, var(--surface-default)));cursor:pointer;display:inline-grid;place-items:center;vertical-align:middle;flex-shrink:0;margin:0;border-radius:var(--_checkbox-radius, var(--ds-checkbox-radius, var(--ds-radius-inner)));transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.check:hover:not(:disabled){border-color:var(--_checkbox-hover-border-color, var(--ds-checkbox-hover-border-color, var(--accent)))}.check:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.check:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.check{color:var(--icon-on-primary)}.check:after{content:\"\";--_check-mark-enter-duration: var(--ds-check-mark-enter-duration, var(--ds-motion-check-enter-duration));--_check-mark-enter-easing: var(--ds-check-mark-enter-easing, var(--ds-motion-check-enter-easing));--_check-mark-exit-duration: var(--ds-check-mark-exit-duration, var(--ds-motion-check-exit-duration));--_check-mark-exit-easing: var(--ds-check-mark-exit-easing, var(--ds-motion-check-exit-easing));width:var(--check-tick-size);height:var(--check-tick-size);transform:scale(.6);opacity:0;transform-origin:center;transition:transform var(--_check-mark-exit-duration) var(--_check-mark-exit-easing),opacity var(--_check-mark-exit-duration) var(--_check-mark-exit-easing);background-color:currentcolor}@media(forced-colors:active){.check:after{background-color:CanvasText}}.check:after{-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat}.check:checked{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.check:checked:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing)}.check:indeterminate{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.check:indeterminate:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing);width:var(--check-indet-w);height:var(--check-indet-h);border-radius:var(--ds-radius-inner);-webkit-mask:none;mask:none}.check: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)}.col-move{display:inline-flex;gap:var(--space-2-5)}.col-move-btn{display:inline-flex;padding:0;border:0;background:none;color:var(--icon-default);cursor:pointer;position:relative}.col-move-btn:before{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--hit-xs));height:max(100%,var(--hit-xs));translate:-50% -50%;border-radius:inherit}.col-move-btn:focus-visible{outline-style:none}.col-move-btn:focus-visible:before{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(var(--focus-ring-offset) - 2 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.col-move-btn:hover:not(:disabled){color:var(--icon-strong)}.col-move-btn:disabled{color:var(--text-disabled);cursor:default}.col-reset{margin-top:var(--space-1);padding:0;border:0;background:none;color:var(--accent);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;text-align:left}.col-reset:hover{text-decoration:underline}\n"] }]
|
|
231
231
|
}], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], reorderable: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderable", required: false }] }], coarsePointer: [{ type: i0.Input, args: [{ isSignal: true, alias: "coarsePointer", required: false }] }], rowExtras: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowExtras", required: false }] }], isVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "isVisible", required: true }] }], isLocked: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLocked", required: true }] }], sheetOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "sheetOpen", required: false }] }, { type: i0.Output, args: ["sheetOpenChange"] }], toggled: [{ type: i0.Output, args: ["toggled"] }], moved: [{ type: i0.Output, args: ["moved"] }], dropped: [{ type: i0.Output, args: ["dropped"] }], resetRequested: [{ type: i0.Output, args: ["resetRequested"] }], popover: [{ type: i0.ViewChild, args: ['popover', { isSignal: true }] }] } });
|
|
232
232
|
|
|
233
233
|
/**
|