@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.
Files changed (165) hide show
  1. package/README.md +9 -0
  2. package/chart/README.md +223 -77
  3. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -10
  4. package/fesm2022/nanahoshi-mona-ui-avatar.mjs +37 -20
  5. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +239 -47
  6. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +184 -31
  7. package/fesm2022/nanahoshi-mona-ui-button.mjs +47 -11
  8. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +17 -13
  9. package/fesm2022/nanahoshi-mona-ui-card.mjs +54 -30
  10. package/fesm2022/nanahoshi-mona-ui-chart.mjs +1909 -666
  11. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +112 -31
  12. package/fesm2022/nanahoshi-mona-ui-chip.mjs +131 -89
  13. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +59 -19
  14. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +118 -41
  15. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +243 -212
  16. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +155 -86
  17. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +161 -131
  18. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +12 -11
  19. package/fesm2022/nanahoshi-mona-ui-common.mjs +18 -1
  20. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +10 -9
  21. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +10 -9
  22. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +2 -2
  23. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +2 -2
  24. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +10 -9
  25. package/fesm2022/nanahoshi-mona-ui-editor.mjs +25 -24
  26. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +202 -33
  27. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +31 -10
  28. package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -1
  29. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-DhKLnW06.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs} +2 -2
  30. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-voGbKOiB.mjs → nanahoshi-mona-ui-grid-grid-list.component-BAN70Wcn.mjs} +4 -4
  31. package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-HQ1Kv6R9.mjs → nanahoshi-mona-ui-grid-grid-row.component-C_kCaA5b.mjs} +7 -7
  32. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-PNLJFcuH.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-BsNfrAHz.mjs} +4 -4
  33. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BO19AVwC.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs} +27 -29
  34. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  35. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +146 -5
  36. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +2 -2
  37. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +1 -1
  38. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +5 -5
  39. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +7 -7
  40. package/fesm2022/nanahoshi-mona-ui-internal.mjs +183 -47
  41. package/fesm2022/nanahoshi-mona-ui-label.mjs +111 -15
  42. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1 -1
  43. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1 -1
  44. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +111 -5
  45. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +103 -5
  46. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +103 -5
  47. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +100 -6
  48. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +90 -5
  49. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +103 -5
  50. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +90 -5
  51. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +90 -5
  52. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +103 -5
  53. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +105 -5
  54. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +103 -5
  55. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +90 -5
  56. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +90 -5
  57. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +2 -2
  58. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +14 -13
  59. package/fesm2022/nanahoshi-mona-ui-notification.mjs +1 -1
  60. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +13 -12
  61. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +192 -56
  62. package/fesm2022/nanahoshi-mona-ui-pager.mjs +1 -1
  63. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +3 -1
  64. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2 -2
  65. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +60 -29
  66. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +334 -37
  67. package/fesm2022/nanahoshi-mona-ui-rating.mjs +84 -30
  68. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +274 -108
  69. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +127 -37
  70. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +2 -2
  71. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +595 -170
  72. package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +3 -2
  73. package/fesm2022/nanahoshi-mona-ui-slider.mjs +323 -166
  74. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +167 -82
  75. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +3 -3
  76. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +273 -165
  77. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +219 -132
  78. package/fesm2022/nanahoshi-mona-ui-switch.mjs +84 -32
  79. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +337 -116
  80. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +10 -12
  81. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +21 -8
  82. package/fesm2022/nanahoshi-mona-ui-theme.mjs +444 -88
  83. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +10 -9
  84. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +15 -14
  85. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +17 -3
  86. package/fesm2022/nanahoshi-mona-ui-window.mjs +1 -1
  87. package/i18n/catalogs/en-US.messages.json +90 -5
  88. package/locales/ar-sa/ar-sa.messages.json +90 -5
  89. package/locales/de-de/de-de.messages.json +90 -5
  90. package/locales/es-es/es-es.messages.json +90 -5
  91. package/locales/fr-fr/fr-fr.messages.json +91 -6
  92. package/locales/id-id/id-id.messages.json +90 -5
  93. package/locales/it-it/it-it.messages.json +90 -5
  94. package/locales/ja-jp/ja-jp.messages.json +90 -5
  95. package/locales/ko-kr/ko-kr.messages.json +90 -5
  96. package/locales/pt-br/pt-br.messages.json +90 -5
  97. package/locales/ru-ru/ru-ru.messages.json +90 -5
  98. package/locales/tr-tr/tr-tr.messages.json +90 -5
  99. package/locales/zh-cn/zh-cn.messages.json +90 -5
  100. package/locales/zh-tw/zh-tw.messages.json +90 -5
  101. package/package.json +2 -1
  102. package/styles.css +156 -0
  103. package/types/nanahoshi-mona-ui-auto-complete.d.ts +1 -0
  104. package/types/nanahoshi-mona-ui-avatar.d.ts +18 -11
  105. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +62 -14
  106. package/types/nanahoshi-mona-ui-button-group.d.ts +86 -16
  107. package/types/nanahoshi-mona-ui-button.d.ts +26 -3
  108. package/types/nanahoshi-mona-ui-calendar.d.ts +1 -0
  109. package/types/nanahoshi-mona-ui-card.d.ts +22 -6
  110. package/types/nanahoshi-mona-ui-chart.d.ts +519 -527
  111. package/types/nanahoshi-mona-ui-check-box.d.ts +54 -13
  112. package/types/nanahoshi-mona-ui-chip.d.ts +31 -18
  113. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +21 -5
  114. package/types/nanahoshi-mona-ui-collapsible.d.ts +20 -11
  115. package/types/nanahoshi-mona-ui-color-gradient.d.ts +62 -36
  116. package/types/nanahoshi-mona-ui-color-palette.d.ts +65 -27
  117. package/types/nanahoshi-mona-ui-color-picker.d.ts +64 -23
  118. package/types/nanahoshi-mona-ui-combo-box.d.ts +1 -0
  119. package/types/nanahoshi-mona-ui-common.d.ts +28 -2
  120. package/types/nanahoshi-mona-ui-date-picker.d.ts +1 -0
  121. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +1 -0
  122. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +1 -0
  123. package/types/nanahoshi-mona-ui-editor.d.ts +1 -0
  124. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +51 -7
  125. package/types/nanahoshi-mona-ui-fieldset.d.ts +18 -4
  126. package/types/nanahoshi-mona-ui-grid.d.ts +0 -1
  127. package/types/nanahoshi-mona-ui-i18n.d.ts +130 -3
  128. package/types/nanahoshi-mona-ui-internal.d.ts +95 -14
  129. package/types/nanahoshi-mona-ui-label.d.ts +17 -2
  130. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +85 -0
  131. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +85 -0
  132. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +85 -0
  133. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +85 -0
  134. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +85 -0
  135. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +85 -0
  136. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +85 -0
  137. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +85 -0
  138. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +85 -0
  139. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +85 -0
  140. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +85 -0
  141. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +85 -0
  142. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +85 -0
  143. package/types/nanahoshi-mona-ui-multi-select.d.ts +1 -0
  144. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +1 -0
  145. package/types/nanahoshi-mona-ui-otp-input.d.ts +49 -12
  146. package/types/nanahoshi-mona-ui-placeholder.d.ts +2 -1
  147. package/types/nanahoshi-mona-ui-progress-bar.d.ts +21 -9
  148. package/types/nanahoshi-mona-ui-radio-button.d.ts +165 -20
  149. package/types/nanahoshi-mona-ui-rating.d.ts +21 -6
  150. package/types/nanahoshi-mona-ui-scroll-view.d.ts +59 -27
  151. package/types/nanahoshi-mona-ui-segmented.d.ts +52 -24
  152. package/types/nanahoshi-mona-ui-sidebar.d.ts +104 -41
  153. package/types/nanahoshi-mona-ui-skeleton.d.ts +1 -1
  154. package/types/nanahoshi-mona-ui-slider.d.ts +99 -35
  155. package/types/nanahoshi-mona-ui-spinner.d.ts +9 -5
  156. package/types/nanahoshi-mona-ui-splitter.d.ts +31 -10
  157. package/types/nanahoshi-mona-ui-stepper.d.ts +58 -12
  158. package/types/nanahoshi-mona-ui-switch.d.ts +32 -10
  159. package/types/nanahoshi-mona-ui-tabs.d.ts +75 -20
  160. package/types/nanahoshi-mona-ui-text-area.d.ts +7 -7
  161. package/types/nanahoshi-mona-ui-text-box.d.ts +2 -0
  162. package/types/nanahoshi-mona-ui-theme.d.ts +392 -15
  163. package/types/nanahoshi-mona-ui-time-picker.d.ts +1 -0
  164. package/types/nanahoshi-mona-ui-time-selector.d.ts +1 -0
  165. 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 { Signal, TemplateRef, ElementRef } from '@angular/core';
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 & ScrollViewListVariantInput & Omit<ScrollViewArrowVariantInput, "hidden" | "side"> & ScrollViewPagerVariantInput & ScrollViewPagerListContainerVariantInput & ScrollViewPagerListVariantInput & Omit<ScrollViewPagerListItemVariantInput, "active"> & ScrollViewPagerArrowVariantInput;
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 ariaLabel: Signal<string | undefined>;
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 Represents the state of arrows' visibility or activity.
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 Sets whether the pager is visible.
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 onPageClick(index: number, element: HTMLButtonElement): void;
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
- private navigate;
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"; }, ["contentTemplate"], never, true, never>;
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, ScrollViewActivePageDirective, ScrollViewComponent };
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
- * The option rendered by this item.
31
+ * Whether this option is disabled, either individually or via the group.
33
32
  */
