@raintonic/formaui 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/raintonic-formaui-components-alert.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-avatar.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-avatar.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-card.mjs +78 -8
- package/fesm2022/raintonic-formaui-components-card.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-chip.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-chip.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-data-table.mjs +80 -11
- package/fesm2022/raintonic-formaui-components-data-table.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-drawer.mjs +37 -6
- package/fesm2022/raintonic-formaui-components-drawer.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-dual-tier-navigation.mjs +1 -1
- package/fesm2022/raintonic-formaui-components-dual-tier-navigation.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-form-field.mjs +21 -2
- package/fesm2022/raintonic-formaui-components-form-field.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-input.mjs +14 -0
- package/fesm2022/raintonic-formaui-components-input.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-select.mjs +13 -5
- package/fesm2022/raintonic-formaui-components-select.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-side-panel.mjs +40 -6
- package/fesm2022/raintonic-formaui-components-side-panel.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-toggle-group.mjs +16 -5
- package/fesm2022/raintonic-formaui-components-toggle-group.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-toolbar.mjs +10 -4
- package/fesm2022/raintonic-formaui-components-toolbar.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-tooltip.mjs +102 -8
- package/fesm2022/raintonic-formaui-components-tooltip.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-services-dialog.mjs +8 -4
- package/fesm2022/raintonic-formaui-services-dialog.mjs.map +1 -1
- package/fesm2022/raintonic-formaui.mjs +1 -1
- package/fesm2022/raintonic-formaui.mjs.map +1 -1
- package/llms-full.txt +64 -19
- package/package.json +1 -1
- package/styles/generated/_tokens.scss +1 -1
- package/styles/partials/components/_dialog.scss +24 -0
- package/styles/styles.css +16 -1
- package/types/raintonic-formaui-components-card.d.ts +46 -2
- package/types/raintonic-formaui-components-card.d.ts.map +1 -1
- package/types/raintonic-formaui-components-data-table.d.ts +50 -3
- package/types/raintonic-formaui-components-data-table.d.ts.map +1 -1
- package/types/raintonic-formaui-components-drawer.d.ts +20 -2
- package/types/raintonic-formaui-components-drawer.d.ts.map +1 -1
- package/types/raintonic-formaui-components-form-field.d.ts +10 -0
- package/types/raintonic-formaui-components-form-field.d.ts.map +1 -1
- package/types/raintonic-formaui-components-input.d.ts +9 -0
- package/types/raintonic-formaui-components-input.d.ts.map +1 -1
- package/types/raintonic-formaui-components-select.d.ts +8 -1
- package/types/raintonic-formaui-components-select.d.ts.map +1 -1
- package/types/raintonic-formaui-components-side-panel.d.ts +24 -2
- package/types/raintonic-formaui-components-side-panel.d.ts.map +1 -1
- package/types/raintonic-formaui-components-toggle-group.d.ts +1 -1
- package/types/raintonic-formaui-components-toggle-group.d.ts.map +1 -1
- package/types/raintonic-formaui-components-toolbar.d.ts +5 -1
- package/types/raintonic-formaui-components-toolbar.d.ts.map +1 -1
- package/types/raintonic-formaui-components-tooltip.d.ts +55 -4
- package/types/raintonic-formaui-components-tooltip.d.ts.map +1 -1
- package/types/raintonic-formaui-services-dialog.d.ts +12 -1
- package/types/raintonic-formaui-services-dialog.d.ts.map +1 -1
- package/types/raintonic-formaui.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject, ChangeDetectorRef, input, output, effect, HostListener, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { Injectable, Directive, inject, ChangeDetectorRef, input, output, contentChild, computed, effect, HostListener, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { DOCUMENT } from '@angular/common';
|
|
5
5
|
import { FuiIconComponent } from '@raintonic/formaui/components/icon';
|
|
@@ -15,11 +15,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
15
15
|
args: [{ providedIn: 'root' }]
|
|
16
16
|
}] });
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Marker directive for projecting custom markup into the side-panel header
|
|
20
|
+
* title area. Apply the `fuiSidePanelTitle` attribute to the element you want
|
|
21
|
+
* rendered as the title. When present, it visually replaces the string
|
|
22
|
+
* `title`, which still provides the panel's accessible name.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* <fui-side-panel title="Details">
|
|
26
|
+
* <span fuiSidePanelTitle>Custom <em>title</em> markup</span>
|
|
27
|
+
* </fui-side-panel>
|
|
28
|
+
*/
|
|
29
|
+
class FuiSidePanelTitle {
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiSidePanelTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
31
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.6", type: FuiSidePanelTitle, isStandalone: true, selector: "[fuiSidePanelTitle]", host: { classAttribute: "fui-side-panel__title-slot" }, ngImport: i0 });
|
|
32
|
+
}
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiSidePanelTitle, decorators: [{
|
|
34
|
+
type: Directive,
|
|
35
|
+
args: [{
|
|
36
|
+
selector: '[fuiSidePanelTitle]',
|
|
37
|
+
standalone: true,
|
|
38
|
+
host: {
|
|
39
|
+
class: 'fui-side-panel__title-slot',
|
|
40
|
+
},
|
|
41
|
+
}]
|
|
42
|
+
}] });
|
|
43
|
+
|
|
18
44
|
/**
|
|
19
45
|
* @component FuiSidePanelComponent
|
|
20
46
|
* @selector fui-side-panel
|
|
21
47
|
* @description A slide-in side panel overlay with optional backdrop, focus trapping, and keyboard dismiss.
|
|
22
48
|
* Renders from the right edge of the viewport with configurable width and top offset.
|
|
49
|
+
* A projected `fuiSidePanelTitle` element visually replaces the string `title` in the header;
|
|
50
|
+
* the `title` input still provides the accessible name via `aria-label`.
|
|
23
51
|
*
|
|
24
52
|
* @input open - Whether the side panel is visible. Default false.
|
|
25
53
|
* @input title - Title text displayed in the panel header.
|
|
@@ -34,6 +62,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
34
62
|
*
|
|
35
63
|
* @example
|
|
36
64
|
* <fui-side-panel [open]="isPanelOpen" title="Details" (closed)="isPanelOpen = false">
|
|
65
|
+
* <span fuiSidePanelTitle>Custom <em>title</em> markup</span>
|
|
37
66
|
* <p>Panel content here.</p>
|
|
38
67
|
* </fui-side-panel>
|
|
39
68
|
*/
|
|
@@ -51,6 +80,9 @@ class FuiSidePanelComponent {
|
|
|
51
80
|
/** ID of an element that labels the side panel */
|
|
52
81
|
ariaLabelledBy = input(null, ...(ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
53
82
|
closed = output();
|
|
83
|
+
// Projected title detection — true when a [fuiSidePanelTitle] element is provided.
|
|
84
|
+
_projectedTitle = contentChild(FuiSidePanelTitle, ...(ngDevMode ? [{ debugName: "_projectedTitle" }] : /* istanbul ignore next */ []));
|
|
85
|
+
_hasProjectedTitle = computed(() => !!this._projectedTitle(), ...(ngDevMode ? [{ debugName: "_hasProjectedTitle" }] : /* istanbul ignore next */ []));
|
|
54
86
|
_panelElement;
|
|
55
87
|
_previouslyFocusedElement = null;
|
|
56
88
|
constructor() {
|
|
@@ -64,7 +96,9 @@ class FuiSidePanelComponent {
|
|
|
64
96
|
this._restoreFocus();
|
|
65
97
|
}
|
|
66
98
|
});
|
|
67
|
-
this.intl.changes.pipe(takeUntilDestroyed()).subscribe(() => {
|
|
99
|
+
this.intl.changes.pipe(takeUntilDestroyed()).subscribe(() => {
|
|
100
|
+
this._cdr.markForCheck();
|
|
101
|
+
});
|
|
68
102
|
}
|
|
69
103
|
onKeydown(event) {
|
|
70
104
|
if (!this.open())
|
|
@@ -139,7 +173,7 @@ class FuiSidePanelComponent {
|
|
|
139
173
|
return Array.from(panel.querySelectorAll(selectors)).filter((el) => el.offsetParent !== null);
|
|
140
174
|
}
|
|
141
175
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiSidePanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
142
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: FuiSidePanelComponent, isStandalone: true, selector: "fui-side-panel", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, topOffset: { classPropertyName: "topOffset", publicName: "topOffset", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "class.fui-side-panel--open": "open()", "class.fui-side-panel--no-backdrop": "!hasBackdrop()", "style.--_side-panel-top-offset": "topOffset()" }, classAttribute: "fui-side-panel" }, viewQueries: [{ propertyName: "_panelElement", first: true, predicate: ["panelElement"], descendants: true }], ngImport: i0, template: "@if (open() && hasBackdrop()) {\r\n <div class=\"fui-side-panel__backdrop\" (click)=\"close()\" aria-hidden=\"true\"></div>\r\n}\r\n<div\r\n #panelElement\r\n class=\"fui-side-panel__panel\"\r\n [style.width]=\"width()\"\r\n role=\"dialog\"\r\n [attr.aria-modal]=\"open() ? 'true' : null\"\r\n [attr.aria-label]=\"ariaLabel() || (!ariaLabelledBy() ? title() : null)\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\r\n tabindex=\"-1\"\r\n>\r\n <div class=\"fui-side-panel__header\">\r\n <span class=\"fui-side-panel__title\">{{ title() }}</span>\r\n <button type=\"button\" class=\"fui-side-panel__close\" (click)=\"close()\" [attr.aria-label]=\"intl.closeAriaLabel\">\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n </div>\r\n <div class=\"fui-side-panel__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"fui-side-panel__footer\">\r\n <ng-content select=\"[sidePanelFooter]\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-out);transition-delay:0ms}.fui-motion-fade-out{transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-in);transition-delay:0ms}.fui-motion-slide-in-bottom{transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition-property:transform,opacity;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-base) var(--fui-ease-out)}@keyframes fui-popover-enter{0%{opacity:0;transform:translateY(-14px)}60%{opacity:1}to{opacity:1;transform:translateY(0)}}.fui-side-panel{--fui-side-panel-z-index: 10;--fui-side-panel-bg: var(--fui-bg-default);--fui-side-panel-border-color: var(--fui-border-default);--fui-side-panel-shadow: -4px 0 16px rgba(0, 0, 0, .1);--fui-side-panel-backdrop-color: rgba(0, 0, 0, .2);--fui-side-panel-header-padding: var(--fui-spacing-6) var(--fui-spacing-7);--fui-side-panel-content-padding: var(--fui-spacing-4);--fui-side-panel-footer-padding: var(--fui-spacing-6) var(--fui-spacing-7);position:fixed;top:var(--_side-panel-top-offset, 0);right:0;bottom:0;left:0;pointer-events:none;z-index:var(--fui-side-panel-z-index);overflow:hidden}.fui-side-panel--open{pointer-events:auto}.fui-side-panel--no-backdrop.fui-side-panel--open{pointer-events:none}.fui-side-panel__backdrop{position:fixed;top:var(--_side-panel-top-offset, 0);right:0;bottom:0;left:0;background-color:var(--fui-side-panel-backdrop-color);z-index:1;transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-in-out);transition-delay:0ms}.fui-side-panel__panel{position:fixed;top:var(--_side-panel-top-offset, 0);right:0;bottom:0;display:flex;flex-direction:column;background-color:var(--fui-side-panel-bg);border-left:var(--fui-border-width-sm) solid var(--fui-side-panel-border-color);box-shadow:var(--fui-side-panel-shadow);z-index:2;transform:translate(100%);transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms}.fui-side-panel--open .fui-side-panel__panel{transform:translate(0)}.fui-side-panel__panel{pointer-events:auto}.fui-side-panel__header{display:flex;align-items:center;justify-content:space-between;padding:var(--fui-side-panel-header-padding);border-bottom:var(--fui-border-width-sm) solid var(--fui-side-panel-border-color);flex-shrink:0}.fui-side-panel__title{font-size:var(--fui-text-md);font-weight:var(--fui-weight-semibold);color:var(--fui-text-primary)}.fui-side-panel__close{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;background:transparent;border-radius:var(--fui-radius-sm);color:var(--fui-text-secondary);cursor:pointer;transition:background-color var(--fui-duration-base) var(--fui-ease-in-out),color var(--fui-duration-base) var(--fui-ease-in-out)}.fui-side-panel__close:hover{background-color:var(--fui-bg-subtle);color:var(--fui-text-primary)}.fui-side-panel__content{flex:1;overflow-y:auto;background-color:var(--fui-bg-subtle);padding:var(--fui-side-panel-content-padding)}.fui-side-panel__footer{display:flex;align-items:center;justify-content:flex-end;gap:var(--fui-spacing-4);padding:var(--fui-side-panel-footer-padding);border-top:var(--fui-border-width-sm) solid var(--fui-side-panel-border-color);flex-shrink:0}.fui-side-panel__footer:empty{display:none}@media(prefers-reduced-motion:reduce){.fui-side-panel__backdrop,.fui-side-panel__panel,.fui-side-panel__close{transition:none}}\n"], dependencies: [{ kind: "component", type: FuiIconComponent, selector: "fui-icon", inputs: ["name", "size", "weight", "color", "ariaLabel", "spin", "pulse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
176
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: FuiSidePanelComponent, isStandalone: true, selector: "fui-side-panel", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, topOffset: { classPropertyName: "topOffset", publicName: "topOffset", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "class.fui-side-panel--open": "open()", "class.fui-side-panel--no-backdrop": "!hasBackdrop()", "style.--_side-panel-top-offset": "topOffset()" }, classAttribute: "fui-side-panel" }, queries: [{ propertyName: "_projectedTitle", first: true, predicate: FuiSidePanelTitle, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_panelElement", first: true, predicate: ["panelElement"], descendants: true }], ngImport: i0, template: "@if (open() && hasBackdrop()) {\r\n <div class=\"fui-side-panel__backdrop\" (click)=\"close()\" aria-hidden=\"true\"></div>\r\n}\r\n<div\r\n #panelElement\r\n class=\"fui-side-panel__panel\"\r\n [style.width]=\"width()\"\r\n role=\"dialog\"\r\n [attr.aria-modal]=\"open() ? 'true' : null\"\r\n [attr.aria-label]=\"ariaLabel() || (!ariaLabelledBy() ? title() : null)\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\r\n tabindex=\"-1\"\r\n>\r\n <div class=\"fui-side-panel__header\">\r\n @if (_hasProjectedTitle()) {\r\n <span class=\"fui-side-panel__title\"><ng-content select=\"[fuiSidePanelTitle]\"></ng-content></span>\r\n } @else {\r\n <span class=\"fui-side-panel__title\">{{ title() }}</span>\r\n }\r\n <button type=\"button\" class=\"fui-side-panel__close\" (click)=\"close()\" [attr.aria-label]=\"intl.closeAriaLabel\">\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n </div>\r\n <div class=\"fui-side-panel__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"fui-side-panel__footer\">\r\n <ng-content select=\"[sidePanelFooter]\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-out);transition-delay:0ms}.fui-motion-fade-out{transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-in);transition-delay:0ms}.fui-motion-slide-in-bottom{transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition-property:transform,opacity;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-base) var(--fui-ease-out)}@keyframes fui-popover-enter{0%{opacity:0;transform:translateY(-14px)}60%{opacity:1}to{opacity:1;transform:translateY(0)}}.fui-side-panel{--fui-side-panel-z-index: 10;--fui-side-panel-bg: var(--fui-bg-default);--fui-side-panel-border-color: var(--fui-border-default);--fui-side-panel-shadow: -4px 0 16px rgba(0, 0, 0, .1);--fui-side-panel-backdrop-color: rgba(0, 0, 0, .2);--fui-side-panel-header-padding: var(--fui-spacing-6) var(--fui-spacing-7);--fui-side-panel-content-padding: var(--fui-spacing-4);--fui-side-panel-footer-padding: var(--fui-spacing-6) var(--fui-spacing-7);position:fixed;top:var(--_side-panel-top-offset, 0);right:0;bottom:0;left:0;pointer-events:none;z-index:var(--fui-side-panel-z-index);overflow:hidden}.fui-side-panel--open{pointer-events:auto}.fui-side-panel--no-backdrop.fui-side-panel--open{pointer-events:none}.fui-side-panel__backdrop{position:fixed;top:var(--_side-panel-top-offset, 0);right:0;bottom:0;left:0;background-color:var(--fui-side-panel-backdrop-color);z-index:1;transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-in-out);transition-delay:0ms}.fui-side-panel__panel{position:fixed;top:var(--_side-panel-top-offset, 0);right:0;bottom:0;display:flex;flex-direction:column;background-color:var(--fui-side-panel-bg);border-left:var(--fui-border-width-sm) solid var(--fui-side-panel-border-color);box-shadow:var(--fui-side-panel-shadow);z-index:2;transform:translate(100%);transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms}.fui-side-panel--open .fui-side-panel__panel{transform:translate(0)}.fui-side-panel__panel{pointer-events:auto}.fui-side-panel__header{display:flex;align-items:center;justify-content:space-between;padding:var(--fui-side-panel-header-padding);border-bottom:var(--fui-border-width-sm) solid var(--fui-side-panel-border-color);flex-shrink:0}.fui-side-panel__title{font-size:var(--fui-text-md);font-weight:var(--fui-weight-semibold);color:var(--fui-text-primary)}.fui-side-panel__close{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;background:transparent;border-radius:var(--fui-radius-sm);color:var(--fui-text-secondary);cursor:pointer;transition:background-color var(--fui-duration-base) var(--fui-ease-in-out),color var(--fui-duration-base) var(--fui-ease-in-out)}.fui-side-panel__close:hover{background-color:var(--fui-bg-subtle);color:var(--fui-text-primary)}.fui-side-panel__content{flex:1;overflow-y:auto;background-color:var(--fui-bg-subtle);padding:var(--fui-side-panel-content-padding)}.fui-side-panel__footer{display:flex;align-items:center;justify-content:flex-end;gap:var(--fui-spacing-4);padding:var(--fui-side-panel-footer-padding);border-top:var(--fui-border-width-sm) solid var(--fui-side-panel-border-color);flex-shrink:0}.fui-side-panel__footer:empty{display:none}@media(prefers-reduced-motion:reduce){.fui-side-panel__backdrop,.fui-side-panel__panel,.fui-side-panel__close{transition:none}}\n"], dependencies: [{ kind: "component", type: FuiIconComponent, selector: "fui-icon", inputs: ["name", "size", "weight", "color", "ariaLabel", "spin", "pulse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
143
177
|
}
|
|
144
178
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiSidePanelComponent, decorators: [{
|
|
145
179
|
type: Component,
|
|
@@ -148,8 +182,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
148
182
|
'[class.fui-side-panel--open]': 'open()',
|
|
149
183
|
'[class.fui-side-panel--no-backdrop]': '!hasBackdrop()',
|
|
150
184
|
'[style.--_side-panel-top-offset]': 'topOffset()',
|
|
151
|
-
}, template: "@if (open() && hasBackdrop()) {\r\n <div class=\"fui-side-panel__backdrop\" (click)=\"close()\" aria-hidden=\"true\"></div>\r\n}\r\n<div\r\n #panelElement\r\n class=\"fui-side-panel__panel\"\r\n [style.width]=\"width()\"\r\n role=\"dialog\"\r\n [attr.aria-modal]=\"open() ? 'true' : null\"\r\n [attr.aria-label]=\"ariaLabel() || (!ariaLabelledBy() ? title() : null)\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\r\n tabindex=\"-1\"\r\n>\r\n <div class=\"fui-side-panel__header\">\r\n <span class=\"fui-side-panel__title\">{{ title() }}</span>\r\n <button type=\"button\" class=\"fui-side-panel__close\" (click)=\"close()\" [attr.aria-label]=\"intl.closeAriaLabel\">\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n </div>\r\n <div class=\"fui-side-panel__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"fui-side-panel__footer\">\r\n <ng-content select=\"[sidePanelFooter]\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-out);transition-delay:0ms}.fui-motion-fade-out{transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-in);transition-delay:0ms}.fui-motion-slide-in-bottom{transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition-property:transform,opacity;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-base) var(--fui-ease-out)}@keyframes fui-popover-enter{0%{opacity:0;transform:translateY(-14px)}60%{opacity:1}to{opacity:1;transform:translateY(0)}}.fui-side-panel{--fui-side-panel-z-index: 10;--fui-side-panel-bg: var(--fui-bg-default);--fui-side-panel-border-color: var(--fui-border-default);--fui-side-panel-shadow: -4px 0 16px rgba(0, 0, 0, .1);--fui-side-panel-backdrop-color: rgba(0, 0, 0, .2);--fui-side-panel-header-padding: var(--fui-spacing-6) var(--fui-spacing-7);--fui-side-panel-content-padding: var(--fui-spacing-4);--fui-side-panel-footer-padding: var(--fui-spacing-6) var(--fui-spacing-7);position:fixed;top:var(--_side-panel-top-offset, 0);right:0;bottom:0;left:0;pointer-events:none;z-index:var(--fui-side-panel-z-index);overflow:hidden}.fui-side-panel--open{pointer-events:auto}.fui-side-panel--no-backdrop.fui-side-panel--open{pointer-events:none}.fui-side-panel__backdrop{position:fixed;top:var(--_side-panel-top-offset, 0);right:0;bottom:0;left:0;background-color:var(--fui-side-panel-backdrop-color);z-index:1;transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-in-out);transition-delay:0ms}.fui-side-panel__panel{position:fixed;top:var(--_side-panel-top-offset, 0);right:0;bottom:0;display:flex;flex-direction:column;background-color:var(--fui-side-panel-bg);border-left:var(--fui-border-width-sm) solid var(--fui-side-panel-border-color);box-shadow:var(--fui-side-panel-shadow);z-index:2;transform:translate(100%);transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms}.fui-side-panel--open .fui-side-panel__panel{transform:translate(0)}.fui-side-panel__panel{pointer-events:auto}.fui-side-panel__header{display:flex;align-items:center;justify-content:space-between;padding:var(--fui-side-panel-header-padding);border-bottom:var(--fui-border-width-sm) solid var(--fui-side-panel-border-color);flex-shrink:0}.fui-side-panel__title{font-size:var(--fui-text-md);font-weight:var(--fui-weight-semibold);color:var(--fui-text-primary)}.fui-side-panel__close{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;background:transparent;border-radius:var(--fui-radius-sm);color:var(--fui-text-secondary);cursor:pointer;transition:background-color var(--fui-duration-base) var(--fui-ease-in-out),color var(--fui-duration-base) var(--fui-ease-in-out)}.fui-side-panel__close:hover{background-color:var(--fui-bg-subtle);color:var(--fui-text-primary)}.fui-side-panel__content{flex:1;overflow-y:auto;background-color:var(--fui-bg-subtle);padding:var(--fui-side-panel-content-padding)}.fui-side-panel__footer{display:flex;align-items:center;justify-content:flex-end;gap:var(--fui-spacing-4);padding:var(--fui-side-panel-footer-padding);border-top:var(--fui-border-width-sm) solid var(--fui-side-panel-border-color);flex-shrink:0}.fui-side-panel__footer:empty{display:none}@media(prefers-reduced-motion:reduce){.fui-side-panel__backdrop,.fui-side-panel__panel,.fui-side-panel__close{transition:none}}\n"] }]
|
|
152
|
-
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], hasBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasBackdrop", required: false }] }], topOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "topOffset", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], _panelElement: [{
|
|
185
|
+
}, template: "@if (open() && hasBackdrop()) {\r\n <div class=\"fui-side-panel__backdrop\" (click)=\"close()\" aria-hidden=\"true\"></div>\r\n}\r\n<div\r\n #panelElement\r\n class=\"fui-side-panel__panel\"\r\n [style.width]=\"width()\"\r\n role=\"dialog\"\r\n [attr.aria-modal]=\"open() ? 'true' : null\"\r\n [attr.aria-label]=\"ariaLabel() || (!ariaLabelledBy() ? title() : null)\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\r\n tabindex=\"-1\"\r\n>\r\n <div class=\"fui-side-panel__header\">\r\n @if (_hasProjectedTitle()) {\r\n <span class=\"fui-side-panel__title\"><ng-content select=\"[fuiSidePanelTitle]\"></ng-content></span>\r\n } @else {\r\n <span class=\"fui-side-panel__title\">{{ title() }}</span>\r\n }\r\n <button type=\"button\" class=\"fui-side-panel__close\" (click)=\"close()\" [attr.aria-label]=\"intl.closeAriaLabel\">\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n </div>\r\n <div class=\"fui-side-panel__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"fui-side-panel__footer\">\r\n <ng-content select=\"[sidePanelFooter]\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-out);transition-delay:0ms}.fui-motion-fade-out{transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-in);transition-delay:0ms}.fui-motion-slide-in-bottom{transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition-property:transform,opacity;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-base) var(--fui-ease-out)}@keyframes fui-popover-enter{0%{opacity:0;transform:translateY(-14px)}60%{opacity:1}to{opacity:1;transform:translateY(0)}}.fui-side-panel{--fui-side-panel-z-index: 10;--fui-side-panel-bg: var(--fui-bg-default);--fui-side-panel-border-color: var(--fui-border-default);--fui-side-panel-shadow: -4px 0 16px rgba(0, 0, 0, .1);--fui-side-panel-backdrop-color: rgba(0, 0, 0, .2);--fui-side-panel-header-padding: var(--fui-spacing-6) var(--fui-spacing-7);--fui-side-panel-content-padding: var(--fui-spacing-4);--fui-side-panel-footer-padding: var(--fui-spacing-6) var(--fui-spacing-7);position:fixed;top:var(--_side-panel-top-offset, 0);right:0;bottom:0;left:0;pointer-events:none;z-index:var(--fui-side-panel-z-index);overflow:hidden}.fui-side-panel--open{pointer-events:auto}.fui-side-panel--no-backdrop.fui-side-panel--open{pointer-events:none}.fui-side-panel__backdrop{position:fixed;top:var(--_side-panel-top-offset, 0);right:0;bottom:0;left:0;background-color:var(--fui-side-panel-backdrop-color);z-index:1;transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-in-out);transition-delay:0ms}.fui-side-panel__panel{position:fixed;top:var(--_side-panel-top-offset, 0);right:0;bottom:0;display:flex;flex-direction:column;background-color:var(--fui-side-panel-bg);border-left:var(--fui-border-width-sm) solid var(--fui-side-panel-border-color);box-shadow:var(--fui-side-panel-shadow);z-index:2;transform:translate(100%);transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms}.fui-side-panel--open .fui-side-panel__panel{transform:translate(0)}.fui-side-panel__panel{pointer-events:auto}.fui-side-panel__header{display:flex;align-items:center;justify-content:space-between;padding:var(--fui-side-panel-header-padding);border-bottom:var(--fui-border-width-sm) solid var(--fui-side-panel-border-color);flex-shrink:0}.fui-side-panel__title{font-size:var(--fui-text-md);font-weight:var(--fui-weight-semibold);color:var(--fui-text-primary)}.fui-side-panel__close{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;background:transparent;border-radius:var(--fui-radius-sm);color:var(--fui-text-secondary);cursor:pointer;transition:background-color var(--fui-duration-base) var(--fui-ease-in-out),color var(--fui-duration-base) var(--fui-ease-in-out)}.fui-side-panel__close:hover{background-color:var(--fui-bg-subtle);color:var(--fui-text-primary)}.fui-side-panel__content{flex:1;overflow-y:auto;background-color:var(--fui-bg-subtle);padding:var(--fui-side-panel-content-padding)}.fui-side-panel__footer{display:flex;align-items:center;justify-content:flex-end;gap:var(--fui-spacing-4);padding:var(--fui-side-panel-footer-padding);border-top:var(--fui-border-width-sm) solid var(--fui-side-panel-border-color);flex-shrink:0}.fui-side-panel__footer:empty{display:none}@media(prefers-reduced-motion:reduce){.fui-side-panel__backdrop,.fui-side-panel__panel,.fui-side-panel__close{transition:none}}\n"] }]
|
|
186
|
+
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], hasBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasBackdrop", required: false }] }], topOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "topOffset", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], _projectedTitle: [{ type: i0.ContentChild, args: [i0.forwardRef(() => FuiSidePanelTitle), { isSignal: true }] }], _panelElement: [{
|
|
153
187
|
type: ViewChild,
|
|
154
188
|
args: ['panelElement', { static: false }]
|
|
155
189
|
}], onKeydown: [{
|
|
@@ -161,5 +195,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
161
195
|
* Generated bundle index. Do not edit.
|
|
162
196
|
*/
|
|
163
197
|
|
|
164
|
-
export { FuiSidePanelComponent, FuiSidePanelIntl };
|
|
198
|
+
export { FuiSidePanelComponent, FuiSidePanelIntl, FuiSidePanelTitle };
|
|
165
199
|
//# sourceMappingURL=raintonic-formaui-components-side-panel.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"raintonic-formaui-components-side-panel.mjs","sources":["../../../lib/components/side-panel/side-panel.intl.ts","../../../lib/components/side-panel/side-panel.component.ts","../../../lib/components/side-panel/side-panel.component.html","../../../lib/components/side-panel/raintonic-formaui-components-side-panel.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { FuiIntlBase } from '@raintonic/formaui/core';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class FuiSidePanelIntl extends FuiIntlBase {\r\n closeAriaLabel = 'Close panel';\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n effect,\r\n ElementRef,\r\n HostListener,\r\n inject,\r\n input,\r\n output,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { FuiIconComponent } from '@raintonic/formaui/components/icon';\r\nimport { FuiSidePanelIntl } from './side-panel.intl';\r\n\r\n/**\r\n * @component FuiSidePanelComponent\r\n * @selector fui-side-panel\r\n * @description A slide-in side panel overlay with optional backdrop, focus trapping, and keyboard dismiss.\r\n * Renders from the right edge of the viewport with configurable width and top offset.\r\n *\r\n * @input open - Whether the side panel is visible. Default false.\r\n * @input title - Title text displayed in the panel header.\r\n * @input width - CSS width of the panel. Default '500px'.\r\n * @input hasBackdrop - Whether to show a backdrop behind the panel. Default true.\r\n * @input topOffset - CSS top offset (e.g. to clear a fixed toolbar). Default '0px'.\r\n * @input ariaLabel - ARIA label for the panel when no visible title is present.\r\n * @input ariaLabelledBy - ID of an element that labels the panel.\r\n * @output closed - Emits when the panel requests closing (close button, Escape, or backdrop click).\r\n *\r\n * @cssvar --_side-panel-top-offset - Internal CSS variable set from the topOffset input.\r\n *\r\n * @example\r\n * <fui-side-panel [open]=\"isPanelOpen\" title=\"Details\" (closed)=\"isPanelOpen = false\">\r\n * <p>Panel content here.</p>\r\n * </fui-side-panel>\r\n */\r\n@Component({\r\n selector: 'fui-side-panel',\r\n standalone: true,\r\n imports: [FuiIconComponent],\r\n templateUrl: './side-panel.component.html',\r\n styleUrl: './side-panel.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: {\r\n class: 'fui-side-panel',\r\n '[class.fui-side-panel--open]': 'open()',\r\n '[class.fui-side-panel--no-backdrop]': '!hasBackdrop()',\r\n '[style.--_side-panel-top-offset]': 'topOffset()',\r\n },\r\n})\r\nexport class FuiSidePanelComponent {\r\n private readonly _document = inject(DOCUMENT);\r\n readonly intl = inject(FuiSidePanelIntl);\r\n private readonly _cdr = inject(ChangeDetectorRef);\r\n\r\n readonly open = input(false);\r\n readonly title = input('');\r\n readonly width = input('500px');\r\n readonly hasBackdrop = input(true);\r\n readonly topOffset = input('0px');\r\n\r\n /** ARIA label for the side panel, used when no visible title is present */\r\n readonly ariaLabel = input<string | null>(null);\r\n\r\n /** ID of an element that labels the side panel */\r\n readonly ariaLabelledBy = input<string | null>(null);\r\n\r\n readonly closed = output();\r\n\r\n @ViewChild('panelElement', { static: false })\r\n private _panelElement?: ElementRef<HTMLElement>;\r\n\r\n private _previouslyFocusedElement: HTMLElement | null = null;\r\n\r\n constructor() {\r\n // Watch open state changes for focus management\r\n effect(() => {\r\n const isOpen = this.open();\r\n if (isOpen) {\r\n this._saveFocusAndTrap();\r\n } else {\r\n this._restoreFocus();\r\n }\r\n });\r\n\r\n this.intl.changes.pipe(takeUntilDestroyed()).subscribe(() => { this._cdr.markForCheck(); });\r\n }\r\n\r\n @HostListener('keydown', ['$event'])\r\n onKeydown(event: KeyboardEvent): void {\r\n if (!this.open()) return;\r\n\r\n if (event.key === 'Escape') {\r\n event.preventDefault();\r\n this.close();\r\n return;\r\n }\r\n\r\n // Focus trap cycling\r\n if (event.key === 'Tab') {\r\n const focusableElements = this._getFocusableElements();\r\n if (focusableElements.length === 0) {\r\n event.preventDefault();\r\n return;\r\n }\r\n\r\n const firstFocusable = focusableElements[0];\r\n const lastFocusable = focusableElements[focusableElements.length - 1];\r\n const activeElement = this._document.activeElement;\r\n\r\n if (event.shiftKey) {\r\n if (activeElement === firstFocusable) {\r\n event.preventDefault();\r\n lastFocusable.focus();\r\n }\r\n } else {\r\n if (activeElement === lastFocusable) {\r\n event.preventDefault();\r\n firstFocusable.focus();\r\n }\r\n }\r\n }\r\n }\r\n\r\n close(): void {\r\n this.closed.emit();\r\n }\r\n\r\n private _saveFocusAndTrap(): void {\r\n this._previouslyFocusedElement = this._document.activeElement as HTMLElement;\r\n // Focus the panel after it renders\r\n setTimeout(() => {\r\n this._focusFirstTabbable();\r\n });\r\n }\r\n\r\n private _restoreFocus(): void {\r\n if (this._previouslyFocusedElement) {\r\n this._previouslyFocusedElement.focus();\r\n this._previouslyFocusedElement = null;\r\n }\r\n }\r\n\r\n private _focusFirstTabbable(): void {\r\n const focusableElements = this._getFocusableElements();\r\n if (focusableElements.length > 0) {\r\n focusableElements[0].focus();\r\n } else {\r\n this._panelElement?.nativeElement.focus();\r\n }\r\n }\r\n\r\n private _getFocusableElements(): HTMLElement[] {\r\n const panel = this._panelElement?.nativeElement;\r\n if (!panel) return [];\r\n\r\n const selectors = [\r\n 'a[href]',\r\n 'button:not([disabled])',\r\n 'textarea:not([disabled])',\r\n 'input:not([disabled])',\r\n 'select:not([disabled])',\r\n '[tabindex]:not([tabindex=\"-1\"])',\r\n '[contenteditable=\"true\"]',\r\n ].join(',');\r\n\r\n return Array.from(panel.querySelectorAll<HTMLElement>(selectors)).filter((el) => el.offsetParent !== null);\r\n }\r\n}\r\n","@if (open() && hasBackdrop()) {\r\n <div class=\"fui-side-panel__backdrop\" (click)=\"close()\" aria-hidden=\"true\"></div>\r\n}\r\n<div\r\n #panelElement\r\n class=\"fui-side-panel__panel\"\r\n [style.width]=\"width()\"\r\n role=\"dialog\"\r\n [attr.aria-modal]=\"open() ? 'true' : null\"\r\n [attr.aria-label]=\"ariaLabel() || (!ariaLabelledBy() ? title() : null)\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\r\n tabindex=\"-1\"\r\n>\r\n <div class=\"fui-side-panel__header\">\r\n <span class=\"fui-side-panel__title\">{{ title() }}</span>\r\n <button type=\"button\" class=\"fui-side-panel__close\" (click)=\"close()\" [attr.aria-label]=\"intl.closeAriaLabel\">\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n </div>\r\n <div class=\"fui-side-panel__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"fui-side-panel__footer\">\r\n <ng-content select=\"[sidePanelFooter]\"></ng-content>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A,w2JAAA,CAAA,EAAA;;sBAqBA,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,cAAc,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;;sBAmB3C,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;;AE7FrC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"raintonic-formaui-components-side-panel.mjs","sources":["../../../lib/components/side-panel/side-panel.intl.ts","../../../lib/components/side-panel/side-panel-title.directive.ts","../../../lib/components/side-panel/side-panel.component.ts","../../../lib/components/side-panel/side-panel.component.html","../../../lib/components/side-panel/raintonic-formaui-components-side-panel.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { FuiIntlBase } from '@raintonic/formaui/core';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class FuiSidePanelIntl extends FuiIntlBase {\r\n closeAriaLabel = 'Close panel';\r\n}\r\n","import { Directive } from '@angular/core';\r\n\r\n/**\r\n * Marker directive for projecting custom markup into the side-panel header\r\n * title area. Apply the `fuiSidePanelTitle` attribute to the element you want\r\n * rendered as the title. When present, it visually replaces the string\r\n * `title`, which still provides the panel's accessible name.\r\n *\r\n * @example\r\n * <fui-side-panel title=\"Details\">\r\n * <span fuiSidePanelTitle>Custom <em>title</em> markup</span>\r\n * </fui-side-panel>\r\n */\r\n@Directive({\r\n selector: '[fuiSidePanelTitle]',\r\n standalone: true,\r\n host: {\r\n class: 'fui-side-panel__title-slot',\r\n },\r\n})\r\nexport class FuiSidePanelTitle {}\r\n","import {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n computed,\r\n contentChild,\r\n effect,\r\n ElementRef,\r\n HostListener,\r\n inject,\r\n input,\r\n output,\r\n Signal,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { FuiIconComponent } from '@raintonic/formaui/components/icon';\r\nimport { FuiSidePanelIntl } from './side-panel.intl';\r\nimport { FuiSidePanelTitle } from './side-panel-title.directive';\r\n\r\n/**\r\n * @component FuiSidePanelComponent\r\n * @selector fui-side-panel\r\n * @description A slide-in side panel overlay with optional backdrop, focus trapping, and keyboard dismiss.\r\n * Renders from the right edge of the viewport with configurable width and top offset.\r\n * A projected `fuiSidePanelTitle` element visually replaces the string `title` in the header;\r\n * the `title` input still provides the accessible name via `aria-label`.\r\n *\r\n * @input open - Whether the side panel is visible. Default false.\r\n * @input title - Title text displayed in the panel header.\r\n * @input width - CSS width of the panel. Default '500px'.\r\n * @input hasBackdrop - Whether to show a backdrop behind the panel. Default true.\r\n * @input topOffset - CSS top offset (e.g. to clear a fixed toolbar). Default '0px'.\r\n * @input ariaLabel - ARIA label for the panel when no visible title is present.\r\n * @input ariaLabelledBy - ID of an element that labels the panel.\r\n * @output closed - Emits when the panel requests closing (close button, Escape, or backdrop click).\r\n *\r\n * @cssvar --_side-panel-top-offset - Internal CSS variable set from the topOffset input.\r\n *\r\n * @example\r\n * <fui-side-panel [open]=\"isPanelOpen\" title=\"Details\" (closed)=\"isPanelOpen = false\">\r\n * <span fuiSidePanelTitle>Custom <em>title</em> markup</span>\r\n * <p>Panel content here.</p>\r\n * </fui-side-panel>\r\n */\r\n@Component({\r\n selector: 'fui-side-panel',\r\n standalone: true,\r\n imports: [FuiIconComponent],\r\n templateUrl: './side-panel.component.html',\r\n styleUrl: './side-panel.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: {\r\n class: 'fui-side-panel',\r\n '[class.fui-side-panel--open]': 'open()',\r\n '[class.fui-side-panel--no-backdrop]': '!hasBackdrop()',\r\n '[style.--_side-panel-top-offset]': 'topOffset()',\r\n },\r\n})\r\nexport class FuiSidePanelComponent {\r\n private readonly _document = inject(DOCUMENT);\r\n readonly intl = inject(FuiSidePanelIntl);\r\n private readonly _cdr = inject(ChangeDetectorRef);\r\n\r\n readonly open = input(false);\r\n readonly title = input('');\r\n readonly width = input('500px');\r\n readonly hasBackdrop = input(true);\r\n readonly topOffset = input('0px');\r\n\r\n /** ARIA label for the side panel, used when no visible title is present */\r\n readonly ariaLabel = input<string | null>(null);\r\n\r\n /** ID of an element that labels the side panel */\r\n readonly ariaLabelledBy = input<string | null>(null);\r\n\r\n readonly closed = output();\r\n\r\n // Projected title detection — true when a [fuiSidePanelTitle] element is provided.\r\n private readonly _projectedTitle = contentChild(FuiSidePanelTitle);\r\n readonly _hasProjectedTitle: Signal<boolean> = computed(() => !!this._projectedTitle());\r\n\r\n @ViewChild('panelElement', { static: false })\r\n private _panelElement?: ElementRef<HTMLElement>;\r\n\r\n private _previouslyFocusedElement: HTMLElement | null = null;\r\n\r\n constructor() {\r\n // Watch open state changes for focus management\r\n effect(() => {\r\n const isOpen = this.open();\r\n if (isOpen) {\r\n this._saveFocusAndTrap();\r\n } else {\r\n this._restoreFocus();\r\n }\r\n });\r\n\r\n this.intl.changes.pipe(takeUntilDestroyed()).subscribe(() => {\r\n this._cdr.markForCheck();\r\n });\r\n }\r\n\r\n @HostListener('keydown', ['$event'])\r\n onKeydown(event: KeyboardEvent): void {\r\n if (!this.open()) return;\r\n\r\n if (event.key === 'Escape') {\r\n event.preventDefault();\r\n this.close();\r\n return;\r\n }\r\n\r\n // Focus trap cycling\r\n if (event.key === 'Tab') {\r\n const focusableElements = this._getFocusableElements();\r\n if (focusableElements.length === 0) {\r\n event.preventDefault();\r\n return;\r\n }\r\n\r\n const firstFocusable = focusableElements[0];\r\n const lastFocusable = focusableElements[focusableElements.length - 1];\r\n const activeElement = this._document.activeElement;\r\n\r\n if (event.shiftKey) {\r\n if (activeElement === firstFocusable) {\r\n event.preventDefault();\r\n lastFocusable.focus();\r\n }\r\n } else {\r\n if (activeElement === lastFocusable) {\r\n event.preventDefault();\r\n firstFocusable.focus();\r\n }\r\n }\r\n }\r\n }\r\n\r\n close(): void {\r\n this.closed.emit();\r\n }\r\n\r\n private _saveFocusAndTrap(): void {\r\n this._previouslyFocusedElement = this._document.activeElement as HTMLElement;\r\n // Focus the panel after it renders\r\n setTimeout(() => {\r\n this._focusFirstTabbable();\r\n });\r\n }\r\n\r\n private _restoreFocus(): void {\r\n if (this._previouslyFocusedElement) {\r\n this._previouslyFocusedElement.focus();\r\n this._previouslyFocusedElement = null;\r\n }\r\n }\r\n\r\n private _focusFirstTabbable(): void {\r\n const focusableElements = this._getFocusableElements();\r\n if (focusableElements.length > 0) {\r\n focusableElements[0].focus();\r\n } else {\r\n this._panelElement?.nativeElement.focus();\r\n }\r\n }\r\n\r\n private _getFocusableElements(): HTMLElement[] {\r\n const panel = this._panelElement?.nativeElement;\r\n if (!panel) return [];\r\n\r\n const selectors = [\r\n 'a[href]',\r\n 'button:not([disabled])',\r\n 'textarea:not([disabled])',\r\n 'input:not([disabled])',\r\n 'select:not([disabled])',\r\n '[tabindex]:not([tabindex=\"-1\"])',\r\n '[contenteditable=\"true\"]',\r\n ].join(',');\r\n\r\n return Array.from(panel.querySelectorAll<HTMLElement>(selectors)).filter((el) => el.offsetParent !== null);\r\n }\r\n}\r\n","@if (open() && hasBackdrop()) {\r\n <div class=\"fui-side-panel__backdrop\" (click)=\"close()\" aria-hidden=\"true\"></div>\r\n}\r\n<div\r\n #panelElement\r\n class=\"fui-side-panel__panel\"\r\n [style.width]=\"width()\"\r\n role=\"dialog\"\r\n [attr.aria-modal]=\"open() ? 'true' : null\"\r\n [attr.aria-label]=\"ariaLabel() || (!ariaLabelledBy() ? title() : null)\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\r\n tabindex=\"-1\"\r\n>\r\n <div class=\"fui-side-panel__header\">\r\n @if (_hasProjectedTitle()) {\r\n <span class=\"fui-side-panel__title\"><ng-content select=\"[fuiSidePanelTitle]\"></ng-content></span>\r\n } @else {\r\n <span class=\"fui-side-panel__title\">{{ title() }}</span>\r\n }\r\n <button type=\"button\" class=\"fui-side-panel__close\" (click)=\"close()\" [attr.aria-label]=\"intl.closeAriaLabel\">\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n </div>\r\n <div class=\"fui-side-panel__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"fui-side-panel__footer\">\r\n <ng-content select=\"[sidePanelFooter]\"></ng-content>\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAIM,MAAO,gBAAiB,SAAQ,WAAW,CAAA;IAC/C,cAAc,GAAG,aAAa;uGADnB,gBAAgB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cADH,MAAM,EAAA,CAAA;;2FACnB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACDlC;;;;;;;;;;AAUG;MAQU,iBAAiB,CAAA;uGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,4BAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,4BAA4B;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A,EAAA,CAAA,cAAc,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;;sBAqB3C,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;;AE1GrC;;AAEG;;;;"}
|
|
@@ -9,7 +9,12 @@ const FUI_TOGGLE_GROUP = new InjectionToken('FUI_TOGGLE_GROUP');
|
|
|
9
9
|
|
|
10
10
|
class FuiToggleItemComponent {
|
|
11
11
|
static nextId = 0;
|
|
12
|
-
|
|
12
|
+
// Not `input.required`: when items are generated via `@for`, Angular applies the
|
|
13
|
+
// [value] binding in the update block (after creation), but the parent group's
|
|
14
|
+
// contentChildren effect reads item.value() on creation — a required input read
|
|
15
|
+
// before binding throws NG0950. Optional input yields `undefined` until bound, and
|
|
16
|
+
// the effect re-runs once the value arrives.
|
|
17
|
+
value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
13
18
|
/** @docs-private — size is controlled by the parent fui-toggle-group. Only effective when used standalone outside a group. */
|
|
14
19
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
15
20
|
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
|
|
@@ -87,7 +92,7 @@ class FuiToggleItemComponent {
|
|
|
87
92
|
this.buttonElement()?.nativeElement.focus();
|
|
88
93
|
}
|
|
89
94
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiToggleItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
90
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.6", type: FuiToggleItemComponent, isStandalone: true, selector: "fui-toggle-item", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired:
|
|
95
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.6", type: FuiToggleItemComponent, isStandalone: true, selector: "fui-toggle-item", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "computedClasses()", "attr.id": "id" } }, viewQueries: [{ propertyName: "buttonElement", first: true, predicate: ["buttonElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<button\r\n #buttonElement\r\n type=\"button\"\r\n class=\"fui-toggle-item__native\"\r\n role=\"radio\"\r\n [attr.name]=\"_name()\"\r\n [attr.value]=\"value()\"\r\n [disabled]=\"isDisabled()\"\r\n [attr.aria-checked]=\"_checked()\"\r\n [attr.aria-disabled]=\"isDisabled() || null\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.aria-labelledby]=\"ariaLabelledby()\"\r\n [attr.tabindex]=\"_tabIndex()\"\r\n (click)=\"onClick()\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n (keydown)=\"onKeydown($event)\"\r\n>\r\n <span class=\"fui-toggle-item__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n</button>\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-out);transition-delay:0ms}.fui-motion-fade-out{transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-in);transition-delay:0ms}.fui-motion-slide-in-bottom{transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition-property:transform,opacity;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-base) var(--fui-ease-out)}@keyframes fui-popover-enter{0%{opacity:0;transform:translateY(-14px)}60%{opacity:1}to{opacity:1;transform:translateY(0)}}.fui-toggle-item{--fui-toggle-font-size: var(--fui-text-base, .875rem);--fui-toggle-padding-x: var(--fui-spacing-7, 1rem);--fui-toggle-padding-y: var(--fui-spacing-4, .25rem);--fui-toggle-bg: transparent;--fui-toggle-text-color: var(--fui-text-secondary, #161616)}.fui-toggle-item-size--sm{--fui-toggle-padding-y: var(--fui-spacing-2, .25rem)}.fui-toggle-item-size--md{--fui-toggle-padding-y: var(--fui-spacing-4, .5rem)}.fui-toggle-item-size--lg{--fui-toggle-padding-y: var(--fui-spacing-6, .75rem)}.fui-toggle-item--checked{--fui-toggle-text-color: var(--fui-text-primary);--fui-toggle-bg: var(--fui-primary-muted, #0f62fe)}.fui-toggle-item__native:hover:not(:disabled):not([aria-checked=true]){--fui-toggle-bg: var(--fui-neutral-10, #f4f4f4);--fui-toggle-text-color: var(--fui-text-primary)}.fui-toggle-item__native:focus-visible{outline:1px solid var(--fui-primary-10);--fui-toggle-bg: var(--fui-neutral-10, #f4f4f4);--fui-toggle-text-color: var(--fui-text-primary)}.fui-toggle-item__native:disabled{cursor:not-allowed;pointer-events:none;background-color:transparent;color:var(--fui-text-disabled)}.fui-toggle-item__native{background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;outline:none}.fui-toggle-item__native:focus-visible{outline:2px solid var(--fui-primary-10)}.fui-toggle-item__native{display:inline-flex;align-items:center;justify-content:center;padding:var(--fui-toggle-padding-y) var(--fui-toggle-padding-x);font-family:var(--fui-font-sans);font-size:var(--fui-toggle-font-size);font-weight:var(--fui-weight-regular);line-height:1.25;color:var(--fui-toggle-text-color);cursor:pointer;box-sizing:border-box;border-radius:var(--fui-radius-xs);transition:var(--fui-transition-bg);background-color:var(--fui-toggle-bg)}.fui-toggle-item__content{display:inline-flex;align-items:center;gap:var(--fui-spacing-4);white-space:nowrap}.fui-toggle-item--focused .fui-toggle-item__native{z-index:1}@media(prefers-contrast:high){.fui-toggle-item__native{border-width:2px}.fui-toggle-item__native[aria-checked=true]{background-color:Highlight;color:HighlightText;border-color:Highlight}}@media(prefers-reduced-motion:reduce){.fui-toggle-item__native{transition:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
91
96
|
}
|
|
92
97
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiToggleItemComponent, decorators: [{
|
|
93
98
|
type: Component,
|
|
@@ -95,7 +100,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
95
100
|
'[class]': 'computedClasses()',
|
|
96
101
|
'[attr.id]': 'id',
|
|
97
102
|
}, template: "<button\r\n #buttonElement\r\n type=\"button\"\r\n class=\"fui-toggle-item__native\"\r\n role=\"radio\"\r\n [attr.name]=\"_name()\"\r\n [attr.value]=\"value()\"\r\n [disabled]=\"isDisabled()\"\r\n [attr.aria-checked]=\"_checked()\"\r\n [attr.aria-disabled]=\"isDisabled() || null\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.aria-labelledby]=\"ariaLabelledby()\"\r\n [attr.tabindex]=\"_tabIndex()\"\r\n (click)=\"onClick()\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n (keydown)=\"onKeydown($event)\"\r\n>\r\n <span class=\"fui-toggle-item__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n</button>\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-out);transition-delay:0ms}.fui-motion-fade-out{transition-property:opacity;transition-duration:var(--fui-duration-fast);transition-timing-function:var(--fui-ease-in);transition-delay:0ms}.fui-motion-slide-in-bottom{transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition-property:transform;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition-property:transform,opacity;transition-duration:var(--fui-duration-base);transition-timing-function:var(--fui-ease-out);transition-delay:0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-base) var(--fui-ease-out)}@keyframes fui-popover-enter{0%{opacity:0;transform:translateY(-14px)}60%{opacity:1}to{opacity:1;transform:translateY(0)}}.fui-toggle-item{--fui-toggle-font-size: var(--fui-text-base, .875rem);--fui-toggle-padding-x: var(--fui-spacing-7, 1rem);--fui-toggle-padding-y: var(--fui-spacing-4, .25rem);--fui-toggle-bg: transparent;--fui-toggle-text-color: var(--fui-text-secondary, #161616)}.fui-toggle-item-size--sm{--fui-toggle-padding-y: var(--fui-spacing-2, .25rem)}.fui-toggle-item-size--md{--fui-toggle-padding-y: var(--fui-spacing-4, .5rem)}.fui-toggle-item-size--lg{--fui-toggle-padding-y: var(--fui-spacing-6, .75rem)}.fui-toggle-item--checked{--fui-toggle-text-color: var(--fui-text-primary);--fui-toggle-bg: var(--fui-primary-muted, #0f62fe)}.fui-toggle-item__native:hover:not(:disabled):not([aria-checked=true]){--fui-toggle-bg: var(--fui-neutral-10, #f4f4f4);--fui-toggle-text-color: var(--fui-text-primary)}.fui-toggle-item__native:focus-visible{outline:1px solid var(--fui-primary-10);--fui-toggle-bg: var(--fui-neutral-10, #f4f4f4);--fui-toggle-text-color: var(--fui-text-primary)}.fui-toggle-item__native:disabled{cursor:not-allowed;pointer-events:none;background-color:transparent;color:var(--fui-text-disabled)}.fui-toggle-item__native{background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;outline:none}.fui-toggle-item__native:focus-visible{outline:2px solid var(--fui-primary-10)}.fui-toggle-item__native{display:inline-flex;align-items:center;justify-content:center;padding:var(--fui-toggle-padding-y) var(--fui-toggle-padding-x);font-family:var(--fui-font-sans);font-size:var(--fui-toggle-font-size);font-weight:var(--fui-weight-regular);line-height:1.25;color:var(--fui-toggle-text-color);cursor:pointer;box-sizing:border-box;border-radius:var(--fui-radius-xs);transition:var(--fui-transition-bg);background-color:var(--fui-toggle-bg)}.fui-toggle-item__content{display:inline-flex;align-items:center;gap:var(--fui-spacing-4);white-space:nowrap}.fui-toggle-item--focused .fui-toggle-item__native{z-index:1}@media(prefers-contrast:high){.fui-toggle-item__native{border-width:2px}.fui-toggle-item__native[aria-checked=true]{background-color:Highlight;color:HighlightText;border-color:Highlight}}@media(prefers-reduced-motion:reduce){.fui-toggle-item__native{transition:none}}\n"] }]
|
|
98
|
-
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required:
|
|
103
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], buttonElement: [{ type: i0.ViewChild, args: ['buttonElement', { isSignal: true }] }] } });
|
|
99
104
|
|
|
100
105
|
class FuiToggleGroupComponent {
|
|
101
106
|
static _counter = 0;
|
|
@@ -154,12 +159,18 @@ class FuiToggleGroupComponent {
|
|
|
154
159
|
const groupDisabled = this.disabled();
|
|
155
160
|
const groupSize = this.size();
|
|
156
161
|
items.forEach((btn, idx) => {
|
|
162
|
+
const btnValue = btn.value();
|
|
163
|
+
// An item whose `[value]` binding has not applied yet reports
|
|
164
|
+
// `undefined`; guard so it does not spuriously match a null/undefined
|
|
165
|
+
// group value (which would check every unbound item and hand each a
|
|
166
|
+
// roving tabindex of 0 on first paint).
|
|
167
|
+
const isSelected = btnValue !== undefined && btnValue === currentValue;
|
|
157
168
|
btn._name.set(groupName);
|
|
158
|
-
btn._checked.set(
|
|
169
|
+
btn._checked.set(isSelected);
|
|
159
170
|
btn._disabled.set(groupDisabled);
|
|
160
171
|
btn._groupSize.set(groupSize);
|
|
161
172
|
// Roving tabindex: only selected (or first if none selected) gets 0
|
|
162
|
-
if (
|
|
173
|
+
if (isSelected) {
|
|
163
174
|
btn._tabIndex.set(0);
|
|
164
175
|
}
|
|
165
176
|
else if (currentValue == null && idx === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"raintonic-formaui-components-toggle-group.mjs","sources":["../../../lib/components/toggle-group/toggle-group.types.ts","../../../lib/components/toggle-group/toggle-item/toggle-item.component.ts","../../../lib/components/toggle-group/toggle-item/toggle-item.component.html","../../../lib/components/toggle-group/toggle-group/toggle-group.component.ts","../../../lib/components/toggle-group/raintonic-formaui-components-toggle-group.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\nimport type { FuiToggleItemComponent } from './toggle-item/toggle-item.component';\r\n\r\nexport interface FuiToggleGroupChange<T = unknown> {\r\n source: FuiToggleItemComponent;\r\n value: T;\r\n}\r\n\r\nexport interface FuiToggleGroupHost {\r\n disabled(): boolean;\r\n selectValue(value: unknown, source: FuiToggleItemComponent): void;\r\n setFocused(focused: boolean): void;\r\n selectAdjacentButton(direction: 1 | -1): void;\r\n selectFirstButton(): void;\r\n selectLastButton(): void;\r\n}\r\n\r\nexport const FUI_TOGGLE_GROUP = new InjectionToken<FuiToggleGroupHost>('FUI_TOGGLE_GROUP');\r\n\r\nexport type FuiToggleGroupSize = 'sm' | 'md' | 'lg';\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n input,\r\n computed,\r\n signal,\r\n ElementRef,\r\n viewChild,\r\n inject,\r\n booleanAttribute,\r\n} from '@angular/core';\r\nimport { FUI_TOGGLE_GROUP } from '../toggle-group.types';\r\n\r\n@Component({\r\n selector: 'fui-toggle-item',\r\n standalone: true,\r\n imports: [],\r\n templateUrl: './toggle-item.component.html',\r\n styleUrl: './toggle-item.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: {\r\n '[class]': 'computedClasses()',\r\n '[attr.id]': 'id',\r\n },\r\n})\r\nexport class FuiToggleItemComponent {\r\n static nextId = 0;\r\n\r\n readonly value = input.required<unknown>();\r\n /** @docs-private — size is controlled by the parent fui-toggle-group. Only effective when used standalone outside a group. */\r\n readonly size = input('md');\r\n readonly disabledInput = input<boolean, unknown>(false, {\r\n alias: 'disabled',\r\n transform: booleanAttribute,\r\n });\r\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\r\n readonly ariaLabelledby = input<string | null>(null, {\r\n alias: 'aria-labelledby',\r\n });\r\n\r\n // Internal state (set by parent group)\r\n readonly _checked = signal(false);\r\n readonly _disabled = signal(false);\r\n readonly _focused = signal(false);\r\n readonly _name = signal('');\r\n readonly _tabIndex = signal(-1);\r\n readonly _groupSize = signal('');\r\n\r\n readonly computedClasses = computed(() => {\r\n const checkedClass = this._checked() && 'fui-toggle-item--checked';\r\n const disabledClass = this._disabled() && 'fui-toggle-item--disabled';\r\n const focusedClass = this._focused() && 'fui-toggle-item--focused';\r\n const size = this._groupSize() || this.size(); // groupSize takes precedence\r\n return ['fui-toggle-item', `fui-toggle-item-size--${size}`, checkedClass, disabledClass, focusedClass]\r\n .filter(Boolean)\r\n .join(' ');\r\n });\r\n\r\n private _uid = `fui-toggle-item-${FuiToggleItemComponent.nextId++}`;\r\n readonly id = this._uid;\r\n\r\n private _toggleGroup = inject(FUI_TOGGLE_GROUP, { optional: true });\r\n\r\n readonly buttonElement = viewChild<ElementRef<HTMLButtonElement>>('buttonElement');\r\n\r\n readonly isDisabled = computed(\r\n () => this._disabled() || this.disabledInput() || (this._toggleGroup?.disabled() ?? false),\r\n );\r\n\r\n onClick(): void {\r\n if (this.isDisabled()) return;\r\n if (this._toggleGroup) {\r\n this._toggleGroup.selectValue(this.value(), this);\r\n }\r\n }\r\n\r\n onFocus(): void {\r\n this._focused.set(true);\r\n if (this._toggleGroup) this._toggleGroup.setFocused(true);\r\n }\r\n\r\n onBlur(): void {\r\n this._focused.set(false);\r\n if (this._toggleGroup) this._toggleGroup.setFocused(false);\r\n }\r\n\r\n onKeydown(event: KeyboardEvent): void {\r\n if (this.isDisabled() || !this._toggleGroup) return;\r\n switch (event.key) {\r\n case 'ArrowDown':\r\n case 'ArrowRight':\r\n event.preventDefault();\r\n this._toggleGroup.selectAdjacentButton(1);\r\n break;\r\n case 'ArrowUp':\r\n case 'ArrowLeft':\r\n event.preventDefault();\r\n this._toggleGroup.selectAdjacentButton(-1);\r\n break;\r\n case 'Home':\r\n event.preventDefault();\r\n this._toggleGroup.selectFirstButton();\r\n break;\r\n case 'End':\r\n event.preventDefault();\r\n this._toggleGroup.selectLastButton();\r\n break;\r\n case 'Enter':\r\n case ' ':\r\n event.preventDefault();\r\n this._toggleGroup.selectValue(this.value(), this);\r\n break;\r\n }\r\n }\r\n\r\n focus(): void {\r\n this.buttonElement()?.nativeElement.focus();\r\n }\r\n}\r\n","<button\r\n #buttonElement\r\n type=\"button\"\r\n class=\"fui-toggle-item__native\"\r\n role=\"radio\"\r\n [attr.name]=\"_name()\"\r\n [attr.value]=\"value()\"\r\n [disabled]=\"isDisabled()\"\r\n [attr.aria-checked]=\"_checked()\"\r\n [attr.aria-disabled]=\"isDisabled() || null\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.aria-labelledby]=\"ariaLabelledby()\"\r\n [attr.tabindex]=\"_tabIndex()\"\r\n (click)=\"onClick()\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n (keydown)=\"onKeydown($event)\"\r\n>\r\n <span class=\"fui-toggle-item__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n</button>\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n input,\r\n output,\r\n computed,\r\n signal,\r\n contentChildren,\r\n OutputEmitterRef,\r\n Signal,\r\n WritableSignal,\r\n OnDestroy,\r\n DoCheck,\r\n inject,\r\n effect,\r\n booleanAttribute,\r\n} from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl, FormGroupDirective, NgForm } from '@angular/forms';\r\nimport { Subject } from 'rxjs';\r\nimport { DefaultErrorStateMatcher, ErrorStateMatcher } from '@raintonic/formaui/core';\r\nimport {\r\n injectNgControl,\r\n updateErrorState,\r\n syncRequiredState,\r\n syncNgControlDisabled,\r\n} from '@raintonic/formaui/cdk/form-field';\r\nimport { FuiToggleGroupChange, FUI_TOGGLE_GROUP } from '../toggle-group.types';\r\nimport { FuiToggleGroupSize } from '../toggle-group.types';\r\nimport { FuiToggleItemComponent } from '../toggle-item/toggle-item.component';\r\n\r\n@Component({\r\n selector: 'fui-toggle-group',\r\n standalone: true,\r\n imports: [],\r\n template: `<ng-content></ng-content>`,\r\n styleUrl: './toggle-group.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: {\r\n class: 'fui-toggle-group',\r\n '[class.fui-toggle-group--disabled]': 'disabled()',\r\n '[class.fui-toggle-group--error]': 'errorState()',\r\n '[attr.role]': '\"radiogroup\"',\r\n '[attr.aria-label]': 'ariaLabel()',\r\n '[attr.aria-labelledby]': 'ariaLabelledby()',\r\n },\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: FuiToggleGroupComponent,\r\n multi: true,\r\n },\r\n { provide: FUI_TOGGLE_GROUP, useExisting: FuiToggleGroupComponent },\r\n ],\r\n})\r\nexport class FuiToggleGroupComponent implements ControlValueAccessor, DoCheck, OnDestroy {\r\n private static _counter = 0;\r\n readonly controlType = 'fui-toggle-group';\r\n\r\n // Inputs\r\n readonly name = input(`fui-toggle-group-${FuiToggleGroupComponent._counter++}`);\r\n readonly disabledInput = input<boolean, unknown>(false, {\r\n alias: 'disabled',\r\n transform: booleanAttribute,\r\n });\r\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\r\n readonly ariaLabelledby = input<string | null>(null, {\r\n alias: 'aria-labelledby',\r\n });\r\n readonly errorStateMatcher = input<ErrorStateMatcher | null>(null);\r\n readonly size = input<FuiToggleGroupSize>('md');\r\n\r\n // Outputs\r\n readonly change: OutputEmitterRef<FuiToggleGroupChange> = output();\r\n\r\n // Content children\r\n readonly toggleItems = contentChildren(FuiToggleItemComponent);\r\n\r\n // Internal state\r\n private readonly _value: WritableSignal<unknown> = signal(null);\r\n private readonly _focused: WritableSignal<boolean> = signal(false);\r\n private readonly _disabled: WritableSignal<boolean> = signal(false);\r\n private readonly _required: WritableSignal<boolean> = signal(false);\r\n private readonly _ngControlDisabled: WritableSignal<boolean> = signal(false);\r\n private readonly _errorState: WritableSignal<boolean> = signal(false);\r\n\r\n readonly value: Signal<unknown> = this._value.asReadonly();\r\n readonly focused: Signal<boolean> = this._focused.asReadonly();\r\n readonly errorState = this._errorState.asReadonly();\r\n readonly required: Signal<boolean> = computed(() => this._required());\r\n readonly disabled: Signal<boolean> = computed(\r\n () => this._disabled() || this.disabledInput() || this._ngControlDisabled(),\r\n );\r\n\r\n readonly stateChanges = new Subject<void>();\r\n readonly id = `fui-toggle-group-${FuiToggleGroupComponent._counter++}`;\r\n\r\n // Form control\r\n private _parentForm = inject(NgForm, { optional: true });\r\n private _parentFormGroup = inject(FormGroupDirective, { optional: true });\r\n private _defaultErrorStateMatcher = inject(DefaultErrorStateMatcher);\r\n private readonly _ngControlRef = injectNgControl();\r\n get ngControl(): NgControl | null {\r\n return this._ngControlRef.ngControl;\r\n }\r\n\r\n private _onChange: (value: unknown) => void = () => {\r\n /* noop */\r\n };\r\n private _onTouched: () => void = () => {\r\n /* noop */\r\n };\r\n\r\n constructor() {\r\n void Promise.resolve().then(() => {\r\n if (this._ngControlRef.ngControl) {\r\n this._ngControlRef.ngControl.valueAccessor = this;\r\n }\r\n });\r\n\r\n // Sync toggle items when they change or value changes\r\n effect(() => {\r\n const items = this.toggleItems();\r\n const currentValue = this._value();\r\n const groupName = this.name();\r\n const groupDisabled = this.disabled();\r\n const groupSize = this.size();\r\n\r\n items.forEach((btn, idx) => {\r\n btn._name.set(groupName);\r\n btn._checked.set(btn.value() === currentValue);\r\n btn._disabled.set(groupDisabled);\r\n btn._groupSize.set(groupSize);\r\n // Roving tabindex: only selected (or first if none selected) gets 0\r\n if (btn.value() === currentValue) {\r\n btn._tabIndex.set(0);\r\n } else if (currentValue == null && idx === 0) {\r\n btn._tabIndex.set(0);\r\n } else {\r\n btn._tabIndex.set(-1);\r\n }\r\n });\r\n });\r\n\r\n effect(() => {\r\n this._value();\r\n this._focused();\r\n this._disabled();\r\n this._ngControlDisabled();\r\n this._required();\r\n this._errorState();\r\n this.stateChanges.next();\r\n });\r\n }\r\n\r\n ngDoCheck(): void {\r\n if (this.ngControl) {\r\n updateErrorState(\r\n this.ngControl,\r\n this._errorState,\r\n this.errorStateMatcher(),\r\n this._defaultErrorStateMatcher,\r\n this._parentForm,\r\n this._parentFormGroup,\r\n this.stateChanges,\r\n );\r\n syncRequiredState(this.ngControl, this._required, this.stateChanges);\r\n syncNgControlDisabled(this.ngControl, this._ngControlDisabled, this.stateChanges);\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.stateChanges.complete();\r\n }\r\n\r\n // CVA\r\n writeValue(value: unknown): void {\r\n this._value.set(value);\r\n this.stateChanges.next();\r\n }\r\n\r\n registerOnChange(fn: (value: unknown) => void): void {\r\n this._onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: () => void): void {\r\n this._onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this._disabled.set(isDisabled);\r\n this.stateChanges.next();\r\n }\r\n\r\n // Called by toggle items when selected\r\n selectValue(value: unknown, source: FuiToggleItemComponent): void {\r\n if (this.disabled()) return;\r\n const oldValue = this._value();\r\n if (oldValue === value) return; // no-op selecting same value\r\n this._value.set(value);\r\n this._onChange(value);\r\n this.change.emit({ source, value });\r\n this.stateChanges.next();\r\n }\r\n\r\n setFocused(focused: boolean): void {\r\n this._focused.set(focused);\r\n if (!focused) this._onTouched();\r\n this.stateChanges.next();\r\n }\r\n\r\n // Keyboard navigation - select adjacent item\r\n selectAdjacentButton(direction: 1 | -1): void {\r\n const items = this.toggleItems();\r\n if (items.length === 0) return;\r\n\r\n const enabledItems = items.filter((b) => !b.isDisabled());\r\n if (enabledItems.length === 0) return;\r\n\r\n const currentIdx = enabledItems.findIndex((b) => b._checked());\r\n let nextIdx: number;\r\n if (currentIdx === -1) {\r\n nextIdx = direction === 1 ? 0 : enabledItems.length - 1;\r\n } else {\r\n nextIdx = (currentIdx + direction + enabledItems.length) % enabledItems.length;\r\n }\r\n\r\n const nextItem = enabledItems[nextIdx];\r\n this.selectValue(nextItem.value(), nextItem);\r\n nextItem.focus();\r\n }\r\n\r\n selectFirstButton(): void {\r\n const items = this.toggleItems();\r\n if (items.length === 0) return;\r\n\r\n const enabledItems = items.filter((b) => !b.isDisabled());\r\n if (enabledItems.length === 0) return;\r\n\r\n const firstItem = enabledItems[0];\r\n this.selectValue(firstItem.value(), firstItem);\r\n firstItem.focus();\r\n }\r\n\r\n selectLastButton(): void {\r\n const items = this.toggleItems();\r\n if (items.length === 0) return;\r\n\r\n const enabledItems = items.filter((b) => !b.isDisabled());\r\n if (enabledItems.length === 0) return;\r\n\r\n const lastItem = enabledItems[enabledItems.length - 1];\r\n this.selectValue(lastItem.value(), lastItem);\r\n lastItem.focus();\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAiBa,gBAAgB,GAAG,IAAI,cAAc,CAAqB,kBAAkB;;MCU5E,sBAAsB,CAAA;AACjC,IAAA,OAAO,MAAM,GAAG,CAAC;AAER,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAW;;AAEjC,IAAA,IAAI,GAAG,KAAK,CAAC,IAAI,2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,EAAE,YAAY;AAClD,wBAAA,iCAAiC,EAAE,cAAc;AACjD,wBAAA,aAAa,EAAE,cAAc;AAC7B,wBAAA,mBAAmB,EAAE,aAAa;AAClC,wBAAA,wBAAwB,EAAE,kBAAkB;qBAC7C,EAAA,SAAA,EACU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,uBAAyB;AACpC,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACD,wBAAA,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,yBAAyB,EAAE;AACpE,qBAAA,EAAA,MAAA,EAAA,CAAA,0gBAAA,CAAA,EAAA;qwBAuBsC,sBAAsB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC7E/D;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"raintonic-formaui-components-toggle-group.mjs","sources":["../../../lib/components/toggle-group/toggle-group.types.ts","../../../lib/components/toggle-group/toggle-item/toggle-item.component.ts","../../../lib/components/toggle-group/toggle-item/toggle-item.component.html","../../../lib/components/toggle-group/toggle-group/toggle-group.component.ts","../../../lib/components/toggle-group/raintonic-formaui-components-toggle-group.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\nimport type { FuiToggleItemComponent } from './toggle-item/toggle-item.component';\r\n\r\nexport interface FuiToggleGroupChange<T = unknown> {\r\n source: FuiToggleItemComponent;\r\n value: T;\r\n}\r\n\r\nexport interface FuiToggleGroupHost {\r\n disabled(): boolean;\r\n selectValue(value: unknown, source: FuiToggleItemComponent): void;\r\n setFocused(focused: boolean): void;\r\n selectAdjacentButton(direction: 1 | -1): void;\r\n selectFirstButton(): void;\r\n selectLastButton(): void;\r\n}\r\n\r\nexport const FUI_TOGGLE_GROUP = new InjectionToken<FuiToggleGroupHost>('FUI_TOGGLE_GROUP');\r\n\r\nexport type FuiToggleGroupSize = 'sm' | 'md' | 'lg';\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n input,\r\n computed,\r\n signal,\r\n ElementRef,\r\n viewChild,\r\n inject,\r\n booleanAttribute,\r\n} from '@angular/core';\r\nimport { FUI_TOGGLE_GROUP } from '../toggle-group.types';\r\n\r\n@Component({\r\n selector: 'fui-toggle-item',\r\n standalone: true,\r\n imports: [],\r\n templateUrl: './toggle-item.component.html',\r\n styleUrl: './toggle-item.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: {\r\n '[class]': 'computedClasses()',\r\n '[attr.id]': 'id',\r\n },\r\n})\r\nexport class FuiToggleItemComponent {\r\n static nextId = 0;\r\n\r\n // Not `input.required`: when items are generated via `@for`, Angular applies the\r\n // [value] binding in the update block (after creation), but the parent group's\r\n // contentChildren effect reads item.value() on creation — a required input read\r\n // before binding throws NG0950. Optional input yields `undefined` until bound, and\r\n // the effect re-runs once the value arrives.\r\n readonly value = input<unknown>();\r\n /** @docs-private — size is controlled by the parent fui-toggle-group. Only effective when used standalone outside a group. */\r\n readonly size = input('md');\r\n readonly disabledInput = input<boolean, unknown>(false, {\r\n alias: 'disabled',\r\n transform: booleanAttribute,\r\n });\r\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\r\n readonly ariaLabelledby = input<string | null>(null, {\r\n alias: 'aria-labelledby',\r\n });\r\n\r\n // Internal state (set by parent group)\r\n readonly _checked = signal(false);\r\n readonly _disabled = signal(false);\r\n readonly _focused = signal(false);\r\n readonly _name = signal('');\r\n readonly _tabIndex = signal(-1);\r\n readonly _groupSize = signal('');\r\n\r\n readonly computedClasses = computed(() => {\r\n const checkedClass = this._checked() && 'fui-toggle-item--checked';\r\n const disabledClass = this._disabled() && 'fui-toggle-item--disabled';\r\n const focusedClass = this._focused() && 'fui-toggle-item--focused';\r\n const size = this._groupSize() || this.size(); // groupSize takes precedence\r\n return ['fui-toggle-item', `fui-toggle-item-size--${size}`, checkedClass, disabledClass, focusedClass]\r\n .filter(Boolean)\r\n .join(' ');\r\n });\r\n\r\n private _uid = `fui-toggle-item-${FuiToggleItemComponent.nextId++}`;\r\n readonly id = this._uid;\r\n\r\n private _toggleGroup = inject(FUI_TOGGLE_GROUP, { optional: true });\r\n\r\n readonly buttonElement = viewChild<ElementRef<HTMLButtonElement>>('buttonElement');\r\n\r\n readonly isDisabled = computed(\r\n () => this._disabled() || this.disabledInput() || (this._toggleGroup?.disabled() ?? false),\r\n );\r\n\r\n onClick(): void {\r\n if (this.isDisabled()) return;\r\n if (this._toggleGroup) {\r\n this._toggleGroup.selectValue(this.value(), this);\r\n }\r\n }\r\n\r\n onFocus(): void {\r\n this._focused.set(true);\r\n if (this._toggleGroup) this._toggleGroup.setFocused(true);\r\n }\r\n\r\n onBlur(): void {\r\n this._focused.set(false);\r\n if (this._toggleGroup) this._toggleGroup.setFocused(false);\r\n }\r\n\r\n onKeydown(event: KeyboardEvent): void {\r\n if (this.isDisabled() || !this._toggleGroup) return;\r\n switch (event.key) {\r\n case 'ArrowDown':\r\n case 'ArrowRight':\r\n event.preventDefault();\r\n this._toggleGroup.selectAdjacentButton(1);\r\n break;\r\n case 'ArrowUp':\r\n case 'ArrowLeft':\r\n event.preventDefault();\r\n this._toggleGroup.selectAdjacentButton(-1);\r\n break;\r\n case 'Home':\r\n event.preventDefault();\r\n this._toggleGroup.selectFirstButton();\r\n break;\r\n case 'End':\r\n event.preventDefault();\r\n this._toggleGroup.selectLastButton();\r\n break;\r\n case 'Enter':\r\n case ' ':\r\n event.preventDefault();\r\n this._toggleGroup.selectValue(this.value(), this);\r\n break;\r\n }\r\n }\r\n\r\n focus(): void {\r\n this.buttonElement()?.nativeElement.focus();\r\n }\r\n}\r\n","<button\r\n #buttonElement\r\n type=\"button\"\r\n class=\"fui-toggle-item__native\"\r\n role=\"radio\"\r\n [attr.name]=\"_name()\"\r\n [attr.value]=\"value()\"\r\n [disabled]=\"isDisabled()\"\r\n [attr.aria-checked]=\"_checked()\"\r\n [attr.aria-disabled]=\"isDisabled() || null\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.aria-labelledby]=\"ariaLabelledby()\"\r\n [attr.tabindex]=\"_tabIndex()\"\r\n (click)=\"onClick()\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n (keydown)=\"onKeydown($event)\"\r\n>\r\n <span class=\"fui-toggle-item__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n</button>\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n input,\r\n output,\r\n computed,\r\n signal,\r\n contentChildren,\r\n OutputEmitterRef,\r\n Signal,\r\n WritableSignal,\r\n OnDestroy,\r\n DoCheck,\r\n inject,\r\n effect,\r\n booleanAttribute,\r\n} from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl, FormGroupDirective, NgForm } from '@angular/forms';\r\nimport { Subject } from 'rxjs';\r\nimport { DefaultErrorStateMatcher, ErrorStateMatcher } from '@raintonic/formaui/core';\r\nimport {\r\n injectNgControl,\r\n updateErrorState,\r\n syncRequiredState,\r\n syncNgControlDisabled,\r\n} from '@raintonic/formaui/cdk/form-field';\r\nimport { FuiToggleGroupChange, FUI_TOGGLE_GROUP } from '../toggle-group.types';\r\nimport { FuiToggleGroupSize } from '../toggle-group.types';\r\nimport { FuiToggleItemComponent } from '../toggle-item/toggle-item.component';\r\n\r\n@Component({\r\n selector: 'fui-toggle-group',\r\n standalone: true,\r\n imports: [],\r\n template: `<ng-content></ng-content>`,\r\n styleUrl: './toggle-group.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: {\r\n class: 'fui-toggle-group',\r\n '[class.fui-toggle-group--disabled]': 'disabled()',\r\n '[class.fui-toggle-group--error]': 'errorState()',\r\n '[attr.role]': '\"radiogroup\"',\r\n '[attr.aria-label]': 'ariaLabel()',\r\n '[attr.aria-labelledby]': 'ariaLabelledby()',\r\n },\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: FuiToggleGroupComponent,\r\n multi: true,\r\n },\r\n { provide: FUI_TOGGLE_GROUP, useExisting: FuiToggleGroupComponent },\r\n ],\r\n})\r\nexport class FuiToggleGroupComponent implements ControlValueAccessor, DoCheck, OnDestroy {\r\n private static _counter = 0;\r\n readonly controlType = 'fui-toggle-group';\r\n\r\n // Inputs\r\n readonly name = input(`fui-toggle-group-${FuiToggleGroupComponent._counter++}`);\r\n readonly disabledInput = input<boolean, unknown>(false, {\r\n alias: 'disabled',\r\n transform: booleanAttribute,\r\n });\r\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\r\n readonly ariaLabelledby = input<string | null>(null, {\r\n alias: 'aria-labelledby',\r\n });\r\n readonly errorStateMatcher = input<ErrorStateMatcher | null>(null);\r\n readonly size = input<FuiToggleGroupSize>('md');\r\n\r\n // Outputs\r\n readonly change: OutputEmitterRef<FuiToggleGroupChange> = output();\r\n\r\n // Content children\r\n readonly toggleItems = contentChildren(FuiToggleItemComponent);\r\n\r\n // Internal state\r\n private readonly _value: WritableSignal<unknown> = signal(null);\r\n private readonly _focused: WritableSignal<boolean> = signal(false);\r\n private readonly _disabled: WritableSignal<boolean> = signal(false);\r\n private readonly _required: WritableSignal<boolean> = signal(false);\r\n private readonly _ngControlDisabled: WritableSignal<boolean> = signal(false);\r\n private readonly _errorState: WritableSignal<boolean> = signal(false);\r\n\r\n readonly value: Signal<unknown> = this._value.asReadonly();\r\n readonly focused: Signal<boolean> = this._focused.asReadonly();\r\n readonly errorState = this._errorState.asReadonly();\r\n readonly required: Signal<boolean> = computed(() => this._required());\r\n readonly disabled: Signal<boolean> = computed(\r\n () => this._disabled() || this.disabledInput() || this._ngControlDisabled(),\r\n );\r\n\r\n readonly stateChanges = new Subject<void>();\r\n readonly id = `fui-toggle-group-${FuiToggleGroupComponent._counter++}`;\r\n\r\n // Form control\r\n private _parentForm = inject(NgForm, { optional: true });\r\n private _parentFormGroup = inject(FormGroupDirective, { optional: true });\r\n private _defaultErrorStateMatcher = inject(DefaultErrorStateMatcher);\r\n private readonly _ngControlRef = injectNgControl();\r\n get ngControl(): NgControl | null {\r\n return this._ngControlRef.ngControl;\r\n }\r\n\r\n private _onChange: (value: unknown) => void = () => {\r\n /* noop */\r\n };\r\n private _onTouched: () => void = () => {\r\n /* noop */\r\n };\r\n\r\n constructor() {\r\n void Promise.resolve().then(() => {\r\n if (this._ngControlRef.ngControl) {\r\n this._ngControlRef.ngControl.valueAccessor = this;\r\n }\r\n });\r\n\r\n // Sync toggle items when they change or value changes\r\n effect(() => {\r\n const items = this.toggleItems();\r\n const currentValue = this._value();\r\n const groupName = this.name();\r\n const groupDisabled = this.disabled();\r\n const groupSize = this.size();\r\n\r\n items.forEach((btn, idx) => {\r\n const btnValue = btn.value();\r\n // An item whose `[value]` binding has not applied yet reports\r\n // `undefined`; guard so it does not spuriously match a null/undefined\r\n // group value (which would check every unbound item and hand each a\r\n // roving tabindex of 0 on first paint).\r\n const isSelected = btnValue !== undefined && btnValue === currentValue;\r\n btn._name.set(groupName);\r\n btn._checked.set(isSelected);\r\n btn._disabled.set(groupDisabled);\r\n btn._groupSize.set(groupSize);\r\n // Roving tabindex: only selected (or first if none selected) gets 0\r\n if (isSelected) {\r\n btn._tabIndex.set(0);\r\n } else if (currentValue == null && idx === 0) {\r\n btn._tabIndex.set(0);\r\n } else {\r\n btn._tabIndex.set(-1);\r\n }\r\n });\r\n });\r\n\r\n effect(() => {\r\n this._value();\r\n this._focused();\r\n this._disabled();\r\n this._ngControlDisabled();\r\n this._required();\r\n this._errorState();\r\n this.stateChanges.next();\r\n });\r\n }\r\n\r\n ngDoCheck(): void {\r\n if (this.ngControl) {\r\n updateErrorState(\r\n this.ngControl,\r\n this._errorState,\r\n this.errorStateMatcher(),\r\n this._defaultErrorStateMatcher,\r\n this._parentForm,\r\n this._parentFormGroup,\r\n this.stateChanges,\r\n );\r\n syncRequiredState(this.ngControl, this._required, this.stateChanges);\r\n syncNgControlDisabled(this.ngControl, this._ngControlDisabled, this.stateChanges);\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.stateChanges.complete();\r\n }\r\n\r\n // CVA\r\n writeValue(value: unknown): void {\r\n this._value.set(value);\r\n this.stateChanges.next();\r\n }\r\n\r\n registerOnChange(fn: (value: unknown) => void): void {\r\n this._onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: () => void): void {\r\n this._onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this._disabled.set(isDisabled);\r\n this.stateChanges.next();\r\n }\r\n\r\n // Called by toggle items when selected\r\n selectValue(value: unknown, source: FuiToggleItemComponent): void {\r\n if (this.disabled()) return;\r\n const oldValue = this._value();\r\n if (oldValue === value) return; // no-op selecting same value\r\n this._value.set(value);\r\n this._onChange(value);\r\n this.change.emit({ source, value });\r\n this.stateChanges.next();\r\n }\r\n\r\n setFocused(focused: boolean): void {\r\n this._focused.set(focused);\r\n if (!focused) this._onTouched();\r\n this.stateChanges.next();\r\n }\r\n\r\n // Keyboard navigation - select adjacent item\r\n selectAdjacentButton(direction: 1 | -1): void {\r\n const items = this.toggleItems();\r\n if (items.length === 0) return;\r\n\r\n const enabledItems = items.filter((b) => !b.isDisabled());\r\n if (enabledItems.length === 0) return;\r\n\r\n const currentIdx = enabledItems.findIndex((b) => b._checked());\r\n let nextIdx: number;\r\n if (currentIdx === -1) {\r\n nextIdx = direction === 1 ? 0 : enabledItems.length - 1;\r\n } else {\r\n nextIdx = (currentIdx + direction + enabledItems.length) % enabledItems.length;\r\n }\r\n\r\n const nextItem = enabledItems[nextIdx];\r\n this.selectValue(nextItem.value(), nextItem);\r\n nextItem.focus();\r\n }\r\n\r\n selectFirstButton(): void {\r\n const items = this.toggleItems();\r\n if (items.length === 0) return;\r\n\r\n const enabledItems = items.filter((b) => !b.isDisabled());\r\n if (enabledItems.length === 0) return;\r\n\r\n const firstItem = enabledItems[0];\r\n this.selectValue(firstItem.value(), firstItem);\r\n firstItem.focus();\r\n }\r\n\r\n selectLastButton(): void {\r\n const items = this.toggleItems();\r\n if (items.length === 0) return;\r\n\r\n const enabledItems = items.filter((b) => !b.isDisabled());\r\n if (enabledItems.length === 0) return;\r\n\r\n const lastItem = enabledItems[enabledItems.length - 1];\r\n this.selectValue(lastItem.value(), lastItem);\r\n lastItem.focus();\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAiBa,gBAAgB,GAAG,IAAI,cAAc,CAAqB,kBAAkB;;MCU5E,sBAAsB,CAAA;AACjC,IAAA,OAAO,MAAM,GAAG,CAAC;;;;;;IAOR,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAW;;AAExB,IAAA,IAAI,GAAG,KAAK,CAAC,IAAI,2EAAC;AAClB,IAAA,aAAa,GAAG,KAAK,CAAmB,KAAK,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,eAAA,EAAA,8BAAA,EAAA,CAAA,EACpD,KAAK,EAAE,UAAU;QACjB,SAAS,EAAE,gBAAgB,EAAA,CAC3B;IACO,SAAS,GAAG,KAAK,CAAgB,IAAI,iFAAI,KAAK,EAAE,YAAY,EAAA,CAAG;IAC/D,cAAc,GAAG,KAAK,CAAgB,IAAI,sFACjD,KAAK,EAAE,iBAAiB,EAAA,CACxB;;AAGO,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,+EAAC;AACxB,IAAA,SAAS,GAAG,MAAM,CAAC,KAAK,gFAAC;AACzB,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,+EAAC;AACxB,IAAA,KAAK,GAAG,MAAM,CAAC,EAAE,4EAAC;AAClB,IAAA,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,gF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