@nanahoshi/mona-ui 0.45.1 → 0.47.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/THIRD_PARTY_NOTICES.md +34 -0
- package/docs/api/button.json +1 -1
- package/docs/api/button.md +1 -0
- package/docs/api/check-box.json +1 -1
- package/docs/api/check-box.md +1 -0
- package/docs/api/chip.json +1 -1
- package/docs/api/chip.md +1 -0
- package/docs/api/common.json +1 -1
- package/docs/api/common.md +1 -1
- package/docs/api/index.json +1 -1
- package/docs/api/radio-button.json +1 -1
- package/docs/api/radio-button.md +1 -0
- package/docs/api/ripple.json +1 -0
- package/docs/api/ripple.md +75 -0
- package/docs/api/sidebar.json +1 -1
- package/docs/api/sidebar.md +1 -0
- package/docs/api/switch.json +1 -1
- package/docs/api/switch.md +1 -0
- package/docs/api/theme.json +1 -1
- package/docs/api/theme.md +14 -6
- package/docs/installation.md +1 -1
- package/docs/manifest.json +1 -1
- package/docs/ripple.md +360 -0
- package/docs/sidebar-menus.md +8 -0
- package/docs/theming-built-in-themes.md +25 -12
- package/docs/theming-custom-themes.md +19 -0
- package/docs/theming.md +2 -1
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +6 -6
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-button.mjs +20 -2
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +15 -7
- package/fesm2022/nanahoshi-mona-ui-chat.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +36 -11
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +13 -0
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +5 -5
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +4 -4
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +5 -5
- package/fesm2022/nanahoshi-mona-ui-date-range-picker.mjs +5 -5
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +5 -5
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +4 -4
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +3 -3
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +9 -1
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +9 -3
- package/fesm2022/nanahoshi-mona-ui-masked-text-box.mjs +3 -3
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +12 -4
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +4 -4
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +4 -4
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +3 -3
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +105 -19
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +33 -9
- package/fesm2022/nanahoshi-mona-ui-ripple.mjs +196 -0
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +10 -4
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +21 -1
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +4 -4
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +5 -1
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +31 -6
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +7 -1
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +3 -3
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +6 -6
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +295 -51
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +5 -5
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1 -1
- package/llms.txt +4 -2
- package/package.json +5 -1
- package/ripple/package.json +5 -0
- package/types/nanahoshi-mona-ui-button.d.ts +8 -1
- package/types/nanahoshi-mona-ui-calendar.d.ts +1 -0
- package/types/nanahoshi-mona-ui-chat.d.ts +1 -1
- package/types/nanahoshi-mona-ui-check-box.d.ts +10 -1
- package/types/nanahoshi-mona-ui-chip.d.ts +8 -1
- package/types/nanahoshi-mona-ui-radio-button.d.ts +9 -1
- package/types/nanahoshi-mona-ui-ripple.d.ts +72 -0
- package/types/nanahoshi-mona-ui-sidebar.d.ts +12 -0
- package/types/nanahoshi-mona-ui-switch.d.ts +10 -2
- package/types/nanahoshi-mona-ui-theme.d.ts +71 -1
|
@@ -10,6 +10,8 @@ import { cva } from "class-variance-authority";
|
|
|
10
10
|
import { takeUntilDestroyed, toObservable } from "@angular/core/rxjs-interop";
|
|
11
11
|
import { createElementControlId, injectEffectiveDisabled, rxTimeout, themeRaisedBackdropClasses } from "@nanahoshi/mona-ui/internal";
|
|
12
12
|
import { fromEvent, skip } from "rxjs";
|
|
13
|
+
import * as i1 from "@nanahoshi/mona-ui/ripple";
|
|
14
|
+
import { RippleDirective } from "@nanahoshi/mona-ui/ripple";
|
|
13
15
|
import { firstOrDefault, index, lastOrDefault, range, select } from "@mirei/ts-collections";
|
|
14
16
|
import { CalendarService } from "@nanahoshi/mona-ui/date-input";
|
|
15
17
|
import { DateTime } from "luxon";
|
|
@@ -144,7 +146,7 @@ const calendarBaseThemeVariants = cva(`
|
|
|
144
146
|
bg-(--mona-calendar-background) ${themeRaisedBackdropClasses} text-foreground
|
|
145
147
|
border border-border shadow-(--mona-calendar-shadow)
|
|
146
148
|
data-[invalid='true']:border-error
|
|
147
|
-
data-[invalid='true']:ring-
|
|
149
|
+
data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
|
|
148
150
|
`, { variants: {
|
|
149
151
|
disabled: { true: "pointer-events-none cursor-not-allowed opacity-50" },
|
|
150
152
|
readonly: { true: "pointer-events-none" },
|
|
@@ -166,12 +168,12 @@ const calendarHeaderThemeVariants = cva(`
|
|
|
166
168
|
[&>button:nth-of-type(4)]:rounded-es-none
|
|
167
169
|
`);
|
|
168
170
|
const calendarMonthViewDayThemeVariants = cva(`
|
|
169
|
-
cursor-pointer
|
|
171
|
+
relative cursor-pointer
|
|
170
172
|
hover:bg-hover active:bg-active
|
|
171
173
|
`, {
|
|
172
174
|
variants: {
|
|
173
175
|
disabled: { true: "pointer-events-none cursor-not-allowed text-disabled-foreground" },
|
|
174
|
-
focused: { true: "bg-hover outline-none focus-visible:outline-hidden ring-
|
|
176
|
+
focused: { true: "bg-hover outline-none focus-visible:outline-hidden ring-(length:--mona-focus-ring-width,2px) ring-inset ring-focus-indicator/(--mona-focus-ring-opacity,35%)" },
|
|
175
177
|
outside: { true: "text-muted-foreground" },
|
|
176
178
|
rangeMiddle: { true: `
|
|
177
179
|
bg-(--color-selected) text-(--color-selected-foreground)
|
|
@@ -217,10 +219,10 @@ const calendarYearViewGridThemeVariants = cva(`
|
|
|
217
219
|
[&>div]:items-center [&>div]:justify-center
|
|
218
220
|
`);
|
|
219
221
|
const calendarYearViewCellThemeVariants = cva(`
|
|
220
|
-
cursor-pointer py-2
|
|
222
|
+
relative cursor-pointer py-2
|
|
221
223
|
hover:bg-hover active:bg-active
|
|
222
224
|
`, { variants: {
|
|
223
|
-
focused: { true: "bg-hover outline-none focus-visible:outline-hidden ring-
|
|
225
|
+
focused: { true: "bg-hover outline-none focus-visible:outline-hidden ring-(length:--mona-focus-ring-width,2px) ring-inset ring-focus-indicator/(--mona-focus-ring-opacity,35%)" },
|
|
224
226
|
rounded: {
|
|
225
227
|
none: "rounded-none",
|
|
226
228
|
small: "rounded-sm",
|
|
@@ -235,10 +237,10 @@ const calendarDecadeViewGridThemeVariants = cva(`
|
|
|
235
237
|
[&>div]:items-center [&>div]:justify-center
|
|
236
238
|
`);
|
|
237
239
|
const calendarDecadeViewCellThemeVariants = cva(`
|
|
238
|
-
cursor-pointer py-2
|
|
240
|
+
relative cursor-pointer py-2
|
|
239
241
|
hover:bg-hover active:bg-active
|
|
240
242
|
`, { variants: {
|
|
241
|
-
focused: { true: "bg-hover outline-none focus-visible:outline-hidden ring-
|
|
243
|
+
focused: { true: "bg-hover outline-none focus-visible:outline-hidden ring-(length:--mona-focus-ring-width,2px) ring-inset ring-focus-indicator/(--mona-focus-ring-opacity,35%)" },
|
|
242
244
|
rounded: {
|
|
243
245
|
none: "rounded-none",
|
|
244
246
|
small: "rounded-sm",
|
|
@@ -344,6 +346,7 @@ var DecadeYearDirective = class DecadeYearDirective {
|
|
|
344
346
|
"class": "baseClass()"
|
|
345
347
|
}
|
|
346
348
|
},
|
|
349
|
+
hostDirectives: [{ directive: i1.RippleDirective }],
|
|
347
350
|
ngImport: i0
|
|
348
351
|
});
|
|
349
352
|
}
|
|
@@ -357,6 +360,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
357
360
|
type: Directive,
|
|
358
361
|
args: [{
|
|
359
362
|
selector: "[monaDecadeYear]",
|
|
363
|
+
hostDirectives: [RippleDirective],
|
|
360
364
|
host: {
|
|
361
365
|
"[attr.tabindex]": "focused() && !disabled() ? 0 : -1",
|
|
362
366
|
"[attr.aria-current]": "isCurrent() ? 'true' : null",
|
|
@@ -632,6 +636,7 @@ var MonthDayDirective = class MonthDayDirective {
|
|
|
632
636
|
"class": "baseClass()"
|
|
633
637
|
}
|
|
634
638
|
},
|
|
639
|
+
hostDirectives: [{ directive: i1.RippleDirective }],
|
|
635
640
|
ngImport: i0
|
|
636
641
|
});
|
|
637
642
|
}
|
|
@@ -645,6 +650,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
645
650
|
type: Directive,
|
|
646
651
|
args: [{
|
|
647
652
|
selector: "[monaMonthDay]",
|
|
653
|
+
hostDirectives: [RippleDirective],
|
|
648
654
|
host: {
|
|
649
655
|
"[attr.tabindex]": "focused() && !disabled() ? 0 : -1",
|
|
650
656
|
"[attr.aria-current]": "isToday() ? 'date' : null",
|
|
@@ -857,6 +863,7 @@ var YearMonthDirective = class YearMonthDirective {
|
|
|
857
863
|
"class": "baseClass()"
|
|
858
864
|
}
|
|
859
865
|
},
|
|
866
|
+
hostDirectives: [{ directive: i1.RippleDirective }],
|
|
860
867
|
ngImport: i0
|
|
861
868
|
});
|
|
862
869
|
}
|
|
@@ -870,6 +877,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
870
877
|
type: Directive,
|
|
871
878
|
args: [{
|
|
872
879
|
selector: "[monaYearMonth]",
|
|
880
|
+
hostDirectives: [RippleDirective],
|
|
873
881
|
host: {
|
|
874
882
|
"[attr.tabindex]": "focused() && !disabled() ? 0 : -1",
|
|
875
883
|
"[attr.aria-current]": "isCurrent() ? 'date' : null",
|
|
@@ -225,7 +225,7 @@ const CHAT_FIELD_CLASSES = `
|
|
|
225
225
|
${themeControlSurfaceClasses}
|
|
226
226
|
border border-input-border shadow-(--shadow-control)
|
|
227
227
|
transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out
|
|
228
|
-
focus-within:border-focus-indicator focus-within:ring-
|
|
228
|
+
focus-within:border-focus-indicator focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
|
|
229
229
|
data-[disabled]:cursor-not-allowed data-[disabled]:border-disabled-border data-[disabled]:bg-disabled-background
|
|
230
230
|
data-[disabled]:shadow-none
|
|
231
231
|
`;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from "@angular/common";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import { Component, Directive, booleanAttribute, computed, input, linkedSignal, model, output, viewChild } from "@angular/core";
|
|
3
|
+
import { Component, Directive, booleanAttribute, computed, inject, input, linkedSignal, model, output, viewChild } from "@angular/core";
|
|
4
4
|
import { twMerge } from "tailwind-merge";
|
|
5
5
|
import { cva } from "class-variance-authority";
|
|
6
6
|
import { createElementControlId, injectEffectiveDisabled, injectLabelAssociation, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
7
|
+
import * as i1 from "@nanahoshi/mona-ui/ripple";
|
|
8
|
+
import { RippleDirective } from "@nanahoshi/mona-ui/ripple";
|
|
7
9
|
const checkboxInputThemeVariants = cva(`sr-only appearance-none outline-none focus-visible:outline-hidden peer`);
|
|
8
10
|
const checkmarkThemeVariants = cva(`
|
|
9
11
|
relative flex items-center justify-center
|
|
10
12
|
h-4.5 w-4.5 ps-0.25
|
|
11
|
-
cursor-pointer
|
|
13
|
+
cursor-pointer
|
|
12
14
|
${themeControlSurfaceClasses}
|
|
13
15
|
border border-input-border
|
|
14
16
|
outline-none focus-visible:outline-hidden
|
|
@@ -20,13 +22,13 @@ const checkmarkThemeVariants = cva(`
|
|
|
20
22
|
peer-indeterminate:border-(--color-selected-border) peer-indeterminate:bg-primary peer-indeterminate:text-primary-foreground
|
|
21
23
|
|
|
22
24
|
peer-focus-visible:border-focus-indicator
|
|
23
|
-
peer-focus-visible:ring-
|
|
25
|
+
peer-focus-visible:ring-(length:--mona-focus-ring-width,2px) peer-focus-visible:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
|
|
24
26
|
peer-focus-visible:outline-hidden
|
|
25
27
|
|
|
26
28
|
data-[invalid='true']:border-error
|
|
27
|
-
data-[invalid='true']:ring-
|
|
29
|
+
data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
|
|
28
30
|
data-[invalid='true']:peer-focus-visible:border-error
|
|
29
|
-
data-[invalid='true']:peer-focus-visible:ring-error/35
|
|
31
|
+
data-[invalid='true']:peer-focus-visible:ring-error/(--mona-focus-ring-opacity,35%)
|
|
30
32
|
|
|
31
33
|
peer-indeterminate:after:absolute
|
|
32
34
|
peer-indeterminate:after:inset-0
|
|
@@ -72,7 +74,7 @@ const checkboxDirectiveThemeVariants = cva(`
|
|
|
72
74
|
indeterminate:border-(--color-selected-border) indeterminate:bg-primary indeterminate:text-primary-foreground
|
|
73
75
|
|
|
74
76
|
focus-visible:border-focus-indicator
|
|
75
|
-
focus-visible:ring-
|
|
77
|
+
focus-visible:ring-(length:--mona-focus-ring-width,2px) focus-visible:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
|
|
76
78
|
|
|
77
79
|
checked:after:absolute
|
|
78
80
|
checked:after:inset-[1px_0_0_1px]
|
|
@@ -93,9 +95,9 @@ const checkboxDirectiveThemeVariants = cva(`
|
|
|
93
95
|
indeterminate:after:[mask-size:contain]
|
|
94
96
|
|
|
95
97
|
data-[invalid='true']:border-error
|
|
96
|
-
data-[invalid='true']:ring-
|
|
98
|
+
data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
|
|
97
99
|
data-[invalid='true']:focus-visible:border-error
|
|
98
|
-
data-[invalid='true']:focus-visible:ring-error/35
|
|
100
|
+
data-[invalid='true']:focus-visible:ring-error/(--mona-focus-ring-opacity,35%)
|
|
99
101
|
`, { variants: { rounded: {
|
|
100
102
|
full: "rounded-full",
|
|
101
103
|
large: "rounded-lg",
|
|
@@ -104,6 +106,7 @@ const checkboxDirectiveThemeVariants = cva(`
|
|
|
104
106
|
small: "rounded-sm"
|
|
105
107
|
} } });
|
|
106
108
|
var CheckBoxComponent = class CheckBoxComponent {
|
|
109
|
+
#label;
|
|
107
110
|
constructor() {
|
|
108
111
|
this.#label = injectLabelAssociation({
|
|
109
112
|
ariaDescribedBy: () => this.ariaDescribedBy(),
|
|
@@ -119,6 +122,7 @@ var CheckBoxComponent = class CheckBoxComponent {
|
|
|
119
122
|
const rounded = this.rounded();
|
|
120
123
|
return checkmarkThemeVariants({ rounded });
|
|
121
124
|
}, ...ngDevMode ? [{ debugName: "checkMarkClasses" }] : /* istanbul ignore next */ []);
|
|
125
|
+
this.checkMarkRef = viewChild("checkMark", ...ngDevMode ? [{ debugName: "checkMarkRef" }] : /* istanbul ignore next */ []);
|
|
122
126
|
this.containerLabelClasses = computed(() => {
|
|
123
127
|
const labelSize = this.labelSize();
|
|
124
128
|
const classes = this.userClass();
|
|
@@ -184,8 +188,10 @@ var CheckBoxComponent = class CheckBoxComponent {
|
|
|
184
188
|
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
185
189
|
alias: "class"
|
|
186
190
|
});
|
|
191
|
+
const ripple = inject(RippleDirective, { self: true });
|
|
192
|
+
ripple.setHostDisabled(computed(() => this.effectiveDisabled() || this.readonly()));
|
|
193
|
+
ripple.setHalo(() => this.checkMarkRef()?.nativeElement);
|
|
187
194
|
}
|
|
188
|
-
#label;
|
|
189
195
|
activateFromLabel() {
|
|
190
196
|
const input = this.inputRef().nativeElement;
|
|
191
197
|
input.focus();
|
|
@@ -378,14 +384,24 @@ var CheckBoxComponent = class CheckBoxComponent {
|
|
|
378
384
|
"attr.data-indeterminate": "indeterminateState()"
|
|
379
385
|
} },
|
|
380
386
|
viewQueries: [{
|
|
387
|
+
propertyName: "checkMarkRef",
|
|
388
|
+
first: true,
|
|
389
|
+
predicate: ["checkMark"],
|
|
390
|
+
descendants: true,
|
|
391
|
+
isSignal: true
|
|
392
|
+
}, {
|
|
381
393
|
propertyName: "inputRef",
|
|
382
394
|
first: true,
|
|
383
395
|
predicate: ["checkBox"],
|
|
384
396
|
descendants: true,
|
|
385
397
|
isSignal: true
|
|
386
398
|
}],
|
|
399
|
+
hostDirectives: [{
|
|
400
|
+
directive: i1.RippleDirective,
|
|
401
|
+
inputs: ["monaRippleDisabled", "monaRippleDisabled"]
|
|
402
|
+
}],
|
|
387
403
|
ngImport: i0,
|
|
388
|
-
template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"readonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n <input\n type=\"checkbox\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"effectiveDisabled()\"\n [indeterminate]=\"indeterminateState()\"\n [required]=\"required()\"\n [checked]=\"checked()\"\n [tabindex]=\"effectiveDisabled() ? -1 : tabIndex()\"\n [class]=\"checkBoxClasses()\"\n [attr.aria-checked]=\"indeterminateState() ? 'mixed' : null\"\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #checkBox />\n\n <span [class]=\"checkMarkClasses()\" [attr.data-invalid]=\"invalidState() || null\" aria-hidden=\"true\">\n @if (checked() && !indeterminateState()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-check stroke-primary-foreground forced-colors:stroke-[CanvasText]\">\n <path d=\"M18 6 9 17l-5-5\" />\n </svg>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n",
|
|
404
|
+
template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"readonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n <input\n type=\"checkbox\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"effectiveDisabled()\"\n [indeterminate]=\"indeterminateState()\"\n [required]=\"required()\"\n [checked]=\"checked()\"\n [tabindex]=\"effectiveDisabled() ? -1 : tabIndex()\"\n [class]=\"checkBoxClasses()\"\n [attr.aria-checked]=\"indeterminateState() ? 'mixed' : null\"\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #checkBox />\n\n <span [class]=\"checkMarkClasses()\" [attr.data-invalid]=\"invalidState() || null\" aria-hidden=\"true\" #checkMark>\n @if (checked() && !indeterminateState()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-check stroke-primary-foreground forced-colors:stroke-[CanvasText]\">\n <path d=\"M18 6 9 17l-5-5\" />\n </svg>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n",
|
|
389
405
|
dependencies: [{
|
|
390
406
|
kind: "directive",
|
|
391
407
|
type: NgTemplateOutlet,
|
|
@@ -408,6 +424,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
408
424
|
type: Component,
|
|
409
425
|
args: [{
|
|
410
426
|
selector: "mona-check-box",
|
|
427
|
+
hostDirectives: [{
|
|
428
|
+
directive: RippleDirective,
|
|
429
|
+
inputs: ["monaRippleDisabled"]
|
|
430
|
+
}],
|
|
411
431
|
imports: [NgTemplateOutlet],
|
|
412
432
|
host: {
|
|
413
433
|
"[attr.aria-describedby]": "null",
|
|
@@ -419,10 +439,15 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
419
439
|
"[attr.data-disabled]": "effectiveDisabled()",
|
|
420
440
|
"[attr.data-indeterminate]": "indeterminateState()"
|
|
421
441
|
},
|
|
422
|
-
template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"readonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n <input\n type=\"checkbox\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"effectiveDisabled()\"\n [indeterminate]=\"indeterminateState()\"\n [required]=\"required()\"\n [checked]=\"checked()\"\n [tabindex]=\"effectiveDisabled() ? -1 : tabIndex()\"\n [class]=\"checkBoxClasses()\"\n [attr.aria-checked]=\"indeterminateState() ? 'mixed' : null\"\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #checkBox />\n\n <span [class]=\"checkMarkClasses()\" [attr.data-invalid]=\"invalidState() || null\" aria-hidden=\"true\">\n @if (checked() && !indeterminateState()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-check stroke-primary-foreground forced-colors:stroke-[CanvasText]\">\n <path d=\"M18 6 9 17l-5-5\" />\n </svg>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n"
|
|
442
|
+
template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"readonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n <input\n type=\"checkbox\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"effectiveDisabled()\"\n [indeterminate]=\"indeterminateState()\"\n [required]=\"required()\"\n [checked]=\"checked()\"\n [tabindex]=\"effectiveDisabled() ? -1 : tabIndex()\"\n [class]=\"checkBoxClasses()\"\n [attr.aria-checked]=\"indeterminateState() ? 'mixed' : null\"\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #checkBox />\n\n <span [class]=\"checkMarkClasses()\" [attr.data-invalid]=\"invalidState() || null\" aria-hidden=\"true\" #checkMark>\n @if (checked() && !indeterminateState()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-check stroke-primary-foreground forced-colors:stroke-[CanvasText]\">\n <path d=\"M18 6 9 17l-5-5\" />\n </svg>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n"
|
|
423
443
|
}]
|
|
424
444
|
}],
|
|
445
|
+
ctorParameters: () => [],
|
|
425
446
|
propDecorators: {
|
|
447
|
+
checkMarkRef: [{
|
|
448
|
+
type: i0.ViewChild,
|
|
449
|
+
args: ["checkMark", { isSignal: true }]
|
|
450
|
+
}],
|
|
426
451
|
inputRef: [{
|
|
427
452
|
type: i0.ViewChild,
|
|
428
453
|
args: ["checkBox", { isSignal: true }]
|
|
@@ -9,6 +9,8 @@ import { cva } from "class-variance-authority";
|
|
|
9
9
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
10
10
|
import { themeRaisedSurfaceClasses, themeSelectionBorderClasses } from "@nanahoshi/mona-ui/internal";
|
|
11
11
|
import { fromEvent } from "rxjs";
|
|
12
|
+
import * as i1 from "@nanahoshi/mona-ui/ripple";
|
|
13
|
+
import { RippleDirective } from "@nanahoshi/mona-ui/ripple";
|
|
12
14
|
import { RouterLink } from "@angular/router";
|
|
13
15
|
const CHIP_DEFAULT_MESSAGES = { removeLabel: (label) => label ? `Remove, ${label}` : "Remove, item" };
|
|
14
16
|
var ChipPrefixTemplateDirective = class ChipPrefixTemplateDirective {
|
|
@@ -333,11 +335,13 @@ var ChipComponent = class ChipComponent {
|
|
|
333
335
|
#destroyRef;
|
|
334
336
|
#elementRef;
|
|
335
337
|
#i18n;
|
|
338
|
+
#ripple;
|
|
336
339
|
#routerLink;
|
|
337
340
|
constructor() {
|
|
338
341
|
this.#destroyRef = inject(DestroyRef);
|
|
339
342
|
this.#elementRef = inject(ElementRef);
|
|
340
343
|
this.#i18n = inject(MonaI18nService);
|
|
344
|
+
this.#ripple = inject(RippleDirective, { self: true });
|
|
341
345
|
this.#routerLink = inject(RouterLink, { optional: true });
|
|
342
346
|
this.ariaChecked = computed(() => {
|
|
343
347
|
if (!this.toggleable()) return;
|
|
@@ -423,6 +427,7 @@ var ChipComponent = class ChipComponent {
|
|
|
423
427
|
alias: "class"
|
|
424
428
|
});
|
|
425
429
|
this.value = input(...ngDevMode ? [void 0, { debugName: "value" }] : /* istanbul ignore next */ []);
|
|
430
|
+
this.#ripple.setHostDisabled(computed(() => !this.bodyInteractive()));
|
|
426
431
|
afterNextRender({ read: () => {
|
|
427
432
|
this.#setSubscriptions();
|
|
428
433
|
this.#warnIfRemoveHasNoName();
|
|
@@ -617,6 +622,10 @@ var ChipComponent = class ChipComponent {
|
|
|
617
622
|
descendants: true,
|
|
618
623
|
isSignal: true
|
|
619
624
|
}],
|
|
625
|
+
hostDirectives: [{
|
|
626
|
+
directive: i1.RippleDirective,
|
|
627
|
+
inputs: ["monaRippleDisabled", "monaRippleDisabled"]
|
|
628
|
+
}],
|
|
620
629
|
ngImport: i0,
|
|
621
630
|
template: "<span\n #body\n [class]=\"bodyClasses()\"\n [attr.aria-checked]=\"split() ? ariaChecked() : null\"\n [attr.aria-disabled]=\"split() && disabled() ? 'true' : null\"\n [attr.aria-label]=\"split() ? ariaLabel() || null : null\"\n [attr.role]=\"split() ? controlRole() : null\"\n [attr.tabindex]=\"split() ? effectiveTabIndex() : null\">\n @if (prefixTemplate()) {\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n }\n\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</span>\n\n@if (removable()) {\n @let removeAriaLabel = removeLabel() || messages().removeLabel(label() || ariaLabel());\n <button\n monaButton\n look=\"link\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n [attr.aria-label]=\"removeAriaLabel\"\n [tabindex]=\"removeTabIndex()\"\n [disabled]=\"disabled()\"\n (click)=\"onRemoveClick($event)\"\n [attr.data-chip-remove]=\"true\">\n <svg lucideCircleX [size]=\"iconSize()\"></svg>\n </button>\n}\n",
|
|
622
631
|
dependencies: [
|
|
@@ -682,6 +691,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
682
691
|
"[attr.aria-checked]": "split() ? null : ariaChecked()",
|
|
683
692
|
"[attr.aria-label]": "split() ? null : ariaLabel() || null"
|
|
684
693
|
},
|
|
694
|
+
hostDirectives: [{
|
|
695
|
+
directive: RippleDirective,
|
|
696
|
+
inputs: ["monaRippleDisabled"]
|
|
697
|
+
}],
|
|
685
698
|
template: "<span\n #body\n [class]=\"bodyClasses()\"\n [attr.aria-checked]=\"split() ? ariaChecked() : null\"\n [attr.aria-disabled]=\"split() && disabled() ? 'true' : null\"\n [attr.aria-label]=\"split() ? ariaLabel() || null : null\"\n [attr.role]=\"split() ? controlRole() : null\"\n [attr.tabindex]=\"split() ? effectiveTabIndex() : null\">\n @if (prefixTemplate()) {\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n }\n\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</span>\n\n@if (removable()) {\n @let removeAriaLabel = removeLabel() || messages().removeLabel(label() || ariaLabel());\n <button\n monaButton\n look=\"link\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n [attr.aria-label]=\"removeAriaLabel\"\n [tabindex]=\"removeTabIndex()\"\n [disabled]=\"disabled()\"\n (click)=\"onRemoveClick($event)\"\n [attr.data-chip-remove]=\"true\">\n <svg lucideCircleX [size]=\"iconSize()\"></svg>\n </button>\n}\n"
|
|
686
699
|
}]
|
|
687
700
|
}],
|
|
@@ -54,7 +54,7 @@ const colorGradientBaseThemeVariants = cva(`
|
|
|
54
54
|
data-[invalid='true']:border
|
|
55
55
|
data-[invalid='true']:border-error
|
|
56
56
|
data-[invalid='true']:ring-1
|
|
57
|
-
data-[invalid='true']:ring-error/35
|
|
57
|
+
data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
|
|
58
58
|
`);
|
|
59
59
|
const colorGradientHsvRectangleThemeVariants = cva(`
|
|
60
60
|
relative h-40 w-full
|
|
@@ -17,7 +17,7 @@ const colorPaletteBaseThemeVariants = cva(`
|
|
|
17
17
|
data-[invalid='true']:border
|
|
18
18
|
data-[invalid='true']:border-error
|
|
19
19
|
data-[invalid='true']:ring-1
|
|
20
|
-
data-[invalid='true']:ring-error/35
|
|
20
|
+
data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
|
|
21
21
|
`);
|
|
22
22
|
const colorPaletteItemThemeVariants = cva(`
|
|
23
23
|
cursor-pointer
|
|
@@ -74,16 +74,16 @@ const colorPickerBaseThemeVariants = cva(`
|
|
|
74
74
|
hover:bg-hover active:bg-active
|
|
75
75
|
|
|
76
76
|
focus-within:border-focus-indicator
|
|
77
|
-
focus-within:ring-
|
|
77
|
+
focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
|
|
78
78
|
|
|
79
79
|
data-[invalid='true']:border-error
|
|
80
|
-
data-[invalid='true']:ring-
|
|
80
|
+
data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
|
|
81
81
|
data-[invalid='true']:focus-within:border-error
|
|
82
|
-
data-[invalid='true']:focus-within:ring-error/35
|
|
82
|
+
data-[invalid='true']:focus-within:ring-error/(--mona-focus-ring-opacity,35%)
|
|
83
83
|
`, {
|
|
84
84
|
variants: {
|
|
85
85
|
expanded: {
|
|
86
|
-
true: "border-focus-indicator ring-
|
|
86
|
+
true: "border-focus-indicator ring-(length:--mona-focus-ring-width,2px) ring-focus-indicator/(--mona-focus-ring-opacity,35%)",
|
|
87
87
|
false: ""
|
|
88
88
|
},
|
|
89
89
|
rounded: {
|
|
@@ -101,7 +101,7 @@ const colorPickerBaseThemeVariants = cva(`
|
|
|
101
101
|
},
|
|
102
102
|
compoundVariants: [{
|
|
103
103
|
expanded: true,
|
|
104
|
-
class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/35"
|
|
104
|
+
class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)"
|
|
105
105
|
}]
|
|
106
106
|
});
|
|
107
107
|
const colorPickerColorThemeVariants = cva(`
|
|
@@ -21,7 +21,7 @@ const comboBoxBaseThemeVariants = cva(`
|
|
|
21
21
|
border border-input-border shadow-(--shadow-control) outline-none focus-visible:outline-hidden
|
|
22
22
|
transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out
|
|
23
23
|
data-[readonly='true']:cursor-default
|
|
24
|
-
focus-within:border-focus-indicator focus-within:ring-
|
|
24
|
+
focus-within:border-focus-indicator focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
|
|
25
25
|
`, {
|
|
26
26
|
variants: {
|
|
27
27
|
disabled: { true: `
|
|
@@ -29,9 +29,9 @@ const comboBoxBaseThemeVariants = cva(`
|
|
|
29
29
|
bg-disabled-background text-disabled-foreground
|
|
30
30
|
border-disabled-border shadow-none
|
|
31
31
|
` },
|
|
32
|
-
focused: { true: "border-focus-indicator ring-
|
|
32
|
+
focused: { true: "border-focus-indicator ring-(length:--mona-focus-ring-width,2px) ring-focus-indicator/(--mona-focus-ring-opacity,35%)" },
|
|
33
33
|
invalid: {
|
|
34
|
-
true: "border-error ring-
|
|
34
|
+
true: "border-error ring-(length:--mona-focus-ring-width,2px) ring-error/(--mona-focus-ring-opacity,35%) focus-within:border-error focus-within:ring-error/(--mona-focus-ring-opacity,35%)",
|
|
35
35
|
false: ""
|
|
36
36
|
},
|
|
37
37
|
rounded: {
|
|
@@ -50,7 +50,7 @@ const comboBoxBaseThemeVariants = cva(`
|
|
|
50
50
|
compoundVariants: [{
|
|
51
51
|
focused: true,
|
|
52
52
|
invalid: true,
|
|
53
|
-
class: "border-error ring-error/35"
|
|
53
|
+
class: "border-error ring-error/(--mona-focus-ring-opacity,35%)"
|
|
54
54
|
}],
|
|
55
55
|
defaultVariants: {
|
|
56
56
|
disabled: false,
|
|
@@ -33,12 +33,12 @@ const datePickerBaseThemeVariants = cva(`
|
|
|
33
33
|
data-[readonly='true']:cursor-default
|
|
34
34
|
|
|
35
35
|
focus-within:border-focus-indicator
|
|
36
|
-
focus-within:ring-
|
|
36
|
+
focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
|
|
37
37
|
|
|
38
38
|
data-[invalid='true']:border-error
|
|
39
|
-
data-[invalid='true']:ring-
|
|
39
|
+
data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
|
|
40
40
|
data-[invalid='true']:focus-within:border-error
|
|
41
|
-
data-[invalid='true']:focus-within:ring-error/35
|
|
41
|
+
data-[invalid='true']:focus-within:ring-error/(--mona-focus-ring-opacity,35%)
|
|
42
42
|
|
|
43
43
|
[&_mona-text-box]:h-full
|
|
44
44
|
[&_mona-text-box]:border-none
|
|
@@ -48,7 +48,7 @@ const datePickerBaseThemeVariants = cva(`
|
|
|
48
48
|
`, {
|
|
49
49
|
variants: {
|
|
50
50
|
focused: {
|
|
51
|
-
true: "border-focus-indicator ring-
|
|
51
|
+
true: "border-focus-indicator ring-(length:--mona-focus-ring-width,2px) ring-focus-indicator/(--mona-focus-ring-opacity,35%)",
|
|
52
52
|
false: ""
|
|
53
53
|
},
|
|
54
54
|
rounded: {
|
|
@@ -66,7 +66,7 @@ const datePickerBaseThemeVariants = cva(`
|
|
|
66
66
|
},
|
|
67
67
|
compoundVariants: [{
|
|
68
68
|
focused: true,
|
|
69
|
-
class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/35"
|
|
69
|
+
class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)"
|
|
70
70
|
}]
|
|
71
71
|
});
|
|
72
72
|
var DatePickerComponent = class DatePickerComponent {
|
|
@@ -57,12 +57,12 @@ const dateRangePickerBaseThemeVariants = cva(`
|
|
|
57
57
|
data-[readonly='true']:cursor-default
|
|
58
58
|
|
|
59
59
|
focus-within:border-focus-indicator
|
|
60
|
-
focus-within:ring-
|
|
60
|
+
focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
|
|
61
61
|
|
|
62
62
|
data-[invalid='true']:border-error
|
|
63
|
-
data-[invalid='true']:ring-
|
|
63
|
+
data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
|
|
64
64
|
data-[invalid='true']:focus-within:border-error
|
|
65
|
-
data-[invalid='true']:focus-within:ring-error/35
|
|
65
|
+
data-[invalid='true']:focus-within:ring-error/(--mona-focus-ring-opacity,35%)
|
|
66
66
|
|
|
67
67
|
[&_mona-text-box]:h-full
|
|
68
68
|
[&_mona-text-box]:min-w-0
|
|
@@ -74,7 +74,7 @@ const dateRangePickerBaseThemeVariants = cva(`
|
|
|
74
74
|
`, {
|
|
75
75
|
variants: {
|
|
76
76
|
focused: {
|
|
77
|
-
true: "border-focus-indicator ring-
|
|
77
|
+
true: "border-focus-indicator ring-(length:--mona-focus-ring-width,2px) ring-focus-indicator/(--mona-focus-ring-opacity,35%)",
|
|
78
78
|
false: ""
|
|
79
79
|
},
|
|
80
80
|
rounded: {
|
|
@@ -92,7 +92,7 @@ const dateRangePickerBaseThemeVariants = cva(`
|
|
|
92
92
|
},
|
|
93
93
|
compoundVariants: [{
|
|
94
94
|
focused: true,
|
|
95
|
-
class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/35"
|
|
95
|
+
class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)"
|
|
96
96
|
}]
|
|
97
97
|
});
|
|
98
98
|
const dateRangePickerPopupThemeVariants = cva(`flex max-w-[calc(100dvw-1rem)] max-sm:flex-col`);
|
|
@@ -42,12 +42,12 @@ const dateTimePickerBaseThemeVariants = cva(`
|
|
|
42
42
|
data-[readonly='true']:cursor-default
|
|
43
43
|
|
|
44
44
|
focus-within:border-focus-indicator
|
|
45
|
-
focus-within:ring-
|
|
45
|
+
focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
|
|
46
46
|
|
|
47
47
|
data-[invalid='true']:border-error
|
|
48
|
-
data-[invalid='true']:ring-
|
|
48
|
+
data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
|
|
49
49
|
data-[invalid='true']:focus-within:border-error
|
|
50
|
-
data-[invalid='true']:focus-within:ring-error/35
|
|
50
|
+
data-[invalid='true']:focus-within:ring-error/(--mona-focus-ring-opacity,35%)
|
|
51
51
|
|
|
52
52
|
[&_mona-text-box]:h-full
|
|
53
53
|
[&_mona-text-box]:border-none
|
|
@@ -57,7 +57,7 @@ const dateTimePickerBaseThemeVariants = cva(`
|
|
|
57
57
|
`, {
|
|
58
58
|
variants: {
|
|
59
59
|
focused: {
|
|
60
|
-
true: "border-focus-indicator ring-
|
|
60
|
+
true: "border-focus-indicator ring-(length:--mona-focus-ring-width,2px) ring-focus-indicator/(--mona-focus-ring-opacity,35%)",
|
|
61
61
|
false: ""
|
|
62
62
|
},
|
|
63
63
|
rounded: {
|
|
@@ -75,7 +75,7 @@ const dateTimePickerBaseThemeVariants = cva(`
|
|
|
75
75
|
},
|
|
76
76
|
compoundVariants: [{
|
|
77
77
|
focused: true,
|
|
78
|
-
class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/35"
|
|
78
|
+
class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)"
|
|
79
79
|
}]
|
|
80
80
|
});
|
|
81
81
|
const dateTimePickerHeaderThemeVariants = cva(`
|
|
@@ -53,7 +53,7 @@ const dropdownListInputThemeVariants = cva(`
|
|
|
53
53
|
transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out
|
|
54
54
|
data-[readonly='true']:cursor-default
|
|
55
55
|
hover:bg-hover active:bg-active
|
|
56
|
-
focus-within:border-focus-indicator focus-within:ring-
|
|
56
|
+
focus-within:border-focus-indicator focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
|
|
57
57
|
`, {
|
|
58
58
|
variants: {
|
|
59
59
|
disabled: {
|
|
@@ -65,12 +65,12 @@ const dropdownListInputThemeVariants = cva(`
|
|
|
65
65
|
false: ""
|
|
66
66
|
},
|
|
67
67
|
expanded: {
|
|
68
|
-
true: "border-focus-indicator ring-
|
|
68
|
+
true: "border-focus-indicator ring-(length:--mona-focus-ring-width,2px) ring-focus-indicator/(--mona-focus-ring-opacity,35%)",
|
|
69
69
|
false: ""
|
|
70
70
|
},
|
|
71
71
|
hasPrefix: { false: "ps-2" },
|
|
72
72
|
invalid: {
|
|
73
|
-
true: "border-error ring-
|
|
73
|
+
true: "border-error ring-(length:--mona-focus-ring-width,2px) ring-error/(--mona-focus-ring-opacity,35%) focus-within:border-error focus-within:ring-error/(--mona-focus-ring-opacity,35%)",
|
|
74
74
|
false: ""
|
|
75
75
|
},
|
|
76
76
|
rounded: {
|
|
@@ -89,7 +89,7 @@ const dropdownListInputThemeVariants = cva(`
|
|
|
89
89
|
compoundVariants: [{
|
|
90
90
|
expanded: true,
|
|
91
91
|
invalid: true,
|
|
92
|
-
class: "border-error ring-error/35"
|
|
92
|
+
class: "border-error ring-error/(--mona-focus-ring-opacity,35%)"
|
|
93
93
|
}]
|
|
94
94
|
});
|
|
95
95
|
const dropdownListValueContainerThemeVariants = cva(`flex h-full w-full items-center overflow-hidden`, { variants: { hasTemplate: { false: "[&>span]:truncate [&>span]:items-center [&>span]:inline-block" } } });
|
|
@@ -251,15 +251,15 @@ const editorBaseThemeVariants = cva(`
|
|
|
251
251
|
border border-border
|
|
252
252
|
transition-[border-color,box-shadow] duration-150 ease-in
|
|
253
253
|
focus-within:border-focus-indicator
|
|
254
|
-
focus-within:ring-
|
|
254
|
+
focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
|
|
255
255
|
|
|
256
256
|
data-[disabled='true']:cursor-not-allowed
|
|
257
257
|
data-[disabled='true']:border-disabled-border
|
|
258
258
|
data-[disabled='true']:text-disabled-foreground
|
|
259
259
|
data-[invalid='true']:border-error
|
|
260
|
-
data-[invalid='true']:ring-
|
|
260
|
+
data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
|
|
261
261
|
data-[invalid='true']:focus-within:border-error
|
|
262
|
-
data-[invalid='true']:focus-within:ring-error/35
|
|
262
|
+
data-[invalid='true']:focus-within:ring-error/(--mona-focus-ring-opacity,35%)
|
|
263
263
|
|
|
264
264
|
prose prose-neutral max-w-none
|
|
265
265
|
prose-headings:text-foreground prose-headings:font-bold
|
|
@@ -9,7 +9,7 @@ const indicatorIconHostThemeVariants = cva(`h-full aspect-square flex-none inlin
|
|
|
9
9
|
true: `
|
|
10
10
|
text-muted-foreground
|
|
11
11
|
hover:text-foreground
|
|
12
|
-
focus-visible:ring-
|
|
12
|
+
focus-visible:ring-(length:--mona-focus-ring-width,2px) focus-visible:ring-focus-indicator/(--mona-focus-ring-opacity,35%) focus-visible:outline-hidden
|
|
13
13
|
`,
|
|
14
14
|
false: ""
|
|
15
15
|
},
|
|
@@ -7,6 +7,8 @@ import { cva } from "class-variance-authority";
|
|
|
7
7
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
8
8
|
import { createElementControlId, isTypeaheadKey, setupTypeahead, themeSelectionBarClasses } from "@nanahoshi/mona-ui/internal";
|
|
9
9
|
import { ReplaySubject, Subject, asyncScheduler, filter, fromEvent, tap } from "rxjs";
|
|
10
|
+
import * as i1 from "@nanahoshi/mona-ui/ripple";
|
|
11
|
+
import { RippleDirective } from "@nanahoshi/mona-ui/ripple";
|
|
10
12
|
import { ImmutableList, ImmutableSet, from as from$1, toImmutableSet } from "@mirei/ts-collections";
|
|
11
13
|
import { FilterInputComponent } from "@nanahoshi/mona-ui/internal/filter-input";
|
|
12
14
|
import { PlaceholderComponent } from "@nanahoshi/mona-ui/placeholder";
|
|
@@ -899,6 +901,10 @@ var ListItemDirective = class ListItemDirective {
|
|
|
899
901
|
return twMerge(classes, selectAll ? LIST_SELECT_ALL_ITEM_CLASSES : "");
|
|
900
902
|
}, ...ngDevMode ? [{ debugName: "textClasses" }] : /* istanbul ignore next */ []);
|
|
901
903
|
this.item = input.required(...ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []);
|
|
904
|
+
inject(RippleDirective, { self: true }).setHostDisabled(computed(() => {
|
|
905
|
+
const interactive = this.#listService.selectableOptions().enabled || this.#listService.navigableOptions().enabled;
|
|
906
|
+
return this.disabled() || !interactive;
|
|
907
|
+
}));
|
|
902
908
|
fromEvent(inject(ElementRef).nativeElement, "focusout").pipe(takeUntilDestroyed()).subscribe(() => this.#listService.itemFocusOut$.next(this.item()));
|
|
903
909
|
}
|
|
904
910
|
static {
|
|
@@ -938,6 +944,7 @@ var ListItemDirective = class ListItemDirective {
|
|
|
938
944
|
"attr.tabindex": "rovingTabIndex()",
|
|
939
945
|
"class": "textClasses()"
|
|
940
946
|
} },
|
|
947
|
+
hostDirectives: [{ directive: i1.RippleDirective }],
|
|
941
948
|
ngImport: i0
|
|
942
949
|
});
|
|
943
950
|
}
|
|
@@ -963,7 +970,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
963
970
|
"[attr.role]": "isOption() ? 'option' : 'listitem'",
|
|
964
971
|
"[attr.tabindex]": "rovingTabIndex()",
|
|
965
972
|
"[class]": "textClasses()"
|
|
966
|
-
}
|
|
973
|
+
},
|
|
974
|
+
hostDirectives: [RippleDirective]
|
|
967
975
|
}]
|
|
968
976
|
}],
|
|
969
977
|
ctorParameters: () => [],
|