@nanahoshi/mona-ui 0.32.2 → 0.33.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/calendar.md +1 -1
  2. package/docs/api/file-upload.md +174 -0
  3. package/docs/api/i18n.md +49 -3
  4. package/docs/api/list-box.md +1 -1
  5. package/docs/api/locales.md +14 -14
  6. package/docs/api/tabs.md +1 -1
  7. package/docs/breadcrumb.md +6 -1
  8. package/docs/chart-line-area.md +6 -1
  9. package/docs/chart-treemap.md +1 -1
  10. package/docs/checkbox.md +1 -3
  11. package/docs/circular-progress-bar.md +26 -5
  12. package/docs/collapsible.md +28 -6
  13. package/docs/color-palette.md +24 -3
  14. package/docs/date-range-picker.md +1 -5
  15. package/docs/dropdown-button.md +6 -1
  16. package/docs/editor.md +8 -2
  17. package/docs/expansion-panel.md +6 -1
  18. package/docs/file-upload.md +516 -0
  19. package/docs/forms.md +2 -0
  20. package/docs/otp-input.md +12 -4
  21. package/docs/popup.md +2 -6
  22. package/docs/progress-bar.md +12 -3
  23. package/docs/scroll-view.md +6 -3
  24. package/docs/sheet.md +6 -2
  25. package/docs/sidebar.md +5 -1
  26. package/docs/skeleton.md +9 -2
  27. package/docs/stepper.md +3 -1
  28. package/docs/textarea.md +7 -1
  29. package/docs/textbox.md +7 -1
  30. package/docs/window.md +1 -1
  31. package/fesm2022/nanahoshi-mona-ui-card.mjs +2 -2
  32. package/fesm2022/nanahoshi-mona-ui-chart.mjs +2 -2
  33. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +2 -2
  34. package/fesm2022/nanahoshi-mona-ui-command.mjs +4 -3
  35. package/fesm2022/nanahoshi-mona-ui-date-range-picker.mjs +2 -2
  36. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +6 -3
  37. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +10 -5
  38. package/fesm2022/nanahoshi-mona-ui-editor.mjs +8 -8
  39. package/fesm2022/nanahoshi-mona-ui-file-upload.mjs +1137 -0
  40. package/fesm2022/{nanahoshi-mona-ui-grid-grid-colgroup.component-NhONCVIX.mjs → nanahoshi-mona-ui-grid-grid-colgroup.component-C62HvK-w.mjs} +2 -2
  41. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-Djv8ZnT5.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-BpsJwMkQ.mjs} +2 -2
  42. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-WbXAzGCa.mjs → nanahoshi-mona-ui-grid-grid-list.component-BVpGUjA7.mjs} +5 -5
  43. package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-DkWTD3pN.mjs → nanahoshi-mona-ui-grid-grid-row.component-D0T8kfdm.mjs} +7 -7
  44. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-DAHqTwBJ.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-5D2BjGx4.mjs} +5 -5
  45. package/fesm2022/{nanahoshi-mona-ui-grid-grid.styles-BmLU-3zP.mjs → nanahoshi-mona-ui-grid-grid.styles-62LTuPhD.mjs} +3 -3
  46. package/fesm2022/nanahoshi-mona-ui-grid.mjs +15 -14
  47. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +74 -0
  48. package/fesm2022/nanahoshi-mona-ui-internal-live-announcer.mjs +10 -0
  49. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +3 -2
  50. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +2 -2
  51. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +50 -0
  52. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +38 -0
  53. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +38 -0
  54. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +38 -0
  55. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +29 -0
  56. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +38 -0
  57. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +29 -0
  58. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +29 -0
  59. package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +44 -0
  60. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +38 -0
  61. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +44 -0
  62. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +29 -0
  63. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +29 -0
  64. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +29 -0
  65. package/fesm2022/nanahoshi-mona-ui-notification.mjs +2 -2
  66. package/fesm2022/nanahoshi-mona-ui-pager.mjs +2 -2
  67. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +2 -2
  68. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +6 -6
  69. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +2 -2
  70. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +2 -2
  71. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +2 -2
  72. package/fesm2022/nanahoshi-mona-ui-window.mjs +15 -67
  73. package/file-upload/package.json +4 -0
  74. package/i18n/catalogs/en-US.messages.json +29 -0
  75. package/internal/live-announcer/package.json +4 -0
  76. package/llms.txt +3 -1
  77. package/locales/ar-sa/ar-sa.messages.json +29 -0
  78. package/locales/de-de/de-de.messages.json +29 -0
  79. package/locales/es-es/es-es.messages.json +29 -0
  80. package/locales/fr-fr/fr-fr.messages.json +29 -0
  81. package/locales/id-id/id-id.messages.json +29 -0
  82. package/locales/it-it/it-it.messages.json +29 -0
  83. package/locales/ja-jp/ja-jp.messages.json +29 -0
  84. package/locales/ko-kr/ko-kr.messages.json +29 -0
  85. package/locales/pl-pl/pl-pl.messages.json +29 -0
  86. package/locales/pt-br/pt-br.messages.json +29 -0
  87. package/locales/ru-ru/ru-ru.messages.json +29 -0
  88. package/locales/tr-tr/tr-tr.messages.json +29 -0
  89. package/locales/zh-cn/zh-cn.messages.json +29 -0
  90. package/locales/zh-tw/zh-tw.messages.json +29 -0
  91. package/package.json +9 -1
  92. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +2 -0
  93. package/types/nanahoshi-mona-ui-file-upload.d.ts +366 -0
  94. package/types/nanahoshi-mona-ui-i18n.d.ts +73 -13
  95. package/types/nanahoshi-mona-ui-internal-live-announcer.d.ts +12 -0
  96. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +29 -0
  97. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +29 -0
  98. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +29 -0
  99. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +29 -0
  100. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +29 -0
  101. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +29 -0
  102. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +29 -0
  103. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +29 -0
  104. package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +29 -0
  105. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +29 -0
  106. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +29 -0
  107. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +29 -0
  108. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +29 -0
  109. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +29 -0
