@nanahoshi/mona-ui 0.18.6 → 0.20.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 (116) hide show
  1. package/README.md +71 -13
  2. package/THIRD_PARTY_NOTICES.md +60 -0
  3. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -3
  4. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +17 -9
  5. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +16 -7
  6. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +196 -101
  7. package/fesm2022/nanahoshi-mona-ui-card.mjs +22 -14
  8. package/fesm2022/nanahoshi-mona-ui-chart.mjs +78 -18
  9. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +1 -1
  10. package/fesm2022/nanahoshi-mona-ui-chip.mjs +11 -3
  11. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +1 -2
  12. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +23 -5
  13. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +49 -28
  14. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +42 -26
  15. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +11 -3
  16. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +39 -21
  17. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +88 -55
  18. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +57 -25
  19. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +13 -5
  20. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +17 -6
  21. package/fesm2022/nanahoshi-mona-ui-editor.mjs +178 -59
  22. package/fesm2022/nanahoshi-mona-ui-filter.mjs +137 -54
  23. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-WEDbZ5vy.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-BuybF7tX.mjs} +2 -2
  24. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-ibH5osCg.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Dj-SaNzk.mjs} +2 -2
  25. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-CYAm4l84.mjs +145 -0
  26. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-hc-LeIb0.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-B_Gm--X6.mjs} +46 -31
  27. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-DYajpOb9.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-X0X487Rm.mjs} +5 -5
  28. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-Pm8Fbp6M.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CyzJFQIy.mjs} +99 -42
  29. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  30. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +4874 -0
  31. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +12 -4
  32. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +48 -21
  33. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +33 -18
  34. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +10 -10
  35. package/fesm2022/nanahoshi-mona-ui-list.mjs +2 -0
  36. package/fesm2022/nanahoshi-mona-ui-locales.mjs +4973 -0
  37. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +29 -16
  38. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +12 -3
  39. package/fesm2022/nanahoshi-mona-ui-notification.mjs +23 -18
  40. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +211 -106
  41. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +14 -6
  42. package/fesm2022/nanahoshi-mona-ui-pager.mjs +66 -29
  43. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +57 -46
  44. package/fesm2022/nanahoshi-mona-ui-popup.mjs +35 -15
  45. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +38 -17
  46. package/fesm2022/nanahoshi-mona-ui-rating.mjs +25 -7
  47. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +431 -101
  48. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +1 -1
  49. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +26 -8
  50. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +222 -28
  51. package/fesm2022/nanahoshi-mona-ui-slider.mjs +91 -36
  52. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +34 -15
  53. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +39 -23
  54. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +50 -25
  55. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +41 -14
  56. package/fesm2022/nanahoshi-mona-ui-switch.mjs +9 -9
  57. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +74 -56
  58. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +16 -8
  59. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +47 -24
  60. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +66 -27
  61. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +23 -15
  62. package/fesm2022/nanahoshi-mona-ui-window.mjs +71 -40
  63. package/i18n/package.json +4 -0
  64. package/locales/package.json +4 -0
  65. package/package.json +9 -1
  66. package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -1
  67. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +9 -3
  68. package/types/nanahoshi-mona-ui-button-group.d.ts +9 -3
  69. package/types/nanahoshi-mona-ui-calendar.d.ts +29 -15
  70. package/types/nanahoshi-mona-ui-card.d.ts +8 -2
  71. package/types/nanahoshi-mona-ui-chart.d.ts +10 -1
  72. package/types/nanahoshi-mona-ui-chip.d.ts +7 -1
  73. package/types/nanahoshi-mona-ui-color-gradient.d.ts +6 -1
  74. package/types/nanahoshi-mona-ui-color-palette.d.ts +21 -10
  75. package/types/nanahoshi-mona-ui-color-picker.d.ts +30 -20
  76. package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -1
  77. package/types/nanahoshi-mona-ui-date-picker.d.ts +14 -6
  78. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +40 -12
  79. package/types/nanahoshi-mona-ui-dialog.d.ts +16 -7
  80. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -1
  81. package/types/nanahoshi-mona-ui-dropdowns.d.ts +4 -1
  82. package/types/nanahoshi-mona-ui-editor.d.ts +6 -1
  83. package/types/nanahoshi-mona-ui-filter.d.ts +16 -10
  84. package/types/nanahoshi-mona-ui-grid.d.ts +50 -2
  85. package/types/nanahoshi-mona-ui-i18n.d.ts +680 -0
  86. package/types/nanahoshi-mona-ui-internal-list.d.ts +7 -2
  87. package/types/nanahoshi-mona-ui-internal-tree.d.ts +7 -3
  88. package/types/nanahoshi-mona-ui-list-box.d.ts +9 -4
  89. package/types/nanahoshi-mona-ui-list-view.d.ts +6 -6
  90. package/types/nanahoshi-mona-ui-list.d.ts +1 -1
  91. package/types/nanahoshi-mona-ui-locales.d.ts +4889 -0
  92. package/types/nanahoshi-mona-ui-menubar.d.ts +59 -58
  93. package/types/nanahoshi-mona-ui-multi-select.d.ts +6 -1
  94. package/types/nanahoshi-mona-ui-notification.d.ts +11 -5
  95. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +24 -15
  96. package/types/nanahoshi-mona-ui-otp-input.d.ts +9 -3
  97. package/types/nanahoshi-mona-ui-pager.d.ts +20 -6
  98. package/types/nanahoshi-mona-ui-popup.d.ts +2 -1
  99. package/types/nanahoshi-mona-ui-progress-bar.d.ts +9 -7
  100. package/types/nanahoshi-mona-ui-rating.d.ts +19 -12
  101. package/types/nanahoshi-mona-ui-scroll-view.d.ts +34 -28
  102. package/types/nanahoshi-mona-ui-sheet.d.ts +8 -2
  103. package/types/nanahoshi-mona-ui-sidebar.d.ts +3 -0
  104. package/types/nanahoshi-mona-ui-slider.d.ts +44 -26
  105. package/types/nanahoshi-mona-ui-spinner.d.ts +13 -4
  106. package/types/nanahoshi-mona-ui-split-button.d.ts +62 -56
  107. package/types/nanahoshi-mona-ui-splitter.d.ts +9 -6
  108. package/types/nanahoshi-mona-ui-stepper.d.ts +10 -3
  109. package/types/nanahoshi-mona-ui-switch.d.ts +1 -1
  110. package/types/nanahoshi-mona-ui-tabs.d.ts +96 -35
  111. package/types/nanahoshi-mona-ui-text-box.d.ts +11 -5
  112. package/types/nanahoshi-mona-ui-time-picker.d.ts +11 -4
  113. package/types/nanahoshi-mona-ui-time-selector.d.ts +16 -5
  114. package/types/nanahoshi-mona-ui-tree-view.d.ts +15 -10
  115. package/types/nanahoshi-mona-ui-window.d.ts +26 -20
  116. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ZM3CneJ0.mjs +0 -145
