@nanahoshi/mona-ui 0.24.11 → 0.25.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/README.md +9 -0
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -10
- package/fesm2022/nanahoshi-mona-ui-avatar.mjs +37 -20
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +239 -47
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +184 -31
- package/fesm2022/nanahoshi-mona-ui-button.mjs +47 -11
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +17 -13
- package/fesm2022/nanahoshi-mona-ui-card.mjs +54 -30
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +27 -22
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +112 -31
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +131 -89
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +59 -19
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +118 -41
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +243 -212
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +155 -86
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +161 -131
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +12 -11
- package/fesm2022/nanahoshi-mona-ui-common.mjs +18 -1
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +10 -9
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +10 -9
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +10 -9
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +25 -24
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +202 -33
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +31 -10
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -1
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-DhKLnW06.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-voGbKOiB.mjs → nanahoshi-mona-ui-grid-grid-list.component-BAN70Wcn.mjs} +4 -4
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-HQ1Kv6R9.mjs → nanahoshi-mona-ui-grid-grid-row.component-C_kCaA5b.mjs} +7 -7
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-PNLJFcuH.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-BsNfrAHz.mjs} +4 -4
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BO19AVwC.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs} +27 -29
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +39 -4
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +5 -5
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +7 -7
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +183 -47
- package/fesm2022/nanahoshi-mona-ui-label.mjs +111 -15
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +14 -13
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +13 -12
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +192 -56
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +3 -1
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +60 -29
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +334 -37
- package/fesm2022/nanahoshi-mona-ui-rating.mjs +84 -30
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +274 -108
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +127 -37
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +595 -170
- package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +3 -2
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +323 -166
- package/fesm2022/nanahoshi-mona-ui-spinner.mjs +167 -82
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +3 -3
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +273 -165
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +219 -132
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +84 -32
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +337 -116
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +10 -12
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +21 -8
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +444 -88
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +10 -9
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +15 -14
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +17 -3
- package/fesm2022/nanahoshi-mona-ui-window.mjs +1 -1
- package/i18n/catalogs/en-US.messages.json +33 -4
- package/locales/ar-sa/ar-sa.messages.json +33 -4
- package/locales/de-de/de-de.messages.json +33 -4
- package/locales/es-es/es-es.messages.json +33 -4
- package/locales/fr-fr/fr-fr.messages.json +33 -4
- package/locales/id-id/id-id.messages.json +33 -4
- package/locales/it-it/it-it.messages.json +33 -4
- package/locales/ja-jp/ja-jp.messages.json +33 -4
- package/locales/ko-kr/ko-kr.messages.json +33 -4
- package/locales/pt-br/pt-br.messages.json +33 -4
- package/locales/ru-ru/ru-ru.messages.json +33 -4
- package/locales/tr-tr/tr-tr.messages.json +33 -4
- package/locales/zh-cn/zh-cn.messages.json +33 -4
- package/locales/zh-tw/zh-tw.messages.json +33 -4
- package/package.json +2 -1
- package/styles.css +156 -0
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +1 -0
- package/types/nanahoshi-mona-ui-avatar.d.ts +18 -11
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +62 -14
- package/types/nanahoshi-mona-ui-button-group.d.ts +86 -16
- package/types/nanahoshi-mona-ui-button.d.ts +26 -3
- package/types/nanahoshi-mona-ui-calendar.d.ts +1 -0
- package/types/nanahoshi-mona-ui-card.d.ts +22 -6
- package/types/nanahoshi-mona-ui-check-box.d.ts +54 -13
- package/types/nanahoshi-mona-ui-chip.d.ts +31 -18
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +21 -5
- package/types/nanahoshi-mona-ui-collapsible.d.ts +20 -11
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +62 -36
- package/types/nanahoshi-mona-ui-color-palette.d.ts +65 -27
- package/types/nanahoshi-mona-ui-color-picker.d.ts +64 -23
- package/types/nanahoshi-mona-ui-combo-box.d.ts +1 -0
- package/types/nanahoshi-mona-ui-common.d.ts +28 -2
- package/types/nanahoshi-mona-ui-date-picker.d.ts +1 -0
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +1 -0
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +1 -0
- package/types/nanahoshi-mona-ui-editor.d.ts +1 -0
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +51 -7
- package/types/nanahoshi-mona-ui-fieldset.d.ts +18 -4
- package/types/nanahoshi-mona-ui-grid.d.ts +0 -1
- package/types/nanahoshi-mona-ui-i18n.d.ts +38 -3
- package/types/nanahoshi-mona-ui-internal.d.ts +95 -14
- package/types/nanahoshi-mona-ui-label.d.ts +17 -2
- 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-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 +1 -0
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +1 -0
- package/types/nanahoshi-mona-ui-otp-input.d.ts +49 -12
- package/types/nanahoshi-mona-ui-placeholder.d.ts +2 -1
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +21 -9
- package/types/nanahoshi-mona-ui-radio-button.d.ts +165 -20
- package/types/nanahoshi-mona-ui-rating.d.ts +21 -6
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +59 -27
- package/types/nanahoshi-mona-ui-segmented.d.ts +52 -24
- package/types/nanahoshi-mona-ui-sidebar.d.ts +104 -41
- package/types/nanahoshi-mona-ui-skeleton.d.ts +1 -1
- package/types/nanahoshi-mona-ui-slider.d.ts +99 -35
- package/types/nanahoshi-mona-ui-spinner.d.ts +9 -5
- package/types/nanahoshi-mona-ui-splitter.d.ts +31 -10
- package/types/nanahoshi-mona-ui-stepper.d.ts +58 -12
- package/types/nanahoshi-mona-ui-switch.d.ts +32 -10
- package/types/nanahoshi-mona-ui-tabs.d.ts +75 -20
- package/types/nanahoshi-mona-ui-text-area.d.ts +7 -7
- package/types/nanahoshi-mona-ui-text-box.d.ts +2 -0
- package/types/nanahoshi-mona-ui-theme.d.ts +392 -15
- package/types/nanahoshi-mona-ui-time-picker.d.ts +1 -0
- package/types/nanahoshi-mona-ui-time-selector.d.ts +1 -0
- package/types/nanahoshi-mona-ui-tooltip.d.ts +7 -1
|
@@ -8,7 +8,7 @@ import { getLocaleHourFormat, createTypedDateInput } from '@nanahoshi/mona-ui/da
|
|
|
8
8
|
import * as i1 from '@nanahoshi/mona-ui/dropdowns';
|
|
9
9
|
import { DropdownService, dropdownPopupThemeVariants, DROPDOWN_POPUP_INPUT_TOKEN, DropdownPopupHandlerDirective } from '@nanahoshi/mona-ui/dropdowns';
|
|
10
10
|
import { MonaI18nService, getLocaleTimeInputFormat } from '@nanahoshi/mona-ui/i18n';
|
|
11
|
-
import { themeControlSurfaceClasses, createElementControlId } from '@nanahoshi/mona-ui/internal';
|
|
11
|
+
import { themeControlSurfaceClasses, injectEffectiveDisabled, createElementControlId } from '@nanahoshi/mona-ui/internal';
|
|
12
12
|
import { TextBoxComponent, TextBoxSuffixTemplateDirective } from '@nanahoshi/mona-ui/text-box';
|
|
13
13
|
import { TimeSelectorComponent } from '@nanahoshi/mona-ui/time-selector';
|
|
14
14
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -25,7 +25,7 @@ const timePickerBaseThemeVariants = cva(`
|
|
|
25
25
|
flex w-full items-center
|
|
26
26
|
${themeControlSurfaceClasses} text-foreground
|
|
27
27
|
border border-input-border shadow-(--shadow-control)
|
|
28
|
-
outline-none
|
|
28
|
+
outline-none focus-visible:outline-hidden
|
|
29
29
|
|
|
30
30
|
data-[disabled='true']:pointer-events-none
|
|
31
31
|
data-[disabled='true']:cursor-not-allowed
|
|
@@ -94,6 +94,7 @@ class TimePickerComponent {
|
|
|
94
94
|
return twMerge(variantClass, userClass);
|
|
95
95
|
}, /* @ts-ignore */
|
|
96
96
|
...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
|
|
97
|
+
this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
|
|
97
98
|
this.effectiveFormat = computed(() => {
|
|
98
99
|
return (this.format() ??
|
|
99
100
|
getLocaleTimeInputFormat(this.#i18n.localeId(), {
|
|
@@ -363,7 +364,7 @@ class TimePickerComponent {
|
|
|
363
364
|
this.typedInput.commit();
|
|
364
365
|
}
|
|
365
366
|
onKeydown(event) {
|
|
366
|
-
if (this.
|
|
367
|
+
if (this.effectiveDisabled() || this.readonly()) {
|
|
367
368
|
return;
|
|
368
369
|
}
|
|
369
370
|
if (event.altKey && event.key === "ArrowDown") {
|
|
@@ -384,7 +385,7 @@ class TimePickerComponent {
|
|
|
384
385
|
}
|
|
385
386
|
}
|
|
386
387
|
onTimeInputButtonClick() {
|
|
387
|
-
if (this.
|
|
388
|
+
if (this.effectiveDisabled() || this.readonly()) {
|
|
388
389
|
return;
|
|
389
390
|
}
|
|
390
391
|
if (this.#dropdownService.popupRef()) {
|
|
@@ -418,14 +419,14 @@ class TimePickerComponent {
|
|
|
418
419
|
});
|
|
419
420
|
}
|
|
420
421
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TimePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
421
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: TimePickerComponent, isStandalone: true, selector: "mona-time-picker", inputs: { ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, hourStep: { classPropertyName: "hourStep", publicName: "hourStep", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, popupClass: { classPropertyName: "popupClass", publicName: "popupClass", isSignal: true, isRequired: false, transformFunction: null }, popupHeight: { classPropertyName: "popupHeight", publicName: "popupHeight", isSignal: true, isRequired: false, transformFunction: null }, popupWidth: { classPropertyName: "popupWidth", publicName: "popupWidth", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonlyInput", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, secondStep: { classPropertyName: "secondStep", publicName: "secondStep", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", closed: "closed", open: "open", opened: "opened", touch: "touch", value: "valueChange" }, host: { listeners: { "focusin": "onFocusIn($event)", "focusout": "onFocusOut($event)", "keydown": "onKeydown($event)" }, properties: { "attr.aria-describedby": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.tabindex": "
|
|
422
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: TimePickerComponent, isStandalone: true, selector: "mona-time-picker", inputs: { ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, hourStep: { classPropertyName: "hourStep", publicName: "hourStep", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, popupClass: { classPropertyName: "popupClass", publicName: "popupClass", isSignal: true, isRequired: false, transformFunction: null }, popupHeight: { classPropertyName: "popupHeight", publicName: "popupHeight", isSignal: true, isRequired: false, transformFunction: null }, popupWidth: { classPropertyName: "popupWidth", publicName: "popupWidth", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonlyInput", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, secondStep: { classPropertyName: "secondStep", publicName: "secondStep", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", closed: "closed", open: "open", opened: "opened", touch: "touch", value: "valueChange" }, host: { listeners: { "focusin": "onFocusIn($event)", "focusout": "onFocusOut($event)", "keydown": "onKeydown($event)" }, properties: { "attr.aria-describedby": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.tabindex": "effectiveDisabled() ? null : -1", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.data-disabled": "effectiveDisabled() || null", "attr.data-expanded": "expanded()", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly() || null", "class": "baseClass()" } }, providers: [
|
|
422
423
|
DropdownService,
|
|
423
424
|
{
|
|
424
425
|
provide: DROPDOWN_POPUP_INPUT_TOKEN,
|
|
425
426
|
useExisting: forwardRef(() => TimePickerComponent),
|
|
426
427
|
multi: false
|
|
427
428
|
}
|
|
428
|
-
], viewQueries: [{ propertyName: "timePopupTemplateRef", first: true, predicate: ["timePopupTemplate"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DropdownPopupHandlerDirective }], ngImport: i0, template: "<mona-text-box\n [aria-describedby]=\"ariaDescribedBy()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledBy()\"\n [disabled]=\"
|
|
429
|
+
], viewQueries: [{ propertyName: "timePopupTemplateRef", first: true, predicate: ["timePopupTemplate"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DropdownPopupHandlerDirective }], ngImport: i0, template: "<mona-text-box\n [aria-describedby]=\"ariaDescribedBy()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledBy()\"\n [disabled]=\"effectiveDisabled()\"\n [inputId]=\"inputId()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"typedInput.text()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalidState()\"\n [placeholder]=\"placeholder()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\"\n [clearButton]=\"showClearButton()\"\n (valueChange)=\"typedInput.edit($event)\"\n (inputBlur)=\"onInputBlur()\">\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n (click)=\"onTimeInputButtonClick()\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openTimePicker\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n [disabled]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\">\n <svg lucideClock [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #timePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().timePicker\"\n cdkTrapFocus>\n <mona-time-selector\n focusOnMount\n [value]=\"value()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [max]=\"max()\"\n [min]=\"min()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [hourFormat]=\"effectiveHourFormat()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: LucideClock, selector: "svg[lucideClock]" }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class", "value"], outputs: ["lookChange", "selectedChange"] }, { kind: "component", type: TimeSelectorComponent, selector: "mona-time-selector", inputs: ["aria-label", "disabled", "focusOnMount", "footer", "hourFormat", "hourStep", "invalid", "max", "min", "minuteStep", "readonly", "required", "rounded", "secondStep", "showSeconds", "size", "touched", "value"], outputs: ["touch", "valueChange"] }, { kind: "component", type: TextBoxComponent, selector: "mona-text-box", inputs: ["aria-describedby", "aria-label", "aria-labelledby", "clearButton", "disabled", "inputAttributes", "inputClass", "inputId", "inputStyle", "invalid", "maxLength", "minLength", "name", "placeholder", "readonly", "required", "rounded", "size", "touched", "type", "class", "value"], outputs: ["inputBlur", "inputFocus", "touch", "valueChange"] }, { kind: "directive", type: TextBoxSuffixTemplateDirective, selector: "ng-template[monaTextBoxSuffixTemplate]" }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] }); }
|
|
429
430
|
}
|
|
430
431
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
431
432
|
type: Component,
|
|
@@ -448,9 +449,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
448
449
|
"[attr.aria-describedby]": "null",
|
|
449
450
|
"[attr.aria-label]": "null",
|
|
450
451
|
"[attr.aria-labelledby]": "null",
|
|
451
|
-
"[attr.tabindex]": "
|
|
452
|
+
"[attr.tabindex]": "effectiveDisabled() ? null : -1",
|
|
452
453
|
"[attr.aria-invalid]": "invalidState() ? 'true' : null",
|
|
453
|
-
"[attr.data-disabled]": "
|
|
454
|
+
"[attr.data-disabled]": "effectiveDisabled() || null",
|
|
454
455
|
"[attr.data-expanded]": "expanded()",
|
|
455
456
|
"[attr.data-invalid]": "invalidState() || null",
|
|
456
457
|
"[attr.data-readonly]": "readonly() || null",
|
|
@@ -458,7 +459,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
458
459
|
"(focusin)": "onFocusIn($event)",
|
|
459
460
|
"(focusout)": "onFocusOut($event)",
|
|
460
461
|
"(keydown)": "onKeydown($event)"
|
|
461
|
-
}, template: "<mona-text-box\n [aria-describedby]=\"ariaDescribedBy()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledBy()\"\n [disabled]=\"
|
|
462
|
+
}, template: "<mona-text-box\n [aria-describedby]=\"ariaDescribedBy()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledBy()\"\n [disabled]=\"effectiveDisabled()\"\n [inputId]=\"inputId()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"typedInput.text()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalidState()\"\n [placeholder]=\"placeholder()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\"\n [clearButton]=\"showClearButton()\"\n (valueChange)=\"typedInput.edit($event)\"\n (inputBlur)=\"onInputBlur()\">\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n (click)=\"onTimeInputButtonClick()\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openTimePicker\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n [disabled]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\">\n <svg lucideClock [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #timePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().timePicker\"\n cdkTrapFocus>\n <mona-time-selector\n focusOnMount\n [value]=\"value()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [max]=\"max()\"\n [min]=\"min()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [hourFormat]=\"effectiveHourFormat()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n</ng-template>\n" }]
|
|
462
463
|
}], ctorParameters: () => [], propDecorators: { timePopupTemplateRef: [{ type: i0.ViewChild, args: ["timePopupTemplate", { isSignal: true }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], closed: [{ type: i0.Output, args: ["closed"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], hourStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourStep", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], open: [{ type: i0.Output, args: ["open"] }], opened: [{ type: i0.Output, args: ["opened"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], popupClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupClass", required: false }] }], popupHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupHeight", required: false }] }], popupWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupWidth", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], readonlyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonlyInput", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], secondStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondStep", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeconds", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
463
464
|
|
|
464
465
|
/*
|
|
@@ -5,7 +5,7 @@ import { ButtonDirective } from '@nanahoshi/mona-ui/button';
|
|
|
5
5
|
import { PreventableEvent } from '@nanahoshi/mona-ui/common';
|
|
6
6
|
import { TimeLimiterPipe, TimeSelectorService, getLocaleHourFormat, generateMinuteSet, generateSecondSet, generateHourSet } from '@nanahoshi/mona-ui/date-input';
|
|
7
7
|
import { injectComponentDirection, MonaI18nService, formatNumber } from '@nanahoshi/mona-ui/i18n';
|
|
8
|
-
import { rxTimeout, createElementControlId } from '@nanahoshi/mona-ui/internal';
|
|
8
|
+
import { themeSelectionBarClasses, rxTimeout, injectEffectiveDisabled, createElementControlId } from '@nanahoshi/mona-ui/internal';
|
|
9
9
|
import { DateTime } from 'luxon';
|
|
10
10
|
import { fromEvent, filter } from 'rxjs';
|
|
11
11
|
import { cva } from 'class-variance-authority';
|
|
@@ -54,7 +54,7 @@ const timeSelectorListThemeVariants = cva(`
|
|
|
54
54
|
scrollbar-hide scroll-smooth
|
|
55
55
|
snap-y snap-mandatory
|
|
56
56
|
scrollbar-width:none
|
|
57
|
-
select-none outline-none
|
|
57
|
+
select-none outline-none focus-visible:outline-hidden
|
|
58
58
|
[&::-webkit-scrollbar]:hidden
|
|
59
59
|
focus-visible:bg-(--color-focus-surface)
|
|
60
60
|
focus-within:bg-(--color-focus-surface)
|
|
@@ -74,7 +74,7 @@ const timeSelectorListItemThemeVariants = cva(`
|
|
|
74
74
|
`, {
|
|
75
75
|
variants: {
|
|
76
76
|
selected: {
|
|
77
|
-
true:
|
|
77
|
+
true: `bg-active font-medium text-foreground hover:bg-active ${themeSelectionBarClasses}`,
|
|
78
78
|
false: ""
|
|
79
79
|
},
|
|
80
80
|
size: {
|
|
@@ -219,12 +219,13 @@ class TimeSelectorComponent {
|
|
|
219
219
|
}, /* @ts-ignore */
|
|
220
220
|
...(ngDevMode ? [{ debugName: "amMeridiemVisible" }] : /* istanbul ignore next */ []));
|
|
221
221
|
this.baseClass = computed(() => {
|
|
222
|
-
const disabled = this.
|
|
222
|
+
const disabled = this.effectiveDisabled();
|
|
223
223
|
return timeSelectorBaseThemeVariants({ disabled });
|
|
224
224
|
}, /* @ts-ignore */
|
|
225
225
|
...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
|
|
226
226
|
this.computedPopupHeight = this.#height.asReadonly();
|
|
227
227
|
/** The clock in use: the `hourFormat` input, or the locale's own when it isn't set. */
|
|
228
|
+
this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
|
|
228
229
|
this.effectiveHourFormat = computed(() => this.hourFormat() ?? getLocaleHourFormat(this.#i18n.localeId()), /* @ts-ignore */
|
|
229
230
|
...(ngDevMode ? [{ debugName: "effectiveHourFormat" }] : /* istanbul ignore next */ []));
|
|
230
231
|
this.focusedList = signal("hours", /* @ts-ignore */
|
|
@@ -443,13 +444,13 @@ class TimeSelectorComponent {
|
|
|
443
444
|
this.touch.emit();
|
|
444
445
|
}
|
|
445
446
|
onHourChange(hour) {
|
|
446
|
-
if (this.
|
|
447
|
+
if (this.effectiveDisabled() || this.readonly()) {
|
|
447
448
|
return;
|
|
448
449
|
}
|
|
449
450
|
this.navigateTo(this.navigatedDate().set({ hour }));
|
|
450
451
|
}
|
|
451
452
|
onMeridiemClick(meridiem) {
|
|
452
|
-
if (this.
|
|
453
|
+
if (this.effectiveDisabled() || this.readonly()) {
|
|
453
454
|
return;
|
|
454
455
|
}
|
|
455
456
|
if (this.meridiem() === meridiem) {
|
|
@@ -464,13 +465,13 @@ class TimeSelectorComponent {
|
|
|
464
465
|
}
|
|
465
466
|
}
|
|
466
467
|
onMinuteChange(minute) {
|
|
467
|
-
if (this.
|
|
468
|
+
if (this.effectiveDisabled() || this.readonly()) {
|
|
468
469
|
return;
|
|
469
470
|
}
|
|
470
471
|
this.navigateTo(this.navigatedDate().set({ minute }));
|
|
471
472
|
}
|
|
472
473
|
onNowClick() {
|
|
473
|
-
if (this.
|
|
474
|
+
if (this.effectiveDisabled() || this.readonly()) {
|
|
474
475
|
return;
|
|
475
476
|
}
|
|
476
477
|
const now = DateTime.now();
|
|
@@ -482,13 +483,13 @@ class TimeSelectorComponent {
|
|
|
482
483
|
}));
|
|
483
484
|
}
|
|
484
485
|
onSecondChange(second) {
|
|
485
|
-
if (this.
|
|
486
|
+
if (this.effectiveDisabled() || this.readonly()) {
|
|
486
487
|
return;
|
|
487
488
|
}
|
|
488
489
|
this.navigateTo(this.navigatedDate().set({ second }));
|
|
489
490
|
}
|
|
490
491
|
onSetTimeClick() {
|
|
491
|
-
if (this.
|
|
492
|
+
if (this.effectiveDisabled() || this.readonly()) {
|
|
492
493
|
return;
|
|
493
494
|
}
|
|
494
495
|
this.updateValue(this.clampToRange(this.navigatedDate()).toJSDate());
|
|
@@ -554,7 +555,7 @@ class TimeSelectorComponent {
|
|
|
554
555
|
return Array.from(options());
|
|
555
556
|
}
|
|
556
557
|
handleKeydown(event) {
|
|
557
|
-
if (this.
|
|
558
|
+
if (this.effectiveDisabled() || this.readonly()) {
|
|
558
559
|
return;
|
|
559
560
|
}
|
|
560
561
|
const preventableEvent = new PreventableEvent("calendarKeydown", event);
|
|
@@ -708,7 +709,7 @@ class TimeSelectorComponent {
|
|
|
708
709
|
}
|
|
709
710
|
setupKeyboardNavigation() {
|
|
710
711
|
fromEvent(this.#hostElementRef.nativeElement, "keydown")
|
|
711
|
-
.pipe(takeUntilDestroyed(this.#destroyRef), filter(() => !this.
|
|
712
|
+
.pipe(takeUntilDestroyed(this.#destroyRef), filter(() => !this.effectiveDisabled()))
|
|
712
713
|
.subscribe(event => this.handleKeydown(event));
|
|
713
714
|
}
|
|
714
715
|
updateValue(date) {
|
|
@@ -718,14 +719,14 @@ class TimeSelectorComponent {
|
|
|
718
719
|
this.value.set(date);
|
|
719
720
|
}
|
|
720
721
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TimeSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
721
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TimeSelectorComponent, isStandalone: true, selector: "mona-time-selector", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, focusOnMount: { classPropertyName: "focusOnMount", publicName: "focusOnMount", isSignal: true, isRequired: false, transformFunction: null }, footer: { classPropertyName: "footer", publicName: "footer", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, hourStep: { classPropertyName: "hourStep", publicName: "hourStep", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, secondStep: { classPropertyName: "secondStep", publicName: "secondStep", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { touch: "touch", value: "valueChange" }, host: { attributes: { "role": "group" }, listeners: { "focusout": "onFocusOut($event)" }, properties: { "attr.aria-label": "ariaLabel() || messages().timeSelector", "attr.aria-disabled": "
|
|
722
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TimeSelectorComponent, isStandalone: true, selector: "mona-time-selector", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, focusOnMount: { classPropertyName: "focusOnMount", publicName: "focusOnMount", isSignal: true, isRequired: false, transformFunction: null }, footer: { classPropertyName: "footer", publicName: "footer", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, hourStep: { classPropertyName: "hourStep", publicName: "hourStep", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, secondStep: { classPropertyName: "secondStep", publicName: "secondStep", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { touch: "touch", value: "valueChange" }, host: { attributes: { "role": "group" }, listeners: { "focusout": "onFocusOut($event)" }, properties: { "attr.aria-label": "ariaLabel() || messages().timeSelector", "attr.aria-disabled": "effectiveDisabled() || null", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly() || null", "attr.data-required": "required() || null", "class": "baseClass()" } }, viewQueries: [{ propertyName: "hourListRef", first: true, predicate: ["hourList"], descendants: true, isSignal: true }, { propertyName: "meridiemListRef", first: true, predicate: ["meridiemList"], descendants: true, isSignal: true }, { propertyName: "minuteListRef", first: true, predicate: ["minuteList"], descendants: true, isSignal: true }, { propertyName: "secondListRef", first: true, predicate: ["secondList"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"headerClass()\">\n <div>{{ messages().headerHours }}</div>\n <div>{{ messages().headerMinutes }}</div>\n @if (showSeconds()) {\n <div>{{ messages().headerSeconds }}</div>\n }\n</div>\n\n<div [class]=\"infoContainerClass()\">\n <span>{{ navigatedDateText() }}</span>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"'small'\"\n (click)=\"onNowClick()\">\n {{ messages().now }}\n </button>\n</div>\n\n<div [class]=\"listContainerClass()\">\n <ol\n #hourList\n monaTimeSelectorList\n [attr.aria-label]=\"messages().hours\"\n [attr.aria-activedescendant]=\"activeOptionId(hourListId, hourOptions(), navigatedDate().hour)\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-required]=\"required() || null\"\n [active]=\"focusedList() === 'hours'\"\n [id]=\"hourListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (h of hourOptions(); track h.value) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"h.viewValue === hour()\"\n [value]=\"h.value\"\n [id]=\"`${hourListId}${h.value}`\"\n (click)=\"onHourChange(h.value)\">\n {{ formatTwoDigit(h.viewValue) }}\n </li>\n }\n </ol>\n <ol\n #minuteList\n monaTimeSelectorList\n [attr.aria-label]=\"messages().minutes\"\n [attr.aria-activedescendant]=\"activeOptionId(minuteListId, minuteOptions(), minute())\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-required]=\"required() || null\"\n [active]=\"focusedList() === 'minutes'\"\n [id]=\"minuteListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (m of minuteOptions(); track m.value) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"m.value === minute()\"\n [value]=\"m.value\"\n [id]=\"`${minuteListId}${m.value}`\"\n (click)=\"onMinuteChange(m.value)\">\n {{ formatTwoDigit(m.viewValue) }}\n </li>\n }\n </ol>\n @if (showSeconds()) {\n <ol\n #secondList\n monaTimeSelectorList\n [attr.aria-label]=\"messages().seconds\"\n [attr.aria-activedescendant]=\"activeOptionId(secondListId, secondOptions(), second())\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-required]=\"required() || null\"\n [active]=\"focusedList() === 'seconds'\"\n [id]=\"secondListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (s of secondOptions(); track s.value) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"s.value === second()\"\n [value]=\"s.value\"\n [id]=\"`${secondListId}${s.value}`\"\n (click)=\"onSecondChange(s.value)\">\n {{ formatTwoDigit(s.value) }}\n </li>\n }\n </ol>\n }\n @if (effectiveHourFormat() === \"12\") {\n <ol\n #meridiemList\n monaTimeSelectorList\n [attr.aria-label]=\"messages().amPm\"\n [attr.aria-activedescendant]=\"`${meridiemListId}${meridiem()}`\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-required]=\"required() || null\"\n [active]=\"focusedList() === 'meridiem'\"\n [id]=\"meridiemListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @if (amMeridiemVisible()) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"meridiem() === 'AM'\"\n [value]=\"'AM'\"\n (click)=\"onMeridiemClick('AM')\"\n [id]=\"`${meridiemListId}AM`\">\n {{ messages().am }}\n </li>\n }\n @if (pmMeridiemVisible()) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"meridiem() === 'PM'\"\n [value]=\"'PM'\"\n (click)=\"onMeridiemClick('PM')\"\n [id]=\"`${meridiemListId}PM`\">\n {{ messages().pm }}\n </li>\n }\n </ol>\n }\n</div>\n\n@if (footer()) {\n <div [class]=\"footerClass()\">\n <button monaButton look=\"primary\" [rounded]=\"rounded()\" [size]=\"size()\" (click)=\"onSetTimeClick()\">\n {{ messages().set }}\n </button>\n </div>\n}\n", dependencies: [{ kind: "directive", type: TimeSelectorItemDirective, selector: "li[monaTimeSelectorItem]", inputs: ["selected", "size", "value"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class", "value"], outputs: ["lookChange", "selectedChange"] }, { kind: "directive", type: TimeSelectorListDirective, selector: "ol[monaTimeSelectorList]", inputs: ["active", "popupHeight", "size"] }] }); }
|
|
722
723
|
}
|
|
723
724
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TimeSelectorComponent, decorators: [{
|
|
724
725
|
type: Component,
|
|
725
726
|
args: [{ selector: "mona-time-selector", imports: [TimeSelectorItemDirective, ButtonDirective, TimeSelectorListDirective], host: {
|
|
726
727
|
role: "group",
|
|
727
728
|
"[attr.aria-label]": "ariaLabel() || messages().timeSelector",
|
|
728
|
-
"[attr.aria-disabled]": "
|
|
729
|
+
"[attr.aria-disabled]": "effectiveDisabled() || null",
|
|
729
730
|
"[attr.aria-invalid]": "invalidState() ? 'true' : null",
|
|
730
731
|
"[attr.data-invalid]": "invalidState() || null",
|
|
731
732
|
"[attr.data-readonly]": "readonly() || null",
|
|
@@ -249,6 +249,13 @@ class TooltipDirective {
|
|
|
249
249
|
this.#tooltipId = createElementControlId();
|
|
250
250
|
this.#destroyed = false;
|
|
251
251
|
this.#popupRef = null;
|
|
252
|
+
/**
|
|
253
|
+
* @description Reads the tooltip's text from the matched element, in place of its `title`, which then stays where
|
|
254
|
+
* it is. An empty result shows nothing.
|
|
255
|
+
* @default null
|
|
256
|
+
*/
|
|
257
|
+
this.contentOf = input(null, /* @ts-ignore */
|
|
258
|
+
...(ngDevMode ? [{ debugName: "contentOf" }] : /* istanbul ignore next */ []));
|
|
252
259
|
/**
|
|
253
260
|
* @description Whether the tooltip is disabled. When disabled, the tooltip will not be shown, and an open one
|
|
254
261
|
* closes.
|
|
@@ -351,6 +358,13 @@ class TooltipDirective {
|
|
|
351
358
|
this.#stripped.clear();
|
|
352
359
|
});
|
|
353
360
|
}
|
|
361
|
+
#contentFor(anchor) {
|
|
362
|
+
const contentOf = this.contentOf();
|
|
363
|
+
if (contentOf) {
|
|
364
|
+
return contentOf(anchor);
|
|
365
|
+
}
|
|
366
|
+
return this.mode() === "host" ? this.monaTooltip() || this.#textOf(anchor) : this.#textOf(anchor);
|
|
367
|
+
}
|
|
354
368
|
#listen(mode, filter) {
|
|
355
369
|
const host = this.#host.nativeElement;
|
|
356
370
|
if (mode === "host") {
|
|
@@ -367,7 +381,7 @@ class TooltipDirective {
|
|
|
367
381
|
if (this.disabled() || this.#destroyed) {
|
|
368
382
|
return;
|
|
369
383
|
}
|
|
370
|
-
const content = this
|
|
384
|
+
const content = this.#contentFor(anchor);
|
|
371
385
|
if (!content) {
|
|
372
386
|
return;
|
|
373
387
|
}
|
|
@@ -438,14 +452,14 @@ class TooltipDirective {
|
|
|
438
452
|
return element.getAttribute(TITLE_ATTRIBUTE) ?? "";
|
|
439
453
|
}
|
|
440
454
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
441
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: TooltipDirective, isStandalone: true, selector: "[monaTooltip]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "hideDelay", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, monaTooltip: { classPropertyName: "monaTooltip", publicName: "monaTooltip", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "tooltipRounded", isSignal: true, isRequired: false, transformFunction: null }, showDelay: { classPropertyName: "showDelay", publicName: "showDelay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hidden: "hidden", shown: "shown" }, ngImport: i0 }); }
|
|
455
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: TooltipDirective, isStandalone: true, selector: "[monaTooltip]", inputs: { contentOf: { classPropertyName: "contentOf", publicName: "contentOf", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "hideDelay", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, monaTooltip: { classPropertyName: "monaTooltip", publicName: "monaTooltip", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "tooltipRounded", isSignal: true, isRequired: false, transformFunction: null }, showDelay: { classPropertyName: "showDelay", publicName: "showDelay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hidden: "hidden", shown: "shown" }, ngImport: i0 }); }
|
|
442
456
|
}
|
|
443
457
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
444
458
|
type: Directive,
|
|
445
459
|
args: [{
|
|
446
460
|
selector: "[monaTooltip]"
|
|
447
461
|
}]
|
|
448
|
-
}], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], hidden: [{ type: i0.Output, args: ["hidden"] }], hideDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideDelay", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], monaTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "monaTooltip", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipRounded", required: false }] }], showDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDelay", required: false }] }], shown: [{ type: i0.Output, args: ["shown"] }] } });
|
|
462
|
+
}], ctorParameters: () => [], propDecorators: { contentOf: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentOf", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], hidden: [{ type: i0.Output, args: ["hidden"] }], hideDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideDelay", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], monaTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "monaTooltip", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipRounded", required: false }] }], showDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDelay", required: false }] }], shown: [{ type: i0.Output, args: ["shown"] }] } });
|
|
449
463
|
/** Whether an element is named by something other than its `title`: a label attribute, or text or images inside. */
|
|
450
464
|
function hasNameOfItsOwn(element) {
|
|
451
465
|
if (element.hasAttribute("aria-labelledby") || element.getAttribute("aria-label")?.trim()) {
|
|
@@ -854,7 +854,7 @@ class WindowContentComponent {
|
|
|
854
854
|
focusElement(windowElement, element)?.setAttribute("cdkFocusInitial", "");
|
|
855
855
|
}
|
|
856
856
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: WindowContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
857
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: WindowContentComponent, isStandalone: true, selector: "mona-window-content", host: { attributes: { "role": "dialog" }, listeners: { "focusin": "onFocusIn($event)" }, properties: { "class": "baseClass()", "attr.aria-label": "hasTitle ? null : windowData.ariaLabel || null", "attr.aria-labelledby": "hasTitle ? headerId : null", "attr.aria-modal": "windowData.modal ? 'true' : 'false'" } }, viewQueries: [{ propertyName: "componentHost", first: true, predicate: ["componentHost"], descendants: true, read: ViewContainerRef, isSignal: true }], hostDirectives: [{ directive: i1.CdkTrapFocus }], ngImport: i0, template: "<div [class]=\"contentContainerClass()\">\n <div\n [class]=\"titleBarClass()\"\n [class.touch-none]=\"windowData.draggable\"\n monaWindowDragHandler\n (dblclick)=\"onTitleBarDoubleClick($event)\"\n [draggable]=\"windowData.draggable && !maximized()\"\n [resizable]=\"windowData.resizable && !maximized() && !minimized()\"\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n [attr.tabindex]=\"titleBarLabel() ? 0 : null\"\n [attr.role]=\"titleBarLabel() ? 'group' : null\"\n [attr.aria-label]=\"titleBarLabel()\">\n <div [id]=\"headerId\" [class]=\"titleContainerClass()\">\n @if (windowData.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"windowData.titleTemplate\"></ng-container>\n } @else {\n <span [class]=\"titleClass()\">{{ windowData.title ?? \"\" }}</span>\n }\n </div>\n <div [class]=\"titleBarActionClass()\">\n @if (windowData.actionTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"windowData.actionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: windowRef }\">\n </ng-container>\n }\n @if (windowData.minimizable) {\n @let minimizeTitle = minimized() ? messages().restore : messages().minimize;\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"minimizeTitle\"\n [attr.aria-label]=\"minimizeTitle\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMinimizeClick()\">\n <svg [lucideIcon]=\"minimizeIcon()\" [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.maximizable) {\n @let maximizeTitle = maximized() ? messages().restore : messages().maximize;\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"maximizeTitle\"\n [attr.aria-label]=\"maximizeTitle\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMaximizeClick()\">\n <svg [lucideIcon]=\"maximizeIcon()\" [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.closable) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"messages().close\"\n [attr.aria-label]=\"messages().closeWindow\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onCloseClick($event)\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n </div>\n </div>\n <!-- Minimizing hides the content instead of destroying it, so its state survives a restore. -->\n <div [class]=\"contentClass()\" [hidden]=\"minimized()\" [attr.inert]=\"minimized() ? '' : null\">\n @if (contentTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"contentTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: windowData.data, windowRef: windowRef }\"></ng-container>\n } @else if (contentComponent) {\n <ng-container #componentHost></ng-container>\n }\n </div>\n @if (windowData.footerTemplate) {\n <div [hidden]=\"minimized()\" [attr.inert]=\"minimized() ? '' : null\">\n <ng-container [ngTemplateOutlet]=\"windowData.footerTemplate\"></ng-container>\n </div>\n }\n @if (windowData.resizable && !maximized() && !minimized()) {\n @for (direction of resizeDirections; track direction) {\n <div\n monaWindowResizeHandler\n aria-hidden=\"true\"\n [attr.data-direction]=\"direction\"\n [direction]=\"direction\"\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n [class]=\"direction | monaResizePosition\"></div>\n }\n }\n</div>\n", dependencies: [{ kind: "directive", type: WindowDragHandlerDirective, selector: "div[monaWindowDragHandler]", inputs: ["draggable", "maxHeight", "maxWidth", "minHeight", "minWidth", "resizable", "windowRef"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class"], outputs: ["lookChange", "selectedChange"] }, { kind: "directive", type: WindowResizeHandlerDirective, selector: "div[monaWindowResizeHandler]", inputs: ["direction", "maxHeight", "maxWidth", "minHeight", "minWidth", "windowRef"] }, { kind: "component", type: LucideDynamicIcon, selector: "svg[lucideIcon]", inputs: ["lucideIcon"] }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }, { kind: "pipe", type: ResizePositionPipe, name: "monaResizePosition" }] }); }
|
|
857
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: WindowContentComponent, isStandalone: true, selector: "mona-window-content", host: { attributes: { "role": "dialog" }, listeners: { "focusin": "onFocusIn($event)" }, properties: { "class": "baseClass()", "attr.aria-label": "hasTitle ? null : windowData.ariaLabel || null", "attr.aria-labelledby": "hasTitle ? headerId : null", "attr.aria-modal": "windowData.modal ? 'true' : 'false'" } }, viewQueries: [{ propertyName: "componentHost", first: true, predicate: ["componentHost"], descendants: true, read: ViewContainerRef, isSignal: true }], hostDirectives: [{ directive: i1.CdkTrapFocus }], ngImport: i0, template: "<div [class]=\"contentContainerClass()\">\n <div\n [class]=\"titleBarClass()\"\n [class.touch-none]=\"windowData.draggable\"\n monaWindowDragHandler\n (dblclick)=\"onTitleBarDoubleClick($event)\"\n [draggable]=\"windowData.draggable && !maximized()\"\n [resizable]=\"windowData.resizable && !maximized() && !minimized()\"\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n [attr.tabindex]=\"titleBarLabel() ? 0 : null\"\n [attr.role]=\"titleBarLabel() ? 'group' : null\"\n [attr.aria-label]=\"titleBarLabel()\">\n <div [id]=\"headerId\" [class]=\"titleContainerClass()\">\n @if (windowData.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"windowData.titleTemplate\"></ng-container>\n } @else {\n <span [class]=\"titleClass()\">{{ windowData.title ?? \"\" }}</span>\n }\n </div>\n <div [class]=\"titleBarActionClass()\">\n @if (windowData.actionTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"windowData.actionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: windowRef }\">\n </ng-container>\n }\n @if (windowData.minimizable) {\n @let minimizeTitle = minimized() ? messages().restore : messages().minimize;\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"minimizeTitle\"\n [attr.aria-label]=\"minimizeTitle\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMinimizeClick()\">\n <svg [lucideIcon]=\"minimizeIcon()\" [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.maximizable) {\n @let maximizeTitle = maximized() ? messages().restore : messages().maximize;\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"maximizeTitle\"\n [attr.aria-label]=\"maximizeTitle\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMaximizeClick()\">\n <svg [lucideIcon]=\"maximizeIcon()\" [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.closable) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"messages().close\"\n [attr.aria-label]=\"messages().closeWindow\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onCloseClick($event)\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n </div>\n </div>\n <!-- Minimizing hides the content instead of destroying it, so its state survives a restore. -->\n <div [class]=\"contentClass()\" [hidden]=\"minimized()\" [attr.inert]=\"minimized() ? '' : null\">\n @if (contentTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"contentTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: windowData.data, windowRef: windowRef }\"></ng-container>\n } @else if (contentComponent) {\n <ng-container #componentHost></ng-container>\n }\n </div>\n @if (windowData.footerTemplate) {\n <div [hidden]=\"minimized()\" [attr.inert]=\"minimized() ? '' : null\">\n <ng-container [ngTemplateOutlet]=\"windowData.footerTemplate\"></ng-container>\n </div>\n }\n @if (windowData.resizable && !maximized() && !minimized()) {\n @for (direction of resizeDirections; track direction) {\n <div\n monaWindowResizeHandler\n aria-hidden=\"true\"\n [attr.data-direction]=\"direction\"\n [direction]=\"direction\"\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n [class]=\"direction | monaResizePosition\"></div>\n }\n }\n</div>\n", dependencies: [{ kind: "directive", type: WindowDragHandlerDirective, selector: "div[monaWindowDragHandler]", inputs: ["draggable", "maxHeight", "maxWidth", "minHeight", "minWidth", "resizable", "windowRef"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class", "value"], outputs: ["lookChange", "selectedChange"] }, { kind: "directive", type: WindowResizeHandlerDirective, selector: "div[monaWindowResizeHandler]", inputs: ["direction", "maxHeight", "maxWidth", "minHeight", "minWidth", "windowRef"] }, { kind: "component", type: LucideDynamicIcon, selector: "svg[lucideIcon]", inputs: ["lucideIcon"] }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }, { kind: "pipe", type: ResizePositionPipe, name: "monaResizePosition" }] }); }
|
|
858
858
|
}
|
|
859
859
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: WindowContentComponent, decorators: [{
|
|
860
860
|
type: Component,
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
"clear": "Clear"
|
|
4
4
|
},
|
|
5
5
|
"breadcrumb": {
|
|
6
|
-
"breadcrumb": "Breadcrumb"
|
|
6
|
+
"breadcrumb": "Breadcrumb",
|
|
7
|
+
"showFullPath": "Show full path"
|
|
7
8
|
},
|
|
8
9
|
"buttonGroup": {
|
|
9
10
|
"buttonGroup": "Button group"
|
|
@@ -117,27 +118,41 @@
|
|
|
117
118
|
"removeLabel": "{label, select, undefined {Remove, item} other {Remove, {label}}}"
|
|
118
119
|
},
|
|
119
120
|
"colorGradient": {
|
|
121
|
+
"alpha": "Alpha",
|
|
122
|
+
"alphaText": "Opacity {opacity}%",
|
|
120
123
|
"apply": "Apply",
|
|
124
|
+
"blue": "Blue",
|
|
121
125
|
"cancel": "Cancel",
|
|
122
126
|
"clearColor": "Clear color",
|
|
127
|
+
"colorCopied": "Color copied",
|
|
128
|
+
"colorGradient": "Color gradient",
|
|
123
129
|
"copyAsHex": "Copy as HEX",
|
|
124
130
|
"copyAsRgb": "Copy as RGB",
|
|
125
131
|
"copyColor": "Copy color",
|
|
132
|
+
"copyFailed": "Couldn't copy the color",
|
|
126
133
|
"currentColor": "Current color",
|
|
134
|
+
"green": "Green",
|
|
135
|
+
"hexColor": "Hex color",
|
|
136
|
+
"hue": "Hue",
|
|
127
137
|
"previousColor": "Previous color",
|
|
138
|
+
"red": "Red",
|
|
139
|
+
"saturation": "Saturation",
|
|
128
140
|
"saturationAndValue": "Color saturation and value",
|
|
129
141
|
"saturationAndValueText": "Saturation {saturation}%, Value {value}%",
|
|
130
|
-
"switchColorMode": "Switch color mode"
|
|
142
|
+
"switchColorMode": "Switch color mode",
|
|
143
|
+
"value": "Value"
|
|
131
144
|
},
|
|
132
145
|
"colorPalette": {
|
|
133
146
|
"color": "Color {color}",
|
|
134
|
-
"colorPalette": "Color palette"
|
|
147
|
+
"colorPalette": "Color palette",
|
|
148
|
+
"namedColor": "{name}, {color}"
|
|
135
149
|
},
|
|
136
150
|
"colorPicker": {
|
|
137
151
|
"clearColor": "Clear color",
|
|
138
152
|
"colorGradientPicker": "Color gradient picker",
|
|
139
153
|
"colorPalettePicker": "Color palette picker",
|
|
140
|
-
"colorPicker": "Color picker"
|
|
154
|
+
"colorPicker": "Color picker",
|
|
155
|
+
"noColor": "No color"
|
|
141
156
|
},
|
|
142
157
|
"comboBox": {
|
|
143
158
|
"clear": "Clear"
|
|
@@ -327,6 +342,9 @@
|
|
|
327
342
|
"sortOrder": "Sort order {position}",
|
|
328
343
|
"toolbar": "Grid toolbar"
|
|
329
344
|
},
|
|
345
|
+
"label": {
|
|
346
|
+
"optional": "Optional"
|
|
347
|
+
},
|
|
330
348
|
"list": {
|
|
331
349
|
"filterList": "Filter list",
|
|
332
350
|
"loading": "Loading",
|
|
@@ -392,6 +410,9 @@
|
|
|
392
410
|
"previousPageLabel": "Previous page",
|
|
393
411
|
"rangeStatus": "{start} - {end} of {total, plural, one {# item} other {# items}}"
|
|
394
412
|
},
|
|
413
|
+
"progressBar": {
|
|
414
|
+
"label": "Progress"
|
|
415
|
+
},
|
|
395
416
|
"rating": {
|
|
396
417
|
"notRated": "Not rated",
|
|
397
418
|
"valueText": "{value} out of {max}"
|
|
@@ -401,6 +422,7 @@
|
|
|
401
422
|
"nextPage": "Next page",
|
|
402
423
|
"page": "Page {current}",
|
|
403
424
|
"pageOf": "Page {current} of {total}",
|
|
425
|
+
"pages": "Pages",
|
|
404
426
|
"previousPage": "Previous page",
|
|
405
427
|
"scrollPagerNext": "Scroll pager next",
|
|
406
428
|
"scrollPagerPrevious": "Scroll pager previous",
|
|
@@ -409,6 +431,10 @@
|
|
|
409
431
|
"sheet": {
|
|
410
432
|
"closeSheet": "Close sheet"
|
|
411
433
|
},
|
|
434
|
+
"sidebar": {
|
|
435
|
+
"drawerLabel": "Sidebar",
|
|
436
|
+
"rail": "Toggle sidebar"
|
|
437
|
+
},
|
|
412
438
|
"slider": {
|
|
413
439
|
"maximumValue": "Maximum value",
|
|
414
440
|
"minimumValue": "Minimum value",
|
|
@@ -431,6 +457,9 @@
|
|
|
431
457
|
"resizer": "Resizer"
|
|
432
458
|
},
|
|
433
459
|
"stepper": {
|
|
460
|
+
"stepCompleted": "Completed",
|
|
461
|
+
"stepInvalid": "Has errors",
|
|
462
|
+
"stepPosition": "Step {current} of {total}",
|
|
434
463
|
"stepProgress": "Step progress",
|
|
435
464
|
"stepper": "Progress"
|
|
436
465
|
},
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
"clear": "مسح"
|
|
4
4
|
},
|
|
5
5
|
"breadcrumb": {
|
|
6
|
-
"breadcrumb": "مسار التنقل"
|
|
6
|
+
"breadcrumb": "مسار التنقل",
|
|
7
|
+
"showFullPath": "إظهار المسار الكامل"
|
|
7
8
|
},
|
|
8
9
|
"buttonGroup": {
|
|
9
10
|
"buttonGroup": "مجموعة أزرار"
|
|
@@ -117,27 +118,41 @@
|
|
|
117
118
|
"removeLabel": "{label, select, undefined {حذف العنصر} other {حذف {label}}}"
|
|
118
119
|
},
|
|
119
120
|
"colorGradient": {
|
|
121
|
+
"alpha": "قناة ألفا",
|
|
122
|
+
"alphaText": "العتامة {opacity}٪",
|
|
120
123
|
"apply": "تطبيق",
|
|
124
|
+
"blue": "الأزرق",
|
|
121
125
|
"cancel": "إلغاء",
|
|
122
126
|
"clearColor": "مسح اللون",
|
|
127
|
+
"colorCopied": "تم نسخ اللون",
|
|
128
|
+
"colorGradient": "تدرج الألوان",
|
|
123
129
|
"copyAsHex": "نسخ بصيغة HEX",
|
|
124
130
|
"copyAsRgb": "نسخ بصيغة RGB",
|
|
125
131
|
"copyColor": "نسخ اللون",
|
|
132
|
+
"copyFailed": "تعذر نسخ اللون",
|
|
126
133
|
"currentColor": "اللون الحالي",
|
|
134
|
+
"green": "الأخضر",
|
|
135
|
+
"hexColor": "اللون بالنظام الست عشري",
|
|
136
|
+
"hue": "درجة اللون",
|
|
127
137
|
"previousColor": "اللون السابق",
|
|
138
|
+
"red": "الأحمر",
|
|
139
|
+
"saturation": "التشبع",
|
|
128
140
|
"saturationAndValue": "التشبع والقيمة",
|
|
129
141
|
"saturationAndValueText": "التشبع {saturation}٪، القيمة {value}٪",
|
|
130
|
-
"switchColorMode": "تبديل وضع اللون"
|
|
142
|
+
"switchColorMode": "تبديل وضع اللون",
|
|
143
|
+
"value": "القيمة"
|
|
131
144
|
},
|
|
132
145
|
"colorPalette": {
|
|
133
146
|
"color": "اللون: {color}",
|
|
134
|
-
"colorPalette": "لوحة الألوان"
|
|
147
|
+
"colorPalette": "لوحة الألوان",
|
|
148
|
+
"namedColor": "{name}، {color}"
|
|
135
149
|
},
|
|
136
150
|
"colorPicker": {
|
|
137
151
|
"clearColor": "مسح اللون",
|
|
138
152
|
"colorGradientPicker": "منتقي تدرج الألوان",
|
|
139
153
|
"colorPalettePicker": "منتقي لوحة الألوان",
|
|
140
|
-
"colorPicker": "منتقي الألوان"
|
|
154
|
+
"colorPicker": "منتقي الألوان",
|
|
155
|
+
"noColor": "بلا لون"
|
|
141
156
|
},
|
|
142
157
|
"comboBox": {
|
|
143
158
|
"clear": "مسح"
|
|
@@ -327,6 +342,9 @@
|
|
|
327
342
|
"sortOrder": "ترتيب الفرز {position}",
|
|
328
343
|
"toolbar": "شريط أدوات الجدول"
|
|
329
344
|
},
|
|
345
|
+
"label": {
|
|
346
|
+
"optional": "اختياري"
|
|
347
|
+
},
|
|
330
348
|
"list": {
|
|
331
349
|
"filterList": "تصفية القائمة",
|
|
332
350
|
"loading": "جارٍ التحميل",
|
|
@@ -392,6 +410,9 @@
|
|
|
392
410
|
"previousPageLabel": "الصفحة السابقة",
|
|
393
411
|
"rangeStatus": "{start}–{end} من {total}"
|
|
394
412
|
},
|
|
413
|
+
"progressBar": {
|
|
414
|
+
"label": "التقدم"
|
|
415
|
+
},
|
|
395
416
|
"rating": {
|
|
396
417
|
"notRated": "غير مقيّم",
|
|
397
418
|
"valueText": "{value} من {max}"
|
|
@@ -401,6 +422,7 @@
|
|
|
401
422
|
"nextPage": "الصفحة التالية",
|
|
402
423
|
"page": "الصفحة {current}",
|
|
403
424
|
"pageOf": "الصفحة {current} من {total}",
|
|
425
|
+
"pages": "الصفحات",
|
|
404
426
|
"previousPage": "الصفحة السابقة",
|
|
405
427
|
"scrollPagerNext": "تمرير مؤشر الصفحات إلى التالي",
|
|
406
428
|
"scrollPagerPrevious": "تمرير مؤشر الصفحات إلى السابق",
|
|
@@ -409,6 +431,10 @@
|
|
|
409
431
|
"sheet": {
|
|
410
432
|
"closeSheet": "إغلاق اللوحة"
|
|
411
433
|
},
|
|
434
|
+
"sidebar": {
|
|
435
|
+
"drawerLabel": "الشريط الجانبي",
|
|
436
|
+
"rail": "إظهار الشريط الجانبي أو إخفاؤه"
|
|
437
|
+
},
|
|
412
438
|
"slider": {
|
|
413
439
|
"maximumValue": "الحد الأقصى",
|
|
414
440
|
"minimumValue": "الحد الأدنى",
|
|
@@ -431,6 +457,9 @@
|
|
|
431
457
|
"resizer": "مقبض تغيير الحجم"
|
|
432
458
|
},
|
|
433
459
|
"stepper": {
|
|
460
|
+
"stepCompleted": "مكتملة",
|
|
461
|
+
"stepInvalid": "بها أخطاء",
|
|
462
|
+
"stepPosition": "الخطوة {current} من {total}",
|
|
434
463
|
"stepProgress": "تقدم الخطوات",
|
|
435
464
|
"stepper": "مؤشر الخطوات"
|
|
436
465
|
},
|