@nanahoshi/mona-ui 0.1.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 (134) hide show
  1. package/README.md +25 -0
  2. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +590 -0
  3. package/fesm2022/nanahoshi-mona-ui-avatar.mjs +168 -0
  4. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +220 -0
  5. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +225 -0
  6. package/fesm2022/nanahoshi-mona-ui-button.mjs +497 -0
  7. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +1569 -0
  8. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +339 -0
  9. package/fesm2022/nanahoshi-mona-ui-chip.mjs +453 -0
  10. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +200 -0
  11. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +853 -0
  12. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +923 -0
  13. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +495 -0
  14. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +686 -0
  15. package/fesm2022/nanahoshi-mona-ui-common.mjs +642 -0
  16. package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +485 -0
  17. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +132 -0
  18. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +460 -0
  19. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +659 -0
  20. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +828 -0
  21. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +523 -0
  22. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +615 -0
  23. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +701 -0
  24. package/fesm2022/nanahoshi-mona-ui-editor.mjs +1400 -0
  25. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +245 -0
  26. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +170 -0
  27. package/fesm2022/nanahoshi-mona-ui-filter.mjs +680 -0
  28. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-cell.component-B9SQH5N-.mjs +105 -0
  29. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DlLwcCFT.mjs +42 -0
  30. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-Dgea-O0X.mjs +130 -0
  31. package/fesm2022/nanahoshi-mona-ui-grid-grid-toggle.component-DIUutx9s.mjs +773 -0
  32. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DRHycGIh.mjs +240 -0
  33. package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs +5374 -0
  34. package/fesm2022/nanahoshi-mona-ui-grid.mjs +2 -0
  35. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +87 -0
  36. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +154 -0
  37. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +1356 -0
  38. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2263 -0
  39. package/fesm2022/nanahoshi-mona-ui-internal.mjs +379 -0
  40. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +630 -0
  41. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +527 -0
  42. package/fesm2022/nanahoshi-mona-ui-list.mjs +4 -0
  43. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +966 -0
  44. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +641 -0
  45. package/fesm2022/nanahoshi-mona-ui-notification.mjs +536 -0
  46. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +597 -0
  47. package/fesm2022/nanahoshi-mona-ui-pager.mjs +790 -0
  48. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +83 -0
  49. package/fesm2022/nanahoshi-mona-ui-popover.mjs +325 -0
  50. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +1559 -0
  51. package/fesm2022/nanahoshi-mona-ui-popup.mjs +1321 -0
  52. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +294 -0
  53. package/fesm2022/nanahoshi-mona-ui-query.mjs +175 -0
  54. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +339 -0
  55. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +565 -0
  56. package/fesm2022/nanahoshi-mona-ui-slider.mjs +1049 -0
  57. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +636 -0
  58. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +843 -0
  59. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +537 -0
  60. package/fesm2022/nanahoshi-mona-ui-switch.mjs +308 -0
  61. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +664 -0
  62. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +111 -0
  63. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +369 -0
  64. package/fesm2022/nanahoshi-mona-ui-theme.mjs +314 -0
  65. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +450 -0
  66. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +723 -0
  67. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +716 -0
  68. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +733 -0
  69. package/fesm2022/nanahoshi-mona-ui-window.mjs +1329 -0
  70. package/fesm2022/nanahoshi-mona-ui.mjs +9 -0
  71. package/package.json +289 -0
  72. package/types/nanahoshi-mona-ui-auto-complete.d.ts +223 -0
  73. package/types/nanahoshi-mona-ui-avatar.d.ts +642 -0
  74. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +70 -0
  75. package/types/nanahoshi-mona-ui-button-group.d.ts +77 -0
  76. package/types/nanahoshi-mona-ui-button.d.ts +111 -0
  77. package/types/nanahoshi-mona-ui-calendar.d.ts +262 -0
  78. package/types/nanahoshi-mona-ui-check-box.d.ts +133 -0
  79. package/types/nanahoshi-mona-ui-chip.d.ts +130 -0
  80. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +113 -0
  81. package/types/nanahoshi-mona-ui-color-gradient.d.ts +201 -0
  82. package/types/nanahoshi-mona-ui-color-palette.d.ts +102 -0
  83. package/types/nanahoshi-mona-ui-color-picker.d.ts +156 -0
  84. package/types/nanahoshi-mona-ui-combo-box.d.ts +232 -0
  85. package/types/nanahoshi-mona-ui-common.d.ts +386 -0
  86. package/types/nanahoshi-mona-ui-contextmenu.d.ts +129 -0
  87. package/types/nanahoshi-mona-ui-date-input.d.ts +60 -0
  88. package/types/nanahoshi-mona-ui-date-picker.d.ts +177 -0
  89. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +199 -0
  90. package/types/nanahoshi-mona-ui-dialog.d.ts +261 -0
  91. package/types/nanahoshi-mona-ui-dropdown-button.d.ts +159 -0
  92. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +219 -0
  93. package/types/nanahoshi-mona-ui-dropdowns.d.ts +176 -0
  94. package/types/nanahoshi-mona-ui-editor.d.ts +113 -0
  95. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +87 -0
  96. package/types/nanahoshi-mona-ui-fieldset.d.ts +68 -0
  97. package/types/nanahoshi-mona-ui-filter.d.ts +115 -0
  98. package/types/nanahoshi-mona-ui-grid.d.ts +1114 -0
  99. package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +25 -0
  100. package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +28 -0
  101. package/types/nanahoshi-mona-ui-internal-list.d.ts +269 -0
  102. package/types/nanahoshi-mona-ui-internal-tree.d.ts +391 -0
  103. package/types/nanahoshi-mona-ui-internal.d.ts +136 -0
  104. package/types/nanahoshi-mona-ui-list-box.d.ts +225 -0
  105. package/types/nanahoshi-mona-ui-list-view.d.ts +188 -0
  106. package/types/nanahoshi-mona-ui-list.d.ts +1 -0
  107. package/types/nanahoshi-mona-ui-menubar.d.ts +198 -0
  108. package/types/nanahoshi-mona-ui-multi-select.d.ts +247 -0
  109. package/types/nanahoshi-mona-ui-notification.d.ts +106 -0
  110. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +161 -0
  111. package/types/nanahoshi-mona-ui-pager.d.ts +238 -0
  112. package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -0
  113. package/types/nanahoshi-mona-ui-popover.d.ts +130 -0
  114. package/types/nanahoshi-mona-ui-popup-menu.d.ts +412 -0
  115. package/types/nanahoshi-mona-ui-popup.d.ts +485 -0
  116. package/types/nanahoshi-mona-ui-progress-bar.d.ts +139 -0
  117. package/types/nanahoshi-mona-ui-query.d.ts +89 -0
  118. package/types/nanahoshi-mona-ui-radio-button.d.ts +128 -0
  119. package/types/nanahoshi-mona-ui-scroll-view.d.ts +166 -0
  120. package/types/nanahoshi-mona-ui-slider.d.ts +305 -0
  121. package/types/nanahoshi-mona-ui-split-button.d.ts +182 -0
  122. package/types/nanahoshi-mona-ui-splitter.d.ts +70 -0
  123. package/types/nanahoshi-mona-ui-stepper.d.ts +173 -0
  124. package/types/nanahoshi-mona-ui-switch.d.ts +125 -0
  125. package/types/nanahoshi-mona-ui-tabs.d.ts +158 -0
  126. package/types/nanahoshi-mona-ui-text-area.d.ts +42 -0
  127. package/types/nanahoshi-mona-ui-text-box.d.ts +164 -0
  128. package/types/nanahoshi-mona-ui-theme.d.ts +23 -0
  129. package/types/nanahoshi-mona-ui-time-picker.d.ts +184 -0
  130. package/types/nanahoshi-mona-ui-time-selector.d.ts +143 -0
  131. package/types/nanahoshi-mona-ui-tooltip.d.ts +130 -0
  132. package/types/nanahoshi-mona-ui-tree-view.d.ts +274 -0
  133. package/types/nanahoshi-mona-ui-window.d.ts +295 -0
  134. package/types/nanahoshi-mona-ui.d.ts +2 -0
