@nanahoshi/mona-ui 0.32.1 → 0.32.3
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/i18n.md +3 -3
- package/docs/api/list-box.md +1 -1
- 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/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-date-range-picker.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +6 -3
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +8 -3
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +8 -8
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-WbXAzGCa.mjs → nanahoshi-mona-ui-grid-grid-list.component-C1qjq2s7.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-DkWTD3pN.mjs → nanahoshi-mona-ui-grid-grid-row.component-CgOt2A6O.mjs} +3 -3
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-DAHqTwBJ.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-tguG2LpN.mjs} +2 -2
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +8 -8
- 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 +4 -4
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-window.mjs +15 -67
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +2 -0
- package/types/nanahoshi-mona-ui-i18n.d.ts +13 -13
package/docs/api/calendar.md
CHANGED
|
@@ -118,7 +118,7 @@ type CalendarSelection = "multiple" | "range" | "single";
|
|
|
118
118
|
Type alias.
|
|
119
119
|
|
|
120
120
|
```typescript
|
|
121
|
-
type FirstDayOfWeek =
|
|
121
|
+
type FirstDayOfWeek = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
**Used by:** [`CalendarComponent`](calendar.md#calendarcomponent), [`DatePickerComponent`](date-picker.md#datepickercomponent), [`DateRangePickerComponent`](date-range-picker.md#daterangepickercomponent), [`DateTimePickerComponent`](datetime-picker.md#datetimepickercomponent)
|
package/docs/api/i18n.md
CHANGED
|
@@ -817,7 +817,7 @@ Interface.
|
|
|
817
817
|
| `dataTableTruncated` (read-only) | `(shown: number, total: number) => string` | Below the data table when it shows only the first rows. |
|
|
818
818
|
| `decrease` (read-only) | `string` | The waterfall legend's name for falling steps. |
|
|
819
819
|
| `decreaseAnnouncement` (read-only) | `(delta: string, from: string, to: string) => string` | Announced for a waterfall step that lowers the running total. |
|
|
820
|
-
| `divergingRangeDescription` (read-only) | `(
|
|
820
|
+
| `divergingRangeDescription` (read-only) | `(title: string, minimum: string, midpoint: string, maximum: string) => string` | The accessible name of a diverging heatmap color legend, with its minimum, midpoint and maximum. |
|
|
821
821
|
| `dropOff` (read-only) | `string` | The tooltip label for a funnel stage's drop-off from the previous stage. |
|
|
822
822
|
| `dropOffValue` (read-only) | `(value: string) => string` | A funnel stage's drop-off from the previous stage, in an announcement. |
|
|
823
823
|
| `falling` (read-only) | `string` | Names a falling candlestick or OHLC point, in the tooltip and in announcements. |
|
|
@@ -849,7 +849,7 @@ Interface.
|
|
|
849
849
|
| `pathSeparator` (read-only) | `string` | Joins a treemap node's path (" / " in English). |
|
|
850
850
|
| `pointPosition` (read-only) | `(position: number, total: number) => string` | A point's position among the points it is navigated with, in an announcement. |
|
|
851
851
|
| `range` (read-only) | `string` | The tooltip label for a radial point's minimum-to-maximum range. |
|
|
852
|
-
| `rangeDescription` (read-only) | `(
|
|
852
|
+
| `rangeDescription` (read-only) | `(title: string, minimum: string, maximum: string) => string` | Describes a range with its title, minimum and maximum: a range point in an announcement, or a heatmap color legend in its accessible name. |
|
|
853
853
|
| `rangeValue` (read-only) | `(from: string, to: string) => string` | A range value, in an announcement. |
|
|
854
854
|
| `rising` (read-only) | `string` | Names a rising candlestick or OHLC point, in the tooltip and in announcements. |
|
|
855
855
|
| `runningTotal` (read-only) | `string` | The tooltip label for a waterfall step's running total. |
|
|
@@ -1702,7 +1702,7 @@ type FilterMessages = MonaFilterMessages;
|
|
|
1702
1702
|
Type alias.
|
|
1703
1703
|
|
|
1704
1704
|
```typescript
|
|
1705
|
-
type LocaleFirstDayOfWeek =
|
|
1705
|
+
type LocaleFirstDayOfWeek = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
|
|
1706
1706
|
```
|
|
1707
1707
|
|
|
1708
1708
|
**Used by:** [`getLocaleFirstDayOfWeek`](i18n.md#getlocalefirstdayofweek)
|
package/docs/api/list-box.md
CHANGED
|
@@ -285,7 +285,7 @@ Type alias.
|
|
|
285
285
|
The toolbar actions that move items between list boxes.
|
|
286
286
|
|
|
287
287
|
```typescript
|
|
288
|
-
type ListBoxTransferAction = Extract<ToolbarAction, "transferAllFrom" | "transferAllTo" | "transferFrom" | "transferTo">;
|
|
288
|
+
type ListBoxTransferAction = Extract< ToolbarAction, "transferAllFrom" | "transferAllTo" | "transferFrom" | "transferTo" >;
|
|
289
289
|
```
|
|
290
290
|
|
|
291
291
|
**Used by:** [`ListBoxTransferEvent`](list-box.md#listboxtransferevent)
|
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>
|
package/docs/otp-input.md
CHANGED
|
@@ -164,10 +164,18 @@ export class OtpInputCompleteExampleComponent {
|
|
|
164
164
|
</mona-label>
|
|
165
165
|
<span aria-live="polite" class="text-sm">
|
|
166
166
|
@switch (status()) {
|
|
167
|
-
@case ("checking") {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
@
|
|
167
|
+
@case ("checking") {
|
|
168
|
+
Checking…
|
|
169
|
+
}
|
|
170
|
+
@case ("verified") {
|
|
171
|
+
Verified.
|
|
172
|
+
}
|
|
173
|
+
@case ("wrong") {
|
|
174
|
+
That code is wrong. Try 123456.
|
|
175
|
+
}
|
|
176
|
+
@default {
|
|
177
|
+
Enter all six digits to verify.
|
|
178
|
+
}
|
|
171
179
|
}
|
|
172
180
|
</span>
|
|
173
181
|
</div>
|
package/docs/popup.md
CHANGED
|
@@ -79,9 +79,7 @@ export class PopupPositioningExampleComponent {
|
|
|
79
79
|
`positioning-example.component.html`
|
|
80
80
|
|
|
81
81
|
```html
|
|
82
|
-
<button #anchor monaButton aria-haspopup="dialog" type="button" [attr.aria-expanded]="open()">
|
|
83
|
-
Shipping details
|
|
84
|
-
</button>
|
|
82
|
+
<button #anchor monaButton aria-haspopup="dialog" type="button" [attr.aria-expanded]="open()">Shipping details</button>
|
|
85
83
|
|
|
86
84
|
<mona-popup
|
|
87
85
|
anchorConnectionPoint="topright"
|
|
@@ -138,9 +136,7 @@ export class PopupBackdropExampleComponent {
|
|
|
138
136
|
`backdrop-example.component.html`
|
|
139
137
|
|
|
140
138
|
```html
|
|
141
|
-
<button #anchor monaButton aria-haspopup="dialog" type="button" [attr.aria-expanded]="open()">
|
|
142
|
-
What's new
|
|
143
|
-
</button>
|
|
139
|
+
<button #anchor monaButton aria-haspopup="dialog" type="button" [attr.aria-expanded]="open()">What's new</button>
|
|
144
140
|
|
|
145
141
|
<mona-popup
|
|
146
142
|
[anchor]="anchor"
|
package/docs/progress-bar.md
CHANGED
|
@@ -89,7 +89,11 @@ export class ProgressBarUploadExampleComponent {
|
|
|
89
89
|
|
|
90
90
|
```html
|
|
91
91
|
<div class="flex max-w-md flex-col items-start gap-3">
|
|
92
|
-
<mona-progress-bar
|
|
92
|
+
<mona-progress-bar
|
|
93
|
+
aria-label="Upload progress"
|
|
94
|
+
class="w-full"
|
|
95
|
+
[color]="color"
|
|
96
|
+
[value]="progress()"></mona-progress-bar>
|
|
93
97
|
<button monaButton look="primary" type="button" [disabled]="uploading()" (click)="upload()">
|
|
94
98
|
{{ progress() >= 100 ? "Upload again" : "Upload" }}
|
|
95
99
|
</button>
|
|
@@ -118,7 +122,10 @@ export class ProgressBarIndeterminateExampleComponent {}
|
|
|
118
122
|
|
|
119
123
|
```html
|
|
120
124
|
<div class="max-w-md">
|
|
121
|
-
<mona-progress-bar
|
|
125
|
+
<mona-progress-bar
|
|
126
|
+
aria-label="Preparing export"
|
|
127
|
+
aria-valuetext="Loading"
|
|
128
|
+
[indeterminate]="true"></mona-progress-bar>
|
|
122
129
|
</div>
|
|
123
130
|
```
|
|
124
131
|
|
|
@@ -167,7 +174,9 @@ export class ProgressBarStepsExampleComponent {
|
|
|
167
174
|
</mona-progress-bar>
|
|
168
175
|
<div class="flex gap-2">
|
|
169
176
|
<button monaButton type="button" [disabled]="completed() === 0" (click)="back()">Back</button>
|
|
170
|
-
<button monaButton look="primary" type="button" [disabled]="completed() === total" (click)="next()">
|
|
177
|
+
<button monaButton look="primary" type="button" [disabled]="completed() === total" (click)="next()">
|
|
178
|
+
Next
|
|
179
|
+
</button>
|
|
171
180
|
</div>
|
|
172
181
|
</div>
|
|
173
182
|
```
|
package/docs/scroll-view.md
CHANGED
|
@@ -92,7 +92,8 @@ export class ScrollViewArrowsPagerExampleComponent {
|
|
|
92
92
|
[data]="highlights"
|
|
93
93
|
[pageable]="true">
|
|
94
94
|
<ng-template let-highlight [monaScrollViewSlide]="highlights">
|
|
95
|
-
<div
|
|
95
|
+
<div
|
|
96
|
+
class="flex h-full flex-col items-center justify-center gap-1 bg-secondary px-12 text-center text-secondary-foreground">
|
|
96
97
|
<p class="text-lg font-semibold">{{ highlight.title }}</p>
|
|
97
98
|
<p class="text-sm">{{ highlight.text }}</p>
|
|
98
99
|
</div>
|
|
@@ -145,7 +146,8 @@ export class ScrollViewInfiniteExampleComponent {
|
|
|
145
146
|
[data]="quotes"
|
|
146
147
|
[infinite]="true">
|
|
147
148
|
<ng-template let-quote [monaScrollViewSlide]="quotes">
|
|
148
|
-
<figure
|
|
149
|
+
<figure
|
|
150
|
+
class="flex h-full flex-col items-center justify-center gap-2 bg-secondary px-12 text-center text-secondary-foreground">
|
|
149
151
|
<blockquote class="text-sm">“{{ quote.text }}”</blockquote>
|
|
150
152
|
<figcaption class="text-xs font-semibold">{{ quote.author }}</figcaption>
|
|
151
153
|
</figure>
|
|
@@ -189,7 +191,8 @@ export class ScrollViewTwoWayExampleComponent {
|
|
|
189
191
|
[pageable]="true"
|
|
190
192
|
[(index)]="page">
|
|
191
193
|
<ng-template let-step [monaScrollViewSlide]="steps">
|
|
192
|
-
<div
|
|
194
|
+
<div
|
|
195
|
+
class="flex h-full items-center justify-center bg-secondary px-12 text-center text-secondary-foreground">
|
|
193
196
|
<p class="text-sm">{{ step }}</p>
|
|
194
197
|
</div>
|
|
195
198
|
</ng-template>
|
package/docs/sheet.md
CHANGED
|
@@ -151,7 +151,9 @@ export class SheetBottomExampleComponent {
|
|
|
151
151
|
<button monaButton size="small" type="button" [toggleable]="true">{{ category }}</button>
|
|
152
152
|
}
|
|
153
153
|
</div>
|
|
154
|
-
<button monaButton class="self-end" look="primary" type="button" (click)="open.set(false)">
|
|
154
|
+
<button monaButton class="self-end" look="primary" type="button" (click)="open.set(false)">
|
|
155
|
+
Show results
|
|
156
|
+
</button>
|
|
155
157
|
</div>
|
|
156
158
|
</mona-sheet>
|
|
157
159
|
}
|
|
@@ -201,7 +203,9 @@ export class SheetNavigationExampleComponent {
|
|
|
201
203
|
<mona-sheet aria-label="Main navigation" side="start" width="16rem" [closable]="false" (closed)="open.set(false)">
|
|
202
204
|
<nav aria-label="Main" class="flex flex-col gap-1 p-4">
|
|
203
205
|
@for (page of pages; track page) {
|
|
204
|
-
<a class="rounded-md px-2 py-1.5 text-sm hover:bg-accent" href="/" (click)="go($event, page)">{{
|
|
206
|
+
<a class="rounded-md px-2 py-1.5 text-sm hover:bg-accent" href="/" (click)="go($event, page)">{{
|
|
207
|
+
page
|
|
208
|
+
}}</a>
|
|
205
209
|
}
|
|
206
210
|
</nav>
|
|
207
211
|
</mona-sheet>
|
package/docs/sidebar.md
CHANGED
|
@@ -161,7 +161,11 @@ export class SidebarIconRailExampleComponent {
|
|
|
161
161
|
<ul monaSidebarMenu>
|
|
162
162
|
@for (folder of folders; track folder.label) {
|
|
163
163
|
<li monaSidebarMenuItem [active]="current() === folder.label">
|
|
164
|
-
<a
|
|
164
|
+
<a
|
|
165
|
+
monaSidebarMenuButton
|
|
166
|
+
[href]="folder.href"
|
|
167
|
+
[tooltip]="folder.label"
|
|
168
|
+
(click)="open($event, folder.label)">
|
|
165
169
|
<svg aria-hidden="true" [lucideIcon]="folder.icon" [size]="16"></svg>
|
|
166
170
|
<span>{{ folder.label }}</span>
|
|
167
171
|
</a>
|
package/docs/skeleton.md
CHANGED
|
@@ -72,7 +72,10 @@ export class SkeletonCardExampleComponent {
|
|
|
72
72
|
|
|
73
73
|
```html
|
|
74
74
|
<div class="flex max-w-sm flex-col items-start gap-3">
|
|
75
|
-
<section
|
|
75
|
+
<section
|
|
76
|
+
aria-label="Profile"
|
|
77
|
+
class="flex w-full items-center gap-4 rounded-md border border-border p-4"
|
|
78
|
+
[attr.aria-busy]="loading()">
|
|
76
79
|
@if (loading()) {
|
|
77
80
|
<mona-skeleton rounded="full" [height]="56" [width]="56"></mona-skeleton>
|
|
78
81
|
<div class="flex flex-1 flex-col gap-2">
|
|
@@ -80,7 +83,11 @@ export class SkeletonCardExampleComponent {
|
|
|
80
83
|
<mona-skeleton height="1rem"></mona-skeleton>
|
|
81
84
|
</div>
|
|
82
85
|
} @else {
|
|
83
|
-
<div
|
|
86
|
+
<div
|
|
87
|
+
class="flex size-14 shrink-0 items-center justify-center rounded-full bg-primary font-bold text-primary-foreground"
|
|
88
|
+
aria-hidden="true">
|
|
89
|
+
JS
|
|
90
|
+
</div>
|
|
84
91
|
<div class="flex flex-col">
|
|
85
92
|
<span class="font-semibold">Jane Smith</span>
|
|
86
93
|
<span class="text-sm">Product designer, Lisbon</span>
|
package/docs/stepper.md
CHANGED
|
@@ -258,7 +258,9 @@ export class StepperVetoExampleComponent {
|
|
|
258
258
|
<div class="flex flex-col gap-3">
|
|
259
259
|
<mona-stepper aria-label="Sign-up" [steps]="steps" [(step)]="currentStep" (stepSelect)="select($event)" />
|
|
260
260
|
<div class="flex items-center gap-3">
|
|
261
|
-
<button monaButton type="button" [toggleable]="true" [(selected)]="accountDone">
|
|
261
|
+
<button monaButton type="button" [toggleable]="true" [(selected)]="accountDone">
|
|
262
|
+
Account details filled in
|
|
263
|
+
</button>
|
|
262
264
|
<span aria-live="polite" class="text-sm">{{ message() }}</span>
|
|
263
265
|
</div>
|
|
264
266
|
</div>
|
package/docs/textarea.md
CHANGED
|
@@ -65,7 +65,13 @@ export class TextareaBasicExampleComponent {
|
|
|
65
65
|
</div>
|
|
66
66
|
<div class="flex flex-col gap-1">
|
|
67
67
|
<label class="text-sm font-medium" for="textarea-terms">Terms</label>
|
|
68
|
-
<textarea
|
|
68
|
+
<textarea
|
|
69
|
+
monaTextArea
|
|
70
|
+
class="w-full resize-none"
|
|
71
|
+
id="textarea-terms"
|
|
72
|
+
readonly
|
|
73
|
+
rows="2"
|
|
74
|
+
[value]="terms"></textarea>
|
|
69
75
|
</div>
|
|
70
76
|
</div>
|
|
71
77
|
```
|
package/docs/textbox.md
CHANGED
|
@@ -67,7 +67,13 @@ import {
|
|
|
67
67
|
|
|
68
68
|
@Component({
|
|
69
69
|
selector: "app-textbox-slots-example",
|
|
70
|
-
imports: [
|
|
70
|
+
imports: [
|
|
71
|
+
LabelComponent,
|
|
72
|
+
LucideSearch,
|
|
73
|
+
TextBoxComponent,
|
|
74
|
+
TextBoxPrefixTemplateDirective,
|
|
75
|
+
TextBoxSuffixTemplateDirective
|
|
76
|
+
],
|
|
71
77
|
templateUrl: "./slots-example.component.html"
|
|
72
78
|
})
|
|
73
79
|
export class TextboxSlotsExampleComponent {
|
package/docs/window.md
CHANGED
|
@@ -132,7 +132,7 @@ export class WindowBasicExampleComponent {
|
|
|
132
132
|
}
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
On `<mona-window>`, `draggable` defaults to `true` and `resizable` to `false`. Through `WindowService.open()`, both default to `false`. The pointer drags the window by its title bar and resizes it from eight edge and corner handles. A drag starts once the pointer has moved a few pixels with the primary button pressed, and never from the title bar's buttons or the controls of an action template. A dragged window keeps its size past the viewport's edges, and its title bar stays below the top edge. The keyboard does both from the title bar — see [Keyboard](#keyboard).
|
|
135
|
+
On `<mona-window>`, `draggable` defaults to `true` and `resizable` to `false`. Through `WindowService.open()`, both default to `false`. The pointer drags the window by its title bar and resizes it from eight edge and corner handles. A drag starts once the pointer has moved a few pixels with the primary button pressed, and never from the title bar's buttons or the controls of an action template. A dragged window keeps its size past the viewport's edges, and its title bar stays below the top edge. A resized edge stops at `minWidth`, `minHeight`, `maxWidth` and `maxHeight`, which default to 50 pixels and the viewport's size, and at the viewport's edges. The keyboard does both from the title bar — see [Keyboard](#keyboard).
|
|
136
136
|
|
|
137
137
|
### Minimize and maximize
|
|
138
138
|
|
|
@@ -251,7 +251,7 @@ var CardComponent = class CardComponent {
|
|
|
251
251
|
isSignal: true
|
|
252
252
|
}],
|
|
253
253
|
ngImport: i0,
|
|
254
|
-
template: "@if (headerTemplate()) {\n <div [class]=\"headerClass()\">\n @if (titleTemplate()) {\n <div [class]=\"titleCellClass\" [attr.id]=\"titleCellId()\">\n <ng-container
|
|
254
|
+
template: "@if (headerTemplate()) {\n <div [class]=\"headerClass()\">\n @if (titleTemplate()) {\n <div [class]=\"titleCellClass\" [attr.id]=\"titleCellId()\">\n <ng-container\n [ngTemplateOutlet]=\"titleTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: titleId() }\" />\n </div>\n }\n @if (descriptionTemplate()) {\n <div [class]=\"descriptionCellClass\" [attr.id]=\"descriptionCellId()\">\n <ng-container\n [ngTemplateOutlet]=\"descriptionTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: descriptionId() }\" />\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",
|
|
255
255
|
dependencies: [{
|
|
256
256
|
kind: "directive",
|
|
257
257
|
type: NgTemplateOutlet,
|
|
@@ -282,7 +282,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
282
282
|
"[attr.role]": "titleId() ? role() : null"
|
|
283
283
|
},
|
|
284
284
|
providers: [CardService],
|
|
285
|
-
template: "@if (headerTemplate()) {\n <div [class]=\"headerClass()\">\n @if (titleTemplate()) {\n <div [class]=\"titleCellClass\" [attr.id]=\"titleCellId()\">\n <ng-container
|
|
285
|
+
template: "@if (headerTemplate()) {\n <div [class]=\"headerClass()\">\n @if (titleTemplate()) {\n <div [class]=\"titleCellClass\" [attr.id]=\"titleCellId()\">\n <ng-container\n [ngTemplateOutlet]=\"titleTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: titleId() }\" />\n </div>\n }\n @if (descriptionTemplate()) {\n <div [class]=\"descriptionCellClass\" [attr.id]=\"descriptionCellId()\">\n <ng-container\n [ngTemplateOutlet]=\"descriptionTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: descriptionId() }\" />\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"
|
|
286
286
|
}]
|
|
287
287
|
}],
|
|
288
288
|
propDecorators: {
|