@rt-tools/ui-kit 0.0.24 → 0.0.25
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/fesm2022/rt-tools-ui-kit.mjs +15 -4
- package/fesm2022/rt-tools-ui-kit.mjs.map +1 -1
- package/package.json +1 -1
- package/rt-tools-ui-kit-0.0.25.tgz +0 -0
- package/src/lib/ui-kit/buttons/unified-button/rtui-button.component.scss +31 -66
- package/types/rt-tools-ui-kit.d.ts +7 -3
- package/rt-tools-ui-kit-0.0.24.tgz +0 -0
package/package.json
CHANGED
|
Binary file
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
display: block;
|
|
7
7
|
width: 100%;
|
|
8
8
|
|
|
9
|
-
.rtui-button
|
|
9
|
+
.rtui-button,
|
|
10
|
+
.rtui-button-material {
|
|
10
11
|
width: 100%;
|
|
11
12
|
}
|
|
12
13
|
}
|
|
@@ -103,11 +104,11 @@
|
|
|
103
104
|
|
|
104
105
|
/* ===================== pill ===================== */
|
|
105
106
|
&--type-pill {
|
|
106
|
-
gap: 0.375rem;
|
|
107
107
|
border-radius: 1.5rem;
|
|
108
108
|
background-color: var(--mat-sys-surface-container-high);
|
|
109
109
|
color: var(--mat-sys-on-surface-variant);
|
|
110
110
|
font-weight: 500;
|
|
111
|
+
gap: 0.375rem;
|
|
111
112
|
|
|
112
113
|
&:hover:not(:disabled) {
|
|
113
114
|
background-color: var(--mat-sys-surface-container-highest);
|
|
@@ -245,72 +246,36 @@
|
|
|
245
246
|
background-color: var(--rt-bg-base-hover);
|
|
246
247
|
}
|
|
247
248
|
}
|
|
249
|
+
}
|
|
248
250
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
background-color: var(--mat-sys-primary);
|
|
261
|
-
color: var(--mat-sys-on-primary);
|
|
262
|
-
font-size: var(--mat-sys-label-large-size, 0.875rem);
|
|
263
|
-
font-weight: var(--mat-sys-label-large-weight, 500);
|
|
264
|
-
|
|
265
|
-
&:hover:not(:disabled) {
|
|
266
|
-
background-color: color-mix(in srgb, var(--mat-sys-primary) 92%, var(--mat-sys-on-primary));
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
&:active:not(:disabled) {
|
|
270
|
-
background-color: color-mix(in srgb, var(--mat-sys-primary) 84%, var(--mat-sys-on-primary));
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
&--type-pill.rtui-button--design-material.rtui-button--variant-danger {
|
|
275
|
-
background-color: var(--mat-sys-error);
|
|
276
|
-
color: var(--mat-sys-on-error);
|
|
277
|
-
|
|
278
|
-
&:hover:not(:disabled) {
|
|
279
|
-
background-color: color-mix(in srgb, var(--mat-sys-error) 92%, var(--mat-sys-on-error));
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
&:active:not(:disabled) {
|
|
283
|
-
background-color: color-mix(in srgb, var(--mat-sys-error) 84%, var(--mat-sys-on-error));
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
&--type-pill.rtui-button--design-material.rtui-button--appearance-text {
|
|
288
|
-
min-height: 2.5rem;
|
|
289
|
-
padding: 0 var(--mat-button-text-horizontal-padding, 0.75rem);
|
|
290
|
-
background-color: transparent;
|
|
291
|
-
color: var(--mat-sys-primary);
|
|
292
|
-
font-size: var(--mat-sys-label-large-size, 0.875rem);
|
|
293
|
-
font-weight: var(--mat-sys-label-large-weight, 500);
|
|
294
|
-
|
|
295
|
-
&:hover:not(:disabled) {
|
|
296
|
-
background-color: color-mix(in srgb, var(--mat-sys-primary) 8%, transparent);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
&:active:not(:disabled) {
|
|
300
|
-
background-color: color-mix(in srgb, var(--mat-sys-primary) 12%, transparent);
|
|
301
|
-
}
|
|
251
|
+
/* ===================== design: material =====================
|
|
252
|
+
Under `design: 'material'` the pill renders a NATIVE Material button (see the
|
|
253
|
+
template) whose look is fully owned by the Material theme. The only styling
|
|
254
|
+
the library adds is the variant mapping: `danger` re-points the button's own
|
|
255
|
+
theme tokens at the M3 error role (M3 has no success/warning roles, so every
|
|
256
|
+
other variant keeps the theme primary). */
|
|
257
|
+
.rtui-button-material {
|
|
258
|
+
rtui-spinner {
|
|
259
|
+
display: flex;
|
|
260
|
+
align-items: center;
|
|
261
|
+
justify-content: center;
|
|
302
262
|
}
|
|
303
263
|
|
|
304
|
-
&--
|
|
305
|
-
|
|
306
|
-
color: var(--mat-sys-error);
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
264
|
+
&--danger {
|
|
265
|
+
--mat-button-filled-container-color: var(--mat-sys-error);
|
|
266
|
+
--mat-button-filled-label-text-color: var(--mat-sys-on-error);
|
|
267
|
+
--mat-button-filled-state-layer-color: var(--mat-sys-on-error);
|
|
268
|
+
--mat-button-filled-ripple-color: color-mix(in srgb, var(--mat-sys-on-error) 12%, transparent);
|
|
269
|
+
--mat-button-outlined-label-text-color: var(--mat-sys-error);
|
|
270
|
+
--mat-button-outlined-outline-color: var(--mat-sys-error);
|
|
271
|
+
--mat-button-outlined-state-layer-color: var(--mat-sys-error);
|
|
272
|
+
--mat-button-outlined-ripple-color: color-mix(in srgb, var(--mat-sys-error) 12%, transparent);
|
|
273
|
+
--mat-button-text-label-text-color: var(--mat-sys-error);
|
|
274
|
+
--mat-button-text-state-layer-color: var(--mat-sys-error);
|
|
275
|
+
--mat-button-text-ripple-color: color-mix(in srgb, var(--mat-sys-error) 12%, transparent);
|
|
276
|
+
--mat-button-tonal-container-color: var(--mat-sys-error-container);
|
|
277
|
+
--mat-button-tonal-label-text-color: var(--mat-sys-on-error-container);
|
|
278
|
+
--mat-button-tonal-state-layer-color: var(--mat-sys-on-error-container);
|
|
279
|
+
--mat-button-tonal-ripple-color: color-mix(in srgb, var(--mat-sys-on-error-container) 12%, transparent);
|
|
315
280
|
}
|
|
316
281
|
}
|
|
@@ -10,6 +10,7 @@ import { OverlayRef, ComponentType, ConnectedPosition, CdkOverlayOrigin } from '
|
|
|
10
10
|
import { ComponentType as ComponentType$1 } from '@angular/cdk/portal';
|
|
11
11
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
12
12
|
import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
|
|
13
|
+
import { MatButtonAppearance } from '@angular/material/button';
|
|
13
14
|
import * as i1 from '@angular/material/tooltip';
|
|
14
15
|
import { TooltipPosition } from '@angular/material/tooltip';
|
|
15
16
|
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
@@ -327,8 +328,9 @@ declare const RT_SCHEME_ATTRIBUTE: string;
|
|
|
327
328
|
/**
|
|
328
329
|
* Design system a control renders with:
|
|
329
330
|
* - `'custom'` — the rt-tools look (design tokens, pill shapes). The default.
|
|
330
|
-
* - `'material'` — the
|
|
331
|
-
*
|
|
331
|
+
* - `'material'` — the control renders a NATIVE Angular Material component
|
|
332
|
+
* (e.g. the button pill becomes a real `matButton`), for apps that have not
|
|
333
|
+
* migrated their visual language yet or need to match surrounding Material controls.
|
|
332
334
|
*/
|
|
333
335
|
type RtUiDesign = 'material' | 'custom';
|
|
334
336
|
declare namespace IRtUiConfig {
|
|
@@ -413,6 +415,8 @@ declare class RtuiButtonComponent {
|
|
|
413
415
|
protected readonly resolvedSize: Signal<IRtuiButton.Size>;
|
|
414
416
|
protected readonly resolvedRadius: Signal<IRtuiButton.Radius>;
|
|
415
417
|
protected readonly resolvedAppearance: Signal<IRtuiButton.Appearance | undefined>;
|
|
418
|
+
/** Native Material button appearance the pill renders with under `design: 'material'`. */
|
|
419
|
+
protected readonly materialAppearance: Signal<MatButtonAppearance>;
|
|
416
420
|
protected readonly resolvedIconSize: Signal<RtuiIconSizeType>;
|
|
417
421
|
protected readonly spinnerSize: Signal<number>;
|
|
418
422
|
protected readonly modifiers: Signal<Record<string, boolean>>;
|
|
@@ -434,7 +438,7 @@ declare class RtuiButtonComponent {
|
|
|
434
438
|
readonly clicked: OutputEmitterRef<void>;
|
|
435
439
|
protected onClick(): void;
|
|
436
440
|
static ɵfac: i0.ɵɵFactoryDeclaration<RtuiButtonComponent, never>;
|
|
437
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RtuiButtonComponent, "rtui-button", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "design": { "alias": "design"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "required": false; "isSignal": true; }; "iconSize": { "alias": "iconSize"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "outlined": { "alias": "outlined"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "spinnerDiameter": { "alias": "spinnerDiameter"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, ["*"], true, [{ directive: typeof i1.MatTooltip; inputs: { "matTooltip": "tooltip"; "matTooltipPosition": "tooltipPosition"; "matTooltipDisabled": "tooltipDisabled"; "matTooltipClass": "tooltipClass"; }; outputs: {}; }]>;
|
|
441
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RtuiButtonComponent, "rtui-button", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "design": { "alias": "design"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "required": false; "isSignal": true; }; "iconSize": { "alias": "iconSize"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "outlined": { "alias": "outlined"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "spinnerDiameter": { "alias": "spinnerDiameter"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, ["*", "*"], true, [{ directive: typeof i1.MatTooltip; inputs: { "matTooltip": "tooltip"; "matTooltipPosition": "tooltipPosition"; "matTooltipDisabled": "tooltipDisabled"; "matTooltipClass": "tooltipClass"; }; outputs: {}; }]>;
|
|
438
442
|
}
|
|
439
443
|
|
|
440
444
|
declare class RtuiMultiButtonComponent {
|
|
Binary file
|