@@ -0,0 +1,102 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { Signal } from '@angular/core';
3
+ import { FormValueControl } from '@angular/forms/signals';
4
+ import { PaletteType } from '@nanahoshi/mona-ui/common';
5
+ import { VariantInputs, ColorScheme } from '@nanahoshi/mona-ui/internal';
6
+ import * as class_variance_authority_types from 'class-variance-authority/types';
7
+ import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
8
+ import { VariantProps } from 'class-variance-authority';
9
+
10
+ declare const colorPaletteBaseThemeVariants: (theme: ThemeStyle) => (props?: class_variance_authority_types.ClassProp | undefined) => string;
11
+ declare const colorPaletteItemThemeVariants: (theme: ThemeStyle) => (props?: ({
12
+ rounded?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
13
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
14
+ type ColorPaletteBaseVariantProps = VariantProps<ReturnType<typeof colorPaletteBaseThemeVariants>>;
15
+ type ColorPaletteBaseVariantInput = VariantInputs<ColorPaletteBaseVariantProps>;
16
+ type ColorPaletteItemVariantProps = VariantProps<ReturnType<typeof colorPaletteItemThemeVariants>>;
17
+ type ColorPaletteItemVariantInput = VariantInputs<ColorPaletteItemVariantProps>;
18
+ type ColorPaletteVariantProps = ColorPaletteBaseVariantProps & ColorPaletteItemVariantProps;
19
+ type ColorPaletteVariantInput = ColorPaletteBaseVariantInput & ColorPaletteItemVariantInput;
20
+
21
+ declare class ColorPaletteComponent implements ColorPaletteVariantInput, FormValueControl<string | null> {
22
+ #private;
23
+ protected readonly baseClasses: Signal<string>;
24
+ protected readonly colorScheme: Signal<ColorScheme>;
25
+ protected readonly paletteItemClasses: Signal<string>;
26
+ protected readonly colorRows: Signal<string[][]>;
27
+ protected readonly focusedColorIndex: _angular_core.WritableSignal<number>;
28
+ protected readonly activeColorIndex: Signal<number>;
29
+ protected readonly invalidState: Signal<boolean>;
30
+ /**
31
+ * @description The number of columns in the color palette grid.
32
+ * Only applicable when using a custom palette.
33
+ * @default 10
34
+ */
35
+ readonly columns: _angular_core.InputSignal<number>;
36
+ /**
37
+ * @description Renders the component with reduced visual emphasis and removes pointer interaction.
38
+ * @default false
39
+ */
40
+ readonly disabled: _angular_core.InputSignal<boolean>;
41
+ /**
42
+ * @description Marks the color palette as invalid. When bound to a signal form field via `[formField]`,
43
+ * this is written by the `FormField` directive.
44
+ * @default false
45
+ */
46
+ readonly invalid: _angular_core.InputSignal<boolean>;
47
+ /**
48
+ * @description The palette to display — one of the built-in `"flat"`, `"material"`, or `"websafe"` schemes, or a
49
+ * custom iterable of color strings. An empty custom palette falls back to the flat scheme.
50
+ * @default []
51
+ */
52
+ readonly palette: _angular_core.InputSignal<PaletteType | Iterable<string>>;
53
+ /**
54
+ * @description Prevents value changes while preserving the component's visual state. When bound to a signal
55
+ * form field via `[formField]`, this is written by the `FormField` directive.
56
+ * @default false
57
+ */
58
+ readonly readonly: _angular_core.InputSignal<boolean>;
59
+ /**
60
+ * @description Border-radius preset applied to the color palette items.
61
+ * @default "none"
62
+ */
63
+ readonly rounded: _angular_core.InputSignal<"none" | "small" | "medium" | "large" | "full" | null | undefined>;
64
+ /**
65
+ * @description Sets whether the color palette is required. When bound to a signal form field via `[formField]`,
66
+ * this is written by the `FormField` directive.
67
+ * @default false
68
+ */
69
+ readonly required: _angular_core.InputSignal<boolean>;
70
+ /**
71
+ * @description The size of each tile in the color palette grid.
72
+ * @default 18
73
+ */
74
+ readonly tileSize: _angular_core.InputSignal<number>;
75
+ /**
76
+ * @description Emitted when the color palette is interacted with on blur or color selection.
77
+ * The `FormField` directive listens to this to mark the field as touched.
78
+ */
79
+ readonly touch: _angular_core.OutputEmitterRef<void>;
80
+ /**
81
+ * @description Sets the touched state of the color palette. When bound to a signal form field via `[formField]`,
82
+ * this is written by the `FormField` directive.
83
+ * @default false
84
+ */
85
+ readonly touched: _angular_core.InputSignal<boolean>;
86
+ /**
87
+ * @description Two-way bindable current color value.
88
+ * @default null
89
+ */
90
+ readonly value: _angular_core.ModelSignal<string | null>;
91
+ protected focusColorTile(index: number): void;
92
+ protected onColorBlur(): void;
93
+ protected onColorFocus(index: number): void;
94
+ protected onColorSelect(color: string): void;
95
+ protected onKeyDown(event: KeyboardEvent, colorIndex: number): void;
96
+ private getColorScheme;
97
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ColorPaletteComponent, never>;
98
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ColorPaletteComponent, "mona-color-palette", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "palette": { "alias": "palette"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "tileSize": { "alias": "tileSize"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "touch": "touch"; "value": "valueChange"; }, never, never, true, never>;
99
+ }
100
+
101
+ export { ColorPaletteComponent };
102
+ export type { ColorPaletteVariantProps };
@@ -0,0 +1,156 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { OnInit, Signal, TemplateRef } from '@angular/core';
3
+ import * as _fortawesome_fontawesome_common_types from '@fortawesome/fontawesome-common-types';
4
+ import { FormValueControl } from '@angular/forms/signals';
5
+ import { PaletteType } from '@nanahoshi/mona-ui/common';
6
+ import * as class_variance_authority_types from 'class-variance-authority/types';
7
+ import { VariantProps } from 'class-variance-authority';
8
+ import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
9
+ import { VariantInputs } from '@nanahoshi/mona-ui/internal';
10
+
11
+ type ColorPickerView = "gradient" | "palette";
12
+
13
+ declare const colorPickerBaseThemeVariants: (theme: ThemeStyle) => (props?: ({
14
+ expanded?: boolean | null | undefined;
15
+ rounded?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
16
+ size?: "small" | "medium" | "large" | null | undefined;
17
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
18
+ declare const colorPickerColorThemeVariants: (theme: ThemeStyle) => (props?: ({
19
+ rounded?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
20
+ size?: "small" | "medium" | "large" | null | undefined;
21
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
22
+ type ColorPickerBaseVariantProps = VariantProps<ReturnType<typeof colorPickerBaseThemeVariants>>;
23
+ type ColorPickerBaseVariantInput = VariantInputs<ColorPickerBaseVariantProps>;
24
+ type ColorPickerColorVariantProps = VariantProps<ReturnType<typeof colorPickerColorThemeVariants>>;
25
+ type ColorPickerColorVariantInput = VariantInputs<ColorPickerColorVariantProps>;
26
+ type ColorPickerVariantProps = ColorPickerBaseVariantProps & ColorPickerColorVariantProps;
27
+ type ColorPickerVariantInput = Omit<ColorPickerBaseVariantInput, "expanded"> & ColorPickerColorVariantInput;
28
+
29
+ declare class ColorPickerComponent implements OnInit, ColorPickerVariantInput, FormValueControl<string | null> {
30
+ #private;
31
+ protected readonly baseClasses: Signal<string>;
32
+ protected readonly colorClasses: Signal<string>;
33
+ protected readonly expanded: Signal<boolean>;
34
+ protected readonly invalidState: Signal<boolean>;
35
+ protected readonly noColorIcon: _fortawesome_fontawesome_common_types.IconDefinition;
36
+ protected readonly dropdownIcon: _fortawesome_fontawesome_common_types.IconDefinition;
37
+ protected readonly popupId: string;
38
+ protected readonly popupTemplate: Signal<TemplateRef<any>>;
39
+ protected readonly valueTemplate: Signal<TemplateRef<any> | undefined>;
40
+ /**
41
+ * @description Whether to close the color picker when a color is selected.
42
+ * Only applies when the view is set to "palette".
43
+ * @default true
44
+ */
45
+ readonly closeOnSelect: _angular_core.InputSignal<boolean>;
46
+ /**
47
+ * @description The number of columns to display in the color palette.
48
+ * Only applies when the view is set to "palette" and the palette is a custom array of colors.
49
+ * @default 10
50
+ */
51
+ readonly columns: _angular_core.InputSignal<number>;
52
+ /**
53
+ * @description Renders the component with reduced visual emphasis and removes pointer interaction.
54
+ * @default false
55
+ */
56
+ readonly disabled: _angular_core.InputSignal<boolean>;
57
+ /**
58
+ * @description Marks the color picker as invalid. When bound to a signal form field via `[formField]`,
59
+ * this is written by the `FormField` directive.
60
+ * @default false
61
+ */
62
+ readonly invalid: _angular_core.InputSignal<boolean>;
63
+ /**
64
+ * @description Whether to display the opacity slider.
65
+ * Only applies when the view is set to "gradient".
66
+ * @default true
67
+ */
68
+ readonly opacity: _angular_core.InputSignal<boolean>;
69
+ /**
70
+ * @description The type of color palette to use.
71
+ * This can be a predefined palette type like "flat", "material", or "websafe",
72
+ * or a custom iterable of colors.
73
+ * @default "flat"
74
+ */
75
+ readonly palette: _angular_core.InputSignal<Iterable<string> | PaletteType>;
76
+ /**
77
+ * @description Prevents value changes while preserving the component's visual state. When bound to a signal
78
+ * form field via `[formField]`, this is written by the `FormField` directive.
79
+ * @default false
80
+ */
81
+ readonly readonly: _angular_core.InputSignal<boolean>;
82
+ /**
83
+ * @description Border-radius preset applied to the color picker.
84
+ * @default "medium"
85
+ */
86
+ readonly rounded: _angular_core.InputSignal<"none" | "small" | "medium" | "large" | "full" | null | undefined>;
87
+ /**
88
+ * @description Whether to show the clear button to reset the color.
89
+ * This is only applicable when the view is set to "palette".
90
+ * @default false
91
+ */
92
+ readonly showClearButton: _angular_core.InputSignal<boolean>;
93
+ /**
94
+ * @description Size preset controlling the color picker's dimensions.
95
+ * @default "medium"
96
+ */
97
+ readonly size: _angular_core.InputSignal<"small" | "medium" | "large" | null | undefined>;
98
+ /**
99
+ * @description The view mode of the color picker.
100
+ * This can be either "palette" or "gradient".
101
+ * @default "gradient"
102
+ */
103
+ readonly view: _angular_core.InputSignal<ColorPickerView>;
104
+ /**
105
+ * @description Sets whether the color picker is required. When bound to a signal form field via `[formField]`,
106
+ * this is written by the `FormField` directive.
107
+ * @default false
108
+ */
109
+ readonly required: _angular_core.InputSignal<boolean>;
110
+ /**
111
+ * @description Emitted when the color picker is interacted with on blur or color selection.
112
+ * The `FormField` directive listens to this to mark the field as touched.
113
+ */
114
+ readonly touch: _angular_core.OutputEmitterRef<void>;
115
+ /**
116
+ * @description Sets the touched state of the color picker. When bound to a signal form field via `[formField]`,
117
+ * this is written by the `FormField` directive.
118
+ * @default false
119
+ */
120
+ readonly touched: _angular_core.InputSignal<boolean>;
121
+ /**
122
+ * @description Two-way bindable current color value.
123
+ * @default null
124
+ */
125
+ readonly value: _angular_core.ModelSignal<string | null>;
126
+ ngOnInit(): void;
127
+ protected onClearClick(): void;
128
+ onColorGradientApply(): void;
129
+ onColorGradientCancel(): void;
130
+ protected onColorGradientValueChange(value: string | null | undefined): void;
131
+ protected onColorGradientTouch(): void;
132
+ protected onColorPaletteValueChange(value: string | null): void;
133
+ protected onColorPaletteTouch(): void;
134
+ protected onPaletteContainerKeyDown(event: KeyboardEvent): void;
135
+ protected open(): void;
136
+ private close;
137
+ private focusFirstColorTile;
138
+ private focusPopupContent;
139
+ private setEventListeners;
140
+ private setKeyboardEventListeners;
141
+ private setupPopupKeyboardHandling;
142
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ColorPickerComponent, never>;
143
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ColorPickerComponent, "mona-color-picker", never, { "closeOnSelect": { "alias": "closeOnSelect"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "opacity": { "alias": "opacity"; "required": false; "isSignal": true; }; "palette": { "alias": "palette"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "touch": "touch"; "value": "valueChange"; }, ["valueTemplate"], never, true, never>;
144
+ }
145
+
146
+ declare class ColorPickerValueTemplateDirective {
147
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ColorPickerValueTemplateDirective, never>;
148
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ColorPickerValueTemplateDirective, "ng-template[monaColorPickerValueTemplate]", never, {}, {}, never, never, true, never>;
149
+ }
150
+
151
+ interface ColorPickerValueTemplateContext {
152
+ $implicit: string;
153
+ }
154
+
155
+ export { ColorPickerComponent, ColorPickerValueTemplateDirective };
156
+ export type { ColorPickerValueTemplateContext, ColorPickerVariantProps, ColorPickerView };
@@ -0,0 +1,232 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { TemplateRef } from '@angular/core';
3
+ import { FormValueControl } from '@angular/forms/signals';
4
+ import { PreventableEvent } from '@nanahoshi/mona-ui/common';
5
+ import * as i1 from '@nanahoshi/mona-ui/dropdowns';
6
+ import { DropdownDataInput, DropdownPopupInput, DropdownPopupVariantInput, DropdownFieldPredicateType, DropdownFieldSelectorType } from '@nanahoshi/mona-ui/dropdowns';
7
+ import { SelectableOptions, ListItem, ListSizeInputType, SelectionChangeEvent } from '@nanahoshi/mona-ui/internal/list';
8
+ import { PopupCloseEvent } from '@nanahoshi/mona-ui/popup';
9
+ import { Subject } from 'rxjs';
10
+ import * as class_variance_authority_types from 'class-variance-authority/types';
11
+ import { VariantInputs } from '@nanahoshi/mona-ui/internal';
12
+ import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
13
+ import { VariantProps } from 'class-variance-authority';
14
+
15
+ declare const comboBoxBaseThemeVariants: (theme: ThemeStyle) => (props?: ({
16
+ disabled?: boolean | null | undefined;
17
+ focused?: boolean | null | undefined;
18
+ invalid?: boolean | null | undefined;
19
+ rounded?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
20
+ size?: "small" | "medium" | "large" | null | undefined;
21
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
22
+ declare const comboBoxTextInputThemeVariants: (theme: ThemeStyle) => (props?: ({
23
+ rounded?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
24
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
25
+ declare const comboBoxAffixContainerThemeVariants: (theme: ThemeStyle) => (props?: class_variance_authority_types.ClassProp | undefined) => string;
26
+ type ComboBoxBaseVariantProps = VariantProps<ReturnType<typeof comboBoxBaseThemeVariants>>;
27
+ type ComboBoxBaseVariantInput = VariantInputs<ComboBoxBaseVariantProps>;
28
+ type ComboBoxTextInputVariantProps = VariantProps<ReturnType<typeof comboBoxTextInputThemeVariants>>;
29
+ type ComboBoxTextInputVariantInput = VariantInputs<ComboBoxTextInputVariantProps>;
30
+ type ComboBoxAffixContainerVariantProps = VariantProps<ReturnType<typeof comboBoxAffixContainerThemeVariants>>;
31
+ type ComboBoxAffixContainerVariantInput = VariantInputs<ComboBoxAffixContainerVariantProps>;
32
+ type ComboBoxVariantProps = ComboBoxBaseVariantProps & ComboBoxTextInputVariantProps & ComboBoxAffixContainerVariantProps;
33
+ type ComboBoxVariantInput = Omit<ComboBoxBaseVariantInput, "focused" | "invalid"> & ComboBoxTextInputVariantInput & ComboBoxAffixContainerVariantInput;
34
+
35
+ declare class ComboBoxComponent<TData = unknown> implements FormValueControl<TData | null>, ComboBoxVariantInput, DropdownDataInput<TData>, DropdownPopupInput, DropdownPopupVariantInput {
36
+ #private;
37
+ protected readonly activeDescendant: _angular_core.Signal<string | null>;
38
+ protected readonly affixClass: _angular_core.Signal<string>;
39
+ protected readonly baseClass: _angular_core.Signal<string>;
40
+ protected readonly comboBoxValue$: Subject<string | null>;
41
+ protected readonly comboBoxValue: _angular_core.WritableSignal<string>;
42
+ protected readonly effectiveAriaLabel: _angular_core.Signal<string>;
43
+ protected readonly expanded: _angular_core.Signal<boolean>;
44
+ protected readonly footerTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
45
+ protected readonly groupHeaderTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
46
+ protected readonly headerTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
47
+ protected readonly id: string;
48
+ protected readonly inputClass: _angular_core.Signal<string>;
49
+ protected readonly invalidState: _angular_core.Signal<boolean>;
50
+ protected readonly itemTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
51
+ protected readonly listId: string;
52
+ protected readonly listPopupClass: _angular_core.Signal<string>;
53
+ protected readonly noDataTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
54
+ protected readonly popupTemplate: _angular_core.Signal<TemplateRef<any>>;
55
+ protected readonly prefixTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
56
+ protected readonly selectableOptions: SelectableOptions;
57
+ protected readonly selectedListItem: _angular_core.Signal<ListItem<any> | null>;
58
+ protected readonly valueText: _angular_core.Signal<string>;
59
+ /**
60
+ * @description Allows a custom value to be committed when it doesn't match any item in {@link data}.
61
+ * @default false
62
+ */
63
+ readonly allowCustomValue: _angular_core.InputSignal<boolean>;
64
+ /**
65
+ * @description ID of an element that provides an extended description for the input.
66
+ * @default ""
67
+ */
68
+ readonly ariaDescribedBy: _angular_core.InputSignal<string>;
69
+ /**
70
+ * @description Accessible name for the input. Describe what the combo box represents.
71
+ * Falls back to {@link placeholder} when neither this nor {@link ariaLabelledBy} is set.
72
+ * @default ""
73
+ */
74
+ readonly ariaLabel: _angular_core.InputSignal<string>;
75
+ /**
76
+ * @description ID of an external element that provides the accessible name for the input.
77
+ * @default ""
78
+ */
79
+ readonly ariaLabelledBy: _angular_core.InputSignal<string>;
80
+ /**
81
+ * @description Emitted when the popup is about to close. This event is preventable.
82
+ */
83
+ readonly close: _angular_core.OutputEmitterRef<PopupCloseEvent<unknown>>;
84
+ /**
85
+ * @description Emitted after the popup is closed.
86
+ */
87
+ readonly closed: _angular_core.OutputEmitterRef<void>;
88
+ /**
89
+ * @description Collection of items to render.
90
+ * @default []
91
+ */
92
+ readonly data: _angular_core.InputSignal<Iterable<TData>>;
93
+ /**
94
+ * @description Renders the component with reduced visual emphasis and removes pointer interaction.
95
+ * @default false
96
+ */
97
+ readonly disabled: _angular_core.ModelSignal<boolean>;
98
+ /**
99
+ * @description A predicate function or the name of the field that determines whether an item is disabled.
100
+ * @default undefined
101
+ */
102
+ readonly itemDisabled: _angular_core.InputSignal<DropdownFieldPredicateType<TData>>;
103
+ /**
104
+ * @description Marks the combo box as invalid. When bound to a signal form field via `[formField]`,
105
+ * this is written by the `FormField` directive.
106
+ * @default false
107
+ */
108
+ readonly invalid: _angular_core.InputSignal<boolean>;
109
+ /**
110
+ * @description Displays a loading indicator and prevents interaction while an operation is in progress.
111
+ * @default false
112
+ */
113
+ readonly loading: _angular_core.InputSignal<boolean>;
114
+ /**
115
+ * @description Emitted when the popup is about to open. This event is preventable.
116
+ */
117
+ readonly open: _angular_core.OutputEmitterRef<PreventableEvent<Event>>;
118
+ /**
119
+ * @description Emitted after the popup is opened.
120
+ */
121
+ readonly opened: _angular_core.OutputEmitterRef<void>;
122
+ /**
123
+ * @description Placeholder text shown when no value is selected or entered.
124
+ * @default ""
125
+ */
126
+ readonly placeholder: _angular_core.InputSignal<string>;
127
+ /**
128
+ * @description Sets the class of the popup element.
129
+ * @default ""
130
+ */
131
+ readonly popupClass: _angular_core.InputSignal<string>;
132
+ /**
133
+ * @description Sets the height of the popup element.
134
+ * @default null
135
+ */
136
+ readonly popupHeight: _angular_core.InputSignal<ListSizeInputType>;
137
+ /**
138
+ * @description Sets the width of the popup element.
139
+ * @default null
140
+ */
141
+ readonly popupWidth: _angular_core.InputSignal<ListSizeInputType>;
142
+ /**
143
+ * @description Prevents value changes while preserving the component's visual state.
144
+ * @default false
145
+ */
146
+ readonly readonly: _angular_core.InputSignal<boolean>;
147
+ /**
148
+ * @description Sets the required state of the combo box component.
149
+ * @default false
150
+ */
151
+ readonly required: _angular_core.InputSignal<boolean>;
152
+ /**
153
+ * @description Border-radius preset applied to the component.
154
+ * @default "medium"
155
+ */
156
+ readonly rounded: _angular_core.InputSignal<"none" | "small" | "medium" | "large" | "full" | null | undefined>;
157
+ /**
158
+ * @description Displays a button that resets the value to empty when an item is selected.
159
+ * @default false
160
+ */
161
+ readonly showClearButton: _angular_core.InputSignal<boolean>;
162
+ /**
163
+ * @description Size preset controlling the component's dimensions.
164
+ * @default "medium"
165
+ */
166
+ readonly size: _angular_core.InputSignal<"small" | "medium" | "large" | null | undefined>;
167
+ /**
168
+ * @description Property name or accessor used to derive the display text from a data item.
169
+ * If not set, the item itself is used as the text representation.
170
+ * @default undefined
171
+ */
172
+ readonly textField: _angular_core.InputSignal<DropdownFieldSelectorType<TData>>;
173
+ /**
174
+ * @description Emitted when the combo box is interacted with on blur, selection, clear, or committed input.
175
+ * The `FormField` directive listens to this to mark the field as touched.
176
+ */
177
+ readonly touch: _angular_core.OutputEmitterRef<void>;
178
+ /**
179
+ * @description Sets the touched state of the combo box. When bound to a signal form field via `[formField]`,
180
+ * this is written by the `FormField` directive.
181
+ * @default false
182
+ */
183
+ readonly touched: _angular_core.InputSignal<boolean>;
184
+ /**
185
+ * @description Additional CSS classes merged onto the host element via `tailwind-merge`.
186
+ * @default ""
187
+ */
188
+ readonly userClass: _angular_core.InputSignal<string>;
189
+ /**
190
+ * @description Emitted with the entered text when the user presses Enter on unmatched input.
191
+ * Only emitted when {@link allowCustomValue} is true.
192
+ */
193
+ readonly valueAdd: _angular_core.OutputEmitterRef<string>;
194
+ /**
195
+ * @description Property name or accessor used to derive the value from a data item.
196
+ * If not set, the item itself is used as the value representation.
197
+ * @default undefined
198
+ */
199
+ readonly valueField: _angular_core.InputSignal<DropdownFieldSelectorType<TData>>;
200
+ /**
201
+ * @description Two-way bindable current selected value. Implements `FormValueControl<TData | null>`,
202
+ * enabling signal forms `[formField]` binding. When `valueField` is set, primitive field values can be
203
+ * written into this model to restore a matching selected item.
204
+ * @default null
205
+ */
206
+ readonly value: _angular_core.ModelSignal<TData | null>;
207
+ constructor();
208
+ protected onInputBlur(): void;
209
+ protected onItemSelect(event: SelectionChangeEvent<TData>): void;
210
+ protected onValueClear(event: Event): void;
211
+ private clear;
212
+ private closePopup;
213
+ focus(): void;
214
+ private initialize;
215
+ private notifyFilterChange;
216
+ private setArrowNavigationSubscription;
217
+ private setComboboxValueSubscription;
218
+ private handleEnterKey;
219
+ private selectItem;
220
+ private setEscapeKeySubscription;
221
+ private setKeydownSubscription;
222
+ private setNavigatedItemSubscription;
223
+ private setPopupCloseSubscriptions;
224
+ private setSpaceKeySubscription;
225
+ private setSubscriptions;
226
+ private updateValue;
227
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboBoxComponent<any>, never>;
228
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ComboBoxComponent<any>, "mona-combo-box", never, { "allowCustomValue": { "alias": "allowCustomValue"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "itemDisabled": { "alias": "itemDisabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "popupClass": { "alias": "popupClass"; "required": false; "isSignal": true; }; "popupHeight": { "alias": "popupHeight"; "required": false; "isSignal": true; }; "popupWidth": { "alias": "popupWidth"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "close": "close"; "closed": "closed"; "disabled": "disabledChange"; "open": "open"; "opened": "opened"; "touch": "touch"; "valueAdd": "valueAdd"; "value": "valueChange"; }, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate", "prefixTemplate"], never, true, [{ directive: typeof i1.DropdownDataHandlerDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DropdownListPopupHandlerDirective; inputs: {}; outputs: {}; }]>;
229
+ }
230
+
231
+ export { ComboBoxComponent };
232
+ export type { ComboBoxVariantProps };