@nanahoshi/mona-ui 0.30.0 → 0.31.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 (109) hide show
  1. package/docs/api/button-group.md +1 -0
  2. package/docs/api/color-gradient.md +1 -0
  3. package/docs/api/color-palette.md +1 -0
  4. package/docs/api/color-picker.md +1 -0
  5. package/docs/api/form-field.md +88 -0
  6. package/docs/api/i18n.md +31 -0
  7. package/docs/api/locales.md +14 -14
  8. package/docs/api/segmented.md +1 -0
  9. package/docs/api/switch.md +1 -0
  10. package/docs/dropdown-list.md +1 -1
  11. package/docs/form-field.md +425 -0
  12. package/docs/forms.md +12 -4
  13. package/docs/label.md +4 -5
  14. package/docs/numeric-textbox.md +1 -1
  15. package/docs/radio-button.md +2 -1
  16. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +15 -4
  17. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +25 -1
  18. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +5 -2
  19. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +29 -3
  20. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +25 -1
  21. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +31 -3
  22. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +15 -4
  23. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +15 -4
  24. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +15 -4
  25. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +19 -7
  26. package/fesm2022/nanahoshi-mona-ui-editor.mjs +24 -4
  27. package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -0
  28. package/fesm2022/nanahoshi-mona-ui-form-field.mjs +666 -0
  29. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +31 -0
  30. package/fesm2022/nanahoshi-mona-ui-internal.mjs +27 -2
  31. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +27 -0
  32. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +13 -0
  33. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +19 -0
  34. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +19 -0
  35. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +13 -0
  36. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +19 -0
  37. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +13 -0
  38. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +13 -0
  39. package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +23 -0
  40. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +19 -0
  41. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +23 -0
  42. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +13 -0
  43. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +13 -0
  44. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +13 -0
  45. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +19 -7
  46. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +14 -5
  47. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +6 -3
  48. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +15 -9
  49. package/fesm2022/nanahoshi-mona-ui-rating.mjs +6 -3
  50. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +25 -1
  51. package/fesm2022/nanahoshi-mona-ui-slider.mjs +8 -5
  52. package/fesm2022/nanahoshi-mona-ui-switch.mjs +25 -1
  53. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +6 -3
  54. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +15 -4
  55. package/form-field/package.json +4 -0
  56. package/i18n/catalogs/en-US.messages.json +13 -0
  57. package/llms.txt +3 -1
  58. package/locales/ar-sa/ar-sa.messages.json +13 -0
  59. package/locales/de-de/de-de.messages.json +13 -0
  60. package/locales/es-es/es-es.messages.json +13 -0
  61. package/locales/fr-fr/fr-fr.messages.json +13 -0
  62. package/locales/id-id/id-id.messages.json +13 -0
  63. package/locales/it-it/it-it.messages.json +13 -0
  64. package/locales/ja-jp/ja-jp.messages.json +13 -0
  65. package/locales/ko-kr/ko-kr.messages.json +13 -0
  66. package/locales/pl-pl/pl-pl.messages.json +13 -0
  67. package/locales/pt-br/pt-br.messages.json +13 -0
  68. package/locales/ru-ru/ru-ru.messages.json +13 -0
  69. package/locales/tr-tr/tr-tr.messages.json +13 -0
  70. package/locales/zh-cn/zh-cn.messages.json +13 -0
  71. package/locales/zh-tw/zh-tw.messages.json +13 -0
  72. package/package.json +5 -1
  73. package/types/nanahoshi-mona-ui-auto-complete.d.ts +2 -0
  74. package/types/nanahoshi-mona-ui-button-group.d.ts +11 -0
  75. package/types/nanahoshi-mona-ui-check-box.d.ts +1 -0
  76. package/types/nanahoshi-mona-ui-color-gradient.d.ts +11 -0
  77. package/types/nanahoshi-mona-ui-color-palette.d.ts +11 -0
  78. package/types/nanahoshi-mona-ui-color-picker.d.ts +11 -0
  79. package/types/nanahoshi-mona-ui-combo-box.d.ts +2 -0
  80. package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -0
  81. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +2 -0
  82. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +2 -0
  83. package/types/nanahoshi-mona-ui-form-field.d.ts +173 -0
  84. package/types/nanahoshi-mona-ui-i18n.d.ts +29 -0
  85. package/types/nanahoshi-mona-ui-internal.d.ts +39 -4
  86. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +13 -0
  87. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +13 -0
  88. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +13 -0
  89. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +13 -0
  90. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +13 -0
  91. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +13 -0
  92. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +13 -0
  93. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +13 -0
  94. package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +13 -0
  95. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +13 -0
  96. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +13 -0
  97. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +13 -0
  98. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +13 -0
  99. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +13 -0
  100. package/types/nanahoshi-mona-ui-multi-select.d.ts +2 -0
  101. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +2 -0
  102. package/types/nanahoshi-mona-ui-otp-input.d.ts +1 -0
  103. package/types/nanahoshi-mona-ui-radio-button.d.ts +2 -0
  104. package/types/nanahoshi-mona-ui-rating.d.ts +1 -0
  105. package/types/nanahoshi-mona-ui-segmented.d.ts +11 -0
  106. package/types/nanahoshi-mona-ui-slider.d.ts +1 -0
  107. package/types/nanahoshi-mona-ui-switch.d.ts +11 -0
  108. package/types/nanahoshi-mona-ui-text-box.d.ts +1 -0
  109. package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -0
