@nanahoshi/mona-ui 0.4.0 → 0.6.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/collapsible/package.json +4 -0
- package/fesm2022/nanahoshi-mona-ui-button.mjs +1 -2
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +304 -0
- package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +20 -9
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-D-JCCvYJ.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-7zwgl7u1.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs → nanahoshi-mona-ui-grid-grid-list.component-n3eQNIza.mjs} +5 -5
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-BhS7c7rW.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-C5FRZlvv.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-B4VB3xFw.mjs} +5 -5
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-A6Cq2a4Q.mjs} +11 -11
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +18 -16
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +49 -28
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +246 -0
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +2025 -0
- package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +96 -0
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +61 -25
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +49 -2
- package/package.json +17 -1
- package/sheet/package.json +4 -0
- package/sidebar/package.json +4 -0
- package/skeleton/package.json +4 -0
- package/types/nanahoshi-mona-ui-collapsible.d.ts +92 -0
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +11 -3
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +6 -4
- package/types/nanahoshi-mona-ui-popup.d.ts +16 -1
- package/types/nanahoshi-mona-ui-sheet.d.ts +62 -0
- package/types/nanahoshi-mona-ui-sidebar.d.ts +695 -0
- package/types/nanahoshi-mona-ui-skeleton.d.ts +51 -0
- package/types/nanahoshi-mona-ui-theme.d.ts +28 -2
|
@@ -134,6 +134,12 @@ interface PopupSettings<T = unknown, C = void> {
|
|
|
134
134
|
* @type {string | string[]}
|
|
135
135
|
*/
|
|
136
136
|
backdropClass?: string | string[];
|
|
137
|
+
/**
|
|
138
|
+
* Whether scrolling behind the popup should be blocked while it is open.
|
|
139
|
+
* Default: false.
|
|
140
|
+
* @type {boolean}
|
|
141
|
+
*/
|
|
142
|
+
blockScroll?: boolean;
|
|
137
143
|
/**
|
|
138
144
|
* The content to display in the popup.
|
|
139
145
|
* @type {TemplateRef | ComponentType}
|
|
@@ -461,6 +467,11 @@ declare class PopupService {
|
|
|
461
467
|
private resolveAnchor;
|
|
462
468
|
private restoreFocusToAnchor;
|
|
463
469
|
private setupBackdropCloseSubscription;
|
|
470
|
+
/**
|
|
471
|
+
* Starts the backdrop fade-out as soon as the close begins, so it runs alongside the popup's leave
|
|
472
|
+
* animation. Without it the backdrop stays fully opaque until `dispose()` removes it in one frame.
|
|
473
|
+
*/
|
|
474
|
+
private setupBackdropFadeOut;
|
|
464
475
|
private setupCleanupSubscription;
|
|
465
476
|
private setupCloseSubscriptions;
|
|
466
477
|
private setupEscapeKeyListener;
|
|
@@ -478,8 +489,12 @@ declare class PopupService {
|
|
|
478
489
|
declare const defaultPopupAnimation: Required<PopupAnimationSettings>;
|
|
479
490
|
declare const dropdownPopupAnimation: Required<PopupAnimationSettings>;
|
|
480
491
|
declare const fadePopupAnimation: Required<PopupAnimationSettings>;
|
|
492
|
+
declare const slideFromRightPopupAnimation: Required<PopupAnimationSettings>;
|
|
493
|
+
declare const slideFromLeftPopupAnimation: Required<PopupAnimationSettings>;
|
|
494
|
+
declare const slideFromTopPopupAnimation: Required<PopupAnimationSettings>;
|
|
495
|
+
declare const slideFromBottomPopupAnimation: Required<PopupAnimationSettings>;
|
|
481
496
|
|
|
482
497
|
declare const PopupDataInjectionToken: InjectionToken<unknown>;
|
|
483
498
|
|
|
484
|
-
export { PopupCloseEvent, PopupCloseSource, PopupComponent, PopupDataInjectionToken, PopupRef, PopupService, defaultPopupAnimation, dropdownPopupAnimation, fadePopupAnimation };
|
|
499
|
+
export { PopupCloseEvent, PopupCloseSource, PopupComponent, PopupDataInjectionToken, PopupRef, PopupService, defaultPopupAnimation, dropdownPopupAnimation, fadePopupAnimation, slideFromBottomPopupAnimation, slideFromLeftPopupAnimation, slideFromRightPopupAnimation, slideFromTopPopupAnimation };
|
|
485
500
|
export type { ConnectionPoint, PopupAnchor, PopupAnimationSettings, PopupOffset, PopupSettings };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ClassInputType } from '@nanahoshi/mona-ui/common';
|
|
3
|
+
import { PopupCloseEvent } from '@nanahoshi/mona-ui/popup';
|
|
4
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
+
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
6
|
+
import { VariantProps } from 'class-variance-authority';
|
|
7
|
+
|
|
8
|
+
type SheetSide = "top" | "right" | "bottom" | "left";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* `overflow-clip` rather than `overflow-hidden` is deliberate. `hidden` would make the sheet a scroll
|
|
12
|
+
* container, letting the browser scroll it to reveal content that takes focus while the enter animation
|
|
13
|
+
* still has the sheet translated off-screen, which cancels the animation. `clip` cannot scroll.
|
|
14
|
+
*/
|
|
15
|
+
declare const sheetBaseVariants: (props?: ({
|
|
16
|
+
side?: "top" | "right" | "bottom" | "left" | null | undefined;
|
|
17
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
18
|
+
type SheetVariantProps = VariantProps<typeof sheetBaseVariants>;
|
|
19
|
+
type SheetVariantInput = VariantInputs<SheetVariantProps>;
|
|
20
|
+
|
|
21
|
+
declare class SheetComponent implements SheetVariantInput {
|
|
22
|
+
#private;
|
|
23
|
+
private readonly sheetTemplate;
|
|
24
|
+
protected readonly baseClass: _angular_core.Signal<string>;
|
|
25
|
+
protected readonly closeButtonClass: _angular_core.Signal<string>;
|
|
26
|
+
protected readonly contentClass: _angular_core.Signal<string>;
|
|
27
|
+
protected readonly descriptionClass: _angular_core.Signal<string>;
|
|
28
|
+
protected readonly descriptionId: string;
|
|
29
|
+
protected readonly headerClass: _angular_core.Signal<string>;
|
|
30
|
+
protected readonly titleClass: _angular_core.Signal<string>;
|
|
31
|
+
protected readonly titleId: string;
|
|
32
|
+
/** @description Accessible name used when no visible title is provided. */
|
|
33
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
34
|
+
/** @description Whether the close button is displayed. @default true */
|
|
35
|
+
readonly closable: _angular_core.InputSignal<boolean>;
|
|
36
|
+
/** @description Emitted before the sheet closes. Call preventDefault() to keep it open. */
|
|
37
|
+
readonly close: _angular_core.OutputEmitterRef<PopupCloseEvent<unknown>>;
|
|
38
|
+
/** @description Whether clicking the backdrop requests that the sheet close. @default true */
|
|
39
|
+
readonly closeOnBackdropClick: _angular_core.InputSignal<boolean>;
|
|
40
|
+
/** @description Whether pressing Escape requests that the sheet close. @default true */
|
|
41
|
+
readonly closeOnEscape: _angular_core.InputSignal<boolean>;
|
|
42
|
+
/** @description Emitted after the leave animation completes and the popup is disposed. */
|
|
43
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
44
|
+
/** @description Supporting text displayed below the title. */
|
|
45
|
+
readonly description: _angular_core.InputSignal<string | undefined>;
|
|
46
|
+
/** @description Explicit sheet height. Numbers are interpreted as pixels. */
|
|
47
|
+
readonly height: _angular_core.InputSignal<string | number | undefined>;
|
|
48
|
+
/** @description Edge of the viewport from which the sheet opens. @default "right" */
|
|
49
|
+
readonly side: _angular_core.InputSignal<SheetSide>;
|
|
50
|
+
/** @description Title displayed in the sheet header and used as its accessible name. */
|
|
51
|
+
readonly title: _angular_core.InputSignal<string | undefined>;
|
|
52
|
+
readonly userClass: _angular_core.InputSignalWithTransform<string | undefined, ClassInputType>;
|
|
53
|
+
/** @description Explicit sheet width. Numbers are interpreted as pixels. */
|
|
54
|
+
readonly width: _angular_core.InputSignal<string | number | undefined>;
|
|
55
|
+
constructor();
|
|
56
|
+
protected closeSheet(): void;
|
|
57
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SheetComponent, never>;
|
|
58
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SheetComponent, "mona-sheet", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "close": "close"; "closed": "closed"; }, never, ["*"], true, never>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { SheetComponent };
|
|
62
|
+
export type { SheetSide };
|