@@ -2,6 +2,7 @@ import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { inject, TemplateRef, Directive, signal, Service, computed, contentChild, input, Component, viewChild, afterRenderEffect, DestroyRef, contentChildren } from '@angular/core';
4
4
  import { classInputToClass } from '@nanahoshi/mona-ui/common';
5
+ import { MonaI18nService } from '@nanahoshi/mona-ui/i18n';
5
6
  import { twMerge } from 'tailwind-merge';
6
7
  import { themeRaisedBackdropClasses, createElementControlId } from '@nanahoshi/mona-ui/internal';
7
8
  import { cva } from 'class-variance-authority';
@@ -20,6 +21,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
20
21
  }]
21
22
  }] });
22
23
 
24
+ const CARD_DEFAULT_MESSAGES = {
25
+ actionsLabel: "Card actions"
26
+ };
27
+
23
28
  class CardService {
24
29
  constructor() {
25
30
  this.actionTemplate = signal([], /* @ts-ignore */
@@ -50,19 +55,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
50
55
  }] });
51
56
 
52
57
  const roundedTopVariants = {
53
- small: "rounded-tl-sm rounded-tr-sm",
54
- medium: "rounded-tl-md rounded-tr-md",
55
- large: "rounded-tl-lg rounded-tr-lg",
56
- xlarge: "rounded-tl-xl rounded-tr-xl",
57
- xxlarge: "rounded-tl-2xl rounded-tr-2xl",
58
+ small: "rounded-t-sm",
59
+ medium: "rounded-t-md",
60
+ large: "rounded-t-lg",
61
+ xlarge: "rounded-t-xl",
62
+ xxlarge: "rounded-t-2xl",
58
63
  none: "rounded-none"
59
64
  };
