@cute-widgets/base 20.0.3 → 20.0.5
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 +31 -4
- package/abstract/index.d.ts +13 -4
- package/button/index.d.ts +47 -24
- package/button-toggle/index.d.ts +8 -4
- package/card/index.d.ts +9 -6
- package/collapse/index.d.ts +49 -48
- package/core/directives/index.d.ts +1 -31
- package/core/index.d.ts +41 -28
- package/core/interfaces/index.d.ts +1 -1
- package/core/layout/index.d.ts +40 -27
- package/core/nav/index.d.ts +1 -2
- package/dialog/index.d.ts +81 -57
- package/expansion/index.d.ts +5 -18
- package/fesm2022/cute-widgets-base-abstract.mjs +13 -8
- package/fesm2022/cute-widgets-base-abstract.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-button-toggle.mjs +36 -29
- package/fesm2022/cute-widgets-base-button-toggle.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-button.mjs +169 -104
- package/fesm2022/cute-widgets-base-button.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-card.mjs +46 -29
- package/fesm2022/cute-widgets-base-card.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-chips.mjs +6 -18
- package/fesm2022/cute-widgets-base-chips.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-collapse.mjs +114 -126
- package/fesm2022/cute-widgets-base-collapse.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-directives.mjs +4 -72
- package/fesm2022/cute-widgets-base-core-directives.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-interfaces.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-layout.mjs +76 -40
- package/fesm2022/cute-widgets-base-core-layout.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-nav.mjs +1 -2
- package/fesm2022/cute-widgets-base-core-nav.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-theming.mjs +1 -1
- package/fesm2022/cute-widgets-base-core-theming.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core.mjs +77 -41
- package/fesm2022/cute-widgets-base-core.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-dialog.mjs +152 -117
- package/fesm2022/cute-widgets-base-dialog.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-expansion.mjs +19 -13
- package/fesm2022/cute-widgets-base-expansion.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-list.mjs +2 -2
- package/fesm2022/cute-widgets-base-list.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-menu.mjs +5 -27
- package/fesm2022/cute-widgets-base-menu.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-navbar.mjs +88 -42
- package/fesm2022/cute-widgets-base-navbar.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-paginator.mjs +13 -11
- package/fesm2022/cute-widgets-base-paginator.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-radio.mjs +1 -2
- package/fesm2022/cute-widgets-base-radio.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-select.mjs +2 -2
- package/fesm2022/cute-widgets-base-select.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-sidenav.mjs +31 -30
- package/fesm2022/cute-widgets-base-sidenav.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-snack-bar.mjs +2 -2
- package/fesm2022/cute-widgets-base-snack-bar.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-sort.mjs +60 -257
- package/fesm2022/cute-widgets-base-sort.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-table.mjs +6 -3
- package/fesm2022/cute-widgets-base-table.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-tabs.mjs +86 -61
- package/fesm2022/cute-widgets-base-tabs.mjs.map +1 -1
- package/fesm2022/cute-widgets-base.mjs +3 -1
- package/fesm2022/cute-widgets-base.mjs.map +1 -1
- package/navbar/index.d.ts +30 -9
- package/package.json +6 -5
- package/paginator/index.d.ts +6 -17
- package/radio/index.d.ts +0 -1
- package/sidenav/index.d.ts +1 -2
- package/sort/index.d.ts +22 -135
- package/table/index.d.ts +8 -8
- package/tabs/index.d.ts +35 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken,
|
|
2
|
+
import { InjectionToken, EventEmitter, booleanAttribute, Output, ContentChildren, HostBinding, Input, Directive, inject, NgZone, ChangeDetectionStrategy, ViewEncapsulation, Component, numberAttribute, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { CuteFocusableControl } from '@cute-widgets/base/abstract';
|
|
5
5
|
import { CuteIcon } from '@cute-widgets/base/icon';
|
|
@@ -9,6 +9,142 @@ import { takeUntil } from 'rxjs/operators';
|
|
|
9
9
|
import { toThemeColor, toColorCssClass } from '@cute-widgets/base/core';
|
|
10
10
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* @license Apache-2.0
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
16
|
+
*
|
|
17
|
+
* You may not use this file except in compliance with the License
|
|
18
|
+
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
+
*/
|
|
20
|
+
// Counter used to generate unique IDs.
|
|
21
|
+
let uniqueIdCounter$1 = 0;
|
|
22
|
+
/**
|
|
23
|
+
* Injection token that can be used to reference instances of `CuteButtonGroup`.
|
|
24
|
+
* It serves as an alternative token to the actual `CuteButtonGroup` class which
|
|
25
|
+
* could cause unnecessary retention of the class and its component metadata.
|
|
26
|
+
*/
|
|
27
|
+
const CUTE_BUTTON_GROUP = new InjectionToken('CuteButtonGroup');
|
|
28
|
+
/**
|
|
29
|
+
* Group a series of buttons together on a single line or stack them in a vertical column.
|
|
30
|
+
*/
|
|
31
|
+
class CuteButtonGroup extends CuteFocusableControl {
|
|
32
|
+
get buttonLargerBinding() { return this.magnitude == "larger"; }
|
|
33
|
+
get buttonLargeBinding() { return this.magnitude == "large"; }
|
|
34
|
+
get buttonSmallerBinding() { return this.magnitude == "smaller"; }
|
|
35
|
+
get buttonSmallBinding() { return this.magnitude == "small"; }
|
|
36
|
+
constructor() {
|
|
37
|
+
super();
|
|
38
|
+
/** Whether to place the nested buttons in the vertical direction. */
|
|
39
|
+
this.vertical = false;
|
|
40
|
+
/** Raised when the disabled state of a component group changes. */
|
|
41
|
+
this.disabledChange = new EventEmitter();
|
|
42
|
+
// Buttons that have `disabled` states before the group is disabled as a whole. Uses to restore `disabled` states
|
|
43
|
+
// when the group's state will be enabled again.
|
|
44
|
+
// CuteButtonToggleGroup, as an ancestor, uses this algo too.
|
|
45
|
+
this.#disablesCache = new Set();
|
|
46
|
+
}
|
|
47
|
+
generateId() {
|
|
48
|
+
return `button-group-${++uniqueIdCounter$1}`;
|
|
49
|
+
}
|
|
50
|
+
// Buttons that have `disabled` states before the group is disabled as a whole. Uses to restore `disabled` states
|
|
51
|
+
// when the group's state will be enabled again.
|
|
52
|
+
// CuteButtonToggleGroup, as an ancestor, uses this algo too.
|
|
53
|
+
#disablesCache;
|
|
54
|
+
setDisabledState(newState, emitEvent) {
|
|
55
|
+
let res = super.setDisabledState(newState, emitEvent);
|
|
56
|
+
if (res && this._buttons) {
|
|
57
|
+
const isDisabled = coerceBooleanProperty(newState);
|
|
58
|
+
if (isDisabled) {
|
|
59
|
+
this._buttons.forEach(btn => {
|
|
60
|
+
if (btn.disabled) {
|
|
61
|
+
this.#disablesCache.add(btn);
|
|
62
|
+
}
|
|
63
|
+
btn.disabled = isDisabled;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
this._buttons.forEach(btn => {
|
|
68
|
+
if (!this.#disablesCache.has(btn)) {
|
|
69
|
+
btn.disabled = false;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
this.#disablesCache.clear();
|
|
73
|
+
}
|
|
74
|
+
this._markButtonsForCheck();
|
|
75
|
+
this.disabledChange.emit(isDisabled);
|
|
76
|
+
}
|
|
77
|
+
return res;
|
|
78
|
+
}
|
|
79
|
+
ngAfterContentInit() {
|
|
80
|
+
super.ngAfterContentInit();
|
|
81
|
+
this._buttons?.forEach(b => {
|
|
82
|
+
b.defaultColor = this.color ?? "primary";
|
|
83
|
+
if (this.disabled) {
|
|
84
|
+
b.disabled = this.disabled;
|
|
85
|
+
}
|
|
86
|
+
if (b.buttonStyle == "base") {
|
|
87
|
+
b.inputButtonStyle = this.buttonStyle ?? "flat-button";
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
ngOnDestroy() {
|
|
92
|
+
super.ngOnDestroy();
|
|
93
|
+
this.#disablesCache.clear();
|
|
94
|
+
}
|
|
95
|
+
/** Marks all the child button toggles to be checked. */
|
|
96
|
+
_markButtonsForCheck() {
|
|
97
|
+
this._buttons?.forEach(btn => btn.markForCheck());
|
|
98
|
+
}
|
|
99
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteButtonGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
100
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.15", type: CuteButtonGroup, isStandalone: true, selector: "cute-button-group", inputs: { vertical: ["vertical", "vertical", booleanAttribute], magnitude: "magnitude", buttonStyle: "buttonStyle" }, outputs: { disabledChange: "disabledChange" }, host: { attributes: { "role": "group" }, properties: { "class": "\"btn-group\" +(vertical?\"-vertical\":\"\")", "class.disabled": "disabled", "attr.aria-disabled": "disabled", "attr.aria-label": "ariaLabel || null", "attr.aria-labelledby": "ariaLabelledby || null", "attr.aria-describedby": "ariaDescribedby || null", "attr.tabindex": "-1", "id": "id || null", "class.cute-btn-group-xl": "this.buttonLargerBinding", "class.btn-group-lg": "this.buttonLargeBinding", "class.cute-btn-group-xs": "this.buttonSmallerBinding", "class.btn-group-sm": "this.buttonSmallBinding" }, classAttribute: "cute-button-group" }, providers: [{ provide: CUTE_BUTTON_GROUP, useExisting: CuteButtonGroup }], queries: [{ propertyName: "_buttons", predicate: CUTE_BUTTON_BASE, descendants: true }], exportAs: ["cuteButtonGroup"], usesInheritance: true, ngImport: i0 }); }
|
|
101
|
+
}
|
|
102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteButtonGroup, decorators: [{
|
|
103
|
+
type: Directive,
|
|
104
|
+
args: [{
|
|
105
|
+
selector: "cute-button-group",
|
|
106
|
+
exportAs: "cuteButtonGroup",
|
|
107
|
+
host: {
|
|
108
|
+
'role': 'group',
|
|
109
|
+
'class': 'cute-button-group',
|
|
110
|
+
'[class]': '"btn-group" +(vertical?"-vertical":"")',
|
|
111
|
+
'[class.disabled]': 'disabled',
|
|
112
|
+
'[attr.aria-disabled]': 'disabled',
|
|
113
|
+
'[attr.aria-label]': 'ariaLabel || null',
|
|
114
|
+
'[attr.aria-labelledby]': 'ariaLabelledby || null',
|
|
115
|
+
'[attr.aria-describedby]': 'ariaDescribedby || null',
|
|
116
|
+
'[attr.tabindex]': '-1',
|
|
117
|
+
'[id]': 'id || null'
|
|
118
|
+
},
|
|
119
|
+
providers: [{ provide: CUTE_BUTTON_GROUP, useExisting: CuteButtonGroup }],
|
|
120
|
+
standalone: true
|
|
121
|
+
}]
|
|
122
|
+
}], ctorParameters: () => [], propDecorators: { vertical: [{
|
|
123
|
+
type: Input,
|
|
124
|
+
args: [{ transform: booleanAttribute }]
|
|
125
|
+
}], magnitude: [{
|
|
126
|
+
type: Input
|
|
127
|
+
}], buttonStyle: [{
|
|
128
|
+
type: Input
|
|
129
|
+
}], buttonLargerBinding: [{
|
|
130
|
+
type: HostBinding,
|
|
131
|
+
args: ["class.cute-btn-group-xl"]
|
|
132
|
+
}], buttonLargeBinding: [{
|
|
133
|
+
type: HostBinding,
|
|
134
|
+
args: ["class.btn-group-lg"]
|
|
135
|
+
}], buttonSmallerBinding: [{
|
|
136
|
+
type: HostBinding,
|
|
137
|
+
args: ["class.cute-btn-group-xs"]
|
|
138
|
+
}], buttonSmallBinding: [{
|
|
139
|
+
type: HostBinding,
|
|
140
|
+
args: ["class.btn-group-sm"]
|
|
141
|
+
}], _buttons: [{
|
|
142
|
+
type: ContentChildren,
|
|
143
|
+
args: [CUTE_BUTTON_BASE, { descendants: true }]
|
|
144
|
+
}], disabledChange: [{
|
|
145
|
+
type: Output
|
|
146
|
+
}] } });
|
|
147
|
+
|
|
12
148
|
/**
|
|
13
149
|
* @license Apache-2.0
|
|
14
150
|
*
|
|
@@ -29,7 +165,7 @@ const CUTE_BUTTON_CONFIG = new InjectionToken('CUTE_BUTTON_CONFIG');
|
|
|
29
165
|
*/
|
|
30
166
|
const CUTE_BUTTON_BASE = new InjectionToken('CuteButtonBase');
|
|
31
167
|
class CuteButtonBase extends CuteFocusableControl {
|
|
32
|
-
/** Button's appearance style in the following format: `{style}-button
|
|
168
|
+
/** Button's appearance style in the following format: `{style}-button`. */
|
|
33
169
|
get inputButtonStyle() { return this._inputButtonStyle; }
|
|
34
170
|
set inputButtonStyle(value) {
|
|
35
171
|
this._inputButtonStyle = value || "base-button";
|
|
@@ -60,7 +196,7 @@ class CuteButtonBase extends CuteFocusableControl {
|
|
|
60
196
|
this._buttonStyle = this._inputButtonStyle;
|
|
61
197
|
}
|
|
62
198
|
}
|
|
63
|
-
/** Whether to disable the ripple effect on button clicking */
|
|
199
|
+
/** Whether to disable the ripple effect on button clicking. */
|
|
64
200
|
get disableRipple() { return this._ripple.disabled; }
|
|
65
201
|
set disableRipple(value) { this._ripple.disabled = value; }
|
|
66
202
|
/**
|
|
@@ -120,15 +256,17 @@ class CuteButtonBase extends CuteFocusableControl {
|
|
|
120
256
|
super();
|
|
121
257
|
this._destroyed$ = new Subject();
|
|
122
258
|
this._ngZone = inject(NgZone);
|
|
259
|
+
this._group = inject(CUTE_BUTTON_GROUP, { optional: true, host: true });
|
|
123
260
|
this._isAnchor = false;
|
|
124
261
|
this._inputButtonStyle = "base-button";
|
|
125
262
|
this._buttonStyle = "base";
|
|
126
|
-
/** Whether to
|
|
127
|
-
this.
|
|
263
|
+
/** Whether to enable text wrapping. */
|
|
264
|
+
this.wrapText = false;
|
|
128
265
|
/** Whether to show the collapse/expand indicator based on the `aria-expanded` current value. */
|
|
129
266
|
this.withAriaExpandedIndicator = false;
|
|
130
267
|
const config = inject(CUTE_BUTTON_CONFIG, { optional: true });
|
|
131
268
|
this.disabledInteractive = config?.disabledInteractive ?? false;
|
|
269
|
+
this.wrapText = config?.wrapText ?? false;
|
|
132
270
|
this._ripple = RippleManager.getInstance(this._nativeElement);
|
|
133
271
|
this._isAnchor = (this._nativeElement.tagName == "A");
|
|
134
272
|
}
|
|
@@ -151,7 +289,8 @@ class CuteButtonBase extends CuteFocusableControl {
|
|
|
151
289
|
}
|
|
152
290
|
setDisabledState(newState) {
|
|
153
291
|
if (this._isAnchor) {
|
|
154
|
-
|
|
292
|
+
const isDisabled = coerceBooleanProperty(newState);
|
|
293
|
+
if (isDisabled) {
|
|
155
294
|
this._savedTabIndex = this.tabIndex;
|
|
156
295
|
this.tabIndex = -1;
|
|
157
296
|
}
|
|
@@ -188,6 +327,9 @@ class CuteButtonBase extends CuteFocusableControl {
|
|
|
188
327
|
}
|
|
189
328
|
ngOnInit() {
|
|
190
329
|
super.ngOnInit();
|
|
330
|
+
if (this._group) {
|
|
331
|
+
this.defaultColor = this._group.color;
|
|
332
|
+
}
|
|
191
333
|
this._focusMonitor.monitor(this._elementRef, true);
|
|
192
334
|
["mousedown", "mouseup", "click"].forEach((type) => {
|
|
193
335
|
fromEvent(this._nativeElement, type, { capture: true })
|
|
@@ -238,13 +380,14 @@ class CuteButtonBase extends CuteFocusableControl {
|
|
|
238
380
|
}
|
|
239
381
|
}
|
|
240
382
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteButtonBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
241
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.15", type: CuteButtonBase, isStandalone: true, inputs: { inputButtonStyle: ["cuteButton", "inputButtonStyle"], magnitude: "magnitude",
|
|
383
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.15", type: CuteButtonBase, isStandalone: true, inputs: { inputButtonStyle: ["cuteButton", "inputButtonStyle"], magnitude: "magnitude", wrapText: ["wrapText", "wrapText", booleanAttribute], disableRipple: "disableRipple", ariaDisabled: ["aria-disabled", "ariaDisabled", booleanAttribute], withAriaExpandedIndicator: ["withAriaExpandedIndicator", "withAriaExpandedIndicator", booleanAttribute], disabledInteractive: ["disabledInteractive", "disabledInteractive", booleanAttribute], visuallyHiddenLabel: "visuallyHiddenLabel" }, host: { listeners: { "keydown": "_haltDisabledEvents($event)" }, properties: { "attr.magnitude": "magnitude", "style.--bs-focus-ring-color": "color? \"rgba(var(\"+bsColorVarName+\"), var(--bs-focus-ring-opacity))\" : \"var(--bs-border-color-translucent)\"", "class": "this.classNames", "style.--bs-btn-close-focus-shadow": "this._closeButtonShadowColor", "class.cute-btn-xxl": "this.buttonLargestBinding", "class.cute-btn-xl": "this.buttonLargerBinding", "class.btn-lg": "this.buttonLargeBinding", "class.btn-sm": "this.buttonSmallBinding", "class.cute-btn-xs": "this.buttonSmallerBinding", "class.cute-btn-xxs": "this.buttonSmallestBinding", "style.--cute-icon-button-color-rgb": "this.iconButtonColorBinding", "style.--cute-base-button-color-rgb": "this.baseButtonColorBinding" }, classAttribute: "btn" }, queries: [{ propertyName: "_icons", predicate: CuteIcon }], usesInheritance: true, ngImport: i0 }); }
|
|
242
384
|
}
|
|
243
385
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteButtonBase, decorators: [{
|
|
244
386
|
type: Directive,
|
|
245
387
|
args: [{
|
|
246
388
|
host: {
|
|
247
389
|
class: 'btn',
|
|
390
|
+
'[attr.magnitude]': 'magnitude',
|
|
248
391
|
'[style.--bs-focus-ring-color]': 'color? "rgba(var("+bsColorVarName+"), var(--bs-focus-ring-opacity))" : "var(--bs-border-color-translucent)"',
|
|
249
392
|
'(keydown)': '_haltDisabledEvents($event)',
|
|
250
393
|
}
|
|
@@ -257,8 +400,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
257
400
|
args: ["cuteButton"]
|
|
258
401
|
}], magnitude: [{
|
|
259
402
|
type: Input
|
|
260
|
-
}],
|
|
261
|
-
type: Input
|
|
403
|
+
}], wrapText: [{
|
|
404
|
+
type: Input,
|
|
405
|
+
args: [{ transform: booleanAttribute }]
|
|
262
406
|
}], disableRipple: [{
|
|
263
407
|
type: Input
|
|
264
408
|
}], ariaDisabled: [{
|
|
@@ -321,9 +465,9 @@ class CuteButton extends CuteButtonBase {
|
|
|
321
465
|
this.toThemeColor = toThemeColor;
|
|
322
466
|
}
|
|
323
467
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
324
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CuteButton, isStandalone: true, selector: "button[cuteButton],\n button[cute-button],\n a[cuteButton],\n a[cute-button],\n ", host: { properties: { "class.cute-anchor": "_isAnchor", "class.btn-close": "buttonStyle == \"close\"", "class.rounded-pill": "buttonStyle==\"pill\"", "class.rounded-circle": "buttonStyle==\"circle\"", "class.raised": "buttonStyle==\"raised\" && !disabled", "class.icon-link": "toThemeColor(color)==\"link\"", "class.cute-button-expandable": "withAriaExpandedIndicator", "class.
|
|
468
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CuteButton, isStandalone: true, selector: "button[cuteButton],\n button[cute-button],\n a[cuteButton],\n a[cute-button],\n ", host: { properties: { "class.cute-anchor": "_isAnchor", "class.btn-close": "buttonStyle == \"close\"", "class.rounded-pill": "buttonStyle==\"pill\"", "class.rounded-circle": "buttonStyle==\"circle\"", "class.raised": "buttonStyle==\"raised\" && !disabled", "class.icon-link": "toThemeColor(color)==\"link\"", "class.cute-button-expandable": "withAriaExpandedIndicator", "class.disabled": "(_isAnchor || buttonStyle==\"icon\" || disabledInteractive) && disabled", "class.cute-button-disabled-interactive": "disabledInteractive", "class.cute-unthemed": "!color", "attr.tabindex": "_getTabIndex()", "attr.disabled": "_getDisabledAttribute()", "attr.aria-disabled": "_getAriaDisabled()", "attr.id": "id || null", "attr.aria-label": "ariaLabel || null" }, classAttribute: "cute-button" }, providers: [
|
|
325
469
|
{ provide: CUTE_BUTTON_BASE, useExisting: CuteButton }
|
|
326
|
-
], exportAs: ["cuteButton"], usesInheritance: true, ngImport: i0, template: "<!--\r\n For capturing HTML-elements such as <i class..> or <img src=\"\"...> and others\r\n we need apply [cuteButtonIcon] attribute to them.\r\n-->\r\n<span class=\"cute-icon-wrapper\">\r\n <ng-content select=\".material-icons:not([iconPositionEnd]),\r\n .bi:not([iconPositionEnd]),\r\n cute-icon:not([iconPositionEnd]),\r\n cute-avatar:not([iconPositionEnd]),\r\n [cuteButtonIcon]:not([iconPositionEnd])\">\r\n </ng-content>\r\n</span>\r\n\r\n<span class=\"cute-button-label\">\r\n <ng-content>\r\n @if(visuallyHiddenLabel) {\r\n <span class=\"visually-hidden\"> {{visuallyHiddenLabel}} </span>\r\n }\r\n </ng-content>\r\n</span>\r\n\r\n<span class=\"cute-icon-wrapper\">\r\n <ng-content select=\".material-icons[iconPositionEnd],\r\n .bi:[iconPositionEnd],\r\n cute-icon[iconPositionEnd],\r\n cute-avatar:[iconPositionEnd],\r\n [cuteButtonIcon][iconPositionEnd]\">\r\n </ng-content>\r\n</span>\r\n", styles: [".cute-ripple-element{--cute-ripple-duration: .5s;--cute-ripple-bg-color: rgba(255, 255, 255, .18);position:absolute;border-radius:50%;pointer-events:none;transform:scale3d(0,0,0);animation:cute-ripple-element-animation var(--cute-ripple-duration) cubic-bezier(.65,.05,.36,1);background-color:var(--cute-ripple-bg-color);will-change:transform,opacity}@media (forced-colors: active){.cute-ripple-element{display:none}}@keyframes cute-ripple-element-animation{to{transform:scale(8);opacity:0}}.cute-button,.cute-anchor{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;overflow:visible;box-shadow:none}.cute-button:has(>:not(.cute-ripple):nth-child(2)),.cute-anchor:has(>:not(.cute-ripple):nth-child(2)){gap:.5em}.cute-button.dropdown-toggle,.cute-anchor.dropdown-toggle{gap:.375em}.cute-button.dropdown-toggle-split,.cute-anchor.dropdown-toggle-split{gap:0}.cute-button .cute-icon-wrapper,.cute-anchor .cute-icon-wrapper{display:contents}.cute-button .cute-icon-wrapper:empty,.cute-anchor .cute-icon-wrapper:empty{display:none}.cute-button .cute-button-label,.cute-anchor .cute-button-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cute-button .cute-button-label .badge,.cute-anchor .cute-button-label .badge{line-height:var(--bs-btn-line-height);top:0}.cute-button .cute-button-label:empty,.cute-anchor .cute-button-label:empty{display:none}.cute-button.cute-button-disabled-interactive,.cute-anchor.cute-button-disabled-interactive{cursor:pointer}.cute-button.cute-button-disabled-interactive:disabled,.cute-button.cute-button-disabled-interactive.disabled,.cute-anchor.cute-button-disabled-interactive:disabled,.cute-anchor.cute-button-disabled-interactive.disabled{pointer-events:auto;cursor:default;box-shadow:none;--bs-btn-active-bg: var(--bs-btn-disabled-bg);--bs-btn-active-border-color: var(--bs-btn-disabled-border-color);--bs-btn-active-color: var(--bs-btn-disabled-color)}.cute-button.cute-button-disabled-interactive:disabled.cute-icon-button,.cute-button.cute-button-disabled-interactive.disabled.cute-icon-button,.cute-anchor.cute-button-disabled-interactive:disabled.cute-icon-button,.cute-anchor.cute-button-disabled-interactive.disabled.cute-icon-button{--bs-btn-active-bg: transparent;--bs-btn-active-border-color: transparent;--bs-btn-hover-bg: transparent}.cute-button.cute-base-button,.cute-anchor.cute-base-button{font-weight:500;--cute-base-button-color-rgb: var(--bs-body-color-rgb);--bs-btn-active-bg: rgba(var(--cute-base-button-color-rgb), .08);--bs-btn-active-border-color: rgba(var(--cute-base-button-color-rgb), .12);--bs-btn-disabled-border-color: transparent;--bs-btn-hover-bg: rgba(var(--cute-base-button-color-rgb), .06)}.cute-button.cute-flat-button.cute-unthemed,.cute-anchor.cute-flat-button.cute-unthemed{--bs-btn-bg: var(--bs-tertiary-bg);--bs-btn-hover-bg: var(--bs-secondary-bg);--bs-btn-active-bg: var(--bs-secondary-bg);border-color:transparent}.cute-button.raised,.cute-anchor.raised{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;transition:box-shadow .2s cubic-bezier(.4,0,.2,1)}.cute-button.raised:hover,.cute-button.raised:focus,.cute-anchor.raised:hover,.cute-anchor.raised:focus{box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.cute-button.raised:active,.cute-anchor.raised:active{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cute-button.raised:disabled,.cute-button.raised.disabled,.cute-anchor.raised:disabled,.cute-anchor.raised.disabled{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f}.cute-button.btn-light:disabled,.cute-button.btn-light.disabled,.cute-anchor.btn-light:disabled,.cute-anchor.btn-light.disabled{background-color:#0000001a}.cute-button>[role=img],.cute-button i[class],.cute-anchor>[role=img],.cute-anchor i[class]{align-self:center;pointer-events:none;overflow:visible}.cute-button.cute-fab-button,.cute-anchor.cute-fab-button{--icon-size: 40px;width:var(--icon-size);height:var(--icon-size);min-width:var(--icon-size);line-height:1;padding:0;padding-top:revert;gap:0;border-radius:50%;flex-shrink:0;-webkit-tap-highlight-color:rgba(0,0,0,0);box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.cute-button.cute-fab-button[magnitude=largest],.cute-anchor.cute-fab-button[magnitude=largest]{--icon-size: 64px}.cute-button.cute-fab-button[magnitude=larger],.cute-anchor.cute-fab-button[magnitude=larger]{--icon-size: 56px}.cute-button.cute-fab-button[magnitude=large],.cute-anchor.cute-fab-button[magnitude=large]{--icon-size: 48px}.cute-button.cute-fab-button[magnitude=middle],.cute-anchor.cute-fab-button[magnitude=middle]{--icon-size: 40px}.cute-button.cute-fab-button[magnitude=small],.cute-anchor.cute-fab-button[magnitude=small]{--icon-size: 32px}.cute-button.cute-fab-button[magnitude=smaller],.cute-anchor.cute-fab-button[magnitude=smaller]{--icon-size: 24px}.cute-button.cute-fab-button[magnitude=smallest],.cute-anchor.cute-fab-button[magnitude=smallest]{--icon-size: 16px}.cute-button.cute-fab-button svg,.cute-anchor.cute-fab-button svg{vertical-align:baseline}.cute-button.cute-fab-button:active,.cute-anchor.cute-fab-button:active{box-shadow:0 7px 8px -4px #0003,0 12px 17px 2px #00000024,0 5px 22px 4px #0000001f}.cute-button.cute-fab-button:active.btn-light,.cute-anchor.cute-fab-button:active.btn-light{border-color:#00000040}.cute-button.cute-fab-button:hover,.cute-button.cute-fab-button.cdk-focused,.cute-anchor.cute-fab-button:hover,.cute-anchor.cute-fab-button.cdk-focused{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cute-button.cute-fab-button:disabled,.cute-button.cute-fab-button.disabled,.cute-anchor.cute-fab-button:disabled,.cute-anchor.cute-fab-button.disabled{border:0;box-shadow:none}.cute-button.cute-fab-button:disabled>[role=img],.cute-button.cute-fab-button:disabled i[class],.cute-button.cute-fab-button.disabled>[role=img],.cute-button.cute-fab-button.disabled i[class],.cute-anchor.cute-fab-button:disabled>[role=img],.cute-anchor.cute-fab-button:disabled i[class],.cute-anchor.cute-fab-button.disabled>[role=img],.cute-anchor.cute-fab-button.disabled i[class]{color:#00000061!important}.cute-button.cute-icon-button,.cute-anchor.cute-icon-button{overflow:hidden;border-radius:50%;border:0;padding:0;gap:0!important;--icon-size: 40px;width:var(--icon-size);height:var(--icon-size);min-width:var(--icon-size);line-height:1;--cute-icon-button-color-rgb: var(--bs-body-color-rgb);--bs-btn-active-bg: rgba(var(--cute-icon-button-color-rgb), .12);--bs-btn-active-border-color: rgba(var(--cute-icon-button-color-rgb), .12);--bs-btn-hover-bg: rgba(var(--cute-icon-button-color-rgb), .06)}.cute-button.cute-icon-button[magnitude=largest],.cute-anchor.cute-icon-button[magnitude=largest]{--icon-size: 64px}.cute-button.cute-icon-button[magnitude=larger],.cute-anchor.cute-icon-button[magnitude=larger]{--icon-size: 56px}.cute-button.cute-icon-button[magnitude=large],.cute-anchor.cute-icon-button[magnitude=large]{--icon-size: 48px}.cute-button.cute-icon-button[magnitude=middle],.cute-anchor.cute-icon-button[magnitude=middle]{--icon-size: 40px}.cute-button.cute-icon-button[magnitude=small],.cute-anchor.cute-icon-button[magnitude=small]{--icon-size: 32px}.cute-button.cute-icon-button[magnitude=smaller],.cute-anchor.cute-icon-button[magnitude=smaller]{--icon-size: 24px}.cute-button.cute-icon-button[magnitude=smallest],.cute-anchor.cute-icon-button[magnitude=smallest]{--icon-size: 16px}.cute-button.cute-icon-button svg,.cute-anchor.cute-icon-button svg{vertical-align:baseline}.cute-button.cute-icon-button.cdk-focused,.cute-anchor.cute-icon-button.cdk-focused{--bs-btn-hover-bg: rgba(var(--cute-icon-button-color-rgb), .04)}.cute-btn-xxs,.cute-btn-group-xxs>.btn{--bs-btn-padding-y: .25rem;--bs-btn-padding-x: .5rem;--bs-btn-font-size: .5rem}.cute-btn-xs,.cute-btn-group-xs>.btn{--bs-btn-padding-y: .25rem;--bs-btn-padding-x: .5rem;--bs-btn-font-size: .75rem}.cute-btn-xl,.cute-btn-group-xl>.btn{--bs-btn-padding-y: .5rem;--bs-btn-padding-x: 1rem;--bs-btn-font-size: 1.5rem}.cute-btn-xxl,.cute-btn-group-xxl>.btn{--bs-btn-padding-y: .5rem;--bs-btn-padding-x: 1rem;--bs-btn-font-size: 2.5rem}[dir=rtl] .btn-group>.btn:not(:first-child):not(.dropdown-toggle),[dir=rtl] .btn-group>.btn.dropdown-toggle-split:last-child,[dir=rtl] .btn-group>.btn-group:not(:first-child)>.btn{border-radius:0}[dir=rtl] .btn-group>.btn:nth-child(n+3),[dir=rtl] .btn-group>:not(.btn-check)+.btn,[dir=rtl] .btn-group>.btn-group:not(:last-child)>.btn{border-radius:0 var(--bs-btn-border-radius) var(--bs-btn-border-radius) 0}[dir=rtl] .btn-group>.btn:first-child:not(.dropdown-toggle),[dir=rtl] .btn-group>.btn.dropdown-toggle-split:first-child,[dir=rtl] .btn-group>.btn-group:first-child>.btn{border-radius:0 var(--bs-btn-border-radius) var(--bs-btn-border-radius) 0}[dir=rtl] .btn-group>.btn:last-child:not(.dropdown-toggle),[dir=rtl] .btn-group>.btn.dropdown-toggle-split:last-child,[dir=rtl] .btn-group>.btn-group:last-child>.btn{border-radius:var(--bs-btn-border-radius) 0 0 var(--bs-btn-border-radius)}.cute-button-expandable{padding:.25rem .5rem;font-weight:600;color:var(--bs-emphasis-color);background-color:transparent}.cute-button-expandable:hover,.cute-button-expandable:focus{color:rgba(var(--bs-emphasis-color-rgb),.85);background-color:var(--bs-tertiary-bg)}.cute-button-expandable:before{width:1.25em;line-height:0;content:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e\");transition:transform .35s ease;transform-origin:.5em 50%;transform:scale(.85)}[data-bs-theme=dark] .cute-button-expandable:before{content:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28255,255,255,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e\")}[dir=rtl] .cute-button-expandable:before{transform:rotate(180deg) scale(.85);margin-left:.25em;text-align:end}.cute-button-expandable[aria-expanded=true]{color:rgba(var(--bs-emphasis-color-rgb),.85)}.cute-button-expandable[aria-expanded=true]:before{transform:rotate(90deg) scale(.85)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
470
|
+
], exportAs: ["cuteButton"], usesInheritance: true, ngImport: i0, template: "<!--\r\n For capturing HTML-elements such as <i class..> or <img src=\"\"...> and others\r\n we need apply [cuteButtonIcon] attribute to them.\r\n-->\r\n<span class=\"cute-icon-wrapper\">\r\n <ng-content select=\".material-icons:not([iconPositionEnd]),\r\n .bi:not([iconPositionEnd]),\r\n cute-icon:not([iconPositionEnd]),\r\n cute-avatar:not([iconPositionEnd]),\r\n [cuteButtonIcon]:not([iconPositionEnd])\">\r\n </ng-content>\r\n</span>\r\n\r\n<span class=\"cute-button-label\" [class.cute-button-label__nowrap]=\"!wrapText\">\r\n <ng-content>\r\n @if(visuallyHiddenLabel) {\r\n <span class=\"visually-hidden\"> {{visuallyHiddenLabel}} </span>\r\n }\r\n </ng-content>\r\n</span>\r\n\r\n<span class=\"cute-icon-wrapper\">\r\n <ng-content select=\".material-icons[iconPositionEnd],\r\n .bi:[iconPositionEnd],\r\n cute-icon[iconPositionEnd],\r\n cute-avatar:[iconPositionEnd],\r\n [cuteButtonIcon][iconPositionEnd]\">\r\n </ng-content>\r\n</span>\r\n", styles: [".cute-ripple-element{--cute-ripple-duration: .5s;--cute-ripple-bg-color: rgba(255, 255, 255, .18);position:absolute;border-radius:50%;pointer-events:none;transform:scale3d(0,0,0);animation:cute-ripple-element-animation var(--cute-ripple-duration) cubic-bezier(.65,.05,.36,1);background-color:var(--cute-ripple-bg-color);will-change:transform,opacity}@media (forced-colors: active){.cute-ripple-element{display:none}}@keyframes cute-ripple-element-animation{to{transform:scale(8);opacity:0}}.cute-button,.cute-anchor{position:relative;display:inline-flex;align-items:center;justify-content:center;overflow:visible;box-shadow:none}.cute-button:not(.btn-close),.cute-anchor:not(.btn-close){box-sizing:border-box}.cute-button:has(>:nth-child(2)),.cute-anchor:has(>:nth-child(2)){gap:.5em}.cute-button.dropdown-toggle,.cute-anchor.dropdown-toggle{gap:.375em}.cute-button.dropdown-toggle-split,.cute-anchor.dropdown-toggle-split{gap:0}.cute-button .cute-icon-wrapper,.cute-anchor .cute-icon-wrapper{display:contents}.cute-button .cute-icon-wrapper:empty,.cute-anchor .cute-icon-wrapper:empty{display:none}.cute-button .cute-button-label.cute-button-label__nowrap,.cute-anchor .cute-button-label.cute-button-label__nowrap{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cute-button .cute-button-label .badge,.cute-anchor .cute-button-label .badge{line-height:var(--bs-btn-line-height);top:0}.cute-button .cute-button-label:empty,.cute-anchor .cute-button-label:empty{display:none}.cute-button.cute-button-disabled-interactive,.cute-anchor.cute-button-disabled-interactive{cursor:pointer}.cute-button.cute-button-disabled-interactive:disabled,.cute-button.cute-button-disabled-interactive.disabled,.cute-anchor.cute-button-disabled-interactive:disabled,.cute-anchor.cute-button-disabled-interactive.disabled{pointer-events:auto;cursor:default;box-shadow:none;--bs-btn-active-bg: var(--bs-btn-disabled-bg);--bs-btn-active-border-color: var(--bs-btn-disabled-border-color);--bs-btn-active-color: var(--bs-btn-disabled-color)}.cute-button.cute-button-disabled-interactive:disabled.cute-icon-button,.cute-button.cute-button-disabled-interactive.disabled.cute-icon-button,.cute-anchor.cute-button-disabled-interactive:disabled.cute-icon-button,.cute-anchor.cute-button-disabled-interactive.disabled.cute-icon-button{--bs-btn-active-bg: transparent;--bs-btn-active-border-color: transparent;--bs-btn-hover-bg: transparent}.cute-button.cute-base-button,.cute-anchor.cute-base-button{font-weight:500;--cute-base-button-color-rgb: var(--bs-body-color-rgb);--bs-btn-active-bg: rgba(var(--cute-base-button-color-rgb), .08);--bs-btn-active-border-color: rgba(var(--cute-base-button-color-rgb), .12);--bs-btn-disabled-border-color: transparent;--bs-btn-hover-bg: rgba(var(--cute-base-button-color-rgb), .06)}.cute-button.cute-flat-button.cute-unthemed,.cute-anchor.cute-flat-button.cute-unthemed{--bs-btn-bg: var(--bs-tertiary-bg);--bs-btn-hover-bg: var(--bs-secondary-bg);--bs-btn-active-bg: var(--bs-secondary-bg);border-color:transparent}.cute-button.raised,.cute-anchor.raised{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;transition:box-shadow .2s cubic-bezier(.4,0,.2,1)}.cute-button.raised:hover,.cute-button.raised:focus,.cute-anchor.raised:hover,.cute-anchor.raised:focus{box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.cute-button.raised:active,.cute-anchor.raised:active{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cute-button.raised:disabled,.cute-button.raised.disabled,.cute-anchor.raised:disabled,.cute-anchor.raised.disabled{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f}.cute-button.btn-light:disabled,.cute-button.btn-light.disabled,.cute-anchor.btn-light:disabled,.cute-anchor.btn-light.disabled{background-color:#0000001a}.cute-button>[role=img],.cute-button i[class],.cute-anchor>[role=img],.cute-anchor i[class]{align-self:center;pointer-events:none;overflow:visible}.cute-button.cute-fab-button,.cute-anchor.cute-fab-button{--icon-size: 40px;width:var(--icon-size);height:var(--icon-size);min-width:var(--icon-size);line-height:1;padding:0;padding-top:revert;gap:0;border-radius:50%;flex-shrink:0;-webkit-tap-highlight-color:rgba(0,0,0,0);box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.cute-button.cute-fab-button[magnitude=largest],.cute-anchor.cute-fab-button[magnitude=largest]{--icon-size: 64px}.cute-button.cute-fab-button[magnitude=larger],.cute-anchor.cute-fab-button[magnitude=larger]{--icon-size: 56px}.cute-button.cute-fab-button[magnitude=large],.cute-anchor.cute-fab-button[magnitude=large]{--icon-size: 48px}.cute-button.cute-fab-button[magnitude=middle],.cute-anchor.cute-fab-button[magnitude=middle]{--icon-size: 40px}.cute-button.cute-fab-button[magnitude=small],.cute-anchor.cute-fab-button[magnitude=small]{--icon-size: 32px}.cute-button.cute-fab-button[magnitude=smaller],.cute-anchor.cute-fab-button[magnitude=smaller]{--icon-size: 24px}.cute-button.cute-fab-button[magnitude=smallest],.cute-anchor.cute-fab-button[magnitude=smallest]{--icon-size: 16px}.cute-button.cute-fab-button svg,.cute-anchor.cute-fab-button svg{vertical-align:baseline}.cute-button.cute-fab-button:active,.cute-anchor.cute-fab-button:active{box-shadow:0 7px 8px -4px #0003,0 12px 17px 2px #00000024,0 5px 22px 4px #0000001f}.cute-button.cute-fab-button:active.btn-light,.cute-anchor.cute-fab-button:active.btn-light{border-color:#00000040}.cute-button.cute-fab-button:hover,.cute-button.cute-fab-button.cdk-focused,.cute-anchor.cute-fab-button:hover,.cute-anchor.cute-fab-button.cdk-focused{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cute-button.cute-fab-button:disabled,.cute-button.cute-fab-button.disabled,.cute-anchor.cute-fab-button:disabled,.cute-anchor.cute-fab-button.disabled{border:0;box-shadow:none}.cute-button.cute-fab-button:disabled>[role=img],.cute-button.cute-fab-button:disabled i[class],.cute-button.cute-fab-button.disabled>[role=img],.cute-button.cute-fab-button.disabled i[class],.cute-anchor.cute-fab-button:disabled>[role=img],.cute-anchor.cute-fab-button:disabled i[class],.cute-anchor.cute-fab-button.disabled>[role=img],.cute-anchor.cute-fab-button.disabled i[class]{color:#00000061!important}.cute-button.cute-icon-button,.cute-anchor.cute-icon-button{overflow:hidden;border-radius:50%;border:0;padding:0;gap:0!important;--icon-size: 40px;width:var(--icon-size);height:var(--icon-size);min-width:var(--icon-size);line-height:1;--cute-icon-button-color-rgb: var(--bs-body-color-rgb);--bs-btn-active-bg: rgba(var(--cute-icon-button-color-rgb), .12);--bs-btn-active-border-color: rgba(var(--cute-icon-button-color-rgb), .12);--bs-btn-hover-bg: rgba(var(--cute-icon-button-color-rgb), .06)}.cute-button.cute-icon-button[magnitude=largest],.cute-anchor.cute-icon-button[magnitude=largest]{--icon-size: 64px}.cute-button.cute-icon-button[magnitude=larger],.cute-anchor.cute-icon-button[magnitude=larger]{--icon-size: 56px}.cute-button.cute-icon-button[magnitude=large],.cute-anchor.cute-icon-button[magnitude=large]{--icon-size: 48px}.cute-button.cute-icon-button[magnitude=middle],.cute-anchor.cute-icon-button[magnitude=middle]{--icon-size: 40px}.cute-button.cute-icon-button[magnitude=small],.cute-anchor.cute-icon-button[magnitude=small]{--icon-size: 32px}.cute-button.cute-icon-button[magnitude=smaller],.cute-anchor.cute-icon-button[magnitude=smaller]{--icon-size: 24px}.cute-button.cute-icon-button[magnitude=smallest],.cute-anchor.cute-icon-button[magnitude=smallest]{--icon-size: 16px}.cute-button.cute-icon-button svg,.cute-anchor.cute-icon-button svg{vertical-align:baseline}.cute-button.cute-icon-button.cdk-focused,.cute-anchor.cute-icon-button.cdk-focused{--bs-btn-hover-bg: rgba(var(--cute-icon-button-color-rgb), .04)}.cute-btn-xxs,.cute-btn-group-xxs>.btn{--bs-btn-padding-y: .25rem;--bs-btn-padding-x: .5rem;--bs-btn-font-size: .5rem}.cute-btn-xs,.cute-btn-group-xs>.btn{--bs-btn-padding-y: .25rem;--bs-btn-padding-x: .5rem;--bs-btn-font-size: .75rem}.cute-btn-xl,.cute-btn-group-xl>.btn{--bs-btn-padding-y: .5rem;--bs-btn-padding-x: 1rem;--bs-btn-font-size: 1.5rem}.cute-btn-xxl,.cute-btn-group-xxl>.btn{--bs-btn-padding-y: .5rem;--bs-btn-padding-x: 1rem;--bs-btn-font-size: 2.5rem}[dir=rtl] .btn-group>.btn:not(:first-child):not(.dropdown-toggle),[dir=rtl] .btn-group>.btn.dropdown-toggle-split:last-child,[dir=rtl] .btn-group>.btn-group:not(:first-child)>.btn{border-radius:0}[dir=rtl] .btn-group>.btn:nth-child(n+3),[dir=rtl] .btn-group>:not(.btn-check)+.btn,[dir=rtl] .btn-group>.btn-group:not(:last-child)>.btn{border-radius:0 var(--bs-btn-border-radius) var(--bs-btn-border-radius) 0}[dir=rtl] .btn-group>.btn:first-child:not(.dropdown-toggle),[dir=rtl] .btn-group>.btn.dropdown-toggle-split:first-child,[dir=rtl] .btn-group>.btn-group:first-child>.btn{border-radius:0 var(--bs-btn-border-radius) var(--bs-btn-border-radius) 0}[dir=rtl] .btn-group>.btn:last-child:not(.dropdown-toggle),[dir=rtl] .btn-group>.btn.dropdown-toggle-split:last-child,[dir=rtl] .btn-group>.btn-group:last-child>.btn{border-radius:var(--bs-btn-border-radius) 0 0 var(--bs-btn-border-radius)}.cute-button-expandable{padding:.25rem .5rem;font-weight:600;color:var(--bs-emphasis-color);background-color:transparent}.cute-button-expandable:hover,.cute-button-expandable:focus{color:rgba(var(--bs-emphasis-color-rgb),.85);background-color:var(--bs-tertiary-bg)}.cute-button-expandable:before{width:1.25em;line-height:0;content:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e\");transition:transform .35s ease;transform-origin:.5em 50%;transform:scale(.85)}[data-bs-theme=dark] .cute-button-expandable:before{content:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28255,255,255,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e\")}[dir=rtl] .cute-button-expandable:before{transform:rotate(180deg) scale(.85);margin-left:.25em;text-align:end}.cute-button-expandable[aria-expanded=true]{color:rgba(var(--bs-emphasis-color-rgb),.85)}.cute-button-expandable[aria-expanded=true]:before{transform:rotate(90deg) scale(.85)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
327
471
|
}
|
|
328
472
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteButton, decorators: [{
|
|
329
473
|
type: Component,
|
|
@@ -341,7 +485,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
341
485
|
'[class.icon-link]': 'toThemeColor(color)=="link"',
|
|
342
486
|
'[class.cute-button-expandable]': 'withAriaExpandedIndicator',
|
|
343
487
|
//'[class.focus-ring]': 'buttonStyle=="base" && hasClass("cdk-keyboard-focused")', // See: CuteButtonBase.ngDoCheck()
|
|
344
|
-
'[class.nowrap]': 'nowrap',
|
|
345
488
|
'[class.disabled]': '(_isAnchor || buttonStyle=="icon" || disabledInteractive) && disabled',
|
|
346
489
|
'[class.cute-button-disabled-interactive]': 'disabledInteractive',
|
|
347
490
|
'[class.cute-unthemed]': '!color',
|
|
@@ -352,7 +495,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
352
495
|
'[attr.aria-label]': 'ariaLabel || null',
|
|
353
496
|
}, providers: [
|
|
354
497
|
{ provide: CUTE_BUTTON_BASE, useExisting: CuteButton }
|
|
355
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\r\n For capturing HTML-elements such as <i class..> or <img src=\"\"...> and others\r\n we need apply [cuteButtonIcon] attribute to them.\r\n-->\r\n<span class=\"cute-icon-wrapper\">\r\n <ng-content select=\".material-icons:not([iconPositionEnd]),\r\n .bi:not([iconPositionEnd]),\r\n cute-icon:not([iconPositionEnd]),\r\n cute-avatar:not([iconPositionEnd]),\r\n [cuteButtonIcon]:not([iconPositionEnd])\">\r\n </ng-content>\r\n</span>\r\n\r\n<span class=\"cute-button-label\">\r\n <ng-content>\r\n @if(visuallyHiddenLabel) {\r\n <span class=\"visually-hidden\"> {{visuallyHiddenLabel}} </span>\r\n }\r\n </ng-content>\r\n</span>\r\n\r\n<span class=\"cute-icon-wrapper\">\r\n <ng-content select=\".material-icons[iconPositionEnd],\r\n .bi:[iconPositionEnd],\r\n cute-icon[iconPositionEnd],\r\n cute-avatar:[iconPositionEnd],\r\n [cuteButtonIcon][iconPositionEnd]\">\r\n </ng-content>\r\n</span>\r\n", styles: [".cute-ripple-element{--cute-ripple-duration: .5s;--cute-ripple-bg-color: rgba(255, 255, 255, .18);position:absolute;border-radius:50%;pointer-events:none;transform:scale3d(0,0,0);animation:cute-ripple-element-animation var(--cute-ripple-duration) cubic-bezier(.65,.05,.36,1);background-color:var(--cute-ripple-bg-color);will-change:transform,opacity}@media (forced-colors: active){.cute-ripple-element{display:none}}@keyframes cute-ripple-element-animation{to{transform:scale(8);opacity:0}}.cute-button,.cute-anchor{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;overflow:visible;box-shadow:none}.cute-button:has(>:not(.cute-ripple):nth-child(2)),.cute-anchor:has(>:not(.cute-ripple):nth-child(2)){gap:.5em}.cute-button.dropdown-toggle,.cute-anchor.dropdown-toggle{gap:.375em}.cute-button.dropdown-toggle-split,.cute-anchor.dropdown-toggle-split{gap:0}.cute-button .cute-icon-wrapper,.cute-anchor .cute-icon-wrapper{display:contents}.cute-button .cute-icon-wrapper:empty,.cute-anchor .cute-icon-wrapper:empty{display:none}.cute-button .cute-button-label,.cute-anchor .cute-button-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cute-button .cute-button-label .badge,.cute-anchor .cute-button-label .badge{line-height:var(--bs-btn-line-height);top:0}.cute-button .cute-button-label:empty,.cute-anchor .cute-button-label:empty{display:none}.cute-button.cute-button-disabled-interactive,.cute-anchor.cute-button-disabled-interactive{cursor:pointer}.cute-button.cute-button-disabled-interactive:disabled,.cute-button.cute-button-disabled-interactive.disabled,.cute-anchor.cute-button-disabled-interactive:disabled,.cute-anchor.cute-button-disabled-interactive.disabled{pointer-events:auto;cursor:default;box-shadow:none;--bs-btn-active-bg: var(--bs-btn-disabled-bg);--bs-btn-active-border-color: var(--bs-btn-disabled-border-color);--bs-btn-active-color: var(--bs-btn-disabled-color)}.cute-button.cute-button-disabled-interactive:disabled.cute-icon-button,.cute-button.cute-button-disabled-interactive.disabled.cute-icon-button,.cute-anchor.cute-button-disabled-interactive:disabled.cute-icon-button,.cute-anchor.cute-button-disabled-interactive.disabled.cute-icon-button{--bs-btn-active-bg: transparent;--bs-btn-active-border-color: transparent;--bs-btn-hover-bg: transparent}.cute-button.cute-base-button,.cute-anchor.cute-base-button{font-weight:500;--cute-base-button-color-rgb: var(--bs-body-color-rgb);--bs-btn-active-bg: rgba(var(--cute-base-button-color-rgb), .08);--bs-btn-active-border-color: rgba(var(--cute-base-button-color-rgb), .12);--bs-btn-disabled-border-color: transparent;--bs-btn-hover-bg: rgba(var(--cute-base-button-color-rgb), .06)}.cute-button.cute-flat-button.cute-unthemed,.cute-anchor.cute-flat-button.cute-unthemed{--bs-btn-bg: var(--bs-tertiary-bg);--bs-btn-hover-bg: var(--bs-secondary-bg);--bs-btn-active-bg: var(--bs-secondary-bg);border-color:transparent}.cute-button.raised,.cute-anchor.raised{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;transition:box-shadow .2s cubic-bezier(.4,0,.2,1)}.cute-button.raised:hover,.cute-button.raised:focus,.cute-anchor.raised:hover,.cute-anchor.raised:focus{box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.cute-button.raised:active,.cute-anchor.raised:active{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cute-button.raised:disabled,.cute-button.raised.disabled,.cute-anchor.raised:disabled,.cute-anchor.raised.disabled{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f}.cute-button.btn-light:disabled,.cute-button.btn-light.disabled,.cute-anchor.btn-light:disabled,.cute-anchor.btn-light.disabled{background-color:#0000001a}.cute-button>[role=img],.cute-button i[class],.cute-anchor>[role=img],.cute-anchor i[class]{align-self:center;pointer-events:none;overflow:visible}.cute-button.cute-fab-button,.cute-anchor.cute-fab-button{--icon-size: 40px;width:var(--icon-size);height:var(--icon-size);min-width:var(--icon-size);line-height:1;padding:0;padding-top:revert;gap:0;border-radius:50%;flex-shrink:0;-webkit-tap-highlight-color:rgba(0,0,0,0);box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.cute-button.cute-fab-button[magnitude=largest],.cute-anchor.cute-fab-button[magnitude=largest]{--icon-size: 64px}.cute-button.cute-fab-button[magnitude=larger],.cute-anchor.cute-fab-button[magnitude=larger]{--icon-size: 56px}.cute-button.cute-fab-button[magnitude=large],.cute-anchor.cute-fab-button[magnitude=large]{--icon-size: 48px}.cute-button.cute-fab-button[magnitude=middle],.cute-anchor.cute-fab-button[magnitude=middle]{--icon-size: 40px}.cute-button.cute-fab-button[magnitude=small],.cute-anchor.cute-fab-button[magnitude=small]{--icon-size: 32px}.cute-button.cute-fab-button[magnitude=smaller],.cute-anchor.cute-fab-button[magnitude=smaller]{--icon-size: 24px}.cute-button.cute-fab-button[magnitude=smallest],.cute-anchor.cute-fab-button[magnitude=smallest]{--icon-size: 16px}.cute-button.cute-fab-button svg,.cute-anchor.cute-fab-button svg{vertical-align:baseline}.cute-button.cute-fab-button:active,.cute-anchor.cute-fab-button:active{box-shadow:0 7px 8px -4px #0003,0 12px 17px 2px #00000024,0 5px 22px 4px #0000001f}.cute-button.cute-fab-button:active.btn-light,.cute-anchor.cute-fab-button:active.btn-light{border-color:#00000040}.cute-button.cute-fab-button:hover,.cute-button.cute-fab-button.cdk-focused,.cute-anchor.cute-fab-button:hover,.cute-anchor.cute-fab-button.cdk-focused{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cute-button.cute-fab-button:disabled,.cute-button.cute-fab-button.disabled,.cute-anchor.cute-fab-button:disabled,.cute-anchor.cute-fab-button.disabled{border:0;box-shadow:none}.cute-button.cute-fab-button:disabled>[role=img],.cute-button.cute-fab-button:disabled i[class],.cute-button.cute-fab-button.disabled>[role=img],.cute-button.cute-fab-button.disabled i[class],.cute-anchor.cute-fab-button:disabled>[role=img],.cute-anchor.cute-fab-button:disabled i[class],.cute-anchor.cute-fab-button.disabled>[role=img],.cute-anchor.cute-fab-button.disabled i[class]{color:#00000061!important}.cute-button.cute-icon-button,.cute-anchor.cute-icon-button{overflow:hidden;border-radius:50%;border:0;padding:0;gap:0!important;--icon-size: 40px;width:var(--icon-size);height:var(--icon-size);min-width:var(--icon-size);line-height:1;--cute-icon-button-color-rgb: var(--bs-body-color-rgb);--bs-btn-active-bg: rgba(var(--cute-icon-button-color-rgb), .12);--bs-btn-active-border-color: rgba(var(--cute-icon-button-color-rgb), .12);--bs-btn-hover-bg: rgba(var(--cute-icon-button-color-rgb), .06)}.cute-button.cute-icon-button[magnitude=largest],.cute-anchor.cute-icon-button[magnitude=largest]{--icon-size: 64px}.cute-button.cute-icon-button[magnitude=larger],.cute-anchor.cute-icon-button[magnitude=larger]{--icon-size: 56px}.cute-button.cute-icon-button[magnitude=large],.cute-anchor.cute-icon-button[magnitude=large]{--icon-size: 48px}.cute-button.cute-icon-button[magnitude=middle],.cute-anchor.cute-icon-button[magnitude=middle]{--icon-size: 40px}.cute-button.cute-icon-button[magnitude=small],.cute-anchor.cute-icon-button[magnitude=small]{--icon-size: 32px}.cute-button.cute-icon-button[magnitude=smaller],.cute-anchor.cute-icon-button[magnitude=smaller]{--icon-size: 24px}.cute-button.cute-icon-button[magnitude=smallest],.cute-anchor.cute-icon-button[magnitude=smallest]{--icon-size: 16px}.cute-button.cute-icon-button svg,.cute-anchor.cute-icon-button svg{vertical-align:baseline}.cute-button.cute-icon-button.cdk-focused,.cute-anchor.cute-icon-button.cdk-focused{--bs-btn-hover-bg: rgba(var(--cute-icon-button-color-rgb), .04)}.cute-btn-xxs,.cute-btn-group-xxs>.btn{--bs-btn-padding-y: .25rem;--bs-btn-padding-x: .5rem;--bs-btn-font-size: .5rem}.cute-btn-xs,.cute-btn-group-xs>.btn{--bs-btn-padding-y: .25rem;--bs-btn-padding-x: .5rem;--bs-btn-font-size: .75rem}.cute-btn-xl,.cute-btn-group-xl>.btn{--bs-btn-padding-y: .5rem;--bs-btn-padding-x: 1rem;--bs-btn-font-size: 1.5rem}.cute-btn-xxl,.cute-btn-group-xxl>.btn{--bs-btn-padding-y: .5rem;--bs-btn-padding-x: 1rem;--bs-btn-font-size: 2.5rem}[dir=rtl] .btn-group>.btn:not(:first-child):not(.dropdown-toggle),[dir=rtl] .btn-group>.btn.dropdown-toggle-split:last-child,[dir=rtl] .btn-group>.btn-group:not(:first-child)>.btn{border-radius:0}[dir=rtl] .btn-group>.btn:nth-child(n+3),[dir=rtl] .btn-group>:not(.btn-check)+.btn,[dir=rtl] .btn-group>.btn-group:not(:last-child)>.btn{border-radius:0 var(--bs-btn-border-radius) var(--bs-btn-border-radius) 0}[dir=rtl] .btn-group>.btn:first-child:not(.dropdown-toggle),[dir=rtl] .btn-group>.btn.dropdown-toggle-split:first-child,[dir=rtl] .btn-group>.btn-group:first-child>.btn{border-radius:0 var(--bs-btn-border-radius) var(--bs-btn-border-radius) 0}[dir=rtl] .btn-group>.btn:last-child:not(.dropdown-toggle),[dir=rtl] .btn-group>.btn.dropdown-toggle-split:last-child,[dir=rtl] .btn-group>.btn-group:last-child>.btn{border-radius:var(--bs-btn-border-radius) 0 0 var(--bs-btn-border-radius)}.cute-button-expandable{padding:.25rem .5rem;font-weight:600;color:var(--bs-emphasis-color);background-color:transparent}.cute-button-expandable:hover,.cute-button-expandable:focus{color:rgba(var(--bs-emphasis-color-rgb),.85);background-color:var(--bs-tertiary-bg)}.cute-button-expandable:before{width:1.25em;line-height:0;content:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e\");transition:transform .35s ease;transform-origin:.5em 50%;transform:scale(.85)}[data-bs-theme=dark] .cute-button-expandable:before{content:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28255,255,255,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e\")}[dir=rtl] .cute-button-expandable:before{transform:rotate(180deg) scale(.85);margin-left:.25em;text-align:end}.cute-button-expandable[aria-expanded=true]{color:rgba(var(--bs-emphasis-color-rgb),.85)}.cute-button-expandable[aria-expanded=true]:before{transform:rotate(90deg) scale(.85)}\n"] }]
|
|
498
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\r\n For capturing HTML-elements such as <i class..> or <img src=\"\"...> and others\r\n we need apply [cuteButtonIcon] attribute to them.\r\n-->\r\n<span class=\"cute-icon-wrapper\">\r\n <ng-content select=\".material-icons:not([iconPositionEnd]),\r\n .bi:not([iconPositionEnd]),\r\n cute-icon:not([iconPositionEnd]),\r\n cute-avatar:not([iconPositionEnd]),\r\n [cuteButtonIcon]:not([iconPositionEnd])\">\r\n </ng-content>\r\n</span>\r\n\r\n<span class=\"cute-button-label\" [class.cute-button-label__nowrap]=\"!wrapText\">\r\n <ng-content>\r\n @if(visuallyHiddenLabel) {\r\n <span class=\"visually-hidden\"> {{visuallyHiddenLabel}} </span>\r\n }\r\n </ng-content>\r\n</span>\r\n\r\n<span class=\"cute-icon-wrapper\">\r\n <ng-content select=\".material-icons[iconPositionEnd],\r\n .bi:[iconPositionEnd],\r\n cute-icon[iconPositionEnd],\r\n cute-avatar:[iconPositionEnd],\r\n [cuteButtonIcon][iconPositionEnd]\">\r\n </ng-content>\r\n</span>\r\n", styles: [".cute-ripple-element{--cute-ripple-duration: .5s;--cute-ripple-bg-color: rgba(255, 255, 255, .18);position:absolute;border-radius:50%;pointer-events:none;transform:scale3d(0,0,0);animation:cute-ripple-element-animation var(--cute-ripple-duration) cubic-bezier(.65,.05,.36,1);background-color:var(--cute-ripple-bg-color);will-change:transform,opacity}@media (forced-colors: active){.cute-ripple-element{display:none}}@keyframes cute-ripple-element-animation{to{transform:scale(8);opacity:0}}.cute-button,.cute-anchor{position:relative;display:inline-flex;align-items:center;justify-content:center;overflow:visible;box-shadow:none}.cute-button:not(.btn-close),.cute-anchor:not(.btn-close){box-sizing:border-box}.cute-button:has(>:nth-child(2)),.cute-anchor:has(>:nth-child(2)){gap:.5em}.cute-button.dropdown-toggle,.cute-anchor.dropdown-toggle{gap:.375em}.cute-button.dropdown-toggle-split,.cute-anchor.dropdown-toggle-split{gap:0}.cute-button .cute-icon-wrapper,.cute-anchor .cute-icon-wrapper{display:contents}.cute-button .cute-icon-wrapper:empty,.cute-anchor .cute-icon-wrapper:empty{display:none}.cute-button .cute-button-label.cute-button-label__nowrap,.cute-anchor .cute-button-label.cute-button-label__nowrap{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cute-button .cute-button-label .badge,.cute-anchor .cute-button-label .badge{line-height:var(--bs-btn-line-height);top:0}.cute-button .cute-button-label:empty,.cute-anchor .cute-button-label:empty{display:none}.cute-button.cute-button-disabled-interactive,.cute-anchor.cute-button-disabled-interactive{cursor:pointer}.cute-button.cute-button-disabled-interactive:disabled,.cute-button.cute-button-disabled-interactive.disabled,.cute-anchor.cute-button-disabled-interactive:disabled,.cute-anchor.cute-button-disabled-interactive.disabled{pointer-events:auto;cursor:default;box-shadow:none;--bs-btn-active-bg: var(--bs-btn-disabled-bg);--bs-btn-active-border-color: var(--bs-btn-disabled-border-color);--bs-btn-active-color: var(--bs-btn-disabled-color)}.cute-button.cute-button-disabled-interactive:disabled.cute-icon-button,.cute-button.cute-button-disabled-interactive.disabled.cute-icon-button,.cute-anchor.cute-button-disabled-interactive:disabled.cute-icon-button,.cute-anchor.cute-button-disabled-interactive.disabled.cute-icon-button{--bs-btn-active-bg: transparent;--bs-btn-active-border-color: transparent;--bs-btn-hover-bg: transparent}.cute-button.cute-base-button,.cute-anchor.cute-base-button{font-weight:500;--cute-base-button-color-rgb: var(--bs-body-color-rgb);--bs-btn-active-bg: rgba(var(--cute-base-button-color-rgb), .08);--bs-btn-active-border-color: rgba(var(--cute-base-button-color-rgb), .12);--bs-btn-disabled-border-color: transparent;--bs-btn-hover-bg: rgba(var(--cute-base-button-color-rgb), .06)}.cute-button.cute-flat-button.cute-unthemed,.cute-anchor.cute-flat-button.cute-unthemed{--bs-btn-bg: var(--bs-tertiary-bg);--bs-btn-hover-bg: var(--bs-secondary-bg);--bs-btn-active-bg: var(--bs-secondary-bg);border-color:transparent}.cute-button.raised,.cute-anchor.raised{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;transition:box-shadow .2s cubic-bezier(.4,0,.2,1)}.cute-button.raised:hover,.cute-button.raised:focus,.cute-anchor.raised:hover,.cute-anchor.raised:focus{box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.cute-button.raised:active,.cute-anchor.raised:active{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cute-button.raised:disabled,.cute-button.raised.disabled,.cute-anchor.raised:disabled,.cute-anchor.raised.disabled{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f}.cute-button.btn-light:disabled,.cute-button.btn-light.disabled,.cute-anchor.btn-light:disabled,.cute-anchor.btn-light.disabled{background-color:#0000001a}.cute-button>[role=img],.cute-button i[class],.cute-anchor>[role=img],.cute-anchor i[class]{align-self:center;pointer-events:none;overflow:visible}.cute-button.cute-fab-button,.cute-anchor.cute-fab-button{--icon-size: 40px;width:var(--icon-size);height:var(--icon-size);min-width:var(--icon-size);line-height:1;padding:0;padding-top:revert;gap:0;border-radius:50%;flex-shrink:0;-webkit-tap-highlight-color:rgba(0,0,0,0);box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.cute-button.cute-fab-button[magnitude=largest],.cute-anchor.cute-fab-button[magnitude=largest]{--icon-size: 64px}.cute-button.cute-fab-button[magnitude=larger],.cute-anchor.cute-fab-button[magnitude=larger]{--icon-size: 56px}.cute-button.cute-fab-button[magnitude=large],.cute-anchor.cute-fab-button[magnitude=large]{--icon-size: 48px}.cute-button.cute-fab-button[magnitude=middle],.cute-anchor.cute-fab-button[magnitude=middle]{--icon-size: 40px}.cute-button.cute-fab-button[magnitude=small],.cute-anchor.cute-fab-button[magnitude=small]{--icon-size: 32px}.cute-button.cute-fab-button[magnitude=smaller],.cute-anchor.cute-fab-button[magnitude=smaller]{--icon-size: 24px}.cute-button.cute-fab-button[magnitude=smallest],.cute-anchor.cute-fab-button[magnitude=smallest]{--icon-size: 16px}.cute-button.cute-fab-button svg,.cute-anchor.cute-fab-button svg{vertical-align:baseline}.cute-button.cute-fab-button:active,.cute-anchor.cute-fab-button:active{box-shadow:0 7px 8px -4px #0003,0 12px 17px 2px #00000024,0 5px 22px 4px #0000001f}.cute-button.cute-fab-button:active.btn-light,.cute-anchor.cute-fab-button:active.btn-light{border-color:#00000040}.cute-button.cute-fab-button:hover,.cute-button.cute-fab-button.cdk-focused,.cute-anchor.cute-fab-button:hover,.cute-anchor.cute-fab-button.cdk-focused{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cute-button.cute-fab-button:disabled,.cute-button.cute-fab-button.disabled,.cute-anchor.cute-fab-button:disabled,.cute-anchor.cute-fab-button.disabled{border:0;box-shadow:none}.cute-button.cute-fab-button:disabled>[role=img],.cute-button.cute-fab-button:disabled i[class],.cute-button.cute-fab-button.disabled>[role=img],.cute-button.cute-fab-button.disabled i[class],.cute-anchor.cute-fab-button:disabled>[role=img],.cute-anchor.cute-fab-button:disabled i[class],.cute-anchor.cute-fab-button.disabled>[role=img],.cute-anchor.cute-fab-button.disabled i[class]{color:#00000061!important}.cute-button.cute-icon-button,.cute-anchor.cute-icon-button{overflow:hidden;border-radius:50%;border:0;padding:0;gap:0!important;--icon-size: 40px;width:var(--icon-size);height:var(--icon-size);min-width:var(--icon-size);line-height:1;--cute-icon-button-color-rgb: var(--bs-body-color-rgb);--bs-btn-active-bg: rgba(var(--cute-icon-button-color-rgb), .12);--bs-btn-active-border-color: rgba(var(--cute-icon-button-color-rgb), .12);--bs-btn-hover-bg: rgba(var(--cute-icon-button-color-rgb), .06)}.cute-button.cute-icon-button[magnitude=largest],.cute-anchor.cute-icon-button[magnitude=largest]{--icon-size: 64px}.cute-button.cute-icon-button[magnitude=larger],.cute-anchor.cute-icon-button[magnitude=larger]{--icon-size: 56px}.cute-button.cute-icon-button[magnitude=large],.cute-anchor.cute-icon-button[magnitude=large]{--icon-size: 48px}.cute-button.cute-icon-button[magnitude=middle],.cute-anchor.cute-icon-button[magnitude=middle]{--icon-size: 40px}.cute-button.cute-icon-button[magnitude=small],.cute-anchor.cute-icon-button[magnitude=small]{--icon-size: 32px}.cute-button.cute-icon-button[magnitude=smaller],.cute-anchor.cute-icon-button[magnitude=smaller]{--icon-size: 24px}.cute-button.cute-icon-button[magnitude=smallest],.cute-anchor.cute-icon-button[magnitude=smallest]{--icon-size: 16px}.cute-button.cute-icon-button svg,.cute-anchor.cute-icon-button svg{vertical-align:baseline}.cute-button.cute-icon-button.cdk-focused,.cute-anchor.cute-icon-button.cdk-focused{--bs-btn-hover-bg: rgba(var(--cute-icon-button-color-rgb), .04)}.cute-btn-xxs,.cute-btn-group-xxs>.btn{--bs-btn-padding-y: .25rem;--bs-btn-padding-x: .5rem;--bs-btn-font-size: .5rem}.cute-btn-xs,.cute-btn-group-xs>.btn{--bs-btn-padding-y: .25rem;--bs-btn-padding-x: .5rem;--bs-btn-font-size: .75rem}.cute-btn-xl,.cute-btn-group-xl>.btn{--bs-btn-padding-y: .5rem;--bs-btn-padding-x: 1rem;--bs-btn-font-size: 1.5rem}.cute-btn-xxl,.cute-btn-group-xxl>.btn{--bs-btn-padding-y: .5rem;--bs-btn-padding-x: 1rem;--bs-btn-font-size: 2.5rem}[dir=rtl] .btn-group>.btn:not(:first-child):not(.dropdown-toggle),[dir=rtl] .btn-group>.btn.dropdown-toggle-split:last-child,[dir=rtl] .btn-group>.btn-group:not(:first-child)>.btn{border-radius:0}[dir=rtl] .btn-group>.btn:nth-child(n+3),[dir=rtl] .btn-group>:not(.btn-check)+.btn,[dir=rtl] .btn-group>.btn-group:not(:last-child)>.btn{border-radius:0 var(--bs-btn-border-radius) var(--bs-btn-border-radius) 0}[dir=rtl] .btn-group>.btn:first-child:not(.dropdown-toggle),[dir=rtl] .btn-group>.btn.dropdown-toggle-split:first-child,[dir=rtl] .btn-group>.btn-group:first-child>.btn{border-radius:0 var(--bs-btn-border-radius) var(--bs-btn-border-radius) 0}[dir=rtl] .btn-group>.btn:last-child:not(.dropdown-toggle),[dir=rtl] .btn-group>.btn.dropdown-toggle-split:last-child,[dir=rtl] .btn-group>.btn-group:last-child>.btn{border-radius:var(--bs-btn-border-radius) 0 0 var(--bs-btn-border-radius)}.cute-button-expandable{padding:.25rem .5rem;font-weight:600;color:var(--bs-emphasis-color);background-color:transparent}.cute-button-expandable:hover,.cute-button-expandable:focus{color:rgba(var(--bs-emphasis-color-rgb),.85);background-color:var(--bs-tertiary-bg)}.cute-button-expandable:before{width:1.25em;line-height:0;content:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e\");transition:transform .35s ease;transform-origin:.5em 50%;transform:scale(.85)}[data-bs-theme=dark] .cute-button-expandable:before{content:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28255,255,255,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e\")}[dir=rtl] .cute-button-expandable:before{transform:rotate(180deg) scale(.85);margin-left:.25em;text-align:end}.cute-button-expandable[aria-expanded=true]{color:rgba(var(--bs-emphasis-color-rgb),.85)}.cute-button-expandable[aria-expanded=true]:before{transform:rotate(90deg) scale(.85)}\n"] }]
|
|
356
499
|
}], ctorParameters: () => [] });
|
|
357
500
|
|
|
358
501
|
/**
|
|
@@ -364,97 +507,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
364
507
|
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
365
508
|
*/
|
|
366
509
|
// Counter used to generate unique IDs.
|
|
367
|
-
let uniqueIdCounter
|
|
510
|
+
let uniqueIdCounter = 0;
|
|
368
511
|
/**
|
|
369
|
-
*
|
|
512
|
+
* Injection token that can be used to reference instances of `CuteButtonToolbar`.
|
|
513
|
+
* It serves as an alternative token to the actual `CuteButtonToolbar` class which
|
|
514
|
+
* could cause unnecessary retention of the class and its component metadata.
|
|
370
515
|
*/
|
|
371
|
-
|
|
372
|
-
get buttonLargerBinding() { return this.magnitude == "larger"; }
|
|
373
|
-
get buttonLargeBinding() { return this.magnitude == "large"; }
|
|
374
|
-
get buttonSmallerBinding() { return this.magnitude == "smaller"; }
|
|
375
|
-
get buttonSmallBinding() { return this.magnitude == "small"; }
|
|
376
|
-
constructor() {
|
|
377
|
-
super();
|
|
378
|
-
/** Whether to place the nested buttons in the vertical direction. */
|
|
379
|
-
this.vertical = false;
|
|
380
|
-
}
|
|
381
|
-
generateId() {
|
|
382
|
-
return `button-group-${++uniqueIdCounter$1}`;
|
|
383
|
-
}
|
|
384
|
-
setDisabledState(newState, emitEvent) {
|
|
385
|
-
let res = super.setDisabledState(newState, emitEvent);
|
|
386
|
-
if (res && this._buttons) {
|
|
387
|
-
this._buttons.forEach(btn => {
|
|
388
|
-
btn.disabled = coerceBooleanProperty(newState);
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
|
-
return res;
|
|
392
|
-
}
|
|
393
|
-
ngAfterContentInit() {
|
|
394
|
-
super.ngAfterContentInit();
|
|
395
|
-
this._buttons?.forEach(b => {
|
|
396
|
-
b.defaultColor = this.color ?? "primary";
|
|
397
|
-
b.disabled = this.disabled;
|
|
398
|
-
if (b.buttonStyle == "base") {
|
|
399
|
-
b.inputButtonStyle = this.buttonStyle ?? "flat-button";
|
|
400
|
-
}
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteButtonGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
404
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.15", type: CuteButtonGroup, isStandalone: true, selector: "cute-button-group", inputs: { vertical: ["vertical", "vertical", booleanAttribute], magnitude: "magnitude", buttonStyle: "buttonStyle" }, host: { attributes: { "role": "group" }, properties: { "class": "\"btn-group\" +(vertical?\"-vertical\":\"\")", "attr.aria-label": "ariaLabel || null", "attr.aria-labelledby": "ariaLabelledby || null", "attr.aria-describedby": "ariaDescribedby || null", "id": "id || null", "class.cute-btn-group-xl": "this.buttonLargerBinding", "class.btn-group-lg": "this.buttonLargeBinding", "class.cute-btn-group-xs": "this.buttonSmallerBinding", "class.btn-group-sm": "this.buttonSmallBinding" }, classAttribute: "cute-button-group" }, queries: [{ propertyName: "_buttons", predicate: CUTE_BUTTON_BASE, descendants: true }], exportAs: ["cuteButtonGroup"], usesInheritance: true, ngImport: i0 }); }
|
|
405
|
-
}
|
|
406
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteButtonGroup, decorators: [{
|
|
407
|
-
type: Directive,
|
|
408
|
-
args: [{
|
|
409
|
-
selector: "cute-button-group",
|
|
410
|
-
exportAs: "cuteButtonGroup",
|
|
411
|
-
host: {
|
|
412
|
-
'role': 'group',
|
|
413
|
-
'class': 'cute-button-group',
|
|
414
|
-
'[class]': '"btn-group" +(vertical?"-vertical":"")',
|
|
415
|
-
'[attr.aria-label]': 'ariaLabel || null',
|
|
416
|
-
'[attr.aria-labelledby]': 'ariaLabelledby || null',
|
|
417
|
-
'[attr.aria-describedby]': 'ariaDescribedby || null',
|
|
418
|
-
'[id]': 'id || null'
|
|
419
|
-
},
|
|
420
|
-
standalone: true
|
|
421
|
-
}]
|
|
422
|
-
}], ctorParameters: () => [], propDecorators: { vertical: [{
|
|
423
|
-
type: Input,
|
|
424
|
-
args: [{ transform: booleanAttribute }]
|
|
425
|
-
}], magnitude: [{
|
|
426
|
-
type: Input
|
|
427
|
-
}], buttonStyle: [{
|
|
428
|
-
type: Input
|
|
429
|
-
}], buttonLargerBinding: [{
|
|
430
|
-
type: HostBinding,
|
|
431
|
-
args: ["class.cute-btn-group-xl"]
|
|
432
|
-
}], buttonLargeBinding: [{
|
|
433
|
-
type: HostBinding,
|
|
434
|
-
args: ["class.btn-group-lg"]
|
|
435
|
-
}], buttonSmallerBinding: [{
|
|
436
|
-
type: HostBinding,
|
|
437
|
-
args: ["class.cute-btn-group-xs"]
|
|
438
|
-
}], buttonSmallBinding: [{
|
|
439
|
-
type: HostBinding,
|
|
440
|
-
args: ["class.btn-group-sm"]
|
|
441
|
-
}], _buttons: [{
|
|
442
|
-
type: ContentChildren,
|
|
443
|
-
args: [CUTE_BUTTON_BASE, { descendants: true }]
|
|
444
|
-
}] } });
|
|
445
|
-
|
|
516
|
+
const CUTE_BUTTON_TOOLBAR = new InjectionToken('CuteButtonToolbar');
|
|
446
517
|
/**
|
|
447
|
-
*
|
|
448
|
-
*
|
|
449
|
-
* Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
|
|
450
|
-
*
|
|
451
|
-
* You may not use this file except in compliance with the License
|
|
452
|
-
* that can be found at http://www.apache.org/licenses/LICENSE-2.0
|
|
518
|
+
* Combines sets of button groups into button toolbars for more complex components.
|
|
453
519
|
*/
|
|
454
|
-
// Counter used to generate unique IDs.
|
|
455
|
-
let uniqueIdCounter = 0;
|
|
456
520
|
class CuteButtonToolbar extends CuteFocusableControl {
|
|
457
|
-
/** The gutter between
|
|
521
|
+
/** The gutter between button groups. */
|
|
458
522
|
get gap() { return this._gap; }
|
|
459
523
|
set gap(value) {
|
|
460
524
|
const MAX_GAP = 5;
|
|
@@ -481,7 +545,7 @@ class CuteButtonToolbar extends CuteFocusableControl {
|
|
|
481
545
|
return `button-toolbar-${++uniqueIdCounter}`;
|
|
482
546
|
}
|
|
483
547
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteButtonToolbar, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
484
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.15", type: CuteButtonToolbar, isStandalone: true, selector: "cute-button-toolbar", inputs: { gap: ["gap", "gap", numberAttribute], magnitude: "magnitude" }, host: { attributes: { "role": "toolbar" }, properties: { "class": "\"gap-\"+gap", "attr.gap": "null", "attr.aria-label": "ariaLabel || null", "attr.aria-labelledby": "ariaLabelledby || null", "attr.aria-describedby": "ariaDescribedby || null", "id": "id || null" }, classAttribute: "btn-toolbar" }, exportAs: ["cuteButtonToolbar"], usesInheritance: true, ngImport: i0 }); }
|
|
548
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.15", type: CuteButtonToolbar, isStandalone: true, selector: "cute-button-toolbar", inputs: { gap: ["gap", "gap", numberAttribute], magnitude: "magnitude" }, host: { attributes: { "role": "toolbar" }, properties: { "class": "\"gap-\"+gap", "attr.gap": "null", "attr.aria-label": "ariaLabel || null", "attr.aria-labelledby": "ariaLabelledby || null", "attr.aria-describedby": "ariaDescribedby || null", "id": "id || null" }, classAttribute: "cute-button-toolbar btn-toolbar" }, providers: [{ provide: CUTE_BUTTON_TOOLBAR, useExisting: CuteButtonToolbar }], exportAs: ["cuteButtonToolbar"], usesInheritance: true, ngImport: i0 }); }
|
|
485
549
|
}
|
|
486
550
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteButtonToolbar, decorators: [{
|
|
487
551
|
type: Directive,
|
|
@@ -489,15 +553,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
489
553
|
selector: "cute-button-toolbar",
|
|
490
554
|
exportAs: "cuteButtonToolbar",
|
|
491
555
|
host: {
|
|
492
|
-
'
|
|
493
|
-
'class': 'btn-toolbar',
|
|
556
|
+
'class': 'cute-button-toolbar btn-toolbar',
|
|
494
557
|
'[class]': '"gap-"+gap',
|
|
495
558
|
'[attr.gap]': 'null',
|
|
496
559
|
'[attr.aria-label]': 'ariaLabel || null',
|
|
497
560
|
'[attr.aria-labelledby]': 'ariaLabelledby || null',
|
|
498
561
|
'[attr.aria-describedby]': 'ariaDescribedby || null',
|
|
499
|
-
'[id]': 'id || null'
|
|
562
|
+
'[id]': 'id || null',
|
|
563
|
+
'role': 'toolbar',
|
|
500
564
|
},
|
|
565
|
+
providers: [{ provide: CUTE_BUTTON_TOOLBAR, useExisting: CuteButtonToolbar }],
|
|
501
566
|
standalone: true
|
|
502
567
|
}]
|
|
503
568
|
}], ctorParameters: () => [], propDecorators: { gap: [{
|
|
@@ -542,5 +607,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
542
607
|
* Generated bundle index. Do not edit.
|
|
543
608
|
*/
|
|
544
609
|
|
|
545
|
-
export { CUTE_BUTTON_BASE, CUTE_BUTTON_CONFIG, CuteButton, CuteButtonBase, CuteButtonGroup, CuteButtonModule, CuteButtonToolbar };
|
|
610
|
+
export { CUTE_BUTTON_BASE, CUTE_BUTTON_CONFIG, CUTE_BUTTON_GROUP, CUTE_BUTTON_TOOLBAR, CuteButton, CuteButtonBase, CuteButtonGroup, CuteButtonModule, CuteButtonToolbar };
|
|
546
611
|
//# sourceMappingURL=cute-widgets-base-button.mjs.map
|