@4sh/ui-kit 0.1.0
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/LICENSE +201 -0
- package/NOTICE +7 -0
- package/README.md +229 -0
- package/fesm2022/4sh-ui-kit-forms.mjs +501 -0
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-motion.mjs +155 -0
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-overlay.mjs +61 -0
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-theming.mjs +120 -0
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-types.mjs +12 -0
- package/fesm2022/4sh-ui-kit-types.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-accordion.mjs +244 -0
- package/fesm2022/4sh-ui-kit-ui-accordion.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-alert.mjs +160 -0
- package/fesm2022/4sh-ui-kit-ui-alert.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs +926 -0
- package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs +34 -0
- package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-avatar.mjs +122 -0
- package/fesm2022/4sh-ui-kit-ui-avatar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-badge.mjs +95 -0
- package/fesm2022/4sh-ui-kit-ui-badge.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs +190 -0
- package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-button-split.mjs +151 -0
- package/fesm2022/4sh-ui-kit-ui-button-split.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-button.mjs +222 -0
- package/fesm2022/4sh-ui-kit-ui-button.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-card.mjs +164 -0
- package/fesm2022/4sh-ui-kit-ui-card.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-checkbox.mjs +118 -0
- package/fesm2022/4sh-ui-kit-ui-checkbox.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-chip.mjs +205 -0
- package/fesm2022/4sh-ui-kit-ui-chip.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-context-menu.mjs +219 -0
- package/fesm2022/4sh-ui-kit-ui-context-menu.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-datepicker.mjs +1508 -0
- package/fesm2022/4sh-ui-kit-ui-datepicker.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-drawer.mjs +300 -0
- package/fesm2022/4sh-ui-kit-ui-drawer.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-empty-state.mjs +148 -0
- package/fesm2022/4sh-ui-kit-ui-empty-state.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-field.mjs +102 -0
- package/fesm2022/4sh-ui-kit-ui-field.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-file-upload.mjs +568 -0
- package/fesm2022/4sh-ui-kit-ui-file-upload.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-helper.mjs +85 -0
- package/fesm2022/4sh-ui-kit-ui-helper.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-icon.mjs +98 -0
- package/fesm2022/4sh-ui-kit-ui-icon.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-image.mjs +201 -0
- package/fesm2022/4sh-ui-kit-ui-image.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-group.mjs +119 -0
- package/fesm2022/4sh-ui-kit-ui-input-group.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-mask.mjs +125 -0
- package/fesm2022/4sh-ui-kit-ui-input-mask.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-number.mjs +234 -0
- package/fesm2022/4sh-ui-kit-ui-input-number.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-otp.mjs +288 -0
- package/fesm2022/4sh-ui-kit-ui-input-otp.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-tags.mjs +679 -0
- package/fesm2022/4sh-ui-kit-ui-input-tags.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input.mjs +121 -0
- package/fesm2022/4sh-ui-kit-ui-input.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-label.mjs +61 -0
- package/fesm2022/4sh-ui-kit-ui-label.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-link.mjs +147 -0
- package/fesm2022/4sh-ui-kit-ui-link.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-menu.mjs +484 -0
- package/fesm2022/4sh-ui-kit-ui-menu.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-modal.mjs +555 -0
- package/fesm2022/4sh-ui-kit-ui-modal.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-nudger.mjs +168 -0
- package/fesm2022/4sh-ui-kit-ui-nudger.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-paginator.mjs +245 -0
- package/fesm2022/4sh-ui-kit-ui-paginator.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-popover.mjs +296 -0
- package/fesm2022/4sh-ui-kit-ui-popover.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs +124 -0
- package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-radio.mjs +92 -0
- package/fesm2022/4sh-ui-kit-ui-radio.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-rating.mjs +185 -0
- package/fesm2022/4sh-ui-kit-ui-rating.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-read-only.mjs +146 -0
- package/fesm2022/4sh-ui-kit-ui-read-only.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-segment-control.mjs +386 -0
- package/fesm2022/4sh-ui-kit-ui-segment-control.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-select.mjs +868 -0
- package/fesm2022/4sh-ui-kit-ui-select.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-separator.mjs +77 -0
- package/fesm2022/4sh-ui-kit-ui-separator.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-sidebar.mjs +577 -0
- package/fesm2022/4sh-ui-kit-ui-sidebar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-skeleton.mjs +81 -0
- package/fesm2022/4sh-ui-kit-ui-skeleton.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-slider.mjs +340 -0
- package/fesm2022/4sh-ui-kit-ui-slider.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-spinner.mjs +132 -0
- package/fesm2022/4sh-ui-kit-ui-spinner.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-stepper.mjs +389 -0
- package/fesm2022/4sh-ui-kit-ui-stepper.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-table.mjs +1406 -0
- package/fesm2022/4sh-ui-kit-ui-table.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tabs.mjs +503 -0
- package/fesm2022/4sh-ui-kit-ui-tabs.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tag.mjs +84 -0
- package/fesm2022/4sh-ui-kit-ui-tag.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-textarea.mjs +119 -0
- package/fesm2022/4sh-ui-kit-ui-textarea.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-toast.mjs +424 -0
- package/fesm2022/4sh-ui-kit-ui-toast.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-toggle.mjs +120 -0
- package/fesm2022/4sh-ui-kit-ui-toggle.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tooltip.mjs +445 -0
- package/fesm2022/4sh-ui-kit-ui-tooltip.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit.mjs +16 -0
- package/fesm2022/4sh-ui-kit.mjs.map +1 -0
- package/package.json +287 -0
- package/styles/base/_base.scss +19 -0
- package/styles/base/_motion.scss +144 -0
- package/styles/base/_typography.scss +99 -0
- package/styles/generated/_tokens-breakpoint.scss +8 -0
- package/styles/generated/_tokens-metrics.scss +37 -0
- package/styles/generated/_tokens-primitives.scss +284 -0
- package/styles/generated/_tokens-responsive.scss +99 -0
- package/styles/generated/_tokens-semantics.scss +1274 -0
- package/styles/generated/_tokens-styles.scss +35 -0
- package/styles/generated/_tokens-transitions.scss +11 -0
- package/styles/generated/_tokens-typography.scss +14 -0
- package/styles/generated/_tokens.scss +10 -0
- package/styles/index.scss +25 -0
- package/styles/settings/_ui-config.scss +67 -0
- package/styles/utils/_functions.scss +67 -0
- package/styles/utils/_helpers.scss +129 -0
- package/styles/utils/_mixins.scss +186 -0
- package/styles/utils/_motion.scss +47 -0
- package/styles/utils/_overlay.scss +26 -0
- package/styles/utils.scss +15 -0
- package/styles.css +1 -0
- package/types/4sh-ui-kit-forms.d.ts +259 -0
- package/types/4sh-ui-kit-motion.d.ts +111 -0
- package/types/4sh-ui-kit-overlay.d.ts +31 -0
- package/types/4sh-ui-kit-theming.d.ts +54 -0
- package/types/4sh-ui-kit-types.d.ts +13 -0
- package/types/4sh-ui-kit-ui-accordion.d.ts +140 -0
- package/types/4sh-ui-kit-ui-alert.d.ts +89 -0
- package/types/4sh-ui-kit-ui-autocomplete.d.ts +411 -0
- package/types/4sh-ui-kit-ui-avatar-group.d.ts +17 -0
- package/types/4sh-ui-kit-ui-avatar.d.ts +55 -0
- package/types/4sh-ui-kit-ui-badge.d.ts +38 -0
- package/types/4sh-ui-kit-ui-breadcrumb.d.ts +131 -0
- package/types/4sh-ui-kit-ui-button-split.d.ts +102 -0
- package/types/4sh-ui-kit-ui-button.d.ts +91 -0
- package/types/4sh-ui-kit-ui-card.d.ts +102 -0
- package/types/4sh-ui-kit-ui-checkbox.d.ts +54 -0
- package/types/4sh-ui-kit-ui-chip.d.ts +114 -0
- package/types/4sh-ui-kit-ui-context-menu.d.ts +105 -0
- package/types/4sh-ui-kit-ui-datepicker.d.ts +539 -0
- package/types/4sh-ui-kit-ui-drawer.d.ts +147 -0
- package/types/4sh-ui-kit-ui-empty-state.d.ts +93 -0
- package/types/4sh-ui-kit-ui-field.d.ts +53 -0
- package/types/4sh-ui-kit-ui-file-upload.d.ts +268 -0
- package/types/4sh-ui-kit-ui-helper.d.ts +46 -0
- package/types/4sh-ui-kit-ui-icon.d.ts +69 -0
- package/types/4sh-ui-kit-ui-image.d.ts +88 -0
- package/types/4sh-ui-kit-ui-input-group.d.ts +54 -0
- package/types/4sh-ui-kit-ui-input-mask.d.ts +63 -0
- package/types/4sh-ui-kit-ui-input-number.d.ts +96 -0
- package/types/4sh-ui-kit-ui-input-otp.d.ts +130 -0
- package/types/4sh-ui-kit-ui-input-tags.d.ts +350 -0
- package/types/4sh-ui-kit-ui-input.d.ts +78 -0
- package/types/4sh-ui-kit-ui-label.d.ts +36 -0
- package/types/4sh-ui-kit-ui-link.d.ts +72 -0
- package/types/4sh-ui-kit-ui-menu.d.ts +235 -0
- package/types/4sh-ui-kit-ui-modal.d.ts +241 -0
- package/types/4sh-ui-kit-ui-nudger.d.ts +79 -0
- package/types/4sh-ui-kit-ui-paginator.d.ts +150 -0
- package/types/4sh-ui-kit-ui-popover.d.ts +125 -0
- package/types/4sh-ui-kit-ui-progress-bar.d.ts +82 -0
- package/types/4sh-ui-kit-ui-radio.d.ts +44 -0
- package/types/4sh-ui-kit-ui-rating.d.ts +90 -0
- package/types/4sh-ui-kit-ui-read-only.d.ts +70 -0
- package/types/4sh-ui-kit-ui-segment-control.d.ts +184 -0
- package/types/4sh-ui-kit-ui-select.d.ts +392 -0
- package/types/4sh-ui-kit-ui-separator.d.ts +43 -0
- package/types/4sh-ui-kit-ui-sidebar.d.ts +358 -0
- package/types/4sh-ui-kit-ui-skeleton.d.ts +52 -0
- package/types/4sh-ui-kit-ui-slider.d.ts +127 -0
- package/types/4sh-ui-kit-ui-spinner.d.ts +67 -0
- package/types/4sh-ui-kit-ui-stepper.d.ts +220 -0
- package/types/4sh-ui-kit-ui-table.d.ts +570 -0
- package/types/4sh-ui-kit-ui-tabs.d.ts +225 -0
- package/types/4sh-ui-kit-ui-tag.d.ts +46 -0
- package/types/4sh-ui-kit-ui-textarea.d.ts +61 -0
- package/types/4sh-ui-kit-ui-toast.d.ts +247 -0
- package/types/4sh-ui-kit-ui-toggle.d.ts +67 -0
- package/types/4sh-ui-kit-ui-tooltip.d.ts +167 -0
- package/types/4sh-ui-kit.d.ts +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-ui-sidebar.mjs","sources":["../../../projects/ui-kit/ui-sidebar/src/lib/ui-sidebar.ts","../../../projects/ui-kit/ui-sidebar/src/lib/ui-sidebar.html","../../../projects/ui-kit/ui-sidebar/src/lib/ui-sidebar-menu.ts","../../../projects/ui-kit/ui-sidebar/src/lib/ui-sidebar-menu.html","../../../projects/ui-kit/ui-sidebar/src/lib/ui-sidebar-trigger.ts","../../../projects/ui-kit/ui-sidebar/src/public-api.ts","../../../projects/ui-kit/ui-sidebar/src/4sh-ui-kit-ui-sidebar.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n contentChild,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n isDevMode,\n model,\n numberAttribute,\n output,\n PLATFORM_ID,\n signal,\n TemplateRef,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { UiMotion, UiMotionPreset } from '@4sh/ui-kit/motion';\nimport { UiIcon } from '@4sh/ui-kit/ui-icon';\n\n/** Edge the sidebar is docked to. */\nexport type SidebarSide = 'left' | 'right';\n\n/**\n * Layout strategy:\n * - `static` — the sidebar lives in the page flow and pushes the inset. It can\n * collapse to an icon rail (`collapsed`).\n * - `overlay` — the sidebar floats over the content as an offcanvas panel with a\n * backdrop, driven by the two-way `visible` model.\n *\n * With `responsive` enabled, a `static` sidebar automatically switches to\n * `overlay` below `breakpoint` (mobile offcanvas), and back to the static rail\n * above it.\n */\nexport type SidebarMode = 'static' | 'overlay';\n\n/** Base stacking level for the overlay presentation. */\nconst SIDEBAR_BASE_Z_INDEX = 1000;\n\n/** Process-wide unique id source (aria wiring). */\nlet nextUid = 0;\n\n// --- Body scroll lock (ref-counted, shared across overlay sidebars) -------\nlet scrollLockCount = 0;\nlet savedOverflow = '';\nlet savedPaddingRight = '';\n\n/** Freeze background scroll, compensating the scrollbar gutter to avoid a shift. */\nfunction lockBodyScroll(doc: Document): void {\n if (scrollLockCount === 0) {\n const body = doc.body;\n const gap = (doc.defaultView?.innerWidth ?? 0) - doc.documentElement.clientWidth;\n savedOverflow = body.style.overflow;\n savedPaddingRight = body.style.paddingRight;\n body.style.overflow = 'hidden';\n if (gap > 0) body.style.paddingRight = `${gap}px`;\n }\n scrollLockCount++;\n}\n\n/** Release one scroll lock; restore the body when the last overlay closes. */\nfunction unlockBodyScroll(doc: Document): void {\n scrollLockCount = Math.max(0, scrollLockCount - 1);\n if (scrollLockCount === 0) {\n doc.body.style.overflow = savedOverflow;\n doc.body.style.paddingRight = savedPaddingRight;\n }\n}\n\n/**\n * ui-sidebar — headless application sidebar (navigation chrome).\n *\n * A token-styled vertical surface docked to the `left` or `right` edge, meant to\n * host application navigation (workspace switcher, menus, user footer). Two\n * presentations share the exact same interior:\n *\n * - **Static** (default): the sidebar sits in the layout flow and pushes the\n * page inset. When `collapsible`, it folds down to an icon **rail**\n * (`collapsed`, two-way). With `openOnHover`, a collapsed rail temporarily\n * floats open on hover / focus without shifting the content.\n * - **Overlay**: the sidebar floats over the content as an offcanvas panel with\n * an optional `backdrop`, driven by the two-way `visible` model — focus trap\n * and restore (`@angular/cdk/a11y`), `aria-modal`, background scroll lock,\n * `Escape` to close and an optional click-outside dismiss.\n *\n * With `responsive`, a static sidebar automatically becomes an overlay below\n * `breakpoint` (mobile offcanvas) and returns to the rail above it.\n *\n * Descendant components (e.g. `ui-sidebar-menu`) read the resolved collapsed\n * state through dependency injection, so dropping a menu inside adapts it to the\n * rail automatically. Toggle the sidebar from anywhere with the\n * `[uiSidebarTrigger]` directive.\n *\n * @example\n * ```html\n * <button [uiSidebarTrigger]=\"sb\">Menu</button>\n * <ui-sidebar #sb collapsible ariaLabel=\"Navigation principale\">\n * <ng-template #header>…</ng-template>\n * <ui-sidebar-menu [items]=\"items\" />\n * <ng-template #footer>…</ng-template>\n * </ui-sidebar>\n * ```\n */\n@Component({\n selector: 'ui-sidebar',\n imports: [NgTemplateOutlet, A11yModule, UiMotion, UiIcon],\n templateUrl: './ui-sidebar.html',\n styleUrl: './ui-sidebar.scss',\n})\nexport class UiSidebar {\n /** Edge the sidebar docks to. */\n side = input<SidebarSide>('left');\n /** Presentation strategy (see {@link SidebarMode}). */\n mode = input<SidebarMode>('static');\n\n /** Allow folding to the icon rail (static mode). */\n collapsible = input(true, { transform: booleanAttribute });\n /** Icon-rail state (two-way). Only meaningful in static mode. */\n collapsed = model(false);\n\n /** Offcanvas open state (two-way). Only meaningful in overlay mode. */\n visible = model(false);\n\n /** A collapsed rail floats open on hover / focus (static mode). */\n openOnHover = input(false, { transform: booleanAttribute });\n\n /** Show the backdrop (dim + capture) and block background scroll — overlay only. */\n backdrop = input(true, { transform: booleanAttribute });\n /** Close on backdrop click / `Escape` — overlay only. */\n dismissable = input(true, { transform: booleanAttribute });\n /** Close the overlay when `Escape` is pressed. */\n closeOnEscape = input(true, { transform: booleanAttribute });\n /** Render the built-in close button in the overlay presentation. */\n showCloseButton = input(true, { transform: booleanAttribute });\n\n /**\n * Auto-switch a static sidebar to an overlay below `breakpoint`. Aligns with\n * the design-system breakpoint scale (`$breakpoint-*`).\n */\n responsive = input(false, { transform: booleanAttribute });\n /**\n * Viewport width under which a responsive sidebar becomes an offcanvas\n * overlay. Any CSS length; prefer a value from the breakpoint scale\n * (`tabletLandscape` 900px / `desktop` 1200px).\n */\n breakpoint = input<string>('1024px');\n\n /** Accessible name for the landmark region. */\n ariaLabel = input<string>();\n /** Id of an external element naming the region. */\n ariaLabelledBy = input<string>();\n\n /** FontAwesome name of the close button icon. */\n closeIcon = input<string>('xmark');\n /** Accessible name of the close button. */\n closeAriaLabel = input<string>('Fermer');\n\n /** Extra class(es) merged onto the panel surface. */\n styleClass = input<string>();\n\n /**\n * Scope the overlay presentation to the nearest positioned ancestor\n * (`position: absolute`) instead of the viewport, and skip the body scroll\n * lock. Useful to embed a sidebar inside a bounded region (docs previews,\n * split panels).\n */\n contained = input(false, { transform: booleanAttribute });\n\n /** Floor z-index for the overlay presentation. */\n baseZIndex = input(0, { transform: numberAttribute });\n /** Disable the open/close animation for this sidebar. */\n motionDisabled = input(false, { transform: booleanAttribute });\n\n /** Header region template (logo, workspace switcher…). */\n protected readonly headerTemplate = contentChild<TemplateRef<unknown>>('header');\n /** Footer region template (user card, actions…). */\n protected readonly footerTemplate = contentChild<TemplateRef<unknown>>('footer');\n\n /** Emitted after the overlay becomes visible. */\n shown = output<void>();\n /** Emitted after the overlay is hidden. */\n hidden = output<void>();\n\n /** @ignore */\n private readonly panelRef = viewChild<ElementRef<HTMLElement>>('panel');\n /** @ignore */\n private readonly document = inject(DOCUMENT);\n /** @ignore */\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /** Stable id of the panel — referenced by `[uiSidebarTrigger]` (`aria-controls`). */\n readonly controlsId = `ui-sidebar-${nextUid++}`;\n /** @ignore */\n protected readonly titleId = `${this.controlsId}-title`;\n\n /** @ignore This instance currently holds a body scroll lock. */\n private locked = false;\n /** @ignore Pointer is over the panel (drives `openOnHover`). */\n private readonly hovering = signal(false);\n /** @ignore Viewport is below `breakpoint` (responsive switch). */\n private readonly belowBreakpoint = signal(false);\n\n /** True when the sidebar is presented as a floating overlay. */\n readonly isOverlay = computed(\n () => this.mode() === 'overlay' || (this.responsive() && this.belowBreakpoint()),\n );\n\n /**\n * Resolved icon-rail state exposed to descendants (menus). Always expanded in\n * the overlay presentation, and temporarily expanded while an `openOnHover`\n * rail is hovered / focused.\n */\n readonly effectiveCollapsed = computed(() => {\n if (this.isOverlay()) return false;\n if (!this.collapsed()) return false;\n return !(this.openOnHover() && this.hovering());\n });\n\n /** Whether the trigger should report an expanded state (`aria-expanded`). */\n readonly expanded = computed(() => (this.isOverlay() ? this.visible() : !this.collapsed()));\n\n /** @ignore Layout footprint follows the toggled state, never the hover float. */\n protected readonly railCollapsed = computed(() => !this.isOverlay() && this.collapsed());\n\n /** @ignore Panel is floating over the content (hover-expanded rail). */\n protected readonly floating = computed(\n () => this.openOnHover() && this.collapsed() && this.hovering() && !this.isOverlay(),\n );\n\n /** @ignore Classes applied to the panel surface. */\n protected readonly panelClasses = computed(() => {\n const c = ['ui-sidebar', `_${this.side()}`];\n if (this.effectiveCollapsed()) c.push('_collapsed');\n if (this.floating()) c.push('_floating');\n if (this.isOverlay()) c.push('_overlay');\n const extra = this.styleClass();\n if (extra) c.push(extra);\n return c.join(' ');\n });\n\n /** @ignore Directional slide preset for the overlay presentation. */\n protected readonly motionPreset = computed<UiMotionPreset>(() =>\n this.side() === 'right' ? 'slide-left' : 'slide-right',\n );\n\n /** @ignore Effective overlay stacking level. */\n protected readonly zIndex = computed(() => SIDEBAR_BASE_Z_INDEX + this.baseZIndex());\n\n /** @ignore Id naming the region (external id wins). */\n protected readonly labelledBy = computed(() => this.ariaLabelledBy() ?? null);\n /** @ignore Fallback accessible name. */\n protected readonly resolvedAriaLabel = computed(() =>\n this.labelledBy() ? null : (this.ariaLabel() ?? 'Navigation'),\n );\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n let wasOpen = false;\n\n // Overlay lifecycle: scroll lock + show/hide events.\n effect(() => {\n const overlay = this.isOverlay();\n const open = overlay && this.visible();\n untracked(() => {\n if (open && !wasOpen) {\n wasOpen = true;\n if (this.isBrowser && this.backdrop() && !this.contained()) {\n lockBodyScroll(this.document);\n this.locked = true;\n }\n this.shown.emit();\n } else if (!open && wasOpen) {\n wasOpen = false;\n this.releaseLock();\n this.hidden.emit();\n }\n // `visible` is only meaningful in the overlay presentation: reset it once\n // the sidebar leaves that presentation (e.g. `responsive` crossing back\n // above `breakpoint`), otherwise it silently reopens as an overlay the\n // next time the breakpoint is crossed again.\n if (!overlay && this.visible()) {\n this.visible.set(false);\n }\n });\n });\n\n // Responsive: track the viewport against `breakpoint`.\n if (this.isBrowser) {\n effect((onCleanup) => {\n const query = this.mediaQuery();\n const mql = this.document.defaultView!.matchMedia(query);\n const apply = () => this.belowBreakpoint.set(mql.matches);\n apply();\n mql.addEventListener('change', apply);\n onCleanup(() => mql.removeEventListener('change', apply));\n });\n }\n\n // A11y safeguard: a landmark region needs an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (!this.labelledBy() && !this.ariaLabel()) {\n // resolvedAriaLabel falls back to \"Navigation\"; warn so consumers set an explicit name.\n untracked(() => {\n console.warn(\n '[ui-sidebar] No explicit label: provide `ariaLabel` or `ariaLabelledBy` to name the navigation region.',\n );\n });\n }\n });\n }\n\n destroyRef.onDestroy(() => this.releaseLock());\n }\n\n /** @ignore Media query for the responsive switch (just under the breakpoint). */\n private readonly mediaQuery = computed(() => {\n const bp = this.breakpoint().trim();\n const match = /^(-?\\d*\\.?\\d+)px$/.exec(bp);\n if (match) {\n const px = parseFloat(match[1]) - 0.02;\n return `(max-width: ${px}px)`;\n }\n return `(max-width: ${bp})`;\n });\n\n /** Toggle the sidebar (visibility in overlay mode, collapse in static mode). */\n toggle(): void {\n if (this.isOverlay()) {\n this.visible.update((v) => !v);\n } else if (this.collapsible()) {\n this.collapsed.update((c) => !c);\n }\n }\n\n /** Open / expand the sidebar. */\n open(): void {\n if (this.isOverlay()) this.visible.set(true);\n else this.collapsed.set(false);\n }\n\n /** Close / collapse the sidebar. */\n close(): void {\n if (this.isOverlay()) this.visible.set(false);\n else if (this.collapsible()) this.collapsed.set(true);\n }\n\n /** Move focus onto the panel surface. */\n focus(): void {\n this.panelRef()?.nativeElement.focus();\n }\n\n /** @ignore Rail hover in/out (drives `openOnHover`). */\n protected onRailPointerEnter(): void {\n if (this.openOnHover()) this.hovering.set(true);\n }\n /** @ignore */\n protected onRailPointerLeave(): void {\n if (this.openOnHover()) this.hovering.set(false);\n }\n /** @ignore Keep the rail floating open while focus is inside it. */\n protected onRailFocusIn(): void {\n if (this.openOnHover()) this.hovering.set(true);\n }\n /** @ignore */\n protected onRailFocusOut(event: FocusEvent): void {\n if (!this.openOnHover()) return;\n const next = event.relatedTarget as Node | null;\n const rail = event.currentTarget as HTMLElement;\n if (!next || !rail.contains(next)) this.hovering.set(false);\n }\n\n /** @ignore Escape-to-close (overlay, bubbles from inside the panel). */\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape' && this.closeOnEscape() && this.dismissable()) {\n event.stopPropagation();\n this.visible.set(false);\n }\n }\n\n /** @ignore Backdrop click dismiss (overlay). */\n protected onBackdropPointerdown(event: PointerEvent): void {\n if (!this.dismissable()) return;\n if (event.target === event.currentTarget) this.visible.set(false);\n }\n\n /** @ignore Release this instance's scroll lock, if held. */\n private releaseLock(): void {\n if (this.locked) {\n unlockBodyScroll(this.document);\n this.locked = false;\n }\n }\n}\n","@if (isOverlay()) {\n <!-- Overlay (offcanvas) presentation: rendered only while open so the panel\n animates its slide on insert/removal. Backdrop + positioner are SIBLINGS\n (both direct @if children) so each runs its own leave independently. -->\n @if (visible()) {\n @if (backdrop()) {\n <div\n class=\"ui-sidebar-backdrop\"\n [class._contained]=\"contained()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"'fade'\"\n [motionDisabled]=\"motionDisabled()\"\n #backdropMotion=\"uiMotion\"\n [animate.enter]=\"backdropMotion.enter()\"\n [animate.leave]=\"backdropMotion.leave()\"\n (pointerdown)=\"onBackdropPointerdown($event)\"\n ></div>\n }\n\n <!-- Escape handled on the container, focus lives in the panel content. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-sidebar-positioner\"\n [class._left]=\"side() === 'left'\"\n [class._right]=\"side() === 'right'\"\n [class._contained]=\"contained()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"motionPreset()\"\n [motionDistance]=\"'100%'\"\n [motionDisabled]=\"motionDisabled()\"\n #posMotion=\"uiMotion\"\n [animate.enter]=\"posMotion.enter()\"\n [animate.leave]=\"posMotion.leave()\"\n (keydown)=\"onKeydown($event)\"\n >\n <aside\n #panel\n [class]=\"panelClasses()\"\n [attr.id]=\"controlsId\"\n [attr.aria-modal]=\"'true'\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n tabindex=\"-1\"\n [cdkTrapFocus]=\"true\"\n [cdkTrapFocusAutoCapture]=\"true\"\n >\n <ng-container [ngTemplateOutlet]=\"shell\" />\n </aside>\n </div>\n }\n} @else {\n <!-- Static presentation: an in-flow rail reserves the layout footprint while\n the absolutely-positioned panel can float wider than the rail on hover. -->\n <div\n class=\"ui-sidebar-rail\"\n [class._collapsed]=\"railCollapsed()\"\n [class._left]=\"side() === 'left'\"\n [class._right]=\"side() === 'right'\"\n (pointerenter)=\"onRailPointerEnter()\"\n (pointerleave)=\"onRailPointerLeave()\"\n (focusin)=\"onRailFocusIn()\"\n (focusout)=\"onRailFocusOut($event)\"\n >\n <aside\n #panel\n [class]=\"panelClasses()\"\n [attr.id]=\"controlsId\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n tabindex=\"-1\"\n >\n <ng-container [ngTemplateOutlet]=\"shell\" />\n </aside>\n </div>\n}\n\n<!-- Shared interior: header slot + scrollable body (projected) + footer slot.\n Instantiated by exactly one presentation at a time. -->\n<ng-template #shell>\n @if (isOverlay() && showCloseButton()) {\n <button\n type=\"button\"\n class=\"ui-sidebar-close\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"visible.set(false)\"\n >\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n </button>\n }\n\n @if (headerTemplate(); as tpl) {\n <div class=\"ui-sidebar-header\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: effectiveCollapsed(), collapsed: effectiveCollapsed() }\"\n />\n </div>\n }\n\n <div class=\"ui-sidebar-body\">\n <ng-content />\n </div>\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-sidebar-footer\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: effectiveCollapsed(), collapsed: effectiveCollapsed() }\"\n />\n </div>\n }\n</ng-template>\n","import { booleanAttribute, Component, computed, inject, input, model, output } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { UiFeedbackLevel, UiSubLevel } from '@4sh/ui-kit/types';\nimport { UiIcon } from '@4sh/ui-kit/ui-icon';\nimport { UiBadge } from '@4sh/ui-kit/ui-badge';\nimport { UiTooltip } from '@4sh/ui-kit/ui-tooltip';\nimport { UiSidebar } from './ui-sidebar';\n\n/** Menu density. */\nexport type SidebarMenuSize = 'default' | 'small';\n\n/** Payload emitted by `itemClick` / passed to `command`. */\nexport interface UiSidebarMenuItemCommandEvent {\n originalEvent: Event;\n item: UiSidebarMenuItem;\n}\n\n/**\n * Declarative sidebar navigation entry. An item is either a separator, a leaf\n * (command / router / external link), a plain **section** (a labelled group of\n * items) or a collapsible **group** (`toggleable`) revealing a nested sub-tree.\n */\nexport interface UiSidebarMenuItem {\n /** Stable identifier — drives expansion state and active tracking. */\n id?: string;\n /** Text of the item / group header. */\n label?: string;\n /** Leading FontAwesome icon name (also shown in the collapsed rail). */\n icon?: string;\n /** Child items: turns the entry into a section or collapsible group. */\n items?: UiSidebarMenuItem[];\n /** Render a separator rule instead of a regular entry. */\n separator?: boolean;\n /** Disable the entry (skipped by pointer / keyboard). */\n disabled?: boolean;\n /** Hide the entry entirely (default visible). */\n visible?: boolean;\n /** Callback invoked when the leaf is activated. */\n command?: (event: UiSidebarMenuItemCommandEvent) => void;\n /** Angular router target — the leaf renders a RouterLink anchor. */\n routerLink?: string | unknown[];\n /** Router query params (routerLink mode). */\n queryParams?: Record<string, unknown>;\n /** Exact matching for the active-link style (default false). */\n routerLinkActiveExact?: boolean;\n /** External URL — the leaf renders a plain anchor. */\n url?: string;\n /** Anchor target (e.g. `_blank`). */\n target?: string;\n /** Manual active state (for non-router navigation). */\n active?: boolean;\n /** Trailing badge text (count, status…), rendered as a `ui-badge`. */\n badge?: string;\n /** Level of the trailing badge (defaults to `default`). */\n badgeLevel?: UiFeedbackLevel;\n /** Force the trailing \"opens elsewhere\" icon (auto for `target=\"_blank\"`). */\n external?: boolean;\n /**\n * Collapsible group header. Defaults to `false` at the top level (a plain\n * section header) and `true` for nested groups. Ignored on non-group items.\n */\n toggleable?: boolean;\n /** Initial expanded state of a collapsible group (`expandedKeys` wins). */\n expanded?: boolean;\n /** Accessible name override. */\n ariaLabel?: string;\n /** Extra class on the entry. */\n styleClass?: string;\n}\n\n/** @ignore Resolved render node. */\ninterface UiSidebarMenuNode {\n item: UiSidebarMenuItem;\n key: string;\n kind: 'separator' | 'section' | 'group' | 'item';\n children: UiSidebarMenuNode[];\n depth: number;\n /** A descendant is marked active (drives auto-expand + `_active-within`). */\n activeWithin: boolean;\n}\n\n/**\n * ui-sidebar-menu — declarative navigation menu for `ui-sidebar`.\n *\n * Renders a `UiSidebarMenuItem[]` model as an accessible navigation landmark:\n * a `<nav>` wrapping semantic `role=\"list\"` / `role=\"listitem\"` containers.\n * Supports labelled **sections** (grouped navigation), **collapsible groups**\n * (`toggleable`) revealing deep nested sub-trees with expansion state\n * (two-way `expandedKeys`), and per-item **active tracking** (RouterLink for\n * router items, `active` for manual navigation — groups containing an active\n * descendant auto-expand).\n *\n * Dropped inside a `ui-sidebar`, it reads the resolved collapsed state through\n * DI and folds to an **icon rail** automatically (labels hidden, icon tooltips).\n * Used standalone, control the rail with the `collapsed` input.\n *\n * Keyboard support is native: `Tab` / `Shift+Tab` move between the links,\n * toggles and rails; `Enter` / `Space` activate the focused control.\n */\n@Component({\n selector: 'ui-sidebar-menu',\n imports: [NgTemplateOutlet, RouterLink, RouterLinkActive, UiIcon, UiBadge, UiTooltip],\n templateUrl: './ui-sidebar-menu.html',\n styleUrl: './ui-sidebar-menu.scss',\n})\nexport class UiSidebarMenu {\n /** Declarative menu model. */\n items = input<UiSidebarMenuItem[]>([]);\n /** Navigation token family. */\n level = input<UiSubLevel>('high');\n /** Menu density. */\n size = input<SidebarMenuSize>('default');\n /** Icon-rail state when used standalone (a parent `ui-sidebar` overrides it). */\n collapsed = input(false, { transform: booleanAttribute });\n /** Accessible name for the navigation landmark. */\n ariaLabel = input<string>();\n /** Id of an external element naming the landmark. */\n ariaLabelledBy = input<string>();\n /** Play the collapse animation on nested groups. */\n motion = input(true, { transform: booleanAttribute });\n /**\n * In the collapsed icon rail, reveal each item's label as a tooltip on hover /\n * focus (via the `[uiTooltip]` directive). No effect when expanded.\n */\n tooltips = input(false, { transform: booleanAttribute });\n\n /** Expanded group keys (two-way). Keyed by `id`, or a positional key. */\n expandedKeys = model<string[]>();\n\n /** Emitted when a leaf item is activated. */\n itemClick = output<UiSidebarMenuItemCommandEvent>();\n\n /** @ignore Optional host sidebar — supplies the resolved collapsed state. */\n private readonly parent = inject(UiSidebar, { optional: true });\n\n /** @ignore Effective icon-rail state (parent sidebar wins). */\n protected readonly isCollapsed = computed(() => this.parent?.effectiveCollapsed() ?? this.collapsed());\n\n /** @ignore Show label tooltips (collapsed rail + `tooltips` enabled). */\n protected readonly showTooltips = computed(() => this.tooltips() && this.isCollapsed());\n\n /** @ignore Leaf opens elsewhere → trailing external icon (expanded only). */\n protected isExternal(node: UiSidebarMenuNode): boolean {\n return node.kind === 'item' && (node.item.external === true || node.item.target === '_blank');\n }\n\n /** @ignore Resolved render tree. */\n protected readonly nodes = computed(() => this.resolve(this.items(), 0, 'n'));\n\n /** @ignore Keys of groups seeded expanded (item.expanded or active descendant). */\n private readonly seedKeys = computed(() => {\n const keys: string[] = [];\n const walk = (nodes: UiSidebarMenuNode[]): void => {\n for (const node of nodes) {\n if (node.kind === 'group' && (node.item.expanded || node.activeWithin)) keys.push(node.key);\n if (node.children.length) walk(node.children);\n }\n };\n walk(this.nodes());\n return keys;\n });\n\n /** @ignore Currently expanded group keys. */\n protected readonly expandedSet = computed(() => new Set(this.expandedKeys() ?? this.seedKeys()));\n\n /** @ignore */\n protected isExpanded(node: UiSidebarMenuNode): boolean {\n return this.expandedSet().has(node.key);\n }\n\n /** @ignore Toggle a collapsible group. */\n protected onToggle(node: UiSidebarMenuNode): void {\n if (node.item.disabled) return;\n const next = new Set(this.expandedSet());\n if (next.has(node.key)) next.delete(node.key);\n else next.add(node.key);\n this.expandedKeys.set([...next]);\n }\n\n /** @ignore Leaf activation (command items). */\n protected onItemClick(event: Event, node: UiSidebarMenuNode): void {\n if (node.item.disabled) return;\n node.item.command?.({ originalEvent: event, item: node.item });\n this.itemClick.emit({ originalEvent: event, item: node.item });\n }\n\n /** @ignore Accessible name / tooltip target for the collapsed rail. */\n protected railTitle(node: UiSidebarMenuNode): string | null {\n return this.isCollapsed() ? (node.item.ariaLabel ?? node.item.label ?? null) : (node.item.ariaLabel ?? null);\n }\n\n /** @ignore Resolve the raw model into render nodes. */\n private resolve(items: UiSidebarMenuItem[], depth: number, prefix: string): UiSidebarMenuNode[] {\n const nodes: UiSidebarMenuNode[] = [];\n items.forEach((item, index) => {\n if (item.visible === false) return;\n const key = item.id ?? `${prefix}-${index}`;\n if (item.separator) {\n nodes.push({ item, key, kind: 'separator', children: [], depth, activeWithin: false });\n return;\n }\n const hasChildren = !!item.items?.length;\n if (hasChildren) {\n const children = this.resolve(item.items!, depth + 1, key);\n const toggleable = item.toggleable ?? depth > 0;\n const activeWithin = children.some((c) => c.item.active || c.activeWithin);\n nodes.push({\n item,\n key,\n kind: toggleable ? 'group' : 'section',\n children,\n depth,\n activeWithin,\n });\n return;\n }\n nodes.push({ item, key, kind: 'item', children: [], depth, activeWithin: false });\n });\n return nodes;\n }\n}\n","<nav\n [class]=\"'ui-sidebar-menu _' + level() + (size() !== 'default' ? ' _' + size() : '') + (isCollapsed() ? ' _collapsed' : '') + (motion() ? '' : ' _no-motion')\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n>\n <ul class=\"ui-sidebar-menu-list\" role=\"list\">\n <ng-container [ngTemplateOutlet]=\"nodesTpl\" [ngTemplateOutletContext]=\"{ $implicit: nodes() }\" />\n </ul>\n</nav>\n\n<!-- Recursive node list (separator | section | collapsible group | leaf). -->\n<ng-template #nodesTpl let-nodes>\n @for (node of nodes; track node.key) {\n @switch (node.kind) {\n @case ('separator') {\n <li class=\"ui-sidebar-menu-separator\" role=\"separator\" aria-hidden=\"true\"></li>\n }\n\n @case ('section') {\n <li class=\"ui-sidebar-menu-section\" role=\"listitem\" [class]=\"node.item.styleClass ?? ''\">\n <span class=\"ui-sidebar-menu-section-header\" [attr.id]=\"node.key + '-h'\">\n @if (node.item.icon; as icon) {\n <ui-icon class=\"ui-sidebar-menu-icon\" [name]=\"icon\" size=\"sm\" />\n }\n <span class=\"ui-sidebar-menu-label\">{{ node.item.label }}</span>\n </span>\n <ul class=\"ui-sidebar-menu-sub\" role=\"list\" [attr.aria-labelledby]=\"node.key + '-h'\">\n <ng-container [ngTemplateOutlet]=\"nodesTpl\" [ngTemplateOutletContext]=\"{ $implicit: node.children }\" />\n </ul>\n </li>\n }\n\n @case ('group') {\n <li\n class=\"ui-sidebar-menu-entry\"\n role=\"listitem\"\n [class._active-within]=\"node.activeWithin\"\n [class]=\"node.item.styleClass ?? ''\"\n >\n <button\n type=\"button\"\n class=\"ui-sidebar-menu-action _toggle\"\n [attr.aria-expanded]=\"isExpanded(node)\"\n [attr.aria-controls]=\"node.key + '-g'\"\n [attr.aria-label]=\"railTitle(node)\"\n [attr.title]=\"showTooltips() ? null : railTitle(node)\"\n [uiTooltip]=\"node.item.label || ''\"\n [tooltipDisabled]=\"!showTooltips()\"\n tooltipPosition=\"right\"\n [disabled]=\"node.item.disabled ?? false\"\n (click)=\"onToggle(node)\"\n >\n @if (node.item.icon; as icon) {\n <ui-icon class=\"ui-sidebar-menu-icon\" [name]=\"icon\" size=\"sm\" />\n }\n <span class=\"ui-sidebar-menu-label\">{{ node.item.label }}</span>\n @if (node.item.badge; as badge) {\n <ui-badge class=\"ui-sidebar-menu-badge\" [value]=\"badge\" [level]=\"node.item.badgeLevel ?? 'default'\" size=\"small\" />\n }\n <!-- `_open` (not `_expanded`: a global width:100% helper class exists). -->\n <ui-icon class=\"ui-sidebar-menu-chevron\" [class._open]=\"isExpanded(node)\" name=\"chevron-down\" size=\"sm\" />\n </button>\n\n <div\n class=\"ui-sidebar-menu-collapse\"\n [class._open]=\"isExpanded(node)\"\n [attr.id]=\"node.key + '-g'\"\n [attr.inert]=\"isExpanded(node) ? null : ''\"\n >\n <div class=\"ui-sidebar-menu-collapse-inner\">\n <ul class=\"ui-sidebar-menu-sub _nested\" role=\"list\">\n <ng-container [ngTemplateOutlet]=\"nodesTpl\" [ngTemplateOutletContext]=\"{ $implicit: node.children }\" />\n </ul>\n </div>\n </div>\n </li>\n }\n\n @case ('item') {\n <li class=\"ui-sidebar-menu-entry\" role=\"listitem\" [class]=\"node.item.styleClass ?? ''\">\n <ng-template #content>\n @if (node.item.icon; as icon) {\n <ui-icon class=\"ui-sidebar-menu-icon\" [name]=\"icon\" size=\"sm\" />\n }\n <span class=\"ui-sidebar-menu-label\">{{ node.item.label }}</span>\n @if (isExternal(node)) {\n <ui-icon class=\"ui-sidebar-menu-external\" name=\"arrow-up-right-from-square\" size=\"sm\" aria-hidden=\"true\" />\n }\n @if (node.item.badge; as badge) {\n <ui-badge class=\"ui-sidebar-menu-badge\" [value]=\"badge\" [level]=\"node.item.badgeLevel ?? 'default'\" size=\"small\" />\n }\n </ng-template>\n\n @if (node.item.routerLink !== undefined && !node.item.disabled) {\n <a\n class=\"ui-sidebar-menu-action\"\n [routerLink]=\"node.item.routerLink\"\n [queryParams]=\"node.item.queryParams ?? null\"\n routerLinkActive=\"_active\"\n [ariaCurrentWhenActive]=\"'page'\"\n [routerLinkActiveOptions]=\"{ exact: node.item.routerLinkActiveExact ?? false }\"\n [attr.target]=\"node.item.target || null\"\n [attr.aria-label]=\"railTitle(node)\"\n [attr.title]=\"showTooltips() ? null : railTitle(node)\"\n [uiTooltip]=\"node.item.label || ''\"\n [tooltipDisabled]=\"!showTooltips()\"\n tooltipPosition=\"right\"\n (click)=\"onItemClick($event, node)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n } @else if (node.item.url && !node.item.disabled) {\n <a\n class=\"ui-sidebar-menu-action\"\n [class._active]=\"node.item.active\"\n [attr.href]=\"node.item.url\"\n [attr.target]=\"node.item.target || null\"\n [attr.rel]=\"node.item.target === '_blank' ? 'noopener noreferrer' : null\"\n [attr.aria-label]=\"railTitle(node)\"\n [attr.title]=\"showTooltips() ? null : railTitle(node)\"\n [uiTooltip]=\"node.item.label || ''\"\n [tooltipDisabled]=\"!showTooltips()\"\n tooltipPosition=\"right\"\n [attr.aria-current]=\"node.item.active ? 'page' : null\"\n (click)=\"onItemClick($event, node)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"ui-sidebar-menu-action\"\n [class._active]=\"node.item.active\"\n [attr.aria-current]=\"node.item.active ? 'true' : null\"\n [attr.aria-label]=\"railTitle(node)\"\n [attr.title]=\"showTooltips() ? null : railTitle(node)\"\n [uiTooltip]=\"node.item.label || ''\"\n [tooltipDisabled]=\"!showTooltips()\"\n tooltipPosition=\"right\"\n [disabled]=\"node.item.disabled ?? false\"\n (click)=\"onItemClick($event, node)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n </li>\n }\n }\n }\n</ng-template>\n","import { afterRenderEffect, Directive, ElementRef, inject, input } from '@angular/core';\nimport { UiSidebar } from './ui-sidebar';\n\n/**\n * uiSidebarTrigger — toggles a `ui-sidebar` from any element.\n *\n * Wires the accessibility contract between a control (button, menu item, rail…)\n * and the sidebar it operates: reflects `aria-controls` (the panel id) and\n * `aria-expanded` (the resolved open/collapsed state), and toggles on\n * activation. Enter / Space come for free on a native `<button>`.\n *\n * The directive is often placed on a `ui-button` host (a component, not a native\n * `<button>`): the ARIA attributes are applied to the actual interactive\n * descendant (native `<button>`/`<a>`/`[role=button]`), never to the wrapper\n * custom element, so assistive tech reads them off the real accessible node —\n * same convention as `ui-popover`'s trigger handling.\n *\n * @example\n * ```html\n * <button [uiSidebarTrigger]=\"sb\" aria-label=\"Basculer le menu\">☰</button>\n * <ui-sidebar #sb>…</ui-sidebar>\n * ```\n */\n@Directive({\n selector: '[uiSidebarTrigger]',\n host: {\n '(click)': 'onToggle()',\n },\n})\nexport class UiSidebarTrigger {\n /** The sidebar this control toggles (e.g. `[uiSidebarTrigger]=\"sb\"`). */\n sidebar = input.required<UiSidebar>({ alias: 'uiSidebarTrigger' });\n\n /** @ignore */\n private readonly hostEl: HTMLElement = inject(ElementRef).nativeElement;\n\n constructor() {\n // `afterRenderEffect`, not `effect`: the interactive descendant (e.g. a\n // `ui-button`'s inner `<button>`) only exists once the host component's own\n // view has rendered, which happens after this directive's construction.\n afterRenderEffect(() => {\n const sidebar = this.sidebar();\n const el = this.resolveInteractiveEl();\n el.setAttribute('aria-controls', sidebar.controlsId);\n el.setAttribute('aria-expanded', String(sidebar.expanded()));\n });\n }\n\n /** @ignore */\n protected onToggle(): void {\n this.sidebar().toggle();\n }\n\n /** @ignore The real interactive node when hosted on a component wrapper (e.g. `ui-button`). */\n private resolveInteractiveEl(): HTMLElement {\n return this.hostEl.querySelector<HTMLElement>('button, a[href], [role=\"button\"]') ?? this.hostEl;\n }\n}\n","/*\n * Public API Surface of ui-kit/ui-sidebar\n */\n\nexport * from './lib/ui-sidebar-menu';\nexport * from './lib/ui-sidebar-trigger';\nexport * from './lib/ui-sidebar';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAyCA;AACA,MAAM,oBAAoB,GAAG,IAAI;AAEjC;AACA,IAAI,OAAO,GAAG,CAAC;AAEf;AACA,IAAI,eAAe,GAAG,CAAC;AACvB,IAAI,aAAa,GAAG,EAAE;AACtB,IAAI,iBAAiB,GAAG,EAAE;AAE1B;AACA,SAAS,cAAc,CAAC,GAAa,EAAA;AACnC,IAAA,IAAI,eAAe,KAAK,CAAC,EAAE;AACzB,QAAA,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI;AACrB,QAAA,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,UAAU,IAAI,CAAC,IAAI,GAAG,CAAC,eAAe,CAAC,WAAW;AAChF,QAAA,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ;AACnC,QAAA,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY;AAC3C,QAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ;QAC9B,IAAI,GAAG,GAAG,CAAC;YAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,CAAA,EAAG,GAAG,IAAI;IACnD;AACA,IAAA,eAAe,EAAE;AACnB;AAEA;AACA,SAAS,gBAAgB,CAAC,GAAa,EAAA;IACrC,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,eAAe,GAAG,CAAC,CAAC;AAClD,IAAA,IA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,SAAA,EAAA,EAAA,OAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,YAAY;AACxB,qBAAA;AACF,iBAAA;;;AC5BD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, computed, Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* ui-skeleton — a placeholder shown in place of content while it loads.
|
|
6
|
+
*
|
|
7
|
+
* Renders a single token-colored box whose shape and dimensions come from
|
|
8
|
+
* design tokens. Three shapes (`text`, `circle`, `rectangle`) ship with
|
|
9
|
+
* sensible default sizes; `width` / `height` / `borderRadius` override any of
|
|
10
|
+
* them with a raw CSS value for bespoke layouts (cards, grids, lists, tables).
|
|
11
|
+
*
|
|
12
|
+
* The background color is exposed through the `--ui-skeleton-background` custom
|
|
13
|
+
* property (and the sweeping reflection tint through `--ui-skeleton-shine`) for
|
|
14
|
+
* one-off theming.
|
|
15
|
+
*
|
|
16
|
+
* Accessible: the host is `aria-hidden` so screen readers skip it (loading is a
|
|
17
|
+
* purely visual state); group several skeletons under a container carrying
|
|
18
|
+
* `aria-busy="true"` to announce the loading region. Motion honours the OS
|
|
19
|
+
* reduced-motion preference and the kit-wide `data-motion="off"` switch.
|
|
20
|
+
*/
|
|
21
|
+
class UiSkeleton {
|
|
22
|
+
constructor() {
|
|
23
|
+
/** Shape of the placeholder. */
|
|
24
|
+
this.shape = input('text', /* @ts-ignore */
|
|
25
|
+
...(ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []));
|
|
26
|
+
/** Size preset (per-shape default dimensions). */
|
|
27
|
+
this.size = input('default', /* @ts-ignore */
|
|
28
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
29
|
+
/** Raw CSS width, overriding the shape default (e.g. "100%", "10rem"). */
|
|
30
|
+
this.width = input(/* @ts-ignore */
|
|
31
|
+
...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
|
|
32
|
+
/** Raw CSS height, overriding the shape default (e.g. "1rem", "50px"). */
|
|
33
|
+
this.height = input(/* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [undefined, { debugName: "height" }] : /* istanbul ignore next */ []));
|
|
35
|
+
/** Raw CSS border-radius, overriding the shape default. */
|
|
36
|
+
this.borderRadius = input(/* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [undefined, { debugName: "borderRadius" }] : /* istanbul ignore next */ []));
|
|
38
|
+
/** Loading animation (base is `wave` — a reflection sweeping across the box). */
|
|
39
|
+
this.animation = input('wave', /* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [{ debugName: "animation" }] : /* istanbul ignore next */ []));
|
|
41
|
+
/** @ignore Inline style overrides (win over the token-driven defaults). */
|
|
42
|
+
this.boxStyle = computed(() => ({
|
|
43
|
+
width: this.width() ?? null,
|
|
44
|
+
height: this.height() ?? null,
|
|
45
|
+
'border-radius': this.borderRadius() ?? null,
|
|
46
|
+
}), /* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [{ debugName: "boxStyle" }] : /* istanbul ignore next */ []));
|
|
48
|
+
/** @ignore */
|
|
49
|
+
this.classes = computed(() => {
|
|
50
|
+
const c = ['ui-skeleton', `_${this.shape()}`];
|
|
51
|
+
if (this.size() !== 'default')
|
|
52
|
+
c.push(`_${this.size()}`);
|
|
53
|
+
const anim = this.animation();
|
|
54
|
+
if (anim === 'pulse')
|
|
55
|
+
c.push('_pulse');
|
|
56
|
+
else if (anim === 'none')
|
|
57
|
+
c.push('_static');
|
|
58
|
+
return c.join(' ');
|
|
59
|
+
}, /* @ts-ignore */
|
|
60
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
61
|
+
}
|
|
62
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: UiSkeleton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
63
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: UiSkeleton, isStandalone: true, selector: "ui-skeleton", inputs: { shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "borderRadius", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "animation", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-hidden": "true" } }, ngImport: i0, template: "<div [class]=\"classes()\" [style]=\"boxStyle()\"></div>\n", styles: [":host{display:contents}.ui-skeleton{display:block;flex:none;position:relative;overflow:hidden;background-color:var(--ui-skeleton-background, var(--global-background-muted))}.ui-skeleton:after{content:\"\";position:absolute;inset:0;transform:translate(-100%);background:linear-gradient(90deg,transparent 0%,var(--ui-skeleton-shine, rgba(255, 255, 255, .6)) 50%,transparent 100%);will-change:transform;animation:ui-skeleton-wave 1.6s ease-in-out infinite}.ui-skeleton._text{width:14rem;height:1.25rem;border-radius:var(--radius-xl)}.ui-skeleton._circle{width:6.25rem;height:6.25rem;border-radius:var(--radius-full)}.ui-skeleton._rectangle{width:6.25rem;height:6.25rem;border-radius:var(--radius-default)}.ui-skeleton._circle{aspect-ratio:1/1}.ui-skeleton._text._small{height:.75rem}.ui-skeleton._circle._small,.ui-skeleton._rectangle._small{width:4rem;height:4rem}.ui-skeleton._pulse{animation:ui-skeleton-pulse 1.5s ease-in-out infinite}.ui-skeleton._pulse:after{content:none}.ui-skeleton._static:after{content:none}:host-context([data-theme=dark]),:host-context(.dark){--ui-skeleton-shine: rgba(255, 255, 255, .09)}@keyframes ui-skeleton-pulse{50%{opacity:.45}}@keyframes ui-skeleton-wave{to{transform:translate(100%)}}@media(prefers-reduced-motion:reduce){.ui-skeleton{animation:none}.ui-skeleton:after{animation:none;opacity:0}}:host-context([data-motion=off]) .ui-skeleton{animation:none}:host-context([data-motion=off]) .ui-skeleton:after{animation:none;opacity:0}\n"] }); }
|
|
64
|
+
}
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: UiSkeleton, decorators: [{
|
|
66
|
+
type: Component,
|
|
67
|
+
args: [{ selector: 'ui-skeleton', host: {
|
|
68
|
+
'[attr.aria-hidden]': 'true',
|
|
69
|
+
}, template: "<div [class]=\"classes()\" [style]=\"boxStyle()\"></div>\n", styles: [":host{display:contents}.ui-skeleton{display:block;flex:none;position:relative;overflow:hidden;background-color:var(--ui-skeleton-background, var(--global-background-muted))}.ui-skeleton:after{content:\"\";position:absolute;inset:0;transform:translate(-100%);background:linear-gradient(90deg,transparent 0%,var(--ui-skeleton-shine, rgba(255, 255, 255, .6)) 50%,transparent 100%);will-change:transform;animation:ui-skeleton-wave 1.6s ease-in-out infinite}.ui-skeleton._text{width:14rem;height:1.25rem;border-radius:var(--radius-xl)}.ui-skeleton._circle{width:6.25rem;height:6.25rem;border-radius:var(--radius-full)}.ui-skeleton._rectangle{width:6.25rem;height:6.25rem;border-radius:var(--radius-default)}.ui-skeleton._circle{aspect-ratio:1/1}.ui-skeleton._text._small{height:.75rem}.ui-skeleton._circle._small,.ui-skeleton._rectangle._small{width:4rem;height:4rem}.ui-skeleton._pulse{animation:ui-skeleton-pulse 1.5s ease-in-out infinite}.ui-skeleton._pulse:after{content:none}.ui-skeleton._static:after{content:none}:host-context([data-theme=dark]),:host-context(.dark){--ui-skeleton-shine: rgba(255, 255, 255, .09)}@keyframes ui-skeleton-pulse{50%{opacity:.45}}@keyframes ui-skeleton-wave{to{transform:translate(100%)}}@media(prefers-reduced-motion:reduce){.ui-skeleton{animation:none}.ui-skeleton:after{animation:none;opacity:0}}:host-context([data-motion=off]) .ui-skeleton{animation:none}:host-context([data-motion=off]) .ui-skeleton:after{animation:none;opacity:0}\n"] }]
|
|
70
|
+
}], propDecorators: { shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], borderRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderRadius", required: false }] }], animation: [{ type: i0.Input, args: [{ isSignal: true, alias: "animation", required: false }] }] } });
|
|
71
|
+
|
|
72
|
+
/*
|
|
73
|
+
* Public API Surface of ui-kit/ui-skeleton
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Generated bundle index. Do not edit.
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
export { UiSkeleton };
|
|
81
|
+
//# sourceMappingURL=4sh-ui-kit-ui-skeleton.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-ui-skeleton.mjs","sources":["../../../projects/ui-kit/ui-skeleton/src/lib/ui-skeleton.ts","../../../projects/ui-kit/ui-skeleton/src/lib/ui-skeleton.html","../../../projects/ui-kit/ui-skeleton/src/public-api.ts","../../../projects/ui-kit/ui-skeleton/src/4sh-ui-kit-ui-skeleton.ts"],"sourcesContent":["import { Component, computed, input } from '@angular/core';\n\n/** Visual shape of the placeholder. */\nexport type UiSkeletonShape = 'text' | 'circle' | 'rectangle';\n/** Size preset (per-shape default dimensions). */\nexport type UiSkeletonSize = 'default' | 'small';\n/** Loading animation style. */\nexport type UiSkeletonAnimation = 'wave' | 'pulse' | 'none';\n\n/**\n * ui-skeleton — a placeholder shown in place of content while it loads.\n *\n * Renders a single token-colored box whose shape and dimensions come from\n * design tokens. Three shapes (`text`, `circle`, `rectangle`) ship with\n * sensible default sizes; `width` / `height` / `borderRadius` override any of\n * them with a raw CSS value for bespoke layouts (cards, grids, lists, tables).\n *\n * The background color is exposed through the `--ui-skeleton-background` custom\n * property (and the sweeping reflection tint through `--ui-skeleton-shine`) for\n * one-off theming.\n *\n * Accessible: the host is `aria-hidden` so screen readers skip it (loading is a\n * purely visual state); group several skeletons under a container carrying\n * `aria-busy=\"true\"` to announce the loading region. Motion honours the OS\n * reduced-motion preference and the kit-wide `data-motion=\"off\"` switch.\n */\n@Component({\n selector: 'ui-skeleton',\n templateUrl: './ui-skeleton.html',\n styleUrl: './ui-skeleton.scss',\n host: {\n '[attr.aria-hidden]': 'true',\n },\n})\nexport class UiSkeleton {\n /** Shape of the placeholder. */\n shape = input<UiSkeletonShape>('text');\n /** Size preset (per-shape default dimensions). */\n size = input<UiSkeletonSize>('default');\n /** Raw CSS width, overriding the shape default (e.g. \"100%\", \"10rem\"). */\n width = input<string>();\n /** Raw CSS height, overriding the shape default (e.g. \"1rem\", \"50px\"). */\n height = input<string>();\n /** Raw CSS border-radius, overriding the shape default. */\n borderRadius = input<string>();\n /** Loading animation (base is `wave` — a reflection sweeping across the box). */\n animation = input<UiSkeletonAnimation>('wave');\n\n /** @ignore Inline style overrides (win over the token-driven defaults). */\n protected readonly boxStyle = computed(() => ({\n width: this.width() ?? null,\n height: this.height() ?? null,\n 'border-radius': this.borderRadius() ?? null,\n }));\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-skeleton', `_${this.shape()}`];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n const anim = this.animation();\n if (anim === 'pulse') c.push('_pulse');\n else if (anim === 'none') c.push('_static');\n return c.join(' ');\n });\n}\n","<div [class]=\"classes()\" [style]=\"boxStyle()\"></div>\n","/*\n * Public API Surface of ui-kit/ui-skeleton\n */\n\nexport * from './lib/ui-skeleton';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AASA;;;;;;;;;;;;;;;;AAgBG;MASU,UAAU,CAAA;AARvB,IAAA,WAAA,GAAA;;QAUE,IAAA,CAAA,KAAK,GAAG,KAAK,CAAkB,MAAM;kFAAC;;QAEtC,IAAA,CAAA,IAAI,GAAG,KAAK,CAAiB,SAAS;iFAAC;;AAEvC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAU;;AAEvB,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK;8FAAU;;AAExB,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK;oGAAU;;QAE9B,IAAA,CAAA,SAAS,GAAG,KAAK,CAAsB,MAAM;sFAAC;;AAG3B,QAAA,IAAA,CAAA,QAAQ,GAAG,QAAQ,CAAC,OAAO;AAC5C,YAAA,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI;AAC3B,YAAA,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI;AAC7B,YAAA,eAAe,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,IAAI;SAC7C,CAAC;qFAAC;;AAGgB,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAK;AACzC,YAAA,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,CAAA,CAAA,EAAI,IAAI,CAAC,KAAK,EAAE,CAAA,CAAE,CAAC;AAC7C,YAAA,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,SAAS;gBAAE,CAAC,CAAC,IAAI,CAAC,CAAA,CAAA,EAAI,IAAI,CAAC,IAAI,EAAE,CAAA,CAAE,CAAC;AACxD,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;YAC7B,IAAI,IAAI,KAAK,OAAO;AAAE,gBAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;iBACjC,IAAI,IAAI,KAAK,MAAM;AAAE,gBAAA,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;AAC3C,YAAA,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QACpB,CAAC;oFAAC;AACH,IAAA;8GA9BY,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAV,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAU,03BClCvB,4DACA,EAAA,MAAA,EAAA,CAAA,g8CAAA,CAAA,EAAA,CAAA,CAAA;;2FDiCa,UAAU,EAAA,UAAA,EAAA,CAAA;kBARtB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAAA,IAAA,EAGjB;AACJ,wBAAA,oBAAoB,EAAE,MAAM;AAC7B,qBAAA,EAAA,QAAA,EAAA,4DAAA,EAAA,MAAA,EAAA,CAAA,g8CAAA,CAAA,EAAA;;;AEhCH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, numberAttribute, booleanAttribute, output, viewChild, viewChildren, signal, computed, isDevMode, effect, forwardRef, Component } from '@angular/core';
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
+
import { BaseFieldControl, warnMissingAccessibleName } from '@4sh/ui-kit/forms';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* ui-slider — headless slider to pick a numeric value (or a range) by dragging
|
|
8
|
+
* a handle along a track.
|
|
9
|
+
*
|
|
10
|
+
* Built on the WAI-ARIA slider pattern: each handle is a `role="slider"` element
|
|
11
|
+
* exposing `aria-valuemin/max/now` and `aria-orientation`, fully keyboard driven
|
|
12
|
+
* (arrows, Page Up/Down, Home/End). Pointer events cover mouse, touch and pen
|
|
13
|
+
* with a single code path. Interactive states (hover/focus/pressed/disabled) are
|
|
14
|
+
* pure CSS driven by `actions.*` / `form.*` design tokens.
|
|
15
|
+
*
|
|
16
|
+
* Works standalone, with `[(ngModel)]`, Reactive Forms or Signal Forms
|
|
17
|
+
* (`[formField]`) — it is a `ControlValueAccessor`. In `range` mode the model is a
|
|
18
|
+
* two-item array, otherwise a single number.
|
|
19
|
+
*/
|
|
20
|
+
class UiSlider extends BaseFieldControl {
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
/** Minimum boundary value. */
|
|
24
|
+
this.min = input(0, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
25
|
+
/** Maximum boundary value. */
|
|
26
|
+
this.max = input(100, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
27
|
+
/** Increment/decrement granularity (drag snapping + keyboard step). */
|
|
28
|
+
this.step = input(1, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
29
|
+
/** Two handles selecting a `[start, end]` range (the model becomes an array). */
|
|
30
|
+
this.range = input(false, { ...(ngDevMode ? { debugName: "range" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
31
|
+
/** Minimum number of steps kept between the two handles (range mode only). */
|
|
32
|
+
this.minStepsBetweenHandles = input(0, { ...(ngDevMode ? { debugName: "minStepsBetweenHandles" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
33
|
+
/** Renders a tick for every step along the track. */
|
|
34
|
+
this.marks = input(false, { ...(ngDevMode ? { debugName: "marks" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
35
|
+
/** Orientation of the slider (drives the arrow keys and layout). */
|
|
36
|
+
this.orientation = input('horizontal', /* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
38
|
+
/** Accessible name of the start (lower) handle in `range` mode — falls back to `ariaLabel`. */
|
|
39
|
+
this.ariaLabelStart = input(/* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabelStart" }] : /* istanbul ignore next */ []));
|
|
41
|
+
/** Accessible name of the end (upper) handle in `range` mode — falls back to `ariaLabel`. */
|
|
42
|
+
this.ariaLabelEnd = input(/* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabelEnd" }] : /* istanbul ignore next */ []));
|
|
44
|
+
/** Emitted continuously while the value changes (drag, keyboard, track click). */
|
|
45
|
+
this.sliderChange = output();
|
|
46
|
+
/** Emitted once a drag (or track click) completes — mirrors PrimeNG `onSlideEnd`. */
|
|
47
|
+
this.slideEnd = output();
|
|
48
|
+
/** Emitted when a handle receives focus. */
|
|
49
|
+
this.sliderFocus = output();
|
|
50
|
+
/** Emitted when a handle loses focus. */
|
|
51
|
+
this.sliderBlur = output();
|
|
52
|
+
/** @ignore Positioned root: the pointer target and % reference for handles. */
|
|
53
|
+
this.root = viewChild.required('root', /* @ts-ignore */
|
|
54
|
+
...(ngDevMode ? [{ debugName: "root" }] : /* istanbul ignore next */ []));
|
|
55
|
+
/** @ignore The handle elements (one, or two in range mode). */
|
|
56
|
+
this.handleEls = viewChildren('handle', /* @ts-ignore */
|
|
57
|
+
...(ngDevMode ? [{ debugName: "handleEls" }] : /* istanbul ignore next */ []));
|
|
58
|
+
/** @ignore Current model value (written by the form or by user interaction).
|
|
59
|
+
* Redeclared over the base signal: a slider always has a numeric value (never `undefined`). */
|
|
60
|
+
this.modelValue = signal(0, /* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [{ debugName: "modelValue" }] : /* istanbul ignore next */ []));
|
|
62
|
+
/** @ignore Index of the handle currently being dragged (null when idle). */
|
|
63
|
+
this.activeHandle = signal(null, /* @ts-ignore */
|
|
64
|
+
...(ngDevMode ? [{ debugName: "activeHandle" }] : /* istanbul ignore next */ []));
|
|
65
|
+
/** @ignore Normalized `[start, end]` values (range mode). */
|
|
66
|
+
this.rangeValues = computed(() => {
|
|
67
|
+
const v = this.modelValue();
|
|
68
|
+
if (Array.isArray(v))
|
|
69
|
+
return [v[0] ?? this.min(), v[1] ?? this.max()];
|
|
70
|
+
return [this.min(), this.max()];
|
|
71
|
+
}, /* @ts-ignore */
|
|
72
|
+
...(ngDevMode ? [{ debugName: "rangeValues" }] : /* istanbul ignore next */ []));
|
|
73
|
+
/** @ignore Normalized single value (non-range mode). */
|
|
74
|
+
this.singleValue = computed(() => {
|
|
75
|
+
const v = this.modelValue();
|
|
76
|
+
if (typeof v === 'number')
|
|
77
|
+
return v;
|
|
78
|
+
return Array.isArray(v) ? (v[0] ?? this.min()) : this.min();
|
|
79
|
+
}, /* @ts-ignore */
|
|
80
|
+
...(ngDevMode ? [{ debugName: "singleValue" }] : /* istanbul ignore next */ []));
|
|
81
|
+
/** @ignore Handles projected to the view (value + position). */
|
|
82
|
+
this.handles = computed(() => {
|
|
83
|
+
if (this.range()) {
|
|
84
|
+
const [a, b] = this.rangeValues();
|
|
85
|
+
return [
|
|
86
|
+
{ index: 0, value: a, percent: this.toPercent(a) },
|
|
87
|
+
{ index: 1, value: b, percent: this.toPercent(b) },
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
const v = this.singleValue();
|
|
91
|
+
return [{ index: 0, value: v, percent: this.toPercent(v) }];
|
|
92
|
+
}, /* @ts-ignore */
|
|
93
|
+
...(ngDevMode ? [{ debugName: "handles" }] : /* istanbul ignore next */ []));
|
|
94
|
+
/** @ignore Filled portion of the track (offset % + length %). */
|
|
95
|
+
this.fill = computed(() => {
|
|
96
|
+
if (this.range()) {
|
|
97
|
+
const [a, b] = this.handles().map((h) => h.percent);
|
|
98
|
+
return { start: Math.min(a, b), size: Math.abs(b - a) };
|
|
99
|
+
}
|
|
100
|
+
return { start: 0, size: this.handles()[0].percent };
|
|
101
|
+
}, /* @ts-ignore */
|
|
102
|
+
...(ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []));
|
|
103
|
+
/** @ignore Step ticks (only when `marks`, capped to keep the DOM sane). */
|
|
104
|
+
this.markList = computed(() => {
|
|
105
|
+
if (!this.marks())
|
|
106
|
+
return [];
|
|
107
|
+
const step = this.stepSize();
|
|
108
|
+
const min = this.min();
|
|
109
|
+
const max = this.max();
|
|
110
|
+
const count = Math.floor((max - min) / step);
|
|
111
|
+
if (count < 1 || count > 100)
|
|
112
|
+
return [];
|
|
113
|
+
const [lo, hi] = this.range() ? this.rangeValues() : [min, this.singleValue()];
|
|
114
|
+
return Array.from({ length: count + 1 }, (_, i) => {
|
|
115
|
+
const value = this.round(min + i * step);
|
|
116
|
+
return { value, percent: this.toPercent(value), active: value >= lo && value <= hi };
|
|
117
|
+
});
|
|
118
|
+
}, /* @ts-ignore */
|
|
119
|
+
...(ngDevMode ? [{ debugName: "markList" }] : /* istanbul ignore next */ []));
|
|
120
|
+
/** @ignore */
|
|
121
|
+
this.classes = computed(() => {
|
|
122
|
+
const c = ['ui-slider'];
|
|
123
|
+
if (this.orientation() === 'vertical')
|
|
124
|
+
c.push('_vertical');
|
|
125
|
+
if (this.range())
|
|
126
|
+
c.push('_range');
|
|
127
|
+
if (this.isDisabled())
|
|
128
|
+
c.push('_disabled');
|
|
129
|
+
if (this.readonly())
|
|
130
|
+
c.push('_readonly');
|
|
131
|
+
if (this.isInvalid())
|
|
132
|
+
c.push('_invalid');
|
|
133
|
+
return c.join(' ');
|
|
134
|
+
}, /* @ts-ignore */
|
|
135
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
136
|
+
// A11y safeguard: a slider needs an accessible name.
|
|
137
|
+
if (isDevMode()) {
|
|
138
|
+
effect(() => {
|
|
139
|
+
if (!this.ariaLabel() && !this.ariaLabelledBy()) {
|
|
140
|
+
warnMissingAccessibleName('ui-slider', 'No accessible name: provide `ariaLabel` (or `ariaLabelledBy`).');
|
|
141
|
+
}
|
|
142
|
+
if (this.range() && !this.ariaLabelStart() && !this.ariaLabelEnd() && !this.ariaLabelledBy()) {
|
|
143
|
+
warnMissingAccessibleName('ui-slider', 'Range mode: set `ariaLabelStart`/`ariaLabelEnd` so each handle has a distinct name.');
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
writeValue(value) {
|
|
149
|
+
if (this.range()) {
|
|
150
|
+
this.modelValue.set(Array.isArray(value) ? value : [this.min(), this.max()]);
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
this.modelValue.set(typeof value === 'number' ? value : this.min());
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/** @ignore */
|
|
157
|
+
uidPrefix() {
|
|
158
|
+
return 'ui-slider';
|
|
159
|
+
}
|
|
160
|
+
/** Focus the first handle programmatically. */
|
|
161
|
+
focus(options) {
|
|
162
|
+
this.handleEls()[0]?.nativeElement.focus(options);
|
|
163
|
+
}
|
|
164
|
+
// --- Pointer interaction (mouse / touch / pen) -----------------------
|
|
165
|
+
/** @ignore Start dragging: pick the closest handle, capture the pointer, seed the value. */
|
|
166
|
+
onPointerDown(event) {
|
|
167
|
+
if (this.isDisabled() || this.readonly())
|
|
168
|
+
return;
|
|
169
|
+
const value = this.valueFromPointer(event);
|
|
170
|
+
const index = this.range() ? this.nearestHandle(value) : 0;
|
|
171
|
+
this.activeHandle.set(index);
|
|
172
|
+
this.root().nativeElement.setPointerCapture(event.pointerId);
|
|
173
|
+
this.updateValue(index, value);
|
|
174
|
+
this.handleEls()[index]?.nativeElement.focus();
|
|
175
|
+
event.preventDefault();
|
|
176
|
+
}
|
|
177
|
+
/** @ignore */
|
|
178
|
+
onPointerMove(event) {
|
|
179
|
+
const index = this.activeHandle();
|
|
180
|
+
if (index === null)
|
|
181
|
+
return;
|
|
182
|
+
this.updateValue(index, this.valueFromPointer(event));
|
|
183
|
+
}
|
|
184
|
+
/** @ignore End of drag: release capture and fire `slideEnd`. */
|
|
185
|
+
onPointerUp(event) {
|
|
186
|
+
if (this.activeHandle() === null)
|
|
187
|
+
return;
|
|
188
|
+
this.activeHandle.set(null);
|
|
189
|
+
this.root().nativeElement.releasePointerCapture?.(event.pointerId);
|
|
190
|
+
this.slideEnd.emit(this.modelValue());
|
|
191
|
+
}
|
|
192
|
+
// --- Keyboard --------------------------------------------------------
|
|
193
|
+
/** @ignore Arrow / Page / Home / End move the focused handle. */
|
|
194
|
+
onKeyDown(event, index) {
|
|
195
|
+
if (this.isDisabled() || this.readonly())
|
|
196
|
+
return;
|
|
197
|
+
const step = this.stepSize();
|
|
198
|
+
const current = this.range() ? this.rangeValues()[index] : this.singleValue();
|
|
199
|
+
let next;
|
|
200
|
+
switch (event.key) {
|
|
201
|
+
case 'ArrowLeft':
|
|
202
|
+
case 'ArrowDown':
|
|
203
|
+
next = current - step;
|
|
204
|
+
break;
|
|
205
|
+
case 'ArrowRight':
|
|
206
|
+
case 'ArrowUp':
|
|
207
|
+
next = current + step;
|
|
208
|
+
break;
|
|
209
|
+
case 'PageDown':
|
|
210
|
+
next = current - step * 10;
|
|
211
|
+
break;
|
|
212
|
+
case 'PageUp':
|
|
213
|
+
next = current + step * 10;
|
|
214
|
+
break;
|
|
215
|
+
case 'Home':
|
|
216
|
+
next = this.min();
|
|
217
|
+
break;
|
|
218
|
+
case 'End':
|
|
219
|
+
next = this.max();
|
|
220
|
+
break;
|
|
221
|
+
default:
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
event.preventDefault();
|
|
225
|
+
this.updateValue(index, next);
|
|
226
|
+
}
|
|
227
|
+
/** @ignore */
|
|
228
|
+
onFocus(event) {
|
|
229
|
+
this.sliderFocus.emit(event);
|
|
230
|
+
}
|
|
231
|
+
/** @ignore */
|
|
232
|
+
onBlur(event) {
|
|
233
|
+
this.emitTouch();
|
|
234
|
+
this.sliderBlur.emit(event);
|
|
235
|
+
}
|
|
236
|
+
// --- Value helpers ---------------------------------------------------
|
|
237
|
+
/** @ignore Effective step (never 0). */
|
|
238
|
+
stepSize() {
|
|
239
|
+
const s = this.step();
|
|
240
|
+
return s > 0 ? s : 1;
|
|
241
|
+
}
|
|
242
|
+
/** @ignore Value → track position as a 0–100% ratio. */
|
|
243
|
+
toPercent(value) {
|
|
244
|
+
const min = this.min();
|
|
245
|
+
const span = this.max() - min;
|
|
246
|
+
if (span <= 0)
|
|
247
|
+
return 0;
|
|
248
|
+
return Math.min(100, Math.max(0, ((value - min) / span) * 100));
|
|
249
|
+
}
|
|
250
|
+
/** @ignore Pointer coordinate → raw value in [min, max]. */
|
|
251
|
+
valueFromPointer(event) {
|
|
252
|
+
const rect = this.root().nativeElement.getBoundingClientRect();
|
|
253
|
+
const ratio = this.orientation() === 'horizontal'
|
|
254
|
+
? (event.clientX - rect.left) / rect.width
|
|
255
|
+
: (rect.bottom - event.clientY) / rect.height;
|
|
256
|
+
const clamped = Math.min(1, Math.max(0, ratio));
|
|
257
|
+
return this.min() + clamped * (this.max() - this.min());
|
|
258
|
+
}
|
|
259
|
+
/** @ignore Closest handle to a value (range mode). */
|
|
260
|
+
nearestHandle(value) {
|
|
261
|
+
const [a, b] = this.rangeValues();
|
|
262
|
+
return Math.abs(value - a) <= Math.abs(value - b) ? 0 : 1;
|
|
263
|
+
}
|
|
264
|
+
/** @ignore Accessible name of a given handle (distinct per handle in range mode). */
|
|
265
|
+
handleAriaLabel(index) {
|
|
266
|
+
if (!this.range())
|
|
267
|
+
return this.ariaLabel();
|
|
268
|
+
return (index === 0 ? this.ariaLabelStart() : this.ariaLabelEnd()) ?? this.ariaLabel();
|
|
269
|
+
}
|
|
270
|
+
/** @ignore Snap to the step grid, relative to `min`. */
|
|
271
|
+
snap(value) {
|
|
272
|
+
const step = this.stepSize();
|
|
273
|
+
const min = this.min();
|
|
274
|
+
return this.round(min + Math.round((value - min) / step) * step);
|
|
275
|
+
}
|
|
276
|
+
/** @ignore Round to the step's decimal precision (avoids float drift). */
|
|
277
|
+
round(value) {
|
|
278
|
+
const step = this.stepSize();
|
|
279
|
+
const decimals = Number.isInteger(step) ? 0 : (step.toString().split('.')[1]?.length ?? 0);
|
|
280
|
+
return decimals > 0 ? +value.toFixed(decimals) : Math.round(value);
|
|
281
|
+
}
|
|
282
|
+
/** @ignore Clamp to [min, max]. */
|
|
283
|
+
clamp(value) {
|
|
284
|
+
return Math.min(this.max(), Math.max(this.min(), value));
|
|
285
|
+
}
|
|
286
|
+
/** @ignore Snap + clamp + range-gap enforcement, then commit if changed. */
|
|
287
|
+
updateValue(index, raw) {
|
|
288
|
+
if (this.isDisabled() || this.readonly())
|
|
289
|
+
return;
|
|
290
|
+
let value = this.clamp(this.snap(raw));
|
|
291
|
+
if (this.range()) {
|
|
292
|
+
const values = [...this.rangeValues()];
|
|
293
|
+
const gap = this.minStepsBetweenHandles() * this.stepSize();
|
|
294
|
+
if (index === 0)
|
|
295
|
+
value = Math.min(value, values[1] - gap);
|
|
296
|
+
else
|
|
297
|
+
value = Math.max(value, values[0] + gap);
|
|
298
|
+
value = this.clamp(value);
|
|
299
|
+
if (values[index] === value)
|
|
300
|
+
return;
|
|
301
|
+
values[index] = value;
|
|
302
|
+
this.commit(values);
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
if (this.singleValue() === value)
|
|
306
|
+
return;
|
|
307
|
+
this.commit(value);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
/** @ignore Update the model + propagate to the form and the output. */
|
|
311
|
+
commit(value) {
|
|
312
|
+
this.modelValue.set(value);
|
|
313
|
+
this.emitChange(value);
|
|
314
|
+
this.sliderChange.emit(value);
|
|
315
|
+
}
|
|
316
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: UiSlider, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
317
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: UiSlider, isStandalone: true, selector: "ui-slider", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, range: { classPropertyName: "range", publicName: "range", isSignal: true, isRequired: false, transformFunction: null }, minStepsBetweenHandles: { classPropertyName: "minStepsBetweenHandles", publicName: "minStepsBetweenHandles", isSignal: true, isRequired: false, transformFunction: null }, marks: { classPropertyName: "marks", publicName: "marks", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelStart: { classPropertyName: "ariaLabelStart", publicName: "ariaLabelStart", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelEnd: { classPropertyName: "ariaLabelEnd", publicName: "ariaLabelEnd", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sliderChange: "sliderChange", slideEnd: "slideEnd", sliderFocus: "sliderFocus", sliderBlur: "sliderBlur" }, host: { properties: { "style.display": "orientation() === 'vertical' ? 'inline-block' : 'block'", "style.width": "orientation() === 'vertical' ? null : '100%'" } }, providers: [
|
|
318
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiSlider), multi: true },
|
|
319
|
+
], viewQueries: [{ propertyName: "root", first: true, predicate: ["root"], descendants: true, isSignal: true }, { propertyName: "handleEls", predicate: ["handle"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #root\n [class]=\"classes()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\">\n <!-- Rail + filled portion -->\n <div class=\"ui-slider-track\">\n <div class=\"ui-slider-range\"\n [style.inset-inline-start]=\"orientation() === 'horizontal' ? fill().start + '%' : null\"\n [style.width]=\"orientation() === 'horizontal' ? fill().size + '%' : null\"\n [style.bottom]=\"orientation() === 'vertical' ? fill().start + '%' : null\"\n [style.height]=\"orientation() === 'vertical' ? fill().size + '%' : null\"></div>\n </div>\n\n <!-- Step ticks (decorative) -->\n @if (markList().length) {\n <div class=\"ui-slider-marks\" aria-hidden=\"true\">\n @for (mark of markList(); track mark.value) {\n <span class=\"ui-slider-mark\"\n [class._active]=\"mark.active\"\n [style.inset-inline-start]=\"orientation() === 'horizontal' ? mark.percent + '%' : null\"\n [style.bottom]=\"orientation() === 'vertical' ? mark.percent + '%' : null\"></span>\n }\n </div>\n }\n\n <!-- Handles (WAI-ARIA slider pattern) -->\n @for (handle of handles(); track handle.index) {\n <div #handle\n class=\"ui-slider-handle\"\n role=\"slider\"\n [attr.id]=\"handle.index === 0 ? resolvedId() : null\"\n [attr.tabindex]=\"isDisabled() ? -1 : (tabindex() ?? 0)\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"handle.value\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-label]=\"handleAriaLabel(handle.index)\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-disabled]=\"isDisabled() ? true : null\"\n [attr.aria-readonly]=\"readonly() ? true : null\"\n [style.inset-inline-start]=\"orientation() === 'horizontal' ? handle.percent + '%' : null\"\n [style.bottom]=\"orientation() === 'vertical' ? handle.percent + '%' : null\"\n (keydown)=\"onKeyDown($event, handle.index)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"></div>\n }\n</div>\n", styles: [".ui-slider{position:relative;display:flex;align-items:center;width:100%;min-height:1.375rem;touch-action:none;cursor:pointer;-webkit-user-select:none;user-select:none}.ui-slider-track{position:relative;width:100%;height:var(--ui-slider-thickness, .5rem);border-radius:var(--radius-full);background-color:var(--global-background-muted)}.ui-slider-range{position:absolute;top:0;height:100%;border-radius:var(--radius-full);background-color:var(--actions-high-surface-default);transition:background-color var(--transition-default) var(--transition-easeinout)}.ui-slider-handle{position:absolute;top:50%;width:var(--ui-slider-handle-size, 1.375rem);height:var(--ui-slider-handle-size, 1.375rem);transform:translate(-50%,-50%);box-sizing:border-box;border:var(--stroke-default) solid var(--actions-high-stroke-default);border-radius:var(--radius-full);background-color:var(--actions-high-surface-default);cursor:grab;transition:background-color var(--transition-default) var(--transition-easeinout),border-color var(--transition-default) var(--transition-easeinout),box-shadow var(--transition-default) var(--transition-easeinout)}.ui-slider-handle:hover{background-color:var(--actions-high-surface-hover)}.ui-slider-handle:focus-visible{outline:none;border-color:var(--actions-high-stroke-focused);box-shadow:0 0 0 var(--units-2xs) var(--actions-high-stroke-focused)}.ui-slider-handle:active{background-color:var(--actions-high-surface-pressed);cursor:grabbing}.ui-slider-marks{position:absolute;inset:0;pointer-events:none}.ui-slider-mark{position:absolute;top:50%;width:.375rem;height:.375rem;transform:translate(-50%,-50%);border-radius:var(--radius-full);background-color:var(--informative-defaulthigh-surface-default)}.ui-slider-mark._active{background-color:var(--actions-high-content-default)}.ui-slider._vertical{flex-direction:column;width:auto;min-width:1.375rem;height:var(--ui-slider-length, 12rem);min-height:0}.ui-slider._vertical .ui-slider-track{width:var(--ui-slider-thickness, .5rem);height:100%}.ui-slider._vertical .ui-slider-range{top:auto;bottom:0;width:100%;height:auto}.ui-slider._vertical .ui-slider-handle,.ui-slider._vertical .ui-slider-mark{top:auto;left:50%;transform:translate(-50%,50%)}.ui-slider._disabled{cursor:not-allowed}.ui-slider._disabled .ui-slider-range{background-color:var(--actions-high-surface-disabled)}.ui-slider._disabled .ui-slider-handle{cursor:not-allowed;background-color:var(--actions-high-surface-disabled)}.ui-slider._disabled .ui-slider-handle:hover{background-color:var(--actions-high-surface-disabled)}.ui-slider._readonly,.ui-slider._readonly .ui-slider-handle{cursor:default}.ui-slider._invalid .ui-slider-range,.ui-slider._invalid .ui-slider-handle{background-color:var(--form-error-content-default)}.ui-slider._invalid .ui-slider-handle:hover{background-color:var(--form-error-content-hover)}.ui-slider._invalid .ui-slider-handle:focus-visible{border-color:var(--form-error-stroke-focused);box-shadow:0 0 0 var(--units-2xs) var(--form-error-stroke-focused)}\n"] }); }
|
|
320
|
+
}
|
|
321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: UiSlider, decorators: [{
|
|
322
|
+
type: Component,
|
|
323
|
+
args: [{ selector: 'ui-slider', standalone: true, host: {
|
|
324
|
+
'[style.display]': "orientation() === 'vertical' ? 'inline-block' : 'block'",
|
|
325
|
+
'[style.width]': "orientation() === 'vertical' ? null : '100%'",
|
|
326
|
+
}, providers: [
|
|
327
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiSlider), multi: true },
|
|
328
|
+
], template: "<div #root\n [class]=\"classes()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\">\n <!-- Rail + filled portion -->\n <div class=\"ui-slider-track\">\n <div class=\"ui-slider-range\"\n [style.inset-inline-start]=\"orientation() === 'horizontal' ? fill().start + '%' : null\"\n [style.width]=\"orientation() === 'horizontal' ? fill().size + '%' : null\"\n [style.bottom]=\"orientation() === 'vertical' ? fill().start + '%' : null\"\n [style.height]=\"orientation() === 'vertical' ? fill().size + '%' : null\"></div>\n </div>\n\n <!-- Step ticks (decorative) -->\n @if (markList().length) {\n <div class=\"ui-slider-marks\" aria-hidden=\"true\">\n @for (mark of markList(); track mark.value) {\n <span class=\"ui-slider-mark\"\n [class._active]=\"mark.active\"\n [style.inset-inline-start]=\"orientation() === 'horizontal' ? mark.percent + '%' : null\"\n [style.bottom]=\"orientation() === 'vertical' ? mark.percent + '%' : null\"></span>\n }\n </div>\n }\n\n <!-- Handles (WAI-ARIA slider pattern) -->\n @for (handle of handles(); track handle.index) {\n <div #handle\n class=\"ui-slider-handle\"\n role=\"slider\"\n [attr.id]=\"handle.index === 0 ? resolvedId() : null\"\n [attr.tabindex]=\"isDisabled() ? -1 : (tabindex() ?? 0)\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"handle.value\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-label]=\"handleAriaLabel(handle.index)\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-disabled]=\"isDisabled() ? true : null\"\n [attr.aria-readonly]=\"readonly() ? true : null\"\n [style.inset-inline-start]=\"orientation() === 'horizontal' ? handle.percent + '%' : null\"\n [style.bottom]=\"orientation() === 'vertical' ? handle.percent + '%' : null\"\n (keydown)=\"onKeyDown($event, handle.index)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"></div>\n }\n</div>\n", styles: [".ui-slider{position:relative;display:flex;align-items:center;width:100%;min-height:1.375rem;touch-action:none;cursor:pointer;-webkit-user-select:none;user-select:none}.ui-slider-track{position:relative;width:100%;height:var(--ui-slider-thickness, .5rem);border-radius:var(--radius-full);background-color:var(--global-background-muted)}.ui-slider-range{position:absolute;top:0;height:100%;border-radius:var(--radius-full);background-color:var(--actions-high-surface-default);transition:background-color var(--transition-default) var(--transition-easeinout)}.ui-slider-handle{position:absolute;top:50%;width:var(--ui-slider-handle-size, 1.375rem);height:var(--ui-slider-handle-size, 1.375rem);transform:translate(-50%,-50%);box-sizing:border-box;border:var(--stroke-default) solid var(--actions-high-stroke-default);border-radius:var(--radius-full);background-color:var(--actions-high-surface-default);cursor:grab;transition:background-color var(--transition-default) var(--transition-easeinout),border-color var(--transition-default) var(--transition-easeinout),box-shadow var(--transition-default) var(--transition-easeinout)}.ui-slider-handle:hover{background-color:var(--actions-high-surface-hover)}.ui-slider-handle:focus-visible{outline:none;border-color:var(--actions-high-stroke-focused);box-shadow:0 0 0 var(--units-2xs) var(--actions-high-stroke-focused)}.ui-slider-handle:active{background-color:var(--actions-high-surface-pressed);cursor:grabbing}.ui-slider-marks{position:absolute;inset:0;pointer-events:none}.ui-slider-mark{position:absolute;top:50%;width:.375rem;height:.375rem;transform:translate(-50%,-50%);border-radius:var(--radius-full);background-color:var(--informative-defaulthigh-surface-default)}.ui-slider-mark._active{background-color:var(--actions-high-content-default)}.ui-slider._vertical{flex-direction:column;width:auto;min-width:1.375rem;height:var(--ui-slider-length, 12rem);min-height:0}.ui-slider._vertical .ui-slider-track{width:var(--ui-slider-thickness, .5rem);height:100%}.ui-slider._vertical .ui-slider-range{top:auto;bottom:0;width:100%;height:auto}.ui-slider._vertical .ui-slider-handle,.ui-slider._vertical .ui-slider-mark{top:auto;left:50%;transform:translate(-50%,50%)}.ui-slider._disabled{cursor:not-allowed}.ui-slider._disabled .ui-slider-range{background-color:var(--actions-high-surface-disabled)}.ui-slider._disabled .ui-slider-handle{cursor:not-allowed;background-color:var(--actions-high-surface-disabled)}.ui-slider._disabled .ui-slider-handle:hover{background-color:var(--actions-high-surface-disabled)}.ui-slider._readonly,.ui-slider._readonly .ui-slider-handle{cursor:default}.ui-slider._invalid .ui-slider-range,.ui-slider._invalid .ui-slider-handle{background-color:var(--form-error-content-default)}.ui-slider._invalid .ui-slider-handle:hover{background-color:var(--form-error-content-hover)}.ui-slider._invalid .ui-slider-handle:focus-visible{border-color:var(--form-error-stroke-focused);box-shadow:0 0 0 var(--units-2xs) var(--form-error-stroke-focused)}\n"] }]
|
|
329
|
+
}], ctorParameters: () => [], propDecorators: { min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], range: [{ type: i0.Input, args: [{ isSignal: true, alias: "range", required: false }] }], minStepsBetweenHandles: [{ type: i0.Input, args: [{ isSignal: true, alias: "minStepsBetweenHandles", required: false }] }], marks: [{ type: i0.Input, args: [{ isSignal: true, alias: "marks", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], ariaLabelStart: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelStart", required: false }] }], ariaLabelEnd: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelEnd", required: false }] }], sliderChange: [{ type: i0.Output, args: ["sliderChange"] }], slideEnd: [{ type: i0.Output, args: ["slideEnd"] }], sliderFocus: [{ type: i0.Output, args: ["sliderFocus"] }], sliderBlur: [{ type: i0.Output, args: ["sliderBlur"] }], root: [{ type: i0.ViewChild, args: ['root', { isSignal: true }] }], handleEls: [{ type: i0.ViewChildren, args: ['handle', { isSignal: true }] }] } });
|
|
330
|
+
|
|
331
|
+
/*
|
|
332
|
+
* Public API Surface of ui-kit/ui-slider
|
|
333
|
+
*/
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Generated bundle index. Do not edit.
|
|
337
|
+
*/
|
|
338
|
+
|
|
339
|
+
export { UiSlider };
|
|
340
|
+
//# sourceMappingURL=4sh-ui-kit-ui-slider.mjs.map
|