@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,113 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { OnDestroy, OnInit, ElementRef } from '@angular/core';
3
+ import { JSONContent, Editor } from '@tiptap/core';
4
+ import { ImmutableSet } from '@mirei/ts-collections';
5
+ import { EditorState } from '@tiptap/pm/state';
6
+ import { Subject } from 'rxjs';
7
+
8
+ interface ContentChangeEvent {
9
+ html: string;
10
+ json: JSONContent;
11
+ }
12
+
13
+ interface EditorSettings {
14
+ alignment: boolean;
15
+ blockquote: boolean;
16
+ bold: boolean;
17
+ code: boolean;
18
+ fontColor: boolean;
19
+ fontFamily: boolean;
20
+ fontHighlight: boolean;
21
+ fontList: Iterable<string>;
22
+ fontSize: boolean;
23
+ headings: boolean;
24
+ history: boolean;
25
+ horizontalRule: boolean;
26
+ image: boolean;
27
+ indent: boolean;
28
+ italic: boolean;
29
+ link: boolean;
30
+ list: boolean;
31
+ strikethrough: boolean;
32
+ subscript: boolean;
33
+ superscript: boolean;
34
+ table: boolean;
35
+ taskList: boolean;
36
+ underline: boolean;
37
+ }
38
+
39
+ declare class EditorService {
40
+ #private;
41
+ readonly blur$: Subject<void>;
42
+ readonly create$: Subject<void>;
43
+ readonly focus$: Subject<void>;
44
+ readonly fontSizes: _angular_core.WritableSignal<ImmutableSet<string>>;
45
+ readonly fonts: _angular_core.WritableSignal<ImmutableSet<string>>;
46
+ readonly state: _angular_core.Signal<EditorState>;
47
+ readonly selectionUpdate$: Subject<void>;
48
+ readonly settings: _angular_core.WritableSignal<Partial<EditorSettings>>;
49
+ readonly update$: Subject<void>;
50
+ destroy(): void;
51
+ setupEditor(element: HTMLDivElement, settings: Partial<EditorSettings>): void;
52
+ get editor(): Editor;
53
+ private getExtensionsFromSettings;
54
+ private getCustomizedStarterKitExtension;
55
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EditorService, never>;
56
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<EditorService>;
57
+ }
58
+
59
+ declare class EditorComponent implements OnDestroy, OnInit {
60
+ protected readonly editorContainer: _angular_core.Signal<ElementRef<HTMLDivElement>>;
61
+ protected readonly editorService: EditorService;
62
+ /**
63
+ * Emits when the editor loses focus.
64
+ */
65
+ readonly blur: _angular_core.OutputEmitterRef<void>;
66
+ /**
67
+ * Emits when the editor is created for the first time and is ready to be used.
68
+ */
69
+ readonly create: _angular_core.OutputEmitterRef<void>;
70
+ /**
71
+ * Emits when the editor gains focus.
72
+ */
73
+ readonly focus: _angular_core.OutputEmitterRef<void>;
74
+ /**
75
+ * Emits when the selection of the editor changes.
76
+ */
77
+ readonly selectionUpdate: _angular_core.OutputEmitterRef<void>;
78
+ /**
79
+ * Emits when the content of the editor changes.
80
+ */
81
+ readonly update: _angular_core.OutputEmitterRef<ContentChangeEvent>;
82
+ /**
83
+ * The initial content of the editor.
84
+ * Accepted values are:
85
+ * - A string representing the HTML content.
86
+ * - A {@link JSONContent} representing the content.
87
+ */
88
+ content: _angular_core.InputSignal<string | JSONContent | undefined>;
89
+ /**
90
+ * The settings of the editor.
91
+ */
92
+ settings: _angular_core.InputSignal<Partial<EditorSettings>>;
93
+ constructor();
94
+ ngOnDestroy(): void;
95
+ ngOnInit(): void;
96
+ private loadEditorContent;
97
+ private setSubscriptions;
98
+ /**
99
+ * Returns the HTML content of the editor.
100
+ * It can be used to save the content of the editor in a database and restore it later.
101
+ */
102
+ get html(): string;
103
+ /**
104
+ * Returns the JSON content of the editor in the {@link JSONContent} format.
105
+ * It can be used to save the content of the editor in a database and restore it later.
106
+ */
107
+ get json(): JSONContent;
108
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EditorComponent, never>;
109
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EditorComponent, "mona-editor", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "settings": { "alias": "settings"; "required": false; "isSignal": true; }; }, { "blur": "blur"; "create": "create"; "focus": "focus"; "selectionUpdate": "selectionUpdate"; "update": "update"; }, never, never, true, never>;
110
+ }
111
+
112
+ export { EditorComponent };
113
+ export type { ContentChangeEvent, EditorSettings };
@@ -0,0 +1,87 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { TemplateRef } from '@angular/core';
3
+ import * as class_variance_authority_types from 'class-variance-authority/types';
4
+ import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
5
+ import { VariantInputs } from '@nanahoshi/mona-ui/internal';
6
+ import { VariantProps } from 'class-variance-authority';
7
+
8
+ declare const expansionPanelBaseThemeVariants: (theme: ThemeStyle) => (props?: ({
9
+ rounded?: "small" | "medium" | "large" | "none" | null | undefined;
10
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
11
+ declare const expansionPanelHeaderThemeVariants: (theme: ThemeStyle) => (props?: ({
12
+ collapsed?: boolean | null | undefined;
13
+ disabled?: boolean | null | undefined;
14
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
15
+ declare const expansionPanelIconContainerThemeVariants: (theme: ThemeStyle) => (props?: ({
16
+ hasTemplate?: boolean | null | undefined;
17
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
18
+ declare const expansionPanelContentThemeVariants: (theme: ThemeStyle) => (props?: ({
19
+ expanded?: boolean | null | undefined;
20
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
21
+ type ExpansionPanelBaseVariantProps = VariantProps<ReturnType<typeof expansionPanelBaseThemeVariants>>;
22
+ type ExpansionPanelBaseVariantInput = VariantInputs<ExpansionPanelBaseVariantProps>;
23
+ type ExpansionPanelHeaderVariantProps = VariantProps<ReturnType<typeof expansionPanelHeaderThemeVariants>>;
24
+ type ExpansionPanelHeaderVariantInput = VariantInputs<ExpansionPanelHeaderVariantProps>;
25
+ type ExpansionPanelContentVariantProps = VariantProps<ReturnType<typeof expansionPanelContentThemeVariants>>;
26
+ type ExpansionPanelContentVariantInput = VariantInputs<ExpansionPanelContentVariantProps>;
27
+ type ExpansionPanelIconContainerVariantProps = VariantProps<ReturnType<typeof expansionPanelIconContainerThemeVariants>>;
28
+ type ExpansionPanelIconContainerVariantInput = VariantInputs<ExpansionPanelIconContainerVariantProps>;
29
+ type ExpansionPanelVariantInput = ExpansionPanelBaseVariantInput & Omit<ExpansionPanelHeaderVariantInput, "collapsed"> & ExpansionPanelContentVariantInput & Omit<ExpansionPanelIconContainerVariantInput, "hasTemplate">;
30
+
31
+ declare class ExpansionPanelComponent implements ExpansionPanelVariantInput {
32
+ #private;
33
+ protected readonly actionsTemplateList: _angular_core.Signal<readonly TemplateRef<any>[]>;
34
+ protected readonly baseClass: _angular_core.Signal<string>;
35
+ protected readonly contentClass: _angular_core.Signal<string>;
36
+ protected readonly contentId: string;
37
+ protected readonly headerClass: _angular_core.Signal<string>;
38
+ protected readonly headerTitleClass: _angular_core.Signal<string>;
39
+ protected readonly iconContainerClass: _angular_core.Signal<string>;
40
+ protected readonly iconTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
41
+ protected readonly titleTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
42
+ /**
43
+ * @description Disables header interaction, suppressing click and keyboard toggling.
44
+ * @default false
45
+ */
46
+ readonly disabled: _angular_core.InputSignal<boolean>;
47
+ /**
48
+ * @description Sets whether the expansion panel is expanded or collapsed.
49
+ * @default false
50
+ */
51
+ readonly expanded: _angular_core.ModelSignal<boolean>;
52
+ /**
53
+ * @description Sets the border radius of the expansion panel.
54
+ * @default "medium"
55
+ */
56
+ readonly rounded: _angular_core.InputSignal<"small" | "medium" | "large" | "none" | null | undefined>;
57
+ /**
58
+ * @description Sets the title of the expansion panel.
59
+ * @default ""
60
+ */
61
+ readonly title: _angular_core.InputSignal<string>;
62
+ /**
63
+ * @description Additional CSS classes merged onto the host element via `tailwind-merge`.
64
+ * @default ""
65
+ */
66
+ readonly userClass: _angular_core.InputSignal<string>;
67
+ protected toggle(): void;
68
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ExpansionPanelComponent, never>;
69
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ExpansionPanelComponent, "mona-expansion-panel", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "userClass": { "alias": "userClass"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, ["actionsTemplateList", "iconTemplate", "titleTemplate"], ["*"], true, never>;
70
+ }
71
+
72
+ declare class ExpansionPanelActionsTemplateDirective {
73
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ExpansionPanelActionsTemplateDirective, never>;
74
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ExpansionPanelActionsTemplateDirective, "ng-template[monaExpansionPanelActionsTemplate]", never, {}, {}, never, never, true, never>;
75
+ }
76
+
77
+ declare class ExpansionPanelIconTemplateDirective {
78
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ExpansionPanelIconTemplateDirective, never>;
79
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ExpansionPanelIconTemplateDirective, "ng-template[monaExpansionPanelIconTemplate]", never, {}, {}, never, never, true, never>;
80
+ }
81
+
82
+ declare class ExpansionPanelTitleTemplateDirective {
83
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ExpansionPanelTitleTemplateDirective, never>;
84
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ExpansionPanelTitleTemplateDirective, "ng-template[monaExpansionPanelTitleTemplate]", never, {}, {}, never, never, true, never>;
85
+ }
86
+
87
+ export { ExpansionPanelActionsTemplateDirective, ExpansionPanelComponent, ExpansionPanelIconTemplateDirective, ExpansionPanelTitleTemplateDirective };
@@ -0,0 +1,68 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { TemplateRef } from '@angular/core';
3
+ import * as class_variance_authority_types from 'class-variance-authority/types';
4
+ import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
5
+ import { VariantInputs } from '@nanahoshi/mona-ui/internal';
6
+ import { VariantProps } from 'class-variance-authority';
7
+
8
+ declare class FieldsetLegendTemplateDirective {
9
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<FieldsetLegendTemplateDirective, never>;
10
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FieldsetLegendTemplateDirective, "ng-template[monaFieldsetLegendTemplate]", never, {}, {}, never, never, true, never>;
11
+ }
12
+
13
+ declare const fieldsetBaseThemeVariants: (theme: ThemeStyle) => (props?: class_variance_authority_types.ClassProp | undefined) => string;
14
+ declare const fieldsetThemeVariants: (theme: ThemeStyle) => (props?: ({
15
+ rounded?: "small" | "medium" | "large" | "full" | "none" | null | undefined;
16
+ disabled?: boolean | null | undefined;
17
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
18
+ declare const fieldsetLegendThemeVariants: (theme: ThemeStyle) => (props?: ({
19
+ hasTemplate?: boolean | null | undefined;
20
+ rounded?: "small" | "medium" | "large" | "full" | "none" | null | undefined;
21
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
22
+ type FieldsetBaseVariantProps = VariantProps<ReturnType<typeof fieldsetBaseThemeVariants>>;
23
+ type FieldsetBaseVariantInput = VariantInputs<FieldsetBaseVariantProps>;
24
+ type FieldsetFieldsetVariantProps = VariantProps<ReturnType<typeof fieldsetThemeVariants>>;
25
+ type FieldsetFieldsetVariantInput = VariantInputs<FieldsetFieldsetVariantProps>;
26
+ type FieldsetLegendVariantProps = VariantProps<ReturnType<typeof fieldsetLegendThemeVariants>>;
27
+ type FieldsetLegendVariantInput = VariantInputs<FieldsetLegendVariantProps>;
28
+ type FieldsetVariantInput = FieldsetBaseVariantInput & FieldsetFieldsetVariantInput & Omit<FieldsetLegendVariantInput, "hasTemplate">;
29
+
30
+ declare class FieldsetComponent implements FieldsetVariantInput {
31
+ #private;
32
+ protected readonly baseClass: _angular_core.Signal<string>;
33
+ protected readonly fieldsetClass: _angular_core.Signal<string>;
34
+ protected readonly legendClass: _angular_core.Signal<string>;
35
+ protected readonly legendTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
36
+ protected readonly legendVisible: _angular_core.Signal<boolean>;
37
+ /**
38
+ * @description Whether the fieldset and its projected form controls are disabled.
39
+ * Reflected as the native `disabled` attribute on the rendered `<fieldset>`.
40
+ * @default false
41
+ */
42
+ readonly disabled: _angular_core.InputSignal<boolean>;
43
+ /**
44
+ * @description The legend text of the fieldset. Shown in the top border as a labelled notch.
45
+ * Ignored when `monaFieldsetLegendTemplate` is provided.
46
+ * @default ""
47
+ */
48
+ readonly legend: _angular_core.InputSignal<string>;
49
+ /**
50
+ * @description The `name` attribute reflected onto the rendered `<fieldset>` element.
51
+ * @default undefined
52
+ */
53
+ readonly name: _angular_core.InputSignal<string | undefined>;
54
+ /**
55
+ * @description Border-radius preset applied to the fieldset and its legend.
56
+ * @default "medium"
57
+ */
58
+ readonly rounded: _angular_core.InputSignal<"small" | "medium" | "large" | "full" | "none" | null | undefined>;
59
+ /**
60
+ * @description Additional CSS classes merged onto the rendered `<fieldset>` element via `tailwind-merge`.
61
+ * @default ""
62
+ */
63
+ readonly userClass: _angular_core.InputSignal<string>;
64
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<FieldsetComponent, never>;
65
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<FieldsetComponent, "mona-fieldset", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "legend": { "alias": "legend"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, ["legendTemplate"], ["*"], true, never>;
66
+ }
67
+
68
+ export { FieldsetComponent, FieldsetLegendTemplateDirective };
@@ -0,0 +1,115 @@
1
+ import { FilterOperators, FilterLogic, CompositeFilterDescriptor, BooleanFilterOperators, DateFilterOperators, NumericFilterOperators, StringFilterOperators, BooleanFilterDescriptor, DateFilterDescriptor, NumericFilterDescriptor, StringFilterDescriptor } from '@nanahoshi/mona-ui/query';
2
+ import * as _angular_core from '@angular/core';
3
+ import { DataType } from '@nanahoshi/mona-ui/common';
4
+ import * as class_variance_authority_types from 'class-variance-authority/types';
5
+ import { VariantProps } from 'class-variance-authority';
6
+ import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
7
+ import { VariantInputs } from '@nanahoshi/mona-ui/internal';
8
+
9
+ interface FilterMenuDataItem {
10
+ text: string;
11
+ value: FilterOperators;
12
+ }
13
+
14
+ interface FilterMenuValue {
15
+ logic?: "and" | "or";
16
+ operator1?: FilterOperators;
17
+ operator2?: FilterOperators;
18
+ value1?: any;
19
+ value2?: any;
20
+ }
21
+
22
+ interface FilterMenuDateOptions {
23
+ format: string;
24
+ type: FilterMenuDateType;
25
+ }
26
+ type FilterMenuDateType = "date" | "datetime" | "time";
27
+
28
+ interface FilterMenuConnectorItem {
29
+ text: string;
30
+ value: FilterLogic;
31
+ }
32
+
33
+ declare const filterMenuBaseThemeVariants: (theme: ThemeStyle) => (props?: ({
34
+ rounded?: "none" | "small" | "medium" | "large" | null | undefined;
35
+ size?: "small" | "medium" | "large" | null | undefined;
36
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
37
+ type FilterMenuBaseVariantProps = VariantProps<ReturnType<typeof filterMenuBaseThemeVariants>>;
38
+ type FilterMenuBaseVariantInput = VariantInputs<FilterMenuBaseVariantProps>;
39
+ type FilterMenuVariantInput = FilterMenuBaseVariantInput;
40
+
41
+ declare class FilterMenuComponent implements FilterMenuVariantInput {
42
+ #private;
43
+ protected readonly applyDisabled: _angular_core.Signal<boolean>;
44
+ protected readonly baseClass: _angular_core.Signal<string>;
45
+ protected readonly booleanFilterMenuDataItems: FilterMenuDataItem[];
46
+ protected readonly connectorDataItems: FilterMenuConnectorItem[];
47
+ protected readonly dateFilterMenuDataItems: FilterMenuDataItem[];
48
+ protected readonly dateFilterValues: _angular_core.WritableSignal<[Date | null, Date | null]>;
49
+ protected readonly effectiveDateOptions: _angular_core.Signal<FilterMenuDateOptions>;
50
+ protected readonly filterMenuActionsClass: _angular_core.Signal<string>;
51
+ protected readonly filterMenuItemClass: _angular_core.Signal<string>;
52
+ protected readonly firstFilterValid: _angular_core.Signal<boolean>;
53
+ protected readonly numberFilterValues: _angular_core.WritableSignal<[number | null, number | null]>;
54
+ protected readonly numericFilterMenuDataItems: FilterMenuDataItem[];
55
+ protected readonly secondFilterValid: _angular_core.Signal<boolean>;
56
+ protected readonly selectedConnectorItem: _angular_core.WritableSignal<FilterMenuConnectorItem | null>;
57
+ protected readonly selectedFilterMenuDataItemList: _angular_core.WritableSignal<(FilterMenuDataItem | undefined)[]>;
58
+ protected readonly stringFilterMenuDataItems: FilterMenuDataItem[];
59
+ protected readonly stringFilterValues: _angular_core.WritableSignal<[string, string]>;
60
+ readonly apply: _angular_core.OutputEmitterRef<CompositeFilterDescriptor>;
61
+ readonly dateOptions: _angular_core.InputSignal<FilterMenuDateOptions>;
62
+ readonly field: _angular_core.ModelSignal<string>;
63
+ readonly operators: _angular_core.ModelSignal<Iterable<FilterOperators>>;
64
+ readonly rounded: _angular_core.InputSignal<"none" | "small" | "medium" | "large" | null | undefined>;
65
+ readonly size: _angular_core.InputSignal<"small" | "medium" | "large" | null | undefined>;
66
+ readonly type: _angular_core.ModelSignal<DataType>;
67
+ readonly value: _angular_core.ModelSignal<FilterMenuValue | undefined>;
68
+ constructor();
69
+ protected onConnectorChange(item: FilterMenuConnectorItem, selected: boolean): void;
70
+ protected onFilterApply(): void;
71
+ protected onFilterClear(): void;
72
+ protected onFilterOperatorChange(index: number, item: FilterMenuDataItem): void;
73
+ getFilterValues(): FilterMenuValue;
74
+ private applyBooleanFilters;
75
+ private applyDateFilters;
76
+ private applyNumberFilters;
77
+ private applyStringFilters;
78
+ private clearSecondFilterValues;
79
+ private setFilterValues;
80
+ private getDefaultDateFormat;
81
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<FilterMenuComponent, never>;
82
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<FilterMenuComponent, "mona-filter-menu", never, { "dateOptions": { "alias": "dateOptions"; "required": false; "isSignal": true; }; "field": { "alias": "field"; "required": false; "isSignal": true; }; "operators": { "alias": "operators"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "apply": "apply"; "field": "fieldChange"; "operators": "operatorsChange"; "type": "typeChange"; "value": "valueChange"; }, never, never, true, never>;
83
+ }
84
+
85
+ type FilterDescriptorBuildArgs<TValue, TOperator extends FilterOperators> = {
86
+ field: string;
87
+ operator1: TOperator;
88
+ value1: TValue;
89
+ } & ({
90
+ logic: null;
91
+ } | {
92
+ logic: FilterLogic;
93
+ operator2: TOperator;
94
+ value2: TValue;
95
+ });
96
+
97
+ declare class FilterService {
98
+ readonly booleanFilterMenuItems: FilterMenuDataItem[];
99
+ readonly dateFilterMenuItems: FilterMenuDataItem[];
100
+ readonly numericFilterMenuItems: FilterMenuDataItem[];
101
+ readonly stringFilterMenuItems: FilterMenuDataItem[];
102
+ buildBooleanFilterDescriptor(args: FilterDescriptorBuildArgs<boolean | null, BooleanFilterOperators>): CompositeFilterDescriptor;
103
+ buildDateFilterDescriptor(args: FilterDescriptorBuildArgs<Date | null, DateFilterOperators>): CompositeFilterDescriptor;
104
+ buildNumberFilterDescriptor(args: FilterDescriptorBuildArgs<number | null, NumericFilterOperators>): CompositeFilterDescriptor;
105
+ buildStringFilterDescriptor(args: FilterDescriptorBuildArgs<string, StringFilterOperators>): CompositeFilterDescriptor;
106
+ getBooleanDescriptor(operator: BooleanFilterOperators, field: string): BooleanFilterDescriptor | null;
107
+ getDateDescriptor(operator: DateFilterOperators, field: string, value: Date | null): DateFilterDescriptor | null;
108
+ getNumberDescriptor(operator: NumericFilterOperators, field: string, value: number | null): NumericFilterDescriptor | null;
109
+ getStringDescriptor(operator: StringFilterOperators, field: string, value: string): StringFilterDescriptor | null;
110
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<FilterService, never>;
111
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<FilterService>;
112
+ }
113
+
114
+ export { FilterMenuComponent, FilterService };
115
+ export type { FilterMenuDataItem, FilterMenuDateOptions, FilterMenuDateType, FilterMenuValue };