@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
|
@@ -37867,7 +37867,7 @@ class CartesianChartRenderer {
|
|
|
37867
37867
|
static renderAxisLayer(context, scene, styleResolver) {
|
|
37868
37868
|
const { axes, plotRect } = scene;
|
|
37869
37869
|
const axisLineColor = styleResolver.resolveCssVariable("--mona-chart-axis-line-color") ||
|
|
37870
|
-
styleResolver.resolveCssVariable("--color-border
|
|
37870
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
37871
37871
|
"rgba(148, 163, 184, 0.45)";
|
|
37872
37872
|
context.save();
|
|
37873
37873
|
for (const axisScene of axes) {
|
|
@@ -38182,7 +38182,7 @@ class FunnelChartRenderer {
|
|
|
38182
38182
|
}
|
|
38183
38183
|
else {
|
|
38184
38184
|
const hoverColor = styleResolver.resolveCssVariable("--mona-chart-funnel-hover-outline-color") ||
|
|
38185
|
-
styleResolver.resolveCssVariable("--color-border
|
|
38185
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
38186
38186
|
"rgba(255, 255, 255, 0.85)";
|
|
38187
38187
|
context.strokeStyle = hoverColor;
|
|
38188
38188
|
context.lineWidth = 1.5;
|
|
@@ -38297,7 +38297,7 @@ class HeatmapChartRenderer {
|
|
|
38297
38297
|
context.restore();
|
|
38298
38298
|
// 3. Draw Axis Baseline Lines
|
|
38299
38299
|
const axisLineColor = styleResolver.resolveCssVariable("--mona-chart-axis-line-color") ||
|
|
38300
|
-
styleResolver.resolveCssVariable("--color-border
|
|
38300
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
38301
38301
|
"rgba(148, 163, 184, 0.45)";
|
|
38302
38302
|
for (const axisScene of axes) {
|
|
38303
38303
|
if (!axisScene.visible || !axisScene.axisLine) {
|
|
@@ -38340,7 +38340,7 @@ class HeatmapChartRenderer {
|
|
|
38340
38340
|
}
|
|
38341
38341
|
else {
|
|
38342
38342
|
const hoverColor = styleResolver.resolveCssVariable("--mona-chart-heatmap-hover-outline-color") ||
|
|
38343
|
-
styleResolver.resolveCssVariable("--color-border
|
|
38343
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
38344
38344
|
"rgba(255, 255, 255, 0.85)";
|
|
38345
38345
|
context.strokeStyle = hoverColor;
|
|
38346
38346
|
context.lineWidth = 1.5;
|
|
@@ -38359,7 +38359,7 @@ class RoseGridRenderer {
|
|
|
38359
38359
|
return;
|
|
38360
38360
|
}
|
|
38361
38361
|
const gridColor = styleResolver.resolveCssVariable("--mona-chart-grid-color") ||
|
|
38362
|
-
styleResolver.resolveCssVariable("--color-border
|
|
38362
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
38363
38363
|
"rgba(150, 150, 150, 0.2)";
|
|
38364
38364
|
const zeroLineColor = styleResolver.resolveCssVariable("--mona-chart-zero-line-color") ||
|
|
38365
38365
|
styleResolver.resolveCssVariable("--color-muted-foreground") ||
|
|
@@ -38420,7 +38420,7 @@ class RoseGridRenderer {
|
|
|
38420
38420
|
return;
|
|
38421
38421
|
}
|
|
38422
38422
|
const axisLineColor = styleResolver.resolveCssVariable("--mona-chart-axis-line-color") ||
|
|
38423
|
-
styleResolver.resolveCssVariable("--color-border
|
|
38423
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
38424
38424
|
"rgba(150, 150, 150, 0.5)";
|
|
38425
38425
|
const sweepSpan = Math.abs(endAngleRad - startAngleRad);
|
|
38426
38426
|
const isFullSweep = sweepSpan >= Math.PI * 2 - 1e-4;
|
|
@@ -38886,7 +38886,7 @@ class PolarAxisGridRenderer {
|
|
|
38886
38886
|
return;
|
|
38887
38887
|
}
|
|
38888
38888
|
const gridColor = styleResolver.resolveCssVariable("--mona-chart-grid-color") ||
|
|
38889
|
-
styleResolver.resolveCssVariable("--color-border
|
|
38889
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
38890
38890
|
"rgba(150, 150, 150, 0.2)";
|
|
38891
38891
|
const zeroLineColor = styleResolver.resolveCssVariable("--mona-chart-zero-line-color") ||
|
|
38892
38892
|
styleResolver.resolveCssVariable("--color-muted-foreground") ||
|
|
@@ -38951,7 +38951,7 @@ class PolarAxisGridRenderer {
|
|
|
38951
38951
|
return;
|
|
38952
38952
|
}
|
|
38953
38953
|
const axisLineColor = styleResolver.resolveCssVariable("--mona-chart-axis-line-color") ||
|
|
38954
|
-
styleResolver.resolveCssVariable("--color-border
|
|
38954
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
38955
38955
|
"rgba(150, 150, 150, 0.5)";
|
|
38956
38956
|
context.save();
|
|
38957
38957
|
// 1. Radial Axis Reference Spoke (pole to boundary along labelAngle)
|
|
@@ -39539,7 +39539,7 @@ class TreemapChartRenderer {
|
|
|
39539
39539
|
}
|
|
39540
39540
|
else {
|
|
39541
39541
|
const hoverColor = styleResolver.resolveCssVariable("--mona-chart-treemap-hover-outline-color") ||
|
|
39542
|
-
styleResolver.resolveCssVariable("--color-border
|
|
39542
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
39543
39543
|
"rgba(255, 255, 255, 0.85)";
|
|
39544
39544
|
context.strokeStyle = hoverColor;
|
|
39545
39545
|
context.lineWidth = 1.5;
|
|
@@ -39662,7 +39662,7 @@ class WaterfallChartRenderer {
|
|
|
39662
39662
|
styleResolver.resolveCssVariable("--color-primary") ||
|
|
39663
39663
|
"#3b82f6";
|
|
39664
39664
|
const hoverColor = styleResolver.resolveCssVariable("--mona-chart-waterfall-hover-outline-color") ||
|
|
39665
|
-
styleResolver.resolveCssVariable("--color-border
|
|
39665
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
39666
39666
|
"rgba(255, 255, 255, 0.85)";
|
|
39667
39667
|
context.strokeStyle = isKeyboard ? focusColor : hoverColor;
|
|
39668
39668
|
context.lineWidth = isKeyboard ? 2.5 : 1.5;
|
|
@@ -39672,7 +39672,7 @@ class WaterfallChartRenderer {
|
|
|
39672
39672
|
context.restore();
|
|
39673
39673
|
// 4. Draw Axis baseline lines
|
|
39674
39674
|
const axisLineColor = styleResolver.resolveCssVariable("--mona-chart-axis-line-color") ||
|
|
39675
|
-
styleResolver.resolveCssVariable("--color-border
|
|
39675
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
39676
39676
|
"rgba(148, 163, 184, 0.45)";
|
|
39677
39677
|
for (const axisScene of axes) {
|
|
39678
39678
|
if (!axisScene.visible || !axisScene.axisLine) {
|
|
@@ -40254,7 +40254,7 @@ class SvgCartesianAxisRenderer {
|
|
|
40254
40254
|
return;
|
|
40255
40255
|
}
|
|
40256
40256
|
const axisLineColor = styleResolver.resolveCssVariable("--mona-chart-axis-line-color") ||
|
|
40257
|
-
styleResolver.resolveCssVariable("--color-border
|
|
40257
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
40258
40258
|
"rgba(148, 163, 184, 0.5)";
|
|
40259
40259
|
const items = [];
|
|
40260
40260
|
for (const axisScene of axes) {
|
|
@@ -42805,7 +42805,7 @@ class SvgPolarArcRenderer {
|
|
|
42805
42805
|
}
|
|
42806
42806
|
const { angularAxis, center, innerRadius, outerRadius, radialAxis } = scene;
|
|
42807
42807
|
const gridColor = styleResolver.resolveCssVariable("--mona-chart-grid-color") ||
|
|
42808
|
-
styleResolver.resolveCssVariable("--color-border
|
|
42808
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
42809
42809
|
"rgba(150, 150, 150, 0.2)";
|
|
42810
42810
|
// Radial Grid Rings
|
|
42811
42811
|
if (radialAxis && radialAxis.visible && radialAxis.gridLines) {
|
|
@@ -42878,7 +42878,7 @@ class SvgPolarArcRenderer {
|
|
|
42878
42878
|
}
|
|
42879
42879
|
const { angularAxis, center, outerRadius } = scene;
|
|
42880
42880
|
const axisLineColor = styleResolver.resolveCssVariable("--mona-chart-axis-line-color") ||
|
|
42881
|
-
styleResolver.resolveCssVariable("--color-border
|
|
42881
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
42882
42882
|
"rgba(150, 150, 150, 0.5)";
|
|
42883
42883
|
// Outer Boundary Arc
|
|
42884
42884
|
if (angularAxis && angularAxis.visible && angularAxis.axisLine) {
|
|
@@ -43190,7 +43190,7 @@ class SvgPolarAxisRenderer {
|
|
|
43190
43190
|
#renderBackground(scene, styleResolver) {
|
|
43191
43191
|
const { angularAxis, center, outerRadius, radialAxis } = scene;
|
|
43192
43192
|
const gridColor = styleResolver.resolveCssVariable("--mona-chart-grid-color") ||
|
|
43193
|
-
styleResolver.resolveCssVariable("--color-border
|
|
43193
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
43194
43194
|
"rgba(150, 150, 150, 0.2)";
|
|
43195
43195
|
const zeroLineColor = styleResolver.resolveCssVariable("--mona-chart-zero-line-color") ||
|
|
43196
43196
|
styleResolver.resolveCssVariable("--color-muted-foreground") ||
|
|
@@ -43263,7 +43263,7 @@ class SvgPolarAxisRenderer {
|
|
|
43263
43263
|
#renderForeground(scene, styleResolver) {
|
|
43264
43264
|
const { angularAxis, center, outerRadius, radialAxis } = scene;
|
|
43265
43265
|
const axisLineColor = styleResolver.resolveCssVariable("--mona-chart-axis-line-color") ||
|
|
43266
|
-
styleResolver.resolveCssVariable("--color-border
|
|
43266
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
43267
43267
|
"rgba(150, 150, 150, 0.5)";
|
|
43268
43268
|
// Outer Boundary Circle / Polygon
|
|
43269
43269
|
if (angularAxis.visible && angularAxis.axisLine) {
|
|
@@ -43888,7 +43888,7 @@ class SvgHeatmapRenderer {
|
|
|
43888
43888
|
});
|
|
43889
43889
|
// 3. Axes
|
|
43890
43890
|
const axisLineColor = styleResolver.resolveCssVariable("--mona-chart-axis-line-color") ||
|
|
43891
|
-
styleResolver.resolveCssVariable("--color-border
|
|
43891
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
43892
43892
|
"rgba(148, 163, 184, 0.45)";
|
|
43893
43893
|
const axisSegments = [];
|
|
43894
43894
|
for (const axisScene of axes) {
|
|
@@ -43957,7 +43957,7 @@ class SvgHeatmapRenderer {
|
|
|
43957
43957
|
}
|
|
43958
43958
|
else {
|
|
43959
43959
|
const hoverColor = styleResolver.resolveCssVariable("--mona-chart-heatmap-hover-outline-color") ||
|
|
43960
|
-
styleResolver.resolveCssVariable("--color-border
|
|
43960
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
43961
43961
|
"rgba(255, 255, 255, 0.85)";
|
|
43962
43962
|
setSvgAttribute(highlightEl, "fill", "none");
|
|
43963
43963
|
setSvgAttribute(highlightEl, "stroke", hoverColor);
|
|
@@ -44116,7 +44116,7 @@ class SvgTreemapRenderer {
|
|
|
44116
44116
|
}
|
|
44117
44117
|
else {
|
|
44118
44118
|
const hoverColor = styleResolver.resolveCssVariable("--mona-chart-treemap-hover-outline-color") ||
|
|
44119
|
-
styleResolver.resolveCssVariable("--color-border
|
|
44119
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
44120
44120
|
"rgba(255, 255, 255, 0.85)";
|
|
44121
44121
|
setSvgAttribute(highlightEl, "fill", "none");
|
|
44122
44122
|
setSvgAttribute(highlightEl, "stroke", hoverColor);
|
|
@@ -44230,7 +44230,7 @@ class SvgFunnelRenderer {
|
|
|
44230
44230
|
}
|
|
44231
44231
|
else {
|
|
44232
44232
|
const hoverColor = styleResolver.resolveCssVariable("--mona-chart-funnel-hover-outline-color") ||
|
|
44233
|
-
styleResolver.resolveCssVariable("--color-border
|
|
44233
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
44234
44234
|
"rgba(255, 255, 255, 0.85)";
|
|
44235
44235
|
setSvgAttribute(highlightPath, "stroke", hoverColor);
|
|
44236
44236
|
setSvgAttribute(highlightPath, "stroke-width", 1.5);
|
|
@@ -44420,7 +44420,7 @@ class SvgWaterfallRenderer {
|
|
|
44420
44420
|
});
|
|
44421
44421
|
// 3. Axes
|
|
44422
44422
|
const axisLineColor = styleResolver.resolveCssVariable("--mona-chart-axis-line-color") ||
|
|
44423
|
-
styleResolver.resolveCssVariable("--color-border
|
|
44423
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
44424
44424
|
"rgba(148, 163, 184, 0.45)";
|
|
44425
44425
|
const axisSegments = [];
|
|
44426
44426
|
for (const axisScene of axes) {
|
|
@@ -44486,7 +44486,7 @@ class SvgWaterfallRenderer {
|
|
|
44486
44486
|
}
|
|
44487
44487
|
else {
|
|
44488
44488
|
const hoverColor = styleResolver.resolveCssVariable("--mona-chart-waterfall-hover-outline-color") ||
|
|
44489
|
-
styleResolver.resolveCssVariable("--color-border
|
|
44489
|
+
styleResolver.resolveCssVariable("--color-border") ||
|
|
44490
44490
|
"rgba(255, 255, 255, 0.85)";
|
|
44491
44491
|
setSvgAttribute(highlightEl, "fill", "none");
|
|
44492
44492
|
setSvgAttribute(highlightEl, "stroke", hoverColor);
|
|
@@ -55326,6 +55326,11 @@ class ChartComponent {
|
|
|
55326
55326
|
attributes: true
|
|
55327
55327
|
});
|
|
55328
55328
|
}
|
|
55329
|
+
// A theme applied to part of the page isn't on either of those.
|
|
55330
|
+
const themeRoot = plotEl.closest("[data-mona-theme]");
|
|
55331
|
+
if (themeRoot && themeRoot !== document.documentElement && themeRoot !== document.body) {
|
|
55332
|
+
this.#themeObserver.observe(themeRoot, { attributeFilter: ["style"], attributes: true });
|
|
55333
|
+
}
|
|
55329
55334
|
}
|
|
55330
55335
|
}
|
|
55331
55336
|
// Initial layout pass
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { computed, input, model, output, Component, Directive } from '@angular/core';
|
|
3
|
+
import { computed, linkedSignal, viewChild, input, model, booleanAttribute, output, Component, Directive } from '@angular/core';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
|
-
import { themeControlSurfaceClasses } from '@nanahoshi/mona-ui/internal';
|
|
6
|
+
import { themeControlSurfaceClasses, injectLabelAssociation, injectEffectiveDisabled, createElementControlId } from '@nanahoshi/mona-ui/internal';
|
|
7
7
|
|
|
8
|
-
const checkboxInputThemeVariants = cva(`sr-only appearance-none outline-none peer`);
|
|
8
|
+
const checkboxInputThemeVariants = cva(`sr-only appearance-none outline-none focus-visible:outline-hidden peer`);
|
|
9
9
|
const checkmarkThemeVariants = cva(`
|
|
10
|
-
flex items-center justify-center
|
|
10
|
+
relative flex items-center justify-center
|
|
11
11
|
h-4.5 w-4.5 ps-0.25
|
|
12
12
|
cursor-pointer overflow-hidden
|
|
13
13
|
${themeControlSurfaceClasses}
|
|
14
14
|
border border-input-border
|
|
15
|
-
outline-none
|
|
15
|
+
outline-none focus-visible:outline-hidden
|
|
16
16
|
|
|
17
17
|
peer-disabled:pointer-events-none peer-disabled:cursor-not-allowed
|
|
18
18
|
peer-disabled:border-disabled-border peer-disabled:bg-disabled-background peer-disabled:text-disabled-foreground
|
|
@@ -22,6 +22,7 @@ const checkmarkThemeVariants = cva(`
|
|
|
22
22
|
|
|
23
23
|
peer-focus-visible:border-focus-indicator
|
|
24
24
|
peer-focus-visible:ring-2 peer-focus-visible:ring-focus-indicator/35
|
|
25
|
+
peer-focus-visible:outline-hidden
|
|
25
26
|
|
|
26
27
|
data-[invalid='true']:border-error
|
|
27
28
|
data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
|
|
@@ -29,10 +30,12 @@ const checkmarkThemeVariants = cva(`
|
|
|
29
30
|
data-[invalid='true']:peer-focus-visible:ring-error/35
|
|
30
31
|
|
|
31
32
|
peer-indeterminate:after:absolute
|
|
32
|
-
peer-indeterminate:after:inset-
|
|
33
|
+
peer-indeterminate:after:inset-0
|
|
33
34
|
peer-indeterminate:after:content-['']
|
|
34
35
|
peer-indeterminate:after:bg-current
|
|
36
|
+
peer-indeterminate:after:forced-color-adjust-none forced-colors:peer-indeterminate:after:bg-[CanvasText]
|
|
35
37
|
peer-indeterminate:after:[mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23FFFFFF'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M5%2012h14'%2F%3E%3C%2Fsvg%3E")]
|
|
38
|
+
peer-indeterminate:after:[mask-position:center]
|
|
36
39
|
peer-indeterminate:after:[mask-repeat:no-repeat]
|
|
37
40
|
peer-indeterminate:after:[mask-size:contain]
|
|
38
41
|
`, {
|
|
@@ -49,9 +52,12 @@ const checkmarkThemeVariants = cva(`
|
|
|
49
52
|
const checkboxContainerLabelThemeVariants = cva(`
|
|
50
53
|
relative inline-flex h-full w-full items-center gap-2
|
|
51
54
|
select-none
|
|
55
|
+
isolate before:absolute before:-inset-[3px] before:-z-10 before:content-['']
|
|
52
56
|
data-[disabled='true']:pointer-events-none
|
|
53
57
|
data-[disabled='true']:cursor-not-allowed
|
|
54
58
|
data-[disabled='true']:text-disabled-foreground
|
|
59
|
+
data-[readonly='true']:cursor-default
|
|
60
|
+
[&[data-readonly='true']>*]:cursor-default
|
|
55
61
|
`, {
|
|
56
62
|
variants: {
|
|
57
63
|
labelSize: {
|
|
@@ -66,7 +72,7 @@ const checkboxDirectiveThemeVariants = cva(`
|
|
|
66
72
|
cursor-pointer appearance-none
|
|
67
73
|
${themeControlSurfaceClasses}
|
|
68
74
|
border border-input-border
|
|
69
|
-
outline-none
|
|
75
|
+
outline-none focus-visible:outline-hidden
|
|
70
76
|
|
|
71
77
|
disabled:pointer-events-none disabled:cursor-not-allowed
|
|
72
78
|
disabled:border-disabled-border disabled:bg-disabled-background disabled:text-disabled-foreground
|
|
@@ -81,6 +87,7 @@ const checkboxDirectiveThemeVariants = cva(`
|
|
|
81
87
|
checked:after:inset-[1px_0_0_1px]
|
|
82
88
|
checked:after:content-['']
|
|
83
89
|
checked:after:bg-current
|
|
90
|
+
checked:after:forced-color-adjust-none forced-colors:checked:after:bg-[CanvasText]
|
|
84
91
|
checked:after:[mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23FFFFFF'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M18%206%209%2017l-5-5'/%3E%3C/svg%3E")]
|
|
85
92
|
checked:after:[mask-repeat:no-repeat]
|
|
86
93
|
checked:after:[mask-size:contain]
|
|
@@ -89,6 +96,7 @@ const checkboxDirectiveThemeVariants = cva(`
|
|
|
89
96
|
indeterminate:after:inset-[1px_0_1px_1px]
|
|
90
97
|
indeterminate:after:content-['']
|
|
91
98
|
indeterminate:after:bg-current
|
|
99
|
+
indeterminate:after:forced-color-adjust-none forced-colors:indeterminate:after:bg-[CanvasText]
|
|
92
100
|
indeterminate:after:[mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23FFFFFF'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M5%2012h14'%2F%3E%3C%2Fsvg%3E")]
|
|
93
101
|
indeterminate:after:[mask-repeat:no-repeat]
|
|
94
102
|
indeterminate:after:[mask-size:contain]
|
|
@@ -111,6 +119,11 @@ const checkboxDirectiveThemeVariants = cva(`
|
|
|
111
119
|
|
|
112
120
|
class CheckBoxComponent {
|
|
113
121
|
constructor() {
|
|
122
|
+
this.#label = injectLabelAssociation({
|
|
123
|
+
ariaLabel: () => this.ariaLabel(),
|
|
124
|
+
ariaLabelledBy: () => this.ariaLabelledBy(),
|
|
125
|
+
wrapped: false
|
|
126
|
+
});
|
|
114
127
|
this.checkBoxClasses = computed(() => {
|
|
115
128
|
return checkboxInputThemeVariants();
|
|
116
129
|
}, /* @ts-ignore */
|
|
@@ -127,8 +140,14 @@ class CheckBoxComponent {
|
|
|
127
140
|
return twMerge(variantClasses, classes);
|
|
128
141
|
}, /* @ts-ignore */
|
|
129
142
|
...(ngDevMode ? [{ debugName: "containerLabelClasses" }] : /* istanbul ignore next */ []));
|
|
143
|
+
this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
|
|
144
|
+
this.indeterminateState = linkedSignal(() => this.indeterminate(), /* @ts-ignore */
|
|
145
|
+
...(ngDevMode ? [{ debugName: "indeterminateState" }] : /* istanbul ignore next */ []));
|
|
146
|
+
this.inputRef = viewChild.required("checkBox", /* @ts-ignore */
|
|
147
|
+
...(ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []));
|
|
130
148
|
this.invalidState = computed(() => this.touched() && (this.invalid() || (this.required() && !this.checked())), /* @ts-ignore */
|
|
131
149
|
...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
|
|
150
|
+
this.labelledBy = this.#label.labelledBy;
|
|
132
151
|
/**
|
|
133
152
|
* @description Id of an element that describes the check box, such as an error message.
|
|
134
153
|
* @default ""
|
|
@@ -139,6 +158,11 @@ class CheckBoxComponent {
|
|
|
139
158
|
* @default ""
|
|
140
159
|
*/
|
|
141
160
|
this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
|
|
161
|
+
/**
|
|
162
|
+
* @description Id of the element that labels the check box.
|
|
163
|
+
* @default ""
|
|
164
|
+
*/
|
|
165
|
+
this.ariaLabelledBy = input("", { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: "aria-labelledby" });
|
|
142
166
|
/**
|
|
143
167
|
* @description Whether the control is checked.
|
|
144
168
|
* @default false
|
|
@@ -149,14 +173,18 @@ class CheckBoxComponent {
|
|
|
149
173
|
* @description Renders the component with reduced visual emphasis and removes pointer interaction.
|
|
150
174
|
* @default false
|
|
151
175
|
*/
|
|
152
|
-
this.disabled = input(false, /*
|
|
153
|
-
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
176
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
154
177
|
/**
|
|
155
|
-
* @description Activates indeterminate mode, showing a dash instead of a checkmark.
|
|
178
|
+
* @description Activates indeterminate mode, showing a dash instead of a checkmark. A user change clears it, as it
|
|
179
|
+
* does on a native checkbox. Use `[(indeterminate)]` to follow that, because a one-way binding only writes again when
|
|
180
|
+
* the bound value changes.
|
|
156
181
|
* @default false
|
|
157
182
|
*/
|
|
158
|
-
this.indeterminate = input(false, /*
|
|
159
|
-
|
|
183
|
+
this.indeterminate = input(false, { ...(ngDevMode ? { debugName: "indeterminate" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
184
|
+
/**
|
|
185
|
+
* @description Emitted with `false` when a user change clears the indeterminate mode.
|
|
186
|
+
*/
|
|
187
|
+
this.indeterminateChange = output();
|
|
160
188
|
/**
|
|
161
189
|
* @description Emitted when the checkbox input loses focus.
|
|
162
190
|
*/
|
|
@@ -170,12 +198,18 @@ class CheckBoxComponent {
|
|
|
170
198
|
*/
|
|
171
199
|
this.inputFocus = output();
|
|
172
200
|
/**
|
|
173
|
-
* @description
|
|
174
|
-
*
|
|
201
|
+
* @description Id of the native checkbox input. Point a `<label for>` at it to label the check box from outside.
|
|
202
|
+
* A unique id is generated when it isn't set.
|
|
203
|
+
* @default generated
|
|
204
|
+
*/
|
|
205
|
+
this.inputId = input(createElementControlId(), /* @ts-ignore */
|
|
206
|
+
...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
|
|
207
|
+
/**
|
|
208
|
+
* @description Marks the checkbox as invalid. When bound to a signal form field via `[formField]`, this is written
|
|
209
|
+
* by the `FormField` directive.
|
|
175
210
|
* @default false
|
|
176
211
|
*/
|
|
177
|
-
this.invalid = input(false, /*
|
|
178
|
-
...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
212
|
+
this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
179
213
|
/**
|
|
180
214
|
* @description Text label displayed alongside the checkbox. When provided, takes precedence over projected content.
|
|
181
215
|
* @default ""
|
|
@@ -194,12 +228,24 @@ class CheckBoxComponent {
|
|
|
194
228
|
*/
|
|
195
229
|
this.labelSize = input("medium", /* @ts-ignore */
|
|
196
230
|
...(ngDevMode ? [{ debugName: "labelSize" }] : /* istanbul ignore next */ []));
|
|
231
|
+
/**
|
|
232
|
+
* @description Name of the native checkbox input, used in native form submission. When bound to a signal form field
|
|
233
|
+
* via `[formField]`, this is written by the `FormField` directive.
|
|
234
|
+
* @default ""
|
|
235
|
+
*/
|
|
236
|
+
this.name = input("", /* @ts-ignore */
|
|
237
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
238
|
+
/**
|
|
239
|
+
* @description Prevents value changes while the control stays focusable and readable. When bound to a signal form
|
|
240
|
+
* field via `[formField]`, this is written by the `FormField` directive.
|
|
241
|
+
* @default false
|
|
242
|
+
*/
|
|
243
|
+
this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
197
244
|
/**
|
|
198
245
|
* @description Marks the control as required for form validation.
|
|
199
246
|
* @default false
|
|
200
247
|
*/
|
|
201
|
-
this.required = input(false, /*
|
|
202
|
-
...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
248
|
+
this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
203
249
|
/**
|
|
204
250
|
* @description Border-radius preset applied to the checkmark box.
|
|
205
251
|
* @default "medium"
|
|
@@ -217,40 +263,77 @@ class CheckBoxComponent {
|
|
|
217
263
|
*/
|
|
218
264
|
this.touch = output();
|
|
219
265
|
/**
|
|
220
|
-
* @description Marks the checkbox as touched. When bound to a signal form field via `[
|
|
221
|
-
*
|
|
266
|
+
* @description Marks the checkbox as touched. When bound to a signal form field via `[formField]`, this is written
|
|
267
|
+
* by the `FormField` directive.
|
|
222
268
|
* @default false
|
|
223
269
|
*/
|
|
224
|
-
this.touched = input(false, /*
|
|
225
|
-
...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
270
|
+
this.touched = input(false, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
226
271
|
/**
|
|
227
272
|
* @description Additional CSS classes merged onto the label container via `tailwind-merge`.
|
|
228
273
|
* @default ""
|
|
229
274
|
*/
|
|
230
275
|
this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
|
|
231
276
|
}
|
|
277
|
+
#label;
|
|
278
|
+
/**
|
|
279
|
+
* Toggles the check box when a label pointing at it through `[for]` is clicked.
|
|
280
|
+
* @internal
|
|
281
|
+
*/
|
|
282
|
+
activateFromLabel() {
|
|
283
|
+
const input = this.inputRef().nativeElement;
|
|
284
|
+
input.focus();
|
|
285
|
+
input.click();
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* @description Moves focus to the native checkbox input.
|
|
289
|
+
* @param options Options passed to the native `focus()` call, such as `preventScroll`.
|
|
290
|
+
*/
|
|
291
|
+
focus(options) {
|
|
292
|
+
this.inputRef().nativeElement.focus(options);
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* @internal
|
|
296
|
+
*/
|
|
297
|
+
setLabelledBy(id) {
|
|
298
|
+
this.#label.setLabelledBy(id);
|
|
299
|
+
}
|
|
232
300
|
onInputBlur(event) {
|
|
233
301
|
this.inputBlur.emit(event);
|
|
234
302
|
this.touch.emit();
|
|
235
303
|
}
|
|
236
304
|
onInputChange(event) {
|
|
237
305
|
const checked = event.target.checked;
|
|
306
|
+
if (this.indeterminateState()) {
|
|
307
|
+
this.indeterminateState.set(false);
|
|
308
|
+
this.indeterminateChange.emit(false);
|
|
309
|
+
}
|
|
238
310
|
this.checked.set(checked);
|
|
239
311
|
this.inputChange.emit(event);
|
|
240
312
|
this.touch.emit();
|
|
241
313
|
}
|
|
314
|
+
onInputClick(event) {
|
|
315
|
+
// Canceling the click makes the browser restore the checked and indeterminate states.
|
|
316
|
+
if (this.readonly()) {
|
|
317
|
+
event.preventDefault();
|
|
318
|
+
}
|
|
319
|
+
}
|
|
242
320
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CheckBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
243
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: CheckBoxComponent, isStandalone: true, selector: "mona-check-box", 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 }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, labelSize: { classPropertyName: "labelSize", publicName: "labelSize", 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 }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", 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 } }, outputs: { checked: "checkedChange", inputBlur: "inputBlur", inputChange: "inputChange", inputFocus: "inputFocus", touch: "touch" }, host: { properties: { "class": "'flex'", "attr.data-checked": "checked()", "attr.data-disabled": "
|
|
321
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: CheckBoxComponent, isStandalone: true, selector: "mona-check-box", 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 }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", 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 }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, labelSize: { classPropertyName: "labelSize", publicName: "labelSize", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", 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 }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", 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 } }, outputs: { checked: "checkedChange", indeterminateChange: "indeterminateChange", inputBlur: "inputBlur", inputChange: "inputChange", inputFocus: "inputFocus", touch: "touch" }, host: { properties: { "attr.aria-describedby": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.data-readonly": "readonly() || null", "class": "'flex'", "attr.data-checked": "checked()", "attr.data-disabled": "effectiveDisabled()", "attr.data-indeterminate": "indeterminateState()" } }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["checkBox"], descendants: true, isSignal: true }], ngImport: i0, template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"readonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n <input\n type=\"checkbox\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"effectiveDisabled()\"\n [indeterminate]=\"indeterminateState()\"\n [required]=\"required()\"\n [checked]=\"checked()\"\n [tabindex]=\"effectiveDisabled() ? -1 : tabIndex()\"\n [class]=\"checkBoxClasses()\"\n [attr.aria-checked]=\"indeterminateState() ? 'mixed' : null\"\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #checkBox />\n\n <span [class]=\"checkMarkClasses()\" [attr.data-invalid]=\"invalidState() || null\" aria-hidden=\"true\">\n @if (checked() && !indeterminateState()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-check stroke-primary-foreground forced-colors:stroke-[CanvasText]\">\n <path d=\"M18 6 9 17l-5-5\" />\n </svg>\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", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
244
322
|
}
|
|
245
323
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CheckBoxComponent, decorators: [{
|
|
246
324
|
type: Component,
|
|
247
325
|
args: [{ selector: "mona-check-box", imports: [NgTemplateOutlet], host: {
|
|
326
|
+
// The ARIA inputs below are applied to the native input, so the host must not keep the static attributes.
|
|
327
|
+
"[attr.aria-describedby]": "null",
|
|
328
|
+
"[attr.aria-label]": "null",
|
|
329
|
+
"[attr.aria-labelledby]": "null",
|
|
330
|
+
"[attr.data-readonly]": "readonly() || null",
|
|
248
331
|
"[class]": "'flex'",
|
|
249
332
|
"[attr.data-checked]": "checked()",
|
|
250
|
-
"[attr.data-disabled]": "
|
|
251
|
-
"[attr.data-indeterminate]": "
|
|
252
|
-
}, template: "<label
|
|
253
|
-
}], propDecorators: { ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], inputChange: [{ type: i0.Output, args: ["inputChange"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], labelSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelSize", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", 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 }] }] } });
|
|
333
|
+
"[attr.data-disabled]": "effectiveDisabled()",
|
|
334
|
+
"[attr.data-indeterminate]": "indeterminateState()"
|
|
335
|
+
}, template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"readonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n <input\n type=\"checkbox\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"effectiveDisabled()\"\n [indeterminate]=\"indeterminateState()\"\n [required]=\"required()\"\n [checked]=\"checked()\"\n [tabindex]=\"effectiveDisabled() ? -1 : tabIndex()\"\n [class]=\"checkBoxClasses()\"\n [attr.aria-checked]=\"indeterminateState() ? 'mixed' : null\"\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #checkBox />\n\n <span [class]=\"checkMarkClasses()\" [attr.data-invalid]=\"invalidState() || null\" aria-hidden=\"true\">\n @if (checked() && !indeterminateState()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-check stroke-primary-foreground forced-colors:stroke-[CanvasText]\">\n <path d=\"M18 6 9 17l-5-5\" />\n </svg>\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" }]
|
|
336
|
+
}], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ["checkBox", { 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 }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], indeterminateChange: [{ type: i0.Output, args: ["indeterminateChange"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], inputChange: [{ type: i0.Output, args: ["inputChange"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], labelSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelSize", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", 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 }] }] } });
|
|
254
337
|
|
|
255
338
|
class CheckboxDirective {
|
|
256
339
|
constructor() {
|
|
@@ -267,8 +350,7 @@ class CheckboxDirective {
|
|
|
267
350
|
* @description Marks the checkbox as invalid, triggering error border and ring styling.
|
|
268
351
|
* @default false
|
|
269
352
|
*/
|
|
270
|
-
this.invalid = input(false, /*
|
|
271
|
-
...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
353
|
+
this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
272
354
|
/**
|
|
273
355
|
* @description Border-radius preset applied to the checkbox.
|
|
274
356
|
* @default "medium"
|
|
@@ -279,8 +361,7 @@ class CheckboxDirective {
|
|
|
279
361
|
* @description Marks the checkbox as touched. Error styling is only shown when both `invalid` and `touched` are `true`.
|
|
280
362
|
* @default false
|
|
281
363
|
*/
|
|
282
|
-
this.touched = input(false, /*
|
|
283
|
-
...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
364
|
+
this.touched = input(false, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
284
365
|
/**
|
|
285
366
|
* @description Additional CSS classes merged onto the host element via `tailwind-merge`.
|
|
286
367
|
* @default ""
|