@frame-ui-ng/components 0.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +9 -0
- package/README.md +31 -0
- package/accordion/src/styles/_vars.css +25 -0
- package/accordion/src/styles/accordion.css +87 -0
- package/alert/src/styles/_vars.css +28 -0
- package/alert/src/styles/alert.css +77 -0
- package/avatar/src/styles/_vars.css +34 -0
- package/avatar/src/styles/avatar.css +209 -0
- package/badge/src/styles/_vars.css +16 -0
- package/badge/src/styles/badge.css +125 -0
- package/breadcrumb/src/styles/_vars.css +16 -0
- package/breadcrumb/src/styles/breadcrumb.css +98 -0
- package/button/src/styles/_vars.css +20 -0
- package/button/src/styles/button-icon.css +18 -0
- package/button/src/styles/button-label.css +3 -0
- package/button/src/styles/button.css +243 -0
- package/button-group/src/styles/button-group.css +69 -0
- package/calendar/src/styles/_vars.css +29 -0
- package/calendar/src/styles/calendar.css +226 -0
- package/card/src/styles/_vars.css +17 -0
- package/card/src/styles/card.css +142 -0
- package/carousel/src/styles/_vars.css +7 -0
- package/carousel/src/styles/carousel.css +89 -0
- package/checkbox/src/styles/_vars.css +22 -0
- package/checkbox/src/styles/checkbox.css +95 -0
- package/collapsible/src/styles/_vars.css +13 -0
- package/collapsible/src/styles/collapsible.css +42 -0
- package/combobox/src/styles/_vars.css +60 -0
- package/combobox/src/styles/combobox.css +285 -0
- package/command/src/styles/_vars.css +37 -0
- package/command/src/styles/command.css +171 -0
- package/context-menu/src/styles/context-menu.css +5 -0
- package/date-picker/src/styles/_vars.css +29 -0
- package/date-picker/src/styles/date-picker.css +177 -0
- package/dropdown-menu/src/styles/_vars.css +34 -0
- package/dropdown-menu/src/styles/dropdown-menu-item.css +87 -0
- package/dropdown-menu/src/styles/dropdown-menu-motion.css +42 -0
- package/dropdown-menu/src/styles/dropdown-menu-panel.css +26 -0
- package/dropdown-menu/src/styles/dropdown-menu.css +4 -0
- package/empty/src/styles/_vars.css +23 -0
- package/empty/src/styles/empty.css +108 -0
- package/fesm2022/frame-ui-ng-components-accordion.mjs +268 -0
- package/fesm2022/frame-ui-ng-components-accordion.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-alert.mjs +102 -0
- package/fesm2022/frame-ui-ng-components-alert.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-avatar.mjs +197 -0
- package/fesm2022/frame-ui-ng-components-avatar.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-badge.mjs +120 -0
- package/fesm2022/frame-ui-ng-components-badge.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-breadcrumb.mjs +156 -0
- package/fesm2022/frame-ui-ng-components-breadcrumb.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-button-group.mjs +44 -0
- package/fesm2022/frame-ui-ng-components-button-group.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-button.mjs +150 -0
- package/fesm2022/frame-ui-ng-components-button.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-calendar.mjs +559 -0
- package/fesm2022/frame-ui-ng-components-calendar.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-card.mjs +169 -0
- package/fesm2022/frame-ui-ng-components-card.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-carousel.mjs +454 -0
- package/fesm2022/frame-ui-ng-components-carousel.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-checkbox.mjs +83 -0
- package/fesm2022/frame-ui-ng-components-checkbox.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-collapsible.mjs +191 -0
- package/fesm2022/frame-ui-ng-components-collapsible.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-combobox.mjs +859 -0
- package/fesm2022/frame-ui-ng-components-combobox.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-command.mjs +658 -0
- package/fesm2022/frame-ui-ng-components-command.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-context-menu.mjs +579 -0
- package/fesm2022/frame-ui-ng-components-context-menu.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-date-picker.mjs +512 -0
- package/fesm2022/frame-ui-ng-components-date-picker.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-dropdown-menu.mjs +647 -0
- package/fesm2022/frame-ui-ng-components-dropdown-menu.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-empty.mjs +134 -0
- package/fesm2022/frame-ui-ng-components-empty.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-field.mjs +210 -0
- package/fesm2022/frame-ui-ng-components-field.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-forms.mjs +89 -0
- package/fesm2022/frame-ui-ng-components-forms.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-hover-card.mjs +412 -0
- package/fesm2022/frame-ui-ng-components-hover-card.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-input-otp.mjs +327 -0
- package/fesm2022/frame-ui-ng-components-input-otp.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-input.mjs +250 -0
- package/fesm2022/frame-ui-ng-components-input.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-item.mjs +207 -0
- package/fesm2022/frame-ui-ng-components-item.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-menubar.mjs +371 -0
- package/fesm2022/frame-ui-ng-components-menubar.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-modal.mjs +525 -0
- package/fesm2022/frame-ui-ng-components-modal.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-navigation-menu.mjs +322 -0
- package/fesm2022/frame-ui-ng-components-navigation-menu.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-pagination.mjs +327 -0
- package/fesm2022/frame-ui-ng-components-pagination.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-popover.mjs +454 -0
- package/fesm2022/frame-ui-ng-components-popover.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-progress.mjs +96 -0
- package/fesm2022/frame-ui-ng-components-progress.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-radio-group.mjs +124 -0
- package/fesm2022/frame-ui-ng-components-radio-group.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-resizable.mjs +325 -0
- package/fesm2022/frame-ui-ng-components-resizable.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-select.mjs +434 -0
- package/fesm2022/frame-ui-ng-components-select.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-separator.mjs +51 -0
- package/fesm2022/frame-ui-ng-components-separator.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-sheet.mjs +514 -0
- package/fesm2022/frame-ui-ng-components-sheet.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-sidebar.mjs +628 -0
- package/fesm2022/frame-ui-ng-components-sidebar.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-skeleton.mjs +46 -0
- package/fesm2022/frame-ui-ng-components-skeleton.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-slider.mjs +279 -0
- package/fesm2022/frame-ui-ng-components-slider.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-spinner.mjs +51 -0
- package/fesm2022/frame-ui-ng-components-spinner.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-switch.mjs +130 -0
- package/fesm2022/frame-ui-ng-components-switch.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-table.mjs +594 -0
- package/fesm2022/frame-ui-ng-components-table.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-tabs.mjs +208 -0
- package/fesm2022/frame-ui-ng-components-tabs.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-textarea.mjs +40 -0
- package/fesm2022/frame-ui-ng-components-textarea.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-toast.mjs +346 -0
- package/fesm2022/frame-ui-ng-components-toast.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-toggle.mjs +127 -0
- package/fesm2022/frame-ui-ng-components-toggle.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-tooltip.mjs +425 -0
- package/fesm2022/frame-ui-ng-components-tooltip.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-virtual-scroll.mjs +321 -0
- package/fesm2022/frame-ui-ng-components-virtual-scroll.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components.mjs +10278 -0
- package/fesm2022/frame-ui-ng-components.mjs.map +1 -0
- package/field/src/styles/_vars.css +20 -0
- package/field/src/styles/field.css +165 -0
- package/hover-card/src/styles/_vars.css +21 -0
- package/hover-card/src/styles/hover-card.css +76 -0
- package/input/src/styles/_vars.css +65 -0
- package/input/src/styles/input-group.css +112 -0
- package/input/src/styles/input.css +163 -0
- package/input-otp/src/styles/_vars.css +21 -0
- package/input-otp/src/styles/input-otp.css +116 -0
- package/item/src/styles/_vars.css +34 -0
- package/item/src/styles/item.css +187 -0
- package/menubar/src/styles/_vars.css +22 -0
- package/menubar/src/styles/menubar.css +70 -0
- package/modal/src/styles/_vars.css +18 -0
- package/modal/src/styles/modal.css +179 -0
- package/navigation-menu/src/styles/_vars.css +45 -0
- package/navigation-menu/src/styles/navigation-menu.css +245 -0
- package/package.json +243 -0
- package/pagination/src/styles/_vars.css +22 -0
- package/pagination/src/styles/pagination.css +138 -0
- package/popover/src/styles/_vars.css +24 -0
- package/popover/src/styles/popover.css +101 -0
- package/progress/src/styles/_vars.css +15 -0
- package/progress/src/styles/progress.css +64 -0
- package/radio-group/src/styles/_vars.css +29 -0
- package/radio-group/src/styles/radio-group.css +137 -0
- package/resizable/src/styles/_vars.css +20 -0
- package/resizable/src/styles/resizable.css +130 -0
- package/select/src/styles/_vars.css +28 -0
- package/select/src/styles/select-content.css +19 -0
- package/select/src/styles/select-feedback.css +6 -0
- package/select/src/styles/select-item.css +69 -0
- package/select/src/styles/select-trigger.css +95 -0
- package/select/src/styles/select.css +5 -0
- package/separator/src/styles/_vars.css +9 -0
- package/separator/src/styles/separator.css +25 -0
- package/sheet/src/styles/_vars.css +18 -0
- package/sheet/src/styles/sheet.css +215 -0
- package/sidebar/src/styles/_vars.css +24 -0
- package/sidebar/src/styles/sidebar.css +531 -0
- package/skeleton/src/styles/_vars.css +8 -0
- package/skeleton/src/styles/skeleton.css +40 -0
- package/slider/src/styles/_vars.css +17 -0
- package/slider/src/styles/slider.css +147 -0
- package/spinner/src/styles/_vars.css +9 -0
- package/spinner/src/styles/spinner.css +62 -0
- package/src/styles/components.css +47 -0
- package/styles/components.css +47 -0
- package/styles.css +49 -0
- package/switch/src/styles/_vars.css +34 -0
- package/switch/src/styles/switch.css +131 -0
- package/table/src/styles/_vars.css +25 -0
- package/table/src/styles/table.css +245 -0
- package/tabs/src/styles/_vars.css +23 -0
- package/tabs/src/styles/tabs.css +164 -0
- package/textarea/src/styles/_vars.css +20 -0
- package/textarea/src/styles/textarea.css +60 -0
- package/toast/src/styles/_vars.css +47 -0
- package/toast/src/styles/toast.css +314 -0
- package/toggle/src/styles/_vars.css +24 -0
- package/toggle/src/styles/toggle.css +110 -0
- package/tooltip/src/styles/_vars.css +21 -0
- package/tooltip/src/styles/tooltip.css +103 -0
- package/types/frame-ui-ng-components-accordion.d.ts +75 -0
- package/types/frame-ui-ng-components-alert.d.ts +30 -0
- package/types/frame-ui-ng-components-avatar.d.ts +65 -0
- package/types/frame-ui-ng-components-badge.d.ts +35 -0
- package/types/frame-ui-ng-components-breadcrumb.d.ts +40 -0
- package/types/frame-ui-ng-components-button-group.d.ts +18 -0
- package/types/frame-ui-ng-components-button.d.ts +50 -0
- package/types/frame-ui-ng-components-calendar.d.ts +101 -0
- package/types/frame-ui-ng-components-card.d.ts +51 -0
- package/types/frame-ui-ng-components-carousel.d.ts +117 -0
- package/types/frame-ui-ng-components-checkbox.d.ts +25 -0
- package/types/frame-ui-ng-components-collapsible.d.ts +55 -0
- package/types/frame-ui-ng-components-combobox.d.ts +201 -0
- package/types/frame-ui-ng-components-command.d.ts +198 -0
- package/types/frame-ui-ng-components-context-menu.d.ts +149 -0
- package/types/frame-ui-ng-components-date-picker.d.ts +95 -0
- package/types/frame-ui-ng-components-dropdown-menu.d.ts +182 -0
- package/types/frame-ui-ng-components-empty.d.ts +44 -0
- package/types/frame-ui-ng-components-field.d.ts +60 -0
- package/types/frame-ui-ng-components-forms.d.ts +39 -0
- package/types/frame-ui-ng-components-hover-card.d.ts +94 -0
- package/types/frame-ui-ng-components-input-otp.d.ts +70 -0
- package/types/frame-ui-ng-components-input.d.ts +67 -0
- package/types/frame-ui-ng-components-item.d.ts +62 -0
- package/types/frame-ui-ng-components-menubar.d.ts +76 -0
- package/types/frame-ui-ng-components-modal.d.ts +148 -0
- package/types/frame-ui-ng-components-navigation-menu.d.ts +74 -0
- package/types/frame-ui-ng-components-pagination.d.ts +79 -0
- package/types/frame-ui-ng-components-popover.d.ts +95 -0
- package/types/frame-ui-ng-components-progress.d.ts +24 -0
- package/types/frame-ui-ng-components-radio-group.d.ts +40 -0
- package/types/frame-ui-ng-components-resizable.d.ts +61 -0
- package/types/frame-ui-ng-components-select.d.ts +114 -0
- package/types/frame-ui-ng-components-separator.d.ts +19 -0
- package/types/frame-ui-ng-components-sheet.d.ts +146 -0
- package/types/frame-ui-ng-components-sidebar.d.ts +163 -0
- package/types/frame-ui-ng-components-skeleton.d.ts +18 -0
- package/types/frame-ui-ng-components-slider.d.ts +56 -0
- package/types/frame-ui-ng-components-spinner.d.ts +23 -0
- package/types/frame-ui-ng-components-switch.d.ts +38 -0
- package/types/frame-ui-ng-components-table.d.ts +125 -0
- package/types/frame-ui-ng-components-tabs.d.ts +62 -0
- package/types/frame-ui-ng-components-textarea.d.ts +14 -0
- package/types/frame-ui-ng-components-toast.d.ts +74 -0
- package/types/frame-ui-ng-components-toggle.d.ts +45 -0
- package/types/frame-ui-ng-components-tooltip.d.ts +99 -0
- package/types/frame-ui-ng-components-virtual-scroll.d.ts +106 -0
- package/types/frame-ui-ng-components.d.ts +2746 -0
- package/virtual-scroll/src/styles/virtual-scroll.css +54 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, Renderer2, input, effect, RendererStyleFlags2, Directive, NgModule } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
const FR_CARD_SIZES = ['default', 'sm'];
|
|
5
|
+
const FR_CARD_SPACINGS = ['sm', 'md', 'lg', 'xl'];
|
|
6
|
+
const FR_CARD_FOOTER_ALIGNS = ['start', 'end', 'between'];
|
|
7
|
+
const FR_CARD_SPACING_VALUES = {
|
|
8
|
+
sm: '0.75rem',
|
|
9
|
+
md: '1rem',
|
|
10
|
+
lg: '1.25rem',
|
|
11
|
+
xl: '2rem',
|
|
12
|
+
};
|
|
13
|
+
class FrCard {
|
|
14
|
+
elementRef = inject(ElementRef);
|
|
15
|
+
renderer = inject(Renderer2);
|
|
16
|
+
size = input('default', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
17
|
+
spacing = input(null, ...(ngDevMode ? [{ debugName: "spacing" }] : /* istanbul ignore next */ []));
|
|
18
|
+
constructor() {
|
|
19
|
+
effect(() => {
|
|
20
|
+
const spacing = this.spacing();
|
|
21
|
+
if (!spacing) {
|
|
22
|
+
this.renderer.removeStyle(this.elementRef.nativeElement, '--frame-card-spacing', RendererStyleFlags2.DashCase);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
this.renderer.setStyle(this.elementRef.nativeElement, '--frame-card-spacing', FR_CARD_SPACING_VALUES[spacing], RendererStyleFlags2.DashCase);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCard, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
29
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrCard, isStandalone: true, selector: "[frCard], frame-card", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-size": "size()", "attr.data-spacing": "spacing()" }, classAttribute: "frame-card" }, ngImport: i0 });
|
|
30
|
+
}
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCard, decorators: [{
|
|
32
|
+
type: Directive,
|
|
33
|
+
args: [{
|
|
34
|
+
selector: '[frCard], frame-card',
|
|
35
|
+
host: {
|
|
36
|
+
class: 'frame-card',
|
|
37
|
+
'[attr.data-size]': 'size()',
|
|
38
|
+
'[attr.data-spacing]': 'spacing()',
|
|
39
|
+
},
|
|
40
|
+
}]
|
|
41
|
+
}], ctorParameters: () => [], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], spacing: [{ type: i0.Input, args: [{ isSignal: true, alias: "spacing", required: false }] }] } });
|
|
42
|
+
class FrCardHeader {
|
|
43
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCardHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
44
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrCardHeader, isStandalone: true, selector: "[frCardHeader]", host: { classAttribute: "frame-card__header" }, ngImport: i0 });
|
|
45
|
+
}
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCardHeader, decorators: [{
|
|
47
|
+
type: Directive,
|
|
48
|
+
args: [{
|
|
49
|
+
selector: '[frCardHeader]',
|
|
50
|
+
host: {
|
|
51
|
+
class: 'frame-card__header',
|
|
52
|
+
},
|
|
53
|
+
}]
|
|
54
|
+
}] });
|
|
55
|
+
class FrCardTitle {
|
|
56
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCardTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
57
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrCardTitle, isStandalone: true, selector: "[frCardTitle]", host: { classAttribute: "frame-card__title" }, ngImport: i0 });
|
|
58
|
+
}
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCardTitle, decorators: [{
|
|
60
|
+
type: Directive,
|
|
61
|
+
args: [{
|
|
62
|
+
selector: '[frCardTitle]',
|
|
63
|
+
host: {
|
|
64
|
+
class: 'frame-card__title',
|
|
65
|
+
},
|
|
66
|
+
}]
|
|
67
|
+
}] });
|
|
68
|
+
class FrCardDescription {
|
|
69
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCardDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
70
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrCardDescription, isStandalone: true, selector: "[frCardDescription]", host: { classAttribute: "frame-card__description" }, ngImport: i0 });
|
|
71
|
+
}
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCardDescription, decorators: [{
|
|
73
|
+
type: Directive,
|
|
74
|
+
args: [{
|
|
75
|
+
selector: '[frCardDescription]',
|
|
76
|
+
host: {
|
|
77
|
+
class: 'frame-card__description',
|
|
78
|
+
},
|
|
79
|
+
}]
|
|
80
|
+
}] });
|
|
81
|
+
class FrCardAction {
|
|
82
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCardAction, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
83
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrCardAction, isStandalone: true, selector: "[frCardAction]", host: { classAttribute: "frame-card__action" }, ngImport: i0 });
|
|
84
|
+
}
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCardAction, decorators: [{
|
|
86
|
+
type: Directive,
|
|
87
|
+
args: [{
|
|
88
|
+
selector: '[frCardAction]',
|
|
89
|
+
host: {
|
|
90
|
+
class: 'frame-card__action',
|
|
91
|
+
},
|
|
92
|
+
}]
|
|
93
|
+
}] });
|
|
94
|
+
class FrCardContent {
|
|
95
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCardContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
96
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrCardContent, isStandalone: true, selector: "[frCardContent]", host: { classAttribute: "frame-card__content" }, ngImport: i0 });
|
|
97
|
+
}
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCardContent, decorators: [{
|
|
99
|
+
type: Directive,
|
|
100
|
+
args: [{
|
|
101
|
+
selector: '[frCardContent]',
|
|
102
|
+
host: {
|
|
103
|
+
class: 'frame-card__content',
|
|
104
|
+
},
|
|
105
|
+
}]
|
|
106
|
+
}] });
|
|
107
|
+
class FrCardFooter {
|
|
108
|
+
align = input('start', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
109
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCardFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
110
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrCardFooter, isStandalone: true, selector: "[frCardFooter]", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-align": "align()" }, classAttribute: "frame-card__footer" }, ngImport: i0 });
|
|
111
|
+
}
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCardFooter, decorators: [{
|
|
113
|
+
type: Directive,
|
|
114
|
+
args: [{
|
|
115
|
+
selector: '[frCardFooter]',
|
|
116
|
+
host: {
|
|
117
|
+
class: 'frame-card__footer',
|
|
118
|
+
'[attr.data-align]': 'align()',
|
|
119
|
+
},
|
|
120
|
+
}]
|
|
121
|
+
}], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }] } });
|
|
122
|
+
|
|
123
|
+
class FrCardModule {
|
|
124
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
125
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.16", ngImport: i0, type: FrCardModule, imports: [FrCard,
|
|
126
|
+
FrCardAction,
|
|
127
|
+
FrCardContent,
|
|
128
|
+
FrCardDescription,
|
|
129
|
+
FrCardFooter,
|
|
130
|
+
FrCardHeader,
|
|
131
|
+
FrCardTitle], exports: [FrCard,
|
|
132
|
+
FrCardAction,
|
|
133
|
+
FrCardContent,
|
|
134
|
+
FrCardDescription,
|
|
135
|
+
FrCardFooter,
|
|
136
|
+
FrCardHeader,
|
|
137
|
+
FrCardTitle] });
|
|
138
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCardModule });
|
|
139
|
+
}
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCardModule, decorators: [{
|
|
141
|
+
type: NgModule,
|
|
142
|
+
args: [{
|
|
143
|
+
imports: [
|
|
144
|
+
FrCard,
|
|
145
|
+
FrCardAction,
|
|
146
|
+
FrCardContent,
|
|
147
|
+
FrCardDescription,
|
|
148
|
+
FrCardFooter,
|
|
149
|
+
FrCardHeader,
|
|
150
|
+
FrCardTitle,
|
|
151
|
+
],
|
|
152
|
+
exports: [
|
|
153
|
+
FrCard,
|
|
154
|
+
FrCardAction,
|
|
155
|
+
FrCardContent,
|
|
156
|
+
FrCardDescription,
|
|
157
|
+
FrCardFooter,
|
|
158
|
+
FrCardHeader,
|
|
159
|
+
FrCardTitle,
|
|
160
|
+
],
|
|
161
|
+
}]
|
|
162
|
+
}] });
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Generated bundle index. Do not edit.
|
|
166
|
+
*/
|
|
167
|
+
|
|
168
|
+
export { FR_CARD_FOOTER_ALIGNS, FR_CARD_SIZES, FR_CARD_SPACINGS, FrCard, FrCardAction, FrCardContent, FrCardDescription, FrCardFooter, FrCardHeader, FrCardModule, FrCardTitle };
|
|
169
|
+
//# sourceMappingURL=frame-ui-ng-components-card.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frame-ui-ng-components-card.mjs","sources":["../../../projects/components/card/src/card.ts","../../../projects/components/card/card.module.ts","../../../projects/components/card/frame-ui-ng-components-card.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n Renderer2,\n RendererStyleFlags2,\n effect,\n inject,\n input,\n} from '@angular/core';\n\nexport const FR_CARD_SIZES = ['default', 'sm'] as const;\nexport const FR_CARD_SPACINGS = ['sm', 'md', 'lg', 'xl'] as const;\nexport const FR_CARD_FOOTER_ALIGNS = ['start', 'end', 'between'] as const;\n\nexport type FrCardSize = (typeof FR_CARD_SIZES)[number];\nexport type FrCardSpacing = (typeof FR_CARD_SPACINGS)[number];\nexport type FrCardFooterAlign = (typeof FR_CARD_FOOTER_ALIGNS)[number];\n\nconst FR_CARD_SPACING_VALUES: Record<FrCardSpacing, string> = {\n sm: '0.75rem',\n md: '1rem',\n lg: '1.25rem',\n xl: '2rem',\n};\n\n@Directive({\n selector: '[frCard], frame-card',\n host: {\n class: 'frame-card',\n '[attr.data-size]': 'size()',\n '[attr.data-spacing]': 'spacing()',\n },\n})\nexport class FrCard {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderer = inject(Renderer2);\n\n readonly size = input<FrCardSize>('default');\n readonly spacing = input<FrCardSpacing | null>(null);\n\n constructor() {\n effect(() => {\n const spacing = this.spacing();\n if (!spacing) {\n this.renderer.removeStyle(\n this.elementRef.nativeElement,\n '--frame-card-spacing',\n RendererStyleFlags2.DashCase,\n );\n return;\n }\n\n this.renderer.setStyle(\n this.elementRef.nativeElement,\n '--frame-card-spacing',\n FR_CARD_SPACING_VALUES[spacing],\n RendererStyleFlags2.DashCase,\n );\n });\n }\n}\n\n@Directive({\n selector: '[frCardHeader]',\n host: {\n class: 'frame-card__header',\n },\n})\nexport class FrCardHeader {}\n\n@Directive({\n selector: '[frCardTitle]',\n host: {\n class: 'frame-card__title',\n },\n})\nexport class FrCardTitle {}\n\n@Directive({\n selector: '[frCardDescription]',\n host: {\n class: 'frame-card__description',\n },\n})\nexport class FrCardDescription {}\n\n@Directive({\n selector: '[frCardAction]',\n host: {\n class: 'frame-card__action',\n },\n})\nexport class FrCardAction {}\n\n@Directive({\n selector: '[frCardContent]',\n host: {\n class: 'frame-card__content',\n },\n})\nexport class FrCardContent {}\n\n@Directive({\n selector: '[frCardFooter]',\n host: {\n class: 'frame-card__footer',\n '[attr.data-align]': 'align()',\n },\n})\nexport class FrCardFooter {\n readonly align = input<FrCardFooterAlign>('start');\n}\n","import { NgModule } from '@angular/core';\nimport {\n FrCard,\n FrCardAction,\n FrCardContent,\n FrCardDescription,\n FrCardFooter,\n FrCardHeader,\n FrCardTitle,\n} from './src/card';\n\n@NgModule({\n imports: [\n FrCard,\n FrCardAction,\n FrCardContent,\n FrCardDescription,\n FrCardFooter,\n FrCardHeader,\n FrCardTitle,\n ],\n exports: [\n FrCard,\n FrCardAction,\n FrCardContent,\n FrCardDescription,\n FrCardFooter,\n FrCardHeader,\n FrCardTitle,\n ],\n})\nexport class FrCardModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAUa,aAAa,GAAG,CAAC,SAAS,EAAE,IAAI;AACtC,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;AAChD,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS;AAM/D,MAAM,sBAAsB,GAAkC;AAC5D,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,MAAM;AACV,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,MAAM;CACX;MAUY,MAAM,CAAA;AACA,IAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;AACxD,IAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAEpC,IAAA,IAAI,GAAG,KAAK,CAAa,SAAS,2EAAC;AACnC,IAAA,OAAO,GAAG,KAAK,CAAuB,IAAI,8EAAC;AAEpD,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;YAC9B,IAAI,CAAC,OAAO,EAAE;AACZ,gBAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,CACvB,IAAI,CAAC,UAAU,CAAC,aAAa,EAC7B,sBAAsB,EACtB,mBAAmB,CAAC,QAAQ,CAC7B;gBACD;YACF;YAEA,IAAI,CAAC,QAAQ,CAAC,QAAQ,CACpB,IAAI,CAAC,UAAU,CAAC,aAAa,EAC7B,sBAAsB,EACtB,sBAAsB,CAAC,OAAO,CAAC,EAC/B,mBAAmB,CAAC,QAAQ,CAC7B;AACH,QAAA,CAAC,CAAC;IACJ;wGA1BW,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eA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ute, output, signal, computed, effect, Directive, ElementRef, NgModule } from '@angular/core';
|
|
3
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { fromEvent } from 'rxjs';
|
|
5
|
+
import * as i1 from '@frame-ui-ng/components/button';
|
|
6
|
+
import { FrButton } from '@frame-ui-ng/components/button';
|
|
7
|
+
|
|
8
|
+
const FR_CAROUSEL_ORIENTATIONS = ['horizontal', 'vertical'];
|
|
9
|
+
const FR_CAROUSEL_ALIGNS = ['start', 'center', 'end'];
|
|
10
|
+
const FR_CAROUSEL_DIRECTIONS = ['ltr', 'rtl'];
|
|
11
|
+
const FR_CAROUSEL = new InjectionToken('FrCarousel');
|
|
12
|
+
class FrCarousel {
|
|
13
|
+
destroyRef = inject(DestroyRef);
|
|
14
|
+
listeners = new Map();
|
|
15
|
+
pluginCleanups = [];
|
|
16
|
+
loopResetTimer = null;
|
|
17
|
+
loopResetScrollEndCleanup = null;
|
|
18
|
+
scrollSyncTimer = null;
|
|
19
|
+
isProgrammaticScroll = false;
|
|
20
|
+
loopBoundaryClone = null;
|
|
21
|
+
contentElement = null;
|
|
22
|
+
itemElements = [];
|
|
23
|
+
align = input('start', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
24
|
+
loop = input(false, { ...(ngDevMode ? { debugName: "loop" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
25
|
+
orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
26
|
+
opts = input(null, ...(ngDevMode ? [{ debugName: "opts" }] : /* istanbul ignore next */ []));
|
|
27
|
+
plugins = input([], ...(ngDevMode ? [{ debugName: "plugins" }] : /* istanbul ignore next */ []));
|
|
28
|
+
apiReady = output();
|
|
29
|
+
selectedChange = output();
|
|
30
|
+
selectedIndex = signal(0, ...(ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []));
|
|
31
|
+
snapCount = signal(0, ...(ngDevMode ? [{ debugName: "snapCount" }] : /* istanbul ignore next */ []));
|
|
32
|
+
effectiveAlign = computed(() => this.opts()?.align ?? this.align(), ...(ngDevMode ? [{ debugName: "effectiveAlign" }] : /* istanbul ignore next */ []));
|
|
33
|
+
effectiveDirection = computed(() => this.opts()?.direction ?? 'ltr', ...(ngDevMode ? [{ debugName: "effectiveDirection" }] : /* istanbul ignore next */ []));
|
|
34
|
+
effectiveLoop = computed(() => this.opts()?.loop ?? this.loop(), ...(ngDevMode ? [{ debugName: "effectiveLoop" }] : /* istanbul ignore next */ []));
|
|
35
|
+
api = {
|
|
36
|
+
canScrollNext: () => this.canScrollNext(),
|
|
37
|
+
canScrollPrev: () => this.canScrollPrev(),
|
|
38
|
+
scrollNext: () => this.scrollNext(),
|
|
39
|
+
scrollPrev: () => this.scrollPrev(),
|
|
40
|
+
scrollTo: (index) => this.scrollTo(index),
|
|
41
|
+
scrollSnapList: () => this.itemElements.map((_, index) => index),
|
|
42
|
+
selectedScrollSnap: () => this.selectedIndex(),
|
|
43
|
+
on: (event, callback) => this.on(event, callback),
|
|
44
|
+
};
|
|
45
|
+
constructor() {
|
|
46
|
+
effect(() => {
|
|
47
|
+
const plugins = this.plugins();
|
|
48
|
+
this.pluginCleanups.splice(0).forEach((cleanup) => cleanup());
|
|
49
|
+
for (const plugin of plugins) {
|
|
50
|
+
const cleanup = plugin(this.api);
|
|
51
|
+
if (typeof cleanup === 'function') {
|
|
52
|
+
this.pluginCleanups.push(cleanup);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
effect(() => {
|
|
57
|
+
if (!this.effectiveLoop()) {
|
|
58
|
+
this.removeLoopClone();
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
this.destroyRef.onDestroy(() => {
|
|
62
|
+
this.pluginCleanups.splice(0).forEach((cleanup) => cleanup());
|
|
63
|
+
this.clearLoopResetTimer();
|
|
64
|
+
this.clearScrollSyncTimer();
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
ngAfterViewInit() {
|
|
68
|
+
queueMicrotask(() => {
|
|
69
|
+
this.recalculate();
|
|
70
|
+
this.emit('init');
|
|
71
|
+
this.apiReady.emit(this.api);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
registerContent(element) {
|
|
75
|
+
this.contentElement = element;
|
|
76
|
+
fromEvent(element, 'scroll')
|
|
77
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
78
|
+
.subscribe(() => this.syncSelectedFromScroll());
|
|
79
|
+
}
|
|
80
|
+
registerItem(element) {
|
|
81
|
+
this.itemElements.push(element);
|
|
82
|
+
this.recalculate();
|
|
83
|
+
}
|
|
84
|
+
unregisterItem(element) {
|
|
85
|
+
this.itemElements = this.itemElements.filter((item) => item !== element);
|
|
86
|
+
this.recalculate();
|
|
87
|
+
}
|
|
88
|
+
canScrollPrev() {
|
|
89
|
+
return this.effectiveLoop() || this.selectedIndex() > 0;
|
|
90
|
+
}
|
|
91
|
+
canScrollNext() {
|
|
92
|
+
return this.effectiveLoop() || this.selectedIndex() < this.snapCount() - 1;
|
|
93
|
+
}
|
|
94
|
+
scrollPrev() {
|
|
95
|
+
const nextIndex = this.selectedIndex() - 1;
|
|
96
|
+
if (this.effectiveLoop() && nextIndex < 0) {
|
|
97
|
+
this.scrollLoopBoundary('previous');
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
this.scrollTo(nextIndex < 0 ? this.snapCount() - 1 : nextIndex);
|
|
101
|
+
}
|
|
102
|
+
scrollNext() {
|
|
103
|
+
const nextIndex = this.selectedIndex() + 1;
|
|
104
|
+
if (this.effectiveLoop() && nextIndex >= this.snapCount()) {
|
|
105
|
+
this.scrollLoopBoundary('next');
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
this.scrollTo(nextIndex >= this.snapCount() ? 0 : nextIndex);
|
|
109
|
+
}
|
|
110
|
+
scrollTo(index) {
|
|
111
|
+
const target = this.itemElements[index];
|
|
112
|
+
if (!target || (!this.effectiveLoop() && (index < 0 || index >= this.snapCount()))) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
this.pauseScrollSync();
|
|
116
|
+
this.scrollItemIntoView(target);
|
|
117
|
+
this.setSelectedIndex(index);
|
|
118
|
+
}
|
|
119
|
+
handleKeydown(event) {
|
|
120
|
+
const nextKey = this.orientation() === 'vertical' ? 'ArrowDown' : 'ArrowRight';
|
|
121
|
+
const prevKey = this.orientation() === 'vertical' ? 'ArrowUp' : 'ArrowLeft';
|
|
122
|
+
if (event.key === nextKey) {
|
|
123
|
+
event.preventDefault();
|
|
124
|
+
this.scrollNext();
|
|
125
|
+
}
|
|
126
|
+
if (event.key === prevKey) {
|
|
127
|
+
event.preventDefault();
|
|
128
|
+
this.scrollPrev();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
on(event, callback) {
|
|
132
|
+
const callbacks = this.listeners.get(event) ?? new Set();
|
|
133
|
+
callbacks.add(callback);
|
|
134
|
+
this.listeners.set(event, callbacks);
|
|
135
|
+
return () => callbacks.delete(callback);
|
|
136
|
+
}
|
|
137
|
+
emit(event) {
|
|
138
|
+
this.listeners.get(event)?.forEach((callback) => callback());
|
|
139
|
+
}
|
|
140
|
+
recalculate() {
|
|
141
|
+
this.snapCount.set(this.itemElements.length);
|
|
142
|
+
this.emit('reInit');
|
|
143
|
+
}
|
|
144
|
+
syncSelectedFromScroll() {
|
|
145
|
+
if (this.isProgrammaticScroll || !this.contentElement || !this.itemElements.length) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
const current = this.getCurrentScrollOffset();
|
|
149
|
+
const closest = this.itemElements.reduce((best, item, index) => {
|
|
150
|
+
const targetOffset = this.getItemScrollOffset(item);
|
|
151
|
+
const distance = Math.abs(targetOffset - current);
|
|
152
|
+
return distance < best.distance ? { distance, index } : best;
|
|
153
|
+
}, { distance: Number.POSITIVE_INFINITY, index: this.selectedIndex() });
|
|
154
|
+
this.setSelectedIndex(closest.index);
|
|
155
|
+
}
|
|
156
|
+
scrollItemIntoView(target, behavior = 'smooth') {
|
|
157
|
+
if (!this.contentElement ||
|
|
158
|
+
typeof this.contentElement.getBoundingClientRect !== 'function' ||
|
|
159
|
+
typeof target.getBoundingClientRect !== 'function') {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
const next = this.getItemScrollOffset(target);
|
|
163
|
+
const isVertical = this.orientation() === 'vertical';
|
|
164
|
+
if (typeof this.contentElement.scrollTo === 'function') {
|
|
165
|
+
this.contentElement.scrollTo({
|
|
166
|
+
[isVertical ? 'top' : 'left']: next,
|
|
167
|
+
behavior,
|
|
168
|
+
});
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (isVertical) {
|
|
172
|
+
this.contentElement.scrollTop = next;
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
this.contentElement.scrollLeft = next;
|
|
176
|
+
}
|
|
177
|
+
getItemScrollOffset(target) {
|
|
178
|
+
if (!this.contentElement) {
|
|
179
|
+
return 0;
|
|
180
|
+
}
|
|
181
|
+
const contentRect = this.contentElement.getBoundingClientRect();
|
|
182
|
+
const targetRect = target.getBoundingClientRect();
|
|
183
|
+
const isVertical = this.orientation() === 'vertical';
|
|
184
|
+
const current = this.getCurrentScrollOffset();
|
|
185
|
+
const contentSize = isVertical ? this.contentElement.clientHeight : this.contentElement.clientWidth;
|
|
186
|
+
const targetSize = isVertical ? target.offsetHeight : target.offsetWidth;
|
|
187
|
+
const targetStart = isVertical
|
|
188
|
+
? targetRect.top - contentRect.top
|
|
189
|
+
: targetRect.left - contentRect.left;
|
|
190
|
+
let next = current + targetStart;
|
|
191
|
+
if (this.effectiveAlign() === 'center') {
|
|
192
|
+
next -= (contentSize - targetSize) / 2;
|
|
193
|
+
}
|
|
194
|
+
if (this.effectiveAlign() === 'end') {
|
|
195
|
+
next -= contentSize - targetSize;
|
|
196
|
+
}
|
|
197
|
+
return Math.max(0, Math.min(next, this.getMaxScrollOffset()));
|
|
198
|
+
}
|
|
199
|
+
getCurrentScrollOffset() {
|
|
200
|
+
if (!this.contentElement) {
|
|
201
|
+
return 0;
|
|
202
|
+
}
|
|
203
|
+
return this.orientation() === 'vertical'
|
|
204
|
+
? this.contentElement.scrollTop
|
|
205
|
+
: this.contentElement.scrollLeft;
|
|
206
|
+
}
|
|
207
|
+
getMaxScrollOffset() {
|
|
208
|
+
if (!this.contentElement) {
|
|
209
|
+
return 0;
|
|
210
|
+
}
|
|
211
|
+
return this.orientation() === 'vertical'
|
|
212
|
+
? Math.max(0, this.contentElement.scrollHeight - this.contentElement.clientHeight)
|
|
213
|
+
: Math.max(0, this.contentElement.scrollWidth - this.contentElement.clientWidth);
|
|
214
|
+
}
|
|
215
|
+
scrollLoopBoundary(direction) {
|
|
216
|
+
if (!this.contentElement || !this.effectiveLoop() || this.snapCount() < 2) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
const finalIndex = direction === 'next' ? 0 : this.snapCount() - 1;
|
|
220
|
+
const cloneSource = direction === 'next' ? this.itemElements[0] : this.itemElements[this.snapCount() - 1];
|
|
221
|
+
const resetTarget = this.itemElements[finalIndex];
|
|
222
|
+
if (!cloneSource || !resetTarget) {
|
|
223
|
+
this.scrollTo(finalIndex);
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
this.clearLoopResetTimer();
|
|
227
|
+
this.removeLoopClone();
|
|
228
|
+
this.loopBoundaryClone = this.createLoopClone(cloneSource);
|
|
229
|
+
this.pauseScrollSync();
|
|
230
|
+
if (direction === 'next') {
|
|
231
|
+
this.contentElement.appendChild(this.loopBoundaryClone);
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
this.contentElement.insertBefore(this.loopBoundaryClone, this.contentElement.firstChild);
|
|
235
|
+
this.scrollItemIntoView(this.itemElements[0], 'auto');
|
|
236
|
+
}
|
|
237
|
+
this.scrollItemIntoView(this.loopBoundaryClone);
|
|
238
|
+
this.setSelectedIndex(finalIndex);
|
|
239
|
+
this.scheduleLoopReset(resetTarget);
|
|
240
|
+
}
|
|
241
|
+
createLoopClone(item) {
|
|
242
|
+
const clone = item.cloneNode(true);
|
|
243
|
+
clone.setAttribute('aria-hidden', 'true');
|
|
244
|
+
clone.setAttribute('data-frame-carousel-clone', 'true');
|
|
245
|
+
clone.removeAttribute('FrCarouselItem');
|
|
246
|
+
clone.inert = true;
|
|
247
|
+
return clone;
|
|
248
|
+
}
|
|
249
|
+
removeLoopClone() {
|
|
250
|
+
this.loopBoundaryClone?.remove();
|
|
251
|
+
this.loopBoundaryClone = null;
|
|
252
|
+
}
|
|
253
|
+
clearLoopResetTimer() {
|
|
254
|
+
this.loopResetScrollEndCleanup?.();
|
|
255
|
+
this.loopResetScrollEndCleanup = null;
|
|
256
|
+
if (this.loopResetTimer === null) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
window.clearTimeout(this.loopResetTimer);
|
|
260
|
+
this.loopResetTimer = null;
|
|
261
|
+
}
|
|
262
|
+
scheduleLoopReset(resetTarget) {
|
|
263
|
+
if (!this.contentElement) {
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
let didReset = false;
|
|
267
|
+
const reset = () => {
|
|
268
|
+
if (didReset) {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
didReset = true;
|
|
272
|
+
this.clearLoopResetTimer();
|
|
273
|
+
this.scrollItemIntoView(resetTarget, 'auto');
|
|
274
|
+
this.removeLoopClone();
|
|
275
|
+
};
|
|
276
|
+
this.contentElement.addEventListener('scrollend', reset, { once: true });
|
|
277
|
+
this.loopResetScrollEndCleanup = () => this.contentElement?.removeEventListener('scrollend', reset);
|
|
278
|
+
this.loopResetTimer = window.setTimeout(reset, 1200);
|
|
279
|
+
}
|
|
280
|
+
pauseScrollSync(duration = 1300) {
|
|
281
|
+
this.isProgrammaticScroll = true;
|
|
282
|
+
this.clearScrollSyncTimer();
|
|
283
|
+
this.scrollSyncTimer = window.setTimeout(() => {
|
|
284
|
+
this.isProgrammaticScroll = false;
|
|
285
|
+
this.scrollSyncTimer = null;
|
|
286
|
+
}, duration);
|
|
287
|
+
}
|
|
288
|
+
clearScrollSyncTimer() {
|
|
289
|
+
if (this.scrollSyncTimer === null) {
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
window.clearTimeout(this.scrollSyncTimer);
|
|
293
|
+
this.scrollSyncTimer = null;
|
|
294
|
+
}
|
|
295
|
+
setSelectedIndex(index) {
|
|
296
|
+
if (index === this.selectedIndex()) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
this.selectedIndex.set(index);
|
|
300
|
+
this.selectedChange.emit(index);
|
|
301
|
+
this.emit('select');
|
|
302
|
+
}
|
|
303
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCarousel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
304
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrCarousel, isStandalone: true, selector: "[frCarousel], frame-carousel", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, loop: { classPropertyName: "loop", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, opts: { classPropertyName: "opts", publicName: "opts", isSignal: true, isRequired: false, transformFunction: null }, plugins: { classPropertyName: "plugins", publicName: "plugins", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { apiReady: "apiReady", selectedChange: "selectedChange" }, host: { attributes: { "role": "region", "tabindex": "0" }, listeners: { "keydown": "handleKeydown($event)" }, properties: { "attr.aria-roledescription": "\"carousel\"", "attr.data-align": "effectiveAlign()", "attr.data-orientation": "orientation()", "attr.dir": "effectiveDirection()" }, classAttribute: "frame-carousel" }, providers: [{ provide: FR_CAROUSEL, useExisting: FrCarousel }], exportAs: ["frCarousel"], ngImport: i0 });
|
|
305
|
+
}
|
|
306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCarousel, decorators: [{
|
|
307
|
+
type: Directive,
|
|
308
|
+
args: [{
|
|
309
|
+
selector: '[frCarousel], frame-carousel',
|
|
310
|
+
exportAs: 'frCarousel',
|
|
311
|
+
host: {
|
|
312
|
+
class: 'frame-carousel',
|
|
313
|
+
role: 'region',
|
|
314
|
+
tabindex: '0',
|
|
315
|
+
'[attr.aria-roledescription]': '"carousel"',
|
|
316
|
+
'[attr.data-align]': 'effectiveAlign()',
|
|
317
|
+
'[attr.data-orientation]': 'orientation()',
|
|
318
|
+
'[attr.dir]': 'effectiveDirection()',
|
|
319
|
+
'(keydown)': 'handleKeydown($event)',
|
|
320
|
+
},
|
|
321
|
+
providers: [{ provide: FR_CAROUSEL, useExisting: FrCarousel }],
|
|
322
|
+
}]
|
|
323
|
+
}], ctorParameters: () => [], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], loop: [{ type: i0.Input, args: [{ isSignal: true, alias: "loop", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], opts: [{ type: i0.Input, args: [{ isSignal: true, alias: "opts", required: false }] }], plugins: [{ type: i0.Input, args: [{ isSignal: true, alias: "plugins", required: false }] }], apiReady: [{ type: i0.Output, args: ["apiReady"] }], selectedChange: [{ type: i0.Output, args: ["selectedChange"] }] } });
|
|
324
|
+
class FrCarouselContent {
|
|
325
|
+
carousel = inject(FR_CAROUSEL);
|
|
326
|
+
elementRef = inject(ElementRef);
|
|
327
|
+
ngAfterViewInit() {
|
|
328
|
+
this.carousel.registerContent(this.elementRef.nativeElement);
|
|
329
|
+
}
|
|
330
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCarouselContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
331
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrCarouselContent, isStandalone: true, selector: "[frCarouselContent]", host: { properties: { "attr.data-orientation": "carousel.orientation()" }, classAttribute: "frame-carousel__content" }, ngImport: i0 });
|
|
332
|
+
}
|
|
333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCarouselContent, decorators: [{
|
|
334
|
+
type: Directive,
|
|
335
|
+
args: [{
|
|
336
|
+
selector: '[frCarouselContent]',
|
|
337
|
+
host: {
|
|
338
|
+
class: 'frame-carousel__content',
|
|
339
|
+
'[attr.data-orientation]': 'carousel.orientation()',
|
|
340
|
+
},
|
|
341
|
+
}]
|
|
342
|
+
}] });
|
|
343
|
+
class FrCarouselItem {
|
|
344
|
+
carousel = inject(FR_CAROUSEL);
|
|
345
|
+
destroyRef = inject(DestroyRef);
|
|
346
|
+
elementRef = inject(ElementRef);
|
|
347
|
+
ngAfterViewInit() {
|
|
348
|
+
this.carousel.registerItem(this.elementRef.nativeElement);
|
|
349
|
+
this.destroyRef.onDestroy(() => this.carousel.unregisterItem(this.elementRef.nativeElement));
|
|
350
|
+
}
|
|
351
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCarouselItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
352
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrCarouselItem, isStandalone: true, selector: "[frCarouselItem]", host: { attributes: { "role": "group" }, properties: { "attr.aria-roledescription": "\"slide\"" }, classAttribute: "frame-carousel__item" }, ngImport: i0 });
|
|
353
|
+
}
|
|
354
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCarouselItem, decorators: [{
|
|
355
|
+
type: Directive,
|
|
356
|
+
args: [{
|
|
357
|
+
selector: '[frCarouselItem]',
|
|
358
|
+
host: {
|
|
359
|
+
class: 'frame-carousel__item',
|
|
360
|
+
role: 'group',
|
|
361
|
+
'[attr.aria-roledescription]': '"slide"',
|
|
362
|
+
},
|
|
363
|
+
}]
|
|
364
|
+
}] });
|
|
365
|
+
class FrCarouselPrevious {
|
|
366
|
+
carousel = inject(FR_CAROUSEL);
|
|
367
|
+
label = input('Previous slide', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
368
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCarouselPrevious, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
369
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrCarouselPrevious, isStandalone: true, selector: "button[frCarouselPrevious]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "carousel.scrollPrev()" }, properties: { "attr.type": "\"button\"", "attr.aria-label": "label()", "attr.disabled": "carousel.canScrollPrev() ? null : \"\"" }, classAttribute: "frame-carousel__control frame-carousel__control--previous" }, hostDirectives: [{ directive: i1.FrButton, inputs: ["appearance", "appearance", "disabled", "disabled", "radius", "radius", "size", "size"] }], ngImport: i0 });
|
|
370
|
+
}
|
|
371
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCarouselPrevious, decorators: [{
|
|
372
|
+
type: Directive,
|
|
373
|
+
args: [{
|
|
374
|
+
selector: 'button[frCarouselPrevious]',
|
|
375
|
+
hostDirectives: [
|
|
376
|
+
{
|
|
377
|
+
directive: FrButton,
|
|
378
|
+
inputs: ['appearance', 'disabled', 'radius', 'size'],
|
|
379
|
+
},
|
|
380
|
+
],
|
|
381
|
+
host: {
|
|
382
|
+
class: 'frame-carousel__control frame-carousel__control--previous',
|
|
383
|
+
'[attr.type]': '"button"',
|
|
384
|
+
'[attr.aria-label]': 'label()',
|
|
385
|
+
'[attr.disabled]': 'carousel.canScrollPrev() ? null : ""',
|
|
386
|
+
'(click)': 'carousel.scrollPrev()',
|
|
387
|
+
},
|
|
388
|
+
}]
|
|
389
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
|
|
390
|
+
class FrCarouselNext {
|
|
391
|
+
carousel = inject(FR_CAROUSEL);
|
|
392
|
+
label = input('Next slide', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
393
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCarouselNext, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
394
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrCarouselNext, isStandalone: true, selector: "button[frCarouselNext]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "carousel.scrollNext()" }, properties: { "attr.type": "\"button\"", "attr.aria-label": "label()", "attr.disabled": "carousel.canScrollNext() ? null : \"\"" }, classAttribute: "frame-carousel__control frame-carousel__control--next" }, hostDirectives: [{ directive: i1.FrButton, inputs: ["appearance", "appearance", "disabled", "disabled", "radius", "radius", "size", "size"] }], ngImport: i0 });
|
|
395
|
+
}
|
|
396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCarouselNext, decorators: [{
|
|
397
|
+
type: Directive,
|
|
398
|
+
args: [{
|
|
399
|
+
selector: 'button[frCarouselNext]',
|
|
400
|
+
hostDirectives: [
|
|
401
|
+
{
|
|
402
|
+
directive: FrButton,
|
|
403
|
+
inputs: ['appearance', 'disabled', 'radius', 'size'],
|
|
404
|
+
},
|
|
405
|
+
],
|
|
406
|
+
host: {
|
|
407
|
+
class: 'frame-carousel__control frame-carousel__control--next',
|
|
408
|
+
'[attr.type]': '"button"',
|
|
409
|
+
'[attr.aria-label]': 'label()',
|
|
410
|
+
'[attr.disabled]': 'carousel.canScrollNext() ? null : ""',
|
|
411
|
+
'(click)': 'carousel.scrollNext()',
|
|
412
|
+
},
|
|
413
|
+
}]
|
|
414
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
|
|
415
|
+
|
|
416
|
+
class FrCarouselModule {
|
|
417
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCarouselModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
418
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.16", ngImport: i0, type: FrCarouselModule, imports: [FrCarousel,
|
|
419
|
+
FrCarouselContent,
|
|
420
|
+
FrCarouselItem,
|
|
421
|
+
FrCarouselNext,
|
|
422
|
+
FrCarouselPrevious], exports: [FrCarousel,
|
|
423
|
+
FrCarouselContent,
|
|
424
|
+
FrCarouselItem,
|
|
425
|
+
FrCarouselNext,
|
|
426
|
+
FrCarouselPrevious] });
|
|
427
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCarouselModule });
|
|
428
|
+
}
|
|
429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCarouselModule, decorators: [{
|
|
430
|
+
type: NgModule,
|
|
431
|
+
args: [{
|
|
432
|
+
imports: [
|
|
433
|
+
FrCarousel,
|
|
434
|
+
FrCarouselContent,
|
|
435
|
+
FrCarouselItem,
|
|
436
|
+
FrCarouselNext,
|
|
437
|
+
FrCarouselPrevious,
|
|
438
|
+
],
|
|
439
|
+
exports: [
|
|
440
|
+
FrCarousel,
|
|
441
|
+
FrCarouselContent,
|
|
442
|
+
FrCarouselItem,
|
|
443
|
+
FrCarouselNext,
|
|
444
|
+
FrCarouselPrevious,
|
|
445
|
+
],
|
|
446
|
+
}]
|
|
447
|
+
}] });
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Generated bundle index. Do not edit.
|
|
451
|
+
*/
|
|
452
|
+
|
|
453
|
+
export { FR_CAROUSEL_ALIGNS, FR_CAROUSEL_DIRECTIONS, FR_CAROUSEL_ORIENTATIONS, FrCarousel, FrCarouselContent, FrCarouselItem, FrCarouselModule, FrCarouselNext, FrCarouselPrevious };
|
|
454
|
+
//# sourceMappingURL=frame-ui-ng-components-carousel.mjs.map
|