@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.
- package/docs/api/calendar.md +1 -1
- package/docs/api/file-upload.md +174 -0
- package/docs/api/i18n.md +49 -3
- package/docs/api/list-box.md +1 -1
- package/docs/api/locales.md +14 -14
- package/docs/api/tabs.md +1 -1
- package/docs/breadcrumb.md +6 -1
- package/docs/chart-line-area.md +6 -1
- package/docs/chart-treemap.md +1 -1
- package/docs/checkbox.md +1 -3
- package/docs/circular-progress-bar.md +26 -5
- package/docs/collapsible.md +28 -6
- package/docs/color-palette.md +24 -3
- package/docs/date-range-picker.md +1 -5
- package/docs/dropdown-button.md +6 -1
- package/docs/editor.md +8 -2
- package/docs/expansion-panel.md +6 -1
- package/docs/file-upload.md +516 -0
- package/docs/forms.md +2 -0
- package/docs/otp-input.md +12 -4
- package/docs/popup.md +2 -6
- package/docs/progress-bar.md +12 -3
- package/docs/scroll-view.md +6 -3
- package/docs/sheet.md +6 -2
- package/docs/sidebar.md +5 -1
- package/docs/skeleton.md +9 -2
- package/docs/stepper.md +3 -1
- package/docs/textarea.md +7 -1
- package/docs/textbox.md +7 -1
- package/docs/window.md +1 -1
- package/fesm2022/nanahoshi-mona-ui-card.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-command.mjs +4 -3
- package/fesm2022/nanahoshi-mona-ui-date-range-picker.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +6 -3
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +10 -5
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +8 -8
- package/fesm2022/nanahoshi-mona-ui-file-upload.mjs +1137 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-colgroup.component-NhONCVIX.mjs → nanahoshi-mona-ui-grid-grid-colgroup.component-C62HvK-w.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-Djv8ZnT5.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-BpsJwMkQ.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-WbXAzGCa.mjs → nanahoshi-mona-ui-grid-grid-list.component-BVpGUjA7.mjs} +5 -5
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-DkWTD3pN.mjs → nanahoshi-mona-ui-grid-grid-row.component-D0T8kfdm.mjs} +7 -7
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-DAHqTwBJ.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-5D2BjGx4.mjs} +5 -5
- package/fesm2022/{nanahoshi-mona-ui-grid-grid.styles-BmLU-3zP.mjs → nanahoshi-mona-ui-grid-grid.styles-62LTuPhD.mjs} +3 -3
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +15 -14
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +74 -0
- package/fesm2022/nanahoshi-mona-ui-internal-live-announcer.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +3 -2
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +50 -0
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +38 -0
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +38 -0
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +38 -0
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +29 -0
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +38 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +29 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +29 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +44 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +38 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +44 -0
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +29 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +29 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +29 -0
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-spinner.mjs +6 -6
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-window.mjs +15 -67
- package/file-upload/package.json +4 -0
- package/i18n/catalogs/en-US.messages.json +29 -0
- package/internal/live-announcer/package.json +4 -0
- package/llms.txt +3 -1
- package/locales/ar-sa/ar-sa.messages.json +29 -0
- package/locales/de-de/de-de.messages.json +29 -0
- package/locales/es-es/es-es.messages.json +29 -0
- package/locales/fr-fr/fr-fr.messages.json +29 -0
- package/locales/id-id/id-id.messages.json +29 -0
- package/locales/it-it/it-it.messages.json +29 -0
- package/locales/ja-jp/ja-jp.messages.json +29 -0
- package/locales/ko-kr/ko-kr.messages.json +29 -0
- package/locales/pl-pl/pl-pl.messages.json +29 -0
- package/locales/pt-br/pt-br.messages.json +29 -0
- package/locales/ru-ru/ru-ru.messages.json +29 -0
- package/locales/tr-tr/tr-tr.messages.json +29 -0
- package/locales/zh-cn/zh-cn.messages.json +29 -0
- package/locales/zh-tw/zh-tw.messages.json +29 -0
- package/package.json +9 -1
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +2 -0
- package/types/nanahoshi-mona-ui-file-upload.d.ts +366 -0
- package/types/nanahoshi-mona-ui-i18n.d.ts +73 -13
- package/types/nanahoshi-mona-ui-internal-live-announcer.d.ts +12 -0
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +29 -0
package/docs/api/tabs.md
CHANGED
package/docs/breadcrumb.md
CHANGED
|
@@ -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
|
|
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>
|
package/docs/chart-line-area.md
CHANGED
|
@@ -255,7 +255,12 @@ export class ChartRangeBandExampleComponent {
|
|
|
255
255
|
name="Daily range"
|
|
256
256
|
toField="high"
|
|
257
257
|
[valueFormatter]="celsius" />
|
|
258
|
-
<mona-line-series
|
|
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>
|
package/docs/chart-treemap.md
CHANGED
|
@@ -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 }} · {{
|
|
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
|
|
69
|
-
|
|
70
|
-
|
|
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
|
|
97
|
-
|
|
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
|
|
package/docs/collapsible.md
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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">
|
|
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
|
```
|
package/docs/color-palette.md
CHANGED
|
@@ -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 = [
|
|
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
|
|
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
|
|
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
|
```
|
package/docs/dropdown-button.md
CHANGED
|
@@ -215,7 +215,12 @@ import {
|
|
|
215
215
|
|
|
216
216
|
@Component({
|
|
217
217
|
selector: "app-dropdown-button-icon-only-example",
|
|
218
|
-
imports: [
|
|
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(
|
|
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
|
|
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>
|
package/docs/expansion-panel.md
CHANGED
|
@@ -189,7 +189,12 @@ export class ExpansionPanelHeaderTemplatesExampleComponent {
|
|
|
189
189
|
</button>
|
|
190
190
|
</ng-template>
|
|
191
191
|
<ng-template let-expanded monaExpansionPanelIconTemplate>
|
|
192
|
-
<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>
|