34
- readonly option: SegmentedOption<T>;
33
+ readonly disabled: boolean;
35
34
  /**
36
35
  * Zero-based option index.
37
36
  */
38
37
  readonly index: number;
39
38
  /**
40
- * Whether this option is currently selected.
39
+ * The option rendered by this item.
41
40
  */
42
- readonly selected: boolean;
41
+ readonly option: SegmentedOption<T>;
43
42
  /**
44
- * Whether this option is disabled, either individually or via the group.
43
+ * Whether this option is currently selected.
45
44
  */
46
- readonly disabled: boolean;
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.InputSignal<boolean>;
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.InputSignal<boolean>;
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 `Field` directive.
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.InputSignal<boolean>;
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 a radio input.
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 `Field` directive.
154
+ * this is written by the signal forms `FormField` directive.
133
155
  * @default false
134
156
  */
135
- readonly touched: _angular_core.InputSignal<boolean>;
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
- protected createOptionContext(option: SegmentedOption<T>, index: number): SegmentedItemTemplateContext<T>;
149
- protected onOptionBlur(): void;
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 templateRef: TemplateRef<SegmentedItemTemplateContext<_nanahoshi_mona_ui_segmented.SegmentedValue>>;
164
- static ngTemplateContextGuard(_directive: SegmentedItemTemplateDirective, context: unknown): context is SegmentedItemTemplateContext;
165
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SegmentedItemTemplateDirective, never>;
166
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SegmentedItemTemplateDirective, "ng-template[monaSegmentedItemTemplate]", never, {}, {}, never, never, true, never>;
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 };