@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
|
@@ -12,7 +12,7 @@ import { DateTime } from "luxon";
|
|
|
12
12
|
const timeSelectorBaseThemeVariants = cva(`
|
|
13
13
|
flex h-full w-full flex-col overflow-hidden
|
|
14
14
|
data-[invalid='true']:border data-[invalid='true']:border-error
|
|
15
|
-
data-[invalid='true']:ring-
|
|
15
|
+
data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
|
|
16
16
|
`, { variants: {
|
|
17
17
|
disabled: {
|
|
18
18
|
true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
|
package/llms.txt
CHANGED
|
@@ -26,9 +26,10 @@ Mona UI is an Angular component library styled with Tailwind CSS 4. Its componen
|
|
|
26
26
|
- [Introduction](docs/introduction.md): What Mona UI is, what it includes and how it is built.
|
|
27
27
|
- [Installation](docs/installation.md): Install the package, set up its styles and choose a theme.
|
|
28
28
|
- [Theming](docs/theming.md): Choose and switch themes, follow the system's dark mode, and use theme tokens in your own styles.
|
|
29
|
-
- [Built-in Themes](docs/theming-built-in-themes.md): Mona, Luna and
|
|
29
|
+
- [Built-in Themes](docs/theming-built-in-themes.md): Mona, Luna, Anna and Rena side by side, and when to use each one.
|
|
30
30
|
- [Custom Colors](docs/theming-custom-colors.md): Generate a palette from brand colors, override tokens, or let users choose a color.
|
|
31
31
|
- [Custom Themes](docs/theming-custom-themes.md): Register a theme of your own, from scratch or based on a built-in theme.
|
|
32
|
+
- [Ripple](docs/ripple.md): Turn on a ripple that spreads from where a button is pressed, and add it to your own elements.
|
|
32
33
|
- [Forms](docs/forms.md): Connect Mona UI controls to Angular signal forms.
|
|
33
34
|
|
|
34
35
|
## Actions
|
|
@@ -233,6 +234,7 @@ Mona UI is an Angular component library styled with Tailwind CSS 4. Its componen
|
|
|
233
234
|
- [`@nanahoshi/mona-ui/query`](docs/api/query.md): 33 exports, in full.
|
|
234
235
|
- [`@nanahoshi/mona-ui/radio-button`](docs/api/radio-button.md): 4 exports, in full.
|
|
235
236
|
- [`@nanahoshi/mona-ui/rating`](docs/api/rating.md): 10 exports, in full.
|
|
237
|
+
- [`@nanahoshi/mona-ui/ripple`](docs/api/ripple.md): 5 exports, in full.
|
|
236
238
|
- [`@nanahoshi/mona-ui/scroll-view`](docs/api/scroll-view.md): 5 exports, in full.
|
|
237
239
|
- [`@nanahoshi/mona-ui/segmented`](docs/api/segmented.md): 5 exports, in full.
|
|
238
240
|
- [`@nanahoshi/mona-ui/separator`](docs/api/separator.md): 1 export, in full.
|
|
@@ -250,7 +252,7 @@ Mona UI is an Angular component library styled with Tailwind CSS 4. Its componen
|
|
|
250
252
|
- [`@nanahoshi/mona-ui/tabs`](docs/api/tabs.md): 9 exports, in full.
|
|
251
253
|
- [`@nanahoshi/mona-ui/text-area`](docs/api/text-area.md): 1 export, in full.
|
|
252
254
|
- [`@nanahoshi/mona-ui/text-box`](docs/api/text-box.md): 6 exports, in full.
|
|
253
|
-
- [`@nanahoshi/mona-ui/theme`](docs/api/theme.md):
|
|
255
|
+
- [`@nanahoshi/mona-ui/theme`](docs/api/theme.md): 54 exports, in full.
|
|
254
256
|
- [`@nanahoshi/mona-ui/time-picker`](docs/api/time-picker.md): 2 exports, in full.
|
|
255
257
|
- [`@nanahoshi/mona-ui/time-selector`](docs/api/time-selector.md): 2 exports, in full.
|
|
256
258
|
- [`@nanahoshi/mona-ui/timeline`](docs/api/timeline.md): 7 exports, in full.
|
package/package.json
CHANGED
|
@@ -360,6 +360,10 @@
|
|
|
360
360
|
"types": "./types/nanahoshi-mona-ui-rating.d.ts",
|
|
361
361
|
"default": "./fesm2022/nanahoshi-mona-ui-rating.mjs"
|
|
362
362
|
},
|
|
363
|
+
"./ripple": {
|
|
364
|
+
"types": "./types/nanahoshi-mona-ui-ripple.d.ts",
|
|
365
|
+
"default": "./fesm2022/nanahoshi-mona-ui-ripple.mjs"
|
|
366
|
+
},
|
|
363
367
|
"./scroll-view": {
|
|
364
368
|
"types": "./types/nanahoshi-mona-ui-scroll-view.d.ts",
|
|
365
369
|
"default": "./fesm2022/nanahoshi-mona-ui-scroll-view.mjs"
|
|
@@ -548,5 +552,5 @@
|
|
|
548
552
|
"default": "./package.json"
|
|
549
553
|
}
|
|
550
554
|
},
|
|
551
|
-
"version": "0.
|
|
555
|
+
"version": "0.47.0"
|
|
552
556
|
}
|
|
@@ -3,6 +3,7 @@ import { InjectionToken, Signal } from "@angular/core";
|
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
import { Subject } from "rxjs";
|
|
5
5
|
import { VariantInputs } from "@nanahoshi/mona-ui/internal";
|
|
6
|
+
import * as i1 from "@nanahoshi/mona-ui/ripple";
|
|
6
7
|
/**
|
|
7
8
|
* Values accepted by the `aria-haspopup` input of `ButtonDirective`. `"false"` (the default) omits the attribute.
|
|
8
9
|
*/
|
|
@@ -191,7 +192,13 @@ export declare class ButtonDirective implements ButtonVariantsInput {
|
|
|
191
192
|
}, {
|
|
192
193
|
"look": "lookChange";
|
|
193
194
|
"selected": "selectedChange";
|
|
194
|
-
}, never, never, true,
|
|
195
|
+
}, never, never, true, [{
|
|
196
|
+
directive: typeof i1.RippleDirective;
|
|
197
|
+
inputs: {
|
|
198
|
+
"monaRippleDisabled": "monaRippleDisabled";
|
|
199
|
+
};
|
|
200
|
+
outputs: {};
|
|
201
|
+
}]>;
|
|
195
202
|
}
|
|
196
203
|
/**
|
|
197
204
|
* A component whose own buttons join the `mona-button-group` it is placed in, such as a dropdown or split button.
|
|
@@ -4,6 +4,7 @@ import { TemplateRef } from "@angular/core";
|
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
import { FormValueControl } from "@angular/forms/signals";
|
|
6
6
|
import { VariantInputs } from "@nanahoshi/mona-ui/internal";
|
|
7
|
+
import "@nanahoshi/mona-ui/ripple";
|
|
7
8
|
import { CalendarView, DateDisabledType } from "@nanahoshi/mona-ui/date-input";
|
|
8
9
|
interface DecadeCellTemplateContext {
|
|
9
10
|
/**
|
|
@@ -109,7 +109,7 @@ declare class ChatComposerComponent {
|
|
|
109
109
|
#private;
|
|
110
110
|
protected readonly canSend: import("@angular/core").Signal<boolean>;
|
|
111
111
|
protected readonly composerClass = "flex flex-col gap-2 p-3";
|
|
112
|
-
protected readonly fieldClass = "\n flex items-end gap-1 rounded-xl p-1\n \n [background-color:var(--mona-effect-control-background-color,var(--color-input-background))]\n \n [background-image:var(--mona-effect-control-background-image,none)]\n [backdrop-filter:var(--mona-effect-control-backdrop-filter,none)]\n [-webkit-backdrop-filter:var(--mona-effect-control-backdrop-filter,none)]\n\n\n border border-input-border shadow-(--shadow-control)\n transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out\n focus-within:border-focus-indicator focus-within:ring-
|
|
112
|
+
protected readonly fieldClass = "\n flex items-end gap-1 rounded-xl p-1\n \n [background-color:var(--mona-effect-control-background-color,var(--color-input-background))]\n \n [background-image:var(--mona-effect-control-background-image,none)]\n [backdrop-filter:var(--mona-effect-control-backdrop-filter,none)]\n [-webkit-backdrop-filter:var(--mona-effect-control-backdrop-filter,none)]\n\n\n border border-input-border shadow-(--shadow-control)\n transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out\n focus-within:border-focus-indicator focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)\n data-[disabled]:cursor-not-allowed data-[disabled]:border-disabled-border data-[disabled]:bg-disabled-background\n data-[disabled]:shadow-none\n";
|
|
113
113
|
protected readonly fileClass = "\n flex max-w-full min-w-0 items-center gap-1.5 rounded-md border border-border bg-surface-muted\n py-0.5 ps-2 pe-0.5 text-xs\n";
|
|
114
114
|
protected readonly fileNameClass = "min-w-0 truncate";
|
|
115
115
|
protected readonly files: import("@angular/core").WritableSignal<readonly File[]>;
|
|
@@ -3,6 +3,7 @@ import { ElementRef } from "@angular/core";
|
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
import { FormCheckboxControl } from "@angular/forms/signals";
|
|
5
5
|
import { VariantInputs } from "@nanahoshi/mona-ui/internal";
|
|
6
|
+
import * as i1 from "@nanahoshi/mona-ui/ripple";
|
|
6
7
|
declare const checkmarkThemeVariants: (props?: ({
|
|
7
8
|
rounded?: "small" | "none" | "full" | "large" | "medium" | null | undefined;
|
|
8
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -22,6 +23,7 @@ export declare class CheckBoxComponent implements CheckboxVariantInput, Checkmar
|
|
|
22
23
|
#private;
|
|
23
24
|
protected readonly checkBoxClasses: import("@angular/core").Signal<string>;
|
|
24
25
|
protected readonly checkMarkClasses: import("@angular/core").Signal<string>;
|
|
26
|
+
protected readonly checkMarkRef: import("@angular/core").Signal<ElementRef<HTMLSpanElement> | undefined>;
|
|
25
27
|
protected readonly containerLabelClasses: import("@angular/core").Signal<string>;
|
|
26
28
|
protected readonly describedBy: import("@angular/core").Signal<string | null>;
|
|
27
29
|
protected readonly effectiveDisabled: import("@angular/core").Signal<boolean>;
|
|
@@ -146,6 +148,7 @@ export declare class CheckBoxComponent implements CheckboxVariantInput, Checkmar
|
|
|
146
148
|
* @default ""
|
|
147
149
|
*/
|
|
148
150
|
readonly userClass: import("@angular/core").InputSignal<string>;
|
|
151
|
+
constructor();
|
|
149
152
|
/**
|
|
150
153
|
* @description Moves focus to the native checkbox input.
|
|
151
154
|
* @param options Options passed to the native `focus()` call, such as `preventScroll`.
|
|
@@ -253,7 +256,13 @@ export declare class CheckBoxComponent implements CheckboxVariantInput, Checkmar
|
|
|
253
256
|
"inputChange": "inputChange";
|
|
254
257
|
"inputFocus": "inputFocus";
|
|
255
258
|
"touch": "touch";
|
|
256
|
-
}, never, ["*"], true,
|
|
259
|
+
}, never, ["*"], true, [{
|
|
260
|
+
directive: typeof i1.RippleDirective;
|
|
261
|
+
inputs: {
|
|
262
|
+
"monaRippleDisabled": "monaRippleDisabled";
|
|
263
|
+
};
|
|
264
|
+
outputs: {};
|
|
265
|
+
}]>;
|
|
257
266
|
}
|
|
258
267
|
/**
|
|
259
268
|
* Applies Mona UI styling to a native `<input type="checkbox">`. All native checkbox behaviors — keyboard interaction,
|
|
@@ -2,6 +2,7 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import { ElementRef, TemplateRef } from "@angular/core";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
import { VariantInputs } from "@nanahoshi/mona-ui/internal";
|
|
5
|
+
import * as i1 from "@nanahoshi/mona-ui/ripple";
|
|
5
6
|
export declare const CHIP_DEFAULT_MESSAGES: {
|
|
6
7
|
removeLabel: (label?: string) => string;
|
|
7
8
|
};
|
|
@@ -205,7 +206,13 @@ export declare class ChipComponent implements ChipVariantInputs {
|
|
|
205
206
|
"contentClick": "contentClick";
|
|
206
207
|
"remove": "remove";
|
|
207
208
|
"selected": "selectedChange";
|
|
208
|
-
}, ["prefixTemplate"], ["*"], true,
|
|
209
|
+
}, ["prefixTemplate"], ["*"], true, [{
|
|
210
|
+
directive: typeof i1.RippleDirective;
|
|
211
|
+
inputs: {
|
|
212
|
+
"monaRippleDisabled": "monaRippleDisabled";
|
|
213
|
+
};
|
|
214
|
+
outputs: {};
|
|
215
|
+
}]>;
|
|
209
216
|
}
|
|
210
217
|
/**
|
|
211
218
|
* @description Apply to an `<ng-template>` directly inside `<mona-chip>` to render prefix content
|
|
@@ -3,6 +3,7 @@ import { ElementRef } from "@angular/core";
|
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
import { FormValueControl } from "@angular/forms/signals";
|
|
5
5
|
import { VariantInputs } from "@nanahoshi/mona-ui/internal";
|
|
6
|
+
import * as i1 from "@nanahoshi/mona-ui/ripple";
|
|
6
7
|
declare const radioGroupThemeVariants: (props?: ({
|
|
7
8
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
8
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -31,6 +32,7 @@ type RadioButtonDirectiveProps = VariantProps<typeof radioButtonDirectiveThemeVa
|
|
|
31
32
|
type RadioButtonDirectiveInput = VariantInputs<RadioButtonDirectiveProps>;
|
|
32
33
|
export declare class RadioButtonComponent<T = unknown> implements RadioButtonVariantInput, FormValueControl<T> {
|
|
33
34
|
#private;
|
|
35
|
+
protected readonly circleRef: import("@angular/core").Signal<ElementRef<HTMLSpanElement> | undefined>;
|
|
34
36
|
protected readonly containerLabelClasses: import("@angular/core").Signal<string>;
|
|
35
37
|
protected readonly describedBy: import("@angular/core").Signal<string | null>;
|
|
36
38
|
protected readonly effectiveDisabled: import("@angular/core").Signal<boolean>;
|
|
@@ -262,7 +264,13 @@ export declare class RadioButtonComponent<T = unknown> implements RadioButtonVar
|
|
|
262
264
|
"inputFocus": "inputFocus";
|
|
263
265
|
"touch": "touch";
|
|
264
266
|
"value": "valueChange";
|
|
265
|
-
}, never, ["*"], true,
|
|
267
|
+
}, never, ["*"], true, [{
|
|
268
|
+
directive: typeof i1.RippleDirective;
|
|
269
|
+
inputs: {
|
|
270
|
+
"monaRippleDisabled": "monaRippleDisabled";
|
|
271
|
+
};
|
|
272
|
+
outputs: {};
|
|
273
|
+
}]>;
|
|
266
274
|
}
|
|
267
275
|
export declare class RadioGroupComponent<T = unknown> implements FormValueControl<T> {
|
|
268
276
|
#private;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { EnvironmentProviders, InjectionToken, Signal } from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* @description
|
|
5
|
+
* Draws a ripple when the element is pressed: a wave in its text color that spreads from the pointer, stays while the
|
|
6
|
+
* element is held and fades once it is let go. Mona UI's buttons and other pressable components apply it themselves.
|
|
7
|
+
* It draws nothing until ripples are turned on with `provideRipple()`.
|
|
8
|
+
*
|
|
9
|
+
* The wave covers the element's padding box, over its background and under its content. For that, the first press
|
|
10
|
+
* gives the element `isolation: isolate`, and makes it `relative` if its position is `static`. The wave spreads over
|
|
11
|
+
* `--mona-ripple-duration`, 450ms unless set, fades over `--mona-ripple-fade-duration`, 300ms unless set, and its
|
|
12
|
+
* opacity is `--mona-ripple-opacity`, 12% unless set.
|
|
13
|
+
*
|
|
14
|
+
* There is no ripple on a disabled or `aria-disabled` element, with the system's reduced motion setting, or in forced
|
|
15
|
+
* colors. Keyboard presses have none either: the focus indicator already shows where they act. Nor does a press on a
|
|
16
|
+
* control inside the element, such as a button or a link, which belongs to that control, unless the element is the
|
|
17
|
+
* `<label>` of that control.
|
|
18
|
+
*/
|
|
19
|
+
export declare class RippleDirective {
|
|
20
|
+
#private;
|
|
21
|
+
/**
|
|
22
|
+
* @description Turns the ripple off for this element while ripples are on.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
26
|
+
constructor();
|
|
27
|
+
/**
|
|
28
|
+
* Draws the ripple as a halo around a control inside the element, such as a check box's box, which is too small to
|
|
29
|
+
* show a wave inside it. The halo spreads from the control's centre, reaches past its edges and is drawn under it,
|
|
30
|
+
* in the control itself, so it moves with the control, such as a switch's handle. The control must not clip what
|
|
31
|
+
* overflows it, and its position is made `relative` if it is `static`.
|
|
32
|
+
* @hidden Used by Mona UI's own components.
|
|
33
|
+
*/
|
|
34
|
+
setHalo(target: () => HTMLElement | null | undefined): void;
|
|
35
|
+
/**
|
|
36
|
+
* Lets a component that applies this directive as a host directive turn the ripple off, such as a button whose look
|
|
37
|
+
* has no surface to draw it on.
|
|
38
|
+
* @hidden Used by Mona UI's own components.
|
|
39
|
+
*/
|
|
40
|
+
setHostDisabled(disabled: Signal<boolean>): void;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RippleDirective, never>;
|
|
42
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RippleDirective, "[monaRipple]", never, {
|
|
43
|
+
"disabled": {
|
|
44
|
+
"alias": "monaRippleDisabled";
|
|
45
|
+
"required": false;
|
|
46
|
+
"isSignal": true;
|
|
47
|
+
};
|
|
48
|
+
}, {}, never, never, true, never>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @description Ripple settings. Set them for the application with `provideRipple()`.
|
|
52
|
+
*/
|
|
53
|
+
interface RippleOptions {
|
|
54
|
+
/**
|
|
55
|
+
* @description Whether pressing a button, or another element with the `monaRipple` directive, draws a ripple.
|
|
56
|
+
* Ripples are off until `provideRipple()` turns them on.
|
|
57
|
+
*/
|
|
58
|
+
readonly enabled: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Turns on the ripple Mona UI's buttons, and elements with the `monaRipple` directive, draw when pressed. Pass
|
|
62
|
+
* `{ enabled: false }` to keep them off, for example behind a setting.
|
|
63
|
+
*/
|
|
64
|
+
export declare function provideRipple(options?: Partial<RippleOptions>): EnvironmentProviders;
|
|
65
|
+
/** The settings used when nothing is provided with `provideRipple()`: no ripples. */
|
|
66
|
+
export declare const DEFAULT_RIPPLE_OPTIONS: RippleOptions;
|
|
67
|
+
/**
|
|
68
|
+
* @description Ripple settings. Set them for the application with `provideRipple()`, or provide this token on a
|
|
69
|
+
* component to turn ripples on or off for everything inside it.
|
|
70
|
+
*/
|
|
71
|
+
export declare const RIPPLE_OPTIONS: InjectionToken<RippleOptions>;
|
|
72
|
+
export type { RippleOptions };
|
|
@@ -326,6 +326,13 @@ export declare class SidebarMenuSkeletonComponent {
|
|
|
326
326
|
* @default true
|
|
327
327
|
*/
|
|
328
328
|
readonly showIcon: import("@angular/core").InputSignal<boolean>;
|
|
329
|
+
/**
|
|
330
|
+
* @description Additional CSS classes merged onto the host element via `tailwind-merge`. Give it the
|
|
331
|
+
* same height and padding as the menu buttons it stands in for when those are restyled, such as
|
|
332
|
+
* `h-7 px-2` for a denser menu, so the rows don't jump when the real ones arrive.
|
|
333
|
+
* @default ""
|
|
334
|
+
*/
|
|
335
|
+
readonly userClass: import("@angular/core").InputSignalWithTransform<string, ClassInputType>;
|
|
329
336
|
static ɵfac: i0.ɵɵFactoryDeclaration<SidebarMenuSkeletonComponent, never>;
|
|
330
337
|
static ɵcmp: i0.ɵɵComponentDeclaration<SidebarMenuSkeletonComponent, "mona-sidebar-menu-skeleton", never, {
|
|
331
338
|
"labelWidth": {
|
|
@@ -338,6 +345,11 @@ export declare class SidebarMenuSkeletonComponent {
|
|
|
338
345
|
"required": false;
|
|
339
346
|
"isSignal": true;
|
|
340
347
|
};
|
|
348
|
+
"userClass": {
|
|
349
|
+
"alias": "class";
|
|
350
|
+
"required": false;
|
|
351
|
+
"isSignal": true;
|
|
352
|
+
};
|
|
341
353
|
}, {}, never, never, true, never>;
|
|
342
354
|
}
|
|
343
355
|
export declare class SidebarContentDirective {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { TemplateRef } from "@angular/core";
|
|
2
|
+
import { ElementRef, TemplateRef } from "@angular/core";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
import { FormCheckboxControl } from "@angular/forms/signals";
|
|
5
5
|
import { VariantInputs } from "@nanahoshi/mona-ui/internal";
|
|
6
|
+
import * as i1 from "@nanahoshi/mona-ui/ripple";
|
|
6
7
|
declare const switchThemeVariants: (props?: ({
|
|
7
8
|
rounded?: "small" | "none" | "full" | "large" | "medium" | null | undefined;
|
|
8
9
|
size?: "small" | "large" | "medium" | null | undefined;
|
|
@@ -27,6 +28,7 @@ export declare class SwitchComponent implements SwitchVariantInputs, FormCheckbo
|
|
|
27
28
|
protected readonly effectiveDisabled: import("@angular/core").Signal<boolean>;
|
|
28
29
|
protected readonly handleClasses: import("@angular/core").Signal<string>;
|
|
29
30
|
protected readonly handleContentTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
|
|
31
|
+
protected readonly handleRef: import("@angular/core").Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
30
32
|
protected readonly invalidState: import("@angular/core").Signal<boolean>;
|
|
31
33
|
protected readonly labelClasses: import("@angular/core").Signal<string>;
|
|
32
34
|
protected readonly labelledBy: import("@angular/core").Signal<string | null>;
|
|
@@ -202,7 +204,13 @@ export declare class SwitchComponent implements SwitchVariantInputs, FormCheckbo
|
|
|
202
204
|
}, {
|
|
203
205
|
"checked": "checkedChange";
|
|
204
206
|
"touch": "touch";
|
|
205
|
-
}, ["handleContentTemplate", "offLabelTemplate", "onLabelTemplate"], never, true,
|
|
207
|
+
}, ["handleContentTemplate", "offLabelTemplate", "onLabelTemplate"], never, true, [{
|
|
208
|
+
directive: typeof i1.RippleDirective;
|
|
209
|
+
inputs: {
|
|
210
|
+
"monaRippleDisabled": "monaRippleDisabled";
|
|
211
|
+
};
|
|
212
|
+
outputs: {};
|
|
213
|
+
}]>;
|
|
206
214
|
}
|
|
207
215
|
export interface SwitchHandleContentTemplateContext {
|
|
208
216
|
readonly $implicit: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { EnvironmentProviders, InjectionToken, Signal } from "@angular/core";
|
|
3
3
|
import "culori/css";
|
|
4
|
-
export type BuiltInThemeName = "anna" | "luna" | "mona";
|
|
4
|
+
export type BuiltInThemeName = "anna" | "luna" | "mona" | "rena";
|
|
5
5
|
export type ThemeName = string;
|
|
6
6
|
export type ThemeVariant = "light" | "dark";
|
|
7
7
|
/** A variant, or `"system"` to follow the operating system's light or dark setting. */
|
|
@@ -338,6 +338,41 @@ export declare const builtInThemes: Readonly<{
|
|
|
338
338
|
}>;
|
|
339
339
|
};
|
|
340
340
|
}>;
|
|
341
|
+
rena: Readonly<{
|
|
342
|
+
name: string;
|
|
343
|
+
variants: {
|
|
344
|
+
light: Readonly<{
|
|
345
|
+
colors: Readonly<Record<`--color-${string}`, string>>;
|
|
346
|
+
components: Readonly<Record<ThemeComponentVariable, string>>;
|
|
347
|
+
custom: Readonly<{
|
|
348
|
+
"--mona-indicator-color": "var(--color-primary)";
|
|
349
|
+
"--mona-indicator-foreground": "var(--color-primary-foreground)";
|
|
350
|
+
"--mona-primary-text-color": "var(--color-primary)";
|
|
351
|
+
"--mona-focus-ring-opacity": "100%";
|
|
352
|
+
"--mona-focus-ring-width": "1px";
|
|
353
|
+
}>;
|
|
354
|
+
effects: Readonly<Record<ThemeEffectVariable, string>>;
|
|
355
|
+
motion: Readonly<Record<ThemeMotionVariable, string>>;
|
|
356
|
+
shape: Readonly<Record<ThemeShapeVariable, string>>;
|
|
357
|
+
shadows: Readonly<Record<`--shadow-${string}`, string>>;
|
|
358
|
+
}>;
|
|
359
|
+
dark: Readonly<{
|
|
360
|
+
colors: Readonly<Record<`--color-${string}`, string>>;
|
|
361
|
+
components: Readonly<Record<ThemeComponentVariable, string>>;
|
|
362
|
+
custom: Readonly<{
|
|
363
|
+
"--mona-indicator-color": "var(--color-focus-indicator)";
|
|
364
|
+
"--mona-indicator-foreground": "#111827";
|
|
365
|
+
"--mona-primary-text-color": "var(--color-focus-indicator)";
|
|
366
|
+
"--mona-focus-ring-opacity": "100%";
|
|
367
|
+
"--mona-focus-ring-width": "1px";
|
|
368
|
+
}>;
|
|
369
|
+
effects: Readonly<Record<ThemeEffectVariable, string>>;
|
|
370
|
+
motion: Readonly<Record<ThemeMotionVariable, string>>;
|
|
371
|
+
shape: Readonly<Record<ThemeShapeVariable, string>>;
|
|
372
|
+
shadows: Readonly<Record<`--shadow-${string}`, string>>;
|
|
373
|
+
}>;
|
|
374
|
+
};
|
|
375
|
+
}>;
|
|
341
376
|
}>;
|
|
342
377
|
export declare const lunaTheme: Readonly<{
|
|
343
378
|
name: string;
|
|
@@ -457,6 +492,41 @@ export declare const monaTheme: Readonly<{
|
|
|
457
492
|
}>;
|
|
458
493
|
};
|
|
459
494
|
}>;
|
|
495
|
+
export declare const renaTheme: Readonly<{
|
|
496
|
+
name: string;
|
|
497
|
+
variants: {
|
|
498
|
+
light: Readonly<{
|
|
499
|
+
colors: Readonly<Record<`--color-${string}`, string>>;
|
|
500
|
+
components: Readonly<Record<ThemeComponentVariable, string>>;
|
|
501
|
+
custom: Readonly<{
|
|
502
|
+
"--mona-indicator-color": "var(--color-primary)";
|
|
503
|
+
"--mona-indicator-foreground": "var(--color-primary-foreground)";
|
|
504
|
+
"--mona-primary-text-color": "var(--color-primary)";
|
|
505
|
+
"--mona-focus-ring-opacity": "100%";
|
|
506
|
+
"--mona-focus-ring-width": "1px";
|
|
507
|
+
}>;
|
|
508
|
+
effects: Readonly<Record<ThemeEffectVariable, string>>;
|
|
509
|
+
motion: Readonly<Record<ThemeMotionVariable, string>>;
|
|
510
|
+
shape: Readonly<Record<ThemeShapeVariable, string>>;
|
|
511
|
+
shadows: Readonly<Record<`--shadow-${string}`, string>>;
|
|
512
|
+
}>;
|
|
513
|
+
dark: Readonly<{
|
|
514
|
+
colors: Readonly<Record<`--color-${string}`, string>>;
|
|
515
|
+
components: Readonly<Record<ThemeComponentVariable, string>>;
|
|
516
|
+
custom: Readonly<{
|
|
517
|
+
"--mona-indicator-color": "var(--color-focus-indicator)";
|
|
518
|
+
"--mona-indicator-foreground": "#111827";
|
|
519
|
+
"--mona-primary-text-color": "var(--color-focus-indicator)";
|
|
520
|
+
"--mona-focus-ring-opacity": "100%";
|
|
521
|
+
"--mona-focus-ring-width": "1px";
|
|
522
|
+
}>;
|
|
523
|
+
effects: Readonly<Record<ThemeEffectVariable, string>>;
|
|
524
|
+
motion: Readonly<Record<ThemeMotionVariable, string>>;
|
|
525
|
+
shape: Readonly<Record<ThemeShapeVariable, string>>;
|
|
526
|
+
shadows: Readonly<Record<`--shadow-${string}`, string>>;
|
|
527
|
+
}>;
|
|
528
|
+
};
|
|
529
|
+
}>;
|
|
460
530
|
/**
|
|
461
531
|
* Builds the sidebar's own colour roles. The sidebar is a persistent chrome region rather than page
|
|
462
532
|
* content, so it is given a surface of its own instead of borrowing the page's — which is what lets a
|