60
65
  const roundedBottomVariants = {
61
- small: "rounded-bl-sm rounded-br-sm",
62
- medium: "rounded-bl-md rounded-br-md",
63
- large: "rounded-bl-lg rounded-br-lg",
64
- xlarge: "rounded-bl-xl rounded-br-xl",
65
- xxlarge: "rounded-bl-2xl rounded-br-2xl",
66
+ small: "rounded-b-sm",
67
+ medium: "rounded-b-md",
68
+ large: "rounded-b-lg",
69
+ xlarge: "rounded-b-xl",
70
+ xxlarge: "rounded-b-2xl",
66
71
  none: "rounded-none"
67
72
  };
68
73
  const roundedAllVariants = {
@@ -119,8 +124,9 @@ const cardHeaderActionsThemeVariants = cva(`col-start-2 row-start-1 row-span-2 s
119
124
  class CardComponent {
120
125
  constructor() {
121
126
  this.#cardService = inject(CardService);
122
- this.actionsCellClass = cardHeaderActionsThemeVariants();
127
+ this.#i18n = inject(MonaI18nService);
123
128
  this.actionTemplate = this.#cardService.actionTemplate.asReadonly();
129
+ this.actionsCellClass = cardHeaderActionsThemeVariants();
124
130
  this.baseClass = computed(() => {
125
131
  const rounded = this.rounded();
126
132
  const hasHeader = !!this.headerTemplate();
@@ -151,6 +157,7 @@ class CardComponent {
151
157
  }, /* @ts-ignore */
152
158
  ...(ngDevMode ? [{ debugName: "headerClass" }] : /* istanbul ignore next */ []));
153
159
  this.headerTemplate = this.#cardService.headerTemplate.asReadonly();
160
+ this.messages = this.#i18n.componentMessages("card", CARD_DEFAULT_MESSAGES);
154
161
  this.titleCellClass = cardHeaderTitleThemeVariants();
155
162
  this.titleId = this.#cardService.titleId.asReadonly();
156
163
  this.titleTemplate = this.#cardService.titleTemplate.asReadonly();
@@ -167,8 +174,9 @@ class CardComponent {
167
174
  this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
168
175
  }
169
176
  #cardService;
177
+ #i18n;
170
178
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
171
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: CardComponent, isStandalone: true, selector: "mona-card", inputs: { rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()", "attr.aria-labelledby": "titleId()", "attr.aria-describedby": "descriptionId()" } }, providers: [CardService], queries: [{ propertyName: "contentDirective", first: true, predicate: CardContentDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@if (headerTemplate()) {\n <div [class]=\"headerClass()\">\n @if (titleTemplate()) {\n <div [class]=\"titleCellClass\">\n <ng-container [ngTemplateOutlet]=\"titleTemplate()\" [ngTemplateOutletContext]=\"{ $implicit: titleId() }\" />\n </div>\n }\n @if (descriptionTemplate()) {\n <div [class]=\"descriptionCellClass\">\n <ng-container\n [ngTemplateOutlet]=\"descriptionTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: descriptionId() }\"\n />\n </div>\n }\n @if (actionTemplate().length > 0) {\n <div [class]=\"actionsCellClass\" role=\"group\" aria-label=\"Card actions\">\n @for (template of actionTemplate(); track template) {\n <ng-container [ngTemplateOutlet]=\"template\" />\n }\n </div>\n }\n </div>\n}\n<ng-container [ngTemplateOutlet]=\"contentDirective()?.templateRef ?? null\" />\n@if (footerTemplate()) {\n <div [class]=\"footerClass()\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate()\" />\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
179
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: CardComponent, isStandalone: true, selector: "mona-card", inputs: { rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()", "attr.aria-labelledby": "titleId()", "attr.aria-describedby": "descriptionId()" } }, providers: [CardService], queries: [{ propertyName: "contentDirective", first: true, predicate: CardContentDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@if (headerTemplate()) {\n <div [class]=\"headerClass()\">\n @if (titleTemplate()) {\n <div [class]=\"titleCellClass\">\n <ng-container [ngTemplateOutlet]=\"titleTemplate()\" [ngTemplateOutletContext]=\"{ $implicit: titleId() }\" />\n </div>\n }\n @if (descriptionTemplate()) {\n <div [class]=\"descriptionCellClass\">\n <ng-container\n [ngTemplateOutlet]=\"descriptionTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: descriptionId() }\"\n />\n </div>\n }\n @if (actionTemplate().length > 0) {\n <div [class]=\"actionsCellClass\" role=\"group\" [attr.aria-label]=\"messages().actionsLabel\">\n @for (template of actionTemplate(); track template) {\n <ng-container [ngTemplateOutlet]=\"template\" />\n }\n </div>\n }\n </div>\n}\n<ng-container [ngTemplateOutlet]=\"contentDirective()?.templateRef ?? null\" />\n@if (footerTemplate()) {\n <div [class]=\"footerClass()\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate()\" />\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
172
180
  }
173
181
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CardComponent, decorators: [{
174
182
  type: Component,
@@ -176,7 +184,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
176
184
  "[class]": "baseClass()",
177
185
  "[attr.aria-labelledby]": "titleId()",
178
186
  "[attr.aria-describedby]": "descriptionId()"
179
- }, providers: [CardService], template: "@if (headerTemplate()) {\n <div [class]=\"headerClass()\">\n @if (titleTemplate()) {\n <div [class]=\"titleCellClass\">\n <ng-container [ngTemplateOutlet]=\"titleTemplate()\" [ngTemplateOutletContext]=\"{ $implicit: titleId() }\" />\n </div>\n }\n @if (descriptionTemplate()) {\n <div [class]=\"descriptionCellClass\">\n <ng-container\n [ngTemplateOutlet]=\"descriptionTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: descriptionId() }\"\n />\n </div>\n }\n @if (actionTemplate().length > 0) {\n <div [class]=\"actionsCellClass\" role=\"group\" aria-label=\"Card actions\">\n @for (template of actionTemplate(); track template) {\n <ng-container [ngTemplateOutlet]=\"template\" />\n }\n </div>\n }\n </div>\n}\n<ng-container [ngTemplateOutlet]=\"contentDirective()?.templateRef ?? null\" />\n@if (footerTemplate()) {\n <div [class]=\"footerClass()\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate()\" />\n </div>\n}\n" }]
187
+ }, providers: [CardService], template: "@if (headerTemplate()) {\n <div [class]=\"headerClass()\">\n @if (titleTemplate()) {\n <div [class]=\"titleCellClass\">\n <ng-container [ngTemplateOutlet]=\"titleTemplate()\" [ngTemplateOutletContext]=\"{ $implicit: titleId() }\" />\n </div>\n }\n @if (descriptionTemplate()) {\n <div [class]=\"descriptionCellClass\">\n <ng-container\n [ngTemplateOutlet]=\"descriptionTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: descriptionId() }\"\n />\n </div>\n }\n @if (actionTemplate().length > 0) {\n <div [class]=\"actionsCellClass\" role=\"group\" [attr.aria-label]=\"messages().actionsLabel\">\n @for (template of actionTemplate(); track template) {\n <ng-container [ngTemplateOutlet]=\"template\" />\n }\n </div>\n }\n </div>\n}\n<ng-container [ngTemplateOutlet]=\"contentDirective()?.templateRef ?? null\" />\n@if (footerTemplate()) {\n <div [class]=\"footerClass()\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate()\" />\n </div>\n}\n" }]
180
188
  }], propDecorators: { contentDirective: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CardContentDirective), { isSignal: true }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
181
189
 
182
190
  class CardFooterComponent {
@@ -303,5 +311,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
303
311
  * Generated bundle index. Do not edit.
304
312
  */
305
313
 
306
- export { CardActionDirective, CardComponent, CardContentDirective, CardDescriptionDirective, CardFooterComponent, CardHeaderComponent, CardTitleDirective };
314
+ export { CARD_DEFAULT_MESSAGES, CardActionDirective, CardComponent, CardContentDirective, CardDescriptionDirective, CardFooterComponent, CardHeaderComponent, CardTitleDirective };
307
315
  //# sourceMappingURL=nanahoshi-mona-ui-card.mjs.map