@nanahoshi/mona-ui 0.24.10 → 0.25.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/README.md +9 -0
- package/chart/README.md +223 -77
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -10
- package/fesm2022/nanahoshi-mona-ui-avatar.mjs +37 -20
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +239 -47
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +184 -31
- package/fesm2022/nanahoshi-mona-ui-button.mjs +47 -11
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +17 -13
- package/fesm2022/nanahoshi-mona-ui-card.mjs +54 -30
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +1909 -666
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +112 -31
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +131 -89
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +59 -19
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +118 -41
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +243 -212
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +155 -86
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +161 -131
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +12 -11
- package/fesm2022/nanahoshi-mona-ui-common.mjs +18 -1
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +10 -9
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +10 -9
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +10 -9
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +25 -24
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +202 -33
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +31 -10
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -1
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-DhKLnW06.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-voGbKOiB.mjs → nanahoshi-mona-ui-grid-grid-list.component-BAN70Wcn.mjs} +4 -4
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-HQ1Kv6R9.mjs → nanahoshi-mona-ui-grid-grid-row.component-C_kCaA5b.mjs} +7 -7
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-PNLJFcuH.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-BsNfrAHz.mjs} +4 -4
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BO19AVwC.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs} +27 -29
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +146 -5
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +5 -5
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +7 -7
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +183 -47
- package/fesm2022/nanahoshi-mona-ui-label.mjs +111 -15
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +111 -5
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +103 -5
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +103 -5
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +100 -6
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +90 -5
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +103 -5
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +90 -5
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +90 -5
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +103 -5
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +105 -5
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +103 -5
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +90 -5
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +90 -5
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +14 -13
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +13 -12
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +192 -56
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +3 -1
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +60 -29
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +334 -37
- package/fesm2022/nanahoshi-mona-ui-rating.mjs +84 -30
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +274 -108
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +127 -37
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +595 -170
- package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +3 -2
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +323 -166
- package/fesm2022/nanahoshi-mona-ui-spinner.mjs +167 -82
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +3 -3
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +273 -165
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +219 -132
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +84 -32
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +337 -116
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +10 -12
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +21 -8
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +444 -88
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +10 -9
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +15 -14
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +17 -3
- package/fesm2022/nanahoshi-mona-ui-window.mjs +1 -1
- package/i18n/catalogs/en-US.messages.json +90 -5
- package/locales/ar-sa/ar-sa.messages.json +90 -5
- package/locales/de-de/de-de.messages.json +90 -5
- package/locales/es-es/es-es.messages.json +90 -5
- package/locales/fr-fr/fr-fr.messages.json +91 -6
- package/locales/id-id/id-id.messages.json +90 -5
- package/locales/it-it/it-it.messages.json +90 -5
- package/locales/ja-jp/ja-jp.messages.json +90 -5
- package/locales/ko-kr/ko-kr.messages.json +90 -5
- package/locales/pt-br/pt-br.messages.json +90 -5
- package/locales/ru-ru/ru-ru.messages.json +90 -5
- package/locales/tr-tr/tr-tr.messages.json +90 -5
- package/locales/zh-cn/zh-cn.messages.json +90 -5
- package/locales/zh-tw/zh-tw.messages.json +90 -5
- package/package.json +2 -1
- package/styles.css +156 -0
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +1 -0
- package/types/nanahoshi-mona-ui-avatar.d.ts +18 -11
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +62 -14
- package/types/nanahoshi-mona-ui-button-group.d.ts +86 -16
- package/types/nanahoshi-mona-ui-button.d.ts +26 -3
- package/types/nanahoshi-mona-ui-calendar.d.ts +1 -0
- package/types/nanahoshi-mona-ui-card.d.ts +22 -6
- package/types/nanahoshi-mona-ui-chart.d.ts +519 -527
- package/types/nanahoshi-mona-ui-check-box.d.ts +54 -13
- package/types/nanahoshi-mona-ui-chip.d.ts +31 -18
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +21 -5
- package/types/nanahoshi-mona-ui-collapsible.d.ts +20 -11
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +62 -36
- package/types/nanahoshi-mona-ui-color-palette.d.ts +65 -27
- package/types/nanahoshi-mona-ui-color-picker.d.ts +64 -23
- package/types/nanahoshi-mona-ui-combo-box.d.ts +1 -0
- package/types/nanahoshi-mona-ui-common.d.ts +28 -2
- package/types/nanahoshi-mona-ui-date-picker.d.ts +1 -0
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +1 -0
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +1 -0
- package/types/nanahoshi-mona-ui-editor.d.ts +1 -0
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +51 -7
- package/types/nanahoshi-mona-ui-fieldset.d.ts +18 -4
- package/types/nanahoshi-mona-ui-grid.d.ts +0 -1
- package/types/nanahoshi-mona-ui-i18n.d.ts +130 -3
- package/types/nanahoshi-mona-ui-internal.d.ts +95 -14
- package/types/nanahoshi-mona-ui-label.d.ts +17 -2
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +85 -0
- package/types/nanahoshi-mona-ui-multi-select.d.ts +1 -0
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +1 -0
- package/types/nanahoshi-mona-ui-otp-input.d.ts +49 -12
- package/types/nanahoshi-mona-ui-placeholder.d.ts +2 -1
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +21 -9
- package/types/nanahoshi-mona-ui-radio-button.d.ts +165 -20
- package/types/nanahoshi-mona-ui-rating.d.ts +21 -6
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +59 -27
- package/types/nanahoshi-mona-ui-segmented.d.ts +52 -24
- package/types/nanahoshi-mona-ui-sidebar.d.ts +104 -41
- package/types/nanahoshi-mona-ui-skeleton.d.ts +1 -1
- package/types/nanahoshi-mona-ui-slider.d.ts +99 -35
- package/types/nanahoshi-mona-ui-spinner.d.ts +9 -5
- package/types/nanahoshi-mona-ui-splitter.d.ts +31 -10
- package/types/nanahoshi-mona-ui-stepper.d.ts +58 -12
- package/types/nanahoshi-mona-ui-switch.d.ts +32 -10
- package/types/nanahoshi-mona-ui-tabs.d.ts +75 -20
- package/types/nanahoshi-mona-ui-text-area.d.ts +7 -7
- package/types/nanahoshi-mona-ui-text-box.d.ts +2 -0
- package/types/nanahoshi-mona-ui-theme.d.ts +392 -15
- package/types/nanahoshi-mona-ui-time-picker.d.ts +1 -0
- package/types/nanahoshi-mona-ui-time-selector.d.ts +1 -0
- package/types/nanahoshi-mona-ui-tooltip.d.ts +7 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _mirei_ts_collections from '@mirei/ts-collections';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { TemplateRef, Signal, ElementRef } from '@angular/core';
|
|
4
4
|
import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
|
|
5
5
|
import { MonaScrollViewMessages } from '@nanahoshi/mona-ui/i18n';
|
|
6
6
|
import { ScrollDirection } from '@nanahoshi/mona-ui/common';
|
|
@@ -8,6 +8,29 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
8
8
|
import { VariantProps } from 'class-variance-authority';
|
|
9
9
|
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
10
10
|
|
|
11
|
+
interface ScrollViewSlideContext<T = unknown> {
|
|
12
|
+
$implicit: T;
|
|
13
|
+
height: number;
|
|
14
|
+
width: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @description Marks the template that renders each slide. Bind `[monaScrollViewSlide]` to the same data as the scroll
|
|
19
|
+
* view, and `let-item` takes its type from it.
|
|
20
|
+
*/
|
|
21
|
+
declare class ScrollViewSlideDirective<T = unknown> {
|
|
22
|
+
/**
|
|
23
|
+
* @description The scroll view's data, bound only so that `let-item` takes its type from it. Leave it empty for
|
|
24
|
+
* `unknown`.
|
|
25
|
+
* @default ""
|
|
26
|
+
*/
|
|
27
|
+
readonly monaScrollViewSlide: _angular_core.InputSignal<"" | Iterable<T>>;
|
|
28
|
+
readonly templateRef: TemplateRef<ScrollViewSlideContext<T>>;
|
|
29
|
+
static ngTemplateContextGuard<T>(_dir: ScrollViewSlideDirective<T>, _ctx: unknown): _ctx is ScrollViewSlideContext<T>;
|
|
30
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScrollViewSlideDirective<any>, never>;
|
|
31
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ScrollViewSlideDirective<any>, "ng-template[monaScrollViewSlide]", never, { "monaScrollViewSlide": { "alias": "monaScrollViewSlide"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
32
|
+
}
|
|
33
|
+
|
|
11
34
|
type PagerOverlay = "dark" | "light" | "none";
|
|
12
35
|
|
|
13
36
|
interface ScrollViewListItem {
|
|
@@ -18,7 +41,6 @@ declare const scrollViewBaseThemeVariants: (props?: ({
|
|
|
18
41
|
rounded?: "small" | "medium" | "large" | "none" | null | undefined;
|
|
19
42
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
20
43
|
declare const scrollViewContentThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
21
|
-
declare const scrollViewListThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
22
44
|
declare const scrollViewArrowThemeVariants: (props?: ({
|
|
23
45
|
hidden?: boolean | null | undefined;
|
|
24
46
|
side?: "left" | "right" | null | undefined;
|
|
@@ -37,8 +59,6 @@ type ScrollViewBaseVariantProps = VariantProps<typeof scrollViewBaseThemeVariant
|
|
|
37
59
|
type ScrollViewBaseVariantInput = VariantInputs<ScrollViewBaseVariantProps>;
|
|
38
60
|
type ScrollViewContentVariantProps = VariantProps<typeof scrollViewContentThemeVariants>;
|
|
39
61
|
type ScrollViewContentVariantInput = VariantInputs<ScrollViewContentVariantProps>;
|
|
40
|
-
type ScrollViewListVariantProps = VariantProps<typeof scrollViewListThemeVariants>;
|
|
41
|
-
type ScrollViewListVariantInput = VariantInputs<ScrollViewListVariantProps>;
|
|
42
62
|
type ScrollViewPagerVariantProps = VariantProps<typeof scrollViewPagerThemeVariants>;
|
|
43
63
|
type ScrollViewPagerVariantInput = VariantInputs<ScrollViewPagerVariantProps>;
|
|
44
64
|
type ScrollViewPagerListContainerVariantProps = VariantProps<typeof scrollViewPagerListContainerThemeVariants>;
|
|
@@ -51,22 +71,25 @@ type ScrollViewArrowVariantProps = VariantProps<typeof scrollViewArrowThemeVaria
|
|
|
51
71
|
type ScrollViewArrowVariantInput = VariantInputs<ScrollViewArrowVariantProps>;
|
|
52
72
|
type ScrollViewPagerArrowVariantProps = VariantProps<typeof scrollViewPagerArrowThemeVariants>;
|
|
53
73
|
type ScrollViewPagerArrowVariantInput = VariantInputs<ScrollViewPagerArrowVariantProps>;
|
|
54
|
-
type ScrollViewVariantInput = ScrollViewBaseVariantInput & ScrollViewContentVariantInput &
|
|
74
|
+
type ScrollViewVariantInput = ScrollViewBaseVariantInput & ScrollViewContentVariantInput & Omit<ScrollViewArrowVariantInput, "hidden" | "side"> & ScrollViewPagerVariantInput & ScrollViewPagerListContainerVariantInput & ScrollViewPagerListVariantInput & Omit<ScrollViewPagerListItemVariantInput, "active"> & ScrollViewPagerArrowVariantInput;
|
|
55
75
|
|
|
56
76
|
declare class ScrollViewComponent implements ScrollViewVariantInput {
|
|
57
77
|
#private;
|
|
58
78
|
protected readonly animationDuration: Signal<number>;
|
|
59
|
-
protected readonly
|
|
79
|
+
protected readonly bareTemplate: Signal<TemplateRef<any> | undefined>;
|
|
60
80
|
protected readonly baseClass: Signal<string>;
|
|
61
81
|
protected readonly contentClass: Signal<string>;
|
|
82
|
+
protected readonly contentElementRef: Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
62
83
|
protected readonly contentTemplate: Signal<TemplateRef<any> | undefined>;
|
|
63
84
|
protected readonly enterAnimation: Signal<"slide-in-from-right" | "slide-in-from-left">;
|
|
85
|
+
protected readonly hostRole: Signal<"region" | "group">;
|
|
64
86
|
protected readonly isRtl: Signal<boolean>;
|
|
65
87
|
protected readonly itemCount: Signal<number>;
|
|
66
88
|
protected readonly leaveAnimation: Signal<"slide-out-to-left" | "slide-out-to-right">;
|
|
67
89
|
protected readonly leftArrowClass: Signal<string>;
|
|
68
|
-
protected readonly listClass: Signal<string>;
|
|
69
90
|
protected readonly messages: Signal<_nanahoshi_mona_ui_i18n.MonaScrollViewMessages>;
|
|
91
|
+
protected readonly nextArrowHidden: Signal<boolean>;
|
|
92
|
+
protected readonly nextArrowRef: Signal<ElementRef<HTMLButtonElement> | undefined>;
|
|
70
93
|
protected readonly pagerArrowClass: Signal<string>;
|
|
71
94
|
protected readonly pagerArrowVisible: _angular_core.WritableSignal<boolean>;
|
|
72
95
|
protected readonly pagerClass: Signal<string>;
|
|
@@ -74,10 +97,18 @@ declare class ScrollViewComponent implements ScrollViewVariantInput {
|
|
|
74
97
|
protected readonly pagerListClass: Signal<string>;
|
|
75
98
|
protected readonly pagerListContainerClass: Signal<string>;
|
|
76
99
|
protected readonly pagerListElementRef: Signal<ElementRef<HTMLUListElement> | undefined>;
|
|
100
|
+
protected readonly previousArrowHidden: Signal<boolean>;
|
|
101
|
+
protected readonly previousArrowRef: Signal<ElementRef<HTMLButtonElement> | undefined>;
|
|
77
102
|
protected readonly rightArrowClass: Signal<string>;
|
|
78
103
|
protected readonly scrollBehavior: Signal<ScrollBehavior>;
|
|
79
104
|
protected readonly scrollViewHeight: Signal<string>;
|
|
80
105
|
protected readonly scrollViewWidth: Signal<string>;
|
|
106
|
+
protected readonly slideClass: Signal<string>;
|
|
107
|
+
protected readonly slideDirective: Signal<ScrollViewSlideDirective<any> | undefined>;
|
|
108
|
+
protected readonly slideSize: _angular_core.WritableSignal<{
|
|
109
|
+
height: number;
|
|
110
|
+
width: number;
|
|
111
|
+
}>;
|
|
81
112
|
protected readonly viewData: Signal<_mirei_ts_collections.ImmutableSet<ScrollViewListItem>>;
|
|
82
113
|
protected readonly viewIndex: Signal<number>;
|
|
83
114
|
/**
|
|
@@ -87,7 +118,18 @@ declare class ScrollViewComponent implements ScrollViewVariantInput {
|
|
|
87
118
|
*/
|
|
88
119
|
readonly animate: _angular_core.InputSignal<number | boolean>;
|
|
89
120
|
/**
|
|
90
|
-
* @description
|
|
121
|
+
* @description Accessible name of the carousel, saying what it shows. Use this or `aria-labelledby`; with neither,
|
|
122
|
+
* the host is a plain group and a warning is logged in development.
|
|
123
|
+
* @default ""
|
|
124
|
+
*/
|
|
125
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
126
|
+
/**
|
|
127
|
+
* @description The id of the element that names the carousel.
|
|
128
|
+
* @default ""
|
|
129
|
+
*/
|
|
130
|
+
readonly ariaLabelledBy: _angular_core.InputSignal<string>;
|
|
131
|
+
/**
|
|
132
|
+
* @description Shows the previous and next arrows. A swipe is a gesture, so give pointer users arrows or a pager too.
|
|
91
133
|
* @default false
|
|
92
134
|
*/
|
|
93
135
|
readonly arrows: _angular_core.InputSignal<boolean>;
|
|
@@ -111,11 +153,12 @@ declare class ScrollViewComponent implements ScrollViewVariantInput {
|
|
|
111
153
|
*/
|
|
112
154
|
readonly infinite: _angular_core.InputSignal<boolean>;
|
|
113
155
|
/**
|
|
114
|
-
* @description
|
|
156
|
+
* @description Shows the pager. A swipe is a gesture, so give pointer users arrows or a pager too.
|
|
157
|
+
* @default false
|
|
115
158
|
*/
|
|
116
159
|
readonly pageable: _angular_core.InputSignal<boolean>;
|
|
117
160
|
/**
|
|
118
|
-
* @description Sets the background blur of the pager in pixels.
|
|
161
|
+
* @description Sets the background blur of the pager in pixels. It doesn't apply with `pagerOverlay` set to `"none"`.
|
|
119
162
|
* @default 3
|
|
120
163
|
*/
|
|
121
164
|
readonly pagerBlur: _angular_core.InputSignal<number>;
|
|
@@ -144,27 +187,16 @@ declare class ScrollViewComponent implements ScrollViewVariantInput {
|
|
|
144
187
|
readonly width: _angular_core.InputSignal<string | number>;
|
|
145
188
|
constructor();
|
|
146
189
|
protected onArrowClick(direction: ScrollDirection): void;
|
|
147
|
-
protected
|
|
190
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
191
|
+
protected onPageClick(index: number): void;
|
|
148
192
|
protected onPagerClick(event: MouseEvent | PointerEvent, element: HTMLUListElement, direction: ScrollDirection): void;
|
|
149
193
|
protected onPagerPointerDown(event: PointerEvent, element: HTMLUListElement, direction: ScrollDirection): void;
|
|
150
|
-
|
|
151
|
-
private navigateLeft;
|
|
152
|
-
private navigateRight;
|
|
153
|
-
private scrollActivePageIntoView;
|
|
154
|
-
private setSubscriptions;
|
|
194
|
+
protected onSwipeStart(event: PointerEvent): void;
|
|
155
195
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScrollViewComponent, never>;
|
|
156
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScrollViewComponent, "mona-scroll-view", never, { "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "arrows": { "alias": "arrows"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": true; "isSignal": true; }; "index": { "alias": "index"; "required": false; "isSignal": true; }; "infinite": { "alias": "infinite"; "required": false; "isSignal": true; }; "pageable": { "alias": "pageable"; "required": false; "isSignal": true; }; "pagerBlur": { "alias": "pagerBlur"; "required": false; "isSignal": true; }; "pagerOverlay": { "alias": "pagerOverlay"; "required": false; "isSignal": true; }; "pagerRounded": { "alias": "pagerRounded"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": true; "isSignal": true; }; }, { "index": "indexChange"; }, ["
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
declare class ScrollViewActivePageDirective {
|
|
160
|
-
protected readonly pageItemClass: _angular_core.Signal<string>;
|
|
161
|
-
readonly active: _angular_core.InputSignal<boolean>;
|
|
162
|
-
readonly rounded: _angular_core.InputSignal<"small" | "medium" | "large" | "none" | "full" | null | undefined>;
|
|
163
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScrollViewActivePageDirective, never>;
|
|
164
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ScrollViewActivePageDirective, "button[monaScrollViewActivePage]", never, { "active": { "alias": "active"; "required": true; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
196
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScrollViewComponent, "mona-scroll-view", never, { "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "arrows": { "alias": "arrows"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": true; "isSignal": true; }; "index": { "alias": "index"; "required": false; "isSignal": true; }; "infinite": { "alias": "infinite"; "required": false; "isSignal": true; }; "pageable": { "alias": "pageable"; "required": false; "isSignal": true; }; "pagerBlur": { "alias": "pagerBlur"; "required": false; "isSignal": true; }; "pagerOverlay": { "alias": "pagerOverlay"; "required": false; "isSignal": true; }; "pagerRounded": { "alias": "pagerRounded"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": true; "isSignal": true; }; }, { "index": "indexChange"; }, ["bareTemplate", "slideDirective"], never, true, never>;
|
|
165
197
|
}
|
|
166
198
|
|
|
167
199
|
declare const SCROLL_VIEW_DEFAULT_MESSAGES: MonaScrollViewMessages;
|
|
168
200
|
|
|
169
|
-
export { SCROLL_VIEW_DEFAULT_MESSAGES,
|
|
170
|
-
export type { PagerOverlay };
|
|
201
|
+
export { SCROLL_VIEW_DEFAULT_MESSAGES, ScrollViewComponent, ScrollViewSlideDirective };
|
|
202
|
+
export type { PagerOverlay, ScrollViewSlideContext };
|
|
@@ -4,7 +4,6 @@ import { FormValueControl } from '@angular/forms/signals';
|
|
|
4
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
6
6
|
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
7
|
-
import * as _nanahoshi_mona_ui_segmented from '@nanahoshi/mona-ui/segmented';
|
|
8
7
|
|
|
9
8
|
interface SegmentedIndicatorGeometry {
|
|
10
9
|
height: number;
|
|
@@ -15,9 +14,9 @@ interface SegmentedIndicatorGeometry {
|
|
|
15
14
|
type SegmentedValue = string | number;
|
|
16
15
|
|
|
17
16
|
interface SegmentedOption<T extends SegmentedValue = SegmentedValue> {
|
|
17
|
+
readonly disabled?: boolean;
|
|
18
18
|
readonly label: string;
|
|
19
19
|
readonly value: T;
|
|
20
|
-
readonly disabled?: boolean;
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
/**
|
|
@@ -29,21 +28,21 @@ interface SegmentedItemTemplateContext<T extends SegmentedValue = SegmentedValue
|
|
|
29
28
|
*/
|
|
30
29
|
readonly $implicit: SegmentedOption<T>;
|
|
31
30
|
/**
|
|
32
|
-
*
|
|
31
|
+
* Whether this option is disabled, either individually or via the group.
|
|
33
32
|
*/
|
|
34
|
-
readonly
|
|
33
|
+
readonly disabled: boolean;
|
|
35
34
|
/**
|
|
36
35
|
* Zero-based option index.
|
|
37
36
|
*/
|
|
38
37
|
readonly index: number;
|
|
39
38
|
/**
|
|
40
|
-
*
|
|
39
|
+
* The option rendered by this item.
|
|
41
40
|
*/
|
|
42
|
-
readonly
|
|
41
|
+
readonly option: SegmentedOption<T>;
|
|
43
42
|
/**
|
|
44
|
-
* Whether this option is
|
|
43
|
+
* Whether this option is currently selected.
|
|
45
44
|
*/
|
|
46
|
-
readonly
|
|
45
|
+
readonly selected: boolean;
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
declare const segmentedContainerThemeVariants: (props?: ({
|
|
@@ -65,6 +64,8 @@ type SegmentedVariantInput = SegmentedContainerVariantInput & SegmentedOptionVar
|
|
|
65
64
|
declare class SegmentedComponent<T extends SegmentedValue = SegmentedValue> implements SegmentedVariantInput, FormValueControl<T | null> {
|
|
66
65
|
#private;
|
|
67
66
|
protected readonly containerClasses: _angular_core.Signal<string>;
|
|
67
|
+
protected readonly effectiveDisabled: _angular_core.Signal<boolean>;
|
|
68
|
+
protected readonly geometryReady: _angular_core.Signal<boolean>;
|
|
68
69
|
protected readonly groupName: string;
|
|
69
70
|
protected readonly indicatorClasses: _angular_core.Signal<string>;
|
|
70
71
|
protected readonly indicatorGeometry: _angular_core.WritableSignal<SegmentedIndicatorGeometry | null>;
|
|
@@ -73,8 +74,11 @@ declare class SegmentedComponent<T extends SegmentedValue = SegmentedValue> impl
|
|
|
73
74
|
protected readonly inputClasses: _angular_core.Signal<string>;
|
|
74
75
|
protected readonly invalidState: _angular_core.Signal<boolean>;
|
|
75
76
|
protected readonly itemTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
77
|
+
protected readonly labelledBy: _angular_core.Signal<string | null>;
|
|
76
78
|
protected readonly optionClasses: _angular_core.Signal<string>;
|
|
79
|
+
protected readonly optionContexts: _angular_core.Signal<SegmentedItemTemplateContext<T>[]>;
|
|
77
80
|
protected readonly optionElements: _angular_core.Signal<readonly ElementRef<HTMLLabelElement>[]>;
|
|
81
|
+
protected readonly radioInputs: _angular_core.Signal<readonly ElementRef<HTMLInputElement>[]>;
|
|
78
82
|
protected readonly selectedIndex: _angular_core.Signal<number>;
|
|
79
83
|
protected readonly selectedOptionDisabled: _angular_core.Signal<boolean>;
|
|
80
84
|
/**
|
|
@@ -87,7 +91,7 @@ declare class SegmentedComponent<T extends SegmentedValue = SegmentedValue> impl
|
|
|
87
91
|
* When false, selection changes are applied immediately without transition.
|
|
88
92
|
* @default true
|
|
89
93
|
*/
|
|
90
|
-
readonly animate: _angular_core.
|
|
94
|
+
readonly animate: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
91
95
|
/**
|
|
92
96
|
* @description Accessible name for the radio group. Provide either `aria-label` or `aria-labelledby`.
|
|
93
97
|
* @default null
|
|
@@ -102,17 +106,35 @@ declare class SegmentedComponent<T extends SegmentedValue = SegmentedValue> impl
|
|
|
102
106
|
* @description Disables every option in the group and prevents value changes.
|
|
103
107
|
* @default false
|
|
104
108
|
*/
|
|
105
|
-
readonly disabled: _angular_core.
|
|
109
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
106
110
|
/**
|
|
107
111
|
* @description Marks the component as invalid. Error styling requires both `invalid` and `touched` to be `true`.
|
|
108
|
-
* When bound to a signal form field via `[formField]`, this is written by the signal forms `
|
|
112
|
+
* When bound to a signal form field via `[formField]`, this is written by the signal forms `FormField` directive.
|
|
109
113
|
* @default false
|
|
110
114
|
*/
|
|
111
|
-
readonly invalid: _angular_core.
|
|
115
|
+
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
116
|
+
/**
|
|
117
|
+
* @description The name of the radios, for a native `<form>`. Generated when empty, so two groups don't interfere.
|
|
118
|
+
* When bound to a signal form field via `[formField]`, this is written by the `FormField` directive.
|
|
119
|
+
* @default ""
|
|
120
|
+
*/
|
|
121
|
+
readonly name: _angular_core.InputSignal<string>;
|
|
112
122
|
/**
|
|
113
123
|
* @description The list of selectable options. Exactly one option is selected at a time.
|
|
114
124
|
*/
|
|
115
125
|
readonly options: _angular_core.InputSignal<readonly SegmentedOption<T>[]>;
|
|
126
|
+
/**
|
|
127
|
+
* @description Prevents value changes while the control stays focusable and readable. When bound to a signal form
|
|
128
|
+
* field via `[formField]`, this is written by the `FormField` directive.
|
|
129
|
+
* @default false
|
|
130
|
+
*/
|
|
131
|
+
readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
132
|
+
/**
|
|
133
|
+
* @description Marks the group as required, as `aria-required`. When bound to a signal form field via `[formField]`,
|
|
134
|
+
* this is written by the `FormField` directive.
|
|
135
|
+
* @default false
|
|
136
|
+
*/
|
|
137
|
+
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
116
138
|
/**
|
|
117
139
|
* @description Border-radius preset applied to the segmented container and its options.
|
|
118
140
|
* @default "medium"
|
|
@@ -124,15 +146,15 @@ declare class SegmentedComponent<T extends SegmentedValue = SegmentedValue> impl
|
|
|
124
146
|
*/
|
|
125
147
|
readonly size: _angular_core.InputSignal<"small" | "medium" | "large" | null | undefined>;
|
|
126
148
|
/**
|
|
127
|
-
* @description Emitted when the selected value changes or focus leaves
|
|
149
|
+
* @description Emitted when the selected value changes or focus leaves the group.
|
|
128
150
|
*/
|
|
129
151
|
readonly touch: _angular_core.OutputEmitterRef<void>;
|
|
130
152
|
/**
|
|
131
153
|
* @description Marks the component as touched. When bound to a signal form field via `[formField]`,
|
|
132
|
-
* this is written by the signal forms `
|
|
154
|
+
* this is written by the signal forms `FormField` directive.
|
|
133
155
|
* @default false
|
|
134
156
|
*/
|
|
135
|
-
readonly touched: _angular_core.
|
|
157
|
+
readonly touched: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
136
158
|
/**
|
|
137
159
|
* @description Additional CSS classes merged onto the host element via `tailwind-merge`.
|
|
138
160
|
* @default ""
|
|
@@ -145,25 +167,31 @@ declare class SegmentedComponent<T extends SegmentedValue = SegmentedValue> impl
|
|
|
145
167
|
*/
|
|
146
168
|
readonly value: _angular_core.ModelSignal<T | null>;
|
|
147
169
|
constructor();
|
|
148
|
-
|
|
149
|
-
|
|
170
|
+
/**
|
|
171
|
+
* @description Moves focus to the selected option, or the first enabled one.
|
|
172
|
+
* @param options Options passed to the native `focus()` call, such as `preventScroll`.
|
|
173
|
+
*/
|
|
174
|
+
focus(options?: FocusOptions): void;
|
|
175
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
150
176
|
protected onOptionChange(option: SegmentedOption<T>): void;
|
|
177
|
+
protected onOptionClick(event: Event): void;
|
|
151
178
|
private observeOptionElements;
|
|
152
179
|
private setupResizeObserver;
|
|
153
180
|
private updateIndicatorGeometry;
|
|
154
181
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SegmentedComponent<any>, never>;
|
|
155
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SegmentedComponent<any>, "mona-segmented", never, { "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "touch": "touch"; "value": "valueChange"; }, ["itemTemplate"], never, true, never>;
|
|
182
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SegmentedComponent<any>, "mona-segmented", never, { "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "touch": "touch"; "value": "valueChange"; }, ["itemTemplate"], never, true, never>;
|
|
156
183
|
}
|
|
157
184
|
|
|
158
185
|
/**
|
|
159
186
|
* @description Renders the visual content of every segmented option. Overrides the default label
|
|
160
|
-
* text of each option.
|
|
187
|
+
* text of each option. Bind the options, as `[monaSegmentedItemTemplate]="options"`, to type `let-option` from them.
|
|
161
188
|
*/
|
|
162
|
-
declare class SegmentedItemTemplateDirective {
|
|
163
|
-
readonly
|
|
164
|
-
|
|
165
|
-
static
|
|
166
|
-
static
|
|
189
|
+
declare class SegmentedItemTemplateDirective<T extends SegmentedValue = SegmentedValue> {
|
|
190
|
+
readonly options: _angular_core.InputSignal<"" | readonly SegmentedOption<T>[] | undefined>;
|
|
191
|
+
readonly templateRef: TemplateRef<SegmentedItemTemplateContext<T>>;
|
|
192
|
+
static ngTemplateContextGuard<T extends SegmentedValue>(_directive: SegmentedItemTemplateDirective<T>, _context: unknown): _context is SegmentedItemTemplateContext<T>;
|
|
193
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SegmentedItemTemplateDirective<any>, never>;
|
|
194
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SegmentedItemTemplateDirective<any>, "ng-template[monaSegmentedItemTemplate]", never, { "options": { "alias": "monaSegmentedItemTemplate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
167
195
|
}
|
|
168
196
|
|
|
169
197
|
export { SegmentedComponent, SegmentedItemTemplateDirective };
|