yukit-web 0.10.7 → 0.10.8
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/yukit-web.mjs +202 -66
- package/fesm2022/yukit-web.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/theme/components/button.css +14 -0
- package/src/lib/theme/spartan-overwrites/sonner.css +2 -2
- package/src/lib/theme/tokens/component-colors.css +6 -2
- package/types/yukit-web.d.ts +37 -10
package/package.json
CHANGED
|
@@ -11,3 +11,17 @@ yuw-button[data-yuw-variant='outline'][data-yuw-color='neutral']
|
|
|
11
11
|
> :is(button, a):is(:hover, [aria-expanded='true']):not(:disabled, [data-disabled]) {
|
|
12
12
|
background-image: linear-gradient(var(--muted), var(--muted));
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
yuw-button[data-yuw-variant='ghost'][data-yuw-color='destructive'] > :is(button, a):not(:disabled, [data-disabled]) {
|
|
16
|
+
color: var(--secondary-foreground);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
yuw-button[data-yuw-variant='ghost'][data-yuw-color='destructive']
|
|
20
|
+
> :is(button, a):is(:hover, [aria-expanded='true']):not(:disabled, [data-disabled]) {
|
|
21
|
+
background-color: var(--secondary);
|
|
22
|
+
color: var(--secondary-foreground);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
yuw-button[data-yuw-variant='link'] > button:disabled {
|
|
26
|
+
color: var(--foreground);
|
|
27
|
+
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
:root {
|
|
6
6
|
--brn-sonner-toast-close-button-start: auto;
|
|
7
|
-
--brn-sonner-toast-close-button-end:
|
|
7
|
+
--brn-sonner-toast-close-button-end: 1rem;
|
|
8
8
|
--brn-sonner-toast-close-button-transform: none;
|
|
9
|
-
--brn-sonner-rtl-toast-close-button-start:
|
|
9
|
+
--brn-sonner-rtl-toast-close-button-start: 1rem;
|
|
10
10
|
--brn-sonner-rtl-toast-close-button-end: auto;
|
|
11
11
|
--brn-sonner-rtl-toast-close-button-transform: none;
|
|
12
12
|
--brn-sonner-toast-close-button-background: var(--toast);
|
|
@@ -196,6 +196,10 @@
|
|
|
196
196
|
--muted: color-mix(in oklab, var(--yuw-accent) 50%, transparent) !important;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
+
/*
|
|
200
|
+
* A disabled button fills and borders with --gray-7, but writes its text with --gray-9: the helm already halves its
|
|
201
|
+
* opacity, so a text-only variant (destructive, link, transparent) in --gray-7 at 50% vanished on a light page.
|
|
202
|
+
*/
|
|
199
203
|
html body yuw-button[data-yuw-color] button:disabled {
|
|
200
204
|
--yuw-accent: var(--gray-7);
|
|
201
205
|
--yuw-accent-foreground: var(--neutrals-white);
|
|
@@ -203,8 +207,8 @@ html body yuw-button[data-yuw-color] button:disabled {
|
|
|
203
207
|
--primary-foreground: var(--yuw-accent-foreground);
|
|
204
208
|
--secondary: var(--neutrals-outline-accent);
|
|
205
209
|
--secondary-foreground: var(--yuw-accent-foreground);
|
|
206
|
-
--destructive: var(--
|
|
210
|
+
--destructive: var(--gray-9);
|
|
207
211
|
--border: var(--yuw-accent);
|
|
208
|
-
--foreground: var(--
|
|
212
|
+
--foreground: var(--gray-9);
|
|
209
213
|
--muted: color-mix(in oklab, var(--yuw-accent) 15%, transparent);
|
|
210
214
|
}
|
package/types/yukit-web.d.ts
CHANGED
|
@@ -4784,7 +4784,8 @@ export type YuwToasterPositionDto = 'top-left' | 'top-center' | 'top-right' | 'b
|
|
|
4784
4784
|
export type YuwToasterThemeDto = 'light' | 'dark' | 'system';
|
|
4785
4785
|
/**
|
|
4786
4786
|
* Global toast host. Mount once near the application root; individual toasts are dispatched
|
|
4787
|
-
* through the `toast` API from `@spartan-ng/brain/sonner`.
|
|
4787
|
+
* through the `toast` API from `@spartan-ng/brain/sonner`. Toasts cannot be swiped away (`YuwNoToastSwipeDirective`);
|
|
4788
|
+
* they close with the close button, their own buttons or their timer.
|
|
4788
4789
|
*
|
|
4789
4790
|
* Inputs:
|
|
4790
4791
|
* - `richColors`: Enables per-type colored toasts (success, error, warning, info). Enabled by
|
|
@@ -4864,8 +4865,9 @@ export declare class YuwToasterComponent {
|
|
|
4864
4865
|
/**
|
|
4865
4866
|
* What `yuwCountdownToast` shows and calls. Every text comes translated from the consuming app. `color` paints the bar
|
|
4866
4867
|
* and, being `destructive`, `success`, `warning` or `info`, gives the toast that type's icon; any other color shows a
|
|
4867
|
-
* plain toast. Default is `'destructive'`.
|
|
4868
|
-
* stays `seconds` and can be closed
|
|
4868
|
+
* plain toast. Default is `'destructive'`. `cancelLabel` is the accessible name and tooltip of the undo icon button
|
|
4869
|
+
* (e.g. "Undo changes"); without it there is no undo button, for a notice that only stays `seconds` and can be closed
|
|
4870
|
+
* with the toaster's close button.
|
|
4869
4871
|
*/
|
|
4870
4872
|
export interface YuwCountdownToastOptionsDto {
|
|
4871
4873
|
color?: YuwColorDto;
|
|
@@ -4876,22 +4878,23 @@ export interface YuwCountdownToastOptionsDto {
|
|
|
4876
4878
|
onComplete?: () => void;
|
|
4877
4879
|
onCancel?: () => void;
|
|
4878
4880
|
}
|
|
4879
|
-
/** Settles a countdown toast from outside: `cancel` as its button does, `complete` as running out does. */
|
|
4881
|
+
/** Settles a countdown toast from outside: `cancel` as its undo button does, `complete` as running out does. */
|
|
4880
4882
|
export interface YuwCountdownToastRef {
|
|
4881
4883
|
cancel: () => void;
|
|
4882
4884
|
complete: () => void;
|
|
4883
4885
|
}
|
|
4884
4886
|
/**
|
|
4885
|
-
* Shows a toast that counts down `seconds` with a bar and, with a `cancelLabel`,
|
|
4886
|
-
* runs unless the user takes it back. Running out
|
|
4887
|
-
* button calls `onCancel`. Hovering the toaster pauses the countdown. It settles once: whichever comes first wins, and
|
|
4888
|
-
* the toast closes.
|
|
4887
|
+
* Shows a toast that counts down `seconds` with a bar and, with a `cancelLabel`, an undo icon button, for an action that
|
|
4888
|
+
* runs unless the user takes it back. Running out or the toaster's close button call `onComplete`; the
|
|
4889
|
+
* undo button calls `onCancel`. Hovering the toaster pauses the countdown. It settles once: whichever comes first wins, and
|
|
4890
|
+
* the toast closes with sonner's exit animation. A close that sonner started (the close button) is left to it;
|
|
4891
|
+
* any other is asked of sonner with `delete`, since `dismiss` would drop the toast at once and cut the animation short.
|
|
4889
4892
|
*
|
|
4890
4893
|
* Usage:
|
|
4891
4894
|
* ```ts
|
|
4892
4895
|
* yuwCountdownToast({
|
|
4893
4896
|
* message: (seconds) => `Deleting "Acme" in ${seconds} s`,
|
|
4894
|
-
* cancelLabel: '
|
|
4897
|
+
* cancelLabel: 'Undo changes',
|
|
4895
4898
|
* progressLabel: 'Time left',
|
|
4896
4899
|
* seconds: 10,
|
|
4897
4900
|
* onComplete: () => this.delete(),
|
|
@@ -5369,6 +5372,7 @@ export declare class YuwTabsComponent {
|
|
|
5369
5372
|
readonly tabs: import("@angular/core").InputSignal<YuwTabItemDto[]>;
|
|
5370
5373
|
readonly userClass: import("@angular/core").InputSignal<string>;
|
|
5371
5374
|
readonly variant: import("@angular/core").InputSignal<YuwTabsVariantDto>;
|
|
5375
|
+
protected readonly triggerClass = "text-(--gray-11) hover:text-(--gray-12) dark:text-(--gray-11) dark:hover:text-(--gray-12) dark:data-active:bg-(--gray-1)";
|
|
5372
5376
|
protected readonly _listClass: import("@angular/core").Signal<string>;
|
|
5373
5377
|
protected readonly _resolved: import("@angular/core").Signal<{
|
|
5374
5378
|
template: import("@angular/core").TemplateRef<unknown> | undefined;
|
|
@@ -6977,13 +6981,27 @@ export declare class YuwsFlagCellComponent {
|
|
|
6977
6981
|
};
|
|
6978
6982
|
}, {}, never, never, true, never>;
|
|
6979
6983
|
}
|
|
6984
|
+
/**
|
|
6985
|
+
* Icon button at the end of a row, hidden until the row is hovered or keyboard-focused like the pencil of
|
|
6986
|
+
* `buildYuwActionsColumn`; touch devices keep it visible. `icon` is the SVG itself (e.g. `lucideEye`), so the cell does
|
|
6987
|
+
* not have to register every consumer's icon. The host stops the click so a clickable row does not fire too.
|
|
6988
|
+
*
|
|
6989
|
+
* Inputs:
|
|
6990
|
+
* - `action` (required): Callback run on click. An input because `flexRenderComponent` does not subscribe outputs.
|
|
6991
|
+
* - `destructive`: Draws a red button (`secondary` in the `destructive` color), for an action that removes. Default is
|
|
6992
|
+
* `false`.
|
|
6993
|
+
* - `icon` (required): SVG markup of the icon.
|
|
6994
|
+
* - `label` (required): Accessible name of the button. The consuming app translates it.
|
|
6995
|
+
* - `tooltip`: Hint shown on hover or keyboard focus; empty shows none. The consuming app translates it.
|
|
6996
|
+
*/
|
|
6980
6997
|
export declare class YuwsIconActionCellComponent {
|
|
6981
6998
|
readonly action: import("@angular/core").InputSignal<() => void>;
|
|
6982
6999
|
readonly destructive: import("@angular/core").InputSignal<boolean>;
|
|
6983
7000
|
readonly icon: import("@angular/core").InputSignal<string>;
|
|
6984
7001
|
readonly label: import("@angular/core").InputSignal<string>;
|
|
6985
7002
|
readonly tooltip: import("@angular/core").InputSignal<string>;
|
|
6986
|
-
protected readonly
|
|
7003
|
+
protected readonly color: import("@angular/core").Signal<YuwColorDto>;
|
|
7004
|
+
protected readonly variant: import("@angular/core").Signal<"secondary" | "ghost">;
|
|
6987
7005
|
protected run(): void;
|
|
6988
7006
|
static ɵfac: i0.ɵɵFactoryDeclaration<YuwsIconActionCellComponent, never>;
|
|
6989
7007
|
static ɵcmp: i0.ɵɵComponentDeclaration<YuwsIconActionCellComponent, "yuws-icon-action-cell", never, {
|
|
@@ -8205,6 +8223,7 @@ export interface YuwsListToolbarColumnsLabels {
|
|
|
8205
8223
|
readonly title?: string;
|
|
8206
8224
|
readonly placeholder?: string;
|
|
8207
8225
|
readonly empty: string;
|
|
8226
|
+
readonly reset?: string;
|
|
8208
8227
|
}
|
|
8209
8228
|
/**
|
|
8210
8229
|
* `trigger` names the share button, `title` heads its menu when set, one entry per `YuwTableShareFormat` names its menu
|
|
@@ -8333,6 +8352,8 @@ export declare class YuwsFilterContentDirective {
|
|
|
8333
8352
|
* - `filterGroups`: Filter groups the editor offers; the filter control renders only when set.
|
|
8334
8353
|
* - `filterSets`: Saved filter sets; together with `labels.filters.sets` it enables the sets star.
|
|
8335
8354
|
* - `filtersDisabled`: Disables every control of the filter row. Default is `false`.
|
|
8355
|
+
* - `defaultHiddenColumns`: Ids of the columns hidden by default; with `labels.columns.reset` the column menu offers to
|
|
8356
|
+
* restore them. Default is `[]`.
|
|
8336
8357
|
* - `hiddenColumns`: Two-way (`[(hiddenColumns)]`) ids of the columns currently hidden. Default is `[]`.
|
|
8337
8358
|
* - `hideableColumns`: Options of the columns the user may hide; the columns button renders only when set.
|
|
8338
8359
|
* - `idleColor`: `YuwColorDto` tone of the filter row's outline controls. Default is `'neutral'`.
|
|
@@ -8355,6 +8376,7 @@ export declare class YuwsFilterContentDirective {
|
|
|
8355
8376
|
*/
|
|
8356
8377
|
export declare class YuwsListToolbarComponent {
|
|
8357
8378
|
protected readonly filterContents: import("@angular/core").Signal<readonly YuwsFilterContentDirective[]>;
|
|
8379
|
+
readonly defaultHiddenColumns: import("@angular/core").InputSignal<readonly string[]>;
|
|
8358
8380
|
readonly filterGroups: import("@angular/core").InputSignal<readonly YuwsFilterGroupDto[] | undefined>;
|
|
8359
8381
|
readonly filtersDisabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
8360
8382
|
readonly filterSets: import("@angular/core").InputSignal<readonly YuwsFilterSetDto[] | undefined>;
|
|
@@ -8380,6 +8402,11 @@ export declare class YuwsListToolbarComponent {
|
|
|
8380
8402
|
protected readonly isMobile: import("@angular/core").Signal<boolean>;
|
|
8381
8403
|
static ɵfac: i0.ɵɵFactoryDeclaration<YuwsListToolbarComponent, never>;
|
|
8382
8404
|
static ɵcmp: i0.ɵɵComponentDeclaration<YuwsListToolbarComponent, "yuws-list-toolbar", never, {
|
|
8405
|
+
"defaultHiddenColumns": {
|
|
8406
|
+
"alias": "defaultHiddenColumns";
|
|
8407
|
+
"required": false;
|
|
8408
|
+
"isSignal": true;
|
|
8409
|
+
};
|
|
8383
8410
|
"filterGroups": {
|
|
8384
8411
|
"alias": "filterGroups";
|
|
8385
8412
|
"required": false;
|