@loomui-ng/ui 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +46 -2
- package/accordion/README.md +38 -0
- package/alert/README.md +32 -0
- package/alert-dialog/README.md +37 -0
- package/aspect-ratio/README.md +24 -0
- package/attachment/README.md +40 -0
- package/avatar/README.md +34 -0
- package/badge/README.md +29 -0
- package/breadcrumb/README.md +33 -0
- package/bubble/README.md +32 -0
- package/button/README.md +31 -0
- package/button-group/README.md +30 -0
- package/calendar/README.md +35 -0
- package/card/README.md +41 -0
- package/carousel/README.md +41 -0
- package/chart/README.md +25 -0
- package/checkbox/README.md +31 -0
- package/collapsible/README.md +31 -0
- package/combobox/README.md +47 -0
- package/command/README.md +44 -0
- package/context-menu/README.md +36 -0
- package/data-table/README.md +39 -0
- package/date-picker/README.md +23 -0
- package/dialog/README.md +52 -0
- package/direction/README.md +19 -0
- package/drawer/README.md +37 -0
- package/dropdown-menu/README.md +46 -0
- package/empty/README.md +38 -0
- package/fesm2022/loomui-ng-ui-accordion.mjs +555 -0
- package/fesm2022/loomui-ng-ui-accordion.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-alert-dialog.mjs +652 -0
- package/fesm2022/loomui-ng-ui-alert-dialog.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-alert.mjs +286 -0
- package/fesm2022/loomui-ng-ui-alert.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-aspect-ratio.mjs +97 -0
- package/fesm2022/loomui-ng-ui-aspect-ratio.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-attachment.mjs +713 -0
- package/fesm2022/loomui-ng-ui-attachment.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-avatar.mjs +561 -0
- package/fesm2022/loomui-ng-ui-avatar.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-badge.mjs +102 -0
- package/fesm2022/loomui-ng-ui-badge.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-breadcrumb.mjs +520 -0
- package/fesm2022/loomui-ng-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-bubble.mjs +386 -0
- package/fesm2022/loomui-ng-ui-bubble.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-button-group.mjs +193 -0
- package/fesm2022/loomui-ng-ui-button-group.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-button.mjs +162 -0
- package/fesm2022/loomui-ng-ui-button.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-calendar.mjs +681 -0
- package/fesm2022/loomui-ng-ui-calendar.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-card.mjs +461 -0
- package/fesm2022/loomui-ng-ui-card.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-carousel.mjs +532 -0
- package/fesm2022/loomui-ng-ui-carousel.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-chart.mjs +373 -0
- package/fesm2022/loomui-ng-ui-chart.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-checkbox.mjs +265 -0
- package/fesm2022/loomui-ng-ui-checkbox.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-collapsible.mjs +274 -0
- package/fesm2022/loomui-ng-ui-collapsible.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-combobox.mjs +971 -0
- package/fesm2022/loomui-ng-ui-combobox.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-command.mjs +982 -0
- package/fesm2022/loomui-ng-ui-command.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-context-menu.mjs +1359 -0
- package/fesm2022/loomui-ng-ui-context-menu.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-data-table.mjs +535 -0
- package/fesm2022/loomui-ng-ui-data-table.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-date-picker.mjs +312 -0
- package/fesm2022/loomui-ng-ui-date-picker.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-dialog.mjs +508 -0
- package/fesm2022/loomui-ng-ui-dialog.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-direction.mjs +112 -0
- package/fesm2022/loomui-ng-ui-direction.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-drawer.mjs +590 -0
- package/fesm2022/loomui-ng-ui-drawer.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-dropdown-menu.mjs +1322 -0
- package/fesm2022/loomui-ng-ui-dropdown-menu.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-empty.mjs +408 -0
- package/fesm2022/loomui-ng-ui-empty.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-field.mjs +630 -0
- package/fesm2022/loomui-ng-ui-field.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-hover-card.mjs +230 -0
- package/fesm2022/loomui-ng-ui-hover-card.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-icon.mjs +498 -0
- package/fesm2022/loomui-ng-ui-icon.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-input-group.mjs +463 -0
- package/fesm2022/loomui-ng-ui-input-group.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-input-otp.mjs +586 -0
- package/fesm2022/loomui-ng-ui-input-otp.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-input.mjs +289 -0
- package/fesm2022/loomui-ng-ui-input.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-item.mjs +598 -0
- package/fesm2022/loomui-ng-ui-item.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-kbd.mjs +129 -0
- package/fesm2022/loomui-ng-ui-kbd.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-label.mjs +68 -0
- package/fesm2022/loomui-ng-ui-label.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-marker.mjs +234 -0
- package/fesm2022/loomui-ng-ui-marker.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-menubar.mjs +1523 -0
- package/fesm2022/loomui-ng-ui-menubar.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-message-scroller.mjs +519 -0
- package/fesm2022/loomui-ng-ui-message-scroller.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-message.mjs +408 -0
- package/fesm2022/loomui-ng-ui-message.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-native-select.mjs +389 -0
- package/fesm2022/loomui-ng-ui-native-select.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-navigation-menu.mjs +609 -0
- package/fesm2022/loomui-ng-ui-navigation-menu.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-pagination.mjs +611 -0
- package/fesm2022/loomui-ng-ui-pagination.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-popover.mjs +358 -0
- package/fesm2022/loomui-ng-ui-popover.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-progress.mjs +159 -0
- package/fesm2022/loomui-ng-ui-progress.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-questionnaire.mjs +1012 -0
- package/fesm2022/loomui-ng-ui-questionnaire.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-radio-group.mjs +399 -0
- package/fesm2022/loomui-ng-ui-radio-group.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-resizable.mjs +518 -0
- package/fesm2022/loomui-ng-ui-resizable.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-scroll-area.mjs +135 -0
- package/fesm2022/loomui-ng-ui-scroll-area.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-select.mjs +863 -0
- package/fesm2022/loomui-ng-ui-select.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-separator.mjs +114 -0
- package/fesm2022/loomui-ng-ui-separator.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-sheet.mjs +530 -0
- package/fesm2022/loomui-ng-ui-sheet.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-sidebar.mjs +1918 -0
- package/fesm2022/loomui-ng-ui-sidebar.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-skeleton.mjs +69 -0
- package/fesm2022/loomui-ng-ui-skeleton.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-slider.mjs +390 -0
- package/fesm2022/loomui-ng-ui-slider.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-spinner.mjs +85 -0
- package/fesm2022/loomui-ng-ui-spinner.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-switch.mjs +212 -0
- package/fesm2022/loomui-ng-ui-switch.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-table.mjs +559 -0
- package/fesm2022/loomui-ng-ui-table.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-tabs.mjs +544 -0
- package/fesm2022/loomui-ng-ui-tabs.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-textarea.mjs +206 -0
- package/fesm2022/loomui-ng-ui-textarea.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-toast.mjs +432 -0
- package/fesm2022/loomui-ng-ui-toast.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-toggle-group.mjs +477 -0
- package/fesm2022/loomui-ng-ui-toggle-group.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-toggle.mjs +219 -0
- package/fesm2022/loomui-ng-ui-toggle.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-tooltip.mjs +240 -0
- package/fesm2022/loomui-ng-ui-tooltip.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-typography.mjs +129 -0
- package/fesm2022/loomui-ng-ui-typography.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-utils.mjs +1533 -0
- package/fesm2022/loomui-ng-ui-utils.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui.mjs +4 -0
- package/fesm2022/loomui-ng-ui.mjs.map +1 -0
- package/field/README.md +43 -0
- package/hover-card/README.md +31 -0
- package/icon/README.md +42 -0
- package/input/README.md +26 -0
- package/input-group/README.md +40 -0
- package/input-otp/README.md +35 -0
- package/item/README.md +33 -0
- package/kbd/README.md +21 -0
- package/label/README.md +24 -0
- package/marker/README.md +24 -0
- package/menubar/README.md +40 -0
- package/message/README.md +32 -0
- package/message-scroller/README.md +40 -0
- package/native-select/README.md +26 -0
- package/navigation-menu/README.md +39 -0
- package/package.json +325 -3
- package/pagination/README.md +37 -0
- package/popover/README.md +37 -0
- package/progress/README.md +25 -0
- package/questionnaire/README.md +52 -0
- package/radio-group/README.md +33 -0
- package/resizable/README.md +37 -0
- package/scroll-area/README.md +25 -0
- package/select/README.md +45 -0
- package/separator/README.md +28 -0
- package/sheet/README.md +38 -0
- package/sidebar/README.md +60 -0
- package/skeleton/README.md +21 -0
- package/slider/README.md +29 -0
- package/spinner/README.md +15 -0
- package/styles/loomui.css +330 -0
- package/switch/README.md +29 -0
- package/table/README.md +31 -0
- package/tabs/README.md +42 -0
- package/textarea/README.md +28 -0
- package/toast/README.md +27 -0
- package/toggle/README.md +27 -0
- package/toggle-group/README.md +37 -0
- package/tooltip/README.md +31 -0
- package/types/loomui-ng-ui-accordion.d.ts +141 -0
- package/types/loomui-ng-ui-alert-dialog.d.ts +175 -0
- package/types/loomui-ng-ui-alert.d.ts +77 -0
- package/types/loomui-ng-ui-aspect-ratio.d.ts +31 -0
- package/types/loomui-ng-ui-attachment.d.ts +192 -0
- package/types/loomui-ng-ui-avatar.d.ts +147 -0
- package/types/loomui-ng-ui-badge.d.ts +32 -0
- package/types/loomui-ng-ui-breadcrumb.d.ts +118 -0
- package/types/loomui-ng-ui-bubble.d.ts +100 -0
- package/types/loomui-ng-ui-button-group.d.ts +51 -0
- package/types/loomui-ng-ui-button.d.ts +57 -0
- package/types/loomui-ng-ui-calendar.d.ts +171 -0
- package/types/loomui-ng-ui-card.d.ts +123 -0
- package/types/loomui-ng-ui-carousel.d.ts +140 -0
- package/types/loomui-ng-ui-chart.d.ts +95 -0
- package/types/loomui-ng-ui-checkbox.d.ts +62 -0
- package/types/loomui-ng-ui-collapsible.d.ts +74 -0
- package/types/loomui-ng-ui-combobox.d.ts +229 -0
- package/types/loomui-ng-ui-command.d.ts +231 -0
- package/types/loomui-ng-ui-context-menu.d.ts +288 -0
- package/types/loomui-ng-ui-data-table.d.ts +111 -0
- package/types/loomui-ng-ui-date-picker.d.ts +63 -0
- package/types/loomui-ng-ui-dialog.d.ts +127 -0
- package/types/loomui-ng-ui-direction.d.ts +42 -0
- package/types/loomui-ng-ui-drawer.d.ts +149 -0
- package/types/loomui-ng-ui-dropdown-menu.d.ts +258 -0
- package/types/loomui-ng-ui-empty.d.ts +109 -0
- package/types/loomui-ng-ui-field.d.ts +169 -0
- package/types/loomui-ng-ui-hover-card.d.ts +62 -0
- package/types/loomui-ng-ui-icon.d.ts +156 -0
- package/types/loomui-ng-ui-input-group.d.ts +130 -0
- package/types/loomui-ng-ui-input-otp.d.ts +149 -0
- package/types/loomui-ng-ui-input.d.ts +89 -0
- package/types/loomui-ng-ui-item.d.ts +157 -0
- package/types/loomui-ng-ui-kbd.d.ts +36 -0
- package/types/loomui-ng-ui-label.d.ts +19 -0
- package/types/loomui-ng-ui-marker.d.ts +61 -0
- package/types/loomui-ng-ui-menubar.d.ts +321 -0
- package/types/loomui-ng-ui-message-scroller.d.ts +138 -0
- package/types/loomui-ng-ui-message.d.ts +109 -0
- package/types/loomui-ng-ui-native-select.d.ts +84 -0
- package/types/loomui-ng-ui-navigation-menu.d.ts +160 -0
- package/types/loomui-ng-ui-pagination.d.ts +130 -0
- package/types/loomui-ng-ui-popover.d.ts +90 -0
- package/types/loomui-ng-ui-progress.d.ts +39 -0
- package/types/loomui-ng-ui-questionnaire.d.ts +274 -0
- package/types/loomui-ng-ui-radio-group.d.ts +109 -0
- package/types/loomui-ng-ui-resizable.d.ts +121 -0
- package/types/loomui-ng-ui-scroll-area.d.ts +44 -0
- package/types/loomui-ng-ui-select.d.ts +204 -0
- package/types/loomui-ng-ui-separator.d.ts +35 -0
- package/types/loomui-ng-ui-sheet.d.ts +124 -0
- package/types/loomui-ng-ui-sidebar.d.ts +485 -0
- package/types/loomui-ng-ui-skeleton.d.ts +20 -0
- package/types/loomui-ng-ui-slider.d.ts +103 -0
- package/types/loomui-ng-ui-spinner.d.ts +19 -0
- package/types/loomui-ng-ui-switch.d.ts +56 -0
- package/types/loomui-ng-ui-table.d.ts +148 -0
- package/types/loomui-ng-ui-tabs.d.ts +148 -0
- package/types/loomui-ng-ui-textarea.d.ts +52 -0
- package/types/loomui-ng-ui-toast.d.ts +97 -0
- package/types/loomui-ng-ui-toggle-group.d.ts +138 -0
- package/types/loomui-ng-ui-toggle.d.ts +63 -0
- package/types/loomui-ng-ui-tooltip.d.ts +63 -0
- package/types/loomui-ng-ui-typography.d.ts +42 -0
- package/types/loomui-ng-ui-utils.d.ts +392 -0
- package/types/loomui-ng-ui.d.ts +5 -0
- package/typography/README.md +29 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ControlValueAccessor } from "@angular/forms";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@loomui-ng/ui/utils";
|
|
5
|
+
/** Classes derived from the live Toggle (docs/behavior-specs/toggle.md); pl/pr → ps/pe for RTL. */
|
|
6
|
+
export declare const toggleVariants: (props?: ({
|
|
7
|
+
variant?: "default" | "outline" | null | undefined;
|
|
8
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
export type ToggleVariants = VariantProps<typeof toggleVariants>;
|
|
11
|
+
/** <button uiToggle [(pressed)]="bold" aria-label="Toggle bold">B</button> */
|
|
12
|
+
export declare class UiToggle implements ControlValueAccessor {
|
|
13
|
+
readonly pressed: import("@angular/core").ModelSignal<boolean>;
|
|
14
|
+
readonly variant: import("@angular/core").InputSignal<NonNullable<"default" | "outline" | null | undefined>>;
|
|
15
|
+
readonly size: import("@angular/core").InputSignal<NonNullable<"default" | "sm" | "lg" | null | undefined>>;
|
|
16
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
17
|
+
readonly userClass: import("@angular/core").InputSignal<string>;
|
|
18
|
+
private readonly cvaDisabled;
|
|
19
|
+
protected readonly isDisabled: import("@angular/core").Signal<boolean>;
|
|
20
|
+
protected readonly classes: import("@angular/core").Signal<string>;
|
|
21
|
+
private onChange;
|
|
22
|
+
protected onTouched: () => void;
|
|
23
|
+
protected toggle(): void;
|
|
24
|
+
writeValue(v: boolean | null): void;
|
|
25
|
+
registerOnChange(fn: (v: boolean) => void): void;
|
|
26
|
+
registerOnTouched(fn: () => void): void;
|
|
27
|
+
setDisabledState(d: boolean): void;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiToggle, never>;
|
|
29
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiToggle, "button[uiToggle], ui-toggle", ["uiToggle"], {
|
|
30
|
+
"pressed": {
|
|
31
|
+
"alias": "pressed";
|
|
32
|
+
"required": false;
|
|
33
|
+
"isSignal": true;
|
|
34
|
+
};
|
|
35
|
+
"variant": {
|
|
36
|
+
"alias": "variant";
|
|
37
|
+
"required": false;
|
|
38
|
+
"isSignal": true;
|
|
39
|
+
};
|
|
40
|
+
"size": {
|
|
41
|
+
"alias": "size";
|
|
42
|
+
"required": false;
|
|
43
|
+
"isSignal": true;
|
|
44
|
+
};
|
|
45
|
+
"disabled": {
|
|
46
|
+
"alias": "disabled";
|
|
47
|
+
"required": false;
|
|
48
|
+
"isSignal": true;
|
|
49
|
+
};
|
|
50
|
+
"userClass": {
|
|
51
|
+
"alias": "class";
|
|
52
|
+
"required": false;
|
|
53
|
+
"isSignal": true;
|
|
54
|
+
};
|
|
55
|
+
}, {
|
|
56
|
+
"pressed": "pressedChange";
|
|
57
|
+
}, never, never, true, [{
|
|
58
|
+
directive: typeof i1.UiElementHost;
|
|
59
|
+
inputs: {};
|
|
60
|
+
outputs: {};
|
|
61
|
+
}]>;
|
|
62
|
+
}
|
|
63
|
+
export declare const UI_TOGGLE: readonly [typeof UiToggle];
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as i1 from "@loomui-ng/ui/utils";
|
|
2
|
+
import { UiLayerRoot, UiPopperContentBase } from "@loomui-ng/ui/utils";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* <div uiTooltip class="contents">
|
|
6
|
+
* <button uiButton uiTooltipTrigger>Hover</button>
|
|
7
|
+
* <div uiTooltipContent>Add to library</div>
|
|
8
|
+
* </div>
|
|
9
|
+
*
|
|
10
|
+
* Observed on live site: content `data-state="delayed-open"` when opened by hover; a visually-hidden
|
|
11
|
+
* `role="tooltip"` copy of the text is inside the content and referenced by the trigger's aria-describedby.
|
|
12
|
+
*/
|
|
13
|
+
export declare class UiTooltip extends UiLayerRoot {
|
|
14
|
+
/** Hover-open delay in ms (shadcn default is 0). */
|
|
15
|
+
readonly delay: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
16
|
+
readonly openedBy: import("@angular/core").WritableSignal<"hover" | "focus">;
|
|
17
|
+
private timer;
|
|
18
|
+
constructor();
|
|
19
|
+
show(by: 'hover' | 'focus'): void;
|
|
20
|
+
hide(graceMs?: number): void;
|
|
21
|
+
cancelHide(): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiTooltip, never>;
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiTooltip, "[uiTooltip], ui-tooltip", ["uiTooltip"], {
|
|
24
|
+
"delay": {
|
|
25
|
+
"alias": "delay";
|
|
26
|
+
"required": false;
|
|
27
|
+
"isSignal": true;
|
|
28
|
+
};
|
|
29
|
+
}, {}, never, never, true, [{
|
|
30
|
+
directive: typeof i1.UiElementHost;
|
|
31
|
+
inputs: {};
|
|
32
|
+
outputs: {};
|
|
33
|
+
}]>;
|
|
34
|
+
}
|
|
35
|
+
export declare class UiTooltipTrigger {
|
|
36
|
+
protected readonly tip: UiTooltip;
|
|
37
|
+
constructor();
|
|
38
|
+
protected onEnter(e: PointerEvent): void;
|
|
39
|
+
protected onFocus(): void;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiTooltipTrigger, never>;
|
|
41
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiTooltipTrigger, "[uiTooltipTrigger], ui-tooltip-trigger", never, {}, {}, never, never, true, [{
|
|
42
|
+
directive: typeof i1.UiElementHost;
|
|
43
|
+
inputs: {};
|
|
44
|
+
outputs: {};
|
|
45
|
+
}]>;
|
|
46
|
+
}
|
|
47
|
+
export declare class UiTooltipContent extends UiPopperContentBase {
|
|
48
|
+
protected readonly root: UiTooltip;
|
|
49
|
+
protected readonly varPrefix = "--radix-tooltip";
|
|
50
|
+
protected readonly classes: import("@angular/core").Signal<string>;
|
|
51
|
+
private sr;
|
|
52
|
+
private arrow;
|
|
53
|
+
constructor();
|
|
54
|
+
protected onAttached(): void;
|
|
55
|
+
protected onDetached(): void;
|
|
56
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiTooltipContent, never>;
|
|
57
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiTooltipContent, "[uiTooltipContent], ui-tooltip-content", never, {}, {}, never, never, true, [{
|
|
58
|
+
directive: typeof i1.UiElementHost;
|
|
59
|
+
inputs: {};
|
|
60
|
+
outputs: {};
|
|
61
|
+
}]>;
|
|
62
|
+
}
|
|
63
|
+
export declare const UI_TOOLTIP: readonly [typeof UiTooltip, typeof UiTooltipTrigger, typeof UiTooltipContent];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@loomui-ng/ui/utils";
|
|
3
|
+
export type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'p' | 'blockquote' | 'list' | 'code' | 'lead' | 'large' | 'small' | 'muted';
|
|
4
|
+
export declare const typographyClasses: Record<TypographyVariant, string>;
|
|
5
|
+
/**
|
|
6
|
+
* Typographic styles as a directive: <h1 uiTypography="h1">Title</h1>, <p uiTypography="lead">…</p>, or as an element:
|
|
7
|
+
* <ui-typography variant="h1">Title</ui-typography>.
|
|
8
|
+
* Deviation: the live docs Typography page now redirects to "Typeset" (a CSS system with its own builder). This ships the
|
|
9
|
+
* classic shadcn typography recipe (class strings from the former docs page) as a thin directive; Typeset is not reproduced.
|
|
10
|
+
*/
|
|
11
|
+
export declare class UiTypography {
|
|
12
|
+
/** Attribute form: `<p uiTypography="lead">`. */
|
|
13
|
+
readonly attrVariant: import("@angular/core").InputSignal<"" | TypographyVariant>;
|
|
14
|
+
/** Element form: `<ui-typography variant="lead">`. */
|
|
15
|
+
readonly elVariant: import("@angular/core").InputSignal<"" | TypographyVariant>;
|
|
16
|
+
readonly variant: import("@angular/core").Signal<TypographyVariant>;
|
|
17
|
+
readonly userClass: import("@angular/core").InputSignal<string>;
|
|
18
|
+
protected readonly classes: import("@angular/core").Signal<string>;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiTypography, never>;
|
|
20
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiTypography, "[uiTypography], ui-typography", never, {
|
|
21
|
+
"attrVariant": {
|
|
22
|
+
"alias": "uiTypography";
|
|
23
|
+
"required": false;
|
|
24
|
+
"isSignal": true;
|
|
25
|
+
};
|
|
26
|
+
"elVariant": {
|
|
27
|
+
"alias": "variant";
|
|
28
|
+
"required": false;
|
|
29
|
+
"isSignal": true;
|
|
30
|
+
};
|
|
31
|
+
"userClass": {
|
|
32
|
+
"alias": "class";
|
|
33
|
+
"required": false;
|
|
34
|
+
"isSignal": true;
|
|
35
|
+
};
|
|
36
|
+
}, {}, never, never, true, [{
|
|
37
|
+
directive: typeof i1.UiElementHost;
|
|
38
|
+
inputs: {};
|
|
39
|
+
outputs: {};
|
|
40
|
+
}]>;
|
|
41
|
+
}
|
|
42
|
+
export declare const UI_TYPOGRAPHY: readonly [typeof UiTypography];
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import { ClassValue } from "clsx";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ElementRef, InjectionToken, Injector, WritableSignal } from "@angular/core";
|
|
4
|
+
import { Directionality } from "@angular/cdk/bidi";
|
|
5
|
+
import { ConnectedPosition, Overlay, OverlayRef } from "@angular/cdk/overlay";
|
|
6
|
+
import { FocusKeyManager, FocusableOption } from "@angular/cdk/a11y";
|
|
7
|
+
import { ControlValueAccessor } from "@angular/forms";
|
|
8
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
9
|
+
/** Unique, stable-per-session id like `ui-dialog-3`. */
|
|
10
|
+
export declare const nextId: (prefix: string) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Radix (via `aria-hidden`) hides everything outside a modal layer from assistive tech.
|
|
13
|
+
* Marks every <body> child except the CDK overlay container with aria-hidden + data-aria-hidden,
|
|
14
|
+
* and returns a function that restores the previous state.
|
|
15
|
+
*/
|
|
16
|
+
export declare function hideOthers(keep: Element): () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Resolves when the element's CSS animations (tw-animate-css `animate-out`) have finished, or after a
|
|
19
|
+
* fallback timeout so we never keep an overlay mounted forever (reduced motion, no animation, hidden tab).
|
|
20
|
+
*/
|
|
21
|
+
export declare function whenAnimationDone(el: HTMLElement | null, fallbackMs?: number): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* State holder shared by every overlay root (Dialog, Sheet, Popover, DropdownMenu, Select, Tooltip).
|
|
24
|
+
* `open` is the source of truth; `mounted` stays true until the exit animation finishes so the content can
|
|
25
|
+
* play tw-animate-css `animate-out` with data-state="closed" (observed on the live site).
|
|
26
|
+
*/
|
|
27
|
+
export declare abstract class UiLayerRoot {
|
|
28
|
+
readonly open: import("@angular/core").ModelSignal<boolean>;
|
|
29
|
+
readonly id: string;
|
|
30
|
+
readonly mounted: import("@angular/core").WritableSignal<boolean>;
|
|
31
|
+
readonly state: import("@angular/core").WritableSignal<"open" | "closed">;
|
|
32
|
+
readonly trigger: import("@angular/core").WritableSignal<HTMLElement | null>;
|
|
33
|
+
readonly contentEl: import("@angular/core").WritableSignal<HTMLElement | null>;
|
|
34
|
+
/** Virtual anchor (context menus open at the pointer instead of a trigger element). */
|
|
35
|
+
readonly anchorPoint: import("@angular/core").WritableSignal<{
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
} | null>;
|
|
39
|
+
/** Panes of nested layers (sub-menus): clicks inside them are not "outside" for this layer. */
|
|
40
|
+
readonly childPanes: Set<HTMLElement>;
|
|
41
|
+
constructor();
|
|
42
|
+
toggle(): void;
|
|
43
|
+
close(): void;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiLayerRoot, never>;
|
|
45
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiLayerRoot, never, never, {
|
|
46
|
+
"open": {
|
|
47
|
+
"alias": "open";
|
|
48
|
+
"required": false;
|
|
49
|
+
"isSignal": true;
|
|
50
|
+
};
|
|
51
|
+
}, {
|
|
52
|
+
"open": "openChange";
|
|
53
|
+
}, never, never, true, never>;
|
|
54
|
+
}
|
|
55
|
+
export type Side = 'top' | 'right' | 'bottom' | 'left';
|
|
56
|
+
export type Align = 'start' | 'center' | 'end';
|
|
57
|
+
interface Meta {
|
|
58
|
+
side: Side;
|
|
59
|
+
align: Align;
|
|
60
|
+
}
|
|
61
|
+
/** Preferred placement first, then the opposite side as a flip fallback (what Radix/floating-ui do). */
|
|
62
|
+
export declare function buildPositions(side: Side, align: Align, sideOffset: number, rtl: boolean): {
|
|
63
|
+
positions: ConnectedPosition[];
|
|
64
|
+
meta: WeakMap<ConnectedPosition, Meta>;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Base for popper-based content (Popover, DropdownMenu, Select, Tooltip). The host element is declared inline,
|
|
68
|
+
* hidden, and moved into a CDK connected overlay (DomPortal) while `root.mounted()`.
|
|
69
|
+
*/
|
|
70
|
+
export declare abstract class UiPopperContentBase {
|
|
71
|
+
protected abstract readonly root: UiLayerRoot;
|
|
72
|
+
/** CSS custom-property prefix used by shadcn classes, e.g. `--radix-popover`. */
|
|
73
|
+
protected abstract readonly varPrefix: string;
|
|
74
|
+
readonly side: import("@angular/core").InputSignal<Side>;
|
|
75
|
+
readonly align: import("@angular/core").InputSignal<Align>;
|
|
76
|
+
readonly sideOffset: import("@angular/core").InputSignal<number>;
|
|
77
|
+
readonly userClass: import("@angular/core").InputSignal<string>;
|
|
78
|
+
protected readonly el: HTMLElement;
|
|
79
|
+
protected readonly overlay: Overlay;
|
|
80
|
+
protected readonly dir: Directionality;
|
|
81
|
+
protected readonly injector: Injector;
|
|
82
|
+
protected overlayRef: OverlayRef | null;
|
|
83
|
+
private lastActive;
|
|
84
|
+
/** Hook for subclasses. Return false to skip default focus handling. */
|
|
85
|
+
protected onAttached(): void;
|
|
86
|
+
protected onDetached(): void;
|
|
87
|
+
/** Whether outside pointer / Esc should close. Tooltip overrides to false. */
|
|
88
|
+
protected closeOnOutside: boolean;
|
|
89
|
+
protected restoreFocusOnClose: boolean;
|
|
90
|
+
protected matchTriggerWidth: boolean;
|
|
91
|
+
protected init(): void;
|
|
92
|
+
private attach;
|
|
93
|
+
private detach;
|
|
94
|
+
/** Hook: sub-menus register their pane with the parent layer. */
|
|
95
|
+
protected registerChildPane(): void;
|
|
96
|
+
private setVars;
|
|
97
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiPopperContentBase, never>;
|
|
98
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiPopperContentBase, never, never, {
|
|
99
|
+
"side": {
|
|
100
|
+
"alias": "side";
|
|
101
|
+
"required": false;
|
|
102
|
+
"isSignal": true;
|
|
103
|
+
};
|
|
104
|
+
"align": {
|
|
105
|
+
"alias": "align";
|
|
106
|
+
"required": false;
|
|
107
|
+
"isSignal": true;
|
|
108
|
+
};
|
|
109
|
+
"sideOffset": {
|
|
110
|
+
"alias": "sideOffset";
|
|
111
|
+
"required": false;
|
|
112
|
+
"isSignal": true;
|
|
113
|
+
};
|
|
114
|
+
"userClass": {
|
|
115
|
+
"alias": "class";
|
|
116
|
+
"required": false;
|
|
117
|
+
"isSignal": true;
|
|
118
|
+
};
|
|
119
|
+
}, {}, never, never, true, never>;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Shared engine for Dialog and Sheet (Radix Dialog equivalent); state lives in UiLayerRoot.
|
|
123
|
+
* Contract (see docs/behavior-specs/dialog.md): portal to <body>, overlay + content as siblings, focus trap,
|
|
124
|
+
* first tabbable focused on open, focus restored to the trigger on close, Esc / overlay click dismiss,
|
|
125
|
+
* aria-hidden on everything else, body scroll lock, content stays mounted with data-state="closed"
|
|
126
|
+
* until the exit animation finishes.
|
|
127
|
+
*/
|
|
128
|
+
export declare abstract class UiModalRoot extends UiLayerRoot {
|
|
129
|
+
readonly titleId: string;
|
|
130
|
+
readonly descriptionId: string;
|
|
131
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiModalRoot, never>;
|
|
132
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiModalRoot, never, never, {}, {}, never, never, true, never>;
|
|
133
|
+
}
|
|
134
|
+
export interface ModalContentConfig {
|
|
135
|
+
slot: string;
|
|
136
|
+
backdropClass: string;
|
|
137
|
+
/** false for Alert Dialog: clicking the overlay does not dismiss. Default true. */
|
|
138
|
+
closeOnBackdrop?: boolean;
|
|
139
|
+
/** CSS selector of the element to focus on open (Alert Dialog focuses Cancel). Default: first tabbable. */
|
|
140
|
+
initialFocusSelector?: string;
|
|
141
|
+
}
|
|
142
|
+
/** Base for the content directive: moves the host element into a CDK overlay while mounted. */
|
|
143
|
+
export declare abstract class UiModalContentBase {
|
|
144
|
+
protected abstract readonly root: UiModalRoot;
|
|
145
|
+
protected abstract readonly config: ModalContentConfig;
|
|
146
|
+
protected readonly el: HTMLElement;
|
|
147
|
+
private readonly overlay;
|
|
148
|
+
private readonly trapFactory;
|
|
149
|
+
private readonly injector;
|
|
150
|
+
private overlayRef;
|
|
151
|
+
private trap;
|
|
152
|
+
private restoreAria;
|
|
153
|
+
private lastActive;
|
|
154
|
+
readonly userClass: import("@angular/core").InputSignal<string>;
|
|
155
|
+
protected init(): void;
|
|
156
|
+
private attach;
|
|
157
|
+
private detach;
|
|
158
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiModalContentBase, never>;
|
|
159
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiModalContentBase, never, never, {
|
|
160
|
+
"userClass": {
|
|
161
|
+
"alias": "class";
|
|
162
|
+
"required": false;
|
|
163
|
+
"isSignal": true;
|
|
164
|
+
};
|
|
165
|
+
}, {}, never, never, true, never>;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Shared kit behind DropdownMenu, ContextMenu and Menubar (Radix Menu equivalent): items, sub-menus, roving focus,
|
|
169
|
+
* typeahead and keyboard rules live here; the three components only add their own roots, triggers and classes.
|
|
170
|
+
*/
|
|
171
|
+
export declare class UiMenuSelectEvent {
|
|
172
|
+
defaultPrevented: boolean;
|
|
173
|
+
preventDefault(): void;
|
|
174
|
+
}
|
|
175
|
+
/** What an item/content needs from "its" menu (a root menu or a sub-menu). */
|
|
176
|
+
export interface MenuCtx {
|
|
177
|
+
readonly manager: WritableSignal<FocusKeyManager<UiMenuItemBase> | null>;
|
|
178
|
+
readonly contentEl: WritableSignal<HTMLElement | null>;
|
|
179
|
+
readonly childPanes: Set<HTMLElement>;
|
|
180
|
+
readonly dirIsRtl: () => boolean;
|
|
181
|
+
/** Close the whole menu tree (after selecting an item). */
|
|
182
|
+
closeAll(): void;
|
|
183
|
+
/** Menubar: ArrowLeft/Right inside an open menu moves to the neighbouring menu. */
|
|
184
|
+
horizontal?(dir: 'prev' | 'next'): void;
|
|
185
|
+
}
|
|
186
|
+
export declare const UI_MENU_CTX: InjectionToken<MenuCtx>;
|
|
187
|
+
export declare const UI_MENU_ITEM: InjectionToken<UiMenuItemBase>;
|
|
188
|
+
export declare const UI_MENU_SUB: InjectionToken<UiMenuSubBase>;
|
|
189
|
+
export declare abstract class UiMenuRootBase extends UiLayerRoot implements MenuCtx {
|
|
190
|
+
/** Set by the trigger when opened with the keyboard so the content can focus the first/last item. */
|
|
191
|
+
keyboardOpen: 'first' | 'last' | null;
|
|
192
|
+
readonly manager: WritableSignal<FocusKeyManager<UiMenuItemBase> | null>;
|
|
193
|
+
readonly triggerId: WritableSignal<string>;
|
|
194
|
+
private readonly directionality;
|
|
195
|
+
dirIsRtl: () => boolean;
|
|
196
|
+
closeAll(): void;
|
|
197
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiMenuRootBase, never>;
|
|
198
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiMenuRootBase, never, never, {}, {}, never, never, true, never>;
|
|
199
|
+
}
|
|
200
|
+
export declare abstract class UiMenuItemBase implements FocusableOption {
|
|
201
|
+
readonly ctx: MenuCtx;
|
|
202
|
+
protected readonly el: HTMLElement;
|
|
203
|
+
readonly disabledInput: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
204
|
+
readonly select: import("@angular/core").OutputEmitterRef<UiMenuSelectEvent>;
|
|
205
|
+
readonly highlighted: WritableSignal<boolean>;
|
|
206
|
+
readonly userClass: import("@angular/core").InputSignal<string>;
|
|
207
|
+
get disabled(): boolean;
|
|
208
|
+
focus(): void;
|
|
209
|
+
getLabel(): string;
|
|
210
|
+
protected onFocus(): void;
|
|
211
|
+
protected onBlur(): void;
|
|
212
|
+
protected onPointerMove(): void;
|
|
213
|
+
protected onPointerLeave(): void;
|
|
214
|
+
protected keepFocusOnLeave(): boolean;
|
|
215
|
+
/** Run by click or Enter/Space. */
|
|
216
|
+
activate(): void;
|
|
217
|
+
protected beforeSelect(): void;
|
|
218
|
+
/** Sub-menu triggers override to open on ArrowRight/ArrowLeft (direction-aware). */
|
|
219
|
+
openOnArrow(): boolean;
|
|
220
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiMenuItemBase, never>;
|
|
221
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiMenuItemBase, never, never, {
|
|
222
|
+
"disabledInput": {
|
|
223
|
+
"alias": "disabled";
|
|
224
|
+
"required": false;
|
|
225
|
+
"isSignal": true;
|
|
226
|
+
};
|
|
227
|
+
"userClass": {
|
|
228
|
+
"alias": "class";
|
|
229
|
+
"required": false;
|
|
230
|
+
"isSignal": true;
|
|
231
|
+
};
|
|
232
|
+
}, {
|
|
233
|
+
"select": "select";
|
|
234
|
+
}, never, never, true, never>;
|
|
235
|
+
}
|
|
236
|
+
/** Host bindings shared by every menu item directive (spread into `host`; override `data-slot`). */
|
|
237
|
+
export declare const MENU_ITEM_HOST: {
|
|
238
|
+
tabindex: string;
|
|
239
|
+
'[attr.data-disabled]': string;
|
|
240
|
+
'[attr.aria-disabled]': string;
|
|
241
|
+
'[attr.data-highlighted]': string;
|
|
242
|
+
'(focus)': string;
|
|
243
|
+
'(blur)': string;
|
|
244
|
+
'(pointermove)': string;
|
|
245
|
+
'(pointerleave)': string;
|
|
246
|
+
'(click)': string;
|
|
247
|
+
};
|
|
248
|
+
/** A sub-menu root: it is itself a menu context nested in its parent's. */
|
|
249
|
+
export declare abstract class UiMenuSubBase extends UiMenuRootBase {
|
|
250
|
+
readonly parent: MenuCtx;
|
|
251
|
+
closeAll(): void;
|
|
252
|
+
dirIsRtl: () => boolean;
|
|
253
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiMenuSubBase, never>;
|
|
254
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiMenuSubBase, never, never, {}, {}, never, never, true, never>;
|
|
255
|
+
}
|
|
256
|
+
export declare abstract class UiMenuSubTriggerBase extends UiMenuItemBase {
|
|
257
|
+
protected readonly sub: UiMenuSubBase;
|
|
258
|
+
/** The trigger is an item of the PARENT menu (the nearest UI_MENU_CTX is the sub-menu it opens). */
|
|
259
|
+
readonly ctx: MenuCtx;
|
|
260
|
+
private timer;
|
|
261
|
+
constructor();
|
|
262
|
+
activate(): void;
|
|
263
|
+
openOnArrow(): boolean;
|
|
264
|
+
protected keepFocusOnLeave(): boolean;
|
|
265
|
+
protected onPointerMove(): void;
|
|
266
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiMenuSubTriggerBase, never>;
|
|
267
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiMenuSubTriggerBase, never, never, {}, {}, never, never, true, never>;
|
|
268
|
+
}
|
|
269
|
+
export declare abstract class UiMenuContentBase extends UiPopperContentBase {
|
|
270
|
+
protected abstract readonly menu: UiMenuRootBase;
|
|
271
|
+
protected abstract menuItems(): readonly UiMenuItemBase[];
|
|
272
|
+
private manager;
|
|
273
|
+
/** Content of a sub-menu closes itself on the "back" arrow. */
|
|
274
|
+
protected isSub: boolean;
|
|
275
|
+
protected onAttached(): void;
|
|
276
|
+
protected onDetached(): void;
|
|
277
|
+
protected onMenuKeydown(e: KeyboardEvent): void;
|
|
278
|
+
protected registerChildPane(): void;
|
|
279
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiMenuContentBase, never>;
|
|
280
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiMenuContentBase, never, never, {}, {}, never, never, true, never>;
|
|
281
|
+
}
|
|
282
|
+
export declare const ELEMENT_ORIGIN: Record<string, string>;
|
|
283
|
+
/**
|
|
284
|
+
* Applied (as a host directive) to every Loom UI directive that also has a custom-element selector, e.g. <ui-button>.
|
|
285
|
+
* On native elements it does nothing. On a custom element it restores what the native tag provided for free:
|
|
286
|
+
* - the implicit ARIA role and, for buttons/links, a tab stop;
|
|
287
|
+
* - Enter / Space activation for button-like elements (Enter for links), skipped when the component already handled the key;
|
|
288
|
+
* - `href` navigation for link-like elements, `for` association for label-like elements.
|
|
289
|
+
* Directives keep full control: anything they set themselves (role, tabindex, …) is never overwritten.
|
|
290
|
+
*/
|
|
291
|
+
export declare class UiElementHost {
|
|
292
|
+
private readonly el;
|
|
293
|
+
constructor();
|
|
294
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiElementHost, never>;
|
|
295
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiElementHost, never, never, {}, {}, never, never, true, never>;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Base for the custom-element wrappers around native form controls (`<ui-input>`, `<ui-textarea>`, `<ui-native-select>`, …).
|
|
299
|
+
* A custom element cannot be a form control, so the wrapper renders the real control inside its template (template ref
|
|
300
|
+
* `#control`) and forwards the common attributes. It implements ControlValueAccessor, so `ngModel`, reactive forms and
|
|
301
|
+
* `[(value)]`-style one-way binding keep working. `aria-label` / `aria-describedby` are forwarded to the inner control.
|
|
302
|
+
*/
|
|
303
|
+
export declare abstract class UiNativeControl implements ControlValueAccessor {
|
|
304
|
+
readonly control: import("@angular/core").Signal<ElementRef<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>>;
|
|
305
|
+
readonly id: import("@angular/core").InputSignal<string>;
|
|
306
|
+
readonly name: import("@angular/core").InputSignal<string>;
|
|
307
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
308
|
+
/** Initial / one-way value. With forms, the form owns the value. */
|
|
309
|
+
readonly value: import("@angular/core").InputSignal<string>;
|
|
310
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
311
|
+
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
312
|
+
readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
313
|
+
readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
314
|
+
readonly autocomplete: import("@angular/core").InputSignal<string>;
|
|
315
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
316
|
+
readonly ariaDescribedby: import("@angular/core").InputSignal<string>;
|
|
317
|
+
readonly userClass: import("@angular/core").InputSignal<string>;
|
|
318
|
+
protected readonly current: import("@angular/core").WritableSignal<string>;
|
|
319
|
+
private readonly cvaDisabled;
|
|
320
|
+
protected readonly isDisabled: import("@angular/core").Signal<boolean>;
|
|
321
|
+
private onChange;
|
|
322
|
+
protected onTouched: () => void;
|
|
323
|
+
focus(options?: FocusOptions): void;
|
|
324
|
+
protected onInput(e: Event): void;
|
|
325
|
+
writeValue(v: string | null): void;
|
|
326
|
+
registerOnChange(fn: (v: string) => void): void;
|
|
327
|
+
registerOnTouched(fn: () => void): void;
|
|
328
|
+
setDisabledState(d: boolean): void;
|
|
329
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiNativeControl, never>;
|
|
330
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiNativeControl, never, never, {
|
|
331
|
+
"id": {
|
|
332
|
+
"alias": "id";
|
|
333
|
+
"required": false;
|
|
334
|
+
"isSignal": true;
|
|
335
|
+
};
|
|
336
|
+
"name": {
|
|
337
|
+
"alias": "name";
|
|
338
|
+
"required": false;
|
|
339
|
+
"isSignal": true;
|
|
340
|
+
};
|
|
341
|
+
"placeholder": {
|
|
342
|
+
"alias": "placeholder";
|
|
343
|
+
"required": false;
|
|
344
|
+
"isSignal": true;
|
|
345
|
+
};
|
|
346
|
+
"value": {
|
|
347
|
+
"alias": "value";
|
|
348
|
+
"required": false;
|
|
349
|
+
"isSignal": true;
|
|
350
|
+
};
|
|
351
|
+
"disabled": {
|
|
352
|
+
"alias": "disabled";
|
|
353
|
+
"required": false;
|
|
354
|
+
"isSignal": true;
|
|
355
|
+
};
|
|
356
|
+
"readonly": {
|
|
357
|
+
"alias": "readonly";
|
|
358
|
+
"required": false;
|
|
359
|
+
"isSignal": true;
|
|
360
|
+
};
|
|
361
|
+
"required": {
|
|
362
|
+
"alias": "required";
|
|
363
|
+
"required": false;
|
|
364
|
+
"isSignal": true;
|
|
365
|
+
};
|
|
366
|
+
"invalid": {
|
|
367
|
+
"alias": "invalid";
|
|
368
|
+
"required": false;
|
|
369
|
+
"isSignal": true;
|
|
370
|
+
};
|
|
371
|
+
"autocomplete": {
|
|
372
|
+
"alias": "autocomplete";
|
|
373
|
+
"required": false;
|
|
374
|
+
"isSignal": true;
|
|
375
|
+
};
|
|
376
|
+
"ariaLabel": {
|
|
377
|
+
"alias": "aria-label";
|
|
378
|
+
"required": false;
|
|
379
|
+
"isSignal": true;
|
|
380
|
+
};
|
|
381
|
+
"ariaDescribedby": {
|
|
382
|
+
"alias": "aria-describedby";
|
|
383
|
+
"required": false;
|
|
384
|
+
"isSignal": true;
|
|
385
|
+
};
|
|
386
|
+
"userClass": {
|
|
387
|
+
"alias": "class";
|
|
388
|
+
"required": false;
|
|
389
|
+
"isSignal": true;
|
|
390
|
+
};
|
|
391
|
+
}, {}, never, never, true, never>;
|
|
392
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Typography
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import { UI_TYPOGRAPHY } from '@loomui-ng/ui/typography';
|
|
5
|
+
// add to the component `imports` array
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
```html
|
|
9
|
+
<h1 uiTypography="h1">Title</h1>
|
|
10
|
+
<p uiTypography="lead">Intro</p>
|
|
11
|
+
<code uiTypography="code">npm i</code>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Same thing as custom elements (identical inputs; directives keep working):
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<ui-typography variant="h1">Title</ui-typography>
|
|
18
|
+
<ui-typography variant="lead">Intro</ui-typography>
|
|
19
|
+
<ui-typography variant="code">npm i</ui-typography>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
| Input / output | Type / values | Default |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| `attrVariant` | `TypographyVariant \| ''` | `''` |
|
|
25
|
+
| `elVariant` | `TypographyVariant \| ''` | `''` |
|
|
26
|
+
|
|
27
|
+
Parts (selectors): `[uiTypography], ui-typography`.
|
|
28
|
+
|
|
29
|
+
Spec: `docs/behavior-specs/typography.md` · Manual test: `docs/manual-tests/typography.md`
|