@raintonic/formaui 0.2.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/CHANGELOG.md +7 -0
- package/README.md +145 -0
- package/fesm2022/raintonic-formaui-cdk-drag-drop.mjs +806 -0
- package/fesm2022/raintonic-formaui-cdk-drag-drop.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-cdk-form-field.mjs +86 -0
- package/fesm2022/raintonic-formaui-cdk-form-field.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-cdk-overlay.mjs +1757 -0
- package/fesm2022/raintonic-formaui-cdk-overlay.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-cdk-virtual-scroll.mjs +287 -0
- package/fesm2022/raintonic-formaui-cdk-virtual-scroll.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-accordion.mjs +217 -0
- package/fesm2022/raintonic-formaui-components-accordion.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-alert.mjs +161 -0
- package/fesm2022/raintonic-formaui-components-alert.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-autocomplete.mjs +726 -0
- package/fesm2022/raintonic-formaui-components-autocomplete.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-avatar.mjs +92 -0
- package/fesm2022/raintonic-formaui-components-avatar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-badge.mjs +107 -0
- package/fesm2022/raintonic-formaui-components-badge.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-big-menu.mjs +68 -0
- package/fesm2022/raintonic-formaui-components-big-menu.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-breadcrumb.mjs +55 -0
- package/fesm2022/raintonic-formaui-components-breadcrumb.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-button-group.mjs +103 -0
- package/fesm2022/raintonic-formaui-components-button-group.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-button.mjs +241 -0
- package/fesm2022/raintonic-formaui-components-button.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-card.mjs +270 -0
- package/fesm2022/raintonic-formaui-components-card.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-checkbox.mjs +295 -0
- package/fesm2022/raintonic-formaui-components-checkbox.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-data-table.mjs +631 -0
- package/fesm2022/raintonic-formaui-components-data-table.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-date-picker.mjs +1331 -0
- package/fesm2022/raintonic-formaui-components-date-picker.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-divider.mjs +41 -0
- package/fesm2022/raintonic-formaui-components-divider.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-drawer.mjs +190 -0
- package/fesm2022/raintonic-formaui-components-drawer.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-dynamic-form.mjs +266 -0
- package/fesm2022/raintonic-formaui-components-dynamic-form.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-empty-state.mjs +33 -0
- package/fesm2022/raintonic-formaui-components-empty-state.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-file-upload.mjs +246 -0
- package/fesm2022/raintonic-formaui-components-file-upload.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-form-field.mjs +482 -0
- package/fesm2022/raintonic-formaui-components-form-field.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-icon.mjs +117 -0
- package/fesm2022/raintonic-formaui-components-icon.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-input.mjs +327 -0
- package/fesm2022/raintonic-formaui-components-input.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-list.mjs +149 -0
- package/fesm2022/raintonic-formaui-components-list.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-menu.mjs +896 -0
- package/fesm2022/raintonic-formaui-components-menu.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-number-input.mjs +345 -0
- package/fesm2022/raintonic-formaui-components-number-input.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-paginator.mjs +139 -0
- package/fesm2022/raintonic-formaui-components-paginator.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-password-input.mjs +306 -0
- package/fesm2022/raintonic-formaui-components-password-input.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-popover.mjs +451 -0
- package/fesm2022/raintonic-formaui-components-popover.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-progressbar.mjs +148 -0
- package/fesm2022/raintonic-formaui-components-progressbar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-radio.mjs +260 -0
- package/fesm2022/raintonic-formaui-components-radio.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-select.mjs +1011 -0
- package/fesm2022/raintonic-formaui-components-select.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-side-panel.mjs +150 -0
- package/fesm2022/raintonic-formaui-components-side-panel.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-sidebar.mjs +257 -0
- package/fesm2022/raintonic-formaui-components-sidebar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-skeleton.mjs +50 -0
- package/fesm2022/raintonic-formaui-components-skeleton.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-slider.mjs +347 -0
- package/fesm2022/raintonic-formaui-components-slider.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-spinner.mjs +63 -0
- package/fesm2022/raintonic-formaui-components-spinner.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-stepper.mjs +317 -0
- package/fesm2022/raintonic-formaui-components-stepper.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tab.mjs +197 -0
- package/fesm2022/raintonic-formaui-components-tab.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tag.mjs +78 -0
- package/fesm2022/raintonic-formaui-components-tag.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-time-picker.mjs +644 -0
- package/fesm2022/raintonic-formaui-components-time-picker.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-toggle.mjs +171 -0
- package/fesm2022/raintonic-formaui-components-toggle.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-toolbar.mjs +140 -0
- package/fesm2022/raintonic-formaui-components-toolbar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tooltip.mjs +555 -0
- package/fesm2022/raintonic-formaui-components-tooltip.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tree-select.mjs +314 -0
- package/fesm2022/raintonic-formaui-components-tree-select.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tree-table.mjs +103 -0
- package/fesm2022/raintonic-formaui-components-tree-table.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tree.mjs +430 -0
- package/fesm2022/raintonic-formaui-components-tree.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-core.mjs +62 -0
- package/fesm2022/raintonic-formaui-core.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-services-dialog.mjs +798 -0
- package/fesm2022/raintonic-formaui-services-dialog.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-services-notification.mjs +391 -0
- package/fesm2022/raintonic-formaui-services-notification.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-services-theme.mjs +248 -0
- package/fesm2022/raintonic-formaui-services-theme.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-test-utils.mjs +66 -0
- package/fesm2022/raintonic-formaui-test-utils.mjs.map +1 -0
- package/fesm2022/raintonic-formaui.mjs +15 -0
- package/fesm2022/raintonic-formaui.mjs.map +1 -0
- package/llms-full.txt +1627 -0
- package/llms.txt +60 -0
- package/package.json +251 -0
- package/styles/_fonts-entry.scss +3 -0
- package/styles/fonts/dm-mono-400-latin.woff2 +0 -0
- package/styles/fonts/inter-tight-latin-italic.woff2 +0 -0
- package/styles/fonts/inter-tight-latin.woff2 +0 -0
- package/styles/index.scss +127 -0
- package/styles/partials/_constants.scss +29 -0
- package/styles/partials/_fonts.scss +36 -0
- package/styles/partials/_grid.scss +171 -0
- package/styles/partials/_mixins.scss +145 -0
- package/styles/partials/_motion.scss +252 -0
- package/styles/partials/_theme.scss +275 -0
- package/styles/partials/_typography.scss +112 -0
- package/styles/partials/_utilities.scss +480 -0
- package/styles/partials/themes/_dark.scss +254 -0
- package/styles/partials/themes/_light.scss +254 -0
- package/types/raintonic-formaui-cdk-drag-drop.d.ts +196 -0
- package/types/raintonic-formaui-cdk-drag-drop.d.ts.map +1 -0
- package/types/raintonic-formaui-cdk-form-field.d.ts +62 -0
- package/types/raintonic-formaui-cdk-form-field.d.ts.map +1 -0
- package/types/raintonic-formaui-cdk-overlay.d.ts +843 -0
- package/types/raintonic-formaui-cdk-overlay.d.ts.map +1 -0
- package/types/raintonic-formaui-cdk-virtual-scroll.d.ts +112 -0
- package/types/raintonic-formaui-cdk-virtual-scroll.d.ts.map +1 -0
- package/types/raintonic-formaui-components-accordion.d.ts +124 -0
- package/types/raintonic-formaui-components-accordion.d.ts.map +1 -0
- package/types/raintonic-formaui-components-alert.d.ts +143 -0
- package/types/raintonic-formaui-components-alert.d.ts.map +1 -0
- package/types/raintonic-formaui-components-autocomplete.d.ts +193 -0
- package/types/raintonic-formaui-components-autocomplete.d.ts.map +1 -0
- package/types/raintonic-formaui-components-avatar.d.ts +52 -0
- package/types/raintonic-formaui-components-avatar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-badge.d.ts +47 -0
- package/types/raintonic-formaui-components-badge.d.ts.map +1 -0
- package/types/raintonic-formaui-components-big-menu.d.ts +62 -0
- package/types/raintonic-formaui-components-big-menu.d.ts.map +1 -0
- package/types/raintonic-formaui-components-breadcrumb.d.ts +26 -0
- package/types/raintonic-formaui-components-breadcrumb.d.ts.map +1 -0
- package/types/raintonic-formaui-components-button-group.d.ts +61 -0
- package/types/raintonic-formaui-components-button-group.d.ts.map +1 -0
- package/types/raintonic-formaui-components-button.d.ts +116 -0
- package/types/raintonic-formaui-components-button.d.ts.map +1 -0
- package/types/raintonic-formaui-components-card.d.ts +191 -0
- package/types/raintonic-formaui-components-card.d.ts.map +1 -0
- package/types/raintonic-formaui-components-checkbox.d.ts +132 -0
- package/types/raintonic-formaui-components-checkbox.d.ts.map +1 -0
- package/types/raintonic-formaui-components-data-table.d.ts +368 -0
- package/types/raintonic-formaui-components-data-table.d.ts.map +1 -0
- package/types/raintonic-formaui-components-date-picker.d.ts +341 -0
- package/types/raintonic-formaui-components-date-picker.d.ts.map +1 -0
- package/types/raintonic-formaui-components-divider.d.ts +21 -0
- package/types/raintonic-formaui-components-divider.d.ts.map +1 -0
- package/types/raintonic-formaui-components-drawer.d.ts +48 -0
- package/types/raintonic-formaui-components-drawer.d.ts.map +1 -0
- package/types/raintonic-formaui-components-dynamic-form.d.ts +412 -0
- package/types/raintonic-formaui-components-dynamic-form.d.ts.map +1 -0
- package/types/raintonic-formaui-components-empty-state.d.ts +14 -0
- package/types/raintonic-formaui-components-empty-state.d.ts.map +1 -0
- package/types/raintonic-formaui-components-file-upload.d.ts +77 -0
- package/types/raintonic-formaui-components-file-upload.d.ts.map +1 -0
- package/types/raintonic-formaui-components-form-field.d.ts +271 -0
- package/types/raintonic-formaui-components-form-field.d.ts.map +1 -0
- package/types/raintonic-formaui-components-icon.d.ts +61 -0
- package/types/raintonic-formaui-components-icon.d.ts.map +1 -0
- package/types/raintonic-formaui-components-input.d.ts +149 -0
- package/types/raintonic-formaui-components-input.d.ts.map +1 -0
- package/types/raintonic-formaui-components-list.d.ts +48 -0
- package/types/raintonic-formaui-components-list.d.ts.map +1 -0
- package/types/raintonic-formaui-components-menu.d.ts +403 -0
- package/types/raintonic-formaui-components-menu.d.ts.map +1 -0
- package/types/raintonic-formaui-components-number-input.d.ts +127 -0
- package/types/raintonic-formaui-components-number-input.d.ts.map +1 -0
- package/types/raintonic-formaui-components-paginator.d.ts +37 -0
- package/types/raintonic-formaui-components-paginator.d.ts.map +1 -0
- package/types/raintonic-formaui-components-password-input.d.ts +111 -0
- package/types/raintonic-formaui-components-password-input.d.ts.map +1 -0
- package/types/raintonic-formaui-components-popover.d.ts +131 -0
- package/types/raintonic-formaui-components-popover.d.ts.map +1 -0
- package/types/raintonic-formaui-components-progressbar.d.ts +111 -0
- package/types/raintonic-formaui-components-progressbar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-radio.d.ts +95 -0
- package/types/raintonic-formaui-components-radio.d.ts.map +1 -0
- package/types/raintonic-formaui-components-select.d.ts +307 -0
- package/types/raintonic-formaui-components-select.d.ts.map +1 -0
- package/types/raintonic-formaui-components-side-panel.d.ts +51 -0
- package/types/raintonic-formaui-components-side-panel.d.ts.map +1 -0
- package/types/raintonic-formaui-components-sidebar.d.ts +174 -0
- package/types/raintonic-formaui-components-sidebar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-skeleton.d.ts +20 -0
- package/types/raintonic-formaui-components-skeleton.d.ts.map +1 -0
- package/types/raintonic-formaui-components-slider.d.ts +108 -0
- package/types/raintonic-formaui-components-slider.d.ts.map +1 -0
- package/types/raintonic-formaui-components-spinner.d.ts +42 -0
- package/types/raintonic-formaui-components-spinner.d.ts.map +1 -0
- package/types/raintonic-formaui-components-stepper.d.ts +126 -0
- package/types/raintonic-formaui-components-stepper.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tab.d.ts +96 -0
- package/types/raintonic-formaui-components-tab.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tag.d.ts +34 -0
- package/types/raintonic-formaui-components-tag.d.ts.map +1 -0
- package/types/raintonic-formaui-components-time-picker.d.ts +172 -0
- package/types/raintonic-formaui-components-time-picker.d.ts.map +1 -0
- package/types/raintonic-formaui-components-toggle.d.ts +70 -0
- package/types/raintonic-formaui-components-toggle.d.ts.map +1 -0
- package/types/raintonic-formaui-components-toolbar.d.ts +128 -0
- package/types/raintonic-formaui-components-toolbar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tooltip.d.ts +268 -0
- package/types/raintonic-formaui-components-tooltip.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tree-select.d.ts +80 -0
- package/types/raintonic-formaui-components-tree-select.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tree-table.d.ts +90 -0
- package/types/raintonic-formaui-components-tree-table.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tree.d.ts +104 -0
- package/types/raintonic-formaui-components-tree.d.ts.map +1 -0
- package/types/raintonic-formaui-core.d.ts +115 -0
- package/types/raintonic-formaui-core.d.ts.map +1 -0
- package/types/raintonic-formaui-services-dialog.d.ts +451 -0
- package/types/raintonic-formaui-services-dialog.d.ts.map +1 -0
- package/types/raintonic-formaui-services-notification.d.ts +221 -0
- package/types/raintonic-formaui-services-notification.d.ts.map +1 -0
- package/types/raintonic-formaui-services-theme.d.ts +126 -0
- package/types/raintonic-formaui-services-theme.d.ts.map +1 -0
- package/types/raintonic-formaui-test-utils.d.ts +24 -0
- package/types/raintonic-formaui-test-utils.d.ts.map +1 -0
- package/types/raintonic-formaui.d.ts +4 -0
- package/types/raintonic-formaui.d.ts.map +1 -0
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnDestroy, ElementRef, AfterViewInit } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Available menu positions relative to the trigger element
|
|
6
|
+
*/
|
|
7
|
+
type FuiMenuPosition = 'top-start' | 'top' | 'top-end' | 'bottom-start' | 'bottom' | 'bottom-end' | 'left-start' | 'left' | 'left-end' | 'right-start' | 'right' | 'right-end';
|
|
8
|
+
declare const RT_MENU_POSITIONS: readonly ["top-start", "top", "top-end", "bottom-start", "bottom", "bottom-end", "left-start", "left", "left-end", "right-start", "right", "right-end"];
|
|
9
|
+
/**
|
|
10
|
+
* Available menu sizes
|
|
11
|
+
*/
|
|
12
|
+
type FuiMenuSize = 'sm' | 'md' | 'lg';
|
|
13
|
+
declare const RT_MENU_SIZES: readonly ["sm", "md", "lg"];
|
|
14
|
+
/**
|
|
15
|
+
* # FuiMenu Component
|
|
16
|
+
*
|
|
17
|
+
* A dropdown menu component that provides a list of options or actions.
|
|
18
|
+
* Designed to work with external triggers using the fuiMenuTrigger directive.
|
|
19
|
+
*
|
|
20
|
+
* ## Features
|
|
21
|
+
* - Multiple positioning options relative to trigger
|
|
22
|
+
* - Keyboard navigation (Arrow keys, Enter, Escape)
|
|
23
|
+
* - Click outside to close
|
|
24
|
+
* - Full accessibility support (ARIA attributes, focus management)
|
|
25
|
+
* - Customizable size variants
|
|
26
|
+
* - Auto-positioning with collision detection
|
|
27
|
+
* - Portal attachment to document body to avoid clipping issues
|
|
28
|
+
*
|
|
29
|
+
* ## Usage
|
|
30
|
+
*
|
|
31
|
+
* ### Basic Menu with External Trigger
|
|
32
|
+
* ```html
|
|
33
|
+
* <button fuiButton fuiMenuTrigger [fuiMenuTriggerFor]="menu">
|
|
34
|
+
* Open Menu
|
|
35
|
+
* </button>
|
|
36
|
+
* <fui-menu #menu>
|
|
37
|
+
* <fui-menu-item>Option 1</fui-menu-item>
|
|
38
|
+
* <fui-menu-item>Option 2</fui-menu-item>
|
|
39
|
+
* </fui-menu>
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* ### Menu with Custom Position
|
|
43
|
+
* ```html
|
|
44
|
+
* <button fuiButton fuiMenuTrigger [fuiMenuTriggerFor]="menu">
|
|
45
|
+
* Open Menu
|
|
46
|
+
* </button>
|
|
47
|
+
* <fui-menu #menu position="top-start" size="lg">
|
|
48
|
+
* <fui-menu-item>Profile</fui-menu-item>
|
|
49
|
+
* <fui-menu-item variant="danger">Logout</fui-menu-item>
|
|
50
|
+
* </fui-menu>
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* ### Menu without Portal (for special cases)
|
|
54
|
+
* ```html
|
|
55
|
+
* <button fuiButton fuiMenuTrigger [fuiMenuTriggerFor]="menu">
|
|
56
|
+
* Open Menu
|
|
57
|
+
* </button>
|
|
58
|
+
* <fui-menu #menu [attachToBody]="false">
|
|
59
|
+
* <fui-menu-item>Option 1</fui-menu-item>
|
|
60
|
+
* <fui-menu-item>Option 2</fui-menu-item>
|
|
61
|
+
* </fui-menu>
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* ### Menu with Data Passed from Trigger
|
|
65
|
+
* ```html
|
|
66
|
+
* <button fuiButton fuiMenuTrigger
|
|
67
|
+
* [fuiMenuTriggerFor]="dynamicMenu"
|
|
68
|
+
* [menuTriggerData]="{ user: currentUser, items: menuItems }">
|
|
69
|
+
* Open Menu
|
|
70
|
+
* </button>
|
|
71
|
+
* <fui-menu #dynamicMenu>
|
|
72
|
+
* <!-- Access data in component using menu.menuData() -->
|
|
73
|
+
* </fui-menu>
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* ```typescript
|
|
77
|
+
* @Component({
|
|
78
|
+
* template: `
|
|
79
|
+
* <fui-menu #menu>
|
|
80
|
+
* <fui-menu-item *ngFor="let item of menu.menuData()?.items">
|
|
81
|
+
* {{ item.label }}
|
|
82
|
+
* </fui-menu-item>
|
|
83
|
+
* </fui-menu>
|
|
84
|
+
* `
|
|
85
|
+
* })
|
|
86
|
+
* export class MyComponent { }
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
declare class FuiMenuComponent implements OnDestroy {
|
|
90
|
+
/**
|
|
91
|
+
* Menu position relative to the trigger element
|
|
92
|
+
* @default 'bottom-start'
|
|
93
|
+
*/
|
|
94
|
+
readonly position: _angular_core.InputSignal<FuiMenuPosition>;
|
|
95
|
+
/**
|
|
96
|
+
* Menu size variant
|
|
97
|
+
* @default 'md'
|
|
98
|
+
*/
|
|
99
|
+
readonly size: _angular_core.InputSignal<FuiMenuSize>;
|
|
100
|
+
/**
|
|
101
|
+
* Whether the menu should close when clicking outside
|
|
102
|
+
* @default true
|
|
103
|
+
*/
|
|
104
|
+
readonly closeOnClickOutside: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
105
|
+
/**
|
|
106
|
+
* Whether the menu should close when pressing Escape
|
|
107
|
+
* @default true
|
|
108
|
+
*/
|
|
109
|
+
readonly closeOnEscape: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
110
|
+
/**
|
|
111
|
+
* Whether the menu is disabled
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
115
|
+
/**
|
|
116
|
+
* Whether to attach the menu panel to the document body to avoid clipping issues
|
|
117
|
+
* @default true
|
|
118
|
+
*/
|
|
119
|
+
readonly attachToBody: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
120
|
+
/**
|
|
121
|
+
* Emitted when the menu open state changes
|
|
122
|
+
*/
|
|
123
|
+
readonly openChange: _angular_core.OutputEmitterRef<boolean>;
|
|
124
|
+
/**
|
|
125
|
+
* Emitted when a menu item is selected
|
|
126
|
+
*/
|
|
127
|
+
readonly itemSelected: _angular_core.OutputEmitterRef<Event>;
|
|
128
|
+
protected readonly _isOpen: _angular_core.WritableSignal<boolean>;
|
|
129
|
+
protected readonly _animationState: _angular_core.WritableSignal<"void" | "enter" | "leave">;
|
|
130
|
+
private readonly _triggerElement;
|
|
131
|
+
private readonly _menuData;
|
|
132
|
+
private _previousFocusedElement;
|
|
133
|
+
private _overlayRef;
|
|
134
|
+
private _overlaySubscriptions;
|
|
135
|
+
private _closeAnimationTimeout;
|
|
136
|
+
readonly computedClasses: _angular_core.Signal<string>;
|
|
137
|
+
private readonly _elementRef;
|
|
138
|
+
private readonly _overlayService;
|
|
139
|
+
private readonly _document;
|
|
140
|
+
private readonly _ngZone;
|
|
141
|
+
private _outsideClickSub?;
|
|
142
|
+
menuPanel?: ElementRef<HTMLElement>;
|
|
143
|
+
private readonly _menuItems;
|
|
144
|
+
constructor();
|
|
145
|
+
/**
|
|
146
|
+
* Whether the menu is currently open
|
|
147
|
+
*/
|
|
148
|
+
isOpen(): boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Opens the menu
|
|
151
|
+
*/
|
|
152
|
+
open(): void;
|
|
153
|
+
/**
|
|
154
|
+
* Closes the menu
|
|
155
|
+
*/
|
|
156
|
+
close(): void;
|
|
157
|
+
/**
|
|
158
|
+
* Toggles the menu open/closed state
|
|
159
|
+
*/
|
|
160
|
+
toggle(): void;
|
|
161
|
+
/**
|
|
162
|
+
* Sets the trigger element for positioning (called by trigger directive)
|
|
163
|
+
*/
|
|
164
|
+
setTriggerElement(element: HTMLElement): void;
|
|
165
|
+
/**
|
|
166
|
+
* Gets the menu data passed from the trigger
|
|
167
|
+
* Returns a signal containing the data
|
|
168
|
+
*/
|
|
169
|
+
menuData(): unknown;
|
|
170
|
+
/**
|
|
171
|
+
* Sets the menu data (called by trigger directive)
|
|
172
|
+
* @param data The data to pass to the menu
|
|
173
|
+
*/
|
|
174
|
+
setMenuData(data: unknown): void;
|
|
175
|
+
private _listenForOutsideClicks;
|
|
176
|
+
onDocumentKeydown(event: KeyboardEvent): void;
|
|
177
|
+
onMenuClick(event: Event): void;
|
|
178
|
+
ngOnDestroy(): void;
|
|
179
|
+
private _openMenu;
|
|
180
|
+
private _closeMenu;
|
|
181
|
+
private _createOverlay;
|
|
182
|
+
private _getPositionsForMenuPosition;
|
|
183
|
+
private _restoreFocus;
|
|
184
|
+
private _getMenuItems;
|
|
185
|
+
/** @internal Called by FuiMenuTriggerDirective */
|
|
186
|
+
_focusFirstItem(): void;
|
|
187
|
+
/** @internal Called by FuiMenuTriggerDirective */
|
|
188
|
+
_focusLastItem(): void;
|
|
189
|
+
private _focusNextItem;
|
|
190
|
+
private _focusPreviousItem;
|
|
191
|
+
/**
|
|
192
|
+
* Focuses a menu item and updates roving tabindex across all items.
|
|
193
|
+
*/
|
|
194
|
+
private _focusItem;
|
|
195
|
+
/**
|
|
196
|
+
* Resets all items to tabindex="-1" when the menu closes.
|
|
197
|
+
*/
|
|
198
|
+
private _resetRovingTabindex;
|
|
199
|
+
/**
|
|
200
|
+
* Updates roving tabindex: sets tabindex="0" on the target item
|
|
201
|
+
* and tabindex="-1" on all other items.
|
|
202
|
+
*/
|
|
203
|
+
private _updateRovingTabindex;
|
|
204
|
+
private _disposeOverlay;
|
|
205
|
+
private _startCloseAnimation;
|
|
206
|
+
private _clearCloseTimeout;
|
|
207
|
+
/**
|
|
208
|
+
* Checks if this menu's overlay is the topmost (most recently opened) overlay.
|
|
209
|
+
* This ensures that only the topmost menu responds to keyboard events when
|
|
210
|
+
* multiple menus are open (e.g., nested menus).
|
|
211
|
+
*/
|
|
212
|
+
private _isTopmostOverlay;
|
|
213
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FuiMenuComponent, never>;
|
|
214
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FuiMenuComponent, "fui-menu", never, { "position": { "alias": "position"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "closeOnClickOutside": { "alias": "closeOnClickOutside"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "attachToBody": { "alias": "attachToBody"; "required": false; "isSignal": true; }; }, { "openChange": "openChange"; "itemSelected": "itemSelected"; }, ["_menuItems"], ["*"], true, never>;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Available menu item variants
|
|
219
|
+
*/
|
|
220
|
+
type MenuItemVariant = 'default' | 'danger';
|
|
221
|
+
declare const MENU_ITEM_VARIANTS: readonly ["default", "danger"];
|
|
222
|
+
/**
|
|
223
|
+
* # FuiMenuItem Component
|
|
224
|
+
*
|
|
225
|
+
* A menu item component designed to be used within fui-menu.
|
|
226
|
+
* Provides consistent styling and behavior for menu options.
|
|
227
|
+
*
|
|
228
|
+
* ## Features
|
|
229
|
+
* - Default and danger variants
|
|
230
|
+
* - Full accessibility support (ARIA attributes, keyboard navigation)
|
|
231
|
+
* - Icon support with proper spacing
|
|
232
|
+
* - Disabled state support
|
|
233
|
+
* - Hover and focus states
|
|
234
|
+
* - Keyboard activation (Enter and Space)
|
|
235
|
+
*
|
|
236
|
+
* ## Usage
|
|
237
|
+
*
|
|
238
|
+
* ### Basic Menu Item
|
|
239
|
+
* ```html
|
|
240
|
+
* <fui-menu-item>Profile</fui-menu-item>
|
|
241
|
+
* ```
|
|
242
|
+
*
|
|
243
|
+
* ### Menu Item with Icon
|
|
244
|
+
* ```html
|
|
245
|
+
* <fui-menu-item>
|
|
246
|
+
* <fui-icon name="user" fuiPrefix></fui-icon>
|
|
247
|
+
* Profile
|
|
248
|
+
* </fui-menu-item>
|
|
249
|
+
* ```
|
|
250
|
+
*
|
|
251
|
+
* ### Danger Menu Item
|
|
252
|
+
* ```html
|
|
253
|
+
* <fui-menu-item variant="danger">
|
|
254
|
+
* <fui-icon name="trash" fuiPrefix></fui-icon>
|
|
255
|
+
* Delete Account
|
|
256
|
+
* </fui-menu-item>
|
|
257
|
+
* ```
|
|
258
|
+
*
|
|
259
|
+
* ### Disabled Menu Item
|
|
260
|
+
* ```html
|
|
261
|
+
* <fui-menu-item [disabled]="true">
|
|
262
|
+
* Unavailable Option
|
|
263
|
+
* </fui-menu-item>
|
|
264
|
+
* ```
|
|
265
|
+
*
|
|
266
|
+
* @example
|
|
267
|
+
* ```typescript
|
|
268
|
+
* import { FuiMenuItemComponent } from '@raintonic/formaui/components/menu';
|
|
269
|
+
*
|
|
270
|
+
* @Component({
|
|
271
|
+
* standalone: true,
|
|
272
|
+
* imports: [FuiMenuItemComponent],
|
|
273
|
+
* templateUrl: './my-component.component.html',
|
|
274
|
+
* styleUrl: './my-component.component.scss'
|
|
275
|
+
* })
|
|
276
|
+
* export class MyComponent {
|
|
277
|
+
* onItemClick(event: Event) {
|
|
278
|
+
* console.log('Menu item clicked:', event);
|
|
279
|
+
* }
|
|
280
|
+
* }
|
|
281
|
+
* ```
|
|
282
|
+
*/
|
|
283
|
+
declare class FuiMenuItemComponent {
|
|
284
|
+
/**
|
|
285
|
+
* Menu item variant that determines the visual style
|
|
286
|
+
* @default 'default'
|
|
287
|
+
*/
|
|
288
|
+
readonly variant: _angular_core.InputSignalWithTransform<MenuItemVariant, string>;
|
|
289
|
+
/**
|
|
290
|
+
* Whether the menu item is disabled
|
|
291
|
+
* @default false
|
|
292
|
+
*/
|
|
293
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
294
|
+
/**
|
|
295
|
+
* Emitted when the menu item is clicked or activated
|
|
296
|
+
*/
|
|
297
|
+
readonly selected: _angular_core.OutputEmitterRef<Event>;
|
|
298
|
+
/**
|
|
299
|
+
* Internal tabindex for roving tabindex pattern.
|
|
300
|
+
* Managed by the parent FuiMenuComponent.
|
|
301
|
+
* @internal
|
|
302
|
+
*/
|
|
303
|
+
readonly tabIndex: _angular_core.WritableSignal<string>;
|
|
304
|
+
readonly computedClasses: _angular_core.Signal<string>;
|
|
305
|
+
/** @internal */ readonly _elementRef: ElementRef<HTMLElement>;
|
|
306
|
+
private readonly _renderer;
|
|
307
|
+
onClick(event: Event): void;
|
|
308
|
+
onKeydown(event: KeyboardEvent): void;
|
|
309
|
+
/**
|
|
310
|
+
* Focuses the menu item
|
|
311
|
+
*/
|
|
312
|
+
focus(): void;
|
|
313
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FuiMenuItemComponent, never>;
|
|
314
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FuiMenuItemComponent, "fui-menu-item", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "selected": "selected"; }, never, ["*"], true, never>;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* # fuiMenuTrigger Directive
|
|
319
|
+
*
|
|
320
|
+
* A directive that marks an element as a menu trigger, similar to Angular Material's matMenuTriggerFor.
|
|
321
|
+
* This directive should be used in conjunction with FuiMenuComponent.
|
|
322
|
+
*
|
|
323
|
+
* ## Usage
|
|
324
|
+
*
|
|
325
|
+
* ### Basic Usage
|
|
326
|
+
* ```html
|
|
327
|
+
* <button fuiMenuTrigger [menuTriggerFor]="menu">Open Menu</button>
|
|
328
|
+
* <fui-menu #menu>
|
|
329
|
+
* <fui-menu-item>Option 1</fui-menu-item>
|
|
330
|
+
* <fui-menu-item>Option 2</fui-menu-item>
|
|
331
|
+
* </fui-menu>
|
|
332
|
+
* ```
|
|
333
|
+
*
|
|
334
|
+
* ### With Menu Reference
|
|
335
|
+
* ```html
|
|
336
|
+
* <button fuiMenuTrigger [menuTriggerFor]="userMenu">
|
|
337
|
+
* <fui-icon name="user"></fui-icon>
|
|
338
|
+
* User Menu
|
|
339
|
+
* </button>
|
|
340
|
+
*
|
|
341
|
+
* <fui-menu #userMenu position="bottom-end">
|
|
342
|
+
* <fui-menu-item>Profile</fui-menu-item>
|
|
343
|
+
* <fui-menu-item>Settings</fui-menu-item>
|
|
344
|
+
* <fui-menu-item variant="danger">Logout</fui-menu-item>
|
|
345
|
+
* </fui-menu>
|
|
346
|
+
* ```
|
|
347
|
+
*
|
|
348
|
+
* ### Passing Data to Menu
|
|
349
|
+
* ```html
|
|
350
|
+
* <button fuiMenuTrigger
|
|
351
|
+
* [menuTriggerFor]="dynamicMenu"
|
|
352
|
+
* [menuTriggerData]="{ user: currentUser, role: 'admin' }">
|
|
353
|
+
* Open Menu
|
|
354
|
+
* </button>
|
|
355
|
+
*
|
|
356
|
+
* <fui-menu #dynamicMenu>
|
|
357
|
+
* <!-- Access menu data in your component via menu.menuData() -->
|
|
358
|
+
* </fui-menu>
|
|
359
|
+
* ```
|
|
360
|
+
*
|
|
361
|
+
* @example
|
|
362
|
+
* ```typescript
|
|
363
|
+
* import { FuiMenuTriggerDirective, FuiMenuComponent, FuiMenuItemComponent } from '@raintonic/formaui/components/menu';
|
|
364
|
+
*
|
|
365
|
+
* @Component({
|
|
366
|
+
* standalone: true,
|
|
367
|
+
* imports: [FuiMenuTriggerDirective, FuiMenuComponent, FuiMenuItemComponent],
|
|
368
|
+
* template: `
|
|
369
|
+
* <button fuiMenuTrigger [menuTriggerFor]="menu">Open Menu</button>
|
|
370
|
+
* <fui-menu #menu>
|
|
371
|
+
* <fui-menu-item>Option 1</fui-menu-item>
|
|
372
|
+
* <fui-menu-item>Option 2</fui-menu-item>
|
|
373
|
+
* </fui-menu>
|
|
374
|
+
* `
|
|
375
|
+
* })
|
|
376
|
+
* export class MyComponent { }
|
|
377
|
+
* ```
|
|
378
|
+
*/
|
|
379
|
+
declare class FuiMenuTriggerDirective implements AfterViewInit {
|
|
380
|
+
private readonly _elementRef;
|
|
381
|
+
/** The menu instance that this trigger should open */
|
|
382
|
+
readonly menuTriggerFor: _angular_core.InputSignal<FuiMenuComponent | null | undefined>;
|
|
383
|
+
/**
|
|
384
|
+
* Data to be passed to the menu.
|
|
385
|
+
* Can be accessed in the menu component or menu items.
|
|
386
|
+
* Similar to Angular Material's matMenuTriggerData.
|
|
387
|
+
*/
|
|
388
|
+
readonly menuTriggerData: _angular_core.InputSignal<unknown>;
|
|
389
|
+
/** The menu instance that this trigger is associated with */
|
|
390
|
+
menu: FuiMenuComponent | null;
|
|
391
|
+
constructor();
|
|
392
|
+
ngAfterViewInit(): void;
|
|
393
|
+
onClick(event: Event): void;
|
|
394
|
+
onKeydown(event: KeyboardEvent): void;
|
|
395
|
+
/** Gets the trigger element */
|
|
396
|
+
getElement(): HTMLElement;
|
|
397
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FuiMenuTriggerDirective, never>;
|
|
398
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FuiMenuTriggerDirective, "[fuiMenuTrigger]", never, { "menuTriggerFor": { "alias": "menuTriggerFor"; "required": false; "isSignal": true; }; "menuTriggerData": { "alias": "menuTriggerData"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export { FuiMenuComponent, FuiMenuItemComponent, FuiMenuTriggerDirective, MENU_ITEM_VARIANTS, RT_MENU_POSITIONS, RT_MENU_SIZES };
|
|
402
|
+
export type { FuiMenuPosition, FuiMenuSize, MenuItemVariant };
|
|
403
|
+
//# sourceMappingURL=raintonic-formaui-components-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raintonic-formaui-components-menu.d.ts","sources":["../../../lib/components/menu/menu.component.ts","../../../lib/components/menu/menu-item.component.ts","../../../lib/components/menu/menu-trigger.directive.ts"],"mappings":";;;AAuBA;;AAEG;AACG,KAAM,eAAe;AAc3B,cAAa,iBAAiB;AAe9B;;AAEG;AACG,KAAM,WAAW;AAEvB,cAAa,aAAa;AAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EG;AACH,cAWa,gBAAiB,YAAW,SAAS;AAChD;;;AAGG;uBACc,aAAA,CAAA,WAAA,CAAA,eAAA;AAEjB;;;AAGG;mBACU,aAAA,CAAA,WAAA,CAAA,WAAA;AAEb;;;AAGG;kCACyB,aAAA,CAAA,wBAAA;AAE5B;;;AAGG;4BACmB,aAAA,CAAA,wBAAA;AAEtB;;;AAGG;uBACc,aAAA,CAAA,wBAAA;AAEjB;;;AAGG;2BACkB,aAAA,CAAA,wBAAA;AAErB;;AAEG;yBACgB,aAAA,CAAA,gBAAA;AAEnB;;AAEG;2BACkB,aAAA,CAAA,gBAAA,CAAA,KAAA;AAGrB,gCAA0B,aAAA,CAAA,cAAA;AAC1B,wCAAkC,aAAA,CAAA,cAAA;AAClC;AACA;;;;;8BAOwB,aAAA,CAAA,MAAA;AAWxB;AACA;AACA;AACA;;AAI2C,gBAAY,UAAU,CAAC,WAAW;AAG7E;;AAqBA;;AAEG;AACH;AAIA;;AAEG;AACH;AAKA;;AAEG;AACH;AAIA;;AAEG;AACH;AAQA;;AAEG;AACH,+BAA2B,WAAW;AAItC;;;AAGG;AACH;AAIA;;;AAGG;AACH;AAKA;AA2BA,6BAAyB,aAAa;AAgCtC,uBAAmB,KAAK;AAYxB;AAOA;AAcA;AAcA;AA8DA;AAqEA;AAWA;;AAQA;;AAQA;AAOA;AAWA;AAWA;;AAEG;AACH;AAKA;;AAEG;AACH;AAOA;;;AAGG;AACH;AAWA;AAQA;AAcA;AAOA;;;;AAIG;AACH;oDArgBW,gBAAgB;sDAAhB,gBAAgB;AAihB5B;;ACxpBD;;AAEG;KACS,eAAe;AAE3B,cAAa,kBAAkB;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DG;AACH,cAaa,oBAAoB;AAC/B;;;AAGG;sBACa,aAAA,CAAA,wBAAA,CAAA,eAAA;AAIhB;;;AAGG;uBACc,aAAA,CAAA,wBAAA;AAEjB;;AAEG;uBACc,aAAA,CAAA,gBAAA,CAAA,KAAA;AAEjB;;;;AAIG;uBACc,aAAA,CAAA,cAAA;8BAGO,aAAA,CAAA,MAAA;2CAUe,UAAU,CAAC,WAAW;AAC7D;AAGA,mBAAe,KAAK;AAWpB,qBAAiB,aAAa;AAgB9B;;AAEG;AACH;oDAxEW,oBAAoB;sDAApB,oBAAoB;AA2EhC;;ACtKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DG;AACH,cAQa,uBAAwB,YAAW,aAAa;AAC3D;;6BAGuB,aAAA,CAAA,WAAA,CAAA,gBAAA;AAEvB;;;;AAIG;8BACqB,aAAA,CAAA,WAAA;;AAGxB,UAAM,gBAAgB;;AActB;AAWA,mBAAe,KAAK;AAkBpB,qBAAiB,aAAa;;AA6C9B,kBAAc,WAAW;oDAtGd,uBAAuB;sDAAvB,uBAAuB;AAyGnC;;;;","names":[]}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { DoCheck, OnDestroy, Signal, ElementRef } from '@angular/core';
|
|
3
|
+
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
import { FuiFormFieldControl, ErrorStateMatcher } from '@raintonic/formaui/core';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Layout for increment/decrement buttons.
|
|
9
|
+
* - `horizontal`: buttons on left (decrement) and right (increment) of input
|
|
10
|
+
* - `vertical`: stacked buttons on the right side of input
|
|
11
|
+
*/
|
|
12
|
+
type NumberInputButtonLayout = 'horizontal' | 'vertical';
|
|
13
|
+
/**
|
|
14
|
+
* Change event emitted by fui-number-input
|
|
15
|
+
*/
|
|
16
|
+
interface NumberInputChange {
|
|
17
|
+
/** The source component */
|
|
18
|
+
source: unknown;
|
|
19
|
+
/** The new numeric value (null when cleared) */
|
|
20
|
+
value: number | null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* # NumberInput Component
|
|
25
|
+
*
|
|
26
|
+
* A numeric input component with increment/decrement buttons,
|
|
27
|
+
* full Angular Reactive Forms support, and FormField integration.
|
|
28
|
+
*
|
|
29
|
+
* ## Features
|
|
30
|
+
* - Full Reactive Forms integration (ControlValueAccessor)
|
|
31
|
+
* - FuiFormFieldControl integration for fui-form-field
|
|
32
|
+
* - Increment/decrement buttons (horizontal or vertical layout)
|
|
33
|
+
* - Min/max clamping and step support
|
|
34
|
+
* - Configurable decimal precision
|
|
35
|
+
* - Keyboard support (ArrowUp/ArrowDown)
|
|
36
|
+
* - Error state handling
|
|
37
|
+
* - Accessibility (ARIA spinbutton role)
|
|
38
|
+
*
|
|
39
|
+
* ## Usage
|
|
40
|
+
*
|
|
41
|
+
* ### Basic
|
|
42
|
+
* ```html
|
|
43
|
+
* <fui-form-field>
|
|
44
|
+
* <fui-label>Quantity</fui-label>
|
|
45
|
+
* <fui-number-input formControlName="quantity" [min]="0" [max]="100" [step]="1"></fui-number-input>
|
|
46
|
+
* </fui-form-field>
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* ### With vertical buttons
|
|
50
|
+
* ```html
|
|
51
|
+
* <fui-form-field>
|
|
52
|
+
* <fui-label>Price</fui-label>
|
|
53
|
+
* <fui-number-input formControlName="price" [step]="0.01" [precision]="2" buttonLayout="vertical"></fui-number-input>
|
|
54
|
+
* </fui-form-field>
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
declare class FuiNumberInputComponent implements ControlValueAccessor, FuiFormFieldControl<number>, DoCheck, OnDestroy {
|
|
58
|
+
static nextId: number;
|
|
59
|
+
readonly controlType = "fui-number-input";
|
|
60
|
+
readonly min: _angular_core.InputSignal<number | null>;
|
|
61
|
+
readonly max: _angular_core.InputSignal<number | null>;
|
|
62
|
+
readonly step: _angular_core.InputSignal<number>;
|
|
63
|
+
readonly precision: _angular_core.InputSignal<number | null>;
|
|
64
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
65
|
+
readonly disabledInput: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
66
|
+
readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
67
|
+
readonly showButtons: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
68
|
+
readonly buttonLayout: _angular_core.InputSignal<NumberInputButtonLayout>;
|
|
69
|
+
readonly errorStateMatcher: _angular_core.InputSignal<ErrorStateMatcher | null>;
|
|
70
|
+
readonly valueChange: _angular_core.OutputEmitterRef<number | null>;
|
|
71
|
+
private readonly _value;
|
|
72
|
+
private readonly _focused;
|
|
73
|
+
private readonly _disabled;
|
|
74
|
+
private readonly _ngControlDisabled;
|
|
75
|
+
private readonly _errorState;
|
|
76
|
+
private readonly _required;
|
|
77
|
+
readonly value: Signal<number | null>;
|
|
78
|
+
readonly focused: Signal<boolean>;
|
|
79
|
+
readonly errorState: Signal<boolean>;
|
|
80
|
+
readonly required: Signal<boolean>;
|
|
81
|
+
readonly disabled: Signal<boolean>;
|
|
82
|
+
readonly empty: Signal<boolean>;
|
|
83
|
+
readonly _isAtMin: Signal<boolean>;
|
|
84
|
+
readonly _isAtMax: Signal<boolean>;
|
|
85
|
+
readonly stateChanges: Subject<void>;
|
|
86
|
+
private _uid;
|
|
87
|
+
readonly id: string;
|
|
88
|
+
_ariaDescribedby: string | null;
|
|
89
|
+
private _parentForm;
|
|
90
|
+
private _parentFormGroup;
|
|
91
|
+
private _defaultErrorStateMatcher;
|
|
92
|
+
private readonly _ngControlRef;
|
|
93
|
+
get ngControl(): NgControl | null;
|
|
94
|
+
readonly inputElement: Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
95
|
+
private _onChange;
|
|
96
|
+
private _onTouched;
|
|
97
|
+
constructor();
|
|
98
|
+
ngDoCheck(): void;
|
|
99
|
+
ngOnDestroy(): void;
|
|
100
|
+
writeValue(value: number | null): void;
|
|
101
|
+
registerOnChange(fn: (value: number | null) => void): void;
|
|
102
|
+
registerOnTouched(fn: () => void): void;
|
|
103
|
+
setDisabledState(isDisabled: boolean): void;
|
|
104
|
+
onContainerClick(_event: MouseEvent): void;
|
|
105
|
+
setDescribedByIds(ids: string[]): void;
|
|
106
|
+
setReadOnly?(_readOnly: boolean): void;
|
|
107
|
+
focus(): void;
|
|
108
|
+
increment(): void;
|
|
109
|
+
decrement(): void;
|
|
110
|
+
onInput(event: Event): void;
|
|
111
|
+
onKeydown(event: KeyboardEvent): void;
|
|
112
|
+
onFocus(): void;
|
|
113
|
+
onBlur(): void;
|
|
114
|
+
private _setValue;
|
|
115
|
+
private _syncInputElement;
|
|
116
|
+
private _formatValue;
|
|
117
|
+
private _getEffectivePrecision;
|
|
118
|
+
_clamp(val: number): number;
|
|
119
|
+
_roundToPrecision(val: number): number;
|
|
120
|
+
_parseInputValue(raw: string): number | null;
|
|
121
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FuiNumberInputComponent, never>;
|
|
122
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FuiNumberInputComponent, "fui-number-input", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "precision": { "alias": "precision"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "showButtons": { "alias": "showButtons"; "required": false; "isSignal": true; }; "buttonLayout": { "alias": "buttonLayout"; "required": false; "isSignal": true; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export { FuiNumberInputComponent };
|
|
126
|
+
export type { NumberInputButtonLayout, NumberInputChange };
|
|
127
|
+
//# sourceMappingURL=raintonic-formaui-components-number-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raintonic-formaui-components-number-input.d.ts","sources":["../../../lib/components/number-input/number-input.types.ts","../../../lib/components/number-input/number-input.component.ts"],"mappings":";;;;;;AAAA;;;;AAIG;KACS,uBAAuB;AAEnC;;AAEG;UACc,iBAAiB;;;;AAIhC;AACD;;ACYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;AACH,cA+Ba,uBAAwB,YAAW,oBAAoB,EAAE,mBAAmB,UAAU,OAAO,EAAE,SAAS;;;kBAMvG,aAAA,CAAA,WAAA;kBACA,aAAA,CAAA,WAAA;mBACC,aAAA,CAAA,WAAA;wBACK,aAAA,CAAA,WAAA;0BACE,aAAA,CAAA,WAAA;4BACE,aAAA,CAAA,wBAAA;uBAIL,aAAA,CAAA,wBAAA;0BAGG,aAAA,CAAA,wBAAA;2BAGC,aAAA,CAAA,WAAA,CAAA,uBAAA;gCACK,aAAA,CAAA,WAAA,CAAA,iBAAA;0BAGN,aAAA,CAAA,gBAAA;AAGpB;AACA;AACA;AACA;AACA;AACA;oBAGgB,MAAM;AACtB,sBAAkB,MAAM;AACxB,yBAAqB,MAAM;AAC3B,uBAAmB,MAAM;AACzB,uBAAmB,MAAM;oBAKX,MAAA;uBAEG,MAAA;uBAOA,MAAA;2BAQI,OAAA;;;AAGrB;;;;AAMA;AACA,qBAAiB,SAAS;2BAKL,MAAA,CAAA,UAAA,CAAA,gBAAA;;;;AAwCrB;AAgBA;AAKA;AAOA;AAIA;AAIA;AAMA,6BAAyB,UAAU;AAMnC;AAIA;AAKA;AAIA;AAOA;AAQA,mBAAe,KAAK;AAUpB,qBAAiB,aAAa;AAU9B;AAOA;AAsBA;AAQA;AAOA;AAQA;AAWA;AASA;AAOA;oDApSW,uBAAuB;sDAAvB,uBAAuB;AA4SnC;;;;","names":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* # Paginator Component
|
|
5
|
+
*
|
|
6
|
+
* A pagination component that handles navigation through pages with:
|
|
7
|
+
* - Previous/Next navigation buttons (disabled at boundaries)
|
|
8
|
+
* - Page number buttons (at least 4 visible)
|
|
9
|
+
* - Ellipsis (...) for remaining pages when there are more than 4 pages
|
|
10
|
+
* - Emits page selection via output signal
|
|
11
|
+
* - Keyboard support for accessibility
|
|
12
|
+
*/
|
|
13
|
+
declare class FuiPaginatorComponent {
|
|
14
|
+
readonly numberOfItems: _angular_core.InputSignal<number>;
|
|
15
|
+
readonly pageSize: _angular_core.InputSignal<number>;
|
|
16
|
+
readonly currentPage: _angular_core.InputSignal<number>;
|
|
17
|
+
private readonly _currentPage;
|
|
18
|
+
readonly pageSelected: _angular_core.OutputEmitterRef<number>;
|
|
19
|
+
private _pageAnnouncer?;
|
|
20
|
+
readonly totalPages: _angular_core.Signal<number>;
|
|
21
|
+
readonly isFirstPage: _angular_core.Signal<boolean>;
|
|
22
|
+
readonly isLastPage: _angular_core.Signal<boolean>;
|
|
23
|
+
readonly pageNumbers: _angular_core.Signal<(string | number)[]>;
|
|
24
|
+
constructor();
|
|
25
|
+
onPageClick(page: number | string): void;
|
|
26
|
+
onPreviousClick(): void;
|
|
27
|
+
onNextClick(): void;
|
|
28
|
+
private _announce;
|
|
29
|
+
getCurrentPage(): number;
|
|
30
|
+
isPageActive(page: number | string): boolean;
|
|
31
|
+
isPageClickable(page: number | string): boolean;
|
|
32
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FuiPaginatorComponent, never>;
|
|
33
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FuiPaginatorComponent, "fui-paginator", never, { "numberOfItems": { "alias": "numberOfItems"; "required": true; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": true; "isSignal": true; }; "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; }, { "pageSelected": "pageSelected"; }, never, never, true, never>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { FuiPaginatorComponent };
|
|
37
|
+
//# sourceMappingURL=raintonic-formaui-components-paginator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raintonic-formaui-components-paginator.d.ts","sources":["../../../lib/components/paginator/paginator.component.ts"],"mappings":";;AAKA;;;;;;;;;AASG;AACH,cAUa,qBAAqB;4BAEV,aAAA,CAAA,WAAA;uBACL,aAAA,CAAA,WAAA;0BACG,aAAA,CAAA,WAAA;AAGpB;2BAGqB,aAAA,CAAA,gBAAA;;yBAKF,aAAA,CAAA,MAAA;0BAOC,aAAA,CAAA,MAAA;yBACD,aAAA,CAAA,MAAA;0BAEC,aAAA,CAAA,MAAA;;AA8DpB;AAQA;AASA;AASA;AAMA;AAIA;AAIA;oDA/HW,qBAAqB;sDAArB,qBAAqB;AAkIjC;;;;","names":[]}
|