@nanahoshi/mona-ui 0.30.0 → 0.32.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/date-range-picker/package.json +4 -0
- package/docs/api/button-group.md +1 -0
- package/docs/api/calendar.md +3 -2
- package/docs/api/color-gradient.md +1 -0
- package/docs/api/color-palette.md +1 -0
- package/docs/api/color-picker.md +1 -0
- package/docs/api/common.md +1 -1
- package/docs/api/date-input.md +1 -1
- package/docs/api/date-range-picker.md +137 -0
- package/docs/api/form-field.md +88 -0
- package/docs/api/i18n.md +84 -0
- package/docs/api/list.md +1 -1
- package/docs/api/locales.md +14 -14
- package/docs/api/popup.md +1 -1
- package/docs/api/segmented.md +1 -0
- package/docs/api/switch.md +1 -0
- package/docs/calendar.md +47 -3
- package/docs/date-picker.md +1 -1
- package/docs/date-range-picker.md +420 -0
- package/docs/dropdown-list.md +1 -1
- package/docs/form-field.md +425 -0
- package/docs/forms.md +13 -4
- package/docs/label.md +5 -5
- package/docs/numeric-textbox.md +1 -1
- package/docs/radio-button.md +2 -1
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +15 -4
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +25 -1
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +171 -59
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +5 -2
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +29 -3
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +25 -1
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +31 -3
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +15 -4
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +16 -4
- package/fesm2022/nanahoshi-mona-ui-date-range-picker.mjs +1331 -0
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +16 -4
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +19 -7
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +24 -4
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -0
- package/fesm2022/nanahoshi-mona-ui-form-field.mjs +666 -0
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +50 -0
- package/fesm2022/nanahoshi-mona-ui-i18n.mjs +7 -1
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +27 -2
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +50 -0
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +32 -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 +32 -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-multi-select.mjs +19 -7
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +14 -5
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +6 -3
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +15 -9
- package/fesm2022/nanahoshi-mona-ui-rating.mjs +6 -3
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +25 -1
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +8 -5
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +25 -1
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +6 -3
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +15 -4
- package/form-field/package.json +4 -0
- package/i18n/catalogs/en-US.messages.json +29 -0
- package/llms.txt +5 -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-auto-complete.d.ts +2 -0
- package/types/nanahoshi-mona-ui-button-group.d.ts +11 -0
- package/types/nanahoshi-mona-ui-calendar.d.ts +66 -8
- package/types/nanahoshi-mona-ui-check-box.d.ts +1 -0
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +11 -0
- package/types/nanahoshi-mona-ui-color-palette.d.ts +11 -0
- package/types/nanahoshi-mona-ui-color-picker.d.ts +11 -0
- package/types/nanahoshi-mona-ui-combo-box.d.ts +2 -0
- package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -0
- package/types/nanahoshi-mona-ui-date-range-picker.d.ts +462 -0
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +2 -0
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +2 -0
- package/types/nanahoshi-mona-ui-form-field.d.ts +173 -0
- package/types/nanahoshi-mona-ui-i18n.d.ts +68 -0
- package/types/nanahoshi-mona-ui-internal.d.ts +39 -4
- 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/types/nanahoshi-mona-ui-multi-select.d.ts +2 -0
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +2 -0
- package/types/nanahoshi-mona-ui-otp-input.d.ts +1 -0
- package/types/nanahoshi-mona-ui-radio-button.d.ts +2 -0
- package/types/nanahoshi-mona-ui-rating.d.ts +1 -0
- package/types/nanahoshi-mona-ui-segmented.d.ts +11 -0
- package/types/nanahoshi-mona-ui-slider.d.ts +1 -0
- package/types/nanahoshi-mona-ui-switch.d.ts +11 -0
- package/types/nanahoshi-mona-ui-text-box.d.ts +1 -0
- package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -0
|
@@ -186,6 +186,27 @@ const MONA_RU_RU_LOCALE = {
|
|
|
186
186
|
datePicker: "Выбор даты",
|
|
187
187
|
openCalendar: "Открыть календарь"
|
|
188
188
|
},
|
|
189
|
+
dateRangePicker: {
|
|
190
|
+
dateRangePicker: "Выбор диапазона дат",
|
|
191
|
+
end: "Дата окончания",
|
|
192
|
+
lastDays: (count) => plural(PLURAL_RULES.select(count), {
|
|
193
|
+
one: () => `Последний ${localizeNumber(count)} день`,
|
|
194
|
+
few: () => `Последние ${localizeNumber(count)} дня`,
|
|
195
|
+
many: () => `Последние ${localizeNumber(count)} дней`,
|
|
196
|
+
other: () => `Последние ${localizeNumber(count)} дня`
|
|
197
|
+
}),
|
|
198
|
+
lastMonth: "Прошлый месяц",
|
|
199
|
+
lastWeek: "Прошлая неделя",
|
|
200
|
+
lastYear: "Прошлый год",
|
|
201
|
+
openCalendar: "Открыть календарь",
|
|
202
|
+
presets: "Быстрый выбор",
|
|
203
|
+
start: "Дата начала",
|
|
204
|
+
thisMonth: "Этот месяц",
|
|
205
|
+
thisWeek: "Эта неделя",
|
|
206
|
+
thisYear: "Этот год",
|
|
207
|
+
today: "Сегодня",
|
|
208
|
+
yesterday: "Вчера"
|
|
209
|
+
},
|
|
189
210
|
dateTimePicker: {
|
|
190
211
|
calendar: "Календарь",
|
|
191
212
|
cancel: "Отмена",
|
|
@@ -307,6 +328,29 @@ const MONA_RU_RU_LOCALE = {
|
|
|
307
328
|
startsWith: "Начинается с",
|
|
308
329
|
value: "Значение"
|
|
309
330
|
},
|
|
331
|
+
formField: {
|
|
332
|
+
email: "Введите корректный адрес электронной почты.",
|
|
333
|
+
invalid: "Введите корректное значение.",
|
|
334
|
+
max: (max) => `Значение не должно превышать ${localizeNumber(max)}.`,
|
|
335
|
+
maxDate: (maxDate) => `Дата не должна быть позже ${maxDate}.`,
|
|
336
|
+
maxLength: (maxLength) => `Введите не более ${plural(PLURAL_RULES.select(maxLength), {
|
|
337
|
+
one: () => `${localizeNumber(maxLength)} символа`,
|
|
338
|
+
few: () => `${localizeNumber(maxLength)} символов`,
|
|
339
|
+
many: () => `${localizeNumber(maxLength)} символов`,
|
|
340
|
+
other: () => `${localizeNumber(maxLength)} символа`
|
|
341
|
+
})}.`,
|
|
342
|
+
min: (min) => `Значение должно быть не меньше ${localizeNumber(min)}.`,
|
|
343
|
+
minDate: (minDate) => `Дата не должна быть раньше ${minDate}.`,
|
|
344
|
+
minLength: (minLength) => `Введите не менее ${plural(PLURAL_RULES.select(minLength), {
|
|
345
|
+
one: () => `${localizeNumber(minLength)} символа`,
|
|
346
|
+
few: () => `${localizeNumber(minLength)} символов`,
|
|
347
|
+
many: () => `${localizeNumber(minLength)} символов`,
|
|
348
|
+
other: () => `${localizeNumber(minLength)} символа`
|
|
349
|
+
})}.`,
|
|
350
|
+
optional: "Необязательно",
|
|
351
|
+
pattern: "Введите значение в ожидаемом формате.",
|
|
352
|
+
required: "Это поле обязательно для заполнения."
|
|
353
|
+
},
|
|
310
354
|
grid: {
|
|
311
355
|
all: "(Все)",
|
|
312
356
|
apply: "Применить",
|
|
@@ -180,6 +180,25 @@ const MONA_TR_TR_LOCALE = {
|
|
|
180
180
|
datePicker: "Tarih seçici",
|
|
181
181
|
openCalendar: "Takvimi aç"
|
|
182
182
|
},
|
|
183
|
+
dateRangePicker: {
|
|
184
|
+
dateRangePicker: "Tarih aralığı seçici",
|
|
185
|
+
end: "Bitiş tarihi",
|
|
186
|
+
lastDays: (count) => plural(PLURAL_RULES.select(count), {
|
|
187
|
+
one: () => `Son ${localizeNumber(count)} gün`,
|
|
188
|
+
other: () => `Son ${localizeNumber(count)} gün`
|
|
189
|
+
}),
|
|
190
|
+
lastMonth: "Geçen ay",
|
|
191
|
+
lastWeek: "Geçen hafta",
|
|
192
|
+
lastYear: "Geçen yıl",
|
|
193
|
+
openCalendar: "Takvimi aç",
|
|
194
|
+
presets: "Hızlı aralıklar",
|
|
195
|
+
start: "Başlangıç tarihi",
|
|
196
|
+
thisMonth: "Bu ay",
|
|
197
|
+
thisWeek: "Bu hafta",
|
|
198
|
+
thisYear: "Bu yıl",
|
|
199
|
+
today: "Bugün",
|
|
200
|
+
yesterday: "Dün"
|
|
201
|
+
},
|
|
183
202
|
dateTimePicker: {
|
|
184
203
|
calendar: "Takvim",
|
|
185
204
|
cancel: "İptal",
|
|
@@ -301,6 +320,19 @@ const MONA_TR_TR_LOCALE = {
|
|
|
301
320
|
startsWith: "İle başlar",
|
|
302
321
|
value: "Değer"
|
|
303
322
|
},
|
|
323
|
+
formField: {
|
|
324
|
+
email: "Geçerli bir e-posta adresi girin.",
|
|
325
|
+
invalid: "Geçerli bir değer girin.",
|
|
326
|
+
max: (max) => `Değer en fazla ${localizeNumber(max)} olmalıdır.`,
|
|
327
|
+
maxDate: (maxDate) => `Tarih en geç ${maxDate} olmalıdır.`,
|
|
328
|
+
maxLength: (maxLength) => `En fazla ${localizeNumber(maxLength)} karakter girin.`,
|
|
329
|
+
min: (min) => `Değer en az ${localizeNumber(min)} olmalıdır.`,
|
|
330
|
+
minDate: (minDate) => `Tarih en erken ${minDate} olmalıdır.`,
|
|
331
|
+
minLength: (minLength) => `En az ${localizeNumber(minLength)} karakter girin.`,
|
|
332
|
+
optional: "İsteğe bağlı",
|
|
333
|
+
pattern: "Beklenen biçimde bir değer girin.",
|
|
334
|
+
required: "Bu alan zorunludur."
|
|
335
|
+
},
|
|
304
336
|
grid: {
|
|
305
337
|
all: "(Tümü)",
|
|
306
338
|
apply: "Uygula",
|
|
@@ -167,6 +167,22 @@ const MONA_ZH_CN_LOCALE = {
|
|
|
167
167
|
datePicker: "日期选择器",
|
|
168
168
|
openCalendar: "打开日历"
|
|
169
169
|
},
|
|
170
|
+
dateRangePicker: {
|
|
171
|
+
dateRangePicker: "日期范围选择器",
|
|
172
|
+
end: "结束日期",
|
|
173
|
+
lastDays: (count) => `最近 ${localizeNumber(count)} 天`,
|
|
174
|
+
lastMonth: "上月",
|
|
175
|
+
lastWeek: "上周",
|
|
176
|
+
lastYear: "去年",
|
|
177
|
+
openCalendar: "打开日历",
|
|
178
|
+
presets: "快速选择",
|
|
179
|
+
start: "开始日期",
|
|
180
|
+
thisMonth: "本月",
|
|
181
|
+
thisWeek: "本周",
|
|
182
|
+
thisYear: "今年",
|
|
183
|
+
today: "今天",
|
|
184
|
+
yesterday: "昨天"
|
|
185
|
+
},
|
|
170
186
|
dateTimePicker: {
|
|
171
187
|
calendar: "日历",
|
|
172
188
|
cancel: "取消",
|
|
@@ -288,6 +304,19 @@ const MONA_ZH_CN_LOCALE = {
|
|
|
288
304
|
startsWith: "开头为",
|
|
289
305
|
value: "值"
|
|
290
306
|
},
|
|
307
|
+
formField: {
|
|
308
|
+
email: "请输入有效的电子邮件地址。",
|
|
309
|
+
invalid: "请输入有效的值。",
|
|
310
|
+
max: (max) => `值不能大于 ${localizeNumber(max)}。`,
|
|
311
|
+
maxDate: (maxDate) => `日期不能晚于 ${maxDate}。`,
|
|
312
|
+
maxLength: (maxLength) => `最多输入 ${localizeNumber(maxLength)} 个字符。`,
|
|
313
|
+
min: (min) => `值不能小于 ${localizeNumber(min)}。`,
|
|
314
|
+
minDate: (minDate) => `日期不能早于 ${minDate}。`,
|
|
315
|
+
minLength: (minLength) => `至少输入 ${localizeNumber(minLength)} 个字符。`,
|
|
316
|
+
optional: "可选",
|
|
317
|
+
pattern: "请按要求的格式输入。",
|
|
318
|
+
required: "此项为必填项。"
|
|
319
|
+
},
|
|
291
320
|
grid: {
|
|
292
321
|
all: "(全部)",
|
|
293
322
|
apply: "应用",
|
|
@@ -167,6 +167,22 @@ const MONA_ZH_TW_LOCALE = {
|
|
|
167
167
|
datePicker: "日期選取器",
|
|
168
168
|
openCalendar: "開啟行事曆"
|
|
169
169
|
},
|
|
170
|
+
dateRangePicker: {
|
|
171
|
+
dateRangePicker: "日期範圍選取器",
|
|
172
|
+
end: "結束日期",
|
|
173
|
+
lastDays: (count) => `最近 ${localizeNumber(count)} 天`,
|
|
174
|
+
lastMonth: "上個月",
|
|
175
|
+
lastWeek: "上週",
|
|
176
|
+
lastYear: "去年",
|
|
177
|
+
openCalendar: "開啟行事曆",
|
|
178
|
+
presets: "快速選取",
|
|
179
|
+
start: "開始日期",
|
|
180
|
+
thisMonth: "本月",
|
|
181
|
+
thisWeek: "本週",
|
|
182
|
+
thisYear: "今年",
|
|
183
|
+
today: "今天",
|
|
184
|
+
yesterday: "昨天"
|
|
185
|
+
},
|
|
170
186
|
dateTimePicker: {
|
|
171
187
|
calendar: "行事曆",
|
|
172
188
|
cancel: "取消",
|
|
@@ -288,6 +304,19 @@ const MONA_ZH_TW_LOCALE = {
|
|
|
288
304
|
startsWith: "開頭為",
|
|
289
305
|
value: "值"
|
|
290
306
|
},
|
|
307
|
+
formField: {
|
|
308
|
+
email: "請輸入有效的電子郵件地址。",
|
|
309
|
+
invalid: "請輸入有效的值。",
|
|
310
|
+
max: (max) => `值不得大於 ${localizeNumber(max)}。`,
|
|
311
|
+
maxDate: (maxDate) => `日期不得晚於 ${maxDate}。`,
|
|
312
|
+
maxLength: (maxLength) => `最多輸入 ${localizeNumber(maxLength)} 個字元。`,
|
|
313
|
+
min: (min) => `值不得小於 ${localizeNumber(min)}。`,
|
|
314
|
+
minDate: (minDate) => `日期不得早於 ${minDate}。`,
|
|
315
|
+
minLength: (minLength) => `至少輸入 ${localizeNumber(minLength)} 個字元。`,
|
|
316
|
+
optional: "選填",
|
|
317
|
+
pattern: "請依照要求的格式輸入。",
|
|
318
|
+
required: "此欄位為必填。"
|
|
319
|
+
},
|
|
291
320
|
grid: {
|
|
292
321
|
all: "(全部)",
|
|
293
322
|
apply: "套用",
|
|
@@ -7,7 +7,7 @@ import { CHIP_DEFAULT_MESSAGES, ChipComponent } from "@nanahoshi/mona-ui/chip";
|
|
|
7
7
|
import * as i1 from "@nanahoshi/mona-ui/dropdowns";
|
|
8
8
|
import { DROPDOWN_DATA_INPUT_TOKEN, DROPDOWN_POPUP_INPUT_TOKEN, DropdownDataHandlerDirective, DropdownFooterTemplateDirective, DropdownGroupHeaderTemplateDirective, DropdownHeaderTemplateDirective, DropdownItemTemplateDirective, DropdownListPopupHandlerDirective, DropdownLiveRegionDirective, DropdownNoDataTemplateDirective, DropdownPrefixTemplateDirective, DropdownService, dropdownPopupThemeVariants } from "@nanahoshi/mona-ui/dropdowns";
|
|
9
9
|
import { MonaI18nService, formatNumber } from "@nanahoshi/mona-ui/i18n";
|
|
10
|
-
import { createElementControlId, injectEffectiveDisabled, restoreOverlayScroll, rxFromResize, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
10
|
+
import { FIELD_ASSOCIATION_BOUNDARY, createElementControlId, injectEffectiveDisabled, injectLabelAssociation, restoreOverlayScroll, rxFromResize, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
11
11
|
import { IndicatorIconComponent } from "@nanahoshi/mona-ui/internal/indicator-icon";
|
|
12
12
|
import { ListComponent, ListFooterTemplateDirective, ListGroupHeaderTemplateDirective, ListHeaderTemplateDirective, ListItemTemplateDirective, ListNoDataTemplateDirective, ListService } from "@nanahoshi/mona-ui/internal/list";
|
|
13
13
|
import { filter, tap } from "rxjs";
|
|
@@ -143,6 +143,7 @@ var MultiSelectComponent = class MultiSelectComponent {
|
|
|
143
143
|
#dropdownService;
|
|
144
144
|
#hostElementRef;
|
|
145
145
|
#i18n;
|
|
146
|
+
#label;
|
|
146
147
|
#listService;
|
|
147
148
|
#multiSelectService;
|
|
148
149
|
#popupRef;
|
|
@@ -151,6 +152,13 @@ var MultiSelectComponent = class MultiSelectComponent {
|
|
|
151
152
|
this.#dropdownService = inject(DropdownService);
|
|
152
153
|
this.#hostElementRef = inject(ElementRef);
|
|
153
154
|
this.#i18n = inject(MonaI18nService);
|
|
155
|
+
this.#label = injectLabelAssociation({
|
|
156
|
+
activate: () => this.focus(),
|
|
157
|
+
ariaDescribedBy: () => this.ariaDescribedBy(),
|
|
158
|
+
ariaLabel: () => this.ariaLabel(),
|
|
159
|
+
ariaLabelledBy: () => this.ariaLabelledBy(),
|
|
160
|
+
focus: () => this.focus()
|
|
161
|
+
});
|
|
154
162
|
this.#listService = inject(ListService);
|
|
155
163
|
this.#multiSelectService = inject(MultiSelectService);
|
|
156
164
|
this.#popupRef = this.#dropdownService.popupRef;
|
|
@@ -179,7 +187,8 @@ var MultiSelectComponent = class MultiSelectComponent {
|
|
|
179
187
|
}, ...ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []);
|
|
180
188
|
this.chipMessages = this.#i18n.componentMessages("chip", CHIP_DEFAULT_MESSAGES);
|
|
181
189
|
this.clearButtonVisible = computed(() => this.showClearButton() && this.selectedListItems().any() && !this.loading() && !this.effectiveDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "clearButtonVisible" }] : /* istanbul ignore next */ []);
|
|
182
|
-
this.
|
|
190
|
+
this.describedBy = this.#label.describedBy;
|
|
191
|
+
this.effectiveAriaLabel = computed(() => this.ariaLabel() || (this.labelledBy() ? "" : this.placeholder()), ...ngDevMode ? [{ debugName: "effectiveAriaLabel" }] : /* istanbul ignore next */ []);
|
|
183
192
|
this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
|
|
184
193
|
this.expanded = computed(() => this.#dropdownService.popupRef() !== null, ...ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []);
|
|
185
194
|
this.footerTemplate = contentChild(DropdownFooterTemplateDirective, {
|
|
@@ -207,6 +216,7 @@ var MultiSelectComponent = class MultiSelectComponent {
|
|
|
207
216
|
...ngDevMode ? { debugName: "itemTemplate" } : /* istanbul ignore next */ {},
|
|
208
217
|
read: TemplateRef
|
|
209
218
|
});
|
|
219
|
+
this.labelledBy = this.#label.labelledBy;
|
|
210
220
|
this.listId = createElementControlId();
|
|
211
221
|
this.listPopupClass = computed(() => {
|
|
212
222
|
const rounded = this.rounded();
|
|
@@ -673,13 +683,13 @@ var MultiSelectComponent = class MultiSelectComponent {
|
|
|
673
683
|
"attr.aria-activedescendant": "activeDescendant()",
|
|
674
684
|
"attr.aria-busy": "loading() ? 'true' : undefined",
|
|
675
685
|
"attr.aria-controls": "listId",
|
|
676
|
-
"attr.aria-describedby": "
|
|
686
|
+
"attr.aria-describedby": "describedBy()",
|
|
677
687
|
"attr.aria-disabled": "effectiveDisabled() ? true : undefined",
|
|
678
688
|
"attr.aria-expanded": "expanded()",
|
|
679
689
|
"attr.aria-haspopup": "'listbox'",
|
|
680
690
|
"attr.aria-invalid": "invalidState() ? true : undefined",
|
|
681
691
|
"attr.aria-label": "effectiveAriaLabel() || null",
|
|
682
|
-
"attr.aria-labelledby": "
|
|
692
|
+
"attr.aria-labelledby": "labelledBy()",
|
|
683
693
|
"attr.aria-readonly": "readonly() ? true : undefined",
|
|
684
694
|
"attr.aria-required": "required() ? true : undefined",
|
|
685
695
|
"attr.data-disabled": "effectiveDisabled() || null",
|
|
@@ -878,7 +888,8 @@ var MultiSelectComponent = class MultiSelectComponent {
|
|
|
878
888
|
],
|
|
879
889
|
outputs: ["activate"]
|
|
880
890
|
}
|
|
881
|
-
]
|
|
891
|
+
],
|
|
892
|
+
viewProviders: [...FIELD_ASSOCIATION_BOUNDARY]
|
|
882
893
|
});
|
|
883
894
|
}
|
|
884
895
|
};
|
|
@@ -922,17 +933,18 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
922
933
|
DropdownListPopupHandlerDirective,
|
|
923
934
|
DropdownLiveRegionDirective
|
|
924
935
|
],
|
|
936
|
+
viewProviders: [...FIELD_ASSOCIATION_BOUNDARY],
|
|
925
937
|
host: {
|
|
926
938
|
"[attr.aria-activedescendant]": "activeDescendant()",
|
|
927
939
|
"[attr.aria-busy]": "loading() ? 'true' : undefined",
|
|
928
940
|
"[attr.aria-controls]": "listId",
|
|
929
|
-
"[attr.aria-describedby]": "
|
|
941
|
+
"[attr.aria-describedby]": "describedBy()",
|
|
930
942
|
"[attr.aria-disabled]": "effectiveDisabled() ? true : undefined",
|
|
931
943
|
"[attr.aria-expanded]": "expanded()",
|
|
932
944
|
"[attr.aria-haspopup]": "'listbox'",
|
|
933
945
|
"[attr.aria-invalid]": "invalidState() ? true : undefined",
|
|
934
946
|
"[attr.aria-label]": "effectiveAriaLabel() || null",
|
|
935
|
-
"[attr.aria-labelledby]": "
|
|
947
|
+
"[attr.aria-labelledby]": "labelledBy()",
|
|
936
948
|
"[attr.aria-readonly]": "readonly() ? true : undefined",
|
|
937
949
|
"[attr.aria-required]": "required() ? true : undefined",
|
|
938
950
|
"[attr.data-disabled]": "effectiveDisabled() || null",
|
|
@@ -7,7 +7,7 @@ import { MonaI18nService, formatNumber, getNumberSymbols, validateLocalizedDecim
|
|
|
7
7
|
import { TextBoxDirective } from "@nanahoshi/mona-ui/text-box";
|
|
8
8
|
import { FocusMonitor } from "@angular/cdk/a11y";
|
|
9
9
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
10
|
-
import { createElementControlId, injectEffectiveDisabled, rxTimeout, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
10
|
+
import { createElementControlId, injectEffectiveDisabled, injectLabelAssociation, rxTimeout, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
11
11
|
import { Subject, concatMap, delay, filter, map, of, switchMap, takeUntil, tap, timer } from "rxjs";
|
|
12
12
|
import { twMerge } from "tailwind-merge";
|
|
13
13
|
import { cva } from "class-variance-authority";
|
|
@@ -198,6 +198,7 @@ var NumericTextBoxBaseComponent = class NumericTextBoxBaseComponent {
|
|
|
198
198
|
#focusMonitor;
|
|
199
199
|
#hostElementRef;
|
|
200
200
|
#i18n;
|
|
201
|
+
#label;
|
|
201
202
|
#ownValue;
|
|
202
203
|
#pendingPaste;
|
|
203
204
|
constructor() {
|
|
@@ -205,6 +206,12 @@ var NumericTextBoxBaseComponent = class NumericTextBoxBaseComponent {
|
|
|
205
206
|
this.#focusMonitor = inject(FocusMonitor);
|
|
206
207
|
this.#hostElementRef = inject(ElementRef);
|
|
207
208
|
this.#i18n = inject(MonaI18nService);
|
|
209
|
+
this.#label = injectLabelAssociation({
|
|
210
|
+
ariaDescribedBy: () => this.ariaDescribedBy(),
|
|
211
|
+
ariaLabel: () => this.ariaLabel(),
|
|
212
|
+
ariaLabelledBy: () => this.ariaLabelledBy(),
|
|
213
|
+
focus: () => this.focus()
|
|
214
|
+
});
|
|
208
215
|
this.#ownValue = void 0;
|
|
209
216
|
this.#pendingPaste = false;
|
|
210
217
|
this.beforeInput$ = new Subject();
|
|
@@ -218,6 +225,7 @@ var NumericTextBoxBaseComponent = class NumericTextBoxBaseComponent {
|
|
|
218
225
|
const userClass = this.userClass();
|
|
219
226
|
return twMerge(classes, userClass);
|
|
220
227
|
}, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
228
|
+
this.describedBy = this.#label.describedBy;
|
|
221
229
|
this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
|
|
222
230
|
this.focused = signal(false, ...ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []);
|
|
223
231
|
this.formattedValue = computed(() => {
|
|
@@ -235,6 +243,7 @@ var NumericTextBoxBaseComponent = class NumericTextBoxBaseComponent {
|
|
|
235
243
|
}, ...ngDevMode ? [{ debugName: "inputClasses" }] : /* istanbul ignore next */ []);
|
|
236
244
|
this.invalidInput = computed(() => this.touched() && (this.invalid() || this.required() && this.value() == null), ...ngDevMode ? [{ debugName: "invalidInput" }] : /* istanbul ignore next */ []);
|
|
237
245
|
this.keydown$ = new Subject();
|
|
246
|
+
this.labelledBy = this.#label.labelledBy;
|
|
238
247
|
this.messages = this.#i18n.componentMessages("numericTextBox", NUMERIC_TEXT_BOX_DEFAULT_MESSAGES);
|
|
239
248
|
this.prefixTemplateList = contentChildren(NumericTextBoxPrefixTemplateDirective, {
|
|
240
249
|
...ngDevMode ? { debugName: "prefixTemplateList" } : /* istanbul ignore next */ {},
|
|
@@ -1030,7 +1039,7 @@ var DecimalTextBoxComponent = class DecimalTextBoxComponent extends NumericTextB
|
|
|
1030
1039
|
outputs: { value: "valueChange" },
|
|
1031
1040
|
usesInheritance: true,
|
|
1032
1041
|
ngImport: i0,
|
|
1033
|
-
template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-none flex-wrap items-center overflow-hidden border-none\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n monaTextBox\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [required]=\"required()\"\n [type]=\"'text'\"\n [attr.inputmode]=\"decimals() > 0 ? 'decimal' : 'numeric'\"\n [readonly]=\"readonly()\"\n [tabIndex]=\"tabindex()\"\n [placeholder]=\"placeholder()\"\n [value]=\"formattedValue()\"\n (input)=\"applyRawValue(valueTextBox.value)\"\n (keydown)=\"keydown$.next($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (focusout)=\"inputFocusOut.emit($event)\"\n (beforeinput)=\"beforeInput$.next($event)\"\n (paste)=\"onPaste($event)\"\n (wheel)=\"wheel$.next($event)\"\n [size]=\"size()\"\n [class]=\"inputClasses()\"\n autocomplete=\"off\"\n role=\"spinbutton\"\n [attr.aria-describedby]=\"
|
|
1042
|
+
template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-none flex-wrap items-center overflow-hidden border-none\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n monaTextBox\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [required]=\"required()\"\n [type]=\"'text'\"\n [attr.inputmode]=\"decimals() > 0 ? 'decimal' : 'numeric'\"\n [readonly]=\"readonly()\"\n [tabIndex]=\"tabindex()\"\n [placeholder]=\"placeholder()\"\n [value]=\"formattedValue()\"\n (input)=\"applyRawValue(valueTextBox.value)\"\n (keydown)=\"keydown$.next($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (focusout)=\"inputFocusOut.emit($event)\"\n (beforeinput)=\"beforeInput$.next($event)\"\n (paste)=\"onPaste($event)\"\n (wheel)=\"wheel$.next($event)\"\n [size]=\"size()\"\n [class]=\"inputClasses()\"\n autocomplete=\"off\"\n role=\"spinbutton\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-invalid]=\"invalidInput() || null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-valuemin]=\"minValue()\"\n [attr.aria-valuemax]=\"maxValue()\"\n [attr.aria-valuetext]=\"formattedValue() || null\"\n [attr.data-spinners]=\"showSpinners()\"\n #valueTextBox />\n@if (showSpinners()) {\n <div [class]=\"spinButtonClasses()\">\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '+')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().increase\">\n <svg lucideChevronUp [size]=\"spinButtonIconSize()\"></svg>\n </button>\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '-')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().decrease\">\n <svg lucideChevronDown [size]=\"spinButtonIconSize()\"></svg>\n </button>\n </div>\n}\n",
|
|
1034
1043
|
dependencies: [
|
|
1035
1044
|
{
|
|
1036
1045
|
kind: "directive",
|
|
@@ -1105,7 +1114,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1105
1114
|
LucideChevronUp,
|
|
1106
1115
|
LucideChevronDown
|
|
1107
1116
|
],
|
|
1108
|
-
template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-none flex-wrap items-center overflow-hidden border-none\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n monaTextBox\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [required]=\"required()\"\n [type]=\"'text'\"\n [attr.inputmode]=\"decimals() > 0 ? 'decimal' : 'numeric'\"\n [readonly]=\"readonly()\"\n [tabIndex]=\"tabindex()\"\n [placeholder]=\"placeholder()\"\n [value]=\"formattedValue()\"\n (input)=\"applyRawValue(valueTextBox.value)\"\n (keydown)=\"keydown$.next($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (focusout)=\"inputFocusOut.emit($event)\"\n (beforeinput)=\"beforeInput$.next($event)\"\n (paste)=\"onPaste($event)\"\n (wheel)=\"wheel$.next($event)\"\n [size]=\"size()\"\n [class]=\"inputClasses()\"\n autocomplete=\"off\"\n role=\"spinbutton\"\n [attr.aria-describedby]=\"
|
|
1117
|
+
template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-none flex-wrap items-center overflow-hidden border-none\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n monaTextBox\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [required]=\"required()\"\n [type]=\"'text'\"\n [attr.inputmode]=\"decimals() > 0 ? 'decimal' : 'numeric'\"\n [readonly]=\"readonly()\"\n [tabIndex]=\"tabindex()\"\n [placeholder]=\"placeholder()\"\n [value]=\"formattedValue()\"\n (input)=\"applyRawValue(valueTextBox.value)\"\n (keydown)=\"keydown$.next($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (focusout)=\"inputFocusOut.emit($event)\"\n (beforeinput)=\"beforeInput$.next($event)\"\n (paste)=\"onPaste($event)\"\n (wheel)=\"wheel$.next($event)\"\n [size]=\"size()\"\n [class]=\"inputClasses()\"\n autocomplete=\"off\"\n role=\"spinbutton\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-invalid]=\"invalidInput() || null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-valuemin]=\"minValue()\"\n [attr.aria-valuemax]=\"maxValue()\"\n [attr.aria-valuetext]=\"formattedValue() || null\"\n [attr.data-spinners]=\"showSpinners()\"\n #valueTextBox />\n@if (showSpinners()) {\n <div [class]=\"spinButtonClasses()\">\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '+')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().increase\">\n <svg lucideChevronUp [size]=\"spinButtonIconSize()\"></svg>\n </button>\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '-')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().decrease\">\n <svg lucideChevronDown [size]=\"spinButtonIconSize()\"></svg>\n </button>\n </div>\n}\n"
|
|
1109
1118
|
}]
|
|
1110
1119
|
}],
|
|
1111
1120
|
ctorParameters: () => [],
|
|
@@ -1259,7 +1268,7 @@ var NumericTextBoxComponent = class NumericTextBoxComponent extends NumericTextB
|
|
|
1259
1268
|
outputs: { value: "valueChange" },
|
|
1260
1269
|
usesInheritance: true,
|
|
1261
1270
|
ngImport: i0,
|
|
1262
|
-
template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-none flex-wrap items-center overflow-hidden border-none\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n monaTextBox\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [required]=\"required()\"\n [type]=\"'text'\"\n [attr.inputmode]=\"decimals() > 0 ? 'decimal' : 'numeric'\"\n [readonly]=\"readonly()\"\n [tabIndex]=\"tabindex()\"\n [placeholder]=\"placeholder()\"\n [value]=\"formattedValue()\"\n (input)=\"applyRawValue(valueTextBox.value)\"\n (keydown)=\"keydown$.next($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (focusout)=\"inputFocusOut.emit($event)\"\n (beforeinput)=\"beforeInput$.next($event)\"\n (paste)=\"onPaste($event)\"\n (wheel)=\"wheel$.next($event)\"\n [size]=\"size()\"\n [class]=\"inputClasses()\"\n autocomplete=\"off\"\n role=\"spinbutton\"\n [attr.aria-describedby]=\"
|
|
1271
|
+
template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-none flex-wrap items-center overflow-hidden border-none\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n monaTextBox\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [required]=\"required()\"\n [type]=\"'text'\"\n [attr.inputmode]=\"decimals() > 0 ? 'decimal' : 'numeric'\"\n [readonly]=\"readonly()\"\n [tabIndex]=\"tabindex()\"\n [placeholder]=\"placeholder()\"\n [value]=\"formattedValue()\"\n (input)=\"applyRawValue(valueTextBox.value)\"\n (keydown)=\"keydown$.next($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (focusout)=\"inputFocusOut.emit($event)\"\n (beforeinput)=\"beforeInput$.next($event)\"\n (paste)=\"onPaste($event)\"\n (wheel)=\"wheel$.next($event)\"\n [size]=\"size()\"\n [class]=\"inputClasses()\"\n autocomplete=\"off\"\n role=\"spinbutton\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-invalid]=\"invalidInput() || null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-valuemin]=\"minValue()\"\n [attr.aria-valuemax]=\"maxValue()\"\n [attr.aria-valuetext]=\"formattedValue() || null\"\n [attr.data-spinners]=\"showSpinners()\"\n #valueTextBox />\n@if (showSpinners()) {\n <div [class]=\"spinButtonClasses()\">\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '+')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().increase\">\n <svg lucideChevronUp [size]=\"spinButtonIconSize()\"></svg>\n </button>\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '-')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().decrease\">\n <svg lucideChevronDown [size]=\"spinButtonIconSize()\"></svg>\n </button>\n </div>\n}\n",
|
|
1263
1272
|
dependencies: [
|
|
1264
1273
|
{
|
|
1265
1274
|
kind: "directive",
|
|
@@ -1334,7 +1343,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1334
1343
|
LucideChevronUp,
|
|
1335
1344
|
LucideChevronDown
|
|
1336
1345
|
],
|
|
1337
|
-
template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-none flex-wrap items-center overflow-hidden border-none\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n monaTextBox\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [required]=\"required()\"\n [type]=\"'text'\"\n [attr.inputmode]=\"decimals() > 0 ? 'decimal' : 'numeric'\"\n [readonly]=\"readonly()\"\n [tabIndex]=\"tabindex()\"\n [placeholder]=\"placeholder()\"\n [value]=\"formattedValue()\"\n (input)=\"applyRawValue(valueTextBox.value)\"\n (keydown)=\"keydown$.next($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (focusout)=\"inputFocusOut.emit($event)\"\n (beforeinput)=\"beforeInput$.next($event)\"\n (paste)=\"onPaste($event)\"\n (wheel)=\"wheel$.next($event)\"\n [size]=\"size()\"\n [class]=\"inputClasses()\"\n autocomplete=\"off\"\n role=\"spinbutton\"\n [attr.aria-describedby]=\"
|
|
1346
|
+
template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-none flex-wrap items-center overflow-hidden border-none\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n monaTextBox\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [required]=\"required()\"\n [type]=\"'text'\"\n [attr.inputmode]=\"decimals() > 0 ? 'decimal' : 'numeric'\"\n [readonly]=\"readonly()\"\n [tabIndex]=\"tabindex()\"\n [placeholder]=\"placeholder()\"\n [value]=\"formattedValue()\"\n (input)=\"applyRawValue(valueTextBox.value)\"\n (keydown)=\"keydown$.next($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (focusout)=\"inputFocusOut.emit($event)\"\n (beforeinput)=\"beforeInput$.next($event)\"\n (paste)=\"onPaste($event)\"\n (wheel)=\"wheel$.next($event)\"\n [size]=\"size()\"\n [class]=\"inputClasses()\"\n autocomplete=\"off\"\n role=\"spinbutton\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-invalid]=\"invalidInput() || null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-valuemin]=\"minValue()\"\n [attr.aria-valuemax]=\"maxValue()\"\n [attr.aria-valuetext]=\"formattedValue() || null\"\n [attr.data-spinners]=\"showSpinners()\"\n #valueTextBox />\n@if (showSpinners()) {\n <div [class]=\"spinButtonClasses()\">\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '+')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().increase\">\n <svg lucideChevronUp [size]=\"spinButtonIconSize()\"></svg>\n </button>\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '-')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().decrease\">\n <svg lucideChevronDown [size]=\"spinButtonIconSize()\"></svg>\n </button>\n </div>\n}\n"
|
|
1338
1347
|
}]
|
|
1339
1348
|
}],
|
|
1340
1349
|
propDecorators: {
|
|
@@ -276,8 +276,10 @@ var OtpInputComponent = class OtpInputComponent {
|
|
|
276
276
|
this.#hostElementRef = inject(ElementRef);
|
|
277
277
|
this.#i18n = inject(MonaI18nService);
|
|
278
278
|
this.#label = injectLabelAssociation({
|
|
279
|
+
ariaDescribedBy: () => this.computedAriaDescribedby(),
|
|
279
280
|
ariaLabel: () => this.ariaLabel(),
|
|
280
|
-
ariaLabelledBy: () => this.ariaLabelledBy()
|
|
281
|
+
ariaLabelledBy: () => this.ariaLabelledBy(),
|
|
282
|
+
focus: () => this.focus()
|
|
281
283
|
});
|
|
282
284
|
this.#touchPress = false;
|
|
283
285
|
this.activeSlotIndex = computed(() => {
|
|
@@ -323,6 +325,7 @@ var OtpInputComponent = class OtpInputComponent {
|
|
|
323
325
|
const attribute = findUsableAttribute(this.inputAttributes(), "name");
|
|
324
326
|
return attribute != null ? String(attribute) : null;
|
|
325
327
|
}, ...ngDevMode ? [{ debugName: "derivedName" }] : /* istanbul ignore next */ []);
|
|
328
|
+
this.describedBy = this.#label.describedBy;
|
|
326
329
|
this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
|
|
327
330
|
this.hasFocus = signal(false, ...ngDevMode ? [{ debugName: "hasFocus" }] : /* istanbul ignore next */ []);
|
|
328
331
|
this.inputClass = computed(() => otpInputFieldThemeVariants(), ...ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []);
|
|
@@ -908,7 +911,7 @@ var OtpInputComponent = class OtpInputComponent {
|
|
|
908
911
|
isSignal: true
|
|
909
912
|
}],
|
|
910
913
|
ngImport: i0,
|
|
911
|
-
template: "<input\n #input\n [class]=\"inputClass()\"\n [id]=\"resolvedId()\"\n [attr.tabindex]=\"tabindex()\"\n [value]=\"value()\"\n [disabled]=\"effectiveDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [type]=\"nativeInputType()\"\n [attr.inputmode]=\"derivedInputMode()\"\n [attr.autocomplete]=\"derivedAutocomplete()\"\n [attr.autocapitalize]=\"'off'\"\n [attr.spellcheck]=\"'false'\"\n [attr.aria-label]=\"computedAriaLabel()\"\n [attr.aria-labelledby]=\"computedAriaLabelledby()\"\n [attr.aria-describedby]=\"
|
|
914
|
+
template: "<input\n #input\n [class]=\"inputClass()\"\n [id]=\"resolvedId()\"\n [attr.tabindex]=\"tabindex()\"\n [value]=\"value()\"\n [disabled]=\"effectiveDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [type]=\"nativeInputType()\"\n [attr.inputmode]=\"derivedInputMode()\"\n [attr.autocomplete]=\"derivedAutocomplete()\"\n [attr.autocapitalize]=\"'off'\"\n [attr.spellcheck]=\"'false'\"\n [attr.aria-label]=\"computedAriaLabel()\"\n [attr.aria-labelledby]=\"computedAriaLabelledby()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.maxlength]=\"normalizedLength()\"\n [attr.name]=\"derivedName()\"\n [monaAttributeBinder]=\"sanitizedAttributes()\"\n (beforeinput)=\"onBeforeInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"onInput($event)\"\n (paste)=\"onPaste($event)\"\n (click)=\"onInputClick($event)\"\n (mousedown)=\"onInputMouseDown($event)\"\n (pointerdown)=\"onInputPointerDown($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (select)=\"onSelect()\"\n (selectionchange)=\"onSelect()\"\n (keyup)=\"onKeyUp()\"\n (compositionstart)=\"onCompositionStart()\"\n (compositionend)=\"onCompositionEnd($event)\" />\n\n@for (group of visualGroups(); track group.index; let lastGroup = $last) {\n <div\n class=\"inline-flex items-center\"\n [class.gap-1.5]=\"spacing()\"\n [class]=\"!spacing() ? '[&>*:not(:first-child)]:-ms-px' : ''\"\n [attr.data-group-index]=\"group.index\">\n @for (slot of group.slots; track slot.index) {\n <span\n class=\"otp-slot\"\n [class]=\"slot.classes\"\n [attr.data-slot-index]=\"slot.index\"\n [attr.data-active]=\"slot.active || null\"\n [attr.data-selected]=\"slot.selected || null\"\n [attr.data-filled]=\"slot.filled || null\"\n [attr.data-placeholder]=\"slot.placeholder || null\"\n [attr.data-disabled]=\"effectiveDisabled() || null\"\n [attr.data-readonly]=\"readonly() || null\"\n [attr.data-invalid]=\"invalidState() || null\"\n aria-hidden=\"true\">\n {{ slot.displayCharacter }}\n @if (slot.active && !slot.filled && hasFocus() && !effectiveDisabled() && !readonly()) {\n <span\n class=\"pointer-events-none absolute inset-y-2 w-0.5 animate-pulse motion-reduce:animate-none bg-foreground\"\n aria-hidden=\"true\"></span>\n }\n </span>\n }\n </div>\n\n @if (!lastGroup && (separator() || separatorTemplate())) {\n <span\n class=\"inline-flex items-center justify-center text-muted-foreground select-none px-1\"\n [class]=\"separatorClass()\"\n aria-hidden=\"true\">\n @if (separatorTemplate(); as customTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n customTemplate;\n context: { $implicit: group.index, groupIndex: group.index }\n \"></ng-container>\n } @else {\n {{ separator() }}\n }\n </span>\n }\n}\n",
|
|
912
915
|
dependencies: [{
|
|
913
916
|
kind: "directive",
|
|
914
917
|
type: NgTemplateOutlet,
|
|
@@ -951,7 +954,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
951
954
|
"[attr.data-focused]": "hasFocus() || null",
|
|
952
955
|
"[class]": "classes()"
|
|
953
956
|
},
|
|
954
|
-
template: "<input\n #input\n [class]=\"inputClass()\"\n [id]=\"resolvedId()\"\n [attr.tabindex]=\"tabindex()\"\n [value]=\"value()\"\n [disabled]=\"effectiveDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [type]=\"nativeInputType()\"\n [attr.inputmode]=\"derivedInputMode()\"\n [attr.autocomplete]=\"derivedAutocomplete()\"\n [attr.autocapitalize]=\"'off'\"\n [attr.spellcheck]=\"'false'\"\n [attr.aria-label]=\"computedAriaLabel()\"\n [attr.aria-labelledby]=\"computedAriaLabelledby()\"\n [attr.aria-describedby]=\"
|
|
957
|
+
template: "<input\n #input\n [class]=\"inputClass()\"\n [id]=\"resolvedId()\"\n [attr.tabindex]=\"tabindex()\"\n [value]=\"value()\"\n [disabled]=\"effectiveDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [type]=\"nativeInputType()\"\n [attr.inputmode]=\"derivedInputMode()\"\n [attr.autocomplete]=\"derivedAutocomplete()\"\n [attr.autocapitalize]=\"'off'\"\n [attr.spellcheck]=\"'false'\"\n [attr.aria-label]=\"computedAriaLabel()\"\n [attr.aria-labelledby]=\"computedAriaLabelledby()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.maxlength]=\"normalizedLength()\"\n [attr.name]=\"derivedName()\"\n [monaAttributeBinder]=\"sanitizedAttributes()\"\n (beforeinput)=\"onBeforeInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"onInput($event)\"\n (paste)=\"onPaste($event)\"\n (click)=\"onInputClick($event)\"\n (mousedown)=\"onInputMouseDown($event)\"\n (pointerdown)=\"onInputPointerDown($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (select)=\"onSelect()\"\n (selectionchange)=\"onSelect()\"\n (keyup)=\"onKeyUp()\"\n (compositionstart)=\"onCompositionStart()\"\n (compositionend)=\"onCompositionEnd($event)\" />\n\n@for (group of visualGroups(); track group.index; let lastGroup = $last) {\n <div\n class=\"inline-flex items-center\"\n [class.gap-1.5]=\"spacing()\"\n [class]=\"!spacing() ? '[&>*:not(:first-child)]:-ms-px' : ''\"\n [attr.data-group-index]=\"group.index\">\n @for (slot of group.slots; track slot.index) {\n <span\n class=\"otp-slot\"\n [class]=\"slot.classes\"\n [attr.data-slot-index]=\"slot.index\"\n [attr.data-active]=\"slot.active || null\"\n [attr.data-selected]=\"slot.selected || null\"\n [attr.data-filled]=\"slot.filled || null\"\n [attr.data-placeholder]=\"slot.placeholder || null\"\n [attr.data-disabled]=\"effectiveDisabled() || null\"\n [attr.data-readonly]=\"readonly() || null\"\n [attr.data-invalid]=\"invalidState() || null\"\n aria-hidden=\"true\">\n {{ slot.displayCharacter }}\n @if (slot.active && !slot.filled && hasFocus() && !effectiveDisabled() && !readonly()) {\n <span\n class=\"pointer-events-none absolute inset-y-2 w-0.5 animate-pulse motion-reduce:animate-none bg-foreground\"\n aria-hidden=\"true\"></span>\n }\n </span>\n }\n </div>\n\n @if (!lastGroup && (separator() || separatorTemplate())) {\n <span\n class=\"inline-flex items-center justify-center text-muted-foreground select-none px-1\"\n [class]=\"separatorClass()\"\n aria-hidden=\"true\">\n @if (separatorTemplate(); as customTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n customTemplate;\n context: { $implicit: group.index, groupIndex: group.index }\n \"></ng-container>\n } @else {\n {{ separator() }}\n }\n </span>\n }\n}\n"
|
|
955
958
|
}]
|
|
956
959
|
}],
|
|
957
960
|
ctorParameters: () => [],
|
|
@@ -4,11 +4,11 @@ import { Component, Directive, ElementRef, InjectionToken, afterNextRender, afte
|
|
|
4
4
|
import { FormsModule } from "@angular/forms";
|
|
5
5
|
import { twMerge } from "tailwind-merge";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
|
-
import { createElementControlId, injectEffectiveDisabled, injectLabelAssociation, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
7
|
+
import { FIELD_ASSOCIATION_BOUNDARY, createElementControlId, injectEffectiveDisabled, injectLabelAssociation, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
8
8
|
const radioGroupThemeVariants = cva("flex", {
|
|
9
9
|
variants: { orientation: {
|
|
10
10
|
horizontal: "flex-row flex-wrap gap-4",
|
|
11
|
-
vertical: "flex-col gap-2"
|
|
11
|
+
vertical: "flex-col items-start gap-2"
|
|
12
12
|
} },
|
|
13
13
|
defaultVariants: { orientation: "vertical" }
|
|
14
14
|
});
|
|
@@ -132,8 +132,10 @@ var RadioButtonComponent = class RadioButtonComponent {
|
|
|
132
132
|
constructor() {
|
|
133
133
|
this.#group = inject(MONA_RADIO_GROUP, { optional: true });
|
|
134
134
|
this.#label = injectLabelAssociation({
|
|
135
|
+
ariaDescribedBy: () => this.ariaDescribedBy(),
|
|
135
136
|
ariaLabel: () => this.ariaLabel(),
|
|
136
137
|
ariaLabelledBy: () => this.ariaLabelledBy(),
|
|
138
|
+
focus: () => this.focus(),
|
|
137
139
|
wrapped: false
|
|
138
140
|
});
|
|
139
141
|
this.containerLabelClasses = computed(() => {
|
|
@@ -142,6 +144,7 @@ var RadioButtonComponent = class RadioButtonComponent {
|
|
|
142
144
|
const variantClasses = radioButtonContainerLabelThemeVariants({ labelSize });
|
|
143
145
|
return twMerge(variantClasses, userClasses);
|
|
144
146
|
}, ...ngDevMode ? [{ debugName: "containerLabelClasses" }] : /* istanbul ignore next */ []);
|
|
147
|
+
this.describedBy = this.#label.describedBy;
|
|
145
148
|
this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled() || (this.#group?.disabled() ?? false));
|
|
146
149
|
this.effectiveName = computed(() => this.#group?.name() ?? this.name(), ...ngDevMode ? [{ debugName: "effectiveName" }] : /* istanbul ignore next */ []);
|
|
147
150
|
this.effectiveReadonly = computed(() => this.readonly() || (this.#group?.readonly() ?? false), ...ngDevMode ? [{ debugName: "effectiveReadonly" }] : /* istanbul ignore next */ []);
|
|
@@ -409,7 +412,7 @@ var RadioButtonComponent = class RadioButtonComponent {
|
|
|
409
412
|
isSignal: true
|
|
410
413
|
}],
|
|
411
414
|
ngImport: i0,
|
|
412
|
-
template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"effectiveReadonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n <input\n #input\n type=\"radio\"\n [id]=\"inputId()\"\n [required]=\"effectiveRequired()\"\n [disabled]=\"effectiveDisabled()\"\n [name]=\"effectiveName()\"\n [attr.value]=\"nativeValue()\"\n [class]=\"radioButtonClasses()\"\n [checked]=\"selected()\"\n [attr.aria-invalid]=\"inputInvalid() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"
|
|
415
|
+
template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"effectiveReadonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n <input\n #input\n type=\"radio\"\n [id]=\"inputId()\"\n [required]=\"effectiveRequired()\"\n [disabled]=\"effectiveDisabled()\"\n [name]=\"effectiveName()\"\n [attr.value]=\"nativeValue()\"\n [class]=\"radioButtonClasses()\"\n [checked]=\"selected()\"\n [attr.aria-invalid]=\"inputInvalid() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"describedBy()\"\n (blur)=\"onBlur($event)\"\n (click)=\"onInputClick($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (change)=\"onSelectionChange()\" />\n <span [class]=\"radioButtonCircleClasses()\" [attr.data-invalid]=\"invalidState() || null\">\n @if (selected()) {\n <span [class]=\"radioButtonIndicatorClasses()\"></span>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n",
|
|
413
416
|
dependencies: [{
|
|
414
417
|
kind: "ngmodule",
|
|
415
418
|
type: FormsModule
|
|
@@ -444,7 +447,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
444
447
|
"[attr.data-selected]": "selected()",
|
|
445
448
|
"[attr.data-disabled]": "effectiveDisabled()"
|
|
446
449
|
},
|
|
447
|
-
template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"effectiveReadonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n <input\n #input\n type=\"radio\"\n [id]=\"inputId()\"\n [required]=\"effectiveRequired()\"\n [disabled]=\"effectiveDisabled()\"\n [name]=\"effectiveName()\"\n [attr.value]=\"nativeValue()\"\n [class]=\"radioButtonClasses()\"\n [checked]=\"selected()\"\n [attr.aria-invalid]=\"inputInvalid() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"
|
|
450
|
+
template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"effectiveReadonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n <input\n #input\n type=\"radio\"\n [id]=\"inputId()\"\n [required]=\"effectiveRequired()\"\n [disabled]=\"effectiveDisabled()\"\n [name]=\"effectiveName()\"\n [attr.value]=\"nativeValue()\"\n [class]=\"radioButtonClasses()\"\n [checked]=\"selected()\"\n [attr.aria-invalid]=\"inputInvalid() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"describedBy()\"\n (blur)=\"onBlur($event)\"\n (click)=\"onInputClick($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (change)=\"onSelectionChange()\" />\n <span [class]=\"radioButtonCircleClasses()\" [attr.data-invalid]=\"invalidState() || null\">\n @if (selected()) {\n <span [class]=\"radioButtonIndicatorClasses()\"></span>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n"
|
|
448
451
|
}]
|
|
449
452
|
}],
|
|
450
453
|
ctorParameters: () => [],
|
|
@@ -620,11 +623,14 @@ var RadioGroupComponent = class RadioGroupComponent {
|
|
|
620
623
|
this.#hostElementRef = inject(ElementRef);
|
|
621
624
|
this.#label = injectLabelAssociation({
|
|
622
625
|
activate: () => this.focus(),
|
|
626
|
+
ariaDescribedBy: () => this.ariaDescribedBy(),
|
|
623
627
|
ariaLabel: () => this.ariaLabel(),
|
|
624
|
-
ariaLabelledBy: () => this.ariaLabelledBy()
|
|
628
|
+
ariaLabelledBy: () => this.ariaLabelledBy(),
|
|
629
|
+
focus: () => this.focus()
|
|
625
630
|
});
|
|
626
631
|
this.#selectionVersion = signal(0, ...ngDevMode ? [{ debugName: "#selectionVersion" }] : /* istanbul ignore next */ []);
|
|
627
632
|
this.classes = computed(() => twMerge(radioGroupThemeVariants({ orientation: this.orientation() }), this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
633
|
+
this.describedBy = this.#label.describedBy;
|
|
628
634
|
this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
|
|
629
635
|
this.invalidState = computed(() => this.touched() && this.invalid(), ...ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []);
|
|
630
636
|
this.labelledBy = this.#label.labelledBy;
|
|
@@ -810,7 +816,7 @@ var RadioGroupComponent = class RadioGroupComponent {
|
|
|
810
816
|
attributes: { "role": "radiogroup" },
|
|
811
817
|
listeners: { "focusout": "onFocusOut($event)" },
|
|
812
818
|
properties: {
|
|
813
|
-
"attr.aria-describedby": "
|
|
819
|
+
"attr.aria-describedby": "describedBy()",
|
|
814
820
|
"attr.aria-disabled": "effectiveDisabled() || null",
|
|
815
821
|
"attr.aria-invalid": "invalidState() ? 'true' : null",
|
|
816
822
|
"attr.aria-label": "ariaLabel() || null",
|
|
@@ -826,7 +832,7 @@ var RadioGroupComponent = class RadioGroupComponent {
|
|
|
826
832
|
providers: [{
|
|
827
833
|
provide: MONA_RADIO_GROUP,
|
|
828
834
|
useFactory: () => inject(RadioGroupComponent).context
|
|
829
|
-
}],
|
|
835
|
+
}, ...FIELD_ASSOCIATION_BOUNDARY],
|
|
830
836
|
ngImport: i0,
|
|
831
837
|
template: `<ng-content />`,
|
|
832
838
|
isInline: true
|
|
@@ -846,10 +852,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
846
852
|
providers: [{
|
|
847
853
|
provide: MONA_RADIO_GROUP,
|
|
848
854
|
useFactory: () => inject(RadioGroupComponent).context
|
|
849
|
-
}],
|
|
855
|
+
}, ...FIELD_ASSOCIATION_BOUNDARY],
|
|
850
856
|
host: {
|
|
851
857
|
role: "radiogroup",
|
|
852
|
-
"[attr.aria-describedby]": "
|
|
858
|
+
"[attr.aria-describedby]": "describedBy()",
|
|
853
859
|
"[attr.aria-disabled]": "effectiveDisabled() || null",
|
|
854
860
|
"[attr.aria-invalid]": "invalidState() ? 'true' : null",
|
|
855
861
|
"[attr.aria-label]": "ariaLabel() || null",
|