@@ -40,6 +40,7 @@ export declare class MultiSelectComponent<TData = unknown, TValue = TData> imple
40
40
  protected readonly baseClass: import("@angular/core").Signal<string>;
41
41
  protected readonly chipMessages: import("@angular/core").Signal<import("@nanahoshi/mona-ui/i18n").MonaChipMessages>;
42
42
  protected readonly clearButtonVisible: import("@angular/core").Signal<boolean>;
43
+ protected readonly describedBy: import("@angular/core").Signal<string | null>;
43
44
  protected readonly effectiveAriaLabel: import("@angular/core").Signal<string>;
44
45
  protected readonly effectiveDisabled: import("@angular/core").Signal<boolean>;
45
46
  protected readonly expanded: import("@angular/core").Signal<boolean>;
@@ -50,6 +51,7 @@ export declare class MultiSelectComponent<TData = unknown, TValue = TData> imple
50
51
  protected readonly invalidState: import("@angular/core").Signal<boolean>;
51
52
  protected readonly itemContainerClass: import("@angular/core").Signal<string>;
52
53
  protected readonly itemTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
54
+ protected readonly labelledBy: import("@angular/core").Signal<string | null>;
53
55
  protected readonly listId: string;
54
56
  protected readonly listPopupClass: import("@angular/core").Signal<string>;
55
57
  protected readonly messages: import("@angular/core").Signal<import("@nanahoshi/mona-ui/i18n").MonaMultiSelectMessages>;
@@ -25,12 +25,14 @@ declare abstract class NumericTextBoxBaseComponent<TValue extends number | strin
25
25
  #private;
26
26
  protected readonly beforeInput$: Subject<InputEvent>;
27
27
  protected readonly classes: Signal<string>;
28
+ protected readonly describedBy: Signal<string | null>;
28
29
  protected readonly effectiveDisabled: Signal<boolean>;
29
30
  protected readonly focused: import("@angular/core").WritableSignal<boolean>;
30
31
  protected readonly formattedValue: Signal<string>;
31
32
  protected readonly inputClasses: Signal<string>;
32
33
  protected readonly invalidInput: Signal<boolean>;
33
34
  protected readonly keydown$: Subject<KeyboardEvent>;
35
+ protected readonly labelledBy: Signal<string | null>;
34
36
  protected readonly messages: Signal<import("@nanahoshi/mona-ui/i18n").MonaNumericTextBoxMessages>;
35
37
  protected readonly prefixTemplateList: Signal<readonly TemplateRef<any>[]>;
36
38
  protected readonly rawInputValue: import("@angular/core").WritableSignal<string>;
@@ -36,6 +36,7 @@ export declare class OtpInputComponent implements OtpInputVariantInput, FormValu
36
36
  protected readonly derivedAutocomplete: import("@angular/core").Signal<string>;
37
37
  protected readonly derivedInputMode: import("@angular/core").Signal<string>;
38
38
  protected readonly derivedName: import("@angular/core").Signal<string | null>;
