@cute-widgets/base 20.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/LICENSE.md +191 -0
- package/README.md +190 -0
- package/abstract/index.d.ts +327 -0
- package/alert/index.d.ts +68 -0
- package/autocomplete/index.d.ts +442 -0
- package/badge/index.d.ts +26 -0
- package/bottom-sheet/index.d.ts +231 -0
- package/button/index.d.ts +182 -0
- package/button-toggle/index.d.ts +225 -0
- package/card/index.d.ts +163 -0
- package/checkbox/index.d.ts +174 -0
- package/chips/index.d.ts +963 -0
- package/collapse/index.d.ts +97 -0
- package/core/animation/index.d.ts +43 -0
- package/core/datetime/index.d.ts +404 -0
- package/core/directives/index.d.ts +168 -0
- package/core/error/index.d.ts +74 -0
- package/core/index.d.ts +1039 -0
- package/core/interfaces/index.d.ts +114 -0
- package/core/layout/index.d.ts +53 -0
- package/core/line/index.d.ts +37 -0
- package/core/nav/index.d.ts +321 -0
- package/core/observers/index.d.ts +124 -0
- package/core/option/index.d.ts +185 -0
- package/core/pipes/index.d.ts +53 -0
- package/core/ripple/index.d.ts +66 -0
- package/core/testing/index.d.ts +154 -0
- package/core/theming/index.d.ts +118 -0
- package/core/types/index.d.ts +53 -0
- package/core/utils/index.d.ts +129 -0
- package/cute-widgets-base-20.0.1.tgz +0 -0
- package/datepicker/index.d.ts +1817 -0
- package/dialog/index.d.ts +484 -0
- package/divider/index.d.ts +24 -0
- package/expansion/README.md +8 -0
- package/expansion/index.d.ts +308 -0
- package/fesm2022/cute-widgets-base-abstract.mjs +547 -0
- package/fesm2022/cute-widgets-base-abstract.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-alert.mjs +198 -0
- package/fesm2022/cute-widgets-base-alert.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-autocomplete.mjs +1217 -0
- package/fesm2022/cute-widgets-base-autocomplete.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-badge.mjs +75 -0
- package/fesm2022/cute-widgets-base-badge.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-bottom-sheet.mjs +416 -0
- package/fesm2022/cute-widgets-base-bottom-sheet.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-button-toggle.mjs +640 -0
- package/fesm2022/cute-widgets-base-button-toggle.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-button.mjs +546 -0
- package/fesm2022/cute-widgets-base-button.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-card.mjs +471 -0
- package/fesm2022/cute-widgets-base-card.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-checkbox.mjs +390 -0
- package/fesm2022/cute-widgets-base-checkbox.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-chips.mjs +2360 -0
- package/fesm2022/cute-widgets-base-chips.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-collapse.mjs +259 -0
- package/fesm2022/cute-widgets-base-collapse.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-animation.mjs +53 -0
- package/fesm2022/cute-widgets-base-core-animation.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-datetime.mjs +568 -0
- package/fesm2022/cute-widgets-base-core-datetime.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-directives.mjs +404 -0
- package/fesm2022/cute-widgets-base-core-directives.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-error.mjs +105 -0
- package/fesm2022/cute-widgets-base-core-error.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-interfaces.mjs +22 -0
- package/fesm2022/cute-widgets-base-core-interfaces.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-layout.mjs +74 -0
- package/fesm2022/cute-widgets-base-core-layout.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-line.mjs +87 -0
- package/fesm2022/cute-widgets-base-core-line.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-nav.mjs +863 -0
- package/fesm2022/cute-widgets-base-core-nav.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-observers.mjs +304 -0
- package/fesm2022/cute-widgets-base-core-observers.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-option.mjs +373 -0
- package/fesm2022/cute-widgets-base-core-option.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-pipes.mjs +97 -0
- package/fesm2022/cute-widgets-base-core-pipes.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-ripple.mjs +172 -0
- package/fesm2022/cute-widgets-base-core-ripple.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-testing.mjs +210 -0
- package/fesm2022/cute-widgets-base-core-testing.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-theming.mjs +314 -0
- package/fesm2022/cute-widgets-base-core-theming.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-types.mjs +22 -0
- package/fesm2022/cute-widgets-base-core-types.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core-utils.mjs +257 -0
- package/fesm2022/cute-widgets-base-core-utils.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-core.mjs +1600 -0
- package/fesm2022/cute-widgets-base-core.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-datepicker.mjs +4827 -0
- package/fesm2022/cute-widgets-base-datepicker.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-dialog.mjs +1046 -0
- package/fesm2022/cute-widgets-base-dialog.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-divider.mjs +86 -0
- package/fesm2022/cute-widgets-base-divider.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-expansion.mjs +623 -0
- package/fesm2022/cute-widgets-base-expansion.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-form-field.mjs +969 -0
- package/fesm2022/cute-widgets-base-form-field.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-grid-list.mjs +715 -0
- package/fesm2022/cute-widgets-base-grid-list.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-icon.mjs +1105 -0
- package/fesm2022/cute-widgets-base-icon.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-input.mjs +726 -0
- package/fesm2022/cute-widgets-base-input.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-layout-container.mjs +95 -0
- package/fesm2022/cute-widgets-base-layout-container.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-layout-stack.mjs +166 -0
- package/fesm2022/cute-widgets-base-layout-stack.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-layout.mjs +250 -0
- package/fesm2022/cute-widgets-base-layout.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-list.mjs +1557 -0
- package/fesm2022/cute-widgets-base-list.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-menu.mjs +1283 -0
- package/fesm2022/cute-widgets-base-menu.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-navbar.mjs +359 -0
- package/fesm2022/cute-widgets-base-navbar.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-paginator.mjs +485 -0
- package/fesm2022/cute-widgets-base-paginator.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-progress.mjs +321 -0
- package/fesm2022/cute-widgets-base-progress.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-radio.mjs +637 -0
- package/fesm2022/cute-widgets-base-radio.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-select.mjs +1208 -0
- package/fesm2022/cute-widgets-base-select.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-sidenav.mjs +1095 -0
- package/fesm2022/cute-widgets-base-sidenav.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-slider.mjs +99 -0
- package/fesm2022/cute-widgets-base-slider.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-snack-bar.mjs +897 -0
- package/fesm2022/cute-widgets-base-snack-bar.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-sort.mjs +639 -0
- package/fesm2022/cute-widgets-base-sort.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-spinner.mjs +154 -0
- package/fesm2022/cute-widgets-base-spinner.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-stepper.mjs +673 -0
- package/fesm2022/cute-widgets-base-stepper.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-table.mjs +1023 -0
- package/fesm2022/cute-widgets-base-table.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-tabs.mjs +729 -0
- package/fesm2022/cute-widgets-base-tabs.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-timepicker.mjs +965 -0
- package/fesm2022/cute-widgets-base-timepicker.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-toolbar.mjs +120 -0
- package/fesm2022/cute-widgets-base-toolbar.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-tooltip.mjs +947 -0
- package/fesm2022/cute-widgets-base-tooltip.mjs.map +1 -0
- package/fesm2022/cute-widgets-base-tree.mjs +598 -0
- package/fesm2022/cute-widgets-base-tree.mjs.map +1 -0
- package/fesm2022/cute-widgets-base.mjs +68 -0
- package/fesm2022/cute-widgets-base.mjs.map +1 -0
- package/form-field/index.d.ts +401 -0
- package/grid-list/index.d.ts +361 -0
- package/icon/index.d.ts +477 -0
- package/index.d.ts +3 -0
- package/input/index.d.ts +256 -0
- package/layout/container/index.d.ts +31 -0
- package/layout/index.d.ts +78 -0
- package/layout/stack/index.d.ts +52 -0
- package/list/index.d.ts +659 -0
- package/menu/index.d.ts +497 -0
- package/navbar/index.d.ts +91 -0
- package/package.json +279 -0
- package/paginator/index.d.ts +216 -0
- package/progress/index.d.ts +130 -0
- package/radio/index.d.ts +259 -0
- package/select/index.d.ts +426 -0
- package/sidenav/index.d.ts +369 -0
- package/slider/index.d.ts +48 -0
- package/snack-bar/index.d.ts +374 -0
- package/sort/index.d.ts +334 -0
- package/spinner/index.d.ts +70 -0
- package/stepper/index.d.ts +295 -0
- package/table/index.d.ts +395 -0
- package/tabs/index.d.ts +307 -0
- package/timepicker/index.d.ts +350 -0
- package/toolbar/index.d.ts +36 -0
- package/tooltip/index.d.ts +299 -0
- package/tree/index.d.ts +314 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Signal, InjectionToken, AfterViewChecked, EventEmitter, ElementRef, QueryList } from '@angular/core';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { CuteFocusableControl } from '@cute-widgets/base/abstract';
|
|
5
|
+
import { Highlightable } from '@angular/cdk/a11y';
|
|
6
|
+
import { toTextBgCssClass } from '@cute-widgets/base/core/theming';
|
|
7
|
+
import * as i1 from '@angular/common';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @license Apache-2.0
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
13
|
+
*
|
|
14
|
+
* You may not use this file except in compliance with the License
|
|
15
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
*
|
|
17
|
+
* This code is a modification of the `@angular/material` original
|
|
18
|
+
* code licensed under MIT-style License (https://angular.dev/license).
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Describes a parent component that manages a list of options.
|
|
23
|
+
* Contains properties that the options can inherit.
|
|
24
|
+
*/
|
|
25
|
+
interface CuteOptionParentComponent {
|
|
26
|
+
disableRipple?: boolean | Signal<boolean>;
|
|
27
|
+
multiple?: boolean;
|
|
28
|
+
inertGroups?: boolean;
|
|
29
|
+
hideSingleSelectionIndicator?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Injection token used to provide the parent component to options.
|
|
33
|
+
*/
|
|
34
|
+
declare const CUTE_OPTION_PARENT_COMPONENT: InjectionToken<CuteOptionParentComponent>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @license Apache-2.0
|
|
38
|
+
*
|
|
39
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
40
|
+
*
|
|
41
|
+
* You may not use this file except in compliance with the License
|
|
42
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
43
|
+
*
|
|
44
|
+
* This code is a modification of the `@angular/material` original
|
|
45
|
+
* code licensed under MIT-style License (https://angular.dev/license).
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Injection token that can be used to reference instances of `CuteOptgroup`. It serves as
|
|
50
|
+
* an alternative token to the actual `CuteOptgroup` class which could cause unnecessary
|
|
51
|
+
* retention of the class and its component metadata.
|
|
52
|
+
*/
|
|
53
|
+
declare const CUTE_OPTGROUP: InjectionToken<CuteOptgroup>;
|
|
54
|
+
/**
|
|
55
|
+
* Component that is used to group instances of `mat-option`.
|
|
56
|
+
*/
|
|
57
|
+
declare class CuteOptgroup {
|
|
58
|
+
/** Label for the option group. */
|
|
59
|
+
label: string | undefined;
|
|
60
|
+
/** whether the option group is disabled. */
|
|
61
|
+
disabled: boolean;
|
|
62
|
+
/** Unique id for the underlying label. */
|
|
63
|
+
_labelId: string;
|
|
64
|
+
/** Whether the group is in inert a11y mode. */
|
|
65
|
+
_inert: boolean;
|
|
66
|
+
constructor(...args: unknown[]);
|
|
67
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteOptgroup, never>;
|
|
68
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuteOptgroup, "cute-optgroup", ["cuteOptgroup"], { "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["*", "cute-option, ng-container"], true, never>;
|
|
69
|
+
static ngAcceptInputType_disabled: unknown;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Event object emitted by CuteOption when selected or deselected. */
|
|
73
|
+
declare class CuteOptionSelectionChange<T = any> {
|
|
74
|
+
/** Reference to the option that emitted the event. */
|
|
75
|
+
source: CuteOption<T>;
|
|
76
|
+
/** Whether the change in the option's value was a result of a user action. */
|
|
77
|
+
isUserInput: boolean;
|
|
78
|
+
constructor(
|
|
79
|
+
/** Reference to the option that emitted the event. */
|
|
80
|
+
source: CuteOption<T>,
|
|
81
|
+
/** Whether the change in the option's value was a result of a user action. */
|
|
82
|
+
isUserInput?: boolean);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Single option inside a `<cute-select>` element.
|
|
86
|
+
*/
|
|
87
|
+
declare class CuteOption<T = any> extends CuteFocusableControl implements Highlightable, AfterViewChecked {
|
|
88
|
+
private _parent;
|
|
89
|
+
readonly group: CuteOptgroup | null;
|
|
90
|
+
private _selected;
|
|
91
|
+
private _active;
|
|
92
|
+
private _mostRecentViewValue;
|
|
93
|
+
/** Whether the wrapping component is in multiple selection mode. */
|
|
94
|
+
get multiple(): boolean | null | undefined;
|
|
95
|
+
/** Whether the option is currently selected. */
|
|
96
|
+
get selected(): boolean;
|
|
97
|
+
/** Whether ripples for the option are disabled. */
|
|
98
|
+
get disableRipple(): boolean;
|
|
99
|
+
/** Whether to display checkmark for single-selection. */
|
|
100
|
+
get hideSingleSelectionIndicator(): boolean;
|
|
101
|
+
protected getDisabledState(): boolean;
|
|
102
|
+
protected generateId(): string;
|
|
103
|
+
/** The form value of the option. */
|
|
104
|
+
value: T | undefined;
|
|
105
|
+
/** Event emitted when the option is selected or deselected. */
|
|
106
|
+
readonly onSelectionChange: EventEmitter<CuteOptionSelectionChange<T>>;
|
|
107
|
+
/** Element containing the option's text. */
|
|
108
|
+
_text: ElementRef<HTMLElement> | undefined;
|
|
109
|
+
/** Emits when the state of the option changes and any parents have to be notified. */
|
|
110
|
+
readonly _stateChanges: Subject<void>;
|
|
111
|
+
constructor(...args: unknown[]);
|
|
112
|
+
/**
|
|
113
|
+
* Whether the option is currently active and ready to be selected.
|
|
114
|
+
* An active option displays styles, as if it is focused, but the
|
|
115
|
+
* focus is actually retained somewhere else. This comes in handy
|
|
116
|
+
* for components like autocomplete where focus must remain on the input.
|
|
117
|
+
*/
|
|
118
|
+
get active(): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* The displayed value of the option. It is necessary to show the selected option in the
|
|
121
|
+
* select's trigger.
|
|
122
|
+
*/
|
|
123
|
+
get viewValue(): string;
|
|
124
|
+
/** Selects the option. */
|
|
125
|
+
select(emitEvent?: boolean): void;
|
|
126
|
+
/** Deselects the option. */
|
|
127
|
+
deselect(emitEvent?: boolean): void;
|
|
128
|
+
/**
|
|
129
|
+
* This method sets display styles on the option to make it appear
|
|
130
|
+
* active. This is used by the ActiveDescendantKeyManager so key
|
|
131
|
+
* events will display the proper options as active on arrow key events.
|
|
132
|
+
*/
|
|
133
|
+
setActiveStyles(): void;
|
|
134
|
+
/**
|
|
135
|
+
* This method removes display styles on the option that made it appear
|
|
136
|
+
* active. This is used by the ActiveDescendantKeyManager so key
|
|
137
|
+
* events will display the proper options as active on arrow key events.
|
|
138
|
+
*/
|
|
139
|
+
setInactiveStyles(): void;
|
|
140
|
+
/** Gets the label to be used when determining whether the option should be focused. */
|
|
141
|
+
getLabel(): string;
|
|
142
|
+
/** Ensures the option is selected when activated from the keyboard. */
|
|
143
|
+
protected _handleKeydown(event: KeyboardEvent): void;
|
|
144
|
+
/**
|
|
145
|
+
* Selects the option while indicating the selection came from the user. Used to
|
|
146
|
+
* determine if the select's view -> model callback should be invoked.
|
|
147
|
+
* Used by `CuteSelect` component.
|
|
148
|
+
*/
|
|
149
|
+
_selectViaInteraction(): void;
|
|
150
|
+
/** Gets the host DOM element. */
|
|
151
|
+
_getHostElement(): HTMLElement;
|
|
152
|
+
ngAfterViewChecked(): void;
|
|
153
|
+
ngOnDestroy(): void;
|
|
154
|
+
/** Emits the selection change event. */
|
|
155
|
+
private _emitSelectionChangeEvent;
|
|
156
|
+
protected readonly toTextBgCssClass: typeof toTextBgCssClass;
|
|
157
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteOption<any>, never>;
|
|
158
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuteOption<any>, "cute-option", ["cuteOption"], { "value": { "alias": "value"; "required": false; }; }, { "onSelectionChange": "onSelectionChange"; }, never, ["cute-icon, i, img, [role=img]", "*"], true, never>;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Counts the number of option group labels that precede the specified option.
|
|
162
|
+
* @param optionIndex Index of the option at which to start counting.
|
|
163
|
+
* @param options Flat list of all the options.
|
|
164
|
+
* @param optionGroups Flat list of all the option groups.
|
|
165
|
+
* @docs-private
|
|
166
|
+
*/
|
|
167
|
+
declare function _countGroupLabelsBeforeOption(optionIndex: number, options: QueryList<CuteOption>, optionGroups: QueryList<CuteOptgroup>): number;
|
|
168
|
+
/**
|
|
169
|
+
* Determines the position to which to scroll a panel in order for an option to be into view.
|
|
170
|
+
* @param optionOffset Offset of the option from the top of the panel.
|
|
171
|
+
* @param optionHeight Height of the options.
|
|
172
|
+
* @param currentScrollPosition Current scroll position of the panel.
|
|
173
|
+
* @param panelHeight Height of the panel.
|
|
174
|
+
* @docs-private
|
|
175
|
+
*/
|
|
176
|
+
declare function _getOptionScrollPosition(optionOffset: number, optionHeight: number, currentScrollPosition: number, panelHeight: number): number;
|
|
177
|
+
|
|
178
|
+
declare class CuteOptionModule {
|
|
179
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteOptionModule, never>;
|
|
180
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CuteOptionModule, never, [typeof i1.CommonModule, typeof CuteOption, typeof CuteOptgroup], [typeof CuteOption, typeof CuteOptgroup]>;
|
|
181
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CuteOptionModule>;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export { CUTE_OPTGROUP, CUTE_OPTION_PARENT_COMPONENT, CuteOptgroup, CuteOption, CuteOptionModule, CuteOptionSelectionChange, _countGroupLabelsBeforeOption, _getOptionScrollPosition };
|
|
185
|
+
export type { CuteOptionParentComponent };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { PipeTransform } from '@angular/core';
|
|
3
|
+
import { DomSanitizer, SafeValue } from '@angular/platform-browser';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @license Apache-2.0
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
9
|
+
*
|
|
10
|
+
* You may not use this file except in compliance with the License
|
|
11
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Bypass security and trust the given value to be a safe resource.
|
|
16
|
+
* > WARNING: calling this method with untrusted user data exposes your application to XSS security risks!
|
|
17
|
+
* @example
|
|
18
|
+
* ```html
|
|
19
|
+
* <img [src]="item.source | safe:'url'" alt="Item image"/>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare class CuteSafePipe implements PipeTransform {
|
|
23
|
+
protected sanitizer: DomSanitizer;
|
|
24
|
+
transform(value: any, type?: 'html' | 'style' | 'script' | 'url' | 'resourceUrl'): SafeValue;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteSafePipe, never>;
|
|
26
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CuteSafePipe, "safe", true>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @license Apache-2.0
|
|
31
|
+
*
|
|
32
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
33
|
+
*
|
|
34
|
+
* You may not use this file except in compliance with the License
|
|
35
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Gets a safe value from either a known safe value or a value with unknown safety.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```html
|
|
43
|
+
* <div [innerHTML]="item.htmlContent | sanitize:'html'"></div>
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
declare class CuteSanitizePipe implements PipeTransform {
|
|
47
|
+
protected sanitizer: DomSanitizer;
|
|
48
|
+
transform(value: any, context?: 'html' | 'style' | 'script' | 'url' | 'resourceUrl' | 'none'): SafeValue | null;
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteSanitizePipe, never>;
|
|
50
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CuteSanitizePipe, "sanitize", true>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { CuteSafePipe, CuteSanitizePipe };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnDestroy, ElementRef } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @license Apache-2.0
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
8
|
+
*
|
|
9
|
+
* You may not use this file except in compliance with the License
|
|
10
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*/
|
|
12
|
+
type RippleOptions = {
|
|
13
|
+
centered?: boolean;
|
|
14
|
+
color?: string | null;
|
|
15
|
+
duration?: string | number;
|
|
16
|
+
};
|
|
17
|
+
declare abstract class Ripple {
|
|
18
|
+
private _active;
|
|
19
|
+
private _disabled;
|
|
20
|
+
private readonly _target;
|
|
21
|
+
protected constructor(target: HTMLElement);
|
|
22
|
+
get disabled(): boolean;
|
|
23
|
+
set disabled(v: boolean);
|
|
24
|
+
isActive: i0.Signal<boolean>;
|
|
25
|
+
stop(): void;
|
|
26
|
+
launch(event: MouseEvent, options?: RippleOptions): void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @license Apache-2.0
|
|
31
|
+
*
|
|
32
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
33
|
+
*
|
|
34
|
+
* You may not use this file except in compliance with the License
|
|
35
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
declare class RippleManager {
|
|
39
|
+
private static readonly _ripples;
|
|
40
|
+
static getInstance(target: HTMLElement): Ripple;
|
|
41
|
+
static createRipple(target: HTMLElement): Ripple;
|
|
42
|
+
static removeRipple(target: HTMLElement): void;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @license Apache-2.0
|
|
47
|
+
*
|
|
48
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
49
|
+
*
|
|
50
|
+
* You may not use this file except in compliance with the License
|
|
51
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
declare class CuteRipple/* extends ... */ implements OnDestroy {
|
|
55
|
+
private _elemRef;
|
|
56
|
+
private readonly _ripple;
|
|
57
|
+
rippleOptions: RippleOptions | undefined;
|
|
58
|
+
protected onMouseDown(event: MouseEvent): void;
|
|
59
|
+
constructor(_elemRef: ElementRef<HTMLElement>);
|
|
60
|
+
ngOnDestroy(): void;
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteRipple, never>;
|
|
62
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteRipple, "[cuteRipple]", ["cuteRipple"], { "rippleOptions": { "alias": "cuteRipple"; "required": false; }; }, {}, never, never, true, never>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { CuteRipple, Ripple, RippleManager };
|
|
66
|
+
export type { RippleOptions };
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { DebugElement } from '@angular/core';
|
|
2
|
+
import { ComponentFixture } from '@angular/core/testing';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @license Apache-2.0
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
8
|
+
*
|
|
9
|
+
* You may not use this file except in compliance with the License
|
|
10
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Spec helpers for working with the DOM
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Returns a selector for the `data-testid` attribute with the given attribute value.
|
|
18
|
+
*
|
|
19
|
+
* @param testId Test id set by `data-testid`
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
declare function testIdSelector(testId: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Finds a single element inside the Component by the given CSS selector.
|
|
25
|
+
* Throws an error if no element was found.
|
|
26
|
+
*
|
|
27
|
+
* @param fixture Component fixture
|
|
28
|
+
* @param selector CSS selector
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
declare function queryByCss<T>(fixture: ComponentFixture<T>, selector: string): DebugElement;
|
|
32
|
+
/**
|
|
33
|
+
* Finds an element inside the Component by the given `data-testid` attribute.
|
|
34
|
+
* Throws an error if no element was found.
|
|
35
|
+
*
|
|
36
|
+
* @param fixture Component fixture
|
|
37
|
+
* @param testId Test id set by `data-testid`
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
declare function findEl<T>(fixture: ComponentFixture<T>, testId: string): DebugElement;
|
|
41
|
+
/**
|
|
42
|
+
* Finds all elements with the given `data-testid` attribute.
|
|
43
|
+
*
|
|
44
|
+
* @param fixture Component fixture
|
|
45
|
+
* @param testId Test id set by `data-testid`
|
|
46
|
+
*/
|
|
47
|
+
declare function findEls<T>(fixture: ComponentFixture<T>, testId: string): DebugElement[];
|
|
48
|
+
/**
|
|
49
|
+
* Gets the text content of an element with the given `data-testid` attribute.
|
|
50
|
+
*
|
|
51
|
+
* @param fixture Component fixture
|
|
52
|
+
* @param testId Test id set by `data-testid`
|
|
53
|
+
*/
|
|
54
|
+
declare function getText<T>(fixture: ComponentFixture<T>, testId: string): string;
|
|
55
|
+
/**
|
|
56
|
+
* Expects that the element with the given `data-testid` attribute
|
|
57
|
+
* has the given text content.
|
|
58
|
+
*
|
|
59
|
+
* @param fixture Component fixture
|
|
60
|
+
* @param testId Test id set by `data-testid`
|
|
61
|
+
* @param text Expected text
|
|
62
|
+
*/
|
|
63
|
+
declare function expectText<T>(fixture: ComponentFixture<T>, testId: string, text: string): void;
|
|
64
|
+
/**
|
|
65
|
+
* Expects that the element with the given `data-testid` attribute
|
|
66
|
+
* has the given text content.
|
|
67
|
+
*
|
|
68
|
+
* @param fixture Component fixture
|
|
69
|
+
* @param text Expected text
|
|
70
|
+
*/
|
|
71
|
+
declare function expectContainedText<T>(fixture: ComponentFixture<T>, text: string): void;
|
|
72
|
+
/**
|
|
73
|
+
* Expects that a component has the given text content.
|
|
74
|
+
* Both the component text content and the expected text are trimmed for reliability.
|
|
75
|
+
*
|
|
76
|
+
* @param fixture Component fixture
|
|
77
|
+
* @param text Expected text
|
|
78
|
+
*/
|
|
79
|
+
declare function expectContent<T>(fixture: ComponentFixture<T>, text: string): void;
|
|
80
|
+
/**
|
|
81
|
+
* Dispatches a fake event (synthetic event) at the given element.
|
|
82
|
+
*
|
|
83
|
+
* @param element Element that is the target of the event
|
|
84
|
+
* @param type Event name, e.g. `input`
|
|
85
|
+
* @param bubbles Whether the event bubbles up in the DOM tree
|
|
86
|
+
*/
|
|
87
|
+
declare function dispatchFakeEvent(element: EventTarget, type: string, bubbles?: boolean): void;
|
|
88
|
+
/**
|
|
89
|
+
* Enters text into a form field (`input`, `textarea` or `select` element).
|
|
90
|
+
* Triggers appropriate events so Angular takes notice of the change.
|
|
91
|
+
* If you listen for the `change` event on `input` or `textarea`,
|
|
92
|
+
* you need to trigger it separately.
|
|
93
|
+
*
|
|
94
|
+
* @param element Form field
|
|
95
|
+
* @param value Form field value
|
|
96
|
+
*/
|
|
97
|
+
declare function setFieldElementValue(element: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement, value: string): void;
|
|
98
|
+
/**
|
|
99
|
+
* Sets the value of a form field with the given `data-testid` attribute.
|
|
100
|
+
*
|
|
101
|
+
* @param fixture Component fixture
|
|
102
|
+
* @param testId Test id set by `data-testid`
|
|
103
|
+
* @param value Form field value
|
|
104
|
+
*/
|
|
105
|
+
declare function setFieldValue<T>(fixture: ComponentFixture<T>, testId: string, value: string): void;
|
|
106
|
+
/**
|
|
107
|
+
* Checks or unchecks a checkbox or radio button.
|
|
108
|
+
* Triggers appropriate events so Angular takes notice of the change.
|
|
109
|
+
*
|
|
110
|
+
* @param fixture Component fixture
|
|
111
|
+
* @param testId Test id set by `data-testid`
|
|
112
|
+
* @param checked Whether the checkbox or radio should be checked
|
|
113
|
+
*/
|
|
114
|
+
declare function checkField<T>(fixture: ComponentFixture<T>, testId: string, checked: boolean): void;
|
|
115
|
+
/**
|
|
116
|
+
* Makes a fake click event that provides the most important properties.
|
|
117
|
+
* The event can be passed to DebugElement#triggerEventHandler.
|
|
118
|
+
*
|
|
119
|
+
* @param target Element that is the target of the click event
|
|
120
|
+
* @param button (Optional) Button number. Default is Left-Button.
|
|
121
|
+
*/
|
|
122
|
+
declare function makeClickEvent(target: EventTarget, button?: number): Partial<MouseEvent>;
|
|
123
|
+
/** Button events to pass to `DebugElement.triggerEventHandler` */
|
|
124
|
+
declare const ButtonClickEvents: {
|
|
125
|
+
left: {
|
|
126
|
+
button: number;
|
|
127
|
+
};
|
|
128
|
+
right: {
|
|
129
|
+
button: number;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Emulates a mouse click event on the target element.
|
|
134
|
+
*
|
|
135
|
+
* @param elem Element target
|
|
136
|
+
* @param eventObj (Optional) MouseEvent object. Default is Left-Button click.
|
|
137
|
+
*/
|
|
138
|
+
declare function click(elem: DebugElement | HTMLElement, eventObj?: Partial<MouseEvent>): void;
|
|
139
|
+
/**
|
|
140
|
+
* Finds a nested Component by its selector, e.g. `app-example`.
|
|
141
|
+
* Throws an error if no element was found.
|
|
142
|
+
* Use this only for shallow component testing.
|
|
143
|
+
* When finding other elements, use `findEl` / `findEls` and `data-testid` attributes.
|
|
144
|
+
*
|
|
145
|
+
* @param fixture Fixture of the parent Component
|
|
146
|
+
* @param selector Element selector, e.g. `app-example`
|
|
147
|
+
*/
|
|
148
|
+
declare function findComponent<T>(fixture: ComponentFixture<T>, selector: string): DebugElement;
|
|
149
|
+
/**
|
|
150
|
+
* Finds all nested Components by its selector, e.g. `app-example`.
|
|
151
|
+
*/
|
|
152
|
+
declare function findComponents<T>(fixture: ComponentFixture<T>, selector: string): DebugElement[];
|
|
153
|
+
|
|
154
|
+
export { ButtonClickEvents, checkField, click, dispatchFakeEvent, expectContainedText, expectContent, expectText, findComponent, findComponents, findEl, findEls, getText, makeClickEvent, queryByCss, setFieldElementValue, setFieldValue, testIdSelector };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, OnDestroy } from '@angular/core';
|
|
3
|
+
import * as rxjs from 'rxjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @license Apache-2.0
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
9
|
+
*
|
|
10
|
+
* You may not use this file except in compliance with the License
|
|
11
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* `CuteWidgets` supports standard Bootstrap 5 theme colors - `ThemeColor` type. But to account
|
|
15
|
+
* miscellaneous use cases of usage this colors in components CuteWidgets add extended definition of
|
|
16
|
+
* latter - `RichThemeColor`. Rich color is the standard color name plus "-emphasis" or "-contrast" suffix at the end.
|
|
17
|
+
* Depending on the context of applying color, the result CSS-class can be `.text-*`, `.text-bg-*` or ended with
|
|
18
|
+
* `-emphasis` or `-subtle` suffixes.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/** Bootstrap theme colors */
|
|
22
|
+
declare const Palette: readonly ["primary", "secondary", "success", "danger", "warning", "info", "light", "dark", "link", "tertiary"];
|
|
23
|
+
/** Bootstrap’s base color palette. */
|
|
24
|
+
type ThemeColor = typeof Palette[number];
|
|
25
|
+
/** Rich color palette is based on the standard Bootstrap palette but has additional shades. */
|
|
26
|
+
type RichThemeColor = ThemeColor | `${ThemeColor}-emphasis` | `${ThemeColor}-contrast`;
|
|
27
|
+
/** Alias for `ThemeColor` type. */
|
|
28
|
+
type ThemePalette = ThemeColor;
|
|
29
|
+
/** Alias for `ThemeColor` type. */
|
|
30
|
+
type RichThemePalette = RichThemeColor;
|
|
31
|
+
/**
|
|
32
|
+
* Whether a string is a valid theme color name
|
|
33
|
+
* @param str Text case-sensitive value
|
|
34
|
+
* @returns _true_ if `str` is a valid color name, otherwise _false_
|
|
35
|
+
*/
|
|
36
|
+
declare function isThemeColor(str: string | undefined | null): str is ThemeColor;
|
|
37
|
+
/**
|
|
38
|
+
* Whether a string is a valid rich or base theme color name.
|
|
39
|
+
* @param str Case-sensitive text value of the color name.
|
|
40
|
+
* @returns _true_ if `str` is a valid rich color name, otherwise _false_.
|
|
41
|
+
*/
|
|
42
|
+
declare function isRichThemeColor(str: string | undefined | null): str is RichThemeColor;
|
|
43
|
+
/**
|
|
44
|
+
* Transforms a string to `ThemeColor` type.
|
|
45
|
+
* @param color Color value to transform
|
|
46
|
+
* @returns _ThemeColor_'s value or _undefined_, if the `color` has an invalid value.
|
|
47
|
+
*/
|
|
48
|
+
declare function toThemeColor(color: string | undefined | null): ThemeColor | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* To `_RichThemeColor_` transformer function.
|
|
51
|
+
* @param color Color value to transform into rich color type.
|
|
52
|
+
* @returns _RichThemeColor_ value or _undefined_ if `color` is invalid.
|
|
53
|
+
*/
|
|
54
|
+
declare function toRichThemeColor(color: string | undefined | null): RichThemeColor | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Returns a valid Bootstrap's `.text-*` CSS class.
|
|
57
|
+
* @param color Color palette to transform into CSS-class.
|
|
58
|
+
*/
|
|
59
|
+
declare function toTextCssClass(color: string | undefined | null): string;
|
|
60
|
+
/**
|
|
61
|
+
* Returns a valid Bootstrap's `.bg-*` or `.text-bg-*` CSS class name.
|
|
62
|
+
* @param color Value to transform into CSS-class.
|
|
63
|
+
*/
|
|
64
|
+
declare function toBgCssClass(color: string | undefined | null): string;
|
|
65
|
+
/**
|
|
66
|
+
* Set a background color with contrasting foreground color.
|
|
67
|
+
* @param color Color palette to transform into CSS-class.
|
|
68
|
+
* @returns A valid Bootstrap's `.text-bg-*` CSS-class
|
|
69
|
+
*/
|
|
70
|
+
declare function toTextBgCssClass(color: string | undefined | null): string;
|
|
71
|
+
/**
|
|
72
|
+
* Returns a valid Bootstrap's `.text-*` or `.text-bg-*` CSS class.
|
|
73
|
+
* @param color Color value to transform into CSS-class.
|
|
74
|
+
*/
|
|
75
|
+
declare function toColorCssClass(color: string | undefined | null): string;
|
|
76
|
+
declare const CUTE_THEME_COLOR: InjectionToken<CuteThemeColor>;
|
|
77
|
+
declare class CuteThemeColor {
|
|
78
|
+
color: RichThemeColor | undefined;
|
|
79
|
+
colorClass(): string;
|
|
80
|
+
bgClass(): string;
|
|
81
|
+
textBgClass(): string;
|
|
82
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteThemeColor, never>;
|
|
83
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuteThemeColor, "[cuteThemeColor]", ["cuteThemeColor"], { "color": { "alias": "cuteThemeColor"; "required": false; }; }, {}, never, never, true, never>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
type CuteTheme = "light" | "dark" | "auto";
|
|
87
|
+
declare class CuteThemeService implements OnDestroy {
|
|
88
|
+
private _document;
|
|
89
|
+
private _mediaQueryList;
|
|
90
|
+
private _mediaChange;
|
|
91
|
+
/** Observable that can be used to receive `MediaMatcher`'s _change_ event. */
|
|
92
|
+
readonly change: rxjs.Observable<MediaQueryListEvent>;
|
|
93
|
+
constructor();
|
|
94
|
+
private getStoredTheme;
|
|
95
|
+
private setStoredTheme;
|
|
96
|
+
/** Returns the user's preferred color mode. */
|
|
97
|
+
getPreferredTheme(): CuteTheme;
|
|
98
|
+
/** Returns the browser's color theme. */
|
|
99
|
+
getCurrentTheme(): CuteTheme;
|
|
100
|
+
/** Whether is the dark theme currently selected. */
|
|
101
|
+
isDarkTheme(): boolean;
|
|
102
|
+
/** Whether is the light theme currently selected. */
|
|
103
|
+
isLightTheme(): boolean;
|
|
104
|
+
/** Returns the Bootstrap's color theme. */
|
|
105
|
+
getTheme(): Omit<CuteTheme, "auto">;
|
|
106
|
+
/**
|
|
107
|
+
* Changes the default color mode (theme) of all pages in the website with the opportunity of auto-detection.
|
|
108
|
+
* @param theme Desired color theme.
|
|
109
|
+
* @param emitEvent Emulate event emitting. Default is _true_.
|
|
110
|
+
*/
|
|
111
|
+
setTheme(theme: CuteTheme, emitEvent?: boolean): void;
|
|
112
|
+
ngOnDestroy(): void;
|
|
113
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuteThemeService, never>;
|
|
114
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CuteThemeService>;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export { CUTE_THEME_COLOR, CuteThemeColor, CuteThemeService, isRichThemeColor, isThemeColor, toBgCssClass, toColorCssClass, toRichThemeColor, toTextBgCssClass, toTextCssClass, toThemeColor };
|
|
118
|
+
export type { CuteTheme, RichThemeColor, RichThemePalette, ThemeColor, ThemePalette };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** A permissive type for a class constructor */
|
|
2
|
+
type Constructor<T = {}> = new (...args: any[]) => T;
|
|
3
|
+
/** A permissive type for abstract class constructors */
|
|
4
|
+
type AbstractConstructor<T = {}> = abstract new (...args: any[]) => T;
|
|
5
|
+
|
|
6
|
+
/** Alignment of flex items on the main axis of the flexbox container */
|
|
7
|
+
type ContentAlignment = "start" | "end" | "center" | "between" | "around" | "evenly";
|
|
8
|
+
|
|
9
|
+
type LayoutBreakpoint = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
10
|
+
|
|
11
|
+
type LayoutDirection = "column" | "row";
|
|
12
|
+
|
|
13
|
+
type LayoutOrientation = "horizontal" | "vertical";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @license Apache-2.0
|
|
17
|
+
*
|
|
18
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
19
|
+
*
|
|
20
|
+
* You may not use this file except in compliance with the License
|
|
21
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
+
*/
|
|
23
|
+
type MouseGeneralCursor = "auto" | "default" | "none";
|
|
24
|
+
type MouseLinkAndStatusCursor = "context-menu" | "help" | "pointer" | "progress" | "wait";
|
|
25
|
+
type MouseSelectionCursor = "cell" | "crosshair" | "text" | "vertical-text";
|
|
26
|
+
type MouseDragAndDropCursor = "alias" | "copy" | "move" | "no-drop" | "not-allowed" | "grab" | "grabbing";
|
|
27
|
+
type MouseResizeAndScrollCursor = "all-scroll" | "col-resize" | "row-resize" | "n-resize" | "e-resize" | "s-resize" | "w-resize" | "ne-resize" | "nw-resize" | "se-resize" | "sw-resize" | "ew-resize" | "ns-resize" | "nesw-resize" | "nwse-resize";
|
|
28
|
+
type MouseZoomingCursor = "zoom-in" | "zoom-out";
|
|
29
|
+
type MouseCursor = MouseGeneralCursor | MouseLinkAndStatusCursor | MouseSelectionCursor | MouseDragAndDropCursor | MouseResizeAndScrollCursor | MouseZoomingCursor;
|
|
30
|
+
|
|
31
|
+
type MoveDirection = "up" | "down" | "left" | "right";
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @license Apache-2.0
|
|
35
|
+
*
|
|
36
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
37
|
+
*
|
|
38
|
+
* You may not use this file except in compliance with the License
|
|
39
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
40
|
+
*/
|
|
41
|
+
type RelativeSize3 = "middle" | "large" | "small";
|
|
42
|
+
type RelativeSize5 = RelativeSize3 | ("larger" | "smaller");
|
|
43
|
+
type RelativeSize7 = RelativeSize5 | ("largest" | "smallest");
|
|
44
|
+
type RelativeSize = RelativeSize3;
|
|
45
|
+
|
|
46
|
+
type HorizontalEdge = 'left' | 'right' | 'start' | 'end';
|
|
47
|
+
|
|
48
|
+
type VerticalEdge = 'top' | 'bottom';
|
|
49
|
+
|
|
50
|
+
/** Edge of the viewport */
|
|
51
|
+
type ViewportEdge = VerticalEdge | HorizontalEdge;
|
|
52
|
+
|
|
53
|
+
export type { AbstractConstructor, Constructor, ContentAlignment, HorizontalEdge, LayoutBreakpoint, LayoutDirection, LayoutOrientation, MouseCursor, MouseDragAndDropCursor, MouseGeneralCursor, MouseLinkAndStatusCursor, MouseResizeAndScrollCursor, MouseSelectionCursor, MouseZoomingCursor, MoveDirection, RelativeSize, RelativeSize3, RelativeSize5, RelativeSize7, VerticalEdge, ViewportEdge };
|