package/docs/api/tabs.md CHANGED
@@ -135,5 +135,5 @@ const TABS_DEFAULT_MESSAGES: MonaTabsMessages;
135
135
  Type alias.
136
136
 
137
137
  ```typescript
138
- type TabsPosition = | "top" | "bottom" | "left" | "right";
138
+ type TabsPosition = "top" | "bottom" | "left" | "right";
139
139
  ```
@@ -122,7 +122,12 @@ export class BreadcrumbButtonsExampleComponent {
122
122
  <mona-breadcrumb-item (itemClick)="openFolder($index)">{{ folder }}</mona-breadcrumb-item>
123
123
  }
124
124
  </mona-breadcrumb>
125
- <button monaButton class="self-start" type="button" [disabled]="path().length === fullPath.length" (click)="path.set(fullPath)">
125
+ <button
126
+ monaButton
127
+ class="self-start"
128
+ type="button"
129
+ [disabled]="path().length === fullPath.length"
130
+ (click)="path.set(fullPath)">
126
131
  Back to the full path
127
132
  </button>
128
133
  </div>
@@ -255,7 +255,12 @@ export class ChartRangeBandExampleComponent {
255
255
  name="Daily range"
256
256
  toField="high"
257
257
  [valueFormatter]="celsius" />
258
- <mona-line-series curve="monotone-x" field="average" name="Average" [showPoints]="true" [valueFormatter]="celsius" />
258
+ <mona-line-series
259
+ curve="monotone-x"
260
+ field="average"
261
+ name="Average"
262
+ [showPoints]="true"
263
+ [valueFormatter]="celsius" />
259
264
  <mona-chart-legend />
260
265
  <mona-chart-tooltip [shared]="true" />
261
266
  </mona-chart>
@@ -332,7 +332,7 @@ export class ChartTreemapCustomLabelsExampleComponent {
332
332
  <span class="truncate font-semibold">{{ node.formattedLabel }}</span>
333
333
  @if (node.isLeaf) {
334
334
  <span class="truncate text-xs opacity-80">
335
- {{ node.formattedValue }} · {{ (node.percentageOfParent ?? 0) | percent }}
335
+ {{ node.formattedValue }} · {{ node.percentageOfParent ?? 0 | percent }}
336
336
  </span>
337
337
  }
338
338
  </ng-template>
package/docs/checkbox.md CHANGED
@@ -84,9 +84,7 @@ export class CheckboxLabelsExampleComponent {
84
84
  <div class="flex flex-col items-start gap-3">
85
85
  <mona-check-box label="Email me about new releases" [(checked)]="releases" />
86
86
  <mona-check-box label="Keep me signed in" labelPosition="before" [(checked)]="signedIn" />
87
- <mona-check-box [(checked)]="terms">
88
- I accept the <strong>terms of service</strong>
89
- </mona-check-box>
87
+ <mona-check-box [(checked)]="terms"> I accept the <strong>terms of service</strong> </mona-check-box>
90
88
  <mona-check-box label="Sync contacts" [disabled]="true" />
91
89
  <p class="text-sm">Terms accepted: {{ terms() ? "yes" : "no" }}</p>
92
90
  </div>
@@ -65,9 +65,21 @@ export class CircularProgressBarSizesExampleComponent {
65
65
 
66
66
  ```html
67
67
  <div class="flex flex-wrap items-center gap-6">
68
- <mona-circular-progress-bar aria-label="Profile complete" [size]="60" [thickness]="4" [value]="40"></mona-circular-progress-bar>
69
- <mona-circular-progress-bar aria-label="Storage used" [color]="quotaColor" [value]="72"></mona-circular-progress-bar>
70
- <mona-circular-progress-bar aria-label="Monthly quota used" [color]="quotaColor" [size]="140" [thickness]="10" [value]="94"></mona-circular-progress-bar>
68
+ <mona-circular-progress-bar
69
+ aria-label="Profile complete"
70
+ [size]="60"
71
+ [thickness]="4"
72
+ [value]="40"></mona-circular-progress-bar>
73
+ <mona-circular-progress-bar
74
+ aria-label="Storage used"
75
+ [color]="quotaColor"
76
+ [value]="72"></mona-circular-progress-bar>
77
+ <mona-circular-progress-bar
78
+ aria-label="Monthly quota used"
79
+ [color]="quotaColor"
80
+ [size]="140"
81
+ [thickness]="10"
82
+ [value]="94"></mona-circular-progress-bar>
71
83
  </div>
72
84
  ```
73
85
 
@@ -93,8 +105,17 @@ export class CircularProgressBarLineCapExampleComponent {}
93
105
 
94
106
  ```html
95
107
  <div class="flex flex-wrap items-center gap-6">
96
- <mona-circular-progress-bar aria-label="Quiz score" [size]="120" [thickness]="12" [value]="72"></mona-circular-progress-bar>
97
- <mona-circular-progress-bar aria-label="Course progress" lineCap="flat" [size]="120" [thickness]="12" [value]="72"></mona-circular-progress-bar>
108
+ <mona-circular-progress-bar
109
+ aria-label="Quiz score"
110
+ [size]="120"
111
+ [thickness]="12"
112
+ [value]="72"></mona-circular-progress-bar>
113
+ <mona-circular-progress-bar
114
+ aria-label="Course progress"
115
+ lineCap="flat"
116
+ [size]="120"
117
+ [thickness]="12"
118
+ [value]="72"></mona-circular-progress-bar>
98
119
  </div>
99
120
  ```
100
121
 
@@ -82,9 +82,17 @@ export class CollapsibleTwoWayExampleComponent {
82
82
 
83
83
  ```html
84
84
  <section class="max-w-md rounded-md border border-border" monaCollapsible [(expanded)]="expanded">
85
- <button class="flex w-full items-center justify-between px-4 py-3 text-left font-medium" monaCollapsibleTrigger type="button">
85
+ <button
86
+ class="flex w-full items-center justify-between px-4 py-3 text-left font-medium"
87
+ monaCollapsibleTrigger
88
+ type="button">
86
89
  Advanced options
87
- <svg class="transition-transform" lucideChevronDown aria-hidden="true" [class.rotate-180]="expanded()" [size]="16"></svg>
90
+ <svg
91
+ class="transition-transform"
92
+ lucideChevronDown
93
+ aria-hidden="true"
94
+ [class.rotate-180]="expanded()"
95
+ [size]="16"></svg>
88
96
  </button>
89
97
  <div monaCollapsibleContent>
90
98
  <ul class="list-disc border-t border-border px-8 py-3 text-sm">
@@ -130,7 +138,11 @@ export class CollapsibleProgrammaticExampleComponent {
130
138
  <button monaButton type="button" (click)="log.collapse()">Collapse</button>
131
139
  <button monaButton type="button" [toggleable]="true" [(selected)]="locked">Lock the trigger</button>
132
140
  </div>
133
- <section #log="monaCollapsible" class="max-w-md rounded-md border border-border" monaCollapsible [disabled]="locked()">
141
+ <section
142
+ #log="monaCollapsible"
143
+ class="max-w-md rounded-md border border-border"
144
+ monaCollapsible
145
+ [disabled]="locked()">
134
146
  <button class="w-full px-4 py-3 text-left font-medium" monaCollapsibleTrigger type="button">Build log</button>
135
147
  <div monaCollapsibleContent>
136
148
  <p class="border-t border-border px-4 py-3 text-sm">Compiled 42 files in 3.1 seconds. No warnings.</p>
@@ -172,14 +184,24 @@ export class CollapsibleCustomTransitionExampleComponent {
172
184
 
173
185
  ```html
174
186
  <section class="max-w-md rounded-md border border-border" monaCollapsible [animate]="false" [(expanded)]="expanded">
175
- <button class="flex w-full items-center justify-between px-4 py-3 text-left font-medium" monaCollapsibleTrigger type="button">
187
+ <button
188
+ class="flex w-full items-center justify-between px-4 py-3 text-left font-medium"
189
+ monaCollapsibleTrigger
190
+ type="button">
176
191
  Shipping details
177
- <svg class="transition-transform" lucideChevronDown aria-hidden="true" [class.rotate-180]="expanded()" [size]="16"></svg>
192
+ <svg
193
+ class="transition-transform"
194
+ lucideChevronDown
195
+ aria-hidden="true"
196
+ [class.rotate-180]="expanded()"
197
+ [size]="16"></svg>
178
198
  </button>
179
199
  <div
180
200
  class="overflow-hidden opacity-0 transition-[height,opacity] duration-500 ease-in-out motion-reduce:transition-none data-[state=open]:h-(--mona-collapsible-content-height) data-[state=open]:opacity-100"
181
201
  monaCollapsibleContent>
182
- <p class="border-t border-border px-4 py-3 text-sm">Orders placed before noon leave the warehouse the same day.</p>
202
+ <p class="border-t border-border px-4 py-3 text-sm">
203
+ Orders placed before noon leave the warehouse the same day.
204
+ </p>
183
205
  </div>
184
206
  </section>
185
207
  ```
@@ -96,7 +96,16 @@ import { ColorPaletteComponent } from "@nanahoshi/mona-ui/color-palette";
96
96
  })
97
97
  export class ColorPaletteCustomExampleComponent {
98
98
  protected readonly color = signal<string | null>("#0f3460");
99
- protected readonly colors = ["#1a1a2e", "#16213e", "#0f3460", "#533483", "#e94560", "#f5a25d", "#f8e9a1", "#a8d8ea"];
99
+ protected readonly colors = [
100
+ "#1a1a2e",
101
+ "#16213e",
102
+ "#0f3460",
103
+ "#533483",
104
+ "#e94560",
105
+ "#f5a25d",
106
+ "#f8e9a1",
107
+ "#a8d8ea"
108
+ ];
100
109
  }
101
110
  ```
102
111
 
@@ -104,7 +113,13 @@ export class ColorPaletteCustomExampleComponent {
104
113
 
105
114
  ```html
106
115
  <div class="flex flex-col items-start gap-2">
107
- <mona-color-palette aria-label="Card color" rounded="small" [columns]="4" [palette]="colors" [tileSize]="32" [(value)]="color" />
116
+ <mona-color-palette
117
+ aria-label="Card color"
118
+ rounded="small"
119
+ [columns]="4"
120
+ [palette]="colors"
121
+ [tileSize]="32"
122
+ [(value)]="color" />
108
123
  <span class="text-sm">Color: {{ color() ?? "none" }}</span>
109
124
  </div>
110
125
  ```
@@ -144,7 +159,13 @@ export class ColorPaletteNamedExampleComponent {
144
159
 
145
160
  ```html
146
161
  <div class="flex flex-col items-start gap-2">
147
- <mona-color-palette aria-label="Status color" rounded="full" [columns]="4" [palette]="statusColors" [tileSize]="32" [(value)]="color" />
162
+ <mona-color-palette
163
+ aria-label="Status color"
164
+ rounded="full"
165
+ [columns]="4"
166
+ [palette]="statusColors"
167
+ [tileSize]="32"
168
+ [(value)]="color" />
148
169
  <span class="text-sm">Color: {{ color() ?? "none" }}</span>
149
170
  </div>
150
171
  ```
@@ -254,11 +254,7 @@ export class DateRangePickerLimitsExampleComponent {
254
254
  ```html
255
255
  <div class="flex max-w-sm flex-col gap-4">
256
256
  <mona-form-field label="Booking" hint="Within the next year. We're closed on Mondays.">
257
- <mona-date-range-picker
258
- [disabledDates]="isMonday"
259
- [maxDate]="lastDay"
260
- [minDate]="today"
261
- [(value)]="booking" />
257
+ <mona-date-range-picker [disabledDates]="isMonday" [maxDate]="lastDay" [minDate]="today" [(value)]="booking" />
262
258
  </mona-form-field>
263
259
  </div>
264
260
  ```
@@ -215,7 +215,12 @@ import {
215
215
 
216
216
  @Component({
217
217
  selector: "app-dropdown-button-icon-only-example",
218
- imports: [DropdownButtonComponent, DropdownButtonItemComponent, DropdownButtonTextTemplateDirective, LucideEllipsis],
218
+ imports: [
219
+ DropdownButtonComponent,
220
+ DropdownButtonItemComponent,
221
+ DropdownButtonTextTemplateDirective,
222
+ LucideEllipsis
223
+ ],
219
224
  templateUrl: "./icon-only-example.component.html"
220
225
  })
221
226
  export class DropdownButtonIconOnlyExampleComponent {}
package/docs/editor.md CHANGED
@@ -48,7 +48,9 @@ import { EditorComponent } from "@nanahoshi/mona-ui/editor";
48
48
  templateUrl: "./basic-example.component.html"
49
49
  })
50
50
  export class EditorBasicExampleComponent {
51
- protected readonly notes = signal("<h2>Release notes</h2><p>The editor now keeps <strong>bold</strong> and <em>italic</em> text.</p>");
51
+ protected readonly notes = signal(
52
+ "<h2>Release notes</h2><p>The editor now keeps <strong>bold</strong> and <em>italic</em> text.</p>"
53
+ );
52
54
  }
53
55
  ```
54
56
 
@@ -57,7 +59,11 @@ export class EditorBasicExampleComponent {
57
59
  ```html
58
60
  <div class="flex flex-col gap-2">
59
61
  <label id="editor-basic-label" class="text-sm font-medium">Notes</label>
60
- <mona-editor aria-labelledby="editor-basic-label" class="h-72 w-full" placeholder="Write a note" [(value)]="notes" />
62
+ <mona-editor
63
+ aria-labelledby="editor-basic-label"
64
+ class="h-72 w-full"
65
+ placeholder="Write a note"
66
+ [(value)]="notes" />
61
67
  <details>
62
68
  <summary>HTML value</summary>
63
69
  <pre class="whitespace-pre-wrap text-xs">{{ notes() }}</pre>
@@ -189,7 +189,12 @@ export class ExpansionPanelHeaderTemplatesExampleComponent {
189
189
  </button>
190
190
  </ng-template>
191
191
  <ng-template let-expanded monaExpansionPanelIconTemplate>
192
- <svg class="mx-2 transition-transform" lucideChevronDown aria-hidden="true" [class.rotate-180]="expanded" [size]="16"></svg>
192
+ <svg
193
+ class="mx-2 transition-transform"
194
+ lucideChevronDown
195
+ aria-hidden="true"
196
+ [class.rotate-180]="expanded"
197
+ [size]="16"></svg>
193
198
  </ng-template>
194
199
  <p class="p-3 text-sm">Email me when someone mentions me or replies to my comment.</p>
195
200
  </mona-expansion-panel>