39
+ protected readonly describedBy: import("@angular/core").Signal<string | null>;
39
40
  protected readonly effectiveDisabled: import("@angular/core").Signal<boolean>;
40
41
  protected readonly hasFocus: import("@angular/core").WritableSignal<boolean>;
41
42
  protected readonly inputClass: import("@angular/core").Signal<string>;
@@ -32,6 +32,7 @@ type RadioButtonDirectiveInput = VariantInputs<RadioButtonDirectiveProps>;
32
32
  export declare class RadioButtonComponent<T = unknown> implements RadioButtonVariantInput, FormValueControl<T> {
33
33
  #private;
34
34
  protected readonly containerLabelClasses: import("@angular/core").Signal<string>;
35
+ protected readonly describedBy: import("@angular/core").Signal<string | null>;
35
36
  protected readonly effectiveDisabled: import("@angular/core").Signal<boolean>;
36
37
  protected readonly effectiveName: import("@angular/core").Signal<string>;
37
38
  protected readonly effectiveReadonly: import("@angular/core").Signal<boolean>;
@@ -266,6 +267,7 @@ export declare class RadioButtonComponent<T = unknown> implements RadioButtonVar
266
267
  export declare class RadioGroupComponent<T = unknown> implements FormValueControl<T> {
267
268
  #private;
268
269
  protected readonly classes: import("@angular/core").Signal<string>;
270
+ protected readonly describedBy: import("@angular/core").Signal<string | null>;
269
271
  protected readonly effectiveDisabled: import("@angular/core").Signal<boolean>;
270
272
  protected readonly invalidState: import("@angular/core").Signal<boolean>;
271
273
  protected readonly labelledBy: import("@angular/core").Signal<string | null>;
@@ -98,6 +98,7 @@ export declare class RatingComponent implements RatingVariantInput, FormValueCon
98
98
  protected readonly containerClasses: import("@angular/core").Signal<string>;
99
99
  protected readonly controlClasses: import("@angular/core").Signal<string>;
100
100
  protected readonly controlElement: import("@angular/core").Signal<ElementRef<HTMLElement>>;
101
+ protected readonly describedBy: import("@angular/core").Signal<string | null>;
101
102
  protected readonly displayValue: import("@angular/core").Signal<number>;
102
103
  protected readonly effectiveAriaLabelledBy: import("@angular/core").Signal<string | null>;
103
104
  protected readonly effectiveAriaValueText: import("@angular/core").Signal<string>;
@@ -57,6 +57,7 @@ type SegmentedVariantInput = SegmentedContainerVariantInput & SegmentedOptionVar
57
57
  export declare class SegmentedComponent<T extends SegmentedValue = SegmentedValue> implements SegmentedVariantInput, FormValueControl<T | null> {
58
58
  #private;
59
59
  protected readonly containerClasses: import("@angular/core").Signal<string>;
60
+ protected readonly describedBy: import("@angular/core").Signal<string | null>;
60
61
  protected readonly effectiveDisabled: import("@angular/core").Signal<boolean>;
61
62
  protected readonly geometryReady: import("@angular/core").Signal<boolean>;
62
63
  protected readonly groupName: string;
@@ -85,6 +86,11 @@ export declare class SegmentedComponent<T extends SegmentedValue = SegmentedValu
85
86
  * @default true
86
87
  */
87
88
  readonly animate: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
89
+ /**
90
+ * @description Id of an element that describes the segmented control, such as a hint or an error message.
91
+ * @default ""
92
+ */
93
+ readonly ariaDescribedBy: import("@angular/core").InputSignal<string>;
88
94
  /**
89
95
  * @description Accessible name for the radio group. Provide either `aria-label` or `aria-labelledby`.
90
96
  * @default null
@@ -183,6 +189,11 @@ export declare class SegmentedComponent<T extends SegmentedValue = SegmentedValu
183
189
  "required": false;
184
190
  "isSignal": true;
185
191
  };
192
+ "ariaDescribedBy": {
193
+ "alias": "aria-describedby";
194
+ "required": false;
195
+ "isSignal": true;
196
+ };
186
197
  "ariaLabel": {
187
198
  "alias": "aria-label";
188
199
  "required": false;
@@ -60,6 +60,7 @@ type SliderVariantInputs = SliderBaseVariantInputs & SliderTrackVariantInputs &
60
60
  declare abstract class SliderBaseComponent implements SliderVariantInputs {
61
61
  #private;
62
62
  protected readonly baseClasses: Signal<string>;
63
+ protected readonly describedBy: Signal<string | null>;
63
64
  protected readonly destroyRef: DestroyRef;
64
65
  protected readonly direction: Signal<import("@nanahoshi/mona-ui/i18n").MonaTextDirection>;
65
66
  protected readonly dragging: import("@angular/core").WritableSignal<boolean>;
@@ -23,6 +23,7 @@ type SwitchVariantInputs = SwitchBaseVariantInput & SwitchHandleVariantInput & S
23
23
  export declare class SwitchComponent implements SwitchVariantInputs, FormCheckboxControl {
24
24
  #private;
25
25
  protected readonly classes: import("@angular/core").Signal<string>;
26
+ protected readonly describedBy: import("@angular/core").Signal<string | null>;
26
27
  protected readonly effectiveDisabled: import("@angular/core").Signal<boolean>;
27
28
  protected readonly handleClasses: import("@angular/core").Signal<string>;
28
29
  protected readonly handleContentTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
@@ -31,6 +32,11 @@ export declare class SwitchComponent implements SwitchVariantInputs, FormCheckbo
31
32
  protected readonly labelledBy: import("@angular/core").Signal<string | null>;
32
33
  protected readonly offLabelTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
33
34
  protected readonly onLabelTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
35
+ /**
36
+ * @description Id of an element that describes the switch, such as a hint or an error message.
37
+ * @default ""
38
+ */
39
+ readonly ariaDescribedBy: import("@angular/core").InputSignal<string>;
34
40
  /**
35
41
  * @description Accessible name for the host element. Describe what the component represents.
36
42
  * When empty, assistive technology announces the role without a label.
@@ -118,6 +124,11 @@ export declare class SwitchComponent implements SwitchVariantInputs, FormCheckbo
118
124
  protected onBlur(): void;
119
125
  static ɵfac: i0.ɵɵFactoryDeclaration<SwitchComponent, never>;
120
126
  static ɵcmp: i0.ɵɵComponentDeclaration<SwitchComponent, "mona-switch", never, {
127
+ "ariaDescribedBy": {
128
+ "alias": "aria-describedby";
129
+ "required": false;
130
+ "isSignal": true;
131
+ };
121
132
  "ariaLabel": {
122
133
  "alias": "aria-label";
123
134
  "required": false;
@@ -19,6 +19,7 @@ type InputVariantInput = VariantInputs<InputVariantProps>;
19
19
  export declare class TextBoxComponent implements TextBoxVariantInput, FormValueControl<string> {
20
20
  #private;
21
21
  protected readonly classes: import("@angular/core").Signal<string>;
22
+ protected readonly describedBy: import("@angular/core").Signal<string | null>;
22
23
  protected readonly effectiveDisabled: import("@angular/core").Signal<boolean>;
23
24
  protected readonly inputRef: import("@angular/core").Signal<ElementRef<HTMLInputElement>>;
24
25
  protected readonly invalidInput: import("@angular/core").Signal<boolean>;
@@ -21,12 +21,14 @@ type TimePickerVariantInput = Omit<TimePickerBaseVariantInput, "focused">;
21
21
  export declare class TimePickerComponent implements FormValueControl<Date | null>, TimePickerVariantInput {
22
22
  #private;
23
23
  protected readonly baseClass: Signal<string>;
24
+ protected readonly describedBy: Signal<string | null>;
24
25
  protected readonly effectiveDisabled: Signal<boolean>;
25
26
  protected readonly effectiveFormat: Signal<string>;
26
27
  protected readonly effectiveHourFormat: Signal<HourFormat>;
27
28
  protected readonly expanded: Signal<boolean>;
28
29
  protected readonly inputAttributes: Signal<AttributeConfig>;
29
30
  protected readonly invalidState: Signal<boolean>;
31
+ protected readonly labelledBy: Signal<string | null>;
30
32
  protected readonly messages: Signal<import("@nanahoshi/mona-ui/i18n").MonaTimePickerMessages>;
31
33
  protected readonly pickerPopupClass: Signal<string>;
32
34
  protected readonly popupId: string;