@nanahoshi/mona-ui 0.24.10 → 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/chart/README.md +223 -77
- 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 +1909 -666
- 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 +146 -5
- 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 +111 -5
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +103 -5
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +103 -5
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +100 -6
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +90 -5
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +103 -5
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +90 -5
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +90 -5
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +103 -5
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +105 -5
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +103 -5
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +90 -5
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +90 -5
- 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 +90 -5
- package/locales/ar-sa/ar-sa.messages.json +90 -5
- package/locales/de-de/de-de.messages.json +90 -5
- package/locales/es-es/es-es.messages.json +90 -5
- package/locales/fr-fr/fr-fr.messages.json +91 -6
- package/locales/id-id/id-id.messages.json +90 -5
- package/locales/it-it/it-it.messages.json +90 -5
- package/locales/ja-jp/ja-jp.messages.json +90 -5
- package/locales/ko-kr/ko-kr.messages.json +90 -5
- package/locales/pt-br/pt-br.messages.json +90 -5
- package/locales/ru-ru/ru-ru.messages.json +90 -5
- package/locales/tr-tr/tr-tr.messages.json +90 -5
- package/locales/zh-cn/zh-cn.messages.json +90 -5
- package/locales/zh-tw/zh-tw.messages.json +90 -5
- 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-chart.d.ts +519 -527
- 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 +130 -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 +85 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +85 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +85 -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
|
@@ -5,17 +5,17 @@ import { Signal, ElementRef } from '@angular/core';
|
|
|
5
5
|
import { FormValueControl } from '@angular/forms/signals';
|
|
6
6
|
import { VariantInputs, HSV, RGB, HSVChannel, RGBChannel } from '@nanahoshi/mona-ui/internal';
|
|
7
7
|
import { ColorMode, ColorOutputFormat } from '@nanahoshi/mona-ui/common';
|
|
8
|
-
import { Subject } from 'rxjs';
|
|
9
8
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
10
9
|
import { VariantProps } from 'class-variance-authority';
|
|
11
10
|
|
|
12
11
|
interface ColorInput {
|
|
12
|
+
ariaLabel: string;
|
|
13
|
+
change: (value: number | null) => void;
|
|
13
14
|
key: string;
|
|
14
15
|
label: string;
|
|
15
|
-
value: number | null;
|
|
16
|
-
min: number;
|
|
17
16
|
max: number;
|
|
18
|
-
|
|
17
|
+
min: number;
|
|
18
|
+
value: number | null;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
declare const colorGradientBaseThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
@@ -47,6 +47,7 @@ declare class ColorGradientComponent implements ColorGradientVariantInputs, Form
|
|
|
47
47
|
protected readonly alpha: _angular_core.WritableSignal<number>;
|
|
48
48
|
protected readonly alphaInputColor: Signal<string>;
|
|
49
49
|
protected readonly alphaSliderBackground: Signal<string>;
|
|
50
|
+
protected readonly alphaValueText: Signal<(alpha: number) => string>;
|
|
50
51
|
protected readonly baseClasses: Signal<string>;
|
|
51
52
|
protected readonly colorInputs: Signal<ColorInput[]>;
|
|
52
53
|
protected readonly colorMode: _angular_core.WritableSignal<ColorMode>;
|
|
@@ -62,22 +63,25 @@ declare class ColorGradientComponent implements ColorGradientVariantInputs, Form
|
|
|
62
63
|
title: string;
|
|
63
64
|
onClick: () => void;
|
|
64
65
|
})[]>;
|
|
66
|
+
protected readonly effectiveDisabled: Signal<boolean>;
|
|
65
67
|
protected readonly hex: Signal<string>;
|
|
66
68
|
protected readonly hexFocused: _angular_core.WritableSignal<boolean>;
|
|
67
|
-
protected readonly hsvHandle: Signal<ElementRef<HTMLDivElement>>;
|
|
68
|
-
protected readonly hsvHandleLeft: _angular_core.WritableSignal<number>;
|
|
69
|
-
protected readonly hsvHandleTop: _angular_core.WritableSignal<number>;
|
|
70
69
|
protected readonly hexInputValue: _angular_core.WritableSignal<string>;
|
|
71
70
|
protected readonly hsv: _angular_core.WritableSignal<HSV>;
|
|
71
|
+
protected readonly hsvHandle: Signal<ElementRef<HTMLDivElement>>;
|
|
72
72
|
protected readonly hsvRectangle: Signal<ElementRef<HTMLDivElement>>;
|
|
73
73
|
protected readonly hsvRectangleBackground: Signal<string>;
|
|
74
74
|
protected readonly hsvRectangleClasses: Signal<string>;
|
|
75
75
|
protected readonly hsvRectangleHandleClasses: Signal<string>;
|
|
76
|
-
protected readonly
|
|
76
|
+
protected readonly interactionDisabled: Signal<boolean>;
|
|
77
77
|
protected readonly invalidState: Signal<boolean>;
|
|
78
|
+
protected readonly labelledBy: Signal<string | null>;
|
|
78
79
|
protected readonly lastSelectedColor: _angular_core.WritableSignal<string>;
|
|
79
80
|
protected readonly messages: Signal<_nanahoshi_mona_ui_i18n.MonaColorGradientMessages>;
|
|
80
81
|
protected readonly rgb: _angular_core.WritableSignal<RGB>;
|
|
82
|
+
protected readonly roundedHue: Signal<number>;
|
|
83
|
+
protected readonly roundedSaturation: Signal<number>;
|
|
84
|
+
protected readonly roundedValue: Signal<number>;
|
|
81
85
|
protected readonly selectedColor: Signal<string>;
|
|
82
86
|
protected readonly sliderHandleClasses: Signal<string>;
|
|
83
87
|
protected readonly sliderHeight = 10;
|
|
@@ -87,7 +91,17 @@ declare class ColorGradientComponent implements ColorGradientVariantInputs, Form
|
|
|
87
91
|
*/
|
|
88
92
|
readonly apply: _angular_core.OutputEmitterRef<void>;
|
|
89
93
|
/**
|
|
90
|
-
* @description
|
|
94
|
+
* @description Accessible name of the group of controls.
|
|
95
|
+
* @default ""
|
|
96
|
+
*/
|
|
97
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
98
|
+
/**
|
|
99
|
+
* @description Id of the element that names the group of controls.
|
|
100
|
+
* @default ""
|
|
101
|
+
*/
|
|
102
|
+
readonly ariaLabelledBy: _angular_core.InputSignal<string>;
|
|
103
|
+
/**
|
|
104
|
+
* @description Emits when the Cancel button is clicked, after the controls go back to the current value.
|
|
91
105
|
* The `Cancel` button is only displayed when `showButtons` is set to true.
|
|
92
106
|
*/
|
|
93
107
|
readonly cancel: _angular_core.OutputEmitterRef<void>;
|
|
@@ -95,28 +109,34 @@ declare class ColorGradientComponent implements ColorGradientVariantInputs, Form
|
|
|
95
109
|
* @description Sets the disabled state of the color gradient.
|
|
96
110
|
* @default false
|
|
97
111
|
*/
|
|
98
|
-
readonly disabled: _angular_core.
|
|
112
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
99
113
|
/**
|
|
100
114
|
* @description Specifies the format of the color output.
|
|
101
115
|
* @default "hex"
|
|
102
116
|
*/
|
|
103
117
|
readonly format: _angular_core.InputSignal<ColorOutputFormat>;
|
|
104
118
|
/**
|
|
105
|
-
* @description Marks the color gradient as invalid. When bound to a signal form field via `[
|
|
106
|
-
* this is written by the
|
|
119
|
+
* @description Marks the color gradient as invalid. When bound to a signal form field via `[formField]`,
|
|
120
|
+
* this is written by the `FormField` directive.
|
|
107
121
|
* @default false
|
|
108
122
|
*/
|
|
109
|
-
readonly invalid: _angular_core.
|
|
123
|
+
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
110
124
|
/**
|
|
111
125
|
* @description Specifies whether the color picker should display the alpha slider.
|
|
112
126
|
* @default true
|
|
113
127
|
*/
|
|
114
|
-
readonly opacity: _angular_core.
|
|
128
|
+
readonly opacity: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
129
|
+
/**
|
|
130
|
+
* @description Prevents value changes while the control stays focusable and readable. When bound to a signal form
|
|
131
|
+
* field via `[formField]`, this is written by the `FormField` directive.
|
|
132
|
+
* @default false
|
|
133
|
+
*/
|
|
134
|
+
readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
115
135
|
/**
|
|
116
136
|
* @description Marks the color gradient as required for form validation.
|
|
117
137
|
* @default false
|
|
118
138
|
*/
|
|
119
|
-
readonly required: _angular_core.
|
|
139
|
+
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
120
140
|
/**
|
|
121
141
|
* @description Specifies the rounded variant of the color picker.
|
|
122
142
|
* @default "medium"
|
|
@@ -128,28 +148,28 @@ declare class ColorGradientComponent implements ColorGradientVariantInputs, Form
|
|
|
128
148
|
* When set to false, the color picker will not display the buttons and will emit the color value on change.
|
|
129
149
|
* @default true
|
|
130
150
|
*/
|
|
131
|
-
readonly showButtons: _angular_core.
|
|
151
|
+
readonly showButtons: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
132
152
|
/**
|
|
133
|
-
* @description Specifies whether the color picker should display the
|
|
153
|
+
* @description Specifies whether the color picker should display the channel inputs (RGB or HSV).
|
|
134
154
|
* @default true
|
|
135
155
|
*/
|
|
136
|
-
readonly
|
|
156
|
+
readonly showColorInputs: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
137
157
|
/**
|
|
138
|
-
* @description Specifies whether the color picker should display the
|
|
158
|
+
* @description Specifies whether the color picker should display the hex input.
|
|
139
159
|
* @default true
|
|
140
160
|
*/
|
|
141
|
-
readonly
|
|
161
|
+
readonly showHexInput: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
142
162
|
/**
|
|
143
|
-
* @description Emitted when the color gradient
|
|
163
|
+
* @description Emitted when focus leaves the color gradient. Moving between its own parts doesn't count.
|
|
144
164
|
* The `FormField` directive listens to this to mark the field as touched.
|
|
145
165
|
*/
|
|
146
166
|
readonly touch: _angular_core.OutputEmitterRef<void>;
|
|
147
167
|
/**
|
|
148
|
-
* @description Marks the color gradient as touched. When bound to a signal form field via `[
|
|
149
|
-
* this is written by the
|
|
168
|
+
* @description Marks the color gradient as touched. When bound to a signal form field via `[formField]`,
|
|
169
|
+
* this is written by the `FormField` directive.
|
|
150
170
|
* @default false
|
|
151
171
|
*/
|
|
152
|
-
readonly touched: _angular_core.
|
|
172
|
+
readonly touched: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
153
173
|
/**
|
|
154
174
|
* @description Two-way bindable current color value.
|
|
155
175
|
* When undefined, the component keeps its default internal color state (white, #ffffffff).
|
|
@@ -157,46 +177,52 @@ declare class ColorGradientComponent implements ColorGradientVariantInputs, Form
|
|
|
157
177
|
*/
|
|
158
178
|
readonly value: _angular_core.ModelSignal<string | null | undefined>;
|
|
159
179
|
constructor();
|
|
180
|
+
/**
|
|
181
|
+
* @description Moves focus to the saturation and value handle.
|
|
182
|
+
* @param options Options passed to the native `focus()` call, such as `preventScroll`.
|
|
183
|
+
*/
|
|
184
|
+
focus(options?: FocusOptions): void;
|
|
160
185
|
protected onAlphaChange(value: number | null): void;
|
|
161
186
|
protected onApply(): void;
|
|
162
187
|
protected onCancel(): void;
|
|
163
188
|
protected onClearClick(): void;
|
|
164
189
|
protected onCopyColorSelect(mode: "hex" | "rgb"): void;
|
|
190
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
165
191
|
protected onHexChange(value: string): void;
|
|
166
192
|
protected onHexInputBlur(): void;
|
|
167
193
|
protected onHexInputFocus(): void;
|
|
168
194
|
protected onHsvChange(value: number | null, channel: HSVChannel): void;
|
|
169
|
-
protected onHsvHandleBlur(): void;
|
|
170
195
|
protected onHsvHandleKeyDown(event: KeyboardEvent): void;
|
|
171
|
-
protected
|
|
196
|
+
protected onHueChange(value: number): void;
|
|
172
197
|
protected onPreviousColorKeyDown(event: KeyboardEvent, handler?: () => void): void;
|
|
173
198
|
protected onResetColorClick(): void;
|
|
174
199
|
protected onRgbChange(value: number | null, channel: RGBChannel): void;
|
|
175
|
-
protected onSliderBlur(): void;
|
|
176
200
|
protected onSwitchColorModeClick(): void;
|
|
177
|
-
private afterNextRender;
|
|
178
201
|
private clear;
|
|
202
|
+
private commitValue;
|
|
179
203
|
private createHsvInputList;
|
|
180
204
|
private createRgbInputList;
|
|
181
205
|
private emitValue;
|
|
182
|
-
private getPositionFromSaturation;
|
|
183
|
-
private getPositionFromValue;
|
|
184
|
-
private getSaturationFromPosition;
|
|
185
206
|
private getValidChannelValue;
|
|
186
|
-
private getValueFromPosition;
|
|
187
207
|
private loadColorFromString;
|
|
208
|
+
/**
|
|
209
|
+
* Shows a value in the controls, dropping any edit that wasn't applied.
|
|
210
|
+
*/
|
|
211
|
+
private loadValue;
|
|
212
|
+
private moveHandleToPointer;
|
|
213
|
+
/**
|
|
214
|
+
* Pressing anywhere in the area starts a drag. Capturing the pointer keeps the moves coming when it leaves the area,
|
|
215
|
+
* and the press itself mustn't take focus away from the handle.
|
|
216
|
+
*/
|
|
188
217
|
private setHsvRectPointerEvents;
|
|
189
|
-
private setSubscriptions;
|
|
190
218
|
private syncValue;
|
|
191
219
|
private updateHexInputValue;
|
|
192
|
-
private updateHsv;
|
|
193
|
-
private updateHsvRectPointerPosition;
|
|
194
220
|
private updateHsvValues;
|
|
195
221
|
private updateOtherNullChannels;
|
|
196
222
|
private updateRgb;
|
|
197
223
|
private updateRgbFromHsv;
|
|
198
224
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ColorGradientComponent, never>;
|
|
199
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ColorGradientComponent, "mona-color-gradient", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "opacity": { "alias": "opacity"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "showButtons": { "alias": "showButtons"; "required": false; "isSignal": true; }; "
|
|
225
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ColorGradientComponent, "mona-color-gradient", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "opacity": { "alias": "opacity"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "showButtons": { "alias": "showButtons"; "required": false; "isSignal": true; }; "showColorInputs": { "alias": "showColorInputs"; "required": false; "isSignal": true; }; "showHexInput": { "alias": "showHexInput"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "apply": "apply"; "cancel": "cancel"; "touch": "touch"; "value": "valueChange"; }, never, never, true, never>;
|
|
200
226
|
}
|
|
201
227
|
|
|
202
228
|
declare const COLOR_GRADIENT_DEFAULT_MESSAGES: MonaColorGradientMessages;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
|
|
2
2
|
import { MonaColorPaletteMessages } from '@nanahoshi/mona-ui/i18n';
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
|
-
import { Signal } from '@angular/core';
|
|
5
4
|
import { FormValueControl } from '@angular/forms/signals';
|
|
6
|
-
import { PaletteType } from '@nanahoshi/mona-ui/common';
|
|
7
|
-
import { VariantInputs, ColorScheme } from '@nanahoshi/mona-ui/internal';
|
|
5
|
+
import { PaletteType, ColorPaletteItem } from '@nanahoshi/mona-ui/common';
|
|
8
6
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
7
|
+
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
9
8
|
import { VariantProps } from 'class-variance-authority';
|
|
10
9
|
|
|
11
10
|
declare const colorPaletteBaseThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
@@ -19,25 +18,56 @@ type ColorPaletteItemVariantInput = VariantInputs<ColorPaletteItemVariantProps>;
|
|
|
19
18
|
type ColorPaletteVariantProps = ColorPaletteBaseVariantProps & ColorPaletteItemVariantProps;
|
|
20
19
|
type ColorPaletteVariantInput = ColorPaletteBaseVariantInput & ColorPaletteItemVariantInput;
|
|
21
20
|
|
|
21
|
+
interface PaletteTile {
|
|
22
|
+
readonly color: string;
|
|
23
|
+
readonly name: string | null;
|
|
24
|
+
}
|
|
25
|
+
interface PaletteGrid {
|
|
26
|
+
readonly columns: number;
|
|
27
|
+
readonly tiles: readonly PaletteTile[];
|
|
28
|
+
}
|
|
22
29
|
declare class ColorPaletteComponent implements ColorPaletteVariantInput, FormValueControl<string | null> {
|
|
23
30
|
#private;
|
|
24
|
-
protected readonly
|
|
25
|
-
protected readonly
|
|
26
|
-
protected readonly
|
|
27
|
-
protected readonly
|
|
28
|
-
protected readonly colorScheme: Signal<ColorScheme>;
|
|
31
|
+
protected readonly activeColorIndex: _angular_core.Signal<number>;
|
|
32
|
+
protected readonly baseClasses: _angular_core.Signal<string>;
|
|
33
|
+
protected readonly colorRows: _angular_core.Signal<PaletteTile[][]>;
|
|
34
|
+
protected readonly effectiveDisabled: _angular_core.Signal<boolean>;
|
|
29
35
|
protected readonly focusedColorIndex: _angular_core.WritableSignal<number>;
|
|
30
|
-
protected readonly
|
|
31
|
-
protected readonly
|
|
32
|
-
protected readonly
|
|
36
|
+
protected readonly grid: _angular_core.Signal<PaletteGrid>;
|
|
37
|
+
protected readonly invalidState: _angular_core.Signal<boolean>;
|
|
38
|
+
protected readonly isRtl: _angular_core.Signal<boolean>;
|
|
39
|
+
protected readonly labelledBy: _angular_core.Signal<string | null>;
|
|
40
|
+
protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaColorPaletteMessages>;
|
|
41
|
+
protected readonly paletteItemClasses: _angular_core.Signal<string>;
|
|
42
|
+
/**
|
|
43
|
+
* The first tile showing the value. Two spellings of a color count as the same color, so a value that went through
|
|
44
|
+
* a server or the color gradient keeps its selection, and a repeated color marks one tile only.
|
|
45
|
+
*/
|
|
46
|
+
protected readonly selectedIndex: _angular_core.Signal<number>;
|
|
47
|
+
protected readonly tileKeys: _angular_core.Signal<string[]>;
|
|
33
48
|
/**
|
|
34
49
|
* @description Accessible label for the color palette grid.
|
|
35
50
|
* @default ""
|
|
36
51
|
*/
|
|
37
52
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
38
53
|
/**
|
|
39
|
-
* @description
|
|
40
|
-
*
|
|
54
|
+
* @description Id of the element that names the color palette grid.
|
|
55
|
+
* @default ""
|
|
56
|
+
*/
|
|
57
|
+
readonly ariaLabelledBy: _angular_core.InputSignal<string>;
|
|
58
|
+
/**
|
|
59
|
+
* @description Whether activating the selected tile clears the value. A required palette never clears.
|
|
60
|
+
* @default true
|
|
61
|
+
*/
|
|
62
|
+
readonly clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
63
|
+
/**
|
|
64
|
+
* @description Emitted with the tile's color each time a tile is activated, also when it's already selected, which
|
|
65
|
+
* doesn't change `value`.
|
|
66
|
+
*/
|
|
67
|
+
readonly colorSelect: _angular_core.OutputEmitterRef<string>;
|
|
68
|
+
/**
|
|
69
|
+
* @description The number of columns in the color palette grid. Only applicable when using a custom palette. A
|
|
70
|
+
* value below 1 shows one column.
|
|
41
71
|
* @default 10
|
|
42
72
|
*/
|
|
43
73
|
readonly columns: _angular_core.InputSignal<number>;
|
|
@@ -45,43 +75,45 @@ declare class ColorPaletteComponent implements ColorPaletteVariantInput, FormVal
|
|
|
45
75
|
* @description Renders the component with reduced visual emphasis and removes pointer interaction.
|
|
46
76
|
* @default false
|
|
47
77
|
*/
|
|
48
|
-
readonly disabled: _angular_core.
|
|
78
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
49
79
|
/**
|
|
50
80
|
* @description Marks the color palette as invalid. When bound to a signal form field via `[formField]`,
|
|
51
81
|
* this is written by the `FormField` directive.
|
|
52
82
|
* @default false
|
|
53
83
|
*/
|
|
54
|
-
readonly invalid: _angular_core.
|
|
84
|
+
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
55
85
|
/**
|
|
56
86
|
* @description The palette to display — one of the built-in `"flat"`, `"material"`, or `"websafe"` schemes, or a
|
|
57
|
-
* custom iterable of color
|
|
87
|
+
* custom iterable of colors. A custom color is a CSS color string, or a `{ color, name }` item when it has a name
|
|
88
|
+
* of its own. An empty custom palette falls back to the flat scheme.
|
|
58
89
|
* @default []
|
|
59
90
|
*/
|
|
60
|
-
readonly palette: _angular_core.InputSignal<PaletteType | Iterable<string>>;
|
|
91
|
+
readonly palette: _angular_core.InputSignal<PaletteType | Iterable<string | ColorPaletteItem>>;
|
|
61
92
|
/**
|
|
62
93
|
* @description Prevents value changes while preserving the component's visual state. When bound to a signal
|
|
63
94
|
* form field via `[formField]`, this is written by the `FormField` directive.
|
|
64
95
|
* @default false
|
|
65
96
|
*/
|
|
66
|
-
readonly readonly: _angular_core.
|
|
97
|
+
readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
67
98
|
/**
|
|
68
99
|
* @description Sets whether the color palette is required. When bound to a signal form field via `[formField]`,
|
|
69
100
|
* this is written by the `FormField` directive.
|
|
70
101
|
* @default false
|
|
71
102
|
*/
|
|
72
|
-
readonly required: _angular_core.
|
|
103
|
+
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
73
104
|
/**
|
|
74
105
|
* @description Border-radius preset applied to the color palette items.
|
|
75
106
|
* @default "none"
|
|
76
107
|
*/
|
|
77
108
|
readonly rounded: _angular_core.InputSignal<"none" | "small" | "medium" | "large" | "full" | null | undefined>;
|
|
78
109
|
/**
|
|
79
|
-
* @description The size of each tile in the color palette grid.
|
|
80
|
-
*
|
|
110
|
+
* @description The size of each tile in the color palette grid, in pixels. Below 24, tiles miss the minimum target
|
|
111
|
+
* size of WCAG 2.5.8.
|
|
112
|
+
* @default 24
|
|
81
113
|
*/
|
|
82
114
|
readonly tileSize: _angular_core.InputSignal<number>;
|
|
83
115
|
/**
|
|
84
|
-
* @description Emitted when the color palette
|
|
116
|
+
* @description Emitted when focus leaves the color palette or a color is selected.
|
|
85
117
|
* The `FormField` directive listens to this to mark the field as touched.
|
|
86
118
|
*/
|
|
87
119
|
readonly touch: _angular_core.OutputEmitterRef<void>;
|
|
@@ -90,20 +122,26 @@ declare class ColorPaletteComponent implements ColorPaletteVariantInput, FormVal
|
|
|
90
122
|
* this is written by the `FormField` directive.
|
|
91
123
|
* @default false
|
|
92
124
|
*/
|
|
93
|
-
readonly touched: _angular_core.
|
|
125
|
+
readonly touched: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
94
126
|
/**
|
|
95
127
|
* @description Two-way bindable current color value.
|
|
96
128
|
* @default null
|
|
97
129
|
*/
|
|
98
130
|
readonly value: _angular_core.ModelSignal<string | null>;
|
|
99
|
-
|
|
100
|
-
|
|
131
|
+
/**
|
|
132
|
+
* @description Moves focus to the palette's active tile.
|
|
133
|
+
* @param options Options passed to the native `focus()` call, such as `preventScroll`.
|
|
134
|
+
*/
|
|
135
|
+
focus(options?: FocusOptions): void;
|
|
101
136
|
protected onColorFocus(index: number): void;
|
|
102
|
-
protected onColorSelect(
|
|
137
|
+
protected onColorSelect(index: number): void;
|
|
138
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
103
139
|
protected onKeyDown(event: KeyboardEvent, colorIndex: number): void;
|
|
140
|
+
private focusColorTile;
|
|
104
141
|
private getColorScheme;
|
|
142
|
+
private gridFromScheme;
|
|
105
143
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ColorPaletteComponent, never>;
|
|
106
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ColorPaletteComponent, "mona-color-palette", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "palette": { "alias": "palette"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "tileSize": { "alias": "tileSize"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "touch": "touch"; "value": "valueChange"; }, never, never, true, never>;
|
|
144
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ColorPaletteComponent, "mona-color-palette", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "palette": { "alias": "palette"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "tileSize": { "alias": "tileSize"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "colorSelect": "colorSelect"; "touch": "touch"; "value": "valueChange"; }, never, never, true, never>;
|
|
107
145
|
}
|
|
108
146
|
|
|
109
147
|
declare const COLOR_PALETTE_DEFAULT_MESSAGES: MonaColorPaletteMessages;
|
|
@@ -3,7 +3,7 @@ import { OnInit, Signal, TemplateRef } from '@angular/core';
|
|
|
3
3
|
import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
|
|
4
4
|
import { MonaColorPickerMessages } from '@nanahoshi/mona-ui/i18n';
|
|
5
5
|
import { FormValueControl } from '@angular/forms/signals';
|
|
6
|
-
import { PaletteType } from '@nanahoshi/mona-ui/common';
|
|
6
|
+
import { ColorPaletteItem, ColorOutputFormat, PaletteType } from '@nanahoshi/mona-ui/common';
|
|
7
7
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
8
8
|
import { VariantProps } from 'class-variance-authority';
|
|
9
9
|
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
@@ -30,25 +30,35 @@ declare class ColorPickerComponent implements OnInit, ColorPickerVariantInput, F
|
|
|
30
30
|
#private;
|
|
31
31
|
protected readonly baseClasses: Signal<string>;
|
|
32
32
|
protected readonly colorClasses: Signal<string>;
|
|
33
|
+
protected readonly effectiveDisabled: Signal<boolean>;
|
|
33
34
|
protected readonly expanded: Signal<boolean>;
|
|
34
|
-
protected readonly gradientPopupClasses = "\n [background-color:var(--mona-effect-overlay-background-color,var(--color-surface-overlay))]\n \n [background-image:var(--mona-effect-overlay-background-image,none)]\n [backdrop-filter:var(--mona-effect-overlay-backdrop-filter,none)]\n [-webkit-backdrop-filter:var(--mona-effect-overlay-backdrop-filter,none)]\n\n border border-border shadow-(--shadow-overlay)";
|
|
35
|
+
protected readonly gradientPopupClasses = "\n [background-color:var(--mona-effect-overlay-background-color,var(--color-surface-overlay))]\n \n [background-image:var(--mona-effect-overlay-background-image,none)]\n [backdrop-filter:var(--mona-effect-overlay-backdrop-filter,none)]\n [-webkit-backdrop-filter:var(--mona-effect-overlay-backdrop-filter,none)]\n\n border border-border shadow-(--shadow-overlay) outline-none focus-visible:outline-hidden";
|
|
35
36
|
protected readonly invalidState: Signal<boolean>;
|
|
37
|
+
protected readonly labelledBy: Signal<string | null>;
|
|
36
38
|
protected readonly messages: Signal<_nanahoshi_mona_ui_i18n.MonaColorPickerMessages>;
|
|
37
|
-
protected readonly
|
|
39
|
+
protected readonly paletteOption: Signal<string | readonly (string | ColorPaletteItem)[]>;
|
|
40
|
+
protected readonly palettePopupClasses = "flex flex-col p-0.5 max-w-[calc(100vw-1rem)] overflow-auto \n [background-color:var(--mona-effect-overlay-background-color,var(--color-surface-overlay))]\n \n [background-image:var(--mona-effect-overlay-background-image,none)]\n [backdrop-filter:var(--mona-effect-overlay-backdrop-filter,none)]\n [-webkit-backdrop-filter:var(--mona-effect-overlay-backdrop-filter,none)]\n\n border border-border shadow-(--shadow-overlay) outline-none focus-visible:outline-hidden";
|
|
38
41
|
protected readonly popupId: string;
|
|
39
42
|
protected readonly popupTemplate: Signal<TemplateRef<void>>;
|
|
40
43
|
protected readonly valueTemplate: Signal<TemplateRef<any> | undefined>;
|
|
44
|
+
/** What assistive technology reads as the current color: its name when the palette has one, or the value itself. */
|
|
45
|
+
protected readonly valueText: Signal<string>;
|
|
41
46
|
/**
|
|
42
47
|
* @description Accessible label for the color picker combobox.
|
|
43
48
|
* @default ""
|
|
44
49
|
*/
|
|
45
50
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
51
|
+
/**
|
|
52
|
+
* @description Id of the element that names the color picker.
|
|
53
|
+
* @default ""
|
|
54
|
+
*/
|
|
55
|
+
readonly ariaLabelledBy: _angular_core.InputSignal<string>;
|
|
46
56
|
/**
|
|
47
57
|
* @description Whether to close the color picker when a color is selected.
|
|
48
58
|
* Only applies when the view is set to "palette".
|
|
49
59
|
* @default true
|
|
50
60
|
*/
|
|
51
|
-
readonly closeOnSelect: _angular_core.
|
|
61
|
+
readonly closeOnSelect: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
52
62
|
/**
|
|
53
63
|
* @description The number of columns to display in the color palette.
|
|
54
64
|
* Only applies when the view is set to "palette" and the palette is a custom array of colors.
|
|
@@ -59,56 +69,74 @@ declare class ColorPickerComponent implements OnInit, ColorPickerVariantInput, F
|
|
|
59
69
|
* @description Renders the component with reduced visual emphasis and removes pointer interaction.
|
|
60
70
|
* @default false
|
|
61
71
|
*/
|
|
62
|
-
readonly disabled: _angular_core.
|
|
72
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
73
|
+
/**
|
|
74
|
+
* @description The format of the value the gradient view writes. Only applies when the view is set to "gradient".
|
|
75
|
+
* @default "hex"
|
|
76
|
+
*/
|
|
77
|
+
readonly format: _angular_core.InputSignal<ColorOutputFormat>;
|
|
63
78
|
/**
|
|
64
79
|
* @description Marks the color picker as invalid. When bound to a signal form field via `[formField]`,
|
|
65
80
|
* this is written by the `FormField` directive.
|
|
66
81
|
* @default false
|
|
67
82
|
*/
|
|
68
|
-
readonly invalid: _angular_core.
|
|
83
|
+
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
69
84
|
/**
|
|
70
85
|
* @description Whether to display the opacity slider.
|
|
71
86
|
* Only applies when the view is set to "gradient".
|
|
72
87
|
* @default true
|
|
73
88
|
*/
|
|
74
|
-
readonly opacity: _angular_core.
|
|
89
|
+
readonly opacity: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
75
90
|
/**
|
|
76
91
|
* @description The type of color palette to use.
|
|
77
92
|
* This can be a predefined palette type like "flat", "material", or "websafe",
|
|
78
|
-
* or a custom iterable of
|
|
93
|
+
* or a custom iterable of CSS color strings or `{ color, name }` items.
|
|
79
94
|
* @default "flat"
|
|
80
95
|
*/
|
|
81
|
-
readonly palette: _angular_core.InputSignal<Iterable<string> | PaletteType>;
|
|
96
|
+
readonly palette: _angular_core.InputSignal<Iterable<string | ColorPaletteItem> | PaletteType>;
|
|
82
97
|
/**
|
|
83
98
|
* @description Prevents value changes while preserving the component's visual state. When bound to a signal
|
|
84
99
|
* form field via `[formField]`, this is written by the `FormField` directive.
|
|
85
100
|
* @default false
|
|
86
101
|
*/
|
|
87
|
-
readonly readonly: _angular_core.
|
|
102
|
+
readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
88
103
|
/**
|
|
89
104
|
* @description Sets whether the color picker is required. When bound to a signal form field via `[formField]`,
|
|
90
105
|
* this is written by the `FormField` directive.
|
|
91
106
|
* @default false
|
|
92
107
|
*/
|
|
93
|
-
readonly required: _angular_core.
|
|
108
|
+
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
94
109
|
/**
|
|
95
110
|
* @description Border-radius preset applied to the color picker.
|
|
96
111
|
* @default "medium"
|
|
97
112
|
*/
|
|
98
113
|
readonly rounded: _angular_core.InputSignal<"none" | "small" | "medium" | "large" | "full" | null | undefined>;
|
|
114
|
+
/**
|
|
115
|
+
* @description Whether the gradient view has Apply and Cancel buttons. Without them, each change writes the value
|
|
116
|
+
* at once. Only applies when the view is set to "gradient".
|
|
117
|
+
* @default true
|
|
118
|
+
*/
|
|
119
|
+
readonly showButtons: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
99
120
|
/**
|
|
100
121
|
* @description Whether to show the clear button to reset the color.
|
|
101
122
|
* This is only applicable when the view is set to "palette".
|
|
102
123
|
* @default false
|
|
103
124
|
*/
|
|
104
|
-
readonly showClearButton: _angular_core.
|
|
125
|
+
readonly showClearButton: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
105
126
|
/**
|
|
106
127
|
* @description Size preset controlling the color picker's dimensions.
|
|
107
128
|
* @default "medium"
|
|
108
129
|
*/
|
|
109
130
|
readonly size: _angular_core.InputSignal<"small" | "medium" | "large" | null | undefined>;
|
|
110
131
|
/**
|
|
111
|
-
* @description
|
|
132
|
+
* @description The size of each palette tile, in pixels. Only applies when the view is set to "palette". Below 24,
|
|
133
|
+
* tiles miss the minimum target size of WCAG 2.5.8.
|
|
134
|
+
* @default 24
|
|
135
|
+
*/
|
|
136
|
+
readonly tileSize: _angular_core.InputSignal<number>;
|
|
137
|
+
/**
|
|
138
|
+
* @description Emitted when focus leaves the color picker or its popup closes. A color selected with
|
|
139
|
+
* `closeOnSelect` off doesn't emit it until then.
|
|
112
140
|
* The `FormField` directive listens to this to mark the field as touched.
|
|
113
141
|
*/
|
|
114
142
|
readonly touch: _angular_core.OutputEmitterRef<void>;
|
|
@@ -117,7 +145,7 @@ declare class ColorPickerComponent implements OnInit, ColorPickerVariantInput, F
|
|
|
117
145
|
* this is written by the `FormField` directive.
|
|
118
146
|
* @default false
|
|
119
147
|
*/
|
|
120
|
-
readonly touched: _angular_core.
|
|
148
|
+
readonly touched: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
121
149
|
/**
|
|
122
150
|
* @description Two-way bindable current color value.
|
|
123
151
|
* @default null
|
|
@@ -129,35 +157,48 @@ declare class ColorPickerComponent implements OnInit, ColorPickerVariantInput, F
|
|
|
129
157
|
* @default "gradient"
|
|
130
158
|
*/
|
|
131
159
|
readonly view: _angular_core.InputSignal<ColorPickerView>;
|
|
160
|
+
constructor();
|
|
161
|
+
/**
|
|
162
|
+
* @description Moves focus to the color picker.
|
|
163
|
+
* @param options Options passed to the native `focus()` call, such as `preventScroll`.
|
|
164
|
+
*/
|
|
165
|
+
focus(options?: FocusOptions): void;
|
|
132
166
|
ngOnInit(): void;
|
|
133
167
|
protected onClearClick(): void;
|
|
134
168
|
protected onColorGradientApply(): void;
|
|
135
169
|
protected onColorGradientCancel(): void;
|
|
136
|
-
protected onColorGradientTouch(): void;
|
|
137
170
|
protected onColorGradientValueChange(value: string | null | undefined): void;
|
|
138
|
-
protected onColorPaletteTouch(): void;
|
|
139
171
|
protected onColorPaletteValueChange(value: string | null): void;
|
|
140
|
-
protected
|
|
172
|
+
protected onPaletteColorSelect(): void;
|
|
141
173
|
protected open(): void;
|
|
142
174
|
private close;
|
|
143
|
-
|
|
175
|
+
/**
|
|
176
|
+
* Opens on the selected swatch, or the first one, in the palette view, and on the saturation and value handle in the
|
|
177
|
+
* gradient view.
|
|
178
|
+
*/
|
|
144
179
|
private focusPopupContent;
|
|
145
180
|
private setEventListeners;
|
|
146
181
|
private setKeyboardEventListeners;
|
|
147
182
|
private setupPopupKeyboardHandling;
|
|
183
|
+
/**
|
|
184
|
+
* The popup isn't modal, so Tab walks through its controls, and going past either end closes it. Focus then returns
|
|
185
|
+
* to the picker, and the next Tab continues down the page.
|
|
186
|
+
*/
|
|
187
|
+
private tabLeavesPopup;
|
|
148
188
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ColorPickerComponent, never>;
|
|
149
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ColorPickerComponent, "mona-color-picker", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "opacity": { "alias": "opacity"; "required": false; "isSignal": true; }; "palette": { "alias": "palette"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; }, { "touch": "touch"; "value": "valueChange"; }, ["valueTemplate"], never, true, never>;
|
|
189
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ColorPickerComponent, "mona-color-picker", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "opacity": { "alias": "opacity"; "required": false; "isSignal": true; }; "palette": { "alias": "palette"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "showButtons": { "alias": "showButtons"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "tileSize": { "alias": "tileSize"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; }, { "touch": "touch"; "value": "valueChange"; }, ["valueTemplate"], never, true, never>;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
interface ColorPickerValueTemplateContext {
|
|
193
|
+
$implicit: string | null;
|
|
150
194
|
}
|
|
151
195
|
|
|
152
196
|
declare class ColorPickerValueTemplateDirective {
|
|
197
|
+
static ngTemplateContextGuard(_directive: ColorPickerValueTemplateDirective, _context: unknown): _context is ColorPickerValueTemplateContext;
|
|
153
198
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ColorPickerValueTemplateDirective, never>;
|
|
154
199
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ColorPickerValueTemplateDirective, "ng-template[monaColorPickerValueTemplate]", never, {}, {}, never, never, true, never>;
|
|
155
200
|
}
|
|
156
201
|
|
|
157
|
-
interface ColorPickerValueTemplateContext {
|
|
158
|
-
$implicit: string;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
202
|
declare const COLOR_PICKER_DEFAULT_MESSAGES: MonaColorPickerMessages;
|
|
162
203
|
|
|
163
204
|
export { COLOR_PICKER_DEFAULT_MESSAGES, ColorPickerComponent, ColorPickerValueTemplateDirective };
|
|
@@ -41,6 +41,7 @@ declare class ComboBoxComponent<TData = unknown, TValue = TData> implements Form
|
|
|
41
41
|
protected readonly clearButtonVisible: _angular_core.Signal<boolean>;
|
|
42
42
|
protected readonly comboBoxValue: _angular_core.WritableSignal<string>;
|
|
43
43
|
protected readonly comboBoxValue$: Subject<string | null>;
|
|
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>;
|