@nanahoshi/mona-ui 0.24.11 → 0.25.1
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 +183 -30
- package/fesm2022/nanahoshi-mona-ui-button.mjs +45 -9
- 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 +5 -0
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +112 -31
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +130 -88
- 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 +281 -111
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +126 -36
- 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 +2 -2
- 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 +472 -84
- 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 +166 -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
package/styles.css
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* What Tailwind needs to know about Mona UI: the classes its components use, and the colors and shadows those classes
|
|
3
|
+
* name. Import it after Tailwind:
|
|
4
|
+
*
|
|
5
|
+
* @import "tailwindcss";
|
|
6
|
+
* @import "@nanahoshi/mona-ui/styles.css";
|
|
7
|
+
*
|
|
8
|
+
* The values are Mona Light, and a theme provider replaces them at runtime through the same variables.
|
|
9
|
+
*/
|
|
10
|
+
@source "./fesm2022/*.mjs";
|
|
11
|
+
|
|
12
|
+
@theme {
|
|
13
|
+
/* Canvas and surfaces */
|
|
14
|
+
--color-canvas: oklch(98.5% 0 0);
|
|
15
|
+
--color-surface: oklch(100% 0 0);
|
|
16
|
+
--color-surface-muted: oklch(96.7% 0.001 286.375);
|
|
17
|
+
--color-surface-raised: oklch(100% 0 0);
|
|
18
|
+
--color-surface-overlay: oklch(100% 0 0);
|
|
19
|
+
--color-card: var(--color-surface-raised);
|
|
20
|
+
--color-card-foreground: var(--color-foreground);
|
|
21
|
+
|
|
22
|
+
--color-background: var(--color-surface);
|
|
23
|
+
--color-background-dark: var(--color-surface-muted);
|
|
24
|
+
--color-foreground: oklch(14.1% 0.005 285.823);
|
|
25
|
+
--color-muted-foreground: oklch(50% 0.016 285.938);
|
|
26
|
+
--color-hover: oklch(96.7% 0.001 286.375);
|
|
27
|
+
--color-active: oklch(92.2% 0.004 286.32);
|
|
28
|
+
|
|
29
|
+
--color-header-background: var(--color-surface-muted);
|
|
30
|
+
--color-header-foreground: var(--color-foreground);
|
|
31
|
+
|
|
32
|
+
--color-input-background: oklch(100% 0 0);
|
|
33
|
+
--color-input-foreground: var(--color-foreground);
|
|
34
|
+
--color-border-subtle: oklch(94% 0.002 286.32);
|
|
35
|
+
--color-border: oklch(92.2% 0.004 286.32);
|
|
36
|
+
--color-border-control: oklch(87.1% 0.006 286.286);
|
|
37
|
+
--color-border-control-hover: oklch(80.5% 0.008 286.067);
|
|
38
|
+
--color-border-control-contrast: oklch(64% 0.01 286.067);
|
|
39
|
+
--color-border-control-contrast-hover: oklch(55.2% 0.01 285.938);
|
|
40
|
+
--color-input-border: var(--color-border-control);
|
|
41
|
+
--color-input-hover: var(--color-hover);
|
|
42
|
+
--color-input-active: var(--color-surface-raised);
|
|
43
|
+
|
|
44
|
+
--color-disabled: var(--color-disabled-foreground);
|
|
45
|
+
--color-disabled-foreground: oklch(46% 0.01 285.938);
|
|
46
|
+
--color-disabled-background: oklch(96.7% 0.001 286.375);
|
|
47
|
+
--color-disabled-border: oklch(92.2% 0.004 286.32);
|
|
48
|
+
|
|
49
|
+
--color-popover: var(--color-surface-overlay);
|
|
50
|
+
--color-popover-foreground: var(--color-foreground);
|
|
51
|
+
|
|
52
|
+
--color-primary: oklch(20.5% 0.006 285.885);
|
|
53
|
+
--color-primary-foreground: oklch(98.5% 0 0);
|
|
54
|
+
--color-primary-hover: oklch(26.9% 0.006 285.885);
|
|
55
|
+
--color-primary-active: oklch(14.1% 0.005 285.823);
|
|
56
|
+
--color-primary-selected: oklch(14.1% 0.005 285.823);
|
|
57
|
+
--color-primary-subtle: oklch(96.7% 0.001 286.375);
|
|
58
|
+
--color-primary-subtle-foreground: oklch(26.9% 0.006 285.885);
|
|
59
|
+
--color-primary-border: oklch(55.2% 0.01 285.938);
|
|
60
|
+
|
|
61
|
+
--color-accent: oklch(96.7% 0.001 286.375);
|
|
62
|
+
--color-accent-foreground: oklch(20.5% 0.006 285.885);
|
|
63
|
+
--color-accent-hover: oklch(92.2% 0.004 286.32);
|
|
64
|
+
--color-accent-active: oklch(87.1% 0.006 286.286);
|
|
65
|
+
--color-accent-dark: var(--color-accent-active);
|
|
66
|
+
--color-selected: var(--color-active);
|
|
67
|
+
--color-selected-foreground: var(--color-foreground);
|
|
68
|
+
--color-selected-hover: var(--color-active);
|
|
69
|
+
--color-selected-hover-foreground: var(--color-foreground);
|
|
70
|
+
--color-selected-active: var(--color-active);
|
|
71
|
+
--color-selected-active-foreground: var(--color-foreground);
|
|
72
|
+
--color-selected-focus: var(--color-active);
|
|
73
|
+
--color-selected-focus-foreground: var(--color-foreground);
|
|
74
|
+
--color-selected-border: var(--color-primary);
|
|
75
|
+
--color-focus-surface: var(--color-surface-muted);
|
|
76
|
+
--color-focus-indicator: var(--color-primary);
|
|
77
|
+
|
|
78
|
+
--color-secondary: oklch(92.2% 0.004 286.32);
|
|
79
|
+
--color-secondary-foreground: oklch(20.5% 0.006 285.885);
|
|
80
|
+
--color-secondary-hover: oklch(87.1% 0.006 286.286);
|
|
81
|
+
--color-secondary-active: oklch(80.5% 0.008 286.067);
|
|
82
|
+
--color-secondary-selected: oklch(80.5% 0.008 286.067);
|
|
83
|
+
--color-secondary-subtle: oklch(96.7% 0.001 286.375);
|
|
84
|
+
--color-secondary-subtle-foreground: oklch(26.9% 0.006 285.885);
|
|
85
|
+
--color-secondary-border: oklch(55.2% 0.01 285.938);
|
|
86
|
+
|
|
87
|
+
--color-success: oklch(48% 0.1322 150);
|
|
88
|
+
--color-success-foreground: oklch(98% 0.004 150);
|
|
89
|
+
--color-success-hover: oklch(44.5% 0.1225 150);
|
|
90
|
+
--color-success-active: oklch(41% 0.1129 150);
|
|
91
|
+
--color-success-selected: oklch(41% 0.1129 150);
|
|
92
|
+
--color-success-subtle: oklch(94.5% 0.0308 150);
|
|
93
|
+
--color-success-subtle-foreground: oklch(34% 0.0936 150);
|
|
94
|
+
--color-success-border: oklch(62% 0.077 150);
|
|
95
|
+
|
|
96
|
+
--color-error: oklch(48% 0.16 25);
|
|
97
|
+
--color-error-foreground: oklch(98% 0.004 25);
|
|
98
|
+
--color-error-hover: oklch(44.5% 0.16 25);
|
|
99
|
+
--color-error-active: oklch(41% 0.16 25);
|
|
100
|
+
--color-error-selected: oklch(41% 0.16 25);
|
|
101
|
+
--color-error-subtle: oklch(94.5% 0.0274 25);
|
|
102
|
+
--color-error-subtle-foreground: oklch(34% 0.12 25);
|
|
103
|
+
--color-error-border: oklch(63.5% 0.088 25);
|
|
104
|
+
|
|
105
|
+
--color-warning: oklch(48% 0.1012 75);
|
|
106
|
+
--color-warning-foreground: oklch(98% 0.004 75);
|
|
107
|
+
--color-warning-hover: oklch(44.5% 0.0939 75);
|
|
108
|
+
--color-warning-active: oklch(41% 0.0865 75);
|
|
109
|
+
--color-warning-selected: oklch(41% 0.0865 75);
|
|
110
|
+
--color-warning-subtle: oklch(94.5% 0.0308 75);
|
|
111
|
+
--color-warning-subtle-foreground: oklch(34% 0.0717 75);
|
|
112
|
+
--color-warning-border: oklch(63% 0.077 75);
|
|
113
|
+
|
|
114
|
+
--color-info: oklch(48% 0.15 255);
|
|
115
|
+
--color-info-foreground: oklch(98% 0.004 255);
|
|
116
|
+
--color-info-hover: oklch(44.5% 0.1465 255);
|
|
117
|
+
--color-info-active: oklch(41% 0.135 255);
|
|
118
|
+
--color-info-selected: oklch(41% 0.135 255);
|
|
119
|
+
--color-info-subtle: oklch(94.5% 0.0266 255);
|
|
120
|
+
--color-info-subtle-foreground: oklch(34% 0.1119 255);
|
|
121
|
+
--color-info-border: oklch(62.75% 0.0825 255);
|
|
122
|
+
|
|
123
|
+
/* Keep the Tailwind theme contract in parity with the complete runtime profile. Sidebar recipes use
|
|
124
|
+
arbitrary-variable utilities so consumers are not dependent on these named utility declarations. */
|
|
125
|
+
--color-sidebar: var(--color-canvas);
|
|
126
|
+
--color-sidebar-foreground: var(--color-foreground);
|
|
127
|
+
--color-sidebar-primary: var(--color-selected);
|
|
128
|
+
--color-sidebar-primary-foreground: var(--color-selected-foreground);
|
|
129
|
+
--color-sidebar-accent: var(--color-hover);
|
|
130
|
+
--color-sidebar-accent-foreground: var(--color-foreground);
|
|
131
|
+
--color-sidebar-border: var(--color-border);
|
|
132
|
+
--color-sidebar-ring: var(--color-focus-indicator);
|
|
133
|
+
|
|
134
|
+
--color-muted: var(--color-surface-muted);
|
|
135
|
+
--color-destructive: var(--color-error);
|
|
136
|
+
--color-destructive-foreground: var(--color-error-foreground);
|
|
137
|
+
--color-input: var(--color-border-control);
|
|
138
|
+
|
|
139
|
+
--shadow-control: 0 1px 2px rgb(9 9 11 / 0.03);
|
|
140
|
+
--shadow-raised: 0 2px 6px rgb(9 9 11 / 0.1);
|
|
141
|
+
--shadow-overlay: 0 8px 24px rgb(9 9 11 / 0.14);
|
|
142
|
+
|
|
143
|
+
--color-chart-1: oklch(20.5% 0.006 285.885);
|
|
144
|
+
--color-chart-2: oklch(34% 0.008 285.805);
|
|
145
|
+
--color-chart-3: oklch(46% 0.01 285.938);
|
|
146
|
+
--color-chart-4: oklch(55.2% 0.01 285.938);
|
|
147
|
+
--color-chart-5: oklch(63% 0.01 286.067);
|
|
148
|
+
|
|
149
|
+
--color-scrollbar-thumb: oklch(64% 0.01 286.067);
|
|
150
|
+
--color-scrollbar-thumb-hover: oklch(55.2% 0.01 285.938);
|
|
151
|
+
--color-scrollbar-thumb-active: oklch(46% 0.01 285.938);
|
|
152
|
+
--color-scrollbar-thumb-focus: var(--color-primary);
|
|
153
|
+
--color-scrollbar-track: var(--color-canvas);
|
|
154
|
+
--color-scrollbar-track-hover: var(--color-surface-muted);
|
|
155
|
+
--color-scrollbar-track-active: var(--color-hover);
|
|
156
|
+
--color-scrollbar-track-focus: var(--color-accent);
|
|
157
|
+
--color-scrollbar-corner: var(--color-canvas);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* A theme provider does this itself, for the theme it applies. This is for the values above, without one. */
|
|
161
|
+
@media (prefers-contrast: more) {
|
|
162
|
+
:root {
|
|
163
|
+
--color-border-control: var(--color-border-control-contrast);
|
|
164
|
+
--color-border-control-hover: var(--color-border-control-contrast-hover);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -41,6 +41,7 @@ declare class AutoCompleteComponent<TData = unknown> implements FormValueControl
|
|
|
41
41
|
protected readonly autoCompleteValue$: Subject<string | null>;
|
|
42
42
|
protected readonly baseClass: _angular_core.Signal<string>;
|
|
43
43
|
protected readonly clearButtonVisible: _angular_core.Signal<boolean>;
|
|
44
|
+
protected readonly effectiveDisabled: _angular_core.Signal<boolean>;
|
|
44
45
|
protected readonly expanded: _angular_core.Signal<boolean>;
|
|
45
46
|
protected readonly footerTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
46
47
|
protected readonly groupHeaderTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
|
|
3
3
|
declare class AvatarComponent {
|
|
4
|
+
#private;
|
|
4
5
|
protected readonly avatarLabelStyles: _angular_core.Signal<{
|
|
5
6
|
alignItems: string;
|
|
6
7
|
color: string;
|
|
@@ -555,6 +556,9 @@ declare class AvatarComponent {
|
|
|
555
556
|
removeProperty?: ((property: string) => string) | undefined;
|
|
556
557
|
setProperty?: ((property: string, value: string | null, priority?: string) => void) | undefined;
|
|
557
558
|
}>;
|
|
559
|
+
protected readonly hostName: _angular_core.Signal<string>;
|
|
560
|
+
protected readonly imageAlt: _angular_core.Signal<string>;
|
|
561
|
+
protected readonly imageVisible: _angular_core.Signal<boolean>;
|
|
558
562
|
/**
|
|
559
563
|
* @description Alternative text for the avatar image. Provide a meaningful description for non-decorative images;
|
|
560
564
|
* an empty string marks the image as decorative.
|
|
@@ -562,8 +566,9 @@ declare class AvatarComponent {
|
|
|
562
566
|
*/
|
|
563
567
|
readonly alt: _angular_core.InputSignal<string>;
|
|
564
568
|
/**
|
|
565
|
-
* @description Accessible name
|
|
566
|
-
*
|
|
569
|
+
* @description Accessible name of the avatar. Describe who or what it represents.
|
|
570
|
+
* In label and projected-content modes the host takes it with `role="img"`. While an image shows, it's the image's
|
|
571
|
+
* `alt` unless `alt` is set.
|
|
567
572
|
* @default ""
|
|
568
573
|
*/
|
|
569
574
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
@@ -601,18 +606,19 @@ declare class AvatarComponent {
|
|
|
601
606
|
*/
|
|
602
607
|
readonly height: _angular_core.InputSignalWithTransform<string, string | number>;
|
|
603
608
|
/**
|
|
604
|
-
* @description Image URL. When non-empty, renders an `<img>` and suppresses `label` and projected content
|
|
609
|
+
* @description Image URL. When non-empty, renders an `<img>` and suppresses `label` and projected content, until it
|
|
610
|
+
* fails to load. Then the avatar falls back to them, and a new URL tries again.
|
|
605
611
|
* @default ""
|
|
606
612
|
*/
|
|
607
613
|
readonly image: _angular_core.InputSignal<string>;
|
|
608
614
|
/**
|
|
609
|
-
* @description Text label displayed inside the avatar when no image
|
|
615
|
+
* @description Text label displayed inside the avatar when there's no image, or the image failed to load.
|
|
610
616
|
* @default ""
|
|
611
617
|
*/
|
|
612
618
|
readonly label: _angular_core.InputSignal<string>;
|
|
613
619
|
/**
|
|
614
620
|
* @description Color of the label text. Ignored in image mode.
|
|
615
|
-
* @default "var(--color-foreground)"
|
|
621
|
+
* @default "var(--color-primary-foreground)"
|
|
616
622
|
*/
|
|
617
623
|
readonly labelColor: _angular_core.InputSignal<string>;
|
|
618
624
|
/**
|
|
@@ -625,18 +631,19 @@ declare class AvatarComponent {
|
|
|
625
631
|
* @default "700"
|
|
626
632
|
*/
|
|
627
633
|
readonly labelFontWeight: _angular_core.InputSignal<string>;
|
|
628
|
-
/**
|
|
629
|
-
* @description Width of the host element. A string is used as-is; a number is converted to `px`.
|
|
630
|
-
* @default "64px"
|
|
631
|
-
*/
|
|
632
|
-
readonly width: _angular_core.InputSignalWithTransform<string, string | number>;
|
|
633
634
|
/**
|
|
634
635
|
* @description Additional CSS classes applied to the host element.
|
|
635
636
|
* @default ""
|
|
636
637
|
*/
|
|
637
638
|
readonly userClass: _angular_core.InputSignal<string>;
|
|
639
|
+
/**
|
|
640
|
+
* @description Width of the host element. A string is used as-is; a number is converted to `px`.
|
|
641
|
+
* @default "64px"
|
|
642
|
+
*/
|
|
643
|
+
readonly width: _angular_core.InputSignalWithTransform<string, string | number>;
|
|
644
|
+
protected onImageError(): void;
|
|
638
645
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AvatarComponent, never>;
|
|
639
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvatarComponent, "mona-avatar", never, { "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; "isSignal": true; }; "borderColor": { "alias": "borderColor"; "required": false; "isSignal": true; }; "borderRadius": { "alias": "borderRadius"; "required": false; "isSignal": true; }; "borderWidth": { "alias": "borderWidth"; "required": false; "isSignal": true; }; "customStyles": { "alias": "customStyles"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "image": { "alias": "image"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelColor": { "alias": "labelColor"; "required": false; "isSignal": true; }; "labelFontSize": { "alias": "labelFontSize"; "required": false; "isSignal": true; }; "labelFontWeight": { "alias": "labelFontWeight"; "required": false; "isSignal": true; }; "
|
|
646
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvatarComponent, "mona-avatar", never, { "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; "isSignal": true; }; "borderColor": { "alias": "borderColor"; "required": false; "isSignal": true; }; "borderRadius": { "alias": "borderRadius"; "required": false; "isSignal": true; }; "borderWidth": { "alias": "borderWidth"; "required": false; "isSignal": true; }; "customStyles": { "alias": "customStyles"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "image": { "alias": "image"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelColor": { "alias": "labelColor"; "required": false; "isSignal": true; }; "labelFontSize": { "alias": "labelFontSize"; "required": false; "isSignal": true; }; "labelFontWeight": { "alias": "labelFontWeight"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
640
647
|
}
|
|
641
648
|
|
|
642
649
|
export { AvatarComponent };
|
|
@@ -1,46 +1,58 @@
|
|
|
1
1
|
import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
|
|
2
2
|
import { MonaBreadcrumbMessages } from '@nanahoshi/mona-ui/i18n';
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
|
-
import { TemplateRef } from '@angular/core';
|
|
4
|
+
import { ElementRef, TemplateRef } from '@angular/core';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
|
-
import { VariantProps } from 'class-variance-authority';
|
|
7
6
|
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
7
|
+
import { VariantProps } from 'class-variance-authority';
|
|
8
8
|
|
|
9
9
|
declare const breadcrumbListThemeVariants: (props?: ({
|
|
10
10
|
disabled?: boolean | null | undefined;
|
|
11
11
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
|
+
/** Inset focus, because the list clips anything outside it. */
|
|
12
13
|
declare const breadcrumbListItemThemeVariants: (props?: ({
|
|
13
14
|
disabled?: boolean | null | undefined;
|
|
14
|
-
listDisabled?: boolean | null | undefined;
|
|
15
15
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
16
16
|
type BreadcrumbListVariantProps = VariantProps<typeof breadcrumbListThemeVariants>;
|
|
17
17
|
type BreadcrumbListVariantInput = VariantInputs<BreadcrumbListVariantProps>;
|
|
18
18
|
type BreadcrumbListItemVariantProps = VariantProps<typeof breadcrumbListItemThemeVariants>;
|
|
19
19
|
type BreadcrumbListItemVariantInput = VariantInputs<BreadcrumbListItemVariantProps>;
|
|
20
|
-
type BreadcrumbVariantInput = BreadcrumbListVariantInput &
|
|
20
|
+
type BreadcrumbVariantInput = BreadcrumbListVariantInput & BreadcrumbListItemVariantInput;
|
|
21
21
|
|
|
22
22
|
declare class BreadcrumbItemComponent {
|
|
23
|
+
#private;
|
|
23
24
|
/**
|
|
24
25
|
* @description Renders this item with reduced visual emphasis and removes pointer interaction.
|
|
25
26
|
* Has no visual effect when the parent breadcrumb is also disabled.
|
|
26
27
|
* @default false
|
|
27
28
|
*/
|
|
28
|
-
readonly disabled: _angular_core.
|
|
29
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
29
30
|
/**
|
|
30
|
-
* @description Emitted when the item is clicked or activated via keyboard.
|
|
31
|
-
* Not emitted when this is the
|
|
31
|
+
* @description Emitted with the click when the item is clicked or activated via keyboard.
|
|
32
|
+
* Not emitted when this is the current-page item or when the item is disabled.
|
|
32
33
|
*/
|
|
33
|
-
readonly itemClick: _angular_core.OutputEmitterRef<
|
|
34
|
-
readonly templateRef: _angular_core.Signal<TemplateRef<any>>;
|
|
34
|
+
readonly itemClick: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
35
35
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BreadcrumbItemComponent, never>;
|
|
36
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BreadcrumbItemComponent, "mona-breadcrumb-item", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; },
|
|
36
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BreadcrumbItemComponent, "mona-breadcrumb-item", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; }, ["link"], ["*"], true, never>;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
/** An item to render, or with no item, the collapse button. `index` is what the separator after it reports. */
|
|
40
|
+
interface BreadcrumbEntry {
|
|
41
|
+
readonly index: number;
|
|
42
|
+
readonly item: BreadcrumbItemComponent | null;
|
|
43
|
+
readonly key: unknown;
|
|
44
|
+
}
|
|
39
45
|
declare class BreadcrumbComponent implements BreadcrumbVariantInput {
|
|
40
46
|
#private;
|
|
41
47
|
protected readonly currentItemClass: _angular_core.Signal<string>;
|
|
48
|
+
protected readonly entries: _angular_core.Signal<readonly BreadcrumbEntry[]>;
|
|
49
|
+
protected readonly expanded: _angular_core.WritableSignal<boolean>;
|
|
50
|
+
protected readonly hasItems: _angular_core.Signal<boolean>;
|
|
51
|
+
protected readonly hiddenCount: _angular_core.Signal<number>;
|
|
42
52
|
protected readonly itemComponents: _angular_core.Signal<readonly BreadcrumbItemComponent[]>;
|
|
53
|
+
protected readonly itemContentClass: _angular_core.Signal<string>;
|
|
43
54
|
protected readonly listClass: _angular_core.Signal<string>;
|
|
55
|
+
protected readonly listElement: _angular_core.Signal<ElementRef<HTMLOListElement> | undefined>;
|
|
44
56
|
protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaBreadcrumbMessages>;
|
|
45
57
|
protected readonly separatorTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
46
58
|
/**
|
|
@@ -53,15 +65,51 @@ declare class BreadcrumbComponent implements BreadcrumbVariantInput {
|
|
|
53
65
|
* @description Renders the entire breadcrumb with reduced visual emphasis and removes pointer interaction from all items.
|
|
54
66
|
* @default false
|
|
55
67
|
*/
|
|
56
|
-
readonly disabled: _angular_core.
|
|
68
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
69
|
+
/**
|
|
70
|
+
* @description Treats the last item as the current page: not a button, and marked `aria-current="page"`. Turn it off
|
|
71
|
+
* for a trail that ends before the page you're on.
|
|
72
|
+
* @default true
|
|
73
|
+
*/
|
|
74
|
+
readonly lastItemCurrent: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
75
|
+
/**
|
|
76
|
+
* @description The most items to show before the middle of the trail collapses behind a button that shows it again.
|
|
77
|
+
* The first and last items always stay, so anything below 2 counts as 2. `null` never collapses.
|
|
78
|
+
* @default null
|
|
79
|
+
*/
|
|
80
|
+
readonly maxItems: _angular_core.InputSignalWithTransform<number | null, unknown>;
|
|
57
81
|
/**
|
|
58
82
|
* @description Additional CSS classes merged onto the breadcrumb list via `tailwind-merge`.
|
|
59
83
|
* @default ""
|
|
60
84
|
*/
|
|
61
85
|
readonly userClass: _angular_core.InputSignal<string>;
|
|
62
|
-
|
|
86
|
+
/**
|
|
87
|
+
* Shows the whole trail. The button that was just activated goes away, so focus moves to the first item it revealed.
|
|
88
|
+
*/
|
|
89
|
+
protected expand(): void;
|
|
90
|
+
protected listItemClass(current: boolean): string;
|
|
91
|
+
protected onItemClick(item: BreadcrumbItemComponent, event: MouseEvent): void;
|
|
63
92
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BreadcrumbComponent, never>;
|
|
64
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BreadcrumbComponent, "mona-breadcrumb", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, ["itemComponents", "separatorTemplate"], never, true, never>;
|
|
93
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BreadcrumbComponent, "mona-breadcrumb", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "lastItemCurrent": { "alias": "lastItemCurrent"; "required": false; "isSignal": true; }; "maxItems": { "alias": "maxItems"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, ["itemComponents", "separatorTemplate"], never, true, never>;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Makes a projected anchor the item's link, so the browser and the router treat it as one: ctrl-click, copy link, `href`,
|
|
98
|
+
* `routerLink`, `target`. The item then renders no button around it.
|
|
99
|
+
*/
|
|
100
|
+
declare class BreadcrumbLinkDirective {
|
|
101
|
+
#private;
|
|
102
|
+
protected readonly current: _angular_core.Signal<boolean>;
|
|
103
|
+
protected readonly disabled: _angular_core.Signal<boolean>;
|
|
104
|
+
protected readonly linkClass: _angular_core.Signal<string>;
|
|
105
|
+
/**
|
|
106
|
+
* @description Additional CSS classes merged onto the link via `tailwind-merge`.
|
|
107
|
+
* @default ""
|
|
108
|
+
*/
|
|
109
|
+
readonly userClass: _angular_core.InputSignal<string>;
|
|
110
|
+
constructor();
|
|
111
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BreadcrumbLinkDirective, never>;
|
|
112
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BreadcrumbLinkDirective, "a[monaBreadcrumbLink]", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
65
113
|
}
|
|
66
114
|
|
|
67
115
|
declare class BreadcrumbSeparatorTemplateDirective {
|
|
@@ -71,4 +119,4 @@ declare class BreadcrumbSeparatorTemplateDirective {
|
|
|
71
119
|
|
|
72
120
|
declare const BREADCRUMB_DEFAULT_MESSAGES: MonaBreadcrumbMessages;
|
|
73
121
|
|
|
74
|
-
export { BREADCRUMB_DEFAULT_MESSAGES, BreadcrumbComponent, BreadcrumbItemComponent, BreadcrumbSeparatorTemplateDirective };
|
|
122
|
+
export { BREADCRUMB_DEFAULT_MESSAGES, BreadcrumbComponent, BreadcrumbItemComponent, BreadcrumbLinkDirective, BreadcrumbSeparatorTemplateDirective };
|
|
@@ -2,11 +2,24 @@ import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
|
|
|
2
2
|
import * as _nanahoshi_mona_ui_button from '@nanahoshi/mona-ui/button';
|
|
3
3
|
import { ButtonDirective } from '@nanahoshi/mona-ui/button';
|
|
4
4
|
import * as _angular_core from '@angular/core';
|
|
5
|
+
import { FormValueControl } from '@angular/forms/signals';
|
|
5
6
|
import { SelectionMode } from '@nanahoshi/mona-ui/common';
|
|
6
7
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
7
8
|
import { VariantProps } from 'class-variance-authority';
|
|
8
9
|
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
9
10
|
|
|
11
|
+
/**
|
|
12
|
+
* What `mona-button-group` reports about a clicked button.
|
|
13
|
+
*/
|
|
14
|
+
interface ButtonGroupClickEvent<T = unknown> {
|
|
15
|
+
/** The button's element. */
|
|
16
|
+
readonly button: HTMLButtonElement;
|
|
17
|
+
/** Whether the button is selected now that the group has applied its selection. */
|
|
18
|
+
readonly selected: boolean;
|
|
19
|
+
/** The button's `value`, if it has one. */
|
|
20
|
+
readonly value: T | undefined;
|
|
21
|
+
}
|
|
22
|
+
|
|
10
23
|
declare const buttonGroupThemeVariants: (props?: ({
|
|
11
24
|
look?: "default" | "error" | "ghost" | "info" | "outline" | "primary" | "secondary" | "success" | "warning" | null | undefined;
|
|
12
25
|
rounded?: "full" | "large" | "medium" | "none" | "small" | null | undefined;
|
|
@@ -15,7 +28,7 @@ declare const buttonGroupThemeVariants: (props?: ({
|
|
|
15
28
|
type ButtonGroupVariantProps = VariantProps<typeof buttonGroupThemeVariants>;
|
|
16
29
|
type ButtonGroupVariantsInput = VariantInputs<ButtonGroupVariantProps>;
|
|
17
30
|
|
|
18
|
-
declare class ButtonGroupComponent implements ButtonGroupVariantsInput {
|
|
31
|
+
declare class ButtonGroupComponent<T = unknown> implements ButtonGroupVariantsInput, FormValueControl<T | readonly T[] | null | undefined> {
|
|
19
32
|
#private;
|
|
20
33
|
protected readonly baseClass: _angular_core.Signal<string>;
|
|
21
34
|
/**
|
|
@@ -27,61 +40,118 @@ declare class ButtonGroupComponent implements ButtonGroupVariantsInput {
|
|
|
27
40
|
* disabled state, but not its selection.
|
|
28
41
|
*/
|
|
29
42
|
protected readonly components: _angular_core.Signal<readonly _nanahoshi_mona_ui_button.ButtonGroupMember[]>;
|
|
30
|
-
protected readonly
|
|
43
|
+
protected readonly effectiveDisabled: _angular_core.Signal<boolean>;
|
|
44
|
+
protected readonly invalidState: _angular_core.Signal<boolean>;
|
|
45
|
+
protected readonly labelledBy: _angular_core.Signal<string | null>;
|
|
31
46
|
protected readonly members: _angular_core.Signal<ButtonDirective[]>;
|
|
32
47
|
protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaButtonGroupMessages>;
|
|
33
48
|
/**
|
|
34
|
-
* @description When `false` and `selection` is `"single"`,
|
|
35
|
-
* the active button
|
|
49
|
+
* @description When `false` and `selection` is `"single"`, a selected button stays selected until another one takes
|
|
50
|
+
* over: the active button can't be deselected, and clearing every `selected` brings it back. It doesn't choose a
|
|
51
|
+
* first button, and a `value` of `null` still clears the group, so a form can reset it. Has no effect in `"multiple"`
|
|
52
|
+
* mode.
|
|
36
53
|
* @default true
|
|
37
54
|
*/
|
|
38
|
-
readonly allowEmpty: _angular_core.
|
|
55
|
+
readonly allowEmpty: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
39
56
|
/**
|
|
40
57
|
* @description Accessible name for the host element. Override when multiple button groups appear on the same page
|
|
41
58
|
* so screen reader users can distinguish them.
|
|
42
59
|
*/
|
|
43
60
|
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
44
61
|
/**
|
|
45
|
-
* @description
|
|
46
|
-
*
|
|
62
|
+
* @description Id of the element that names the group.
|
|
63
|
+
* @default ""
|
|
64
|
+
*/
|
|
65
|
+
readonly ariaLabelledBy: _angular_core.InputSignal<string>;
|
|
66
|
+
/**
|
|
67
|
+
* @description Emitted when a button placed directly in the group is clicked, toggleable or not, after the group has
|
|
68
|
+
* applied its selection. Not emitted for a dropdown or split button's own buttons, for a disabled button, or for a
|
|
69
|
+
* toggle button while the group is read-only, since nothing was selected.
|
|
47
70
|
*/
|
|
48
|
-
readonly buttonClick: _angular_core.OutputRef<
|
|
71
|
+
readonly buttonClick: _angular_core.OutputRef<ButtonGroupClickEvent<T>>;
|
|
49
72
|
/**
|
|
50
|
-
* @description Renders all child buttons with reduced visual emphasis and removes pointer interaction.
|
|
73
|
+
* @description Renders all child buttons with reduced visual emphasis and removes pointer interaction. When bound to
|
|
74
|
+
* a signal form field via `[formField]`, this is written by the `FormField` directive.
|
|
51
75
|
* @default false
|
|
52
76
|
*/
|
|
53
|
-
readonly disabled: _angular_core.
|
|
77
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
78
|
+
/**
|
|
79
|
+
* @description Marks the group as invalid. Error styling requires both `invalid` and `touched` to be `true`. When
|
|
80
|
+
* bound to a signal form field via `[formField]`, this is written by the `FormField` directive.
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
54
84
|
/**
|
|
55
85
|
* @description Visual style variant propagated to all child buttons.
|
|
56
86
|
* Also controls container-level divider and border behavior.
|
|
57
87
|
* @default "outline"
|
|
58
88
|
*/
|
|
59
89
|
readonly look: _angular_core.InputSignal<"default" | "error" | "ghost" | "info" | "outline" | "primary" | "secondary" | "success" | "warning" | null | undefined>;
|
|
90
|
+
/**
|
|
91
|
+
* @description Prevents selection changes while the buttons stay focusable. Buttons that aren't toggleable keep
|
|
92
|
+
* working. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive.
|
|
93
|
+
* @default false
|
|
94
|
+
*/
|
|
95
|
+
readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
60
96
|
/**
|
|
61
97
|
* @description Border-radius preset applied to the container and the outer corners of the first and last child button.
|
|
62
98
|
* @default "medium"
|
|
63
99
|
*/
|
|
64
100
|
readonly rounded: _angular_core.InputSignal<"full" | "large" | "medium" | "none" | "small" | null | undefined>;
|
|
65
101
|
/**
|
|
66
|
-
* @description
|
|
67
|
-
*
|
|
102
|
+
* @description Whether one button can be selected at a time (`"single"`) or each toggles on its own (`"multiple"`).
|
|
103
|
+
* The buttons stay toggle buttons with `aria-pressed` in both. For a choice that must always hold one value, use
|
|
104
|
+
* `mona-segmented`, which is a radio group.
|
|
68
105
|
* @default "multiple"
|
|
69
106
|
*/
|
|
70
|
-
readonly selection: _angular_core.
|
|
107
|
+
readonly selection: _angular_core.InputSignal<SelectionMode>;
|
|
71
108
|
/**
|
|
72
109
|
* @description Size preset propagated to all child buttons, overriding their individual `size` inputs.
|
|
73
110
|
* @default "medium"
|
|
74
111
|
*/
|
|
75
112
|
readonly size: _angular_core.InputSignal<"large" | "medium" | "small" | null | undefined>;
|
|
113
|
+
/**
|
|
114
|
+
* @description Emitted when a user changes the selection or focus leaves the group.
|
|
115
|
+
* The `FormField` directive listens to this to mark the field as touched.
|
|
116
|
+
*/
|
|
117
|
+
readonly touch: _angular_core.OutputEmitterRef<void>;
|
|
118
|
+
/**
|
|
119
|
+
* @description Marks the group as touched. When bound to a signal form field via `[formField]`, this is written by
|
|
120
|
+
* the `FormField` directive.
|
|
121
|
+
* @default false
|
|
122
|
+
*/
|
|
123
|
+
readonly touched: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
76
124
|
/**
|
|
77
125
|
* @description Additional CSS classes merged onto the host element via `tailwind-merge`.
|
|
78
126
|
* @default ""
|
|
79
127
|
*/
|
|
80
128
|
readonly userClass: _angular_core.InputSignal<string>;
|
|
129
|
+
/**
|
|
130
|
+
* @description The value of the selected button in `"single"` mode, or `null`, and an array of the selected buttons'
|
|
131
|
+
* values in `"multiple"` mode. Buttons take part by having a `value`. While `undefined`, it leaves each button's
|
|
132
|
+
* `selected` alone. A value with no button yet stays, so one that loads before its button isn't lost. Use either this
|
|
133
|
+
* or `[(selected)]` on the buttons, not both.
|
|
134
|
+
* @default undefined
|
|
135
|
+
*/
|
|
136
|
+
readonly value: _angular_core.ModelSignal<T | readonly T[] | null | undefined>;
|
|
81
137
|
constructor();
|
|
138
|
+
/**
|
|
139
|
+
* @description Moves focus to the selected button, or the first enabled one.
|
|
140
|
+
* @param options Options passed to the native `focus()` call, such as `preventScroll`.
|
|
141
|
+
*/
|
|
142
|
+
focus(options?: FocusOptions): void;
|
|
143
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
144
|
+
private commitValue;
|
|
145
|
+
/**
|
|
146
|
+
* Holds the group to `selection` and `allowEmpty` however a button's `selected` changed, since a binding can change
|
|
147
|
+
* it as well as a click. A form's `value` of `null` is left alone, so the form can reset the group.
|
|
148
|
+
*/
|
|
149
|
+
private enforceSelectionPolicy;
|
|
82
150
|
private setSubscriptions;
|
|
83
|
-
|
|
84
|
-
|
|
151
|
+
private valueButtons;
|
|
152
|
+
private valuesOf;
|
|
153
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonGroupComponent<any>, never>;
|
|
154
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonGroupComponent<any>, "mona-button-group", never, { "allowEmpty": { "alias": "allowEmpty"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "buttonClick": "buttonClick"; "touch": "touch"; "value": "valueChange"; }, ["buttons", "components"], ["[monaButton], mona-dropdown-button, mona-split-button"], true, never>;
|
|
85
155
|
}
|
|
86
156
|
|
|
87
157
|
declare const BUTTON_GROUP_DEFAULT_MESSAGES: {
|
|
@@ -89,4 +159,4 @@ declare const BUTTON_GROUP_DEFAULT_MESSAGES: {
|
|
|
89
159
|
};
|
|
90
160
|
|
|
91
161
|
export { BUTTON_GROUP_DEFAULT_MESSAGES, ButtonGroupComponent };
|
|
92
|
-
export type { ButtonGroupVariantProps };
|
|
162
|
+
export type { ButtonGroupClickEvent, ButtonGroupVariantProps };
|
|
@@ -25,11 +25,13 @@ type ButtonVariantsInput = VariantInputs<ButtonVariantProps>;
|
|
|
25
25
|
declare class ButtonDirective implements ButtonVariantsInput {
|
|
26
26
|
#private;
|
|
27
27
|
protected readonly baseClass: _angular_core.Signal<string>;
|
|
28
|
-
protected readonly effectiveDisabled: _angular_core.Signal<boolean>;
|
|
29
28
|
protected readonly effectiveLook: _angular_core.Signal<"default" | "primary" | "success" | "error" | "warning" | "info" | "outline" | "secondary" | "ghost" | "link" | "clear" | null | undefined>;
|
|
30
29
|
protected readonly effectiveRounded: _angular_core.Signal<"full" | "large" | "medium" | "none" | "small" | null | undefined>;
|
|
31
30
|
protected readonly effectiveSize: _angular_core.Signal<"large" | "medium" | "small" | null | undefined>;
|
|
32
|
-
|
|
31
|
+
/**
|
|
32
|
+
* A read-only group's toggle buttons keep focus, so they can't be natively disabled.
|
|
33
|
+
*/
|
|
34
|
+
protected readonly groupReadonly: _angular_core.Signal<boolean>;
|
|
33
35
|
protected readonly loadingSize: _angular_core.Signal<12 | 16 | 14>;
|
|
34
36
|
/**
|
|
35
37
|
* @description Value forwarded to the `aria-haspopup` attribute. Set when this button triggers a popup, menu,
|
|
@@ -44,6 +46,16 @@ declare class ButtonDirective implements ButtonVariantsInput {
|
|
|
44
46
|
* @default false
|
|
45
47
|
*/
|
|
46
48
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the button is disabled, by its own input or its group's. A dropdown or split button reads this to close
|
|
51
|
+
* its menu.
|
|
52
|
+
*/
|
|
53
|
+
readonly effectiveDisabled: _angular_core.Signal<boolean>;
|
|
54
|
+
/**
|
|
55
|
+
* Whether a click toggles the button: buttons in a group do unless `toggleable` is `false`. The group reads this to
|
|
56
|
+
* know which buttons take part in its selection.
|
|
57
|
+
*/
|
|
58
|
+
readonly effectiveToggleable: _angular_core.Signal<boolean>;
|
|
47
59
|
/**
|
|
48
60
|
* @description Removes horizontal padding and fixes a square aspect ratio sized to match `size`.
|
|
49
61
|
* Provide `aria-label` on the host when using icon-only buttons; in dev mode, an icon-only button without an
|
|
@@ -106,9 +118,15 @@ declare class ButtonDirective implements ButtonVariantsInput {
|
|
|
106
118
|
* @default ""
|
|
107
119
|
*/
|
|
108
120
|
readonly userClass: _angular_core.InputSignal<string>;
|
|
121
|
+
/**
|
|
122
|
+
* @description What a `ButtonGroup`'s `value` holds while this button is selected. A button without one takes no part
|
|
123
|
+
* in the group's `value`.
|
|
124
|
+
* @default undefined
|
|
125
|
+
*/
|
|
126
|
+
readonly value: _angular_core.InputSignal<unknown>;
|
|
109
127
|
constructor();
|
|
110
128
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonDirective, never>;
|
|
111
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ButtonDirective, "button[monaButton]", never, { "ariaHasPopup": { "alias": "aria-haspopup"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "toggleable": { "alias": "toggleable"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "look": "lookChange"; "selected": "selectedChange"; }, never, never, true, never>;
|
|
129
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ButtonDirective, "button[monaButton]", never, { "ariaHasPopup": { "alias": "aria-haspopup"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "toggleable": { "alias": "toggleable"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "look": "lookChange"; "selected": "selectedChange"; }, never, never, true, never>;
|
|
112
130
|
}
|
|
113
131
|
|
|
114
132
|
/**
|
|
@@ -139,8 +157,13 @@ declare class ButtonService {
|
|
|
139
157
|
readonly buttonSelect$: Subject<[ButtonDirective, boolean]>;
|
|
140
158
|
readonly groupDisabled: _angular_core.WritableSignal<boolean>;
|
|
141
159
|
readonly groupLook: _angular_core.WritableSignal<"default" | "primary" | "success" | "error" | "warning" | "info" | "outline" | "secondary" | "ghost" | "link" | "clear" | null | undefined>;
|
|
160
|
+
readonly groupReadonly: _angular_core.WritableSignal<boolean>;
|
|
142
161
|
readonly groupRounded: _angular_core.WritableSignal<"full" | "large" | "medium" | "none" | "small" | null | undefined>;
|
|
143
162
|
readonly groupSize: _angular_core.WritableSignal<"large" | "medium" | "small" | null | undefined>;
|
|
163
|
+
/**
|
|
164
|
+
* Every click on a member, toggleable or not, reported after the group has applied its selection.
|
|
165
|
+
*/
|
|
166
|
+
readonly memberClick$: Subject<[ButtonDirective, HTMLButtonElement]>;
|
|
144
167
|
/**
|
|
145
168
|
* The buttons that belong to the group. Only these follow the group's look, size, rounding, disabled state and
|
|
146
169
|
* selection; other buttons that can inject this service